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




:root {
    --bg: #f0f4f8;
    --bg-soft: #e8edf3;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --surface-muted: #f5f7fa;
    --text: #1a2332;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-soft: rgba(79, 70, 229, 0.1);
    --secondary: #0ea5e9;
    --secondary-light: #e0f2fe;
    --accent: #8b5cf6;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-hover: #dc2626;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --info: #06b6d4;
    --info-light: #ecfeff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition: 0.2s ease;
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(79, 70, 229, 0.25);
    --sidebar-text: #cbd5e1;
    --sidebar-text-active: #ffffff;
}

html[data-theme="dark"] {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --surface: #1e293b;
    --surface-hover: #263347;
    --surface-muted: #1a2536;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: rgba(129,140,248,0.15);
    --primary-soft: rgba(129,140,248,0.1);
    --secondary: #38bdf8;
    --secondary-light: rgba(56,189,248,0.15);
    --accent: #a78bfa;
    --danger: #f87171;
    --danger-light: rgba(248,113,113,0.15);
    --danger-hover: #ef4444;
    --success: #34d399;
    --success-light: rgba(52,211,153,0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251,191,36,0.15);
    --info: #22d3ee;
    --info-light: rgba(34,211,238,0.15);
    --border: #334155;
    --border-light: #293548;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
    --sidebar-bg: #0f172a;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active: rgba(129,140,248,0.2);
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #f1f5f9;
}


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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; }

hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

::selection { background: var(--primary); color: #fff; }


.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 480px; margin: 0 auto; }
.section { padding: 3rem 0; }
.muted { background: var(--bg-soft); }
.mt-20 { margin-top: 1.25rem; }


h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.small, small { font-size: 0.8rem; color: var(--text-muted); }
.mono { font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 0.85em; }
.text-center { text-align: center; }


.promo-ribbon {
    padding: 0.6rem 1rem;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}
.promo-ribbon a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }


.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}
.brand-logo {
    max-height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
}
.admin-brand .brand-logo {
    max-height: 44px;
    max-width: 200px;
}
.brand-logo-dark { display: none; }
html[data-theme="dark"] .brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: block; }


.mobile-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links > a, .nav-links > .nav-dropdown > .nav-drop-btn {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-links > a:hover, .nav-drop-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}


.nav-dropdown { position: relative; }
.nav-drop-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.nav-drop-btn::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 2px;
    transition: transform var(--transition);
}
.nav-dropdown.open .nav-drop-btn::after { transform: rotate(180deg); }

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 120;
    padding: 0.4rem;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    transition: background var(--transition);
}
.nav-dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 0.6rem 1.15rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-small { padding: 0.4rem 0.85rem; font-size: 0.8rem; border-radius: var(--radius-full); }


.nav-links .btn.btn-small:not(.btn-outline) {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    font-weight: 600;
    letter-spacing: 0.2px;
}
.nav-links .btn.btn-small:not(.btn-outline):hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}
html[data-theme="dark"] .nav-links .btn.btn-small:not(.btn-outline) {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
html[data-theme="dark"] .nav-links .btn.btn-small:not(.btn-outline):hover {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    box-shadow: 0 4px 12px rgba(129, 140, 248, 0.4);
}
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: var(--radius-md); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn-outline:hover { background: var(--surface-hover); border-color: var(--primary); color: var(--primary); }

.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }

.btn-success { background: var(--success); }
.btn-success:hover { background: #059669; }

.btn-warning { background: var(--warning); color: #1a2332; }
.btn-warning:hover { background: #d97706; }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    box-shadow: none;
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }


.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1rem;
}
.theme-toggle:hover { background: var(--surface-hover); color: var(--text); border-color: var(--primary); }


.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(139,92,246,0.3), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(14,165,233,0.25), transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(236,72,153,0.15), transparent 40%);
    pointer-events: none;
}
.hero-bg::after {
    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='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 5rem 0 4.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.15);
    color: #c7d2fe;
    font-weight: 600;
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.1;
    margin: 1.25rem 0;
    color: #fff;
    letter-spacing: -0.02em;
}

.hero p { color: #c7d2fe; font-size: 1.1rem; line-height: 1.6; max-width: 560px; margin: 0 auto; }

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; justify-content: center; }
.hero-actions .btn { padding: 0.75rem 1.5rem; font-size: 0.95rem; border-radius: var(--radius-md); }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.3); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: #fff; }


