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

:root {
  --bg: #14121f;
  --surface: #1e1b2e;
  --surface-2: #262239;
  --border: #322d47;
  --text: #f5f3fa;
  --text-muted: #9a94b3;
  --accent: #ff5d73;
  --accent-dim: #ff5d7333;
  --mint: #5eead4;
  --mint-dim: #5eead433;
  --warn: #f5b84e;
  --radius: 14px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: inherit; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---- Top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px;
}
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav-link { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.nav-link:hover { color: var(--text); }

/* ---- Hero: signature ticker ---- */
.hero { padding: 56px 0 36px; }
.hero h1 {
  font-family: var(--font-display); font-size: 40px; line-height: 1.08;
  letter-spacing: -0.03em; margin: 0 0 14px; max-width: 620px;
}
.hero p { color: var(--text-muted); max-width: 520px; margin: 0 0 28px; font-size: 15.5px; }
.hero .accent { color: var(--accent); }

.ticker-wrap {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; padding: 14px 0;
}
.ticker { display: flex; gap: 40px; white-space: nowrap; animation: ticker-scroll 22s linear infinite; width: max-content; }
.ticker span {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.ticker span b { color: var(--mint); font-weight: 600; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker { animation: none; } }

/* ---- Stats strip (homepage) ---- */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 10px; margin: 0 0 24px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat .num { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--mint); }
.stat .lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---- Features (homepage) ---- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; margin-bottom: 8px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.feature .feat-icon { font-size: 22px; display: block; margin-bottom: 8px; }
.feature b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.feature small { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; display: block; }

/* ---- How-to (homepage) ---- */
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; }
.howto-step { display: flex; gap: 12px; align-items: flex-start; }
.howto-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.howto-step b { display: block; font-size: 14px; margin-bottom: 2px; }
.howto-step small { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; display: block; }

/* ---- FAQ ---- */
.faq { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; background: var(--surface-2); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text); }
.faq p { margin: 10px 0 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.55; }

/* ---- Floating contact ---- */
.floating-contact {
  position: fixed; right: 18px; bottom: 18px; width: 52px; height: 52px;
  background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; text-decoration: none; box-shadow: 0 4px 16px rgba(255,93,115,.35); z-index: 100;
}
.floating-contact:hover { transform: scale(1.06); }

/* ---- Cards / sections ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.section-label {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--mint); margin-bottom: 10px; display: block;
}

/* ---- Category chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.chip {
  font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted); cursor: pointer;
}
.chip.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ---- Product cards (homepage) ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; margin: 18px 0; }
.product-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.product-card .p-name { font-size: 13px; font-weight: 600; line-height: 1.35; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .p-price { font-family: var(--font-mono); font-size: 16px; color: var(--mint); font-weight: 600; }
.product-card .p-price small { font-size: 11px; color: var(--text-muted); }
.product-card .p-meta { font-size: 11.5px; color: var(--text-muted); }
.product-card .order-btn { margin-top: auto; padding: 9px 14px; font-size: 13.5px; }

/* ---- Form ---- */
label { display: block; font-size: 13px; color: var(--text-muted); margin: 18px 0 6px; }
select, input[type=text], input[type=number], input[type=email], input[type=tel], textarea {
  width: 100%; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: var(--font-body); font-size: 14.5px;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 70px; }

.price-box {
  margin-top: 22px; padding: 18px 20px; border-radius: 12px;
  background: var(--mint-dim); border: 1px solid #5eead466; display: flex;
  align-items: center; justify-content: space-between;
}
.price-box .amount { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--mint); }

.payment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; margin-top: 8px; }
.payment-option {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px;
  padding: 12px; cursor: pointer; font-size: 13.5px; text-align: center;
}
.payment-option input { display: none; }
.payment-option.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #1a1a1a; font-weight: 600; font-family: var(--font-body);
  border: none; border-radius: 10px; padding: 14px 22px; font-size: 15px; cursor: pointer;
  width: 100%; margin-top: 24px; text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* ---- Status page ---- */
.status-hero { text-align: center; padding: 40px 0 10px; }
.invoice-code { font-family: var(--font-mono); font-size: 22px; color: var(--mint); letter-spacing: 0.02em; }
.stepper { display: flex; justify-content: space-between; margin: 34px 0; }
.step { flex: 1; text-align: center; position: relative; }
.step .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border);
  margin: 0 auto 8px;
}
.step.done .dot { background: var(--mint); border-color: var(--mint); }
.step.current .dot { background: var(--accent); border-color: var(--accent); }
.step small { color: var(--text-muted); font-size: 12px; }
.step.done small, .step.current small { color: var(--text); }
.step::after {
  content: ''; position: absolute; top: 6px; left: 50%; width: 100%; height: 2px; background: var(--border); z-index: -1;
}
.step:last-child::after { display: none; }
.step.done::after { background: var(--mint); }

.qr-box { text-align: center; padding: 24px 0; }
.qr-box img { width: 220px; height: 220px; border-radius: 12px; background: #fff; padding: 10px; }
.pay-code { font-family: var(--font-mono); font-size: 26px; letter-spacing: 0.08em; color: var(--accent); text-align: center; padding: 16px 0; }

.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--text-muted); }

footer { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 13px; }

/* ---- Admin ---- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--surface); border-right: 1px solid var(--border); padding: 24px 16px; }
.admin-sidebar a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--text-muted); text-decoration: none;
  font-size: 14px; margin-bottom: 4px;
}
.admin-sidebar a.active, .admin-sidebar a:hover { background: var(--surface-2); color: var(--text); }
.admin-main { flex: 1; padding: 32px 40px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 30px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.stat-card .num { font-family: var(--font-mono); font-size: 26px; color: var(--mint); }
.stat-card .lbl { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-family: var(--font-mono); }
.badge.menunggu_pembayaran { background: #f5b84e33; color: var(--warn); }
.badge.dibayar, .badge.diproses { background: var(--mint-dim); color: var(--mint); }
.badge.selesai { background: #5eead444; color: var(--mint); }
.badge.gagal, .badge.dibayar_perlu_diproses_manual { background: var(--accent-dim); color: var(--accent); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 340px; }
.error-text { color: var(--accent); font-size: 13.5px; margin-top: 10px; }
.small-form { display: flex; gap: 8px; margin-top: 8px; }
.small-form input { flex: 1; }
.small-form button { width: auto; margin-top: 0; padding: 10px 16px; }
