/* css/style.css — dipakai bersama oleh semua halaman Quantum */

:root{
  --bg:#0A0A12;
  --bg-2:#111120;
  --violet:#7C6FEF;
  --teal:#34E4C8;
  --gold:#F5B84C;
  --text:#F2F0FA;
  --muted:#9691B0;
  --glass:rgba(255,255,255,0.05);
  --glass-border:rgba(255,255,255,0.10);
  --danger:#F26D6D;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter', sans-serif;
  line-height:1.55;
}
h1,h2,h3{
  font-family:'Space Grotesk', sans-serif;
  margin:0;
  letter-spacing:-0.01em;
}
.mono{ font-family:'JetBrains Mono', monospace; letter-spacing:0.06em; text-transform:uppercase; }
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--teal); outline-offset:3px; }

.glass{
  background:var(--glass);
  border:1px solid var(--glass-border);
  border-radius:18px;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

/* ---------- Nav ---------- */
nav.topnav{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:1rem 1.4rem;
  background:rgba(10,10,18,0.72);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--glass-border);
}
.brand{ display:flex; align-items:center; gap:0.55rem; font-family:'Space Grotesk', sans-serif; font-weight:700; font-size:1.1rem; }
.brand .dot{
  width:9px; height:9px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #fff, var(--violet) 60%, var(--teal));
  box-shadow:0 0 12px var(--violet);
}

/* ---------- Auth pages (login/register) ---------- */
.auth-wrap{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:2rem 1.2rem;
  position:relative;
}
.auth-bg{ position:fixed; inset:0; object-fit:cover; width:100%; height:100%; z-index:-2; opacity:0.35; }
.auth-bg-overlay{ position:fixed; inset:0; background:linear-gradient(180deg, rgba(10,10,18,0.6), var(--bg) 85%); z-index:-1; }
.auth-card{ width:100%; max-width:380px; padding:2.2rem 1.8rem; }
.auth-card .brand{ justify-content:center; margin-bottom:1.6rem; }
.auth-card h1{ font-size:1.4rem; text-align:center; margin-bottom:0.4rem; }
.auth-card p.sub{ text-align:center; color:var(--muted); font-size:0.88rem; margin:0 0 1.6rem; }

.field{ margin-bottom:1rem; }
.field label{ display:block; font-size:0.82rem; color:var(--muted); margin-bottom:0.4rem; }
.field input, .field select, .field textarea{
  width:100%;
  font-family:'Inter', sans-serif;
  font-size:0.95rem;
  padding:0.75rem 0.9rem;
  border-radius:10px;
  border:1px solid var(--glass-border);
  background:rgba(255,255,255,0.04);
  color:var(--text);
}
.field input::placeholder{ color:#605C78; }
.field-check{ display:flex; align-items:center; gap:0.5rem; font-size:0.85rem; color:var(--muted); margin-bottom:1.1rem; }

.btn-primary, .btn-ghost, .btn-danger{
  font-weight:600; font-size:0.92rem;
  padding:0.8rem 1.3rem;
  border-radius:10px;
  border:none;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; gap:0.4rem;
}
.btn-primary{ width:100%; background:linear-gradient(135deg, var(--violet), #5A4FD1); color:#fff; box-shadow:0 10px 26px rgba(124,111,239,0.35); }
.btn-primary:disabled{ opacity:0.6; cursor:not-allowed; }
.btn-ghost{ border:1px solid var(--glass-border); color:var(--text); background:var(--glass); }
.btn-danger{ background:rgba(242,109,109,0.14); color:var(--danger); border:1px solid rgba(242,109,109,0.35); }

.form-msg{ font-size:0.85rem; padding:0.7rem 0.9rem; border-radius:9px; margin-bottom:1rem; display:none; }
.form-msg.error{ display:block; background:rgba(242,109,109,0.12); color:var(--danger); border:1px solid rgba(242,109,109,0.3); }
.form-msg.success{ display:block; background:rgba(52,228,200,0.12); color:var(--teal); border:1px solid rgba(52,228,200,0.3); }

.auth-switch{ text-align:center; font-size:0.85rem; color:var(--muted); margin-top:1.4rem; }
.auth-switch a{ color:var(--teal); font-weight:600; text-decoration:none; }

/* ---------- App shell (dashboard & admin) ---------- */
.app-shell{ display:flex; min-height:100vh; }
.sidebar{
  width:220px; flex-shrink:0;
  padding:1.6rem 1rem;
  border-right:1px solid var(--glass-border);
  position:sticky; top:0; height:100vh;
  display:flex; flex-direction:column; gap:0.3rem;
}
.sidebar .brand{ padding:0 0.6rem 1.4rem; }
.sidebar a{
  display:flex; align-items:center; gap:0.6rem;
  padding:0.7rem 0.8rem;
  border-radius:10px;
  font-size:0.9rem;
  color:var(--muted);
  text-decoration:none;
}
.sidebar a.active, .sidebar a:hover{ background:var(--glass); color:var(--text); }
.sidebar .sidebar-footer{ margin-top:auto; }
.main-area{ flex:1; min-width:0; padding:1.6rem 1.4rem 3rem; }

.mobile-topbar{ display:none; }

@media (max-width: 820px){
  .app-shell{ flex-direction:column; }
  .sidebar{
    position:fixed; inset:0 30% 0 0; z-index:60;
    transform:translateX(-100%);
    transition:transform 0.2s ease;
    background:var(--bg-2);
  }
  .sidebar.open{ transform:translateX(0); }
  .mobile-topbar{
    display:flex; align-items:center; justify-content:space-between;
    padding:1rem 1.2rem;
    border-bottom:1px solid var(--glass-border);
    position:sticky; top:0; z-index:50;
    background:rgba(10,10,18,0.85);
    backdrop-filter:blur(12px);
  }
  .mobile-topbar button{ background:none; border:none; color:var(--text); font-size:1.4rem; }
  .main-area{ padding:1.2rem 1rem 3rem; }
}

.page-head{ margin-bottom:1.6rem; }
.page-head h1{ font-size:1.5rem; }
.page-head p{ color:var(--muted); font-size:0.9rem; margin-top:0.3rem; }

.card{ padding:1.4rem 1.3rem; margin-bottom:1.2rem; }
.card h2{ font-size:1.05rem; margin-bottom:1rem; }

.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1rem; margin-bottom:1.6rem; }
.stat-card{ padding:1.2rem 1.3rem; }
.stat-card .label{ font-size:0.75rem; color:var(--muted); margin-bottom:0.4rem; }
.stat-card .value{ font-family:'Space Grotesk', sans-serif; font-size:1.6rem; font-weight:700; }

/* ---------- Produk grid (dashboard) ---------- */
.produk-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:1rem; }
.produk-card{ padding:1rem; }
.produk-card img{ width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; margin-bottom:0.7rem; background:rgba(255,255,255,0.04); }
.produk-card h3{ font-size:0.95rem; margin-bottom:0.2rem; }
.produk-card .harga{ color:var(--teal); font-weight:600; font-size:0.92rem; margin-bottom:0.7rem; }
.produk-card .row-btn{ display:flex; gap:0.5rem; }
.produk-card .row-btn button{ flex:1; font-size:0.78rem; padding:0.5rem; }
.produk-tambah{ display:flex; align-items:center; justify-content:center; flex-direction:column; gap:0.5rem; min-height:180px; color:var(--muted); cursor:pointer; border:1px dashed var(--glass-border); background:transparent; }

/* ---------- Tema picker ---------- */
.tema-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); gap:0.8rem; }
.tema-opsi{ padding:0.9rem; text-align:center; cursor:pointer; position:relative; }
.tema-opsi .swatch{ width:100%; height:48px; border-radius:8px; margin-bottom:0.6rem; }
.tema-opsi span{ font-size:0.8rem; }
.tema-opsi.selected{ border-color:var(--teal); }
.tema-opsi .lock{ position:absolute; top:0.5rem; right:0.5rem; font-size:0.8rem; }

