@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Mulish:wght@300;400;600;700&family=Inconsolata:wght@400;600&display=swap");
@font-face { font-family: "Helvetica Neue LT Std"; src: url("fonts/Helvetica_Neue_LT_Std_35_Thin.otf") format("opentype"); font-weight: 200; font-display: swap; }
@font-face { font-family: "Helvetica Neue LT Std"; src: url("fonts/Helvetica_Neue_LT_Std_65_Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Helvetica Neue LT Std"; src: url("fonts/Helvetica_Neue_LT_Std_73_Bold_Extended.otf") format("opentype"); font-weight: 700; font-display: swap; }

/* dr soap design system: tokens (Paper = bawaan, Bark = bagian gelap) */
:root {
  --leaf: #88a034; --moss: #5e6738; --sage: #87966e; --forest: #4e5b31; --bark: #3d322c; --clay: #654534;
  --sand: #cdc4aa; --stone: #d1ccbd; --white: #ffffff; --ink: #333333; --black: #000000; --paper: #efeeea;

  --surface: var(--paper); --surface-raised: var(--white); --surface-tint: var(--stone); --surface-inverse: var(--bark);
  --text: var(--ink); --text-muted: var(--clay); --text-inverse: var(--white);
  --accent: var(--forest); --on-accent: var(--white); --accent-text: var(--forest);
  --highlight: var(--leaf); --on-highlight: var(--black);
  --line: var(--sand); --line-strong: var(--moss); --focus: var(--forest);

  --font-display: "Helvetica Neue LT Std", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-label: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: Mulish, Muli, "Helvetica Neue", Arial, sans-serif;
  --font-mono: Consolas, Inconsolata, "SFMono-Regular", Menlo, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius-sm: 4px; --radius-md: 12px; --radius-full: 9999px;
}
[data-theme="bark"] {
  --surface: var(--bark); --surface-raised: var(--clay); --surface-tint: var(--forest); --surface-inverse: var(--sand);
  --text: var(--white); --text-muted: var(--stone); --text-inverse: var(--bark);
  --accent: var(--leaf); --on-accent: var(--black); --accent-text: var(--sand);
  --line: var(--moss); --line-strong: var(--sage); --focus: var(--sand);
  background: var(--surface); color: var(--text);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 24px; }
img { display: block; max-width: 100%; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: var(--space-3) var(--space-4); z-index: 100; }
.skip:focus { left: var(--space-4); top: var(--space-4); }

/* peran tipografi */
.t-display { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 7vw, 64px); line-height: 1; letter-spacing: -0.04em; }
.t-h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 4.5vw, 40px); line-height: 1.1; letter-spacing: -0.03em; }
.t-h2 { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 32px; letter-spacing: -0.02em; }
.t-h3 { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 26px; letter-spacing: -0.01em; }
.t-label { font-family: var(--font-label); font-size: 16px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 400; }
.t-label-sm { font-family: var(--font-label); font-size: 13px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; }
.t-lg { font-size: 18px; line-height: 28px; }
.t-sm { font-size: 14px; line-height: 20px; }
.t-data { font-family: var(--font-mono); font-size: 13px; line-height: 18px; }
.t-stat { font-family: var(--font-display); font-weight: 200; font-size: 96px; line-height: 88px; letter-spacing: -0.03em; }
.muted { color: var(--text-muted); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* tombol: pil huruf kapital */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; padding: 4px var(--space-5) 0; border: 0; border-radius: var(--radius-full); cursor: pointer; text-decoration: none; font-family: var(--font-label); font-size: 17px; line-height: 17px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; transition: opacity .12s ease, transform .12s ease, background-color .12s ease; }
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-secondary:hover { background: var(--surface-tint); opacity: 1; }
.btn-highlight { background: var(--highlight); color: var(--on-highlight); }
.btn-ghost { background: transparent; color: var(--accent-text); padding-left: var(--space-2); padding-right: var(--space-2); }
.btn-ghost:hover { text-decoration: underline; text-underline-offset: 4px; opacity: 1; }
.btn-danger { background: transparent; color: var(--clay); box-shadow: inset 0 0 0 1.5px var(--clay); }
.btn-sm { height: 36px; padding: 3px var(--space-4) 0; font-size: 15px; line-height: 15px; }
.btn-lg { height: 64px; padding: 6px var(--space-6) 0; font-size: 28px; line-height: 28px; letter-spacing: 0.02em; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; transform: none; }

