/* ===================== Font (lokal, tanpa CDN) ===================== */
@font-face { font-family: 'Jakarta'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jakarta'; font-weight: 800; font-display: swap; src: url('/vendor/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }

/* ===================== Token ===================== */
:root {
  --ink: #221B30;          /* aubergine tinta: teks & sidebar */
  --ink-2: #4A4358;
  --muted: #6E687B;
  --faint: #9A95A6;
  --bg: #F4F4F7;           /* porselen dingin */
  --surface: #FFFFFF;
  --surface-2: #FAFAFC;
  --line: #E5E3EB;
  --line-2: #D6D3DF;
  --berry: #8A2C5C;        /* aksi utama */
  --berry-600: #74224C;
  --berry-50: #F7ECF2;
  --berry-100: #EFD6E3;
  --sage: #2C7466;         /* selesai / medis */
  --sage-50: #E7F2EF;
  --amber: #A86A12;
  --amber-50: #FBF1DF;
  --red: #B42D2D;
  --red-50: #FBEAEA;
  --blue: #2D5D9A;
  --blue-50: #E8EFF8;
  --violet: #5B4A8A;
  --violet-50: #EEEBF6;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-pop: 0 12px 40px rgba(34, 27, 48, .18), 0 2px 6px rgba(34, 27, 48, .08);
  --sidebar: 236px;
  --font: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--berry); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 .6em; }
.num, .money, td.r, th.r { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--berry-100); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===================== Shell ===================== */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #DCD7E6; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--berry); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; flex: none; overflow: hidden; }
/* logo klinik / produk tampil utuh apa adanya (latar transparan), tanpa kotak warna.
   img dipasang absolut memenuhi kotak supaya logo tinggi/lebar tidak meregangkan grid lalu terpotong */
