/* ═══════════════════════════════════════════════════════════════════════════
   BEOPT CONNECT — Main Stylesheet
   Professional Navy Blue + Royal Blue Theme
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');
@import url('themes.css');

/* ─── CSS Variables (Blue Navy — Default) ──────────────────────────────────── */
:root {
    --primary:       #1e40af;
    --primary-dark:  #1e3a8a;
    --primary-light: #3b82f6;
    --primary-glow:  rgba(59,130,246,0.25);
    --accent:        #06b6d4;
    --accent-light:  rgba(6,182,212,0.15);

    --bg-dark:       #0a1628;
    --bg-card:       rgba(255,255,255,0.04);
    --bg-glass:      rgba(255,255,255,0.08);
    --bg-white:      #ffffff;
    --bg-light:      #f0f4ff;
    --bg-subtle:     #e8eeff;

    --text-dark:     #0f172a;
    --text-body:     #334155;
    --text-muted:    #64748b;
    --text-light:    #94a3b8;
    --text-white:    #ffffff;

    --border:        rgba(30,64,175,0.15);
    --border-light:  rgba(59,130,246,0.1);
    --border-input:  #cbd5e1;

    --success:  #10b981;
    --warning:  #f59e0b;
    --danger:   #ef4444;
    --info:     #3b82f6;

    --shadow-sm:  0 1px 3px rgba(10,22,40,0.12), 0 1px 2px rgba(10,22,40,0.08);
    --shadow-md:  0 4px 20px rgba(10,22,40,0.15), 0 2px 8px rgba(30,64,175,0.1);
    --shadow-lg:  0 10px 40px rgba(10,22,40,0.2), 0 4px 16px rgba(30,64,175,0.12);
    --shadow-xl:  0 20px 60px rgba(10,22,40,0.25), 0 8px 24px rgba(30,64,175,0.15);
    --shadow-glow: 0 0 30px rgba(59,130,246,0.3);

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --radius-xl:  24px;
    --radius-full: 9999px;

    --font-body: 'Inter', -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Typography ───────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
    font-family: var(--font-display);
    color: var(--text-dark);
    line-height: 1.25;
    font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }

/* Grid */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 12px; }
.flex-col { display: flex; flex-direction: column; }

/* ─── Top Navigation (Customer) ────────────────────────────────────────────── */
.navbar {
    background: rgba(10,22,40,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(59,130,246,0.2);
    box-shadow: 0 2px 20px rgba(10,22,40,0.3);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.navbar-brand .brand-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.navbar-brand .brand-sub {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    line-height: 1;
    margin-top: 2px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-nav .nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-white);
    background: rgba(59,130,246,0.2);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-btn {
    position: relative;
    background: rgba(59,130,246,0.2);
    border: 1px solid rgba(59,130,246,0.4);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.cart-btn:hover {
    background: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.cart-count {
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* Mobile Menu Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Hero / Page Header ────────────────────────────────────────────────────── */
.page-hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 50%, var(--bg-dark) 100%);
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: bg-float 20s ease-in-out infinite;
}

@keyframes bg-float {
    0%,100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-10px) scale(1.02); }
}

.page-hero .hero-content { position: relative; z-index: 1; }

.page-hero h1 { color: var(--text-white); }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.4; }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: rgba(59,130,246,0.25);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body { padding: 24px; }
.card-footer {
    padding: 16px 24px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-light);
}

/* Glass Card */
.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    color: var(--text-white);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 0 var(--radius-lg) 0 80px;
    opacity: 0.1;
}

.stat-card.blue::before  { background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.amber::before { background: var(--warning); }
.stat-card.red::before   { background: var(--danger);  }

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-icon.blue  { background: rgba(30,64,175,0.1);  color: var(--primary); }
.stat-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.amber { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.red   { background: rgba(239,68,68,0.1);  color: var(--danger);  }
.stat-icon.cyan  { background: rgba(6,182,212,0.1);  color: var(--accent);  }

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-body);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn:hover::after { opacity: 1; }

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background: rgba(255,255,255,0.3);
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px rgba(30,64,175,0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30,64,175,0.5);
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    color: white;
    box-shadow: 0 4px 14px rgba(6,182,212,0.4);
}
.btn-accent:hover { transform: translateY(-2px); color: white; }

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 14px rgba(16,185,129,0.4);
}
.btn-success:hover { transform: translateY(-2px); color: white; }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}
.btn-danger:hover { transform: translateY(-2px); color: white; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(30,64,175,0.08);
    color: var(--primary);
    border-color: transparent;
}
.btn-ghost:hover { background: rgba(30,64,175,0.15); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 18px 40px; font-size: 1.1rem; border-radius: var(--radius-xl); }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; aspect-ratio: 1; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ─── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}
.form-label.required::after { content: ' *'; color: var(--danger); }

.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: var(--transition);
    outline: none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control:hover:not(:focus) { border-color: #94a3b8; }

.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(239,68,68,0.15); }

