/* --- BAZA WTYCZKI --- */
.ew-plugin-wrapper {
    all: revert !important; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #111827 !important;
    line-height: 1.6 !important;
    max-width: 100% !important;
    display: block !important;
    background: #eef3f5 !important;
}

.ew-plugin-wrapper *, .ew-plugin-wrapper *:before, .ew-plugin-wrapper *:after {
    box-sizing: border-box !important;
}

.ew-plugin-wrapper .ew-page-header {
    background: #edf1f3 !important;
    padding: 42px 24px 36px !important;
    margin: 0 0 36px !important;
    text-align: center !important;
}

.ew-plugin-wrapper .ew-page-title {
    margin: 0 !important;
    color: #111827 !important;
    font-size: clamp(2rem, 3vw, 3rem) !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em !important;
}

.ew-plugin-wrapper .ew-verification-card {
    max-width: 1180px !important;
    width: 100% !important;
    margin: 0 auto 0 !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 34px 28px 26px !important;
    box-shadow: none !important;
}

.ew-plugin-wrapper .ew-box-title {
    margin: 0 0 26px !important;
    font-size: clamp(1.8rem, 2vw, 2.5rem) !important;
    line-height: 1.2 !important;
    color: #111827 !important;
    font-weight: 800 !important;
}

.ew-plugin-wrapper .ew-verify-form {
    display: flex !important;
    align-items: flex-end !important;
    gap: 18px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.ew-plugin-wrapper .ew-form-field {
    flex: 1 1 250px !important;
    min-width: 180px !important;
}

.ew-plugin-wrapper .ew-form-field input {
    width: 100% !important;
    min-height: 58px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    font-size: 16px !important;
    background: #fff !important;
    color: #111827 !important;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

.ew-plugin-wrapper .ew-form-field input::placeholder {
    color: #6b7280 !important;
}

.ew-plugin-wrapper .ew-verify-submit {
    min-height: 58px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #0f172a !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 0 32px !important;
    cursor: pointer !important;
    line-height: 58px !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.ew-plugin-wrapper .ew-verify-submit:hover {
    transform: translateY(-1px) !important;
    opacity: 0.96 !important;
}

@media (max-width: 768px) {
    .ew-plugin-wrapper .ew-page-header {
        padding: 28px 18px 24px !important;
        margin-bottom: 24px !important;
    }

    .ew-plugin-wrapper .ew-verification-card {
        padding: 22px 18px 20px !important;
    }

    .ew-plugin-wrapper .ew-verify-form {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .ew-plugin-wrapper .ew-form-field,
    .ew-plugin-wrapper .ew-verify-submit {
        width: 100% !important;
    }

    .ew-plugin-wrapper .ew-verify-submit {
        margin-top: 4px !important;
    }
}

/* --- WIDGET KROKÓW (Zgodnie z Twoim obrazkiem) --- */
.ew-plugin-wrapper .ew-widget-box {
    background: #fff !important;
    padding: 40px !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    margin: 30px 0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

.ew-plugin-wrapper .ew-widget-title { font-size: 26px !important; font-weight: 800 !important; margin-bottom: 30px !important; color: #000 !important; }

.ew-plugin-wrapper .ew-widget-steps { display: flex !important; gap: 30px !important; margin: 30px 0 !important; }
.ew-plugin-wrapper .ew-widget-step { flex: 1 !important; }
.ew-plugin-wrapper .ew-num {
    background: #000 !important; color: #fff !important;
    width: 35px !important; height: 35px !important;
    border-radius: 50% !important; text-align: center !important;
    line-height: 35px !important; font-weight: bold !important; margin-bottom: 15px !important;
}
.ew-plugin-wrapper .ew-widget-step h3 { font-size: 16px !important; margin: 0 0 10px 0 !important; color: #000 !important; }
.ew-plugin-wrapper .ew-widget-step p { font-size: 14px !important; color: #666 !important; }

.ew-plugin-wrapper .ew-widget-btn {
    display: block !important; background: #000 !important; color: #fff !important;
    text-align: center !important; padding: 18px !important;
    border-radius: 50px !important; text-decoration: none !important;
    font-weight: 700 !important; max-width: 300px !important; margin: 20px auto 0 !important;
    transition: background 0.3s ease !important;
}
.ew-plugin-wrapper .ew-widget-btn:hover { background: #333 !important; }

/* --- FORMULARZ I TABELE --- */
.ew-plugin-wrapper .ew-form {
    background: #fff !important; padding: 25px !important;
    border-radius: 12px !important; border: 1px solid #e5e7eb !important;
}

.ew-plugin-wrapper .shop_table { width: 100% !important; border-collapse: collapse !important; margin-bottom: 20px !important; }
.ew-plugin-wrapper .shop_table th { background: #f9fafb !important; padding: 12px !important; border-bottom: 2px solid #e5e7eb !important; text-align: left !important; }
.ew-plugin-wrapper .shop_table td { padding: 12px !important; border-bottom: 1px solid #f3f4f6 !important; }

.ew-plugin-wrapper .button {
    background-color: #10b981 !important; color: #fff !important;
    padding: 14px 24px !important; border: none !important;
    border-radius: 6px !important; cursor: pointer !important;
    font-weight: 700 !important; display: inline-block !important;
}
.ew-plugin-wrapper .button:hover { background-color: #059669 !important; }

/* --- KOMUNIKATY --- */
.ew-plugin-wrapper .ew-msg.success {
    padding: 20px !important; background: #ecfdf5 !important;
    color: #065f46 !important; border: 1px solid #a7f3d0 !important;
    border-radius: 8px !important; text-align: center !important;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 768px) {
    .ew-plugin-wrapper .ew-widget-steps { flex-direction: column !important; gap: 20px !important; }
    .ew-plugin-wrapper .ew-widget-btn { max-width: 100% !important; }
}
/* Wymuszony reset stylów wtyczki */
.ew-plugin-wrapper {
    all: revert !important;
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Stylizacja tabeli (z Twojego zrzutu) */
.ew-plugin-wrapper table.shop_table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    border: 1px solid #eee !important;
}

.ew-plugin-wrapper table.shop_table th, 
.ew-plugin-wrapper table.shop_table td {
    padding: 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    text-align: left !important;
}

/* Przycisk */
.ew-plugin-wrapper .button, 
.ew-plugin-wrapper button {
    background: #000 !important;
    color: #fff !important;
    padding: 12px 25px !important;
    border-radius: 50px !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: 700 !important;
}

/* Select */
.ew-plugin-wrapper select {
    padding: 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 5px !important;
    width: 30% !important;
}
/* Stylizacja pola liczbowego w tabeli zwrotów */
.ew-plugin-wrapper .ew-form input[type="number"] {
    width: 60px !important;            /* Wystarczająca szerokość na cyfry */
    padding: 8px 10px !important;      /* Wygodny klik */
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;     /* Delikatne zaokrąglenie */
    font-size: 14px !important;
    background-color: #fff !important;
    color: #000 !important;
    text-align: center !important;     /* Wyśrodkowanie liczby */
    transition: border-color 0.2s ease !important;
}

/* Efekt po kliknięciu w pole */
.ew-plugin-wrapper .ew-form input[type="number"]:focus {
    outline: none !important;
    border-color: #10b981 !important;  /* Zielony akcent przy edycji */
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Ukrycie strzałek w niektórych przeglądarkach (opcjonalnie dla estetyki) */
.ew-plugin-wrapper .ew-form input[type="number"]::-webkit-inner-spin-button, 
.ew-plugin-wrapper .ew-form input[type="number"]::-webkit-outer-spin-button { 
    opacity: 1 !important;             /* Zostawiamy strzałki dla łatwej obsługi na mobile */
}
/* --- ROZBUDOWA TABELI (Efekty i czytelność) --- */
.ew-plugin-wrapper .shop_table tbody tr:hover {
    background-color: #f9fafb !important;
}

.ew-plugin-wrapper .shop_table td:first-child {
    font-weight: 500 !important;
    color: #111 !important;
}

/* --- ROZBUDOWA KOMUNIKATU SUKCESU (Zgodnie z obrazkiem) --- */
.ew-plugin-wrapper .ew-msg.success {
    margin: 30px 0 !important;
    border: 2px solid #10b981 !important;
    background: #f0fdf4 !important;
    padding: 30px !important;
}

.ew-plugin-wrapper .ew-msg.success h2 {
    font-size: 24px !important;
    color: #065f46 !important;
    margin-bottom: 20px !important;
}

.ew-plugin-wrapper .ew-msg.success table {
    background: #ffffff !important;
    border: 1px solid #d1fae5 !important;
    border-radius: 8px !important;
}

.ew-plugin-wrapper .ew-msg.success table td {
    padding: 12px 15px !important;
}

/* --- LEPSZY WYGLĄD SELECTA --- */
.ew-plugin-wrapper select {
    min-width: 250px !important;
    padding: 12px !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    appearance: auto !important; /* Przywraca natywny wygląd */
}

/* --- RESPONSYWNOŚĆ - POPRAWKI DLA MOBILE --- */
@media (max-width: 600px) {
    .ew-plugin-wrapper .shop_table thead {
        display: none !important; /* Ukryj nagłówki na małych ekranach */
    }
    
    .ew-plugin-wrapper .shop_table, 
    .ew-plugin-wrapper .shop_table tbody, 
    .ew-plugin-wrapper .shop_table tr, 
    .ew-plugin-wrapper .shop_table td {
        display: block !important;
        width: 100% !important;
    }
    
    .ew-plugin-wrapper .shop_table tr {
        margin-bottom: 15px !important;
        border-bottom: 2px solid #eee !important;
        padding-bottom: 10px !important;
    }
    
    .ew-plugin-wrapper .shop_table td {
        text-align: right !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .ew-plugin-wrapper .shop_table td::before {
        content: attr(data-label); /* Wymaga dodania atrybutu data-label w HTML */
        font-weight: bold !important;
        color: #000 !important;
    }
    
    .ew-plugin-wrapper .ew-form input[type="number"] {
        width: 100px !important; /* Większe pole na mobile */
    }
}
.ew-plugin-wrapper .ew-address-box {
    background: #fff !important;
    padding: 15px !important;
    border-radius: 8px !important;
    border: 1px dashed #059669 !important;
    margin: 15px 0 !important;
    font-weight: 600 !important;
    color: #065f46 !important;
}

/* --- PANEL DOKUMENTÓW --- */
.ew-plugin-wrapper .shop_table thead th {
    background: #f9fafb !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.ew-plugin-wrapper .shop_table tbody tr:hover {
    background-color: #f9fafb !important;
}

.ew-plugin-wrapper .shop_table td {
    vertical-align: middle !important;
}

/* --- PRZYCISKI DOKUMENTÓW --- */
.ew-plugin-wrapper .ew-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.ew-plugin-wrapper .ew-actions .button:hover {
    transform: translateY(-2px) !important;
}

/* --- NOWY, ROZBUDOWANY FORMULARZ ODDZIAŁUZWROTU --- */
.ew-plugin-wrapper .ew-return-header {
    margin-bottom: 24px !important;
    padding-bottom: 18px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.ew-plugin-wrapper .ew-return-badge {
    display: inline-block !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    margin-bottom: 12px !important;
}

.ew-plugin-wrapper .ew-return-header h3 {
    margin: 0 0 10px !important;
    font-size: 30px !important;
    color: #111827 !important;
    line-height: 1.2 !important;
}

.ew-plugin-wrapper .ew-return-header p {
    margin: 0 !important;
    color: #4b5563 !important;
    font-size: 15px !important;
}

.ew-plugin-wrapper .ew-order-summary {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 26px !important;
}

.ew-plugin-wrapper .ew-summary-card {
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%) !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 18px 18px 16px !important;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.02) !important;
}

.ew-plugin-wrapper .ew-summary-card span {
    display: block !important;
    font-size: 12px !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #6b7280 !important;
    margin-bottom: 8px !important;
}

.ew-plugin-wrapper .ew-summary-card strong {
    display: block !important;
    color: #111827 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
}

.ew-plugin-wrapper .ew-return-form {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;
    padding: 24px !important;
}

.ew-plugin-wrapper .ew-return-steps {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 0 22px !important;
}

.ew-plugin-wrapper .ew-return-steps span {
    display: inline-flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    border-radius: 999px !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.ew-plugin-wrapper .ew-return-steps .active {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.ew-plugin-wrapper .ew-return-policy {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 18px 20px !important;
    margin-bottom: 22px !important;
}

.ew-plugin-wrapper .ew-return-policy h4 {
    margin: 0 0 12px !important;
    font-size: 16px !important;
    color: #111827 !important;
}

.ew-plugin-wrapper .ew-return-policy ul {
    margin: 0 !important;
    padding-left: 18px !important;
    color: #374151 !important;
    line-height: 1.7 !important;
}

.ew-plugin-wrapper .ew-exchange-box,
.ew-plugin-wrapper .ew-field-group,
.ew-plugin-wrapper .ew-terms-box {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    margin-bottom: 18px !important;
}

.ew-plugin-wrapper .ew-check-inline {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin: 0 !important;
}

.ew-plugin-wrapper .ew-check-inline input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #10b981 !important;
}

.ew-plugin-wrapper .ew-field-label {
    display: block !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

.ew-plugin-wrapper .ew-field-group select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: auto !important;
}

.ew-plugin-wrapper .ew-table-wrap {
    overflow-x: auto !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
}

.ew-plugin-wrapper .ew-return-table {
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.ew-plugin-wrapper .ew-product-cell {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

.ew-plugin-wrapper .ew-product-cell small {
    color: #6b7280 !important;
    font-size: 12px !important;
}

.ew-plugin-wrapper .ew-status {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

.ew-plugin-wrapper .ew-status.yes {
    background: #ecfdf5 !important;
    color: #166534 !important;
}

.ew-plugin-wrapper .ew-status.no {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.ew-plugin-wrapper .ew-terms-box .ew-check-inline {
    align-items: flex-start !important;
}

.ew-plugin-wrapper .ew-terms-box .ew-check-inline span {
    line-height: 1.6 !important;
    color: #374151 !important;
}

.ew-plugin-wrapper .ew-form-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    margin-top: 12px !important;
}

.ew-plugin-wrapper .ew-secondary-link {
    color: #374151 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.ew-plugin-wrapper .ew-secondary-link:hover {
    text-decoration: underline !important;
}

@media (max-width: 768px) {
    .ew-plugin-wrapper .ew-order-summary {
        grid-template-columns: 1fr !important;
    }

    .ew-plugin-wrapper .ew-form-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .ew-plugin-wrapper .ew-secondary-link {
        text-align: center !important;
    }
}
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* --- DRUKOWANIE --- */
@media print {
    .woocommerce-MyAccount-navigation,
    .woocommerce-MyAccount-content h2,
    .woocommerce-MyAccount-content > .woocommerce-message,
    .woocommerce-MyAccount-content > .woocommerce-error,
    .woocommerce-MyAccount-content > .woocommerce-info {
        display: none !important;
    }

    .ew-plugin-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    .document-container {
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .no-print {
        display: none !important;
    }
}

/* --- PANEL ADMINA --- */
.ew-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 20px !important;
    margin: 20px 0 !important;
}

.ew-stat-card {
    background: white !important;
    padding: 20px !important;
    border: 1px solid #ddd !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.ew-stat-card h3 {
    margin-top: 0 !important;
    color: #333 !important;
    font-size: 16px !important;
}

.ew-stat-card p {
    margin: 5px 0 !important;
    color: #666 !important;
}

.ew-stat-card p:first-of-type {
    font-size: 32px !important;
    font-weight: bold !important;
    margin: 15px 0 !important;
}

/* Status colors */
.status-pending { color: #d63638 !important; font-weight: bold !important; }
.status-ew-pending-shipment { color: #0073aa !important; font-weight: bold !important; }
.status-ew-in-transit { color: #0073aa !important; font-weight: bold !important; }
.status-ew-received { color: #00a32a !important; font-weight: bold !important; }
.status-ew-verification { color: #0073aa !important; font-weight: bold !important; }
.status-ew-completed { color: #00a32a !important; font-weight: bold !important; }
.status-refunded { color: #00a32a !important; font-weight: bold !important; }