/* ========================================================
   SOUTHDEV HOME DEPOT – Enterprise Design System
   Davao City's Premier Hardware & Construction Supply
   ======================================================== */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
    /* Brand palette – Light & Professional */
    --primary:      #1B2A4A;   /* Dark Navy */
    --primary-hover:#152238;
    --accent:       #F97316;   /* Warm Orange */
    --accent-hover: #EA6C0E;
    --accent-light: rgba(249,115,22,0.06);

    --neutral:      #F8F9FB;   /* Very Light Gray */
    --charcoal:     #1B2A4A;   /* Navy for headings */
    --graphite:     #243352;
    --steel:        #475569;
    --white:        #FFFFFF;
    --border:       #E8ECF1;
    --text-primary: #1E293B;
    --text-secondary:#64748B;
    --text-muted:   #94A3B8;
    --success:      #16A34A;
    --success-bg:   #F0FDF4;
    --warning:      #F59E0B;
    --warning-bg:   #FFFBEB;
    --danger:       #EF4444;
    --danger-bg:    #FEF2F2;
    --info:         #3B82F6;
    --info-bg:      #EFF6FF;
    --shadow-sm:    0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
    --shadow-md:    0 4px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    --shadow-lg:    0 10px 30px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
    --shadow-hover: 0 16px 40px rgba(0,0,0,.12);
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-md-num: 12; /* unitless numeric token (px multiplier) */
    --radius-lg:    16px;
    --radius-xl:    20px;
    --transition:   all .25s ease;
    --font:         'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono:    'Fira Code', 'Consolas', monospace;
    --sidebar-w:    260px;
}

/* (Loading overlay removed) */


/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--neutral);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Keyboard focus (accessibility) */
:focus-visible {
    outline: 3px solid rgba(27,42,74,.24);
    outline-offset: 2px;
}
a:focus-visible { border-radius: 6px; }
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(27,42,74,.22);
}
.form-control:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,42,74,.12);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .page-content { animation: none !important; }
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--charcoal);
}
h1 { font-size: 28px; letter-spacing: -.5px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { color: var(--text-secondary); }

/* Use system default selection colors so selection looks native
    'Highlight' and 'HighlightText' map to the OS/browser default colors */
::selection { background: Highlight; color: HighlightText; }

/* Page fade-in transition */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page-content { animation: pageFadeIn .4s ease-out; }

/* ---------- Layout ---------- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    margin-bottom: 18px;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--charcoal);
    font-weight: 700;
}
.logo:hover { color: var(--charcoal); }
.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--charcoal);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
}
/* If logo uses an image, ensure it fits the square */
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.logo-text {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* Hide textual brand when a compact/visual logo is preferred (removes visible "Southdev Home Depot" text) */
/* site name visibility restored */

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.nav-links li { display: flex; align-items: center; }
.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .3px;
    transition: all .2s ease;
}
.nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    object-fit: cover;
    background: var(--neutral);
    flex-shrink: 0;
}
.nav-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .4px;
    background: var(--primary);
    color: var(--white);
    border-color: rgba(27,42,74,.22);
}
.nav-account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-links a::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
    border-radius: 999px;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--charcoal);
    background: var(--neutral);
}
.nav-links a.active { font-weight: 700; }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Cart badge */
.nav-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.2);
    color: #fff;
    transition: all .22s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.nav-cart:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.35);
    transform: translateY(-1px);
    color: #fff;
}
.nav-cart i, .nav-cart svg { width: 18px; height: 18px; }
.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #fff;
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    margin-left: 0;
}
.cart-count.pop { animation: cartBadgePop .25s ease; }
@keyframes cartBadgePop { from { transform: scale(.75); } to { transform: scale(1); } }

