.woocommerce-account .entry-header,
.woocommerce-account .entry-title,
.woocommerce-account .page-header {
    display: none !important;
}

/* 4. Kontrastowa karta logowania */
body.woocommerce-account .alma-auth-card {
    background-color: #ffffff !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
}

/* =========================================================
   NOWOCZESNY PANEL MOJE KONTO (MY ACCOUNT)
   ========================================================= */

.tw-account-layout {
    display: grid !important;
    grid-template-columns: 260px 1fr !important;
    gap: 40px !important;
    max-width: 1300px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif !important;
    box-sizing: border-box !important;
}

/* SIDEBAR NA DESKTOP */
.tw-account-sidebar-wrap {
    position: sticky !important;
    top: 40px !important;
    align-self: start !important;
}

.tw-account-nav-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.tw-account-nav-list li a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    color: #4b5563 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.tw-account-nav-list li a:hover {
    background-color: #f9fafb !important;
    color: #111827 !important;
}

.tw-nav-icon {
    display: flex !important;
    align-items: center !important;
    color: #9ca3af !important;
    transition: color 0.2s ease !important;
}

.tw-account-nav-list li.is-active a {
    background-color: color-mix(in srgb, var(--season-text, #111827) 10%, transparent) !important;
    color: var(--season-text, #111827) !important;
}

.tw-account-nav-list li.is-active .tw-nav-icon {
    color: var(--season-text, #111827) !important;
}

/* KARTA PROFILU (KOKPIT) */
.tw-profile-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02) !important;
}

.tw-profile-avatar img {
    border-radius: 50% !important;
    display: block !important;
    border: 2px solid #e5e7eb !important;
}

.tw-profile-name {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 4px 0 !important;
}

.tw-profile-email {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin: 0 0 10px 0 !important;
}

.tw-profile-edit-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--season-text, #111827) !important;
    text-decoration: none !important;
}

/* WIDGET OSTATNICH ZAMÓWIEŃ */
.tw-recent-orders-widget {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.tw-widget-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.tw-widget-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
}

.tw-view-all-link {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--season-text, #111827) !important;
    text-decoration: none !important;
}

.tw-orders-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.tw-order-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: #f9fafb !important;
}

.tw-order-number {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    display: block !important;
}

.tw-order-status {
    display: inline-block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    margin-top: 4px !important;
    text-transform: capitalize !important;
}

