/* ============================================================
   IFAD My Account — ported 1:1 from production (myaccount.css).
   Sections: foundation + sidebar/nav, dashboard, orders (cards)
   + brand buttons, login/register. Address & Account-details forms
   keep the ifad-cart account.css field styling. Loaded on the
   /my-account/ + /checkout/ pages only. No WooCommerce.
   ============================================================ */

.woocommerce-account .site-content,
.woocommerce-account main {
    background: #fff;
}

/* Hide the page.php <h1><?php the_title(); ?></h1> on account pages —
   WC replaces the title with the endpoint slug ("Orders", "Addresses",
   etc.), which duplicates what the sidebar's active pill already conveys. */
body.woocommerce-account .container > .row > [class*="col-"] > h1 {
    display: none;
}

/* Layout: sidebar + content. Width comes from the site's own
   `.container` — we don't set our own max-width, so the account page
   sits inside the same rails as every other page. */
.woocommerce-account .woocommerce {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    padding: 8px 0 40px;
    font-family: "Nunito Sans", sans-serif;
    color: #0E0E31;
}

/* Sidebar */
.ifad-account-sidebar {
    flex: 0 0 260px;
    max-width: 260px;
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 0 16px;
    box-shadow: 0 1px 2px rgba(14, 14, 49, 0.04);
}

/* Welcome block */
.ifad-account-welcome {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eaeaf2;
}
.ifad-account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0E0E31;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.ifad-account-welcome-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.ifad-account-welcome-hi {
    font-size: 12px;
    color: #7F7FAA;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.ifad-account-welcome-name {
    font-size: 15px;
    font-weight: 600;
    color: #0E0E31;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav list — kill default WC list styling */
.ifad-account-sidebar .ifad-account-nav {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.ifad-account-sidebar .ifad-account-nav li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* Nav link */
.ifad-account-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: #0E0E31 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.ifad-account-nav-link:hover {
    background: #f5f5fa;
}
.ifad-account-nav-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: #7F7FAA;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.ifad-account-nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ifad-account-nav-link:hover .ifad-account-nav-icon {
    color: #0E0E31;
}

/* Active nav item (WC adds is-active) */
.woocommerce-MyAccount-navigation-link.is-active > .ifad-account-nav-link,
.ifad-account-nav .is-active > .ifad-account-nav-link {
    background: #f5f5fa;
    border-left-color: #0E0E31;
    font-weight: 700;
}
.woocommerce-MyAccount-navigation-link.is-active .ifad-account-nav-icon,
.ifad-account-nav .is-active .ifad-account-nav-icon {
    color: #0E0E31;
}

/* Logout — subtle divider above, muted color */
.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eaeaf2;
}
.woocommerce-MyAccount-navigation-link--customer-logout .ifad-account-nav-link {
    color: #7F7FAA !important;
}
.woocommerce-MyAccount-navigation-link--customer-logout .ifad-account-nav-link:hover {
    color: #9b0303 !important;
}
.woocommerce-MyAccount-navigation-link--customer-logout .ifad-account-nav-icon {
    color: #7F7FAA;
}

/* Content area */
.woocommerce-MyAccount-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* Kill the legacy default nav list styling if WC still injects it somewhere. */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding-left: 0 !important;
}