.brand-mark:has(img) { background: transparent; border-radius: 0; display: block; position: relative; }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.sidebar .brand .brand-mark:has(img) { width: 46px; height: 56px; }
.brand-name { font-weight: 700; color: #fff; font-size: 14px; line-height: 1.25; }
.brand-sub { font-size: 11.5px; color: #9F98AE; }
.nav { padding: 6px 10px 16px; flex: 1; }
.nav-group { font-size: 11.5px; color: #8C85A0; padding: 14px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #DCD7E6; font-weight: 500; font-size: 13.5px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(255,255,255,.09); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #E58AB6; }
.nav svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.nav .badge { margin-left: auto; background: #E58AB6; color: var(--ink); font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; }
.side-foot .who { color: #fff; font-weight: 600; }
.side-foot .role { color: #9F98AE; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(244,244,247,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 24px; min-height: 58px; }
.topbar .menu-btn { display: none; }
.global-search { position: relative; margin-left: auto; width: min(360px, 40vw); }
.global-search input { padding-left: 34px; background: var(--surface); }
.global-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.view { padding: 22px 24px 60px; max-width: 1480px; width: 100%; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 200px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===================== Panel ===================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { flex: 1; }
.panel-body { padding: 16px; }
.panel-body.tight { padding: 0; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.r { text-align: right; }
.c { text-align: center; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt0 { margin-top: 0 !important; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.hidden { display: none !important; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ===================== Metrik ===================== */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.metric { padding: 16px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.metric .value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.metric .delta { font-size: 12px; margin-top: 2px; color: var(--muted); }
.metric .delta.up { color: var(--sage); } .metric .delta.down { color: var(--red); }

/* ===================== Tombol ===================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); border-color: #C4C0CF; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--berry); border-color: var(--berry); color: #fff; }
.btn.primary:hover { background: var(--berry-600); }
.btn.success { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn.success:hover { filter: brightness(.94); }
.btn.danger { color: var(--red); border-color: #E7C3C3; }
.btn.danger:hover { background: var(--red-50); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(34,27,48,.05); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn.lg { height: 46px; font-size: 15px; padding: 0 20px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.wa { color: #13804A; border-color: #BFE0CD; }
.btn.wa:hover { background: #E9F6EE; }

/* ===================== Form ===================== */
label { font-weight: 600; font-size: 12.5px; color: var(--ink-2); display: block; margin-bottom: 5px; }
.field { margin-bottom: 14px; min-width: 0; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 400; }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], input[type=tel], input[type=date], input[type=month], input:not([type]), input[type=time], input[type=datetime-local], input[type=color], select, textarea {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface);
  font: 400 14px var(--font); color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
input[type=color] { padding: 3px; width: 56px; }
textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
select { padding-right: 28px; 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='%236E687B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-50); }
input[readonly] { background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; color: var(--ink); margin: 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--berry); margin: 0; }
.input-group { display: flex; }
.input-group > :first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.input-affix { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-size: 13px; border-radius: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters input[type=search] { min-width: 240px; }
.filters .check input { min-width: 0; width: 16px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; height: 34px; padding: 0 12px; font: 600 13px var(--font); color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }

/* ===================== Tabel ===================== */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #FBF7FA; }
table.t tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); background: var(--surface-2); }
table.t .r, table.t th.r { text-align: right; }
table.t.compact td { padding: 7px 10px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .btn { margin-top: 10px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ===================== Pill / status ===================== */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; background: #EFEEF3; color: var(--ink-2); white-space: nowrap; }
.pill.berry { background: var(--berry-50); color: var(--berry); }
.pill.sage { background: var(--sage-50); color: var(--sage); }
.pill.amber { background: var(--amber-50); color: var(--amber); }
.pill.red { background: var(--red-50); color: var(--red); }
.pill.blue { background: var(--blue-50); color: var(--blue); }
.pill.violet { background: var(--violet-50); color: var(--violet); }
.pill.ink { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.tier { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.tier::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--tier, #999); transform: rotate(45deg); }

/* peringatan alergi: elemen paling penting secara klinis */
.allergy { display: flex; gap: 10px; align-items: flex-start; background: var(--red-50); border: 1px solid #EBC0C0; color: #7E1E1E; border-radius: 9px; padding: 10px 12px; font-size: 13.5px; }
.allergy svg { width: 18px; height: 18px; color: var(--red); flex: none; margin-top: 1px; }
.allergy b { color: var(--red); }
.notice { background: var(--amber-50); border: 1px solid #EED9B0; color: #6F4708; border-radius: 9px; padding: 10px 12px; font-size: 13px; }
.notice.info { background: var(--blue-50); border-color: #CAD9EE; color: #23466F; }
.notice.ok { background: var(--sage-50); border-color: #C3DDD6; color: #1F5A4F; }

/* ===================== Tabs ===================== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button, .tabs a { border: 0; background: none; padding: 10px 14px; font: 600 13.5px var(--font); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs .on { color: var(--berry); border-bottom-color: var(--berry); }
.tabs .count { font-size: 11px; background: #EFEEF3; color: var(--muted); border-radius: 9px; padding: 1px 6px; margin-left: 4px; }

/* ===================== Modal & toast ===================== */
.modal-back { position: fixed; inset: 0; background: rgba(34,27,48,.42); z-index: 100; display: grid; place-items: start center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); width: min(560px, 100%); animation: pop .18s ease; }
.modal.lg { width: min(820px, 100%); }
.modal.xl { width: min(1080px, 100%); }
.modal.sm { width: min(420px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; }
.modal-body { padding: 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow-pop); max-width: 380px; animation: pop .18s ease; display: flex; gap: 8px; align-items: flex-start; }
.toast.error { background: var(--red); }
.toast.ok { background: var(--sage); }
.toast.warn { background: #9A6412; }

/* ===================== Autocomplete ===================== */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-pop); z-index: 50; max-height: 320px; overflow-y: auto; }
.ac-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.on { background: var(--berry-50); }
.ac-item .meta { color: var(--muted); font-size: 12px; }
.chosen { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; background: var(--surface-2); }
.chosen .name { font-weight: 600; }

/* ===================== Avatar & patient head ===================== */
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--berry-50); color: var(--berry); display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.patient-head { display: flex; gap: 14px; align-items: center; }
.patient-head .meta { color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ===================== Papan antrian (alur pasien) ===================== */
.flow { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.flow-col { background: #ECEBF1; border-radius: 12px; padding: 10px; min-height: 240px; }
.flow-col h3 { font-size: 13.5px; display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.flow-col h3 .n { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.flow-col h3 .bar { width: 10px; height: 10px; border-radius: 3px; }
.ticket { background: var(--surface); border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 0 12px; }
.ticket + .ticket { margin-top: 8px; }
.ticket:hover { border-color: var(--berry-100); box-shadow: 0 2px 10px rgba(138,44,92,.08); }
.ticket .q { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; grid-row: span 3; padding-top: 2px; }
.ticket .nm { font-weight: 700; font-size: 13.5px; }
.ticket .sv { font-size: 12.5px; color: var(--muted); }
.ticket .ft { font-size: 12px; color: var(--faint); display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.ticket .warn { color: var(--red); font-weight: 600; }

/* ===================== Kalender ===================== */
.cal-wrap { overflow: auto; max-height: calc(100vh - 210px); border-top: 1px solid var(--line); }
.cal { display: grid; position: relative; min-width: 100%; }
.cal-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 10px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; border-left: 1px solid var(--line); }
.cal-head .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cal-corner { position: sticky; top: 0; left: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.cal-time { position: sticky; left: 0; z-index: 2; background: var(--surface); font-size: 11.5px; color: var(--faint); text-align: right; padding: 0 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-cell { border-left: 1px solid var(--line); border-top: 1px solid #F0EFF4; cursor: cell; }
.cal-cell.hour { border-top-color: var(--line); }
.cal-cell:hover { background: #FBF7FA; }
.appt { position: absolute; border-radius: 7px; padding: 4px 7px; font-size: 12px; overflow: hidden; cursor: pointer; border-left: 3px solid var(--c, var(--berry)); background: color-mix(in srgb, var(--c, var(--berry)) 11%, white); color: var(--ink); line-height: 1.3; z-index: 1; }
.appt:hover { z-index: 5; box-shadow: 0 4px 14px rgba(34,27,48,.16); }
.appt .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt .p { font-weight: 600; }
.appt.st-cancelled, .appt.st-no_show { opacity: .45; text-decoration: line-through; }
.appt.st-requested { border-style: dashed; border-left-style: solid; outline: 1px dashed var(--c); outline-offset: -1px; }
.appt.st-completed, .appt.st-checked_in { background: #F1F0F4; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 3; pointer-events: none; }

/* ===================== Kasir ===================== */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.cart-line .nm { font-weight: 600; }
.cart-line .sub { font-size: 12px; color: var(--muted); }
.cart-line .ctl { display: flex; gap: 6px; align-items: center; grid-column: 1 / -1; flex-wrap: wrap; }
.cart-line .ctl select { min-width: 120px; max-width: 100%; }
.cart-line .ctl input { height: 30px; width: 70px; }
.cart-line .ctl input.disc { width: 110px; }
.totals { padding: 12px 16px; font-size: 13.5px; }
.totals .ln { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals .ln.minus span:last-child { color: var(--sage); }
.totals .grand { font-size: 22px; font-weight: 800; border-top: 1px dashed var(--line-2); margin-top: 8px; padding-top: 10px; letter-spacing: -.02em; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-methods button { height: 52px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); font: 600 13px var(--font); cursor: pointer; color: var(--ink); }
.pay-methods button:hover { border-color: var(--berry); }
.pay-methods button.on { border-color: var(--berry); background: var(--berry-50); color: var(--berry); box-shadow: inset 0 0 0 1px var(--berry); }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; }
.big-input { height: 48px !important; font-size: 20px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.cat-item { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; cursor: pointer; background: var(--surface); text-align: left; font: inherit; color: inherit; }
.cat-item:hover { border-color: var(--berry); background: #FDF9FB; }
.cat-item .nm { font-weight: 600; font-size: 13px; line-height: 1.3; }
.cat-item .pr { font-size: 12.5px; color: var(--berry); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cat-item .st { font-size: 11.5px; color: var(--muted); }

/* ===================== Kunjungan / EMR ===================== */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.steps { display: flex; gap: 0; align-items: center; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--faint); padding-right: 12px; }
.step .b { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; font-size: 11px; }
.step.done { color: var(--sage); } .step.done .b { background: var(--sage); border-color: var(--sage); color: #fff; }
.step.cur { color: var(--berry); } .step.cur .b { border-color: var(--berry); background: var(--berry); color: #fff; }
.step + .step::before { content: ''; width: 18px; height: 2px; background: var(--line-2); margin-right: 12px; }
.soap-label { display: flex; gap: 8px; align-items: baseline; }
.soap-label .l { font-weight: 800; color: var(--berry); font-size: 15px; width: 16px; }
.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.score { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.score .nm { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.score .opts { display: flex; gap: 3px; }
.score .opts button { flex: 1; height: 26px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 5px; font: 700 12px var(--font); color: var(--muted); cursor: pointer; padding: 0; }
.score .opts button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.score .opts button[disabled] { cursor: default; }
.tx-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tx-line:last-child { border-bottom: 0; }
.tx-line .main { flex: 1; min-width: 0; }
.tx-line .nm { font-weight: 700; }
.tx-check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; margin-top: 1px; }
.tx-check.done { background: var(--sage); border-color: var(--sage); color: #fff; }
.tx-check svg { width: 14px; height: 14px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo { border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; cursor: zoom-in; }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photo .cap { font-size: 11.5px; padding: 5px 8px; display: flex; justify-content: space-between; gap: 6px; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--berry); }
.tl-item .when { font-size: 12px; color: var(--muted); font-weight: 600; }
.sig-pad { border: 1.5px dashed var(--line-2); border-radius: 10px; background: #FCFCFE; touch-action: none; width: 100%; height: 180px; display: block; cursor: crosshair; }
.consent-text { max-height: 220px; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font-size: 13px; white-space: pre-wrap; }

.bar-list .item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; padding: 7px 0; }
.bar-list .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #EFEEF3; overflow: hidden; }
.bar-list .fill { height: 100%; background: var(--berry); border-radius: 3px; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 10px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.list-plain li:last-child { border-bottom: 0; }
.time-chip { font-weight: 700; font-variant-numeric: tabular-nums; width: 48px; flex: none; }

/* ===================== Login ===================== */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--ink); color: #EDE9F3; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .big { font-size: 40px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; max-width: 520px; color: #fff; }
.login-art .rings { position: absolute; right: -140px; bottom: -140px; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(229,138,182,.35); box-shadow: 0 0 0 60px rgba(229,138,182,.06), 0 0 0 120px rgba(229,138,182,.04), 0 0 0 180px rgba(229,138,182,.03); }
.login-art .flow-line { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #B7B0C6; position: relative; }
.login-art .flow-line span { border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 5px 12px; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.login-form form { width: min(380px, 100%); }

/* ===================== Cetak ===================== */
.print-page { background: #fff; color: #000; max-width: 820px; margin: 0 auto; padding: 28px; font-size: 13px; }
.print-page.receipt { max-width: 80mm; padding: 4mm; font-size: 11.5px; }
.print-page.receipt.p58 { max-width: 58mm; font-size: 10.5px; }
.print-page table { width: 100%; border-collapse: collapse; }
.print-page th, .print-page td { padding: 5px 4px; text-align: left; vertical-align: top; }
.print-page .doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 14px; }
.print-page .doc-title { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.print-page .bordered th, .print-page .bordered td { border: 1px solid #999; }
.print-page .dash { border-top: 1px dashed #000; margin: 6px 0; }
.print-bar { position: sticky; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; z-index: 5; }
@media print {
  .print-bar, .no-print { display: none !important; }
  body { background: #fff; }
  .print-page { padding: 0; max-width: none; }
  @page { margin: 12mm; }
  .receipt-mode @page { margin: 0; }
}

/* ===================== Responsif ===================== */
@media (max-width: 1180px) {
  .split, .split-wide, .visit-grid, .pos { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 90; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(34,27,48,.4); z-index: 80; }
  .topbar { padding: 10px 14px; }
  .topbar .menu-btn { display: inline-flex; }
  .view { padding: 16px 14px 60px; }
  .g2, .g3, .g4, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .global-search { width: auto; flex: 1; }
  .kv { grid-template-columns: 110px 1fr; }
  .filters input[type=search] { min-width: 0; flex: 1; }
}
@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .pay-methods { grid-template-columns: repeat(2, 1fr); }
}

/* ---- tambahan ---- */
.global-search input[type=search] { padding-left: 34px; background: var(--surface); }
.list-plain li > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.cal-grid { display: grid; position: relative; }
.cal-times { position: relative; }
.cal-times .cal-time { position: absolute; right: 0; left: 0; }
.cal-col { position: relative; border-left: 1px solid var(--line); }
.cal-col .cal-cell { height: 22px; border-left: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--berry-50); color: var(--berry); border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 12.5px; font-weight: 600; }
.chip button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.chip button:hover { background: var(--berry-100); }
.chip button svg { width: 12px; height: 12px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare img { width: 100%; border-radius: 9px; }
.lightbox img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 8px; }
.sticky-foot { position: sticky; bottom: 0; background: rgba(244,244,247,.95); backdrop-filter: blur(6px); padding: 12px 0; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 16px; z-index: 5; }
.section-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.form-grid > .section-title { grid-column: 1 / -1; }
.pkg { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.pkg + .pkg { margin-top: 8px; }
.sessions { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.sessions i { width: 14px; height: 14px; border-radius: 4px; background: #EFEEF3; display: inline-block; }
.sessions i.used { background: var(--berry); }
.ticket .ft svg { width: 12px; height: 12px; }
.vitals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .vitals { grid-template-columns: repeat(2, 1fr); } }
.read-block { white-space: pre-wrap; font-size: 14px; }
.read-block + .read-block { margin-top: 12px; }
.rx-line { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.rx-line:last-child { border-bottom: 0; }
.status-steps { margin-top: 10px; }
.seg button svg { width: 16px; height: 16px; vertical-align: -3px; }
.ticket > div { min-width: 0; }
.ticket .ft { flex-wrap: wrap; row-gap: 0; }
.ticket .ft .ellipsis { max-width: 100%; }
.notice svg, .allergy svg { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.pill svg { width: 12px; height: 12px; }

/* ===================== v2: cabang, pita info, akuntansi, SDM ===================== */
.branch-switch { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 4px 0 9px; background: var(--surface); height: 32px; }
.branch-switch svg, .branch-one svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.branch-switch select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ink); padding: 4px 4px; height: 30px; max-width: 220px; }
.branch-switch select:focus { outline: none; }
.branch-one { display: inline-flex; align-items: center; gap: 6px; }
.banners { display: flex; flex-direction: column; gap: 0; }
.banner { display: flex; align-items: center; gap: 10px; padding: 9px 24px; font-size: 13px; border-bottom: 1px solid var(--line); }
.banner svg { width: 17px; height: 17px; flex: none; }
.banner.blue { background: var(--blue-50); color: #1F426E; }
.banner.amber { background: var(--amber-50); color: #7A4D0C; }
.banner.red { background: var(--red-50); color: #8A1F1F; }
.banner.violet { background: var(--violet-50); color: #43366A; }
.banner a { font-weight: 600; }
.fin-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fin-table td { padding: 6px 12px; border-bottom: 1px solid var(--line); }
.fin-table td.r { text-align: right; white-space: nowrap; }
.fin-table tr.h td { font-weight: 700; background: var(--surface-2); text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; color: var(--ink-2); }
.fin-table tr.sub td { font-weight: 700; border-top: 1px solid var(--line-2); }
.fin-table tr.total td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); font-size: 15px; }
.fin-table tr.i td:first-child { padding-left: 28px; }
.fin-table .code { color: var(--faint); font-size: 12px; margin-right: 8px; }
.fin-table tr.click:hover td { background: var(--berry-50); cursor: pointer; }
.neg { color: var(--red); }
.ok-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--sage-50); color: var(--sage); }
.ok-badge.bad { background: var(--red-50); color: var(--red); }
.ok-badge svg { width: 14px; height: 14px; }
.att-grid { border-collapse: separate; border-spacing: 2px; font-size: 11.5px; }
.att-grid th { font-weight: 600; color: var(--muted); padding: 2px 0; min-width: 24px; text-align: center; }
.att-grid th.we { color: var(--berry); }
.att-grid td { text-align: center; height: 26px; min-width: 24px; border-radius: 5px; background: var(--surface-2); cursor: pointer; font-weight: 700; }
.att-grid td.name { text-align: left; background: none; cursor: default; font-weight: 500; padding-right: 10px; white-space: nowrap; }
.att-grid td.hadir { background: var(--sage-50); color: var(--sage); }
.att-grid td.terlambat { background: var(--amber-50); color: var(--amber); }
.att-grid td.izin, .att-grid td.sakit, .att-grid td.cuti, .att-grid td.libur { background: var(--blue-50); color: var(--blue); }
.att-grid td.alpa { background: var(--red-50); color: var(--red); }
.att-grid td.planned { opacity: .55; }
.att-grid td:not(.name):hover { outline: 2px solid var(--berry-100); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.week-grid { display: grid; grid-template-columns: 150px repeat(7, 1fr); gap: 6px; align-items: start; }
.week-grid .wd { font-weight: 700; font-size: 12px; color: var(--muted); text-align: center; }
.week-grid .slot { background: var(--berry-50); color: var(--berry-600); border-radius: 6px; padding: 3px 6px; font-size: 11.5px; font-weight: 600; text-align: center; margin-bottom: 3px; }
.week-grid .slot.other { background: var(--surface-2); color: var(--faint); }
.week-grid .cellbox { min-height: 30px; border: 1px dashed var(--line-2); border-radius: 8px; padding: 3px; cursor: pointer; }
.week-grid .cellbox:hover { border-color: var(--berry); }
.week-grid .who { font-size: 13px; font-weight: 600; padding-top: 4px; }
.clock-card { text-align: center; padding: 28px 20px; }
.clock-card .time { font-size: 44px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.int-card .head { display: flex; align-items: center; gap: 12px; }
.int-card .logo { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
.int-card .logo svg { width: 22px; height: 22px; color: var(--berry); }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.radio-cards label { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; display: block; }
.radio-cards label:has(input:checked) { border-color: var(--berry); background: var(--berry-50); }
.radio-cards input { margin-right: 6px; accent-color: var(--berry); }
.radio-cards .small { display: block; margin-top: 2px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.plan-card.current { border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-50); }
.plan-card .price { font-size: 22px; font-weight: 800; }
.plan-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
@media (max-width: 900px) { .week-grid { grid-template-columns: 110px repeat(7, minmax(60px, 1fr)); overflow-x: auto; } .banner { padding: 9px 16px; } .branch-switch select { max-width: 130px; } }
.kvs { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.kvs > div { display: flex; flex-direction: column; }
.kvs span { font-size: 12px; color: var(--muted); }
@media print {
  body[data-shell="1"] .sidebar, body[data-shell="1"] .topbar, body[data-shell="1"] .tabs, body[data-shell="1"] .filters,
  body[data-shell="1"] .page-head .actions, body[data-shell="1"] .banners, body[data-shell="1"] .btn { display: none !important; }
  body[data-shell="1"] .shell { display: block; }
  body[data-shell="1"] .panel { break-inside: avoid; box-shadow: none; }
}
.print-page td.r, .print-page th.r { text-align: right; }
.ic-xs { width: 13px; height: 13px; vertical-align: -2px; }
.cal-off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(34,27,48,.045) 0 6px, rgba(34,27,48,.09) 6px 12px); pointer-events: none; z-index: 0; }
.cal-head .pill.tiny { font-size: 10.5px; padding: 1px 6px; margin-left: 4px; }
.grid > .panel + .panel, .split > .panel + .panel, .split > * + .panel { margin-top: 0; }
.titles > a svg, .titles > a.small svg { width: 14px; height: 14px; vertical-align: -2px; }
.money-nowrap td.r, .money-nowrap th.r { white-space: nowrap; }
.money-nowrap td:first-child { min-width: 170px; }
.gw-box { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.gw-head { display: flex; gap: 12px; align-items: flex-start; }
.gw-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--faint); margin-top: 5px; flex: none; }
.gw-dot.on { background: var(--sage); box-shadow: 0 0 0 4px var(--sage-50); }
.gw-dot.wait { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-50); }
.gw-qr { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.gw-qr img { background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); image-rendering: pixelated; }
.gw-qr ol { padding-left: 18px; margin: 8px 0; }
/* ---------- Kontrol & farmasi ---------- */
.ctl-metrics { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 10px; }
.ctl-metrics .metric { text-decoration: none; color: inherit; }
.ctl-metrics .metric .label { min-height: 32px; }
.finding-list li.finding { display: flex; gap: 12px; align-items: flex-start; border-left: 3px solid transparent; }
.finding-list li.finding.high { border-left-color: var(--red); }
.finding-list li.finding.medium { border-left-color: var(--amber); }
.finding-list li.finding.info { border-left-color: var(--line-2); }
.finding-list li.finding.reviewed { opacity: .72; }
.finding-list li.finding .mt8 { margin-top: 4px; }
.wa-preview { white-space: pre-wrap; font: 13px/1.5 var(--font); background: #E9F7EF; border: 1px solid #CFE9DA; border-radius: var(--radius); padding: 14px; max-height: 60vh; overflow: auto; margin: 0; }
.req-card .panel-head { align-items: flex-start; }
.req-card td input[type=number] { min-width: 80px; }
.bhp-line .pill { font-size: 11.5px; }
@media (max-width: 700px) { .finding-list li.finding { flex-direction: column; } .req-card .panel-foot > * { flex: 1 1 100%; } }
.poster { text-align: center; padding: 30px 20px; border: 3px solid var(--ink); border-radius: 18px; max-width: 560px; margin: 0 auto; }
.poster-logo { width: 64px; height: 64px; object-fit: contain; }
.poster-clinic { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; }
.poster h1 { font-size: 34px; line-height: 1.15; margin: 18px 0 8px; }
.poster-lede { font-size: 16px; margin: 0 0 16px; }
.poster ul { text-align: left; font-size: 15px; line-height: 1.55; margin: 0 auto 18px; max-width: 440px; padding-left: 22px; }
.poster-box { border-radius: 12px; background: #F3EEF6; padding: 16px; font-size: 16px; }
.poster-phone { font-size: 30px; font-weight: 800; margin: 6px 0 2px; letter-spacing: .02em; }
@media print { .poster-box { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.panel .metrics { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); }

/* ---------- kamera kontrol ---------- */
.cam-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.cam-card, .cam-ev { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cam-card-body { padding: 10px 12px; }
.cam-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line); }
.cam-thumb.missing { display: flex; align-items: center; justify-content: center; }
.cam-mini { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--line); flex: none; }
.cam-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cam-editor { position: relative; background: #111; border-radius: 8px; overflow: hidden; min-height: 120px; }
.cam-editor img { display: block; width: 100%; height: auto; }
.cam-editor canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.cam-editor-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #ddd; font-size: 13px; padding: 20px; text-align: center; }
.cam-editor-empty[hidden] { display: none; }
.cam-zones { position: absolute; inset: 0; cursor: crosshair; touch-action: none; user-select: none; }
.cam-zones[hidden] { display: none; }
.cam-zone { position: absolute; border: 2px dashed #F5A524; background: rgba(245, 165, 36, .22); border-radius: 3px; }
.cam-zone span { position: absolute; left: 4px; top: 2px; font-size: 11px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); pointer-events: none; }
.cam-zone button { position: absolute; right: 2px; top: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 20px; padding: 0; cursor: pointer; }
.cam-dot { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #000; }
.finding .cam-mini { margin-right: 12px; }

.cam-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cam-person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cam-person.flag { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.cam-face { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--line); }
.cam-face.missing, .cam-face-xs.missing { display: flex; align-items: center; justify-content: center; }
.cam-face-xs { display: block; width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--line); }
.cam-sightings { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.cam-sight .cam-face { border-radius: 8px; margin-bottom: 4px; }
.cam-staff-face { position: relative; display: inline-block; }
.cam-staff-face.pending .cam-face-xs { opacity: .45; }
.cam-staff-face.error .cam-face-xs { outline: 2px solid var(--red); }
.cam-staff-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 12px; line-height: 18px; padding: 0; cursor: pointer; display: none; }
.cam-staff-face:hover .cam-staff-x { display: block; }

/* Tabel komisi (Komisi staf › Aturan komisi) */
.ctable .cbtn { all: unset; display: block; cursor: pointer; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; min-height: 18px; }
.ctable .cbtn:hover { background: var(--surface-2, rgba(0,0,0,.05)); outline: 1px dashed var(--line-2); }
.ctable .cbtn:focus-visible { outline: 2px solid var(--accent, #7a2a52); }
.ctable tr.defrow td { background: var(--surface-2, #f6f3f4); border-bottom: 2px solid var(--line-2); position: sticky; top: 33px; z-index: 1; }
details.panel > summary { list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }

/* Kartu paket langganan (super-admin Paket & harga, Langganan klinik) */
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: stretch; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 2px rgba(34, 27, 48, .04); }
.pcard.current { border-color: var(--berry); box-shadow: 0 0 0 3px var(--berry-50); }
.pcard.dim { opacity: .55; }
.pcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pcard-head h3 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pcard-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pcard-tag { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; min-height: 40px; }
.pcard-price { margin-top: 10px; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.pcard-price b { font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pcard-price span { color: var(--muted); font-size: 14px; }
.pcard-sub { color: var(--muted); font-size: 12.5px; min-height: 18px; }
.pcard-save { color: var(--sage); font-weight: 600; white-space: nowrap; }
.pcard-limits { list-style: none; margin: 12px 0 2px; padding: 0; display: grid; gap: 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.pcard-feats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.pcard-feats li { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); }
.pcard-feats li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.pcard-feats li.on svg { color: var(--sage); }
.pcard-feats li.off { color: var(--faint); }
.pcard-feats li.off span { text-decoration: line-through; }
.pcard-feats li.off svg { color: var(--faint); }
.pcard-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard-feats { margin-bottom: 14px; }
@media (max-width: 640px) { .pcard { padding: 18px 16px 14px; } .pcard-price b { font-size: 23px; } }

/* Pengaturan › Booking dari chat: pilihan layanan per kategori */
.svc-pick { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.svc-pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.svc-pick-bar input[type=search] { flex: 1 1 220px; max-width: 300px; height: 34px; }
.svc-pick-list { max-height: 440px; overflow-y: auto; }
.svc-cat { border-bottom: 1px solid var(--line); }
.svc-cat:last-child { border-bottom: 0; }
.svc-cat > summary { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; user-select: none; }
.svc-cat > summary::-webkit-details-marker { display: none; }
.svc-cat > summary::before { content: '▸'; color: var(--muted); font-size: 12px; transition: transform .15s; }
.svc-cat[open] > summary::before { transform: rotate(90deg); }
.svc-cat > summary:hover { background: var(--surface-2); }
.svc-cat-name { font-weight: 600; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; padding: 4px 12px 12px 34px; }
.svc-item { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 0; }
.svc-item .svc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .svc-grid { grid-template-columns: 1fr; padding-left: 12px; } }
