/* ==========================================================================
   Invois — CSS sendiri (tanpa Tailwind)
   Struktur: 1. Tokens  2. Asas  3. Layout  4. Komponen  5. Halaman  6. Utiliti
   ========================================================================== */

/* 1. TOKENS --------------------------------------------------------------- */
:root {
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --paper: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #EEF0F6;
  --ink: #14162B;
  --ink-2: #464A63;
  --ink-3: #7C8199;
  --line: #E2E5EE;
  --line-strong: #CDD2DF;

  --accent: #4F46E5;
  --accent-ink: #3730A3;
  --accent-soft: #ECEBFF;

  --ok: #1F7A3D;      --ok-soft: #E5F4EA;
  --warn: #9A5B00;    --warn-soft: #FFF2DC;
  --danger: #B42318;  --danger-soft: #FDECEA;
  --info: #2556C4;    --info-soft: #E8EFFD;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(23, 24, 28, .05);
  --shadow: 0 1px 2px rgba(23, 24, 28, .04), 0 8px 24px rgba(23, 24, 28, .06);

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --sidebar: 248px;
}

/* 2. ASAS ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 var(--s-3); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0 0 var(--s-3); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; white-space: nowrap; }
::selection { background: var(--accent-soft); }

/* Ikon SVG (saiz lalai) */
svg[viewBox="0 0 24 24"] { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.icon-16, .alert svg, .eyebrow svg, .dropdown-menu svg, .btn-sm svg { width: 16px; height: 16px; }

/* 3. LAYOUT --------------------------------------------------------------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--s-5); }

/* Aplikasi: sidebar + kandungan */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line);
  padding: var(--s-5) var(--s-4); display: flex; flex-direction: column; gap: var(--s-5);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -0.03em; }
.brand:hover { color: var(--ink); }
.brand-logo { width: 32px; height: 32px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: var(--s-3) var(--s-3) var(--s-1); }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px var(--s-3);
  border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav svg { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-2); }

.company-switch { position: relative; }
.company-switch > summary {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius);
  padding: 10px var(--s-3); font: inherit; cursor: pointer; color: var(--ink);
}
.company-switch > summary svg { width: 16px; height: 16px; flex: none; }
.company-switch .avatar { width: 28px; height: 28px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; overflow: hidden; }
.company-switch .avatar img { width: 100%; height: 100%; object-fit: cover; }
.company-switch .name { display: block; }
.company-switch .name { font-weight: 600; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); background: rgba(246, 247, 251, .85);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
.content { padding: var(--s-6); max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-3); margin: 4px 0 0; }
.menu-toggle { display: none; }

/* 4. KOMPONEN ------------------------------------------------------------- */

/* Butang */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
  text-decoration: none; line-height: 1.3;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.inline { display: inline; }