.mobile-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mobile-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}
    /* removed internal .lucide-menu fallback to avoid doubled/offset lines; use .mobile-toggle::before only */

    /* Remove manual ::before fallback to avoid duplicate hamburger icons when SVG/icon font is present */
    .mobile-toggle::before { display: none; }

    /* Ensure icon inside the button is visible and correctly sized/colored */
    .mobile-toggle i,
    .mobile-toggle svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; color: inherit; }

    /* ============================================================
       Two-row header: topbar (brand gradient) + main-nav (white)
       Professional redesign v3 — clean, modern, Shopee-inspired
       ============================================================ */

    :root { --brand-red: var(--accent); }

    /* ---------- Site Header Shell ---------- */
    .site-header {
        margin-top: 0;
        position: sticky;
        top: 0;
        z-index: 200;
        box-shadow: 0 2px 20px rgba(0,0,0,.08);
    }

    .reveal-on-scroll {
        opacity: 0;
        filter: blur(4px);
        position: relative;
        isolation: isolate;
        transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1), filter .6s ease;
        will-change: opacity, transform, filter;
    }

    .reveal-on-scroll::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .8;
        transition: transform .72s cubic-bezier(.16,1,.3,1), opacity .6s ease;
        z-index: 2;
    }

    .reveal-left {
        transform: translate3d(-52px, 0, 0);
    }

    .reveal-left::after {
        background: linear-gradient(90deg, rgba(248,249,251,.98) 0%, rgba(248,249,251,.75) 28%, rgba(248,249,251,0) 72%);
        transform: translateX(0);
    }

    .reveal-right {
        transform: translate3d(52px, 0, 0);
    }

    .reveal-right::after {
        background: linear-gradient(270deg, rgba(248,249,251,.98) 0%, rgba(248,249,251,.75) 28%, rgba(248,249,251,0) 72%);
        transform: translateX(0);
    }

    .reveal-on-scroll.is-visible {
        opacity: 1;
        filter: blur(0);
        transform: translate3d(0, 0, 0);
    }

    .reveal-on-scroll.is-visible::after {
        opacity: 0;
    }

    .reveal-left.is-visible::after {
        transform: translateX(16%);
    }

    .reveal-right.is-visible::after {
        transform: translateX(-16%);
    }

    @media (prefers-reduced-motion: reduce) {
        .reveal-on-scroll,
        .reveal-left,
        .reveal-right {
            opacity: 1;
            filter: none;
            transform: none;
            transition: none;
        }

        .reveal-on-scroll::after {
            opacity: 0;
            transition: none;
        }
    }

    /* ---------- Topbar ---------- */
    .site-header .topbar {
        background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
        color: #fff;
        padding: 12px 0;
        position: relative;
        overflow: visible;
    }
    /* Subtle shimmer overlay */
    .site-header .topbar::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: 
            radial-gradient(ellipse 80% 120% at 10% 50%, rgba(255,255,255,.08) 0%, transparent 50%),
            radial-gradient(ellipse 60% 100% at 90% 30%, rgba(0,0,0,.04) 0%, transparent 50%);
        pointer-events: none;
        z-index: 0;
    }
    .topbar-inner { position: relative; z-index: 1; }

    /* Hide on admin */
    body.admin-layout .site-header .topbar { display: none; }
    body.admin-layout .site-header .main-nav { border-top: 0; margin-bottom: 0; }

    /* ---------- Topbar Inner Layout ---------- */
    .topbar-inner {
        display: flex;
        align-items: center;
        gap: 20px;
        flex-wrap: nowrap;
        position: relative;
        z-index: 1;
    }

    /* ---------- Brand / Logo ---------- */
    .brand {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0;
        color: #fff;
        font-weight: 800;
        text-decoration: none;
        transition: transform .2s ease;
    }
    .site-header .brand:hover,
    .site-header .brand:focus {
        color: #fff;
        text-decoration: none;
        transform: translateY(-1px);
    }
    .brand .logo-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        overflow: hidden;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,.18);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 12px rgba(0,0,0,.10);
        transition: transform .2s ease, box-shadow .2s ease;
        flex-shrink: 0;
    }
    .brand:hover .logo-icon {
        transform: scale(1.06);
        box-shadow: 0 4px 16px rgba(0,0,0,.16);
    }
    .brand .logo-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .brand .brand-logo-image {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: clamp(190px, 24vw, 290px);
        height: 58px;
        flex-shrink: 0;
    }
    .brand .brand-logo-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        object-position: center;
    }
    .brand .brand-logo-fallback {
        font-family: var(--font);
        font-size: 22px;
        font-weight: 800;
        letter-spacing: 1px;
        text-transform: uppercase;
        white-space: nowrap;
    }
    .brand .logo-text {
        font-family: var(--font);
        font-size: 26px;
        font-weight: 800;
        letter-spacing: 1px;
        text-transform: uppercase;
        text-shadow: 0 1px 4px rgba(0,0,0,.10);
        white-space: nowrap;
    }

    /* ---------- Search Bar ---------- */
    .search-inline {
        margin-left: auto;
        display: flex;
        align-items: center;
        flex: 1 1 520px;
        min-width: 180px;
        max-width: 640px;
    }
    .search-box {
        display: flex;
        align-items: center;
        width: 100%;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        border: 1.5px solid #e5e7eb;
        transition: border-color .2s ease, box-shadow .2s ease;
        position: relative;
    }
    .search-box:focus-within {
        border-color: #F97316;
        box-shadow: 0 0 0 3px rgba(249,115,22,.12);
    }
    .search-box-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        color: #9ca3af;
        pointer-events: none;
    }
    .search-box .form-control {
        flex: 1;
        padding: 11px 16px;
        border: none;
        background: transparent;
        color: #1f2937;
        font-size: 14px;
        font-weight: 400;
        outline: none;
    }
    .search-box .form-control::placeholder {
        color: #9ca3af;
        font-weight: 400;
    }
    .search-box .form-control:focus {
        outline: none;
        box-shadow: none;
    }
    .search-btn {
        flex-shrink: 0;
        width: 46px;
        height: 40px;
        border: none;
        border-left: 1.5px solid #e5e7eb;
        background: #f9fafb;
        color: #6b7280;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background .2s ease, color .2s ease;
        font-size: 0;
    }
    .search-btn::before {
        content: '';
        display: block;
        width: 18px;
        height: 18px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }
    .search-btn:hover {
        background: #f3f4f6;
        color: #F97316;
    }
    .search-btn:hover::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23F97316' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    }
    .search-box:focus-within .search-btn {
        border-left-color: #F97316;
    }
    .search-btn i,
    .search-btn svg {
        width: 18px;
        height: 18px;
    }

    /* ---------- Auth Links ---------- */
    .auth-links {
        margin-left: 16px;
        display: flex;
        gap: 10px;
        align-items: center;
        flex: 0 0 auto;
    }
    .auth-links a {
        color: #fff;
        font-weight: 500;
        font-size: 13px;
        letter-spacing: .01em;
    }
    .auth-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 18px;
        border-radius: 6px;
        color: rgba(255,255,255,.88);
        font-weight: 500;
        font-size: 13px;
        text-transform: none;
        letter-spacing: .01em;
        background: transparent;
        border: 1.5px solid rgba(255,255,255,.25);
        transition: all .2s ease;
        text-decoration: none;
    }
    .auth-link:hover,
    .auth-link:focus {
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.45);
        color: #fff;
        text-decoration: none;
    }
    .auth-links .btn-accent {
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
        color: #fff;
        border: none;
        border-radius: 6px;
        padding: 7px 18px;
        font-weight: 600;
        font-size: 13px;
        text-transform: none;
        letter-spacing: .01em;
        transition: all .2s ease;
        box-shadow: 0 2px 8px rgba(234,88,12,.30);
    }
    .auth-links .btn-accent:hover {
        background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
        color: #fff;
        box-shadow: 0 4px 14px rgba(234,88,12,.40);
        transform: translateY(-1px);
    }
    .auth-links .btn-outline { background: transparent; border: 1.5px solid rgba(255,255,255,.2); color: #fff; }

    /* ---------- Cart Button (Customer Topbar) ---------- */
    .nav-cart-btn,
    .nav-notif-btn {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: rgba(255,255,255,.12);
        border: 1.5px solid rgba(255,255,255,.18);
        color: #fff;
        text-decoration: none;
        transition: all .22s ease;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .nav-cart-btn:hover,
    .nav-cart-btn:focus,
    .nav-notif-btn:hover,
    .nav-notif-btn:focus {
        background: rgba(255,255,255,.22);
        border-color: rgba(255,255,255,.35);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(0,0,0,.10);
    }
    .nav-cart-btn i,
    .nav-cart-btn svg,
    .nav-notif-btn i,
    .nav-notif-btn svg {
        width: 20px;
        height: 20px;
    }
    .nav-cart-btn .cart-count,
    .nav-notif-btn .notif-count {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border-radius: 999px;
        background: #fff;
        color: var(--accent);
        font-size: 11px;
        font-weight: 900;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        box-shadow: 0 2px 8px rgba(0,0,0,.12);
    }

    /* ---------- Notification Dropdown ---------- */
    .notif-dropdown-wrap {
        position: relative;
        display: inline-flex;
    }
    .nav-notif-btn {
        cursor: pointer;
        border: 1.5px solid rgba(255,255,255,.18);
        background: rgba(255,255,255,.12);
    }
    .notif-dropdown {
        position: absolute;
        top: calc(100% + 14px);
        right: 0;
        width: 380px;
        max-height: 520px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 8px 40px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        overflow: visible;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(.97);
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    }
    .notif-dropdown.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }
    /* Speech-bubble tail pointer */
    .notif-dropdown::before {
        content: '';
        position: absolute;
        top: -8px;
        right: 16px;
        width: 16px;
        height: 16px;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,.05);
        border-left: 1px solid rgba(0,0,0,.05);
        transform: rotate(45deg);
        z-index: 1;
    }
    .notif-dropdown-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 18px 12px;
        border-bottom: 1px solid #f0f0f0;
        border-radius: 12px 12px 0 0;
        background: #fff;
    }
    .notif-dropdown-header h3 {
        font-size: 20px;
        font-weight: 800;
        color: #1a1a1a;
        margin: 0;
    }
    .notif-mark-all {
        font-size: 13px;
        font-weight: 600;
        color: var(--accent);
        text-decoration: none;
        padding: 4px 10px;
        border-radius: 6px;
        transition: background .15s;
    }
    .notif-mark-all:hover { background: rgba(249,115,22,.06); }
    .notif-dropdown-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 4px 0;
        max-height: 350px;
        background: #fff;
    }
    .notif-dropdown-body::-webkit-scrollbar { width: 4px; }
    .notif-dropdown-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 99px; }
    .notif-dropdown-body::-webkit-scrollbar-track { background: transparent; }
    .notif-dropdown-footer {
        display: block;
        text-align: center;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 700;
        color: var(--accent);
        text-decoration: none;
        border-top: 1px solid #f0f0f0;
        border-radius: 0 0 12px 12px;
        background: #fff;
        transition: background .15s;
    }
    .notif-dropdown-footer:hover { background: #fafafa; color: var(--accent); }

    /* Override .auth-links a white color for dropdown links */
    .auth-links .notif-dropdown a { color: inherit; }
    .auth-links .notif-dropdown a.notif-dropdown-footer { color: var(--accent); }
    .auth-links .notif-dropdown a.notif-dropdown-footer:hover { color: var(--accent); }
    .auth-links .notif-dropdown a.notif-mark-all { color: var(--accent); }
    .auth-links .notif-dropdown a.nd-item { color: #1a1a1a; }

    /* Dropdown items */
    .nd-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 16px;
        text-decoration: none;
        color: #1a1a1a;
        transition: background .12s;
        position: relative;
    }
    .nd-item:hover { background: #f5f5f5; }
    .nd-item--unread { background: rgba(249,115,22,.04); }
    .nd-item--unread:hover { background: rgba(249,115,22,.08); }
    .nd-icon {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nd-icon i, .nd-icon svg { width: 16px; height: 16px; }
    .nd-content { flex: 1; min-width: 0; }
    .nd-text {
        font-size: 11px;
        line-height: 1.4;
        color: #333;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .nd-text strong { color: #1a1a1a; font-size: 11px; }
    .nd-time {
        font-size: 10px;
        font-weight: 600;
        color: var(--accent);
        margin-top: 2px;
    }
    .nd-item:not(.nd-item--unread) .nd-time { color: #9ca3af; }
    .nd-dot {
        flex-shrink: 0;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--accent);
        margin-top: 12px;
    }
    .nd-empty {
        text-align: center;
        padding: 40px 20px;
        color: #9ca3af;
    }
    .nd-empty i, .nd-empty svg { width: 36px; height: 36px; margin-bottom: 8px; }
    .nd-empty p { margin: 0; font-size: 14px; }
    .notif-dropdown-loading {
        display: flex;
        justify-content: center;
        padding: 40px 0;
    }
    .notif-spinner {
        width: 28px; height: 28px;
        border: 3px solid #eee;
        border-top-color: var(--accent);
        border-radius: 50%;
        animation: notifSpin .6s linear infinite;
    }
    @keyframes notifSpin { to { transform: rotate(360deg); } }

    /* Mobile: make dropdown full-width */
    @media (max-width: 680px) {
        .notif-dropdown {
            position: fixed;
            top: 60px;
            left: 8px;
            right: 8px;
            width: auto;
            max-height: calc(100vh - 80px);
            border-radius: 16px;
        }
    }

    /* ---------- Main Navigation ---------- */
    .main-nav {
        background: #fff;
        border-bottom: 1px solid rgba(0,0,0,.06);
        border-top: none;
        margin-bottom: 16px;
        box-shadow: 0 1px 4px rgba(0,0,0,.03);
    }
    .main-menu {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 0;
        list-style: none;
        margin: 0;
        align-items: center;
    }
    .main-menu li {
        display: inline-flex;
        align-items: center;
    }
    .main-menu a {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: var(--text-secondary);
        text-transform: uppercase;
        font-weight: 600;
        padding: 14px 26px;
        letter-spacing: .5px;
        font-size: 13px;
        transition: color .2s ease, background .2s ease;
        border-radius: 0;
    }
    .main-menu a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 18px;
        right: 18px;
        height: 2.5px;
        background: var(--accent);
        border-radius: 2px 2px 0 0;
        transform: scaleX(0);
        transform-origin: center;
        transition: transform .25s cubic-bezier(.4,0,.2,1);
    }
    .main-menu a:hover {
        color: var(--charcoal);
        background: rgba(0,0,0,.02);
    }
    .main-menu a:hover::after {
        transform: scaleX(1);
    }
    .main-menu a .caret {
        font-size: 11px;
        margin-left: 4px;
        opacity: .5;
        transition: transform .2s ease, opacity .2s ease;
    }
    .menu-has-dropdown:hover a .caret {
        opacity: .8;
        transform: translateY(1px);
    }

    /* ---------- Dropdown Submenu ---------- */
    .menu-has-dropdown { position: relative; }
    .menu-has-dropdown .submenu {
        position: absolute;
        top: calc(100% + 4px);
        left: 50%;
        transform: translateX(-50%) translateY(8px);
        background: #fff;
        border: 1px solid rgba(0,0,0,.06);
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.04);
        min-width: 240px;
        z-index: 120;
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
        overflow: hidden;
    }
    .menu-has-dropdown .submenu ul { list-style: none; margin: 0; padding: 8px 0; }
    .menu-has-dropdown .submenu li {
        display: block;
        width: 100%;
        padding: 0;
    }
    .menu-has-dropdown .submenu a {
        display: flex;
        align-items: center;
        padding: 10px 20px;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 13.5px;
        text-transform: none;
        letter-spacing: 0;
        white-space: nowrap;
        transition: background .15s ease, color .15s ease, padding-left .15s ease;
    }
    .menu-has-dropdown .submenu a::after { display: none; }
    .menu-has-dropdown .submenu a:hover {
        background: var(--accent-light);
        color: var(--accent);
        padding-left: 24px;
    }
    .menu-has-dropdown .submenu .submenu-header {
        padding: 10px 20px 6px;
        color: var(--text-muted);
        font-size: 11px;
        text-transform: uppercase;
        font-weight: 800;
        letter-spacing: .8px;
    }
    .menu-has-dropdown:focus-within .submenu,
    .menu-has-dropdown:hover .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    /* ---------- Tablet breakpoint ---------- */
    @media (max-width: 900px) {
        .menu-has-dropdown .submenu {
            position: static !important;
            box-shadow: none;
            border: none;
            border-radius: 0;
            opacity: 1 !important;
            visibility: visible !important;
            transform: none !important;
            display: none;
            left: auto !important;
            right: auto !important;
            top: auto !important;
            width: 100% !important;
            min-width: 0 !important;
        }
        .menu-has-dropdown.open .submenu { display: block !important; }
        .search-inline .form-control { min-width: 160px; }
        .main-menu { gap: 0; padding: 0; }
        .main-menu a { padding: 12px 14px; }
    }

    /* ---------- Mobile breakpoint ---------- */
    @media (max-width: 680px) {
        .search-inline { display: none; }
        .auth-links .nav-cart-btn { display: none; }
        .auth-links .nav-notif-btn { display: none; }
        .main-menu { flex-wrap: wrap; gap: 0; justify-content: flex-start; }
        .main-nav {
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: max-height .42s cubic-bezier(.2,.9,.2,1), opacity .32s ease;
            background: transparent;
        }
        .site-header.mobile-open .main-nav {
            max-height: 2000px;
            opacity: 1;
            background: #fff;
            border-top: 1px solid rgba(0,0,0,.06);
            box-shadow: 0 8px 32px rgba(0,0,0,.10);
        }
        .site-header .main-nav .container { padding: 8px 16px 16px; }
        .main-menu { display: block; }
        .main-menu > li { display: block; border-bottom: 1px solid rgba(0,0,0,.05); }
        .main-menu > li:last-child { border-bottom: none; }
        .main-menu a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 13px 12px;
            font-weight: 700;
            color: #1f2937;
            font-size: 14px;
            border-radius: 10px;
            transition: background .15s ease, color .15s ease;
        }
        .main-menu a:hover,
        .main-menu a:active {
            background: rgba(249,115,22,.06);
            color: var(--accent);
        }
        .main-menu a::after { display: none; }
        .main-menu a .caret {
            margin-left: auto;
            font-size: 12px;
            transition: transform .2s ease;
        }
        .menu-has-dropdown.open > a .caret { transform: rotate(180deg); }
        .mobile-search {
            display: block !important;
            margin-bottom: 8px;
            padding: 6px 0;
        }
        .mobile-search .form-control {
            padding: 12px 16px;
            font-size: 14px;
            border-radius: 12px;
            border: 1.5px solid rgba(0,0,0,.08);
            background: #f8f9fc;
        }
        .mobile-search .form-control:focus {
            border-color: var(--accent);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(249,115,22,.08);
        }
        .menu-has-dropdown .submenu {
            display: none;
            position: static !important;
            box-shadow: none;
            border: none;
            background: rgba(0,0,0,.02);
            border-radius: 10px;
            margin: 2px 0 6px;
            opacity: 1 !important;
            visibility: visible !important;
            transform: none !important;
            padding: 4px 0;
            min-width: 0 !important;
            width: 100% !important;
            left: auto !important;
            right: auto !important;
            top: auto !important;
        }
        .menu-has-dropdown .submenu ul {
            display: block !important;
            list-style: none;
            margin: 0;
            padding: 0;
            width: 100%;
        }
        .menu-has-dropdown .submenu ul li {
            display: block !important;
            border-bottom: none !important;
            width: 100%;
        }
        .menu-has-dropdown .submenu .submenu-header {
            padding: 8px 16px 4px 24px;
            font-size: 11px;
            color: var(--text-muted, #9ca3af);
            text-transform: uppercase;
            letter-spacing: .6px;
        }
        .menu-has-dropdown .submenu a {
            display: block !important;
            padding: 10px 16px 10px 24px !important;
            font-size: 13px !important;
            font-weight: 600;
            color: #4b5563;
            width: 100%;
            white-space: normal;
            overflow: visible;
        }
        .menu-has-dropdown .submenu a:hover {
            color: var(--accent);
            background: rgba(249,115,22,.04);
        }
        .menu-has-dropdown.open .submenu { display: block !important; }

        .brand .brand-logo-image {
            width: clamp(150px, 42vw, 220px);
            height: 44px;
        }
        .brand .brand-logo-fallback {
            font-size: 16px;
            letter-spacing: .5px;
        }
        .topbar-inner {
            gap: 10px;
            min-height: 56px;
        }
        .topbar { padding: 8px 0 !important; }
    }

    /* Mobile-specific tweaks */
    .mobile-only { display: none; }
    @media (max-width: 680px) {
        .topbar .auth-links { display: none; }
        .mobile-only { display: block; }
        .products-hero {
            border-radius: 0 !important;
            margin-left: calc(-1 * var(--container-padding, 24px));
            margin-right: calc(-1 * var(--container-padding, 24px));
            overflow: hidden;
        }
        .products-hero { margin-left: -24px; margin-right: -24px; }
    }

    /* Mobile bottom bar for cart + auth (shown inside mobile menu) */
    .mobile-nav-extras {
        display: none;
    }
    @media (max-width: 680px) {
        .mobile-nav-extras {
            display: flex;
            gap: 10px;
            padding: 12px 0 4px;
            border-top: 1px solid rgba(0,0,0,.06);
            margin-top: 4px;
        }
        .mobile-nav-extras a {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 16px;
            border-radius: 12px;
            font-weight: 700;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: .3px;
            transition: all .2s ease;
        }
        .mobile-nav-extras .mobile-cart-link {
            background: var(--accent);
            color: #fff;
            box-shadow: 0 2px 8px rgba(249,115,22,.25);
        }
        .mobile-nav-extras .mobile-cart-link:hover {
            background: var(--accent-hover, #EA580C);
        }
        .mobile-nav-extras .mobile-auth-link {
            background: var(--neutral, #f5f6fa);
            color: var(--charcoal, #1B2A4A);
            border: 1.5px solid var(--border);
        }
        .mobile-nav-extras .mobile-auth-link:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
    }

/* Mobile toggle animation */
.mobile-toggle { transition: transform .22s ease, background-color .22s ease, border-color .22s ease; }
.mobile-toggle i, .mobile-toggle svg { transition: transform .32s cubic-bezier(.2,.9,.2,1), opacity .2s ease; }
.mobile-toggle.open {
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.3);
    font-size: 22px;
    font-weight: 300;
}
/* Menu items default state (visible on desktop) */
.main-menu > li { transform: none; opacity: 1; transition: transform .32s cubic-bezier(.2,.9,.2,1), opacity .28s ease; }

/* Mobile entry animation */
@media (max-width: 680px) {
    .main-menu > li { transform: translateY(-8px); opacity: 0; }
    .site-header.mobile-open .main-menu > li { transform: translateY(0); opacity: 1; }
    .site-header.mobile-open .main-menu > li:nth-child(1) { transition-delay: 0.03s; }
    .site-header.mobile-open .main-menu > li:nth-child(2) { transition-delay: 0.05s; }
    .site-header.mobile-open .main-menu > li:nth-child(3) { transition-delay: 0.07s; }
    .site-header.mobile-open .main-menu > li:nth-child(4) { transition-delay: 0.09s; }
    .site-header.mobile-open .main-menu > li:nth-child(5) { transition-delay: 0.11s; }
    .site-header.mobile-open .main-menu > li:nth-child(6) { transition-delay: 0.13s; }
    .site-header.mobile-open .main-menu > li:nth-child(7) { transition-delay: 0.15s; }
    .site-header.mobile-open .main-menu > li:nth-child(8) { transition-delay: 0.17s; }
    .site-header.mobile-open .main-menu > li:nth-child(9) { transition-delay: 0.19s; }
    .site-header.mobile-open .main-menu > li:nth-child(10) { transition-delay: 0.21s; }
    /* Mobile nav extras animation */
    .mobile-nav-extras { transform: translateY(-8px); opacity: 0; transition: transform .32s cubic-bezier(.2,.9,.2,1) .2s, opacity .28s ease .2s; }
    .site-header.mobile-open .mobile-nav-extras { transform: translateY(0); opacity: 1; }
}

/* ---------- Footer ---------- */
.footer {
    margin-top: 48px;
    padding: 40px 0 20px;
    background: var(--charcoal);
    color: rgba(255,255,255,.75);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 32px;
    align-items: start;
}
.footer-col {
    min-width: 0;
}
.footer-col h4 {
    margin-bottom: 8px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}
.footer-col h5 {
    margin-bottom: 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.footer-tagline {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.footer-desc {
    color: rgba(255,255,255,.6);
    font-size: 13px;
    line-height: 1.6;
}
.footer-col ul,
.footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-col ul li + li { margin-top: 8px; }
.footer-col ul a {
    color: rgba(255,255,255,.6);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .2s ease;
    overflow-wrap: anywhere;
}
.footer-col ul a:hover { color: var(--accent); }
.footer-col ul a i,
.footer-col ul a svg { color: var(--accent); flex-shrink: 0; }
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255,255,255,.6);
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.footer-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-bottom {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: rgba(255,255,255,.4);
}

.footer-credit a {
    color: #fff;
    font-weight: 700;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: var(--accent);
}

.footer-location {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .footer {
        margin-top: 24px;
        padding: 26px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-col h4 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .footer-col h5 {
        margin-bottom: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer-credit,
    .footer-bottom p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Disable transitions during theme switch */
.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
    transition: none !important;
    animation: none !important;
}

/* ---------- Form Actions ---------- */
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Ensure inline SVG icons inside buttons are vertically centered and consistent size */
.btn svg {
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
}

/* Some icon wrappers use <i> before JS replacement; keep them aligned */
.btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

/* Ripple effect on buttons */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,.3) 10%, transparent 10%);
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(10);
    opacity: 0;
    transition: transform .5s, opacity .8s;
}
.btn:active::after {
    transform: scale(0);
    opacity: 1;
    transition: 0s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(27,42,74,.18);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 14px 30px rgba(27,42,74,.22);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--steel);
    color: #fff;
}
.btn-secondary:hover {
    background: var(--graphite);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: #C62828; transform: translateY(-1px); }

.btn-warning {
    background: var(--warning);
    color: #1B2430;
}
.btn-warning:hover { background: #D97706; transform: translateY(-1px); }

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover { background: #1B5E20; transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-block { width: 100%; display: flex; justify-content: center; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100% - 32px));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
    position: relative;
    overflow: hidden;
    animation: toastSlideIn .4s cubic-bezier(.21,1.02,.73,1) both;
}
.toast.toast--leaving {
    animation: toastSlideOut .3s ease-in both;
}
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(.96); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(40px) scale(.96); }
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast-icon i,
.toast-icon svg {
    width: 18px;
    height: 18px;
}

/* Success toast */
.toast--success .toast-icon { background: rgba(16,185,129,.10); color: #10b981; }
.toast--success .toast-progress-bar { background: #10b981; }

/* Error toast */
.toast--error .toast-icon { background: rgba(239,68,68,.10); color: #ef4444; }
.toast--error .toast-progress-bar { background: #ef4444; }

/* Warning toast */
.toast--warning .toast-icon { background: rgba(245,158,11,.10); color: #f59e0b; }
.toast--warning .toast-progress-bar { background: #f59e0b; }

/* Info toast */
.toast--info .toast-icon { background: rgba(59,130,246,.10); color: #3b82f6; }
.toast--info .toast-progress-bar { background: #3b82f6; }

.toast-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.toast-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -.1px;
}
.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    word-break: break-word;
}

.toast-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
    margin: -2px -4px 0 0;
}
.toast-close:hover {
    background: rgba(0,0,0,.05);
    color: var(--charcoal);
}
.toast-close i,
.toast-close svg {
    width: 16px;
    height: 16px;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,.04);
}
.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    border-radius: 0 3px 3px 0;
    animation: toastCountdown linear both;
}
@keyframes toastCountdown {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Legacy .alert kept for inline usage (non-flash contexts) */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pageFadeIn .3s ease-out;
    box-shadow: var(--shadow-md);
}
.alert-success { background: rgba(16,185,129,.06); color: var(--charcoal); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info    { background: var(--info-bg);    color: var(--info); }

/* Legacy .flash-container (fallback) */
.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: min(420px, calc(100% - 32px));
    display: grid;
    gap: 10px;
}

/* Payment details card styling used in checkout */
.payment-details .card--padded {
    padding: 14px;
}
.card-icons img { vertical-align: middle; }
.payment-details .form-group { margin-bottom: 10px; }
.payment-details .form-row { display: flex; gap: 12px; }
.payment-details .form-col { flex: 1; }

/* Make card inputs look slightly larger on the payment panel */
#card-details .form-control { padding: 12px 14px; font-size: 14px; }

/* ---------- Confirm Dialog ---------- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(27,36,48,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 16px;
    animation: overlayFadeIn .2s ease both;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.confirm-dialog {
    width: min(440px, 100%);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,.14), 0 8px 24px rgba(0,0,0,.08);
    overflow: hidden;
    animation: confirmPop .25s cubic-bezier(.21,1.02,.73,1);
}
@keyframes confirmPop {
    from { transform: translateY(16px) scale(.94); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.confirm-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px 16px;
}
.confirm-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.confirm-header-icon--danger {
    background: rgba(239,68,68,.10);
    color: #ef4444;
}
.confirm-header-icon--warning {
    background: rgba(245,158,11,.10);
    color: #f59e0b;
}
.confirm-header-icon--info {
    background: rgba(59,130,246,.10);
    color: #3b82f6;
}
.confirm-header-icon i,
.confirm-header-icon svg {
    width: 20px;
    height: 20px;
}
.confirm-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -.2px;
}
.confirm-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    margin-left: auto;
    flex-shrink: 0;
}
.confirm-close i,
.confirm-close svg {
    width: 16px;
    height: 16px;
}
.confirm-close:hover { border-color: rgba(249,115,22,.28); color: var(--accent); background: rgba(249,115,22,.04); }
.confirm-body {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.confirm-actions {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border);
    background: var(--neutral);
}
.confirm-actions .btn {
    text-transform: none;
    letter-spacing: 0;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 700;
}

/* Small spacing between adjacent buttons; stack on small screens */
.btn + .btn {
    margin-left: 8px;
}
@media (max-width: 480px) {
    .btn + .btn { margin-left: 0; margin-top: 8px; display: block; width: 100%; }
    .pagination .btn + .btn { margin-top: 0; display: flex; width: auto; }
    .toast-container { right: 12px; top: 12px; width: calc(100% - 24px); }
}

/* ---------- Login Modal (blur overlay – premium redesign) ---------- */
@keyframes loginSlideUp {
    from { opacity: 0; transform: translateY(32px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes loginSlideDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(24px) scale(.96); }
}
@keyframes loginFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes loginFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes loginShine {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.login-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 16px;
}
.login-modal-overlay.active {
    display: flex;
    animation: loginFadeIn .3s ease both;
}
.login-modal-overlay.closing {
    display: flex;
    animation: loginFadeOut .25s ease both;
}
.login-modal-overlay.closing .login-modal {
    animation: loginSlideDown .25s ease both;
}
.login-modal {
    position: relative;
    width: min(780px, 94vw);
    background: var(--white);
    border-radius: 18px;
    box-shadow:
        0 25px 60px -12px rgba(0,0,0,.25),
        0 0 0 1px rgba(255,255,255,.05),
        0 0 80px rgba(249,115,22,.06);
    overflow: hidden;
    animation: loginSlideUp .4s cubic-bezier(.16,1,.3,1) both;
}
.login-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
    transition: all .2s ease;
}
.login-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(249,115,22,.06);
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(249,115,22,.15);
}
.login-modal-close i,
.login-modal-close svg { width: 18px; height: 18px; }

.login-modal-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}

/* Left image panel */
.login-modal-media {
    position: relative;
    background:
        linear-gradient(160deg, rgba(15,23,42,.75) 0%, rgba(27,42,74,.45) 50%, rgba(249,115,22,.15) 100%),
        var(--login-modal-img, none);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.login-modal-media::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 80%, rgba(249,115,22,.12) 0%, transparent 60%);
    pointer-events: none;
}
.login-modal-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,.05) 0%, rgba(15,23,42,.55) 100%);
}
.login-modal-media-content {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 32px;
    color: var(--white);
}
.login-modal-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.login-modal-store {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -.4px;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.login-modal-tagline {
    margin-top: 4px;
    color: rgba(255,255,255,.75);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .2px;
}

/* Right form panel */
.login-modal-form-panel {
    padding: 28px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    position: relative;
}
.login-modal-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    background-size: 200% auto;
    animation: loginShine 3s linear infinite;
    opacity: .7;
}
.login-modal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.login-modal-icon-wrap {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--accent) 0%, #e8650a 100%);
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(249,115,22,.25), 0 1px 3px rgba(249,115,22,.1);
    padding: 8px;
}
.login-modal-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1);
}
.login-modal-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 48px;
}
.login-modal-brand h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: var(--charcoal);
    letter-spacing: -.2px;
    line-height: 1.25;
}
.login-modal-brand p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0;
    font-weight: 500;
    line-height: 1.3;
}
.login-modal-error {
    background: linear-gradient(135deg, rgba(239,68,68,.06) 0%, rgba(239,68,68,.12) 100%);
    border: 1px solid rgba(239,68,68,.18);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-modal-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1.5px solid var(--border);
}
.login-modal-footer p {
    font-size: 12px;
    margin: 6px 0;
    color: var(--text-secondary);
}
.login-modal-footer a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
    position: relative;
}
.login-modal-footer a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width .25s ease;
}
.login-modal-footer a:hover {
    color: var(--accent-hover);
}
.login-modal-footer a:hover::after {
    width: 100%;
}