/* ============ Mobile: horizontal icon scroller ============ */
@media (max-width: 900px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        align-items: stretch;   /* was flex-start → content collapsed to its min width */
        gap: 20px;
        padding: 16px 0 60px;
    }
    .woocommerce-account .woocommerce-MyAccount-content { width: 100%; min-width: 0; }
    /* Prod style.css `.woocommerce-account .woocommerce-MyAccount-navigation
       { width:260px }` (0,2,0) pins the sidebar narrow on mobile. Our <nav>
       carries BOTH classes, so match all three (0,3,0) to win full-width
       without !important. */
    .woocommerce-account .woocommerce-MyAccount-navigation.ifad-account-sidebar {
        flex: none;
        max-width: none;
        width: 100%;
        /* border-box so the 12px side padding is INSIDE the 100% width —
           otherwise width:100% + padding overflows the column to the right. */
        box-sizing: border-box;
        border-radius: 12px;
        padding: 16px 12px;
    }
    .ifad-account-welcome {
        padding: 0 8px 14px;
        margin-bottom: 10px;
    }
    /* Full-width even tile grid — fills the card instead of clustering centered. */
    .ifad-account-sidebar .ifad-account-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .ifad-account-sidebar .ifad-account-nav li {
        display: flex;               /* let the link fill the cell → equal-height tiles */
    }
    .ifad-account-nav-link {
        position: relative;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 8px;
        border-left: none;
        border: 1px solid var(--ifad-line, #ececf0);
        border-radius: 10px;
        min-width: 0;                /* was 82px — grid tracks size the tiles now */
        text-align: center;
        font-size: 12px;
        line-height: 1.2;
    }
    /* Log out — full-width action row across the bottom of the grid. */
    .ifad-account-sidebar .ifad-account-nav li:last-child {
        grid-column: 1 / -1;
    }
    .ifad-account-sidebar .ifad-account-nav li:last-child .ifad-account-nav-link {
        flex-direction: row;
        gap: 8px;
    }
    .ifad-account-nav .is-active > .ifad-account-nav-link,
    .woocommerce-MyAccount-navigation-link.is-active > .ifad-account-nav-link {
        background: var(--ifad-navy, #0E0E31);
        /* !important beats the base .ifad-account-nav-link color:!important —
           without it the active label rendered navy-on-navy (invisible). */
        color: #fff !important;
        border-color: var(--ifad-navy, #0E0E31);
    }
    .ifad-account-nav .is-active .ifad-account-nav-icon,
    .woocommerce-MyAccount-navigation-link.is-active .ifad-account-nav-icon { color: #fff; }
    .ifad-account-nav-icon {
        width: 20px;
        height: 20px;
    }
    /* Unread badge → small dot at the tile's top-right (was margin-left:auto,
       which floated it awkwardly inside the column tile). */
    .ifad-account-sidebar .ifad-account-nav .ifad-account-nav-badge {
        position: absolute;
        top: 6px;
        right: 8px;
        margin: 0;
    }
    .woocommerce-MyAccount-navigation-link--customer-logout {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* Dashboard + content grids on phones. */
@media (max-width: 600px) {
    .ifad-dashboard-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ifad-dashboard-card { padding: 16px 14px; border-radius: 10px; }
    .ifad-dashboard-card-value { font-size: 24px; }
    .ifad-dashboard-recent { padding: 16px 16px 4px; }
    .ifad-recent-order-link { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 2px; }
    .ifad-dashboard-title { font-size: 21px; }
    .ifad-dashboard-subtitle { font-size: 14px; }
    .ifad-dashboard { gap: 22px; }
}
@media (max-width: 340px) {
    .ifad-dashboard-cards { grid-template-columns: 1fr; }
}


/* ============================================================
   Dashboard (Step 2)
   ============================================================ */

.ifad-dashboard {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Header */
.ifad-dashboard-header {
    padding: 4px 0 4px;
}
.ifad-dashboard-title {
    font-size: 24px;
    font-weight: 700;
    color: #0E0E31;
    margin: 0 0 6px;
    line-height: 1.2;
}
.ifad-dashboard-subtitle {
    color: #7F7FAA;
    margin: 0;
    font-size: 14px;
}

/* Quick-action cards */
.ifad-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.ifad-dashboard-card {
    display: block;
    background: #fafafa;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 20px 18px;
    text-decoration: none !important;
    color: #0E0E31 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    position: relative;
}
.ifad-dashboard-card:hover {
    border-color: #0E0E31;
    box-shadow: 0 6px 20px rgba(14, 14, 49, 0.08);
    transform: translateY(-1px);
}
.ifad-dashboard-card-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
    color: #0E0E31;
    margin-bottom: 12px;
}
.ifad-dashboard-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ifad-dashboard-card-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #0E0E31;
    margin-bottom: 4px;
}
.ifad-dashboard-card-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #0E0E31;
    margin-bottom: 2px;
}
.ifad-dashboard-card-desc {
    display: block;
    font-size: 12px;
    color: #7F7FAA;
    line-height: 1.4;
}

/* Recent orders */
.ifad-dashboard-recent {
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 24px 8px;
}
.ifad-dashboard-recent-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.ifad-dashboard-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0E0E31;
    margin: 0;
}
.ifad-dashboard-section-link {
    color: #0E0E31 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}
.ifad-dashboard-section-link:hover {
    text-decoration: underline !important;
}

.ifad-recent-orders {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.ifad-recent-order {
    list-style: none !important;
    margin: 0;
    border-top: 1px solid #eaeaf2;
}
.ifad-recent-order:first-child {
    border-top: none;
}
.ifad-recent-order-link {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 14px 4px;
    color: #0E0E31 !important;
    text-decoration: none !important;
    transition: background 0.15s ease;
}
.ifad-recent-order-link:hover {
    background: #fafafd;
}
.ifad-recent-order-primary {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ifad-recent-order-number {
    font-size: 14px;
    font-weight: 700;
    color: #0E0E31;
}
.ifad-recent-order-date {
    font-size: 12px;
    color: #7F7FAA;
}
.ifad-recent-order-total {
    font-size: 14px;
    font-weight: 600;
    color: #0E0E31;
    white-space: nowrap;
}
.ifad-recent-order-total bdi {
    font-weight: inherit;
}

/* Status pill — brand palette by status.
   Default keeps the navy theme; specific slugs get accent colors. */
.ifad-status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: #eaeaf2;
    color: #0E0E31;
    line-height: 1.4;
    white-space: nowrap;
}
.ifad-status-pill.ifad-status-new,
.ifad-status-pill.ifad-status-pending,
.ifad-status-pill.ifad-status-on-hold {
    background: #fff3d6;
    color: #7a5b00;
}
.ifad-status-pill.ifad-status-processing {
    background: #e5f0ff;
    color: #17408e;
}
.ifad-status-pill.ifad-status-shipped,
.ifad-status-pill.ifad-status-completed {
    background: #e0f6ea;
    color: #14663d;
}
.ifad-status-pill.ifad-status-cancelled,
.ifad-status-pill.ifad-status-refunded,
.ifad-status-pill.ifad-status-failed {
    background: #ffe1e1;
    color: #9b0303;
}

/* Empty state */
.ifad-dashboard-empty {
    padding: 12px 4px 20px;
    color: #7F7FAA;
    font-size: 14px;
}
.ifad-dashboard-empty a {
    color: #0E0E31 !important;
    font-weight: 600;
    text-decoration: none !important;
}
.ifad-dashboard-empty a:hover {
    text-decoration: underline !important;
}

/* Dashboard responsive */
@media (max-width: 900px) {
    .ifad-dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .ifad-dashboard-recent {
        padding: 16px 14px 6px;
    }
    .ifad-recent-order-link {
        grid-template-columns: 1fr auto;
        row-gap: 6px;
    }
    .ifad-recent-order-total {
        grid-column: 2;
        grid-row: 1;
    }
    .ifad-recent-order-status {
        grid-column: 1 / -1;
    }
}
@media (max-width: 480px) {
    .ifad-dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .ifad-dashboard-card { padding: 14px 12px; }
    .ifad-dashboard-card-value { font-size: 22px; }
}


/* ============================================================
   Orders list (Step 3) — card layout + brand buttons
   ============================================================ */

.ifad-orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ifad-order-card {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 24px;
    align-items: center;
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 16px 20px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ifad-order-card:hover {
    border-color: #d0d0e3;
    box-shadow: 0 3px 12px rgba(14, 14, 49, 0.05);
}

/* Thumbnails cluster */
.ifad-order-card-thumbs {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ifad-order-card-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #f5f5fa;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #eaeaf2;
}
.ifad-order-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ifad-order-card-thumb--empty {
    background: #f5f5fa;
}
.ifad-order-card-thumb-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #eaeaf2;
    color: #0E0E31;
    font-size: 12px;
    font-weight: 700;
}

/* Body — number, date, items, pills */
.ifad-order-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ifad-order-card-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.ifad-order-card-number {
    font-size: 15px;
    font-weight: 700;
    color: #0E0E31;
}
.ifad-order-card-date {
    font-size: 12px;
    color: #7F7FAA;
}
.ifad-order-card-items {
    font-size: 13px;
    color: #0E0E31;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ifad-order-card-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.ifad-status-shipment {
    background: #f0edff;
    color: #3434a7;
}

/* Money column */
.ifad-order-card-money {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    min-width: 130px;
    padding-left: 8px;
    border-left: 1px solid #eaeaf2;
    padding-left: 20px;
}
.ifad-order-card-money-row {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #0E0E31;
}
.ifad-order-card-money-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7F7FAA;
    font-weight: 600;
}
.ifad-order-card-money-value {
    font-size: 14px;
    font-weight: 600;
    color: #0E0E31;
    white-space: nowrap;
}
.ifad-order-card-money-value bdi {
    font-weight: inherit;
}
.ifad-order-card-money-total {
    font-size: 16px;
    font-weight: 700;
}
.ifad-order-card-money-balance {
    color: #9b0303;
}

/* Actions column */
.ifad-order-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    min-width: 116px;
}

/* Brand buttons — reused across account pages */
.ifad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none !important;
    border: 1px solid transparent;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-align: center;
    white-space: nowrap;
}
.ifad-btn-primary {
    background: #0E0E31;
    border-color: #0E0E31;
    color: #fff !important;
}
.ifad-btn-primary:hover {
    background: #1c1c5c;
    border-color: #1c1c5c;
    color: #fff !important;
}
.ifad-btn-secondary {
    background: #fff;
    border-color: #eaeaf2;
    color: #0E0E31 !important;
}
.ifad-btn-secondary:hover {
    background: #f5f5fa;
    border-color: #d0d0e3;
    color: #0E0E31 !important;
}

/* Order cards on phones — clean stacked layout instead of the cramped 4-col grid:
   [ thumb | details ] / [ Total ] / [ View + Messenger ]. */
@media (max-width: 600px) {
    .ifad-order-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 12px;
        padding: 14px 16px;
        align-items: start;
    }
    .ifad-order-card-thumbs { grid-column: 1; grid-row: 1; flex-wrap: wrap; max-width: 130px; }
    .ifad-order-card-thumb { width: 58px; height: 58px; }
    .ifad-order-card-body { grid-column: 2; grid-row: 1; }

    .ifad-order-card-money {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-width: 0;
        border-left: 0;
        border-top: 1px solid #eaeaf2;
        padding: 12px 0 0;
    }
    .ifad-order-card-money-row { justify-content: flex-start; }

    .ifad-order-card-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        flex-direction: row;
        gap: 10px;
        min-width: 0;
    }
    .ifad-order-card-actions .ifad-btn { flex: 1 1 0; padding: 11px 14px; }
}

