/* ===================================================================
   Gadgets Fusion — Design tokens
   Palette:  --navy (deep brand ink) · --blue (primary) · --blue-light
             --amber (ratings/energy accent) · --green (success)
             --red (destructive/alert) · --paper (app surface)
   Type:     Space Grotesk (display) · Inter (body) · JetBrains Mono (data)
   Signature: circuit-trace motif (nodes + wires) echoing the logo mark,
              used sparingly as a background watermark + section dividers.
   =================================================================== */
:root {
    --navy: #0a1f3a;
    --navy-deep: #061225;
    --blue: #0066cc;
    --blue-dim: #0055b3;
    --blue-light: #3b8ef0;
    --blue-mist: #eaf2fc;
    --amber: #f5b342;
    --green: #16a34a;
    --red: #cc3366;
    --red-deep: #b13e1a;
    --ink: #0b1f34;
    --ink-soft: #3f5f7e;
    --ink-faint: #6b85a0;
    --paper: #f2f6fb;
    --surface: #ffffff;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 12px rgba(9, 30, 66, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(9, 30, 66, 0.14);
    --shadow-lg: 0 30px 70px -20px rgba(6, 18, 37, 0.28);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    padding: clamp(0px, 2vw, 16px);
    position: relative;
}

/* Ambient circuit-trace watermark behind the whole app */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 10%, rgba(0, 102, 204, 0.08), transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(0, 102, 204, 0.06), transparent 45%),
        var(--paper);
}

:focus-visible {
    outline: 2.5px solid var(--blue);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
}

.app {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 20px 28px 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    min-height: 96vh;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem 1.6rem;
    margin: 0 -28px;
    padding: 14px 28px 14px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 50, 100, 0.07);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.brand-wrapper { display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon {
    width: 48px; height: 48px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.brand-icon img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 70, 180, 0.25));
}
.brand h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--navy), var(--blue-dim));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand h1 span { font-weight: 500; -webkit-text-fill-color: var(--blue); background: none; }
.brand-slogan {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--ink-soft);
    letter-spacing: 0.2px;
    padding-left: 60px;
    opacity: 0.85;
}
.brand-slogan i { color: var(--blue); margin-right: 6px; }

.header-actions {
    display: flex; flex-wrap: wrap; gap: 4px;
    background: rgba(0, 0, 0, 0.02); padding: 4px;
    border-radius: var(--radius-pill); border: 1px solid rgba(0, 0, 0, 0.03);
}
.header-actions button {
    background: transparent; border: none;
    padding: 8px 18px; border-radius: var(--radius-pill);
    font-weight: 600; font-size: 0.8rem;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; transition: 0.25s var(--ease);
    color: var(--navy); font-family: var(--font-body);
    white-space: nowrap;
}
.header-actions button i { color: var(--ink-faint); transition: 0.2s; }
.header-actions button:hover { background: rgba(0, 102, 204, 0.05); color: var(--blue-dim); }
.header-actions button:hover i { color: var(--blue); }
.header-actions .active-panel {
    background: #ffffff; color: var(--blue-dim);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 102, 204, 0.12);
}
.header-actions .active-panel i { color: var(--blue); }
.cart-badge {
    background: var(--red); color: white;
    border-radius: var(--radius-pill); padding: 0 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem; font-weight: 700;
    line-height: 1.7; min-width: 20px;
    text-align: center;
}
.user-badge {
    background: rgba(0, 102, 204, 0.08);
    padding: 4px 14px; border-radius: var(--radius-pill);
    font-size: 0.75rem; font-weight: 500;
    color: #004a8c; display: inline-flex;
    align-items: center; gap: 6px;
}
.user-badge i { color: var(--blue); }
.logout-btn {
    background: transparent;
    border: 1px solid rgba(200, 60, 30, 0.15);
    padding: 4px 14px; border-radius: var(--radius-pill);
    font-size: 0.7rem; font-weight: 600;
    color: var(--red-deep); cursor: pointer; transition: 0.2s;
    font-family: var(--font-body);
    display: inline-flex; align-items: center; gap: 4px;
}
.logout-btn:hover { background: var(--red); color: white; border-color: var(--red); }

.panel { display: none; animation: fadeSlide 0.4s var(--ease); flex: 1; }
.panel.active { display: block; }
@keyframes fadeSlide { 0% { opacity: 0; transform: translateY(14px); } 100% { opacity: 1; transform: translateY(0); } }

