/* =====================================================================
   Tema event: BRILiaN Blood Donation Movement 2026
   Diambil dari banner: bingkai biru langit, kartu putih, awan biru muda,
   biru BRI, huruf tebal miring. Ubah variabel di :root untuk event lain.
   ===================================================================== */
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("../fonts/plus-jakarta-sans-latin-800-italic.woff2") format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }

:root {
  --sky: #71c4e7;          /* bingkai banner */
  --cloud: #e6f2fb;        /* awan */
  --cloud-2: #d3e8f7;
  --bg: #eaf5fc;
  --surface: #ffffff;
  --ink: #0d2b55;          /* teks utama: biru tua */
  --muted: #557091;
  --line: #d6e5f2;
  --primary: #0b5ac3;      /* biru BRI (pil tanggal) */
  --primary-2: #0a4aa6;
  --primary-soft: #e1eefc;
  --primary-ink: #ffffff;
  --amber: #b86e00;        /* kuning maskot, dipakai untuk "dipanggil" */
  --amber-soft: #fff3d6;
  --green: #12805c;
  --green-soft: #ddf4ea;
  --red: #c7375f;          /* pink maskot hati, dipakai untuk "tidak hadir" */
  --red-soft: #fde6ee;
  --shadow: 0 1px 2px rgba(13, 43, 85, .06), 0 6px 20px rgba(13, 43, 85, .06);
  font-family: "Jakarta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Huruf tebal miring seperti "Blood Donation" */
.client-title, .ticket-number, .now-num, .stat-num, .kpi-value, .q-num, .d-num, .d-cnum,
.service-code, .stat-code, .code-badge, .date-pill, .login-card h1, .report-head h1, .section-head h2 {
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* Awan lembut di latar */
body {
  background:
    radial-gradient(120px 70px at 8% 100%, var(--cloud-2) 60%, transparent 61%),
    radial-gradient(160px 90px at 22% 104%, var(--cloud-2) 60%, transparent 61%),
    radial-gradient(150px 80px at 78% 102%, var(--cloud-2) 60%, transparent 61%),
    radial-gradient(110px 60px at 94% 100%, var(--cloud-2) 60%, transparent 61%),
    var(--bg);
  background-attachment: fixed;
}

/* Logo & pil tanggal */
.brand-logo { height: 40px; width: auto; display: block; }
.brand { gap: 12px; color: var(--primary); }
.brand-divider { width: 1px; height: 28px; background: var(--line); }
.date-pill {
  display: inline-block; background: var(--primary); color: #fff; border-radius: 12px;
  padding: 6px 16px; font-size: .95rem; white-space: nowrap;
}
.btn.primary { background: var(--primary); border-color: var(--primary); }
.btn.primary:hover:not(:disabled) { background: var(--primary-2); }
.btn { border-radius: 12px; }

/* ---------- Client ---------- */
.client .client-wrap { padding-top: 16px; }
.client .client-head { margin-bottom: 14px; }
.client .client-head .brand-logo { height: 46px; }
.hero-banner { width: 100%; border-radius: 18px; display: block; box-shadow: var(--shadow); border: 4px solid var(--sky); }

.client-title { color: var(--primary); font-size: 1.8rem; }
.service-card { border-radius: 18px; border-color: var(--line); }
.service-card:hover { border-color: var(--primary); }
.service-code { background: var(--primary); color: #fff; border-radius: 16px; }
.service-go { background: var(--primary); border-radius: 12px; font-style: italic; font-weight: 800; }
.ticket { border-radius: 24px; border: 4px solid var(--sky); }
.ticket-top { background: var(--primary); }
.ticket-number { color: var(--primary); }
.ticket-cut::before, .ticket-cut::after { background: var(--sky); }
.called-banner { background: linear-gradient(90deg, var(--primary), #1d8be0); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(11, 90, 195, .18); } }

/* ---------- Dashboard & laporan ---------- */
.topbar { background: rgba(255, 255, 255, .95); border-bottom: 3px solid var(--sky); }
.topbar .brand-logo { height: 34px; }
.topbar #orgName, .topbar .brand > span:last-child { color: var(--ink); font-weight: 800; font-style: italic; }
.tabs, .presets { background: var(--cloud); }
.stat-code, .code-badge { background: var(--primary); color: #fff; }
.counter-card { border-radius: 20px; }
.counter-card.busy .now { background: var(--primary-soft); }
.now-num { color: var(--primary); }
.q-num { color: var(--primary); }
.count { background: var(--primary-soft); color: var(--primary); }
.panel, .stat, .kpi, .report-filters { border-radius: 18px; }
.chart .bar { fill: var(--primary); }
.chart .hit.on { fill: rgba(11, 90, 195, .07); }
.report-head h1, .section-head h2 { color: var(--primary); }

/* ---------- Login ---------- */
.login { background: var(--sky); }
.login-card { border-radius: 26px; gap: 10px; }
.login-card .login-logo { height: 52px; justify-self: end; }
.login-card .login-title { width: 100%; max-width: 300px; height: auto; margin: 6px 0 4px; }
.login-card h1 { color: var(--primary); font-size: 1.3rem; }

/* ---------- Layar TV ---------- */
body.display { background: var(--sky); color: var(--ink); padding: 1.6vh 1.4vw; height: 100vh; }
.d-frame {
  flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; border-radius: 28px; overflow: hidden;
  position: relative;
  background-image:
    radial-gradient(18vw 9vw at 12% 104%, var(--cloud) 60%, transparent 61%),
    radial-gradient(22vw 11vw at 34% 108%, var(--cloud) 60%, transparent 61%),
    radial-gradient(20vw 10vw at 70% 106%, var(--cloud) 60%, transparent 61%),
    radial-gradient(16vw 8vw at 92% 104%, var(--cloud) 60%, transparent 61%);
}
.d-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2vw; padding: 2.2vh 2.4vw 1vh; }
.d-brand .brand-logo { height: clamp(36px, 6vh, 72px); }
.d-event { display: flex; flex-direction: column; align-items: center; gap: .8vh; }
.d-event img { height: clamp(60px, 12vh, 140px); width: auto; }
.d-event .date-pill { font-size: clamp(.9rem, 1.5vw, 1.4rem); padding: .5vh 1.4vw; }
.d-clock { text-align: right; color: var(--ink); }
.d-clock #clock { color: var(--primary); font-style: italic; }
.d-clock #date { color: var(--muted); }
.d-main { padding: 1vh 2.4vw 2vh; }
.d-current {
  background: var(--cloud); color: var(--ink); border-radius: 28px; border: 3px solid var(--sky);
}
.d-label { color: var(--primary); }
.d-num { color: var(--primary); }
.d-to { color: var(--ink); }
.d-current.flash { animation: dflash 1s ease-in-out 3; }
@keyframes dflash { 50% { background: #fff1c7; border-color: #f2b400; } }
.d-counter { background: #fff; border: 2px solid var(--line); color: var(--ink); border-radius: 20px; }
.d-counter .d-cnum { color: var(--primary); }
.d-counter.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.d-counter.active .d-cnum { color: #fff; }
.d-foot { background: var(--primary); color: #dbe9ff; }
.d-foot b { color: #fff; }
.start-overlay { background: rgba(113, 196, 231, .96); color: var(--ink); }
.start-overlay p { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  body.display { height: auto; }
  .d-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .d-clock { text-align: center; }
}

@media print {
  body { background: #fff !important; }
}

/* Penyempurnaan */
.btn:focus-visible, input:focus-visible, select:focus-visible { outline-color: rgba(11, 90, 195, .35); }
.client .client-head { background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: var(--shadow); }
.topbar .brand-logo { height: 40px; }
.d-brand .brand-logo { height: clamp(56px, 11vh, 120px); }
.d-cname { white-space: nowrap; }
.counter-card.flash { border-color: #f2b400; box-shadow: 0 0 0 4px rgba(242, 180, 0, .25); }

/* ---------- Halaman HP: muat satu layar tanpa scroll ---------- */
body.client { min-height: 100vh; min-height: 100dvh; }
.client .client-wrap {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  gap: clamp(8px, 1.8dvh, 16px);
}
.client .client-head { margin: 0; padding: 8px 12px; }
.client .client-head .brand-logo { height: clamp(34px, 5.5dvh, 46px); }
.client .client-head .date-pill { font-size: clamp(.8rem, 3.6vw, .95rem); padding: 5px 12px; }

#pick { display: flex; flex-direction: column; gap: 6px; }
#pick .client-title { font-size: clamp(1.35rem, 6vw, 1.8rem); margin: 4px 0 0; }
#pick > p { margin: 0 0 4px; font-size: .9rem; }
#pick .service-list { margin-top: 6px; gap: 10px; }
.service-card { padding: clamp(10px, 1.8dvh, 18px) 14px; }
.service-code { width: 48px; height: 48px; font-size: 1.3rem; }

#ticketView:not([hidden]) { flex: 1; display: flex; flex-direction: column; gap: clamp(8px, 1.6dvh, 14px); min-height: 0; }
.client .ticket { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.client .ticket-top { padding: clamp(10px, 1.6dvh, 16px) 18px; font-size: .95rem; }
.client .ticket-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(10px, 2dvh, 24px) 14px; }
.client .ticket-number { font-size: min(27vw, 15dvh); margin: .5dvh 0 1.4dvh; }
.client .ticket-status { font-size: clamp(.9rem, 4vw, 1.05rem); text-align: center; }
.client .ticket-status.called { background: var(--amber); color: #fff; animation: pulse-amber 1.4s ease-in-out infinite; padding: 10px 16px; font-size: clamp(1rem, 4.6vw, 1.2rem); }
@keyframes pulse-amber { 50% { box-shadow: 0 0 0 8px rgba(184, 110, 0, .2); } }
.client .ticket-meta { padding: clamp(8px, 1.4dvh, 16px) 20px 0; grid-template-columns: 1fr; }
.client .ticket-meta div { grid-auto-flow: column; justify-content: space-between; align-items: baseline; }
.client .ticket-foot { padding: 6px 20px clamp(10px, 1.6dvh, 18px); font-size: .8rem; }
.client .actions { grid-template-columns: 1fr 1fr; margin: 0; gap: 10px; }
.client .actions .btn { padding: 12px 10px; }
.client .actions .btn.ghost { background: #fff; }

/* Antrean pengumuman */
.d-next { margin-top: 1.4vh; font-size: clamp(.9rem, 1.6vw, 1.4rem); color: var(--muted); min-height: 1.4em; }
.d-next b { color: var(--primary); font-style: italic; font-weight: 800; }
.announce-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(11, 90, 195, .35); font-weight: 600; display: flex; gap: 10px; align-items: center;
  white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.announce-bar b { font-style: italic; font-weight: 800; }
.ann-wait { background: rgba(255, 255, 255, .2); padding: 2px 10px; border-radius: 999px; font-size: .85rem; }

/* ---------- Teks tidak boleh terpotong ---------- */
#curNum, #curTo, .d-cname, .d-cnum, .now-num, .client .ticket-number {
  display: block; width: 100%; white-space: nowrap; overflow: hidden; text-align: center;
}
.d-current { min-width: 0; overflow: hidden; padding-left: 2.4vw; padding-right: 2.4vw; }
.d-main { min-width: 0; }
.d-counters { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.d-counter {
  flex-direction: column; align-items: stretch; justify-content: center; gap: .6vh;
  padding: 1.8vh 1.2vw; min-width: 0; overflow: hidden;
}
.d-cname { text-align: left; font-size: clamp(.95rem, 1.5vw, 1.5rem); }
.d-cnum { font-size: clamp(2rem, 4.4vw, 4.6rem); line-height: 1.05; }
.d-next { overflow-wrap: anywhere; }
.client .ticket-status { white-space: nowrap; overflow: hidden; max-width: 100%; }
.client .ticket-top { flex-wrap: wrap; }
.client .ticket-top span { overflow-wrap: anywhere; }
/* Nama ruangan panjang turun ke baris berikutnya, tidak dikecilkan */
.d-cname { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.2; }
#curTo, .client .ticket-status { overflow-wrap: anywhere; }
/* Nomor & nama di kotak ruangan tidak boleh menyusut sampai hilang */
.d-counter { overflow: visible; }
.d-cname, .d-cnum { flex-shrink: 0; }
.d-cnum { font-size: clamp(1.6rem, min(4.4vw, 7.5vh), 4.6rem); }
.d-counters { grid-auto-rows: min-content; }
.d-counters { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }

/* ---------- Form NIP ---------- */
.nip-view:not([hidden]) { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.nip-card {
  background: #fff; border-radius: 22px; border: 4px solid var(--sky); box-shadow: var(--shadow);
  padding: clamp(16px, 3dvh, 28px) 20px; display: grid; gap: 10px; text-align: center;
}
.nip-title-img { width: min(100%, 320px); height: auto; justify-self: center; margin-bottom: 4px; }
.nip-card .client-title { margin: 0; overflow-wrap: anywhere; }
.nip-card p { margin: 0; }
.nip-card input {
  font-size: 1.4rem; text-align: center; letter-spacing: .06em; padding: 14px; border-radius: 14px;
  border: 2px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums;
}
.nip-card input:focus { border-color: var(--primary); outline: none; }
.nip-card .form-error { min-height: 1.2em; font-size: .9rem; }
#confirmView .client-title { font-size: clamp(1.4rem, 7vw, 2rem); }
.client .ticket-top { gap: 4px 12px; }
.client .ticket-top .ticket-org { font-style: italic; font-weight: 800; }

/* ---------- Tab peserta ---------- */
.participant-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.participant-grid .panel { display: grid; gap: 12px; }
.file-input { padding: 10px; border: 2px dashed var(--line); border-radius: 12px; background: var(--cloud); width: 100%; }
.import-preview, .import-result { background: var(--cloud); border-radius: 12px; padding: 12px; font-size: .88rem; display: grid; gap: 8px; }
.import-result ul { margin: 0; padding-left: 18px; }
.rtable.mini td, .rtable.mini th { padding: 4px 6px; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.t-num { color: var(--primary); font-style: italic; font-weight: 800; }
.tag.st-waiting { background: var(--primary-soft); color: var(--primary); }
.tag.st-called { background: var(--amber-soft); color: var(--amber); }
.tag.st-done { background: var(--green-soft); color: var(--green); }
.tag.st-skipped { background: var(--red-soft); color: var(--red); }
.p-search { width: min(320px, 60%); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.danger-inline { border-top: 1px solid var(--line); padding-top: 10px; }
.stack-form.flat { margin-top: 6px; padding-top: 0; border-top: 0; }
.field { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); font-weight: 600; text-align: left; }
.field select { padding: 10px 12px; font-size: .95rem; border-radius: 10px; }
@media (max-width: 900px) { .participant-grid { grid-template-columns: 1fr; } }
.import-preview p, .import-result p { margin: 0; }

/* Koreksi status di riwayat panggilan */
.btn.xs { padding: 3px 9px; font-size: .75rem; border-radius: 8px; }
.call-row { align-items: flex-start; }
.call-main { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; flex: 1; min-width: 0; }
.call-name { width: 100%; color: var(--muted); }
.call-side { margin-left: auto; display: grid; justify-items: end; gap: 4px; flex: none; }
.call-side small { margin: 0; }

/* ---------- Pilih nama (PN dipakai beberapa orang) ---------- */
.pick-list { display: grid; gap: 8px; max-height: 46dvh; overflow-y: auto; padding: 2px; }
.pick-item {
  display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink);
}
.pick-item:hover { border-color: var(--primary); }
.pick-item.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(11, 90, 195, .15); }
.pick-name { font-weight: 800; font-style: italic; font-size: 1.1rem; color: var(--primary); overflow-wrap: anywhere; }
.pick-meta { font-size: .85rem; color: var(--muted); }
.pick-item.has-ticket .pick-meta b { color: var(--green); }
#pickTitle { line-height: 1.5; }
.info-text { color: var(--primary); }
.sheet-pick { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.sheet-pick p { margin: 0; }

/* ---------- Layar TV: identitas peserta ---------- */
.d-current { display: flex; flex-direction: column; justify-content: center; align-items: stretch; }
.d-num { font-size: clamp(5rem, min(12vw, 22vh), 14rem); margin: 1vh 0; }
.d-person { margin-bottom: 1.6vh; display: grid; gap: .6vh; }
.d-pname {
  display: block; width: 100%; white-space: nowrap; overflow: hidden; text-align: center;
  font-size: clamp(1.4rem, min(3.2vw, 6vh), 3.4rem); font-weight: 800; font-style: italic; color: var(--ink);
}
.d-pmeta { display: flex; flex-wrap: wrap; justify-content: center; gap: .4vh 1.6vw; font-size: clamp(1rem, min(1.8vw, 3.4vh), 1.9rem); color: var(--muted); }
.d-pmeta b { color: var(--primary); font-weight: 800; }
.d-cwho { display: block; width: 100%; white-space: nowrap; overflow: hidden; font-size: clamp(.8rem, 1.1vw, 1.15rem); font-weight: 600; opacity: .85; }
.d-counter.active .d-cwho { color: #fff; }
/* Tanpa tombol ganti PN: tombol unduh selebar kartu */
.client .actions { grid-template-columns: 1fr; }

/* ---------- Loket/zona dengan beberapa slot ---------- */
.chip.zone { background: var(--primary); color: #fff; }
.slot-meter { background: var(--cloud); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; }
.slot-text { font-size: .9rem; color: var(--muted); display: flex; align-items: baseline; gap: 4px; }
.slot-text b { font-size: 1.6rem; font-style: italic; font-weight: 800; color: var(--primary); }
.slot-text span { margin-left: auto; font-weight: 700; color: var(--green); }
.slot-meter.full .slot-text span { color: var(--amber); }
.slot-bar { height: 8px; background: #fff; border-radius: 99px; overflow: hidden; }
.slot-bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.slot-meter.full .slot-bar i { background: var(--amber); }
.slot-list { display: grid; max-height: 360px; overflow-y: auto; }
.slot-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.slot-row:first-child { border-top: 0; }
.slot-row .q-num { min-width: 46px; }
.slot-row .q-info { min-width: 120px; }
.slot-act { display: flex; gap: 4px; margin-left: auto; }
.counter-card.slots .counter-actions .pill { font-size: .78rem; }
.field.inline { display: flex; align-items: center; gap: 6px; }
.field.inline select { max-width: 200px; padding: 6px 8px; font-size: .85rem; }
.cfg-cap { width: 72px; padding: 6px 8px; }
.d-cslots { font-size: clamp(.75rem, 1vw, 1rem); font-weight: 700; opacity: .8; }
/* Label & tombol di kartu loket tidak melar / terpecah */
.chips { align-items: flex-start; }
.chip { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.pill { white-space: nowrap; }
.counter-actions .btn.lg { flex-wrap: wrap; row-gap: 4px; }
.counter-grid { align-items: start; } .counter-card { align-content: start; }
.grid-zone { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.grid-zone select, .grid-zone input { width: 100%; padding: 10px 12px; font-size: .95rem; border-radius: 10px; }
.counter-cfg { align-items: center; }
.counter-cfg .cfg-name { width: 100%; }

/* ---------- Layar TV: peserta yang sedang ditangani per loket/zona ---------- */
.d-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.d-counters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  grid-auto-rows: minmax(0, 1fr); align-content: stretch; overflow: hidden; height: 100%; min-height: 0;
}
.d-zone {
  background: #fff; border: 2px solid var(--line); border-radius: 20px; display: flex; flex-direction: column;
  min-height: 0; min-width: 0; overflow: hidden;
}
.d-zone.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 90, 195, .15); }
.d-zhead {
  display: flex; align-items: center; gap: 10px; padding: 1.2vh 1vw; background: var(--primary); color: #fff;
}
.d-zhead .d-cname { flex: 1; min-width: 0; font-weight: 800; font-style: italic; font-size: clamp(.95rem, 1.35vw, 1.5rem); white-space: normal; text-align: left; }
.d-zhead .d-cslots { flex: none; background: rgba(255, 255, 255, .2); border-radius: 99px; padding: .2vh .7vw; font-size: clamp(.8rem, 1vw, 1.1rem); font-weight: 700; opacity: 1; }
.d-zlist { flex: 1; min-height: 0; overflow: hidden; padding: .6vh .8vw; display: flex; flex-direction: column; gap: .4vh; }
.d-zrow { display: flex; align-items: center; gap: .8vw; padding: .7vh .6vw; border-radius: 12px; min-width: 0; flex: none; }
.d-zrow[hidden] { display: none; }
.d-zrow.now { background: var(--amber-soft); }
.d-znum { flex: none; color: var(--primary); font-style: italic; font-weight: 800; font-size: clamp(1.1rem, 1.7vw, 2rem); font-variant-numeric: tabular-nums; }
.d-zname { flex: 1; min-width: 0; display: block; white-space: nowrap; overflow: hidden; font-weight: 700; font-size: clamp(.9rem, 1.25vw, 1.45rem); color: var(--ink); }
.d-zempty { color: var(--muted); font-size: clamp(.85rem, 1.1vw, 1.2rem); padding: 1vh .4vw; }
.d-zmore { flex: none; color: var(--muted); font-weight: 700; font-size: clamp(.8rem, 1vw, 1.1rem); padding: .4vh .6vw; }
@media (max-width: 900px) { .d-counters { height: auto; grid-auto-rows: auto; } .d-zlist { max-height: 40vh; } }

/* ---------- Tata letak zona: pita panggilan di atas, kolom zona selebar layar ---------- */
.layout-zones .d-main { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 1.6vh; }
.layout-zones .d-current {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "label label" "num info";
  align-items: center; column-gap: 2.4vw; row-gap: 0; padding: 1.4vh 2.4vw; text-align: left;
}
.layout-zones .d-label { grid-area: label; font-size: clamp(.8rem, 1.1vw, 1.2rem); }
.layout-zones .d-num { grid-area: num; width: auto; font-size: clamp(3.5rem, min(9vw, 15vh), 10rem); margin: 0; text-align: left; }
.layout-zones .d-info { grid-area: info; min-width: 0; display: grid; gap: .6vh; }
.layout-zones .d-person { margin: 0; justify-items: start; }
.layout-zones .d-pname { text-align: left; font-size: clamp(1.3rem, min(2.8vw, 5vh), 3.2rem); }
.layout-zones .d-pmeta { justify-content: flex-start; font-size: clamp(.9rem, min(1.5vw, 2.8vh), 1.6rem); }
.layout-zones #curTo { text-align: left; font-size: clamp(1.1rem, min(2.2vw, 4vh), 2.6rem); }
.layout-zones .d-next { text-align: left; margin-top: .2vh; }
.layout-zones .d-counters { grid-template-columns: repeat(var(--zcols, 3), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
/* Pita panggilan lebih ringkas, baris zona lebih rapat */
.layout-zones .d-current { padding: 1vh 2vw; row-gap: .2vh; }
.layout-zones .d-label { font-size: clamp(.75rem, .9vw, 1rem); }
.layout-zones .d-num { font-size: clamp(3rem, min(7vw, 11vh), 8rem); line-height: 1; }
.layout-zones .d-pname { font-size: clamp(1.2rem, min(2.4vw, 4.2vh), 2.8rem); }
.layout-zones #curTo { font-size: clamp(1rem, min(1.9vw, 3.4vh), 2.2rem); }
.layout-zones .d-info { gap: .3vh; }
.d-zrow { padding: .45vh .5vw; }
.d-zlist { gap: .2vh; padding-bottom: 1vh; }
.client .actions.two { grid-template-columns: 1fr 1fr; }
.toggle-line { font-size: .92rem; color: var(--ink); gap: 8px; }
.zp-rows { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.zp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 4px 0; border-bottom: 1px solid var(--line); }
.zp-row input { width: 70px; text-align: center; text-transform: uppercase; font-weight: 800; font-style: italic; padding: 6px 8px; }

/* Petugas zona */
.zone-badge { background: var(--primary); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .85rem; white-space: nowrap; }
.zone-badge b { font-style: italic; font-weight: 800; }
.backup-panel { display: grid; gap: 12px; }
.backup-block { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.backup-block h4 { font-size: .95rem; margin: 0; }
.backup-block .btn { justify-self: start; }

/* ---------- Layar TV: mode "nomor saja" ---------- */
.d-zgrid {
  --chip: 32px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--chip) * 3.1), 1fr));
  align-content: start; gap: calc(var(--chip) * .22); padding: calc(var(--chip) * .3);
}
.d-chip {
  display: grid; place-items: center; height: calc(var(--chip) * 1.55); border-radius: calc(var(--chip) * .3);
  background: var(--primary-soft); color: var(--primary); font-style: italic; font-weight: 800;
  font-size: var(--chip); font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap;
}
.d-chip.now { background: #f2b400; color: #1c1300; }
.nowrap { white-space: nowrap; }