/* Pagination */
.ifad-orders-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaeaf2;
}
.ifad-orders-pagination-page {
    font-size: 13px;
    color: #7F7FAA;
    font-weight: 600;
}

/* Empty */
.ifad-orders-empty {
    background: #fafafd;
    border: 1px dashed #d0d0e3;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    color: #7F7FAA;
}
.ifad-orders-empty p {
    margin: 0 0 16px;
    font-size: 15px;
    color: #0E0E31;
    font-weight: 500;
}

/* Orders list responsive */
@media (max-width: 900px) {
    .ifad-order-card {
        grid-template-columns: auto 1fr;
        gap: 14px;
        padding: 14px;
    }
    .ifad-order-card-money {
        grid-column: 1 / -1;
        align-items: flex-start;
        border-left: none;
        border-top: 1px solid #eaeaf2;
        padding: 12px 0 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px 20px;
    }
    .ifad-order-card-money-row {
        justify-content: flex-start;
        gap: 6px;
    }
    .ifad-order-card-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        min-width: 0;
    }
    .ifad-order-card-actions .ifad-btn {
        flex: 1;
    }
    .ifad-orders-pagination {
        flex-wrap: wrap;
    }
}
@media (max-width: 480px) {
    .ifad-order-card {
        grid-template-columns: 1fr;
    }
    .ifad-order-card-thumbs {
        justify-content: flex-start;
    }
}