/* Login form inputs – refined style */
.login-modal-form-panel .form-group {
    margin-bottom: 14px;
}

/* Password visibility toggle */
.login-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-pw-toggle:hover {
    color: var(--accent);
    background: rgba(249,115,22,.06);
}

/* ── Floating label inputs ─────────────────────────────────────────────── */
.fl-group { margin-bottom: 4px; }

.fl-wrap {
    position: relative;
    margin-top: 8px;
}

.fl-input {
    width: 100%;
    padding: 13px 14px 13px 14px !important;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: none;
}

.fl-input:hover { border-color: #9ca3af; }

.fl-input:focus {
    border-color: var(--accent);
    box-shadow: none;
}

.fl-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #9ca3af;
    pointer-events: none;
    transition: top .18s ease, font-size .18s ease, color .18s ease, transform .18s ease, padding .18s ease;
    background: transparent;
    padding: 0 3px;
    line-height: 1;
}

/* Floated state: sits on the border line */
.fl-input:focus ~ .fl-label,
.fl-input:not(:placeholder-shown) ~ .fl-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: .02em;
    background: #fff;
    padding: 0 4px;
}

.fl-input:not(:focus):not(:placeholder-shown) ~ .fl-label {
    color: #6b7280;
}

/* Show/Hide toggle inside fl-wrap (password fields) */
.fl-wrap .login-pw-toggle,
.fl-wrap .auth-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    padding: 2px 4px;
    transition: color .2s;
    z-index: 1;
}