.tw-status-completed { background-color: #dcfce7 !important; color: #15803d !important; }
.tw-status-processing { background-color: #e0f2fe !important; color: #0369a1 !important; }
.tw-status-on-hold, .tw-status-pending { background-color: #fef3c7 !important; color: #b45309 !important; }

.tw-order-date {
    font-size: 13px !important;
    color: #6b7280 !important;
    display: block !important;
}

.tw-order-total {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.tw-order-details-btn {
    padding: 8px 14px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.tw-order-details-btn:hover {
    background-color: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

/* FALLBACK BRAKU ZAMÓWIEŃ */
.tw-empty-orders-card {
    text-align: center !important;
    padding: 30px 20px !important;
}

.tw-empty-icon {
    color: #9ca3af !important;
    margin-bottom: 12px !important;
}

.tw-empty-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 6px 0 !important;
}

.tw-empty-desc {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin: 0 0 16px 0 !important;
}

.tw-shop-now-btn {
    display: inline-flex !important;
    padding: 10px 20px !important;
    background-color: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* =========================================================
   WIDOK MOBILNY (PRZEWIJANE PILL TABS ZAMIAST AKORDEONU)
   ========================================================= */
@media (max-width: 768px) {
    .tw-account-layout {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin: 15px auto !important;
        padding: 0 15px !important;
    }

    /* Zamiana sidebara w poziomy, płynnie przewijany pasek */
    .tw-account-sidebar-wrap {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        overflow-x: auto !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Ukrywa scrollbar Firefox */
    }

    .tw-account-sidebar-wrap::-webkit-scrollbar {
        display: none !important; /* Ukrywa scrollbar Chrome/Safari */
    }

    .tw-account-nav-list {
        flex-direction: row !important;
        white-space: nowrap !important;
        gap: 8px !important;
    }

    .tw-account-nav-list li a {
        padding: 10px 14px !important;
        font-size: 13.5px !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 30px !important; /* Kształt pigułki */
    }

    .tw-order-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .tw-order-card-footer {
        width: 100% !important;
    }

    .tw-order-details-btn {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* =========================================================
   PODSTRONA ZAMÓWIENIA (MY ACCOUNT - ORDERS)
   ========================================================= */

.tw-orders-page-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 28px !important;
}

.tw-page-header {
    margin-bottom: 24px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.tw-page-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 4px 0 !important;
}

.tw-page-subtitle {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin: 0 !important;
}

/* Wariacja karty zamówienia dla pełnej listy */
.tw-orders-page-wrap .tw-order-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.tw-orders-page-wrap .tw-order-card:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

.tw-order-info-primary {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.tw-order-meta {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
}

.tw-order-total-label {
    color: #6b7280 !important;
}

.tw-order-count {
    color: #9ca3af !important;
    font-size: 13px !important;
}

/* PRZYCISKI AKCJI (PODGLĄD, ZAPŁAĆ, FAKTURA ITP.) */
.tw-order-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.tw-order-btn {
    padding: 8px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Domyślny przycisk "Zobacz / Szczegóły" */
.tw-order-btn.tw-btn-view {
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
}

.tw-order-btn.tw-btn-view:hover {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

/* Przycisk "Zapłać" */
.tw-order-btn.tw-btn-pay {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
}

.tw-order-btn.tw-btn-pay:hover {
    opacity: 0.9 !important;
}

/* STRONICOWANIE */
.tw-orders-pagination {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 24px !important;
    padding-top: 16px !important;
    border-top: 1px solid #f3f4f6 !important;
}

.tw-page-btn {
    padding: 8px 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease !important;
}

.tw-page-btn:hover {
    background-color: #f9fafb !important;
    color: #111827 !important;
}

.tw-page-indicator {
    font-size: 13px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
}

@media (max-width: 768px) {
    .tw-orders-page-wrap {
        padding: 16px !important;
    }

    .tw-order-actions {
        width: 100% !important;
    }

    .tw-order-btn {
        flex: 1 !important;
        text-align: center !important;
    }

    .tw-orders-pagination {
        flex-direction: column !important;
        gap: 12px !important;
    }
}

/* =========================================================
   PODSTRONA POBRANIA - ZGRABNY ROW LAYOUT
   ========================================================= */

.tw-downloads-page-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.tw-downloads-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* KOMPAKTOWY WIERSZ */
.tw-download-row {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    transition: all 0.15s ease !important;
}

.tw-download-row:hover {
    border-color: #d1d5db !important;
    background-color: #fcfcfd !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
}

/* SEKCJA LEWA: IKONA + DANE */
.tw-download-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.tw-download-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.tw-download-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    min-width: 0 !important;
}

.tw-download-file-name {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.tw-download-product-name {
    font-size: 12.5px !important;
    color: #6b7280 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.tw-download-product-name a {
    color: #6b7280 !important;
    text-decoration: none !important;
}

.tw-download-product-name a:hover {
    color: var(--season-text, #111827) !important;
}

/* SEKCJA ŚRODKOWA: INLINE BADGES */
.tw-download-meta-inline {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.tw-meta-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    background: #f3f4f6 !important;
    padding: 5px 10px !important;
    border-radius: 20px !important;
}

.tw-pill-success {
    background: #ecfdf5 !important;
    color: #047857 !important;
}

/* SEKCJA PRAWA: PRZYCISK */
.tw-download-action {
    flex-shrink: 0 !important;
}

.tw-download-btn-compact {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease !important;
}

.tw-download-btn-compact:hover {
    opacity: 0.9 !important;
    color: #ffffff !important;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    .tw-downloads-page-wrap {
        padding: 16px !important;
    }

    .tw-download-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    .tw-download-main {
        width: 100% !important;
    }

    .tw-download-meta-inline {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .tw-download-action {
        width: 100% !important;
    }

    .tw-download-btn-compact {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px !important;
    }
}

/* =========================================================
   PODSTRONA ADRESY (MY ACCOUNT - ADDRESSES)
   ========================================================= */

.tw-addresses-page-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.tw-addresses-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 16px !important;
}

.tw-address-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.tw-address-card:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

.tw-address-card-header {
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.tw-address-type {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.tw-address-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.tw-address-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
}

.tw-address-card-body {
    flex: 1 1 auto !important;
    margin-bottom: 16px !important;
}

.tw-address-content {
    font-style: normal !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #4b5563 !important;
    margin: 0 !important;
}

.tw-empty-address {
    color: #9ca3af !important;
    font-style: italic !important;
}

.tw-address-card-footer {
    display: flex !important;
    justify-content: flex-start !important;
}

.tw-address-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 14px !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.tw-address-btn:hover {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

@media (max-width: 768px) {
    .tw-addresses-page-wrap {
        padding: 16px !important;
    }

    .tw-addresses-grid {
        grid-template-columns: 1fr !important;
    }

    .tw-address-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =========================================================
   PODSTRONA SZCZEGÓŁY KONTA (MY ACCOUNT - EDIT ACCOUNT)
   ========================================================= */

.tw-account-details-page-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.tw-account-details-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

.tw-form-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.tw-section-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
}

.tw-section-subtitle {
    font-size: 13px !important;
    color: #6b7280 !important;
    margin: 2px 0 0 0 !important;
}

/* SIATKA POL W FORMULARZU */
.tw-form-row-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
}

.tw-account-details-form .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}

.tw-account-details-form label {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
}

.tw-account-details-form label .required {
    color: #ef4444 !important;
    text-decoration: none !important;
}

.tw-account-details-form input.tw-input {
    width: 100% !important;
    height: 42px !important;
    padding: 0 14px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: #111827 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    box-shadow: none !important;
}

.tw-account-details-form input.tw-input:focus {
    outline: none !important;
    border-color: #111827 !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08) !important;
}

.tw-field-hint {
    font-size: 12.5px !important;
    color: #6b7280 !important;
    margin-top: 2px !important;
}

/* SEKCJA ZMIANY HASŁA (WYRÓŻNIONY KAFELEK) */
.tw-password-box {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    gap: 16px !important;
}

.tw-password-header {
    margin-bottom: 4px !important;
}

/* FOOTER I PRZYCISK ZAPISU */
.tw-form-actions {
    display: flex !important;
    justify-content: flex-start !important;
    padding-top: 8px !important;
}

.tw-save-account-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 11px 22px !important;
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease, transform 0.1s ease !important;
}

.tw-save-account-btn:hover {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    opacity: 0.9 !important;
}

.tw-save-account-btn:active {
    transform: scale(0.98) !important;
}

@media (max-width: 768px) {
    .tw-account-details-page-wrap {
        padding: 16px !important;
    }

    .tw-form-row-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .tw-password-box {
        padding: 16px !important;
    }

    .tw-save-account-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =========================================================
   FORMULARZ EDYCYJNY ADRESU - ZZWARTA WERSJA (KOMPAKTOWA)
   ========================================================= */

.tw-address-edit-page-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 18px !important;
}

.tw-address-edit-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
}

/* SIATKA PÓŁ Z ZMNIEJSZONYMI ODSTĘPAMI */
.tw-address-fields-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 0 !important;
    margin: 0 -5px !important;
}

.tw-address-fields-grid .form-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 0 5px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
}

/* FIX DLA DYNAMICZNEGO UKRYWANIA PÓŁ PRZEZ WOOCOMMERCE JS (WOJEWÓDZTWO / REGION) */
.tw-address-fields-grid .form-row[style*="display: none"],
.tw-address-fields-grid .form-row[style*="display:none"],
.tw-address-fields-grid .form-row.hidden {
    display: none !important;
}

.tw-address-fields-grid .form-row-wide {
    width: 100% !important;
}

.tw-address-fields-grid .form-row-first,
.tw-address-fields-grid .form-row-last {
    width: 50% !important;
}

/* ETYKIETY I POLA WEJŚCIOWE */
.tw-address-edit-form label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 0 !important;
}

.tw-address-edit-form label .required {
    color: #ef4444 !important;
    text-decoration: none !important;
}

.tw-address-edit-form input.input-text,
.tw-address-edit-form select,
.tw-address-edit-form textarea {
    width: 100% !important;
    height: 38px !important;
    padding: 0 12px !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 13.5px !important;
    color: #111827 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

.tw-address-edit-form textarea {
    height: auto !important;
    padding: 8px 12px !important;
}

.tw-address-edit-form input.input-text:focus,
.tw-address-edit-form select:focus,
.tw-address-edit-form textarea:focus {
    outline: none !important;
    border-color: #111827 !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08) !important;
}

/* STYLIZACJA SELECT2 / SELECTWOO (KRAJ ORAZ WOJEWÓDZTWO) */
.tw-address-edit-form .select2-container {
    width: 100% !important;
}

.tw-address-edit-form .select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
}

.tw-address-edit-form .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px !important;
    color: #111827 !important;
    font-size: 13.5px !important;
    line-height: normal !important;
}

.tw-address-edit-form .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 6px !important;
}

/* PRZYCISK ZAPISU */
.tw-address-edit-form .tw-form-actions {
    display: flex !important;
    justify-content: flex-start !important;
    padding-top: 4px !important;
}

.tw-save-address-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 18px !important;
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease, transform 0.1s ease !important;
}

.tw-save-address-btn:hover {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    opacity: 0.9 !important;
}

.tw-save-address-btn:active {
    transform: scale(0.98) !important;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    .tw-address-edit-page-wrap {
        padding: 14px !important;
    }

    .tw-address-fields-grid .form-row-first,
    .tw-address-fields-grid .form-row-last {
        width: 100% !important;
    }

    .tw-save-address-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =========================================================
   PODSTRONA SZCZEGÓŁY ZAMÓWIENIA (MY ACCOUNT - ORDER DETAILS)
   ========================================================= */

.tw-order-details-wrap {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

/* NAGŁÓWEK I BADGE STATUSU */
.tw-order-header-flex {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.tw-order-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    flex-shrink: 0 !important;
}

/* STATUSY ZAMÓWIENIA */
.tw-status-completed {
    background: #ecfdf5 !important;
    color: #047857 !important;
}

.tw-status-processing {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

.tw-status-on-hold,
.tw-status-pending {
    background: #fffbebf !important;
    color: #b45309 !important;
}

.tw-status-cancelled,
.tw-status-failed,
.tw-status-refunded {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

/* LISTA PRODUKTÓW */
.tw-order-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.tw-order-items-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.tw-order-item-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    gap: 12px !important;
}

.tw-item-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
}

.tw-item-thumbnail img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    border: 1px solid #f3f4f6 !important;
    display: block !important;
}

.tw-item-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}

.tw-item-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.tw-item-name a {
    color: #111827 !important;
    text-decoration: none !important;
}

.tw-item-qty {
    font-size: 12px !important;
    color: #6b7280 !important;
}

.tw-item-price {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    white-space: nowrap !important;
}

/* KAFELEK PODSUMOWANIA (TOTALS) */
.tw-order-totals-box {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.tw-totals-rows {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.tw-total-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 13.5px !important;
    color: #4b5563 !important;
}

.tw-total-grand {
    padding-top: 8px !important;
    border-top: 1px solid #e5e7eb !important;
    margin-top: 4px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

.tw-total-grand .tw-total-value {
    color: #111827 !important;
}

/* SIATKA ADRESÓW NA DOLE ZAMÓWIENIA */
.tw-order-addresses-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 12px !important;
}

.tw-address-contact-item {
    margin-top: 4px !important;
    font-size: 13px !important;
    color: #6b7280 !important;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 768px) {
    .tw-order-details-wrap {
        padding: 14px !important;
    }

    .tw-order-header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .tw-order-item-row {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .tw-item-price {
        align-self: flex-end !important;
    }

    .tw-order-addresses-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   SEKCJA UWAG DO ZAMÓWIENIA (MY ACCOUNT - ORDER NOTES)
   ========================================================= */

.tw-order-notes-section {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 18px !important;
    margin-bottom: 20px !important;
}

.tw-order-notes-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 12px 0 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.tw-order-note-item {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
}

.tw-order-note-meta {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    margin-bottom: 6px !important;
}

.tw-order-note-content {
    font-size: 13.5px !important;
    color: #111827 !important;
    line-height: 1.5 !important;
}

.tw-order-note-content p {
    margin: 0 !important;
}

/* =========================================================
   SEKCJA POBIERANIA (MY ACCOUNT & ORDER DETAILS DOWNLOADS)
   ========================================================= */

.tw-downloads-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
}

.tw-downloads-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.tw-download-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    gap: 12px !important;
    transition: border-color 0.15s ease !important;
}

.tw-download-item:hover {
    border-color: #d1d5db !important;
}

.tw-download-main {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    min-width: 0 !important;
}

.tw-download-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.tw-download-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
}

.tw-download-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.tw-download-title a {
    color: #111827 !important;
    text-decoration: none !important;
}

.tw-download-meta {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    color: #6b7280 !important;
}

.tw-meta-divider {
    color: #d1d5db !important;
}

.tw-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    background: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.tw-download-btn:hover {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

@media (max-width: 768px) {
    .tw-download-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .tw-download-action {
        width: 100% !important;
    }

    .tw-download-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =========================================================
   PRZYCISKI AKCJI ZAMÓWIENIA (ELEGANCKI / ELEGANKI STYL)
   ========================================================= */

.tw-order-actions-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    margin-bottom: 4px !important;
    flex-wrap: wrap !important;
}

.tw-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

/* PRZYCISK ZAPŁAĆ (Główny - ciemny accent) */
.tw-action-pay {
    background: var(--season-text, #111827) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
}

.tw-action-pay:hover {
    background: #1f2937 !important;
    color: #ffffff !important;
    opacity: 0.95 !important;
}

/* PRZYCISK ANULUJ (Subtelny, konturowy) */
.tw-action-cancel {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
}

.tw-action-cancel:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}

@media (max-width: 768px) {
    .tw-order-actions-bar {
        flex-direction: column !important;
    }

    .tw-action-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ========================================================================== 
   POPUP LOGOWANIA (MODAL) - NAPRAWA WYGLĄDU
   ========================================================================== */
.alma-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alma-auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

/* 1. KONTENER GŁÓWNY MODALA - to on ma białe tło, dzięki temu X się nie ucina */
.alma-auth-modal-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    margin: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
    animation: modalFadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: hidden; /* Obcina wszystko, co wystaje */
}

/* Usuwamy wewnętrzne tła i marginesy z oryginalnego szablonu */
.alma-auth-modal-content .custom-auth-wrapper,
.alma-auth-modal-content .custom-auth-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 10px !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* 2. NAPRAWA KRZYŻYKA (X) - Czysty, w prawym górnym rogu wewnątrz białego boxu */
.alma-auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
    box-shadow: none;
}

.alma-auth-modal-close:hover {
    background: #F3F4F6;
}

/* 3. NAPRAWA INPUTÓW WYSTAJĄCYCH POZA MODAL */
.alma-auth-modal-content .form-row {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.alma-auth-modal-content input.tw-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important; /* To powstrzymuje input przed rozpychaniem diva */
    height: 46px;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
}

.alma-auth-modal-content input.tw-input:focus {
    border-color: #9CA3AF;
    outline: none;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.05);
}

/* Pozycjonowanie 'Oczka' od hasła WooCommerce */
.alma-auth-modal-content .show-password-input {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 14px;
    color: #6B7280;
}

@keyframes modalFadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gwarantuje, że dynamiczny span WooCommerce zajmie całą szerokość modala */
.alma-auth-modal-content .password-input {
    display: block !important;
    width: 100% !important;
    position: relative;
}

/* Ustawia ikonę oczka na środku pola po prawej stronie */
.alma-auth-modal-content .password-input .show-password-input {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
}

/* Nowa ikonka Pokaż/Ukryj Hasło */
.alma-auth-modal-content .alma-toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.alma-auth-modal-content .alma-toggle-password:hover {
    color: #111827;
}

/* Naprawa marginesów z komunikatem błędu wewnątrz karty */
.alma-auth-modal-content .custom-auth-card {
    display: flex;
    flex-direction: column;
}

.alma-auth-modal-content .woocommerce-notices-wrapper {
    margin-bottom: 20px;
    order: -1; /* Wymusza by komunikaty zawsze lądowały na górze wewnątrz karty */
}

/* Dostosowanie samego błędu, żeby nie krzyczał na czerwono i pasował do designu */
.alma-auth-modal-content .woocommerce-error {
    background: #FEF2F2 !important;
    border: 1px solid #FCA5A5 !important;
    border-left: 4px solid #B42318 !important;
    color: #B42318 !important;
    font-size: 13px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    list-style: none !important;
    margin: 0 !important;
}

/* To samo dla komunikatu o sukcesie (wiadomości) */
.alma-auth-modal-content .woocommerce-message {
    background: #F0FDF4 !important;
    border: 1px solid #86EFAC !important;
    border-left: 4px solid #059669 !important;
    color: #065F46 !important;
    font-size: 13px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    list-style: none !important;
    margin: 0 !important;
}

/* 1. Domyślnie ukrywamy nasze własne oczko na całej stronie (w tym na /my-account/) */
.alma-toggle-password {
    display: none !important;
}

/* 2. Wymuszamy jego pokazanie TYLKO wewnątrz naszego okienka (Modala) */
.alma-auth-modal-content .alma-toggle-password {
    display: flex !important;
}

.woocommerce form .show-password-input::before, .woocommerce-page form .show-password-input::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") !important;
}

.woocommerce form .show-password-input.display-password::before, .woocommerce-page form .show-password-input.display-password::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") !important;
}