/* When user is not logged in, the .woocommerce wrapper has only the
   login form as a child. Override the sidebar-content flex layout so
   the login block takes the full column width. */
body.woocommerce-account:not(.logged-in) .woocommerce {
    display: block;
    padding: 0;
}

.ifad-login {
    padding: 32px 0 60px;
    max-width: 100%;
}

.ifad-login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(14, 14, 49, 0.04);
}

/* Left — promo panel with dark brand background */
.ifad-login-promo {
    background: #0E0E31;
    color: #fff;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}
.ifad-login-promo-logo {
    width: 140px;
    height: auto;
    margin-bottom: 8px;
    filter: brightness(0) invert(1);
}
.ifad-login-promo-brand {
    font-size: 20px;
    letter-spacing: 3px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.ifad-login-promo-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.ifad-login-promo-sub {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}
.ifad-login-benefits {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ifad-login-benefits li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
    list-style: none !important;
}
.ifad-login-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    flex-shrink: 0;
    margin-top: 1px;
}
.ifad-login-benefits li b {
    display: block;
    color: #fff;
    font-weight: 700;
    margin-bottom: 2px;
}
.ifad-login-benefits li > span:last-child {
    color: rgba(255, 255, 255, 0.72);
}

/* Right — form panel */
.ifad-login-form-panel {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
}

.ifad-login-tabs {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #eaeaf2;
}
.ifad-login-tab {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.ifad-login-tab a {
    display: block;
    padding: 10px 4px;
    font-weight: 700;
    color: #7F7FAA !important;
    text-decoration: none !important;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    margin-bottom: -1px;
    min-width: 100px;
    text-align: center;
}
.ifad-login-tab.is-active a {
    color: #0E0E31 !important;
    border-bottom-color: #0E0E31;
}
.ifad-login-tab a:hover {
    color: #0E0E31 !important;
}

.ifad-login-tab-panel { display: none; }
.ifad-login-tab-panel.is-active { display: block; }

.ifad-login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}
.ifad-login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 !important;
}
.ifad-login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #0E0E31;
}
.ifad-login-form input[type="text"],
.ifad-login-form input[type="email"],
.ifad-login-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #eaeaf2;
    border-radius: 10px;
    font-size: 14px;
    color: #0E0E31;
    background: #fff;
    font-family: "Nunito Sans", sans-serif;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ifad-login-form input:focus {
    outline: none;
    border-color: #0E0E31;
    box-shadow: 0 0 0 3px rgba(14, 14, 49, 0.10);
}