.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 4px; }
.form-hint  { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    cursor: pointer;
}

textarea.form-control { resize: vertical; min-height: 100px; }

.input-group {
    display: flex;
    align-items: stretch;
}
.input-group .form-control { border-radius: var(--radius-md) 0 0 var(--radius-md); border-right: 0; flex: 1; }
.input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.input-icon { position: relative; }
.input-icon .form-control { padding-left: 42px; }
.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ─── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table thead th {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 14px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-body);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { background: white; transition: background 0.15s; }
.table tbody tr:nth-child(even) { background: var(--bg-light); }
.table tbody tr:hover { background: rgba(59,130,246,0.05); }

/* ─── Badges / Tags ──────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-primary { background: rgba(30,64,175,0.12); color: var(--primary); }
.badge-success { background: rgba(16,185,129,0.12); color: #047857; }
.badge-warning { background: rgba(245,158,11,0.12); color: #b45309; }
.badge-danger  { background: rgba(239,68,68,0.12);  color: #b91c1c; }
.badge-info    { background: rgba(59,130,246,0.12);  color: #1d4ed8; }
.badge-muted   { background: rgba(100,116,139,0.12); color: var(--text-muted); }

/* Status badge dot */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.status-dot.green  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.status-dot.red    { background: var(--danger);  box-shadow: 0 0 6px var(--danger);  }
.status-dot.blue   { background: var(--primary-light); box-shadow: 0 0 6px var(--primary-light); }
.status-dot.gray   { background: var(--text-light); }

/* ─── Product Catalogue Cards ─────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 24px 0;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.3);
}

.product-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-light);
}

.product-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-category-tag {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(10,22,40,0.75);
    backdrop-filter: blur(8px);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-name { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 4px; }
.product-sku  { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 12px; }

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--primary);
}

.product-price-orig {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-price-discount {
    background: rgba(16,185,129,0.12);
    color: #047857;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.qty-control {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
}

.qty-btn {
    width: 36px; height: 36px;
    background: var(--bg-light);
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.qty-btn:hover { background: var(--primary); color: white; }

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    padding: 0 4px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    height: 36px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e3a8a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30,64,175,0.4);
}

.add-to-cart-btn.added {
    background: linear-gradient(135deg, var(--success), #059669);
}

/* ─── Cart Sidebar / Drawer ──────────────────────────────────────────────────── */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,0.6);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed;
    top: 0; right: -440px;
    width: min(440px, 100vw);
    height: 100vh;
    background: var(--bg-white);
    z-index: 1101;
    box-shadow: -10px 0 40px rgba(10,22,40,0.25);
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open { right: 0; }

.cart-drawer-header {
    padding: 20px 24px;
    background: var(--bg-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.cart-drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    flex-shrink: 0;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.cart-item-img {
    width: 64px; height: 64px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name  { font-weight: 600; font-size: 0.875rem; color: var(--text-dark); margin-bottom: 4px; }
.cart-item-price { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-total { font-size: 1rem; font-weight: 700; color: var(--primary); }

.cart-total-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 0.875rem; }
.cart-grand-total { font-size: 1.25rem; font-weight: 800; color: var(--primary); }

/* ─── Payment Options ─────────────────────────────────────────────────────────── */
.payment-option {
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
}

.payment-option:hover { border-color: var(--primary-light); background: rgba(59,130,246,0.03); }
.payment-option.selected {
    border-color: var(--primary);
    background: rgba(30,64,175,0.06);
    box-shadow: 0 0 0 4px rgba(30,64,175,0.08);
}

.payment-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.payment-radio {
    width: 20px; height: 20px;
    border: 2px solid var(--border-input);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.payment-option.selected .payment-radio {
    border-color: var(--primary);
}

.payment-option.selected .payment-radio::after {
    content: '';
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

/* ─── Order Receipt / Success ─────────────────────────────────────────────────── */
.receipt-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.receipt-header {
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-dark));
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
}

.receipt-header .success-icon {
    width: 80px; height: 80px;
    background: rgba(16,185,129,0.2);
    border: 3px solid var(--success);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    animation: success-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes success-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.receipt-body { padding: 32px; }
.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-light);
}
.receipt-row:last-child { border: none; }

/* ─── Toaster Notifications ───────────────────────────────────────────────────── */
.toaster-container {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 360px;
    width: 100%;
}

.toast {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(10,22,40,0.2), 0 2px 8px rgba(10,22,40,0.1);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: all;
    border-left: 4px solid var(--info);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    overflow: hidden;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(120%); opacity: 0; transition-duration: 0.3s; }

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }

.toast-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.toast.success .toast-icon { background: rgba(16,185,129,0.1); color: var(--success); }
.toast.error   .toast-icon { background: rgba(239,68,68,0.1);  color: var(--danger); }
.toast.warning .toast-icon { background: rgba(245,158,11,0.1); color: var(--warning); }
.toast.info    .toast-icon { background: rgba(59,130,246,0.1); color: var(--info); }

.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 700; font-size: 0.875rem; color: var(--text-dark); margin-bottom: 2px; }
.toast-msg   { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.toast-close {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    font-size: 16px; line-height: 1;
    padding: 0;
    transition: color 0.15s;
    flex-shrink: 0;
}
.toast-close:hover { color: var(--text-dark); }

.toast-progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: currentColor;
    animation: toast-progress var(--duration, 4s) linear forwards;
}
.toast.success .toast-progress { color: var(--success); }
.toast.error   .toast-progress { color: var(--danger); }
.toast.warning .toast-progress { color: var(--warning); }
.toast.info    .toast-progress { color: var(--info); }

