/* ================== Gaya situs: landing, akun, editor, admin ================== */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #f1ece4;
  --ink: #23201c;
  --muted: #6f675c;
  --line: #e4ddd2;
  --accent: #2f5d50;
  --accent-2: #24483e;
  --accent-soft: #e3eee9;
  --gold: #b88a4a;
  --danger: #b4372c;
  --danger-soft: #f8e5e3;
  --warn: #9a6a12;
  --warn-soft: #fbf0d9;
  --ok: #2d7a4b;
  --ok-soft: #e1f2e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35,32,28,.04), 0 8px 24px rgba(35,32,28,.06);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130f; --surface: #1d1a16; --surface-2: #26221c; --ink: #efe9df; --muted: #a79d8f; --line: #353028;
    --accent: #6fb39c; --accent-2: #8fcab5; --accent-soft: #1f3530; --gold: #d3a965;
    --danger: #e0756a; --danger-soft: #3a1f1c; --warn: #e2b55a; --warn-soft: #362c17; --ok: #6fc28e; --ok-soft: #1d3324;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo img { display: block; height: 52px; width: auto; }
.logo { display: inline-flex; align-items: center; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); text-decoration: none; margin-right: auto; letter-spacing: .01em; }
.logo span { color: var(--gold); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.nav a:hover { background: var(--surface-2); }
.nav a.btn { color: #fff; padding: 6px 12px; }
.nav a.btn:hover { background: var(--accent-2); }
@media (max-width: 720px) { .nav .hide-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; min-height: 40px;
  font: 600 14px/1.2 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--accent); color: #fff; transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 6px 10px; min-height: 32px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
.page { padding: 28px 0 80px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; margin: 0; }
.stack > * + * { margin-top: 12px; }

/* ---------- form ---------- */
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input[type=text], input[type=password], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; font: 400 15px/1.4 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 42px;
}
textarea { min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fields .full { grid-column: 1 / -1; }
.error { color: var(--danger); font-size: 13px; min-height: 1em; margin: 0; }
.input-group { display: flex; align-items: stretch; }
.input-group .prefix { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; white-space: nowrap; }
.input-group input { border-radius: 0 10px 10px 0; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.draft { background: var(--surface-2); color: var(--muted); }
.badge.menunggu { background: var(--warn-soft); color: var(--warn); }
.badge.aktif { background: var(--ok-soft); color: var(--ok); }
.badge.nonaktif { background: var(--danger-soft); color: var(--danger); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: 600 14px var(--sans); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- stats ---------- */
.stat { padding: 16px 18px; }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,18,15,.5); display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box h2 { font-size: 20px; }

/* ---------- toast & banner ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 80; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: 14px; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }
.setup-banner { background: var(--warn-soft); color: var(--warn); padding: 10px 16px; font-size: 13px; text-align: center; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- template picker ---------- */
.tpl { position: relative; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; }
.tpl img { width: 100%; aspect-ratio: 9/16; object-fit: cover; object-position: top; }
.tpl .tpl-body { padding: 12px 14px; }
.tpl .tpl-body b { display: block; }
.tpl[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tpl-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpl-pick .tpl img { aspect-ratio: 9/16; }
.tpl-pick .tpl .tpl-body { padding: 8px 10px; font-size: 13px; }
@media (max-width: 480px) { .tpl-pick { grid-template-columns: 1fr 1fr; } }

/* ---------- invitation cards (akun) ---------- */
.inv-card { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.inv-card img { width: 96px; height: 120px; object-fit: cover; object-position: top; border-radius: 10px; }
.inv-card h3 { font-size: 18px; margin: 0 0 2px; }
.inv-card .link { font-size: 13px; word-break: break-all; }
@media (max-width: 480px) { .inv-card { grid-template-columns: 70px 1fr; } .inv-card img { width: 70px; height: 90px; } }

/* ---------- editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.editor-preview { position: sticky; top: 76px; }
.phone { width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 9/18.5; border-radius: 34px; border: 10px solid #1d1b18; background: #000; overflow: hidden; box-shadow: var(--shadow); }
.phone iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.editor details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.editor summary { padding: 14px 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.editor summary::-webkit-details-marker { display: none; }
.editor summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); }
.editor details[open] summary::after { content: "–"; }
.editor details > .body { padding: 0 18px 18px; }
.repeat-item { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; position: relative; }
.repeat-item .remove { position: absolute; top: 8px; right: 8px; }
.save-bar { position: sticky; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 0; margin-top: 16px; }
.mobile-switch { display: none; }
@media (max-width: 960px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .mobile-switch { display: flex; }
  .editor[data-view="form"] .editor-preview { display: none; }
  .editor[data-view="preview"] .editor-form { display: none; }
}

/* ---------- upload ---------- */
.photo-slot { position: relative; width: 110px; aspect-ratio: 3/4; border-radius: 12px; border: 1px dashed var(--line); background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; overflow: hidden; }
.photo-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-slot .x { position: absolute; top: 4px; right: 4px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-grid .photo-slot { width: 96px; aspect-ratio: 1; }

/* ================== LANDING ================== */
.hero { padding: 64px 0 40px; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-family: var(--serif); font-size: clamp(38px, 6vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero-phones { position: relative; height: 460px; }
.hero-phones img { position: absolute; width: 56%; aspect-ratio: 9/18; object-fit: cover; border-radius: 26px; border: 8px solid #1d1b18; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.hero-phones img:nth-child(1) { left: 0; top: 30px; transform: rotate(-6deg); }
.hero-phones img:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); }
@media (max-width: 820px) { .hero .container { grid-template-columns: 1fr; } .hero-phones { height: 360px; max-width: 360px; margin: 0 auto; width: 100%; } }
.section { padding: 56px 0; }
.section h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); font-weight: 600; text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.feature { padding: 18px; }
.feature b { display: block; margin-bottom: 4px; }
.price { display: flex; flex-direction: column; }
.price.popular { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.price .amount { font-size: 30px; font-weight: 800; margin: 6px 0 12px; }
.price ul { padding: 0; margin: 0 0 18px; list-style: none; flex: 1; }
.price li { padding: 6px 0 6px 26px; position: relative; border-bottom: 1px dashed var(--line); font-size: 14px; }
.price li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.steps li { list-style: none; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; }

/* editor: pilihan musik latar */
.musik-list { display: grid; gap: 8px; }
.musik-opsi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--surface); }
.musik-opsi.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.musik-opsi input { margin: 0; flex: none; }
.musik-teks { flex: 1; display: grid; gap: 2px; min-width: 0; }