.ifad-login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 4px 0 2px;
    flex-wrap: wrap;
}
.ifad-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #0E0E31;
    cursor: pointer;
    user-select: none;
}
.ifad-login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0E0E31;
}
.ifad-login-lost {
    font-size: 13px;
    color: #0E0E31 !important;
    text-decoration: none !important;
    font-weight: 600;
}
.ifad-login-lost:hover { text-decoration: underline !important; }

.ifad-login-submit {
    margin: 8px 0 0 !important;
}
.ifad-login-submit-btn {
    width: 100%;
    padding: 12px 20px !important;
    font-size: 15px !important;
}

.ifad-login-help {
    font-size: 13px;
    color: #7F7FAA;
    background: #f5f5fa;
    padding: 10px 14px;
    border-radius: 10px;
    margin: 0 !important;
}

/* "Become a partner" hint under the login card (trade professionals apply, not self-register). */
.ifad-login-partner {
    margin: 20px 0 0 !important;
    padding-top: 16px;
    border-top: 1px solid #ececf3;
    text-align: center;
    font-size: 13px;
    color: #7F7FAA;
}
.ifad-login-partner a {
    color: #0E0E31 !important;
    font-weight: 600;
    text-decoration: none !important;
}
.ifad-login-partner a:hover { color: #3434A7 !important; }

/* Login responsive */
@media (max-width: 900px) {
    .ifad-login {
        padding: 12px 0 40px;
    }
    .ifad-login-layout {
        grid-template-columns: 1fr;
    }
    .ifad-login-promo {
        padding: 32px 24px;
        text-align: center;
        align-items: center;
    }
    .ifad-login-benefits {
        width: 100%;
        max-width: 320px;
    }
    .ifad-login-benefits li { text-align: left; }
    .ifad-login-form-panel {
        padding: 28px 22px 32px;
    }
}

/* ============================================================
   devx adaptations
   ============================================================ */
/* Native controls must inherit the site font (no Bootstrap reset here). */
.ifad-btn,
.ifad-login-form input,
.ifad-login-form button { font-family: inherit; }
/* Our order status "closed" reads as done → green like completed. */
.ifad-status-pill.ifad-status-closed { background: #e0f6ea; color: #14663d; }

/* ============================================================
   View Order (single order) — ported 1:1 from prod
   ============================================================ */
.ifad-view-order {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header card */
.ifad-view-order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 24px;
    flex-wrap: wrap;
}
.ifad-view-order-head-primary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.ifad-view-order-head-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7F7FAA;
    font-weight: 600;
}
.ifad-view-order-head-number {
    font-size: 24px;
    font-weight: 700;
    color: #0E0E31;
    margin: 0;
    line-height: 1.1;
}
.ifad-view-order-head-date {
    font-size: 13px;
    color: #7F7FAA;
}
.ifad-view-order-head-secondary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    text-align: right;
}
.ifad-view-order-head-total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
}
.ifad-view-order-head-total-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7F7FAA;
    font-weight: 600;
}
.ifad-view-order-head-total-value {
    font-size: 22px;
    font-weight: 700;
    color: #0E0E31;
    line-height: 1;
    white-space: nowrap;
}
.ifad-view-order-head-total-value bdi { font-weight: inherit; }