.fl-wrap .login-pw-toggle:hover,
.fl-wrap .auth-pw-toggle:hover { color: var(--accent); }

/* Override global indent for fl-inputs */
.fl-wrap .fl-input,
.login-modal-form-panel .fl-wrap .form-control,
.auth-panel .fl-wrap .form-control {
    padding-left: 14px !important;
}
.login-pw-toggle i,
.login-pw-toggle svg { width: 18px; height: 18px; }

/* Footer divider */
.login-modal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
}
.login-modal-divider::before,
.login-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.login-modal-divider span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* Admin link style */
.login-admin-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: var(--steel) !important;
    transition: all .2s ease;
    text-decoration: none !important;
}
.login-admin-link:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
    background: rgba(27,42,74,.04);
}
.login-admin-link::after { display: none !important; }

/* Google login button */
.btn-google-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: #3c4043;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
    cursor: pointer;
    margin-top: 2px;
}
.btn-google-login:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    box-shadow: 0 1px 6px rgba(60,64,67,.15);
    color: #3c4043 !important;
    text-decoration: none !important;
}
.btn-google-login svg { flex-shrink: 0; }

/* ---------- Phone number field with country code ---------- */
.field-label-sm {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--steel);
    margin-bottom: 5px;
}

/* Floating-label phone field */
.phone-fl-wrap {
    position: relative;
    margin-top: 8px;
}
.phone-fl-wrap .fl-input {
    padding-left: 46px !important;
    width: 100%;
}
.phone-prefix-fl {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    pointer-events: none;
    z-index: 1;
    line-height: 1;
}
.phone-fl-label {
    left: 46px !important;
}
/* When floated, snap label back to left edge */
.phone-fl-wrap .fl-input:focus ~ .phone-fl-label,
.phone-fl-wrap .fl-input:not(:placeholder-shown) ~ .phone-fl-label {
    left: 12px !important;
}
.phone-input-row {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s ease;
}
.phone-input-row:focus-within { border-color: var(--accent); }
.phone-code-select {
    flex-shrink: 0;
    width: 108px;
    border: none !important;
    border-right: 1.5px solid #d1d5db !important;
    border-radius: 0 !important;
    background: #f9fafb !important;
    font-size: 12.5px;
    font-weight: 600;
    padding: 0 8px;
    cursor: pointer;
    outline: none;
    color: var(--charcoal);
    height: 42px;
}
.phone-code-static {
    flex-shrink: 0;
    width: 68px;
    border-right: 1.5px solid #d1d5db;
    background: #f9fafb;
    font-size: 12.5px;
    font-weight: 600;
    padding: 0 10px;
    color: var(--charcoal);
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.phone-number-input {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 10px 12px !important;
    font-size: 13px;
    outline: none;
    min-width: 0;
    height: 42px;
    box-shadow: none !important;
}
.phone-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.login-modal-form-panel .form-group label:not(.fl-label) {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--steel);
    margin-bottom: 6px;
}
.login-modal-form-panel .input-icon-wrap {
    position: relative;
}
.login-modal-form-panel .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: color .2s ease;
    z-index: 1;
}
.login-modal-form-panel .form-control {
    padding: 10px 14px 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    background: var(--neutral);
    transition: all .25s ease;
}
.login-modal-form-panel .input-icon-wrap .form-control { padding-left: 14px; }
.login-modal-form-panel .form-control:hover {
    border-color: #cbd5e1;
    background: var(--white);
}
.login-modal-form-panel .form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(249,115,22,.1), 0 2px 8px rgba(249,115,22,.06);
}
.login-modal-form-panel .form-control:focus + .input-icon,
.login-modal-form-panel .form-control:focus ~ .input-icon,
.login-modal-form-panel .input-icon-wrap:focus-within .input-icon {
    color: var(--accent);
}