.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}
.card-header h2 { margin: 0; white-space: nowrap; }


.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }

.stat-content h3 { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.25rem; }
.stat-content .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text); font-family: 'Space Grotesk', sans-serif; }
.stat-content .stat-label { font-size: 0.75rem; color: var(--text-light); margin-top: 0.15rem; }


.products-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.products-grid .card { min-height: auto; }

.product-card {
    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(--primary), var(--accent));
}
.product-card .badge { align-self: flex-start; margin-bottom: 0.5rem; }
.product-card h3 { margin-bottom: 0.35rem; }
.product-card p { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 0.75rem; flex: 1; }
.product-card .price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin: 0.25rem 0 1rem;
    font-family: 'Space Grotesk', sans-serif;
}


.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}
.feature-card .feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    background: var(--primary-light);
    color: var(--primary);
}
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.feature-card p { color: var(--text-muted); font-size: 0.875rem; }


.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-primary { background: rgba(99, 102, 241, 0.15); color: #4f46e5; }
.badge-dark { background: #111827; color: #ffffff; }
.badge-neutral { background: var(--surface-muted); color: var(--text-muted); }
html[data-theme="dark"] .badge-warning { color: var(--warning); }
html[data-theme="dark"] .badge-primary { background: rgba(129, 140, 248, 0.2); color: #a5b4fc; }
html[data-theme="dark"] .badge-dark { background: #000000; color: #f3f4f6; }


.stack { display: flex; flex-direction: column; gap: 0.85rem; }

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    transition: all var(--transition);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

input::placeholder, textarea::placeholder { color: var(--text-light); }

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.85rem;
    align-items: start;
}
.grid-form .btn { align-self: flex-end; }
.grid-form label textarea { min-height: 80px; }
.full-width { grid-column: 1 / -1; }


.coupon-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}
.coupon-form input { flex: 1; }


.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease;
}
.alert-error {
    background: var(--danger-light);
    border-color: rgba(239,68,68,0.3);
    color: var(--danger);
}
.alert-success {
    background: var(--success-light);
    border-color: rgba(16,185,129,0.3);
    color: var(--success);
}
.alert-warning {
    background: var(--warning-light);
    border-color: rgba(245,158,11,0.3);
    color: #92400e;
}
.alert-info {
    background: var(--info-light);
    border-color: rgba(6,182,212,0.3);
    color: var(--info);
}


.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 380px;
}
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }


.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

table { width: 100%; border-collapse: collapse; }

th {
    padding: 0.7rem 0.85rem;
    background: var(--surface-muted);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    vertical-align: middle;
}

tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--surface-hover); }


.checkout-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-muted);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.line-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.35rem 0;
}


.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding: 2.5rem 0;
    background: var(--surface);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-inner strong { font-family: 'Space Grotesk', sans-serif; }
.footer-inner p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }
.footer-inner small { color: var(--text-light); font-size: 0.8rem; }


.admin-shell {
    min-height: 100vh;
}


.admin-sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.admin-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 1.25rem 1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0.5rem;
}
.admin-brand .brand-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-section {
    padding: 0.5rem 0.75rem;
}
.sidebar-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    padding: 0.5rem 0.5rem 0.35rem;
    margin-top: 0.25rem;
}

.admin-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0.75rem;
    flex: 1;
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
}
.admin-sidebar nav a:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}
.admin-sidebar nav a.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}
.admin-sidebar nav a.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}

.admin-sidebar nav a .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0.7;
    flex-shrink: 0;
}
.admin-sidebar nav a:hover .nav-icon,
.admin-sidebar nav a.active .nav-icon { opacity: 1; }

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 0.5rem 0.75rem;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
}
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
}
.sidebar-footer a:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }


.admin-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-topbar h1 { font-size: 1.25rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-mobile-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem;
}


.admin-content {
    flex: 1;
    padding: 1.5rem;
}


.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-light); }


.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}


.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header h2 { margin: 0; }