/* Timeline */
.ifad-view-order-timeline {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 24px 24px;
    gap: 0;
}
.ifad-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 78px;
}
.ifad-timeline-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: #7F7FAA;
    border: 2px solid #eaeaf2;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.ifad-timeline-label {
    font-size: 12px;
    font-weight: 600;
    color: #7F7FAA;
    text-align: center;
    letter-spacing: 0.2px;
}
.ifad-timeline-step.is-active .ifad-timeline-dot {
    background: #0E0E31;
    border-color: #0E0E31;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(14, 14, 49, 0.12);
}
.ifad-timeline-step.is-active .ifad-timeline-label {
    color: #0E0E31;
    font-weight: 700;
}
.ifad-timeline-step.is-done .ifad-timeline-dot {
    background: #0E0E31;
    border-color: #0E0E31;
    color: #fff;
}
.ifad-timeline-step.is-done .ifad-timeline-label {
    color: #0E0E31;
}
.ifad-timeline-line {
    flex: 1;
    height: 2px;
    background: #eaeaf2;
    margin: 0 4px;
    margin-bottom: 24px; /* align with the dot's vertical centre */
    align-self: center;
    transition: background 0.2s ease;
}
.ifad-timeline-line.is-done {
    background: #0E0E31;
}

.ifad-view-order-cancelled {
    background: #ffe1e1;
    border: 1px solid #f5b7b7;
    color: #9b0303;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
}

/* Payments summary */
.ifad-view-order-payments {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 16px 24px;
    flex-wrap: wrap;
}
.ifad-view-order-payments-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
    text-align: right;
}
.ifad-view-order-payments-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7F7FAA;
    font-weight: 600;
}
.ifad-view-order-payments-value {
    font-size: 16px;
    font-weight: 700;
    color: #0E0E31;
    white-space: nowrap;
}
.ifad-view-order-payments-value.ifad-paid { color: #14663d; }
.ifad-view-order-payments-value.ifad-balance { color: #9b0303; }
.ifad-view-order-payments-value bdi { font-weight: inherit; }

/* Section titles used across view-order */
.ifad-view-order-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0E0E31;
    margin: 0 0 12px;
}

/* Order updates timeline */
.ifad-view-order-updates {
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 24px 12px;
}
.ifad-updates-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ifad-updates-item {
    padding-left: 20px;
    border-left: 2px solid #eaeaf2;
    position: relative;
}
.ifad-updates-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0E0E31;
}
.ifad-updates-time {
    display: block;
    font-size: 12px;
    color: #7F7FAA;
    margin-bottom: 2px;
    font-weight: 600;
}
.ifad-updates-text {
    font-size: 14px;
    color: #0E0E31;
    line-height: 1.5;
}
.ifad-updates-text p:last-child { margin-bottom: 0; }