/* ---------- Tabel (admin) ---------- */
table{ width:100%; border-collapse:collapse; font-size:0.88rem; }
th, td{ text-align:left; padding:0.7rem 0.6rem; border-bottom:1px solid var(--glass-border); }
th{ color:var(--muted); font-weight:600; font-size:0.76rem; text-transform:uppercase; letter-spacing:0.04em; }
.table-scroll{ overflow-x:auto; }
.pill{ font-size:0.72rem; padding:0.25rem 0.6rem; border-radius:999px; display:inline-block; }
.pill.aktif{ background:rgba(52,228,200,0.14); color:var(--teal); }
.pill.nonaktif{ background:rgba(150,145,176,0.14); color:var(--muted); }
.pill.diblokir{ background:rgba(242,109,109,0.14); color:var(--danger); }
.pill.premium{ background:rgba(245,184,76,0.14); color:var(--gold); }

/* ---------- Store publik ---------- */
.store-banner{ width:100%; height:180px; object-fit:cover; background:var(--glass); }
.store-head{ text-align:center; margin-top:-46px; padding:0 1.2rem 1.2rem; }
.store-logo{ width:88px; height:88px; border-radius:20px; object-fit:cover; border:3px solid var(--bg); background:var(--glass); }
.store-head h1{ font-size:1.4rem; margin-top:0.7rem; }
.store-head .desk{ color:var(--muted); font-size:0.9rem; max-width:420px; margin:0.5rem auto 0; }
.store-actions{ display:flex; gap:0.6rem; justify-content:center; flex-wrap:wrap; margin-top:1rem; }
.store-actions a{ font-size:0.85rem; padding:0.65rem 1.1rem; border-radius:999px; text-decoration:none; }
.store-meta{ max-width:420px; margin:1.4rem auto 0; padding:1rem 1.2rem; font-size:0.85rem; color:var(--muted); display:flex; flex-direction:column; gap:0.4rem; }
.store-produk-grid{ max-width:960px; margin:2rem auto; padding:0 1.2rem; display:grid; grid-template-columns:repeat(auto-fill, minmax(200px,1fr)); gap:1rem; }
.watermark{ text-align:center; padding:1.5rem; color:var(--muted); font-size:0.78rem; }
.watermark a{ color:var(--teal); text-decoration:none; }

.empty-state{ text-align:center; padding:2.5rem 1rem; color:var(--muted); font-size:0.9rem; }

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}
