:root {
    --primary: #4f46e5;
    --primary-dark: #312e81;
    --accent: #16a34a;
    --dark: #0f172a;
    --muted: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    color: var(--dark);
    transition: background 0.25s ease, color 0.25s ease;
}

body.dark-theme {
    background: linear-gradient(180deg, #020817 0%, #111827 100%);
    color: #e2e8f0;
    --bg: #020817;
    --card: #0f172a;
    --border: rgba(148, 163, 184, 0.18);
    --dark: #e2e8f0;
    --muted: #94a3b8;
    --shadow: 0 18px 48px rgba(2, 6, 23, 0.5);
}

body.dark-theme .navbar,
body.dark-theme .bg-white,
body.dark-theme .product-card,
body.dark-theme .auth-box,
body.dark-theme .stat-card,
body.dark-theme .product-hero,
body.dark-theme .table,
body.dark-theme .alert,
body.dark-theme .form-control,
body.dark-theme .form-select {
    background: var(--card) !important;
    color: var(--dark) !important;
    border-color: var(--border) !important;
}

body.dark-theme .text-muted,
body.dark-theme .text-dark,
body.dark-theme .footer-links a,
body.dark-theme .lead,
body.dark-theme .nav-link {
    color: #cbd5e1 !important;
}

.navbar {
    background: rgba(255,255,255,0.82) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148,163,184,0.15);
}

.navbar-brand {
    letter-spacing: -0.04em;
}

.nav-link {
    font-weight: 600;
    color: var(--dark);
}

.hero {
    background: linear-gradient(120deg, rgba(79,70,229,0.12) 0%, rgba(255,255,255,0.92) 45%, rgba(20,184,166,0.12) 100%);
    border-radius: 32px;
    padding: 64px 32px;
    margin: 32px auto 48px;
    max-width: 1280px;
    border: 1px solid rgba(79,70,229,0.08);
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
}

.hero .lead {
    font-size: 1.1rem;
    color: var(--muted);
}

.section-title {
    font-size: clamp(1.7rem, 2vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.stat-card,
.product-card,
.auth-box,
.product-hero,
.bg-white,
.table,
.alert {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 24px;
}

.product-card {
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(79,70,229,0.12);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, #e2e8f0, #c7d2fe);
}

.badge-soft {
    background: rgba(79,70,229,0.12);
    color: var(--primary);
}

.price {
    color: var(--primary-dark);
    font-size: 1.5rem;
    font-weight: 800;
}

.old-price {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 0.95rem;
}

.site-footer {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #dfe7f3;
}

.footer-links a {
    color: #dfe7f3;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

.auth-box {
    max-width: 520px;
    margin: 56px auto;
    padding: 32px;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.7);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    border: none;
}

.product-hero {
    padding: 24px;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.gallery-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.table td,
.table th {
    vertical-align: middle;
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 18px;
    }
}
