:root {
  --bg: #f5f7fb;
  --bg-soft: #eef2ff;
  --card: rgba(255,255,255,.82);
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, .10);
  --brand: #5b5dff;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --shadow: 0 20px 60px rgba(15, 23, 42, .10);
  --radius: 24px;
}

body.dark {
  --bg: #07111f;
  --bg-soft: #0d1629;
  --card: rgba(10, 16, 31, .82);
  --text: #e5eefc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, .15);
  --brand: #8b8dff;
  --brand-2: #a855f7;
  --brand-3: #22d3ee;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(91, 93, 255, .16), transparent 30%),
    radial-gradient(circle at top right, rgba(34, 211, 238, .14), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: white; box-shadow: var(--shadow);
}
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a { padding: 10px 14px; border-radius: 14px; color: var(--muted); transition: .2s ease; }
.nav-links a.active, .nav-links a:hover { background: rgba(91, 93, 255, .10); color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn, .btn-outline, .chip, .toggle, .nav-toggle {
  border: 0; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.btn:hover, .btn-outline:hover, .chip:hover { transform: translateY(-1px); }
.btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white;
  border-radius: 16px; padding: 12px 18px; box-shadow: var(--shadow);
}
.btn-outline, .toggle, .chip {
  background: color-mix(in srgb, var(--card) 90%, transparent);
  color: var(--text); border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px;
}
.chip { border-radius: 999px; padding: 10px 14px; }
.chip.active { background: rgba(91,93,255,.14); border-color: rgba(91,93,255,.28); }
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; }
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; }
.hero-card, .panel, .card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-card { padding: 34px; overflow: hidden; position: relative; }
.hero-card::after {
  content: ""; position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(91,93,255,.24), transparent 68%); pointer-events: none;
}
.kicker {
  display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 999px;
  background: rgba(91,93,255,.10); color: var(--text); font-size: 14px; font-weight: 600;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 4.9rem); line-height: .95; letter-spacing: -.05em; margin: 16px 0 14px; max-width: 11ch; }
.hero p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; max-width: 62ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 28px; }
.stat { background: rgba(255,255,255,.40); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.stat strong { display: block; font-size: 1.3rem; }
.stat span { color: var(--muted); font-size: .92rem; }
.hero-side { display: grid; gap: 14px; }
.panel { padding: 22px; }
.panel h3, .section-title h2 { margin: 0 0 8px; letter-spacing: -.03em; }
.panel p, .card p, .section-title p, .muted { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.metric { padding: 16px; border-radius: 18px; background: linear-gradient(180deg, rgba(91,93,255,.12), rgba(124,58,237,.08)); border: 1px solid var(--border); }
.metric strong { font-size: 1.6rem; display: block; }
.metric span { color: var(--muted); font-size: .92rem; }
.section { padding: 24px 0 56px; }
.section-title { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { padding: 20px; overflow: hidden; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 18px; background: linear-gradient(135deg, rgba(91,93,255,.18), rgba(34,211,238,.18));
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.product-media { border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: rgba(255,255,255,.4); aspect-ratio: 16/10; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery { display: flex; gap: 8px; overflow: auto; margin-top: 10px; padding-bottom: 4px; }
.product-gallery img { width: 78px; height: 52px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
label { font-size: .95rem; font-weight: 600; }
input, select, textarea {
  width: 100%; background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; outline: none;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(91,93,255,.55); box-shadow: 0 0 0 4px rgba(91,93,255,.10); }
.inline { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.helper { font-size: .92rem; color: var(--muted); line-height: 1.6; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  background: rgba(91,93,255,.10); color: var(--text); font-weight: 600; font-size: .90rem;
}
.footer { padding: 34px 0 48px; color: var(--muted); border-top: 1px solid var(--border); }
.toast {
  position: fixed; right: 18px; bottom: 18px; padding: 14px 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(14px); transition: .22s ease; z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(34,197,94,.35); }
.toast.error { border-color: rgba(239,68,68,.35); }
.loading { padding: 24px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }
.auth-box { max-width: 560px; margin: 0 auto; }
.admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.admin-nav { position: sticky; top: 92px; align-self: start; display: grid; gap: 10px; }
.admin-nav button {
  text-align: left; padding: 14px 16px; border-radius: 16px; background: transparent; color: var(--text); border: 1px solid var(--border);
}
.admin-nav button.active { background: rgba(91,93,255,.12); border-color: rgba(91,93,255,.28); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: .95rem; }
.pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(91,93,255,.10); font-size: .83rem; font-weight: 700; }
@media (max-width: 960px) {
  .hero-grid, .grid-3, .grid-4, .grid-2, .admin-layout { grid-template-columns: 1fr; }
  .section-title, .nav { align-items: start; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch; margin-top: 10px;
  }
  .nav-links.open { display: flex; }
  .nav { flex-wrap: wrap; padding: 14px 0; }
  .nav-toggle { display: inline-flex; }
  .nav-actions { margin-left: auto; }
  .admin-nav { position: static; }
}
@media (max-width: 640px) {
  .hero-card, .panel, .card { padding: 18px; }
  .hero-stats, .metrics, .inline { grid-template-columns: 1fr; }
  .hero h1 { max-width: 100%; }
  .nav-actions .btn-outline { display: none; }
}