/* Login modal form button – gradient + hover effects */
.login-modal-form-panel .btn-block {
    width: 100%;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, #e8650a 100%);
    color: var(--white);
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(249,115,22,.3), 0 1px 3px rgba(249,115,22,.15);
}
.login-modal-form-panel .btn-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
    opacity: 0;
    transition: opacity .3s ease;
}
.login-modal-form-panel .btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(249,115,22,.35), 0 2px 6px rgba(249,115,22,.2);
}
.login-modal-form-panel .btn-block:hover::before {
    opacity: 1;
}
.login-modal-form-panel .btn-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249,115,22,.25);
}
.login-modal-form-panel .btn-block i,
.login-modal-form-panel .btn-block svg {
    vertical-align: middle;
    margin-right: 6px;
}

/* Responsive: stack on mobile */
@media (max-width: 700px) {
    .login-modal-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .login-modal-media {
        min-height: 200px;
    }
    .login-modal-form-panel {
        padding: 28px 24px;
    }
    .login-modal-form-panel::before {
        display: none;
    }
    .login-modal-media-content {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Spin utility for loading icons */
.spin, .spin svg { animation: spin 1s linear infinite; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }

.form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.form-col {
    flex: 1;
    min-width: 220px;
}
.required {
    color: var(--danger);
    font-weight: 700;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--white);
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,42,74,.10);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error {
    border-color: var(--danger);
    background: var(--danger-bg);
}
.form-control.error:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(229,57,53,.14);
}

textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ---------- Tables ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.table th {
    background: var(--charcoal);
    color: var(--white);
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr { transition: var(--transition); }
.table tbody tr:hover { background: var(--neutral); }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------- Cards ---------- */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 {
    margin-bottom: 16px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.card h3 i,
.card h3 svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.card-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ---------- Badges / Status ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.badge-pending    { background: var(--warning-bg); color: var(--warning); }
.badge-processing { background: var(--info-bg);    color: var(--info); }
.badge-shipped    { background: #E8EAF6;           color: #283593; }
.badge-delivered  { background: var(--success-bg);  color: var(--success); }
.badge-cancelled  { background: var(--danger-bg);   color: var(--danger); }
.badge-approved   { background: var(--success-bg);  color: var(--success); }
.badge-rejected   { background: var(--danger-bg);   color: var(--danger); }

/* ---------- Progress Bar ---------- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-bar .fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width .6s ease-in-out;
}

/* ---------- Utilities ---------- */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted) !important; }
.text-accent   { color: var(--accent) !important; }
.text-success  { color: var(--success) !important; }
.text-danger   { color: var(--danger) !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--neutral); }
::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--graphite); }

/* ---------- Auth (login / register) ---------- */

/* Full-page blurred background for login/register */
.auth-page-backdrop {
    position: relative;
    min-height: calc(100vh - 64px);
    background: var(--auth-bg, none) center / cover no-repeat;
    display: flex;
    flex-direction: column;
}
.auth-page-blur {
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    transform: scale(1.05);
    z-index: 0;
}
.auth-page-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(27,42,74,.45);
    z-index: 1;
}
.auth-page-backdrop > .container {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 16px 80px;
    background: var(--neutral);
    min-height: calc(100vh - 140px);
}
.auth-wrapper--blur {
    background: transparent;
    padding: 40px 0;
    width: 100%;
}