/* Kad */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: var(--s-5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.card + .card { margin-top: var(--s-5); }

/* Grid */
.grid { display: grid; gap: var(--s-5); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }

/* Statistik */
.stat { padding: var(--s-5); }
.stat-label { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; }
.stat-value small { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-right: 4px; }
.stat-foot { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* Borang */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 90px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2380838C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.error { color: var(--danger); font-size: 12px; font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.form-row { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: var(--s-2); justify-content: flex-end; padding-top: var(--s-4); border-top: 1px solid var(--line); margin-top: var(--s-4); }
.input-color { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }

/* Jadual */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 12px var(--s-4); border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.table td { padding: 13px var(--s-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.row-link { cursor: pointer; }
.table tbody tr.row-link:hover td { background: var(--paper); }
.table .r, .r { text-align: right; }
.table .muted { color: var(--ink-3); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty { text-align: center; padding: var(--s-7) var(--s-5); color: var(--ink-3); }
.empty h3 { color: var(--ink); }

/* Lencana status */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-draft { background: var(--surface-2); color: var(--ink-2); }
.badge-sent { background: var(--info-soft); color: var(--info); }
.badge-partial { background: var(--warn-soft); color: var(--warn); }
.badge-paid, .badge-accepted { background: var(--ok-soft); color: var(--ok); }
.badge-overdue, .badge-rejected, .badge-failed { background: var(--danger-soft); color: var(--danger); }
.badge-void, .badge-expired, .badge-cancelled { background: var(--surface-2); color: var(--ink-3); text-decoration: line-through; }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-active { background: var(--ok-soft); color: var(--ok); }

/* Mesej */
.alert { padding: 12px var(--s-4); border-radius: var(--radius); margin-bottom: var(--s-5); font-size: 14px; border: 1px solid transparent; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: #CBE8D4; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: #F6CFCB; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: #CEDCF8; }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: #F5DDB0; }

/* Penapis / bar carian */
.toolbar { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.toolbar .input { max-width: 280px; }
.toolbar .select { max-width: 180px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a.active { background: var(--ink); color: #fff; }

/* Dropdown & modal (native <details> / <dialog>) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 6px; display: flex; flex-direction: column;
}
.dropdown-menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px;
  border-radius: var(--radius-sm); color: var(--ink); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 4px 0; }
.dropdown-menu .danger { color: var(--danger); }

dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow); width: min(520px, calc(100vw - 32px)); color: var(--ink); }
dialog.modal::backdrop { background: rgba(23, 24, 28, .45); }
.modal-head { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; }
.modal-body { padding: var(--s-5); }
.modal-foot { padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s-2); background: var(--paper); }

/* Senarai definisi */
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px var(--s-4); font-size: 14px; margin: 0; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 500; }

/* Bar penggunaan */
.meter { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.full > span { background: var(--danger); }
.usage-row { margin-bottom: var(--s-4); font-size: 14px; }
.usage-row .top { display: flex; justify-content: space-between; }

/* Paginasi */
.pagination { display: flex; gap: 4px; justify-content: center; padding: var(--s-4); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 10px; border-radius: var(--radius-sm); font-size: 14px; color: var(--ink-2); border: 1px solid var(--line); background: var(--surface); }
.pagination a:hover { background: var(--surface-2); }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .disabled { opacity: .4; }

/* 5. HALAMAN -------------------------------------------------------------- */

/* Borang dokumen: jadual item */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.items-table td { padding: 8px 6px; vertical-align: top; border-bottom: 1px dashed var(--line); }
.items-table .input, .items-table .select { padding: 8px 10px; }
.items-table .col-desc { width: 40%; }
.items-table .col-qty { width: 9%; }
.items-table .col-price { width: 14%; }
.items-table .col-disc { width: 11%; }
.items-table .col-tax { width: 10%; }
.items-table .col-total { width: 12%; text-align: right; }
.items-table .col-del { width: 4%; }
.items-table .line-total { padding-top: 10px; font-weight: 600; }
.items-table .details { margin-top: 6px; font-size: 13px; min-height: 0; }
.btn-remove { width: 32px; height: 36px; border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: var(--radius-sm); font-size: 20px; line-height: 1; }
.btn-remove:hover { background: var(--danger-soft); color: var(--danger); }
.totals { margin-left: auto; width: min(340px, 100%); font-size: 14px; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .row.grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 700; }
.totals .row.muted { color: var(--ink-3); }

/* Dokumen (paparan dalam app & awam) */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 48px; position: relative; overflow: hidden; }
.doc::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--doc-accent, var(--accent)); }
.doc-head { display: flex; justify-content: space-between; gap: var(--s-5); margin-bottom: 36px; }
.doc-logo { max-height: 64px; max-width: 200px; object-fit: contain; margin-bottom: var(--s-3); }
.doc-company { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.doc-company strong { font-size: 16px; color: var(--ink); display: block; margin-bottom: 2px; }
.doc-title { text-align: right; }
.doc-title h2 { font-size: 30px; letter-spacing: -0.03em; margin: 0 0 4px; color: var(--doc-accent, var(--accent)); text-transform: uppercase; }
.doc-title .number { font-family: var(--font-mono); font-size: 15px; color: var(--ink-2); }
.doc-meta { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--s-5); margin-bottom: 32px; padding: var(--s-4) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; }
.doc-meta .k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin-bottom: 4px; }
.doc-meta .kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; justify-content: end; text-align: right; }
.doc-meta .kv span:nth-child(odd) { color: var(--ink-3); }
.doc-lines { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: var(--s-5); }
.doc-lines th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 10px 8px; border-bottom: 2px solid var(--ink); }
.doc-lines td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-lines .details { color: var(--ink-3); font-size: 13px; white-space: pre-line; margin-top: 2px; }
.doc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); margin-top: var(--s-6); font-size: 13px; color: var(--ink-2); }
.doc-foot h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 6px; }
.doc-foot p { white-space: pre-line; }
.doc-stamp { position: absolute; top: 90px; right: -40px; transform: rotate(18deg); border: 3px solid currentColor; padding: 6px 60px; font-weight: 800; font-size: 20px; letter-spacing: .1em; opacity: .18; }
.doc-stamp.paid { color: var(--ok); } .doc-stamp.void { color: var(--danger); }
.public-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin: var(--s-5) 0; flex-wrap: wrap; }
.powered { text-align: center; color: var(--ink-3); font-size: 13px; margin: var(--s-6) 0; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: #E8E9F5; padding: var(--s-7); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side .brand { color: #fff; }
.auth-side blockquote { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; max-width: 440px; }
.auth-side .paper { position: absolute; right: -60px; bottom: -40px; width: 320px; height: 400px; background: var(--paper); border-radius: 14px; transform: rotate(-8deg); opacity: .08; }
.auth-main { display: grid; place-items: center; padding: var(--s-6); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { margin-bottom: 6px; }
.auth-box .sub { color: var(--ink-3); margin-bottom: var(--s-5); }
.divider { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-3); font-size: 13px; margin: var(--s-4) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: var(--surface); }
.btn-google img, .btn-google svg { width: 18px; height: 18px; }

/* Laman produk */
.site-nav { display: flex; align-items: center; justify-content: space-between; padding: var(--s-5) 0; }
.site-nav nav { display: flex; gap: var(--s-5); align-items: center; }
.site-nav nav a:not(.btn) { color: var(--ink-2); font-weight: 500; }
.site-nav nav a:not(.btn):hover { color: var(--ink); }
.hero { padding: var(--s-8) 0 var(--s-7); display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s-7); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: var(--s-4); }
.hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.04em; margin-bottom: var(--s-4); }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 520px; margin-bottom: var(--s-5); }
.hero-note { font-size: 13px; color: var(--ink-3); margin-top: var(--s-3); }
.hero-art { position: relative; height: 440px; }
.hero-art .sheet { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 24px; }
.hero-art .sheet-1 { inset: 20px 40px 30px 0; transform: rotate(-3deg); }
.hero-art .sheet-2 { inset: 0 0 60px 60px; transform: rotate(2deg); }
.sheet .bar { height: 10px; border-radius: 4px; background: var(--surface-2); margin-bottom: 10px; }
.sheet .bar.accent { background: var(--accent); width: 40%; height: 14px; margin-bottom: 18px; }
.sheet .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.sheet .total { display: flex; justify-content: space-between; padding-top: 14px; font-weight: 800; font-size: 20px; }
.sheet .stamp { position: absolute; right: 28px; bottom: 28px; transform: rotate(-12deg); border: 3px solid var(--ok); color: var(--ok); font-weight: 800; padding: 4px 16px; letter-spacing: .1em; border-radius: 6px; opacity: .85; }
.section { padding: var(--s-8) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--s-7); }
.section-head h2 { font-size: 34px; letter-spacing: -0.03em; }
.section-head p { color: var(--ink-2); font-size: 17px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.feature { padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: var(--s-4); }
.feature .ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--ink-2); font-size: 14px; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); counter-reset: step; }
.step { position: relative; padding-top: var(--s-6); }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 0; font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.step h3 { font-size: 18px; }
.step p { color: var(--ink-2); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-5); max-width: 820px; margin: 0 auto; }
.plans-3 { max-width: 1080px; }
.plans-4 { max-width: 1140px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-6); display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--ink); position: relative; }
.plan-badge { position: absolute; top: -12px; left: 24px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin-bottom: 4px; }
.plan .tagline { color: var(--ink-3); font-size: 14px; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: var(--s-4) 0 2px; }
.plan .price small { font-size: 15px; color: var(--ink-3); font-weight: 600; }
.plan .yearly { font-size: 13px; color: var(--ink-3); margin-bottom: var(--s-5); min-height: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 var(--s-5); display: flex; flex-direction: column; gap: 10px; font-size: 14px; flex: 1; }
.plan li { display: flex; gap: 10px; }
.plan .price .cur { font-size: 18px; color: var(--ink-2); font-weight: 700; margin-right: 2px; vertical-align: 14px; }
.plan ul:not(.plan-features) li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233730A3' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center no-repeat; }
.plan.current { border-color: var(--accent); }
.interval-toggle { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: var(--s-5); }
.interval-toggle label { padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.interval-toggle input { display: none; }
.interval-toggle input:checked + span { color: var(--ink); }
.interval-toggle label:has(input:checked) { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink); }
.cta { background: var(--ink); color: #E8E9F5; border-radius: 24px; padding: var(--s-7); text-align: center; }
.cta h2 { color: #fff; font-size: 32px; }
.cta p { color: #B3B6CC; font-size: 17px; margin-bottom: var(--s-5); }
.site-foot { border-top: 1px solid var(--line); padding: var(--s-6) 0; color: var(--ink-3); font-size: 14px; margin-top: var(--s-7); }
.site-foot .container { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.site-foot a { color: var(--ink-2); margin-left: var(--s-4); }
.prose { max-width: 720px; margin: 0 auto; padding: var(--s-7) 0; }
.prose h1 { font-size: 36px; }
.prose h2 { margin-top: var(--s-6); }
.prose p, .prose li { color: var(--ink-2); }

/* ---- Laman produk (struktur ala Rekon) ---- */
body.site { background: var(--paper); }
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(246, 247, 251, .88); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.site-header .site-nav { padding: 14px var(--s-5); gap: var(--s-5); }
.site-nav nav { flex: 1; justify-content: center; }
.nav-link { color: var(--ink-2); font-weight: 500; font-size: 15px; }
.nav-link:hover { color: var(--ink); }
.center { text-align: center; }
.page-title { font-size: clamp(34px, 4.5vw, 50px) !important; letter-spacing: -0.035em; }

.hero-wrap { padding-top: var(--s-6); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: var(--s-5); }
.pill b { background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.reassure { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: var(--s-5); font-size: 14px; color: var(--ink-2); }
.reassure span { display: inline-flex; align-items: center; gap: 6px; }
.reassure svg { width: 16px; height: 16px; color: var(--ok); }
.hero-chip { position: absolute; left: 10px; bottom: 6px; display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); }
.hero-chip svg { width: 16px; height: 16px; color: #A5B4FC; }
.btn-google { background: var(--surface); }

.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); padding: var(--s-5) 0; }
.strip .container { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.strip p { margin: 0; color: var(--ink-3); font-size: 14px; }
.strip ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; font-weight: 700; color: var(--ink-2); letter-spacing: -0.01em; }

.section-head.left { text-align: left; margin-left: 0; max-width: 720px; }
.section-head .eyebrow { margin-bottom: var(--s-3); }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #E8E9F5; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { background: rgba(255,255,255,.1); color: #C7D2FE; }
.section-dark .step p { color: #B3B6CC; }
.section-dark .step::before { color: #A5B4FC; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.compare-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--s-6); }
.compare-card.after { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%); }
.compare-card h3 { font-size: 18px; margin-bottom: var(--s-4); }
.compare-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.compare-card li { display: flex; gap: 12px; color: var(--ink-2); font-size: 15px; }
.compare-card .x, .compare-card .v { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.compare-card .x { background: var(--danger-soft); color: var(--danger); }
.compare-card .v { background: var(--accent); color: #fff; }
.compare-card .x svg, .compare-card .v svg { width: 14px; height: 14px; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.trust .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; margin-bottom: var(--s-4); }
.trust h3 { font-size: 17px; }
.trust p { color: var(--ink-2); font-size: 14px; margin: 0; }

.billing-toggle { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-top: var(--s-4); }
.billing-toggle button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px; color: var(--ink-2); padding: 8px 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.billing-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.billing-toggle small { background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

.plan-features { list-style: none; padding: var(--s-5) 0 0 !important; margin: var(--s-5) 0 0 !important; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; }
.plan-features li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.plan-features li.off { color: var(--ink-3); }
.plan-features li.off svg { color: var(--line-strong); }
.plan .btn-block { margin-top: auto; }
.plan .yearly { margin-bottom: var(--s-4); }

.compare-table-wrap { margin-top: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th { text-align: center; padding: 16px 12px; font-size: 15px; border-bottom: 1px solid var(--line); }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; padding-left: var(--s-5); }
.compare-table td { text-align: center; padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.compare-table tbody tr:hover td { background: var(--paper); }
.compare-table .yes svg { width: 18px; height: 18px; color: var(--accent); }
.compare-table .no { color: var(--line-strong); }
.compare-table .price-row td { border-bottom: 0; font-size: 16px; color: var(--ink); }

.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 var(--s-5); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; gap: var(--s-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent); font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); margin: 0 0 18px; }

.cta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); text-align: left; flex-wrap: wrap; }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0 !important; }
.btn-light { background: #fff; border-color: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); color: var(--ink); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.08); color: #fff; }

.site-foot { background: var(--surface); }
.foot-grid { display: grid !important; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-6); padding-bottom: var(--s-6); }
.foot-grid .brand { margin-left: 0; }
.foot-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: var(--s-3); }
.foot-grid a:not(.brand) { display: block; margin: 0 0 8px !important; color: var(--ink-2); font-size: 14px; }
.foot-grid a:not(.brand):hover { color: var(--ink); }
.foot-bottom { border-top: 1px solid var(--line); padding-top: var(--s-4); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; font-size: 13px; }

.legal { max-width: 760px; padding: var(--s-7) var(--s-5); }
.legal h1 { font-size: 38px; letter-spacing: -0.03em; }
.legal h2 { font-size: 19px; margin-top: var(--s-6); }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.operator { margin-top: var(--s-7); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.operator h2 { margin: 0 0 var(--s-3) !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.operator dl { margin: 0; }
.operator dt { font-weight: 700; margin-bottom: 4px; }
.operator dd { margin: 0 0 2px; color: var(--ink-2); font-size: 14px; }

@media (max-width: 1024px) {
  .site-nav nav { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .compare, .trust { grid-template-columns: 1fr; }
  .site-header .site-nav { padding: 12px var(--s-4); }
  .site-header .nav-link { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .compare-table { min-width: 640px; }
}

/* Carta */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: var(--s-4); }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar { width: 100%; max-width: 36px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; }
.chart .bar:hover { background: var(--accent-ink); }
.chart .bar:hover::after { content: attr(data-value); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.chart .lbl { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

/* Penukar bahasa */
.locale-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.locale-switch a { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .03em; }
.locale-switch a:hover { color: var(--ink); }
.locale-switch a.active { background: var(--ink); color: #fff; }

/* 6. UTILITI -------------------------------------------------------------- */
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-5 { margin-bottom: var(--s-5); }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: var(--s-2); } .gap-4 { gap: var(--s-4); }
.text-danger { color: var(--danger); } .text-ok { color: var(--ok); }
.pre { white-space: pre-line; }
.hidden { display: none !important; }

/* RESPONSIF --------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
  .menu-toggle { display: inline-flex; }
  .topbar, .content { padding-left: var(--s-4); padding-right: var(--s-4); }
  .grid-2, .grid-3, .form-row, .form-row-3, .features, .steps { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .site-nav nav a:not(.btn) { display: none; }
  .doc { padding: 24px; }
  .doc-head, .doc-meta, .doc-foot { grid-template-columns: 1fr; display: grid; }
  .doc-title { text-align: left; }
  .doc-meta .kv { justify-content: start; text-align: left; }
  .items-table thead { display: none; }
  .items-table, .items-table tbody, .items-table tr, .items-table td { display: block; width: 100% !important; }
  .items-table tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; margin-bottom: 10px; position: relative; }
  .items-table td { border: 0; padding: 4px; }
  .items-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; margin-bottom: 2px; }
  .items-table .col-del { position: absolute; top: 4px; right: 4px; width: auto !important; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
}

@media print {
  .sidebar, .topbar, .no-print, .public-bar { display: none !important; }
  .app { display: block; }
  .content { padding: 0; }
  body { background: #fff; }
  .doc { box-shadow: none; border: 0; padding: 0; }
}