/* ===== HERO SECTION — circuit-trace signature ===== */
.hero-section {
    position: relative;
    text-align: center;
    padding: 46px 20px 34px;
    margin: 24px 0 28px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(155deg, rgba(0, 102, 204, 0.05), rgba(0, 102, 204, 0.1));
    isolation: isolate;
}
.hero-section .circuit-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--blue-dim);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 102, 204, 0.15);
    padding: 5px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.hero-section h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.hero-section h2 span { color: var(--blue); }
.hero-section .tagline {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--ink-soft);
    max-width: 600px;
    margin: 12px auto 0;
    font-weight: 500;
    min-height: 3.6rem;
}
.typewriter-wrapper {
    display: inline-block;
    font-size: 1em;
    color: var(--ink-soft);
    font-weight: 500;
    max-width: 100%;
}
.typewriter-wrapper .cursor {
    display: inline-block;
    width: 2px;
    margin-left: 2px;
    background: var(--blue);
    animation: blink 0.7s step-end infinite;
    vertical-align: text-bottom;
    height: 1.1em;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-section .cta-group { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-section .cta-btn {
    background: linear-gradient(145deg, var(--blue-dim), var(--blue-light));
    color: white;
    padding: 14px 36px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 26px -8px rgba(0, 102, 204, 0.4);
    transition: 0.25s var(--ease);
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero-section .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(0, 102, 204, 0.48); }
.hero-section .cta-outline {
    background: rgba(255, 255, 255, 0.7);
    color: var(--blue);
    border: 2px solid var(--blue);
    box-shadow: none;
}
.hero-section .cta-outline:hover { background: rgba(0, 102, 204, 0.06); transform: translateY(-2px); }

/* ===== SEARCH / FILTER (card section) ===== */
.search-section {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 24px; align-items: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    padding: 6px 6px 6px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm);
}
.search-wrapper { flex: 2; min-width: 160px; display: flex; align-items: center; gap: 8px; }
.search-wrapper i { color: var(--ink-faint); }
.search-wrapper input {
    border: none; padding: 12px 4px; width: 100%;
    font-size: 0.9rem; background: transparent;
    outline: none; font-family: var(--font-body);
    color: var(--ink);
}
.search-wrapper input::placeholder { color: #8aa0b8; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-group select {
    padding: 9px 16px; border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white; font-family: var(--font-body);
    font-size: 0.8rem; font-weight: 500;
    color: var(--navy); cursor: pointer; outline: none;
    min-width: 100px;
}
.filter-group select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.08); }
.filter-group button {
    background: var(--blue); border: 1px solid var(--blue); color: white;
    padding: 9px 20px; border-radius: var(--radius-pill);
    font-weight: 600; display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-family: var(--font-body);
    font-size: 0.8rem; transition: 0.2s;
}
.filter-group button:hover { background: var(--blue-dim); transform: translateY(-1px); }
.filter-group .btn-outline { background: transparent; color: var(--navy); border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: none; }
.filter-group .btn-outline:hover { background: rgba(0, 0, 0, 0.02); transform: none; }