@keyframes toast-progress { from { width: 100%; } to { width: 0%; } }

/* ─── Page Loader / Skeleton ──────────────────────────────────────────────────── */
#page-loader {
    position: fixed; inset: 0;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.4s ease;
}

#page-loader.hidden { opacity: 0; pointer-events: none; }

.loader-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    display: flex; align-items: center; gap: 12px;
}

.loader-spinner {
    width: 48px; height: 48px;
    border: 3px solid rgba(59,130,246,0.2);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── QR Code Display ─────────────────────────────────────────────────────────── */
.qr-display {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 24px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.qr-display img {
    width: 200px; height: 200px;
    border: 4px solid var(--bg-dark);
    border-radius: var(--radius-md);
    padding: 8px;
    background: white;
}

.qr-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.pagination {
    display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 24px;
}

.page-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: white;
    color: var(--text-body);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
}

.page-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn.disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* ─── Mobile Sidebar ─────────────────────────────────────────────────────────── */
.mobile-nav {
    position: fixed;
    top: 64px; left: -280px;
    width: 280px;
    height: calc(100vh - 64px);
    background: var(--bg-dark);
    z-index: 900;
    overflow-y: auto;
    transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
    padding: 20px 0;
    border-right: 1px solid rgba(59,130,246,0.2);
}

.mobile-nav.open { left: 0; }

.mobile-nav .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.mobile-nav .nav-item:hover,
.mobile-nav .nav-item.active {
    color: white;
    background: rgba(59,130,246,0.1);
    border-left-color: var(--primary-light);
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 24px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(59,130,246,0.2);
    margin-top: auto;
}

.footer a { color: var(--accent); }
.footer a:hover { color: white; }

/* ─── Upload Zone ─────────────────────────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border-input);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-light);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-light);
    background: rgba(59,130,246,0.04);
}

.upload-zone .upload-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.upload-zone p { color: var(--text-muted); font-size: 0.875rem; }

/* ─── Theme Switcher ─────────────────────────────────────────────────────────── */
.theme-switcher {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 800;
}

.theme-toggle-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}

.theme-toggle-btn:hover { transform: rotate(30deg) scale(1.1); }

.theme-panel {
    position: absolute;
    bottom: 60px; right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 16px;
    display: none;
    min-width: 180px;
    border: 1px solid var(--border);
}

.theme-panel.open { display: block; animation: slide-up 0.3s ease; }

@keyframes slide-up {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.theme-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-option:hover { background: var(--bg-light); }
.theme-option.active { background: rgba(30,64,175,0.08); color: var(--primary); }

.theme-dot {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* ─── AJAX Page Transition ────────────────────────────────────────────────────── */
.page-content {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.page-content.fading { opacity: 0; }

/* ─── Utility Classes ─────────────────────────────────────────────────────────── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 32px; }
.p-4  { padding: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.1rem; }
.text-xl     { font-size: 1.25rem; }
.text-muted  { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-primary { color: var(--primary); }
.font-bold    { font-weight: 700; }
.font-semi    { font-weight: 600; }

.w-full { width: 100%; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

.divider { border: none; border-top: 1px solid var(--border-light); margin: 24px 0; }

/* ─── Scroll Animations ───────────────────────────────────────────────────────── */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-in.visible { opacity: 1; transform: translateY(0); }

/* ─── Empty State ─────────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 60px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { color: var(--text-body); margin-bottom: 8px; }
.empty-state p  { font-size: 0.875rem; margin-bottom: 20px; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .hamburger  { display: flex; }

    .section { padding: 40px 0; }

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }

    .form-row { grid-template-columns: 1fr; }

    .stat-grid { grid-template-columns: 1fr 1fr; }

    .table-wrapper { font-size: 0.8rem; }

    .toaster-container { left: 12px; right: 12px; max-width: none; top: 70px; }

    .receipt-card { border-radius: var(--radius-lg); }
    .receipt-body { padding: 20px; }
    .receipt-header { padding: 28px 20px; }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .theme-switcher { bottom: 16px; right: 16px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-price { font-size: 1rem; }
    .container { padding: 0 14px; }
}

/* ─── Print Styles ────────────────────────────────────────────────────────────── */
@media print {
    .navbar, .theme-switcher, .cart-btn, .mobile-nav, .footer { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