.auth-card.card {
    width: 100%;
    max-width: 760px;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    background: #fff;
}

/* Split layout (Admin/Staff Login) */
.auth-card--split.auth-card.card {
    max-width: 980px;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    border: none;
    box-shadow:
        0 25px 60px -12px rgba(0,0,0,.2),
        0 0 0 1px rgba(255,255,255,.05),
        0 0 80px rgba(27,42,74,.06);
    animation: loginSlideUp .4s cubic-bezier(.16,1,.3,1) both;
}
.auth-split {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    min-height: 540px;
}
.auth-media {
    position: relative;
    background:
        linear-gradient(160deg, rgba(15,23,42,.75) 0%, rgba(27,42,74,.45) 50%, rgba(27,42,74,.2) 100%),
        var(--auth-image);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.auth-media::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 80%, rgba(27,42,74,.15) 0%, transparent 60%);
    pointer-events: none;
}
.auth-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,.05) 0%, rgba(15,23,42,.55) 100%);
}
.auth-media-content {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 32px;
    color: var(--white);
}
.auth-media-badge {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.auth-media-title {
    margin-top: 14px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.5px;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.auth-media-subtitle {
    margin-top: 6px;
    color: rgba(255,255,255,.75);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: .2px;
}
.auth-panel {
    padding: 40px 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    position: relative;
}
.auth-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    background-size: 200% auto;
    animation: loginShine 3s linear infinite;
    opacity: .7;
}
.auth-card--split .auth-brand {
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}
.auth-card--split .auth-brand h2 {
    font-size: 19px;
    line-height: 1.25;
}

@media (max-width: 900px) {
    .auth-split { grid-template-columns: 1fr; min-height: 0; }
    .auth-media { min-height: 200px; }
    .auth-panel { padding: 28px 24px; }
    .auth-panel::before { display: none; }
    .auth-media-content { left: 20px; right: 20px; bottom: 20px; }
}

.auth-brand {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-icon-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary) 0%, var(--graphite) 100%);
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(27,42,74,.2), 0 1px 3px rgba(27,42,74,.1);
    color: var(--white);
}
.auth-icon-wrap .auth-icon,
.auth-icon-wrap i,
.auth-icon-wrap svg {
    width: 24px !important;
    height: 24px !important;
    color: var(--white) !important;
    flex-shrink: 0;
    margin-top: 0;
}
.auth-brand .auth-icon,
.auth-brand svg {
    width: 38px;
    height: 38px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0;
}
.auth-brand .auth-icon-img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 0;
}
.auth-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-brand h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.2;
}
.auth-role-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(27,42,74,.07);
    border: 1px solid rgba(27,42,74,.12);
    border-radius: 6px;
    width: fit-content;
}
.auth-tagline { margin-top: 4px; color: var(--text-muted); font-size: 13px; font-weight: 500; line-height: 1.3; }