.result-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-faint);
    margin: -8px 0 14px 6px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px; margin: 4px 0 24px;
}
.product-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md); padding: 18px 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease);
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}
.product-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--blue-light));
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover::before { opacity: 1; }
.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 102, 204, 0.15);
    box-shadow: var(--shadow-md);
    background: white;
}
.product-card .icon {
    background: linear-gradient(145deg, var(--blue-mist), #dce8f5);
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--blue); margin-bottom: 12px;
    transition: 0.3s;
}
.product-card:hover .icon { background: var(--blue); color: white; box-shadow: 0 8px 24px -8px rgba(0, 102, 204, 0.35); }
.product-card h4 { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 2px; }
.product-card .specs {
    font-family: var(--font-mono);
    font-size: 0.66rem; color: var(--ink-soft);
    margin: 4px 0 8px; line-height: 1.6;
    opacity: 0.9;
}
.product-card .price { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; color: #003366; margin-top: auto; }
.card-actions {
    display: flex; justify-content: space-between;
    align-items: center; margin-top: 12px;
    padding-top: 10px; border-top: 1px dashed rgba(0, 0, 0, 0.08);
    flex-wrap: wrap; gap: 6px;
}
.card-actions .stock-badge {
    font-family: var(--font-mono);
    font-size: 0.6rem; font-weight: 600;
    background: var(--blue-mist); padding: 3px 12px;
    border-radius: var(--radius-pill); color: #004a8c;
}
.card-actions .stock-out { background: #ffe9e0; color: var(--red-deep); }
.card-actions .action-icons { display: flex; align-items: center; gap: 8px; }
.card-actions i { color: var(--ink-faint); cursor: pointer; transition: 0.2s; font-size: 1.05rem; }
.card-actions i:hover { color: var(--blue); transform: scale(1.1); }
.card-actions .wishlist-active { color: var(--red); }
.rating-star { color: var(--amber); letter-spacing: 1px; font-size: 0.75rem; margin: 2px 0; }

.buy-btn, .add-cart-btn {
    padding: 7px 14px; border-radius: var(--radius-pill);
    font-weight: 600; font-size: 0.7rem; cursor: pointer;
    transition: 0.2s; font-family: var(--font-body);
    display: inline-flex; align-items: center; gap: 4px;
    white-space: nowrap; border: none;
}
.buy-btn { background: linear-gradient(145deg, var(--blue), #0088ee); color: white; box-shadow: 0 4px 12px -4px rgba(0, 102, 204, 0.3); }
.buy-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px -4px rgba(0, 102, 204, 0.4); background: linear-gradient(145deg, var(--blue-dim), #0077dd); }
.buy-btn:active { transform: scale(0.95); }
.buy-btn.out-of-stock { background: #ccc; cursor: not-allowed; box-shadow: none; color: #666; }
.buy-btn.out-of-stock:hover { transform: none; box-shadow: none; background: #ccc; }

.add-cart-btn { background: rgba(0, 102, 204, 0.08); color: var(--blue); border: 1px solid rgba(0, 102, 204, 0.15); }
.add-cart-btn:hover { background: rgba(0, 102, 204, 0.15); transform: translateY(-1px); }
.add-cart-btn.in-cart { background: var(--green); color: white; border-color: var(--green); }

.empty-state {
    grid-column: 1/-1; text-align: center; padding: 46px 20px;
    color: var(--ink-soft); background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg); font-weight: 500;
    border: 1px dashed rgba(0, 102, 204, 0.2);
}

/* ===== DASHBOARD ===== */
.dashboard-container { display: flex; gap: 26px; padding: 4px 0; flex-wrap: wrap; }
.dashboard-sidebar {
    flex: 0 0 230px; min-width: 200px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    height: fit-content;
}
.dashboard-main { flex: 1; min-width: 300px; }
.dashboard-sidebar .sidebar-section { margin-bottom: 12px; }
.dashboard-sidebar .sidebar-section:last-child { margin-bottom: 0; }
.dashboard-sidebar .sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--ink-soft); font-weight: 600;
    padding: 4px 12px 8px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 4px;
}
.dashboard-sidebar .sidebar-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    cursor: pointer; transition: 0.2s;
    color: #1e3b5c; font-weight: 500; font-size: 0.9rem;
    margin-bottom: 2px;
}
.dashboard-sidebar .sidebar-item i { width: 20px; color: var(--ink-faint); font-size: 1rem; }
.dashboard-sidebar .sidebar-item:hover { background: rgba(0, 102, 204, 0.06); color: var(--blue); }
.dashboard-sidebar .sidebar-item:hover i { color: var(--blue); }
.dashboard-sidebar .sidebar-item.active { background: rgba(0, 102, 204, 0.08); color: var(--blue); font-weight: 600; }
.dashboard-sidebar .sidebar-item.active i { color: var(--blue); }

.dashboard-main .dashboard-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dashboard-main .dashboard-header h2 { font-family: var(--font-display); font-size: 1.3rem; color: var(--navy); }
.dashboard-main .dashboard-header h2 i { color: var(--blue); margin-right: 8px; }
.dashboard-main .user-info {
    background: rgba(0, 102, 204, 0.06); padding: 6px 16px; border-radius: var(--radius-pill);
    font-size: 0.8rem; font-weight: 500; color: #004a8c;
    display: inline-flex; align-items: center; gap: 6px;
}

.login-card {
    background: white; border-radius: var(--radius-md);
    padding: 36px 32px; border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: var(--shadow-sm); max-width: 440px;
}
.login-card .icon-big { font-size: 2.6rem; color: var(--blue); opacity: 0.25; margin-bottom: 12px; }
.login-card h3 { font-size: 1.3rem; color: var(--navy); margin-bottom: 4px; font-weight: 700; font-family: var(--font-display); }
.login-card p { color: #4f6f8e; font-size: 0.9rem; margin-bottom: 24px; }
.login-card .login-btn-card {
    background: linear-gradient(145deg, var(--blue-dim), var(--blue-light)); color: white; border: none;
    padding: 12px 36px; border-radius: var(--radius-pill); font-weight: 600; cursor: pointer;
    font-family: var(--font-body); font-size: 0.95rem; transition: 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px -4px rgba(0, 102, 204, 0.3);
}
.login-card .login-btn-card:hover { background: var(--blue-dim); transform: translateY(-2px); box-shadow: 0 8px 24px -6px rgba(0, 102, 204, 0.35); }
.demo-tag { background: rgba(0, 0, 0, 0.03); padding: 2px 10px; border-radius: var(--radius-pill); font-family: var(--font-mono); }

.customer-dashboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cust-card, .module-card {
    background: white; border-radius: var(--radius-md); padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.04); box-shadow: var(--shadow-sm);
    cursor: pointer; transition: 0.25s var(--ease);
}
.cust-card:hover, .module-card:hover {
    border-color: rgba(0, 102, 204, 0.15); transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.cust-card .icon, .module-card .icon { font-size: 1.35rem; color: var(--blue); margin-bottom: 6px; opacity: 0.65; }
.cust-card h4, .module-card h4 { font-weight: 600; color: var(--navy); font-size: 0.95rem; }
.cust-card p, .module-card p { font-size: 0.75rem; color: #4f6f8e; margin-top: 2px; }
.cust-card .badge, .module-card .badge {
    display: inline-block; margin-top: 6px; background: var(--blue-mist);
    padding: 2px 12px; border-radius: var(--radius-pill); font-size: 0.6rem;
    font-weight: 600; color: #004a8c; font-family: var(--font-mono);
}

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid rgba(0, 0, 0, 0.04); box-shadow: var(--shadow-sm); }
.stat-card .label { font-size: 0.6rem; color: #4f6f8e; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .value { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-top: 2px; }
.stat-card .change { font-size: 0.6rem; font-weight: 600; }
.change.up { color: var(--green); }
.change.down { color: var(--red-deep); }
.admin-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

/* ===== CART ===== */
.cart-shell {
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(6px);
    border-radius: var(--radius-lg); padding: 26px 28px;
    border: 1px solid rgba(255, 255, 255, 0.5); box-shadow: var(--shadow-sm);
}
.cart-shell h3 { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); margin-bottom: 20px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed rgba(0, 0, 0, 0.08); gap: 12px; flex-wrap: wrap; }
.cart-line .price { font-family: var(--font-mono); font-weight: 600; }
.cart-summary { margin-top: 20px; background: linear-gradient(145deg, #f0f7ff, #e8f1fa); padding: 18px 24px; border-radius: var(--radius-lg); }
.cart-summary .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 1.05rem; font-family: var(--font-mono); }
.cart-summary .tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.cart-summary .tag { background: white; padding: 4px 16px; border-radius: var(--radius-pill); font-size: 0.8rem; }
.cart-summary .pay-btn {
    margin-top: 16px; background: linear-gradient(145deg, var(--blue-dim), var(--blue-light)); color: white;
    border: none; padding: 14px 32px; border-radius: var(--radius-pill); font-weight: 700;
    width: 100%; cursor: pointer; font-size: 1rem; font-family: var(--font-body);
    transition: 0.2s;
}
.cart-summary .pay-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(0,102,204,0.4); }
.cart-empty { text-align: center; padding: 40px 20px; color: var(--ink-soft); }

/* ===== LOGIN OVERLAY ===== */
#loginOverlay {
    display: none; position: fixed; inset: 0;
    background: rgba(6, 18, 37, 0.45);
    backdrop-filter: blur(8px);
    z-index: 1000; align-items: center; justify-content: center; padding: 20px;
}
#loginOverlay .login-box {
    background: white; max-width: 440px; width: 100%;
    border-radius: var(--radius-lg); padding: 40px 36px;
    box-shadow: var(--shadow-lg); position: relative;
    animation: fadeSlide 0.3s var(--ease);
}
#loginOverlay .close-btn { position: absolute; top: 16px; right: 20px; background: transparent; border: none; font-size: 1.5rem; cursor: pointer; color: #4f6f8e; }
#loginOverlay .brand-mark { display: flex; justify-content: center; margin-bottom: 8px; }
#loginOverlay .brand-mark img { width: 44px; height: 44px; object-fit: contain; }
#loginOverlay h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--navy); text-align: center; margin-bottom: 4px; }
#loginOverlay .sub { text-align: center; color: #4f6f8e; font-size: 0.9rem; margin-bottom: 24px; }
.role-select { display: flex; gap: 12px; margin-bottom: 20px; }
.role-select button {
    flex: 1; padding: 12px; border-radius: var(--radius-pill);
    border: 2px solid rgba(0, 0, 0, 0.06); background: white; font-weight: 600;
    cursor: pointer; font-family: var(--font-body); color: #1e3b5c; transition: 0.2s;
}
.role-select button i { margin-right: 8px; }
.role-select button.active-role { border-color: var(--blue); background: rgba(0, 102, 204, 0.05); color: var(--blue); }
.role-select button:hover { border-color: var(--blue); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 500; font-size: 0.85rem; color: #1a3a5c; margin-bottom: 4px; }
.form-group input {
    width: 100%; padding: 12px 18px; border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.06); font-family: var(--font-body); font-size: 0.95rem;
    outline: none; background: #f8fafc; transition: 0.2s;
}
.form-group input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.06); background: white; }
.login-btn {
    width: 100%; padding: 14px; border-radius: var(--radius-pill); border: none;
    background: linear-gradient(145deg, var(--blue-dim), var(--blue-light)); color: white;
    font-weight: 700; font-size: 1rem; cursor: pointer; transition: 0.2s;
    box-shadow: 0 8px 24px -6px rgba(0, 102, 204, 0.3); font-family: var(--font-body);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(0, 102, 204, 0.4); }