/* WC default details block — soften its look to fit the brand */
.ifad-view-order-details {
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 24px;
}
.ifad-view-order-details h2,
.ifad-view-order-details h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0E0E31;
    margin: 0 0 12px;
}
.ifad-view-order-details h2 + h2,
.ifad-view-order-details h3 + h3 {
    margin-top: 20px;
}
.ifad-view-order-details table.shop_table {
    border: 1px solid #eaeaf2;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    width: 100%;
}
.ifad-view-order-details table.shop_table th,
.ifad-view-order-details table.shop_table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eaeaf2;
    text-align: left;
    font-size: 14px;
    color: #0E0E31;
}
.ifad-view-order-details table.shop_table thead th {
    background: #f5f5fa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7F7FAA;
    font-weight: 700;
}
.ifad-view-order-details table.shop_table tfoot td,
.ifad-view-order-details table.shop_table tfoot th {
    background: #fafafd;
    font-weight: 700;
}
.ifad-view-order-details table.shop_table tr:last-child td,
.ifad-view-order-details table.shop_table tr:last-child th {
    border-bottom: none;
}
.ifad-view-order-details .woocommerce-customer-details {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.ifad-view-order-details .woocommerce-customer-details h2 {
    grid-column: 1 / -1;
}
.ifad-view-order-details .woocommerce-columns--addresses {
    display: contents;
}
.ifad-view-order-details .woocommerce-column {
    background: #f5f5fa;
    border-radius: 10px;
    padding: 16px 18px;
}
.ifad-view-order-details .woocommerce-column h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7F7FAA;
    margin-bottom: 6px;
}
.ifad-view-order-details address {
    font-style: normal;
    font-size: 14px;
    line-height: 1.6;
    color: #0E0E31;
}