/* Auth form inputs – refined style */
.auth-panel .form-group {
    margin-bottom: 20px;
}
.auth-panel .form-group label:not(.fl-label) {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--steel);
    margin-bottom: 8px;
}
.auth-panel .form-control:not(.fl-input) {
    padding: 13px 14px 13px 44px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    background: var(--neutral);
    transition: all .25s ease;
}
.auth-panel .form-control:not(.fl-input):hover {
    border-color: #cbd5e1;
    background: var(--white);
}
.auth-panel .form-control:not(.fl-input):focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(249,115,22,.1), 0 2px 8px rgba(249,115,22,.06);
}
.auth-panel .input-icon-wrap:focus-within .input-icon {
    color: var(--accent);
}
.auth-panel .input-icon {
    transition: color .2s ease;
}

/* Auth panel button – gradient + hover */
.auth-panel .btn-block {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, #e8650a 100%);
    color: var(--white);
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(249,115,22,.3), 0 1px 3px rgba(249,115,22,.15);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.auth-panel .btn-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
    opacity: 0;
    transition: opacity .3s ease;
}
.auth-panel .btn-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(249,115,22,.35), 0 2px 6px rgba(249,115,22,.2);
}
.auth-panel .btn-block:hover::before {
    opacity: 1;
}
.auth-panel .btn-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249,115,22,.25);
}
.auth-panel .btn-block i,
.auth-panel .btn-block svg {
    vertical-align: middle;
    margin-right: 6px;
}

/* Auth footer */
.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1.5px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer p {
    margin: 8px 0;
}
.auth-footer a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
    position: relative;
}
.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width .25s ease;
}
.auth-footer a:hover {
    color: var(--accent-hover);
}
.auth-footer a:hover::after {
    width: 100%;
}

/* Auth footer divider */
.auth-footer-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
}
.auth-footer-divider::before,
.auth-footer-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-footer-divider span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* Auth password toggle */
.auth-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-pw-toggle:hover {
    color: var(--accent);
    background: rgba(249,115,22,.06);
}
.auth-pw-toggle i,
.auth-pw-toggle svg { width: 18px; height: 18px; }

/* Auth customer link button */
.auth-customer-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: var(--steel) !important;
    transition: all .2s ease;
    text-decoration: none !important;
}
.auth-customer-link:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background: rgba(249,115,22,.04);
}
.auth-customer-link::after { display: none !important; }

/* ---------- Global input-icon-wrap & btn-accent ---------- */
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size:16px; pointer-events: none; }
.input-icon-wrap .input-icon-img { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 24px; object-fit: contain; pointer-events: none; }
.input-icon-wrap .form-control { padding-left: 44px; }

.btn-accent {
    background-color: var(--accent);
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(249,115,22,.20);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,.28); }

/* Responsive adjustments for auth header and form inputs */
@media (max-width: 900px) {
    .auth-brand { gap: 12px; }
    .auth-icon-wrap { width: 40px; height: 40px; border-radius: 11px; }
    .auth-icon-wrap .auth-icon,
    .auth-icon-wrap svg { width: 20px; height: 20px; }
    .auth-brand h2 { font-size: 16px; }
    .auth-tagline { font-size: 12px; }

    .input-icon-wrap .input-icon { left: 10px; font-size: 14px; }
    .input-icon-wrap .form-control { padding-left: 38px; }
    .input-icon-wrap .date-display { background-position: right 10px center; }
}

@media (max-width: 480px) {
    .auth-brand { gap: 10px; }
    .auth-icon-wrap { width: 36px; height: 36px; border-radius: 10px; }
    .auth-icon-wrap .auth-icon,
    .auth-icon-wrap svg { width: 18px; height: 18px; }
    .auth-brand h2 { font-size: 15px; }
    .auth-tagline { font-size: 12px; }

    .input-icon-wrap .input-icon { left: 8px; font-size: 14px; }
    .input-icon-wrap .form-control { padding-left: 34px; padding-right: 42px; }
    .input-icon-wrap .date-display { background-position: right 10px center; }

    .auth-card { padding: 16px; }
    .auth-panel .btn-block { width: 100%; }
}

/* small screens */
@media (max-width:640px){
    .auth-card.card { padding: 18px; margin: 6px; }
    .input-icon-wrap .form-control { padding-left: 40px; }
}

@media (max-width:640px){
    .auth-card--split.auth-card.card { margin: 6px; }
}