.login-error { color: var(--red); font-size: 0.8rem; text-align: center; margin-top: 12px; display: none; }
.overlay-demo { text-align: center; margin-top: 12px; font-size: 0.7rem; color: #4f6f8e; }
.overlay-register { text-align: center; margin-top: 10px; font-size: 0.8rem; }
.overlay-register a { color: var(--blue); font-weight: 600; text-decoration: none; }

/* ===== FOOTER ===== */
.footer {
    margin-top: 24px; padding: 20px 4px 14px;
    border-top: 1px solid rgba(0, 50, 100, 0.06);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    font-size: 0.8rem; color: #2a4a6a;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    text-align: center;
}
.footer .footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.footer .footer-links a { color: #2a4a6a; text-decoration: none; font-weight: 500; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 4px; }
.footer .footer-links a:hover { color: var(--blue); }
.footer .footer-social { display: flex; gap: 14px; font-size: 1.1rem; justify-content: center; }
.footer .footer-social a { color: #3a5a7a; opacity: 0.7; transition: 0.2s; }
.footer .footer-social a:hover { color: var(--blue); opacity: 1; }
.footer .footer-copy { font-family: var(--font-mono); font-size: 0.68rem; color: #5a7a9a; padding-top: 6px; border-top: 1px solid rgba(0, 0, 0, 0.03); width: 100%; text-align: center; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 900px) {
    .app { padding: 16px 18px 0; border-radius: 26px; }
    .header { margin: 0 -18px; padding: 12px 18px; border-radius: 26px 26px 0 0; }
    .dashboard-container { flex-direction: column; }
    .dashboard-sidebar { flex: 1; min-width: unset; }
    .dashboard-sidebar .sidebar-items { display: flex; flex-wrap: wrap; gap: 4px; }
    .dashboard-sidebar .sidebar-item { padding: 7px 14px; font-size: 0.8rem; border-radius: var(--radius-pill); }
    .dashboard-sidebar .sidebar-title { display: none; }
    .customer-dashboard { grid-template-columns: 1fr 1fr; }
    .admin-modules { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    /* Header actions collapse into a fixed bottom app-bar for thumb reach */
    .header { justify-content: space-between; }
    .header-actions {
        position: fixed; left: 12px; right: 12px; bottom: 12px;
        z-index: 200; background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
        border: 1px solid rgba(0, 0, 0, 0.05);
        padding: 6px; justify-content: space-around;
    }
    .header-actions button { flex-direction: column; gap: 3px; padding: 8px 10px; font-size: 0.62rem; flex: 1; }
    .header-actions button i { font-size: 1.05rem; }
    .app { min-height: unset; padding-bottom: 76px; }
    .search-section { border-radius: 28px; flex-direction: column; align-items: stretch; padding: 14px; }
    .filter-group { justify-content: stretch; flex-wrap: wrap; }
    .filter-group select { flex: 1; min-width: 80px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; }
}

@media (max-width: 500px) {
    .app { padding: 10px 12px 0; border-radius: 22px; }
    .header { margin: 0 -12px; padding: 10px 12px; border-radius: 22px 22px 0 0; }
    .brand h1 { font-size: 19px; }
    .brand-icon { width: 40px; height: 40px; }
    .brand-slogan { padding-left: 52px; font-size: 0.6rem; }
    .hero-section h2 { font-size: 1.35rem; }
    .hero-section { padding: 30px 16px 22px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .customer-dashboard { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .card-actions { flex-direction: column; align-items: stretch; }
    .buy-btn, .add-cart-btn { justify-content: center; }
    .login-card { padding: 24px 20px; }
    .footer .footer-links { gap: 10px; }
}