/* Inline chat block */
.ifad-view-order-chat {
    background: #fff;
    border: 1px solid #eaeaf2;
    border-radius: 12px;
    padding: 20px 24px 24px;
}
.ifad-view-order-chat-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}
.ifad-view-order-chat-head .ifad-view-order-section-title { margin: 0; }
.ifad-view-order-chat-fullscreen {
    color: #0E0E31 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}
.ifad-view-order-chat-fullscreen:hover { text-decoration: underline !important; }
.ifad-view-order-chat-frame {
    height: 480px;
    border: 1px solid #eaeaf2;
    border-radius: 10px;
    overflow: hidden;
}
.ifad-inline-chat-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

/* View Order responsive */
@media (max-width: 900px) {
    .ifad-view-order-head {
        flex-direction: column;
        gap: 12px;
    }
    .ifad-view-order-head-secondary {
        align-items: flex-start;
        text-align: left;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    .ifad-view-order-head-total { align-items: flex-start; }
    .ifad-view-order-timeline {
        overflow-x: auto;
        padding: 20px 16px;
    }
    .ifad-timeline-step { min-width: 60px; }
    .ifad-view-order-details .woocommerce-customer-details {
        grid-template-columns: 1fr;
    }
    .ifad-view-order-chat-frame { height: 420px; }
}
@media (max-width: 480px) {
    .ifad-view-order-payments {
        justify-content: flex-start;
        gap: 20px;
    }
}

/* devx: order-card actions stack (View primary + Messenger secondary) */
/* border-box so width:100% includes the button's padding+border and it can't
   overflow the actions column (prod .ifad-btn is content-box). */
.ifad-btn { box-sizing: border-box; }
.ifad-order-card-actions .ifad-btn { width: 100%; }
/* devx: Messages placeholder inside the chat frame */
.ifad-view-order-chat-placeholder { display:flex; align-items:center; justify-content:center; height:100%; padding:24px; text-align:center; color:#7F7FAA; font-size:14px; line-height:1.5; }
/* devx: back link + cancel row on view-order */
.ifad-view-order-foot { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:4px; }
.ifad-view-order-back { color:#7F7FAA !important; text-decoration:none !important; font-size:14px; font-weight:600; }
.ifad-view-order-back:hover { color:#0E0E31 !important; }

/* devx fix: keep order-card contents inside the card on our narrower column.
   Bare 1fr won't shrink below min-content and pushes actions past the border. */
.woocommerce-MyAccount-content { min-width: 0; }
.ifad-order-card { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.ifad-order-card-body { min-width: 0; }
.ifad-order-card-items { overflow-wrap: anywhere; }
@media ( max-width: 900px ) {
	.ifad-order-card { grid-template-columns: auto minmax(0, 1fr); }
}

/* Password show/hide (the eye) on login + register. */
.ifad-login-pass { position: relative; display: block; }
.ifad-login-pass input { width: 100%; box-sizing: border-box; padding-right: 44px; }
.ifad-login-pass-toggle {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; padding: 0; border: 0; background: none;
	color: #7F7FAA; cursor: pointer;
}
.ifad-login-pass-toggle:hover,
.ifad-login-pass-toggle.is-on { color: #0E0E31; }

/* ---------------- Documents / Downloads ---------------- */
.ifad-view-order-docs { background: #fff; border: 1px solid #eaeaf2; border-radius: 12px; padding: 20px 24px 22px; }
.ifad-view-order-docs .ifad-view-order-section-title { margin: 0 0 14px; }
.ifad-docs-groups { display: flex; flex-direction: column; gap: 24px; }
.ifad-docs-group__head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; }
.ifad-docs-group__head a { font-weight: 700; color: #0E0E31; text-decoration: none; }
.ifad-docs-group__head a:hover { color: #3434a7; }
.ifad-docs-group__head span { font-size: 13px; color: #7F7FAA; }
.ifad-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ifad-doc-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #eaeaf2; border-radius: 10px; text-decoration: none; color: #0E0E31; background: #fff; transition: border-color .15s ease, background .15s ease; }
.ifad-doc-link:hover { border-color: #0E0E31; background: #f9f9fc; }
.ifad-doc-ico { display: inline-flex; width: 20px; height: 20px; color: #7F7FAA; flex-shrink: 0; }
.ifad-doc-ico svg { width: 100%; height: 100%; }
.ifad-doc-label { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ifad-doc-dl { flex-shrink: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #0E0E31; }

/* ---------------- Wishlist grid ---------------- */
.ifad-wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.ifad-wish-card { position: relative; border: 1px solid #eaeaf2; border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: border-color .15s ease, box-shadow .15s ease; }
.ifad-wish-card:hover { border-color: #0E0E31; box-shadow: 0 6px 18px rgba(8, 8, 26, .07); }
.ifad-wish-card__img { display: block; position: relative; aspect-ratio: 1 / 1; background: #f5f5fa; }
.ifad-wish-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ifad-wish-card .ifad-card__reserved { position: absolute; top: 10px; left: 10px; z-index: 2; background: #0E0E31; color: #fff; font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: .03em; text-transform: uppercase; padding: 4px 5px; border-radius: 3px; }
.ifad-wish-card__remove { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #eaeaf2; background: #fff; border-radius: 50%; color: #0E0E31; cursor: pointer; }
.ifad-wish-card__remove svg { fill: currentColor; }
.ifad-wish-card__remove:hover { background: #fdeaea; color: #9b0303; border-color: #f5c6c6; }
.ifad-wish-card__remove.is-loading { opacity: .5; pointer-events: none; }
.ifad-wish-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.ifad-wish-card__title { font-size: 14px; font-weight: 600; color: #0E0E31; text-decoration: none; line-height: 1.35; }
.ifad-wish-card__title:hover { color: #3434a7; }
.ifad-wish-card__price { font-size: 15px; font-weight: 700; color: #0E0E31; margin-top: auto; }
.ifad-wish-card__price del { opacity: .5; font-weight: 700; margin-right: 4px; }
.ifad-wish-card__view { margin-top: 6px; width: 100%; }

/* Wishlist: two-up product grid on phones. The auto-fill grid needs 200px per
   track, so it collapses to a single column < ~440px — force two even columns. */
@media ( max-width: 600px ) {
	.ifad-wishlist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.ifad-wish-card__body { padding: 12px 12px 14px; }
	.ifad-wish-card__remove { width: 30px; height: 30px; top: 8px; right: 8px; }
}

/* ---------------- Unread message badges ---------------- */
.ifad-account-nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 9px; background: #e2401c; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.ifad-msg-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #e2401c; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.ifad-view-order-chat-head { margin-bottom: 14px; }