.client-welcome {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.client-welcome h1 { color: #fff; font-size: 1.5rem; margin-bottom: 0.25rem; }
.client-welcome p { color: rgba(255,255,255,0.8); font-size: 0.95rem; }
.client-welcome .btn-group { margin-top: 1rem; }
.client-welcome .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.client-welcome .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; color: #fff; }

.client-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}


.message-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
}
.message-bubble.staff {
    background: var(--primary-light);
    border-color: rgba(79,70,229,0.2);
}
.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.message-header strong { font-size: 0.875rem; }
.message-header .small { font-size: 0.75rem; }
.message-bubble p { font-size: 0.875rem; line-height: 1.6; color: var(--text); }


.qr-thumb {
    display: block;
    width: 88px;
    height: 88px;
    object-fit: contain;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}


.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.active { display: flex; }

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    animation: scaleIn 0.2s ease;
}
.modal-box h3 { margin-bottom: 0.5rem; }
.modal-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }


.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 0.75rem; display: block; opacity: 0.4; }
.empty-state p { font-size: 0.95rem; margin-bottom: 1rem; }


@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}


.auth-page {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}
.auth-card h1 {
    text-align: center;
    margin-bottom: 0.25rem;
    font-size: 1.4rem;
}
.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.auth-card .auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #fff;
}
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.auth-links a { color: var(--primary); }
.auth-links a:hover { text-decoration: underline; }

.two-factor-totp-setup {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
}
.two-factor-qr {
    width: 172px;
    height: 172px;
    padding: 8px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.two-factor-qr img,
.two-factor-qr canvas {
    display: block;
    width: 156px;
    height: 156px;
}
.two-factor-secret {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.two-factor-secret code {
    display: block;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    word-break: break-all;
    font-family: Consolas, 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.ts3-pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
}
.ts3-pack-option {
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    font-size: 0.8rem;
    cursor: pointer;
}
.ts3-pack-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.ts3-pack-main-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: 0 0 auto;
}
.ts3-pack-label {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.ts3-pack-label small {
    color: var(--text-muted);
    font-size: 0.72rem;
}
.ts3-pack-tooltip {
    display: none;
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    z-index: 40;
    min-width: 210px;
    max-height: 340px;
    overflow: auto;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-lg);
}
.ts3-pack-option:hover .ts3-pack-tooltip {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.ts3-pack-tooltip strong {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.ts3-pack-tooltip span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    font-size: 0.78rem;
}
.ts3-pack-tooltip img,
.ts3-group-preview-strip img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.ts3-group-preview-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    max-width: 240px;
}
.ts3-group-preview-strip img {
    width: 22px;
    height: 22px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
}


.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.invoice-status { display: flex; align-items: center; gap: 0.5rem; }


.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.section-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); font-size: 1rem; }



.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}
.sidebar-overlay.active { display: block; }

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    .admin-sidebar.open { transform: translateX(0); }

    .admin-main { margin-left: 0; }

    .admin-mobile-toggle { display: flex; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }

    .ts3-pack-tooltip {
        top: calc(100% + 6px);
        left: 0;
        min-width: min(240px, 82vw);
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 0.75rem;
        z-index: 110;
    }
    .nav-links.open { display: flex; }
    .nav-links > a, .nav-links > .nav-dropdown > .nav-drop-btn { width: 100%; justify-content: flex-start; }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

    .hero-content { padding: 3rem 0 2.5rem; }
    .hero h1 { font-size: 1.75rem; }

    .card-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-form { grid-template-columns: 1fr; }

    .header-inner { position: relative; }

    .checkout-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .checkout-bar .btn { width: 100%; }

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

    .container { padding: 0 1rem; }
    .admin-content { padding: 1rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .client-stats { grid-template-columns: 1fr 1fr; }
    body { font-size: 13px; }
    .two-factor-totp-setup { flex-direction: column; align-items: stretch; }
    .two-factor-qr { margin: 0 auto; }
}


.cep-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius);
    margin-top: 0.35rem;
    animation: slideDown 0.2s ease;
}
.cep-loader-error { color: var(--danger); background: var(--danger-light); }
.cep-loader-success { color: var(--success); background: var(--success-light); }


@media print {
    .admin-sidebar, .admin-topbar, .site-header, .site-footer, .btn, .theme-toggle { display: none !important; }
    .admin-main { margin-left: 0 !important; }
    body { background: #fff; }
}