/* tag & chip */
.tag { display: inline-flex; align-items: center; padding: 5px var(--space-2) 3px; border-radius: var(--radius-sm); font-family: var(--font-label); font-size: 13px; line-height: 14px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.tag-leaf { background: var(--highlight); color: var(--on-highlight); }
.tag-forest { background: var(--forest); color: var(--white); }
.tag-bark { background: var(--bark); color: var(--white); }
.tag-line { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tag-clay { background: var(--clay); color: var(--white); }
.tag-muted { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }

/* kartu: putih di atas paper, radius 12, hairline, tanpa bayangan */
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); }
@media (min-width: 700px) { .card { padding: var(--space-5); } }
.card.flat { border-color: transparent; }
.stack { display: grid; gap: var(--space-4); align-content: start; }
.stack-sm { display: grid; gap: var(--space-2); align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

/* formulir */
.field { display: grid; gap: var(--space-1); align-content: start; }
.field > label, .field > .lbl { font-weight: 700; font-size: 14px; line-height: 20px; }
.help { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.err { font-size: 14px; line-height: 20px; font-weight: 700; display: flex; gap: var(--space-2); align-items: flex-start; }
.err::before { content: "!"; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: var(--radius-full); background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 18px; text-align: center; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password], input[type=number], input[type=date], input[type=time], input[type=month], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px var(--space-3); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text); font: inherit; font-size: 15px;
}
textarea { min-height: 88px; resize: vertical; line-height: 22px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.check { display: flex; gap: var(--space-2); align-items: flex-start; font-size: 14px; line-height: 20px; cursor: pointer; }
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-grid.c2 { grid-template-columns: 1fr 1fr; } .form-grid.c3 { grid-template-columns: repeat(3, 1fr); } .form-grid .full { grid-column: 1 / -1; } }

/* bilah */
.bar { height: 8px; background: var(--surface-tint); border-radius: var(--radius-full); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-full); }

/* tabel */
.tbl-wrap { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th { text-align: left; font-family: var(--font-label); font-weight: 400; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: var(--space-3) var(--space-4) 8px; border-bottom: 1.5px solid var(--line-strong); white-space: nowrap; }
td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface); }
td .sub, .sub { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-muted); }
td .nm { font-weight: 700; }
.empty { padding: var(--space-7) var(--space-4); text-align: center; color: var(--text-muted); }
tfoot td { font-weight: 700; border-top: 1.5px solid var(--line-strong); }

/* modal & toast */
.scrim { position: fixed; inset: 0; background: rgba(61, 50, 44, .88); z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 0; overflow-y: auto; }
@media (min-width: 700px) { .scrim { align-items: center; padding: var(--space-5); } }
.modal { background: var(--surface); width: 100%; max-width: 640px; max-height: 94vh; overflow-y: auto; border-radius: var(--radius-md) var(--radius-md) 0 0; padding: var(--space-5) var(--space-4); display: grid; gap: var(--space-4); align-content: start; }
@media (min-width: 700px) { .modal { border-radius: var(--radius-md); padding: var(--space-5); } }
.modal.wide { max-width: 920px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 60; max-width: min(92vw, 480px); background: var(--bark); color: var(--white); padding: var(--space-3) var(--space-5); border-radius: var(--radius-full); font-size: 14px; line-height: 20px; text-align: center; }
.toast.bad { background: var(--clay); }
.banner { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-md); background: var(--clay); color: var(--white); font-size: 14px; line-height: 20px; }
.banner.ok { background: var(--highlight); color: var(--on-highlight); }
.banner b { font-family: var(--font-label); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; font-size: 16px; display: block; }
.banner .btn-secondary { color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } .btn { transition: none; } }

/* tab */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tab { all: unset; box-sizing: border-box; cursor: pointer; font-family: var(--font-label); font-size: 17px; line-height: 17px; letter-spacing: 0.06em; text-transform: uppercase; padding: 12px var(--space-4) 8px; border-radius: var(--radius-full); color: var(--text); }
.tab:hover { background: var(--surface-tint); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tab .cnt { margin-left: 6px; background: var(--highlight); color: var(--on-highlight); border-radius: var(--radius-full); padding: 2px 7px 0; font-size: 14px; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); font-size: 14px; line-height: 20px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.statdot::after { content: ""; display: block; width: 40px; height: 6px; margin-top: var(--space-2); border-radius: var(--radius-full); background: var(--highlight); }
