@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --soft: #f7f9fa;
  --line: #e7ebee;
  --line-2: #d8dee3;
  --ink: #0f1f1a;
  --ink-2: #475569;
  --ink-3: #8a96a3;
  --brand: #1a7f37;
  --brand-2: #2aa04a;
  --brand-hover: #146a2d;
  --brand-soft: #e6f4e9;
  --green-1: #0d5a29;
  --gold: #f0b418;
  --gold-2: #d99a0b;
  --danger: #e11d48;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(15, 31, 26, .04), 0 6px 18px -10px rgba(15, 31, 26, .12);
  --shadow-lg: 0 24px 48px -16px rgba(15, 31, 26, .28);
  --ring: 0 0 0 4px rgba(42, 160, 74, .18);
  --font: "Poppins", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --side-w: 256px;
}

/* Warna status: titik/garis, latar lembut, teks */
.st-berlangsung, .room-berlangsung, .onair-berlangsung, .status-berlangsung, .tab-berlangsung { --st: #22a447; --st-soft: #e6f6ea; --st-ink: #15702f; }
.st-menunggu, .room-menunggu, .onair-menunggu, .status-menunggu, .tab-menunggu { --st: #f59e0b; --st-soft: #fef5e2; --st-ink: #b45309; }
.st-skors, .room-skors, .onair-skors, .status-skors, .tab-skors { --st: #3b82f6; --st-soft: #e8f0fe; --st-ink: #1d4ed8; }
.st-ditunda, .room-ditunda, .onair-ditunda, .status-ditunda, .tab-ditunda { --st: #f43f5e; --st-soft: #feecef; --st-ink: #be123c; }
.st-selesai, .room-selesai, .onair-selesai, .status-selesai, .tab-selesai { --st: #64748b; --st-soft: #eef1f5; --st-ink: #475569; }
.room-kosong, .onair-kosong, .status-kosong, .tab-kosong { --st: #cbd5e1; --st-soft: #f3f6f8; --st-ink: #8a96a3; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/1.6 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.i { width: 18px; height: 18px; flex: none; }
.mono { font-weight: 700; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--side-w);
  display: flex; flex-direction: column; color: #fff;
  background:
    radial-gradient(22rem 18rem at 0% 0%, rgba(255, 255, 255, .14), transparent 60%),
    linear-gradient(180deg, #1f8f3e 0%, #157a35 50%, #0e5f2b 100%);
  /* Garis tepi kanan: emas di luar, putih di dalam (seperti tepi logo) */
  box-shadow: inset -4px 0 0 var(--gold), inset -7px 0 0 rgba(255, 255, 255, .85);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--gold); opacity: .12;
  -webkit-mask: url("../img/kawung.svg") 0 0 / 44px 44px repeat; mask: url("../img/kawung.svg") 0 0 / 44px 44px repeat;
}
.sidebar > * { position: relative; }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px 18px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 6px 14px -6px rgba(10, 123, 87, .6);
}
.brand-mark .i { width: 20px; height: 20px; }
.brand-logo { flex: none; width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
.brand-logo-lg { display: block; width: 128px; height: 128px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .3)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { font-size: 12px; color: var(--gold); font-weight: 700; }

.nav { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px 10px 14px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  position: relative; color: rgba(255, 255, 255, .86); font-weight: 600; font-size: 14px; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; }
.nav-item .i { color: rgba(255, 255, 255, .7); transition: color .15s; }
.nav-item.is-active { background: #fff; color: var(--green-1); font-weight: 700; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45), inset 3px 0 0 var(--gold); }
.nav-item.is-active .i { color: var(--brand); }
.nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }

.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 12px 16px 14px 12px; padding: 10px 8px 10px 10px; border-radius: 14px; background: rgba(0, 0, 0, .16); border: 1px solid rgba(255, 255, 255, .14); }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; }
.me-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--green-1); font-weight: 700; flex: none; }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-text strong { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text small { font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.sidebar .icon-btn { color: rgba(255, 255, 255, .8); }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.me-actions { display: flex; gap: 0; }
.me-actions form { margin: 0; }

.main { flex: 1; min-width: 0; margin-left: var(--side-w); }
.topbar { display: none; }
.content { max-width: 1320px; margin: 0 auto; padding: 32px 36px 64px; }
.scrim { display: none; }

/* ---------- Page heading ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 27px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.page-sub { margin: 4px 0 0; color: var(--ink-3); font-weight: 500; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.back .i { width: 15px; height: 15px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2, .panel-head h2 { font-size: 15.5px; display: flex; align-items: center; gap: 9px; }
.panel-head h2 .i { color: var(--brand); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 14px; }
.count { min-width: 28px; padding: 2px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; text-align: center; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 16px; color: var(--ink-3); text-align: center; font-weight: 500; }
.empty .i { width: 46px; height: 46px; padding: 12px; border-radius: 14px; background: var(--soft); color: var(--ink-3); }
.empty p { margin: 0; }

.note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 18px; border-radius: var(--radius-sm); background: var(--brand-soft); color: #075c41; font-size: 13.5px; font-weight: 500; }
.note .i { width: 17px; height: 17px; flex: none; }
.note-block { align-items: flex-start; padding: 14px 16px; }
.note-block .i { margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 11px; background: none; font-weight: 700; font-size: 14px; line-height: 1;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-2); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 31, 26, .05); }
.btn-secondary:hover { background: var(--soft); border-color: #c5cdd3; }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #be123c; }
.btn-danger-text:hover { color: var(--danger); background: #feecef; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-sm .i { width: 15px; height: 15px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: none; color: var(--ink-3); cursor: pointer; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); }
.icon-btn-sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn-sm .i { width: 16px; height: 16px; }

/* ---------- Forms ---------- */
.form-panel { max-width: 720px; padding: 26px; }
.form-wide { max-width: 920px; }
.field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 20px; min-width: 0; border: 0; padding: 0; }
.label { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0; }
.label em { font-style: normal; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.hint { font-size: 12.5px; color: var(--ink-3); }
.error-text { font-size: 12.5px; color: var(--danger); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

input[type=text], input[type=password], input[type=tel], input[type=search], input[type=date], input[type=month], select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--surface);
  font-weight: 500; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: #a3adb8; font-weight: 500; }
textarea { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.55; }
select {
  padding-right: 36px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a96a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
input:hover, select:hover, textarea:hover { border-color: #c2cad1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: var(--ring); }
input:disabled { background: var(--soft); color: var(--ink-3); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }

.input-icon { position: relative; display: block; }
.input-icon > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.input-icon > input { padding-left: 42px; }
.grow { flex: 1; min-width: 200px; }

.nomor-input { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nomor-input input[name=no_perkara] { width: 96px; font-weight: 700; }
.nomor-input select { flex: 1; min-width: 190px; width: auto; }
.nomor-input .tahun { width: 82px; font-weight: 700; }
.nomor-input .slash { color: var(--ink-3); font-weight: 600; }
.nomor-input .suffix { color: var(--ink-3); font-size: 13.5px; font-weight: 600; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-option { position: relative; cursor: pointer; }
.chip-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-option span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 99px;
  background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: all .12s;
}
.chip-option:hover span { border-color: #b7c0c8; color: var(--ink); }
.chip-option input:checked + span { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand-2); }
.chip-option input:focus-visible + span { box-shadow: var(--ring); }
.chip-option input:disabled + span { opacity: .6; cursor: not-allowed; }

.switch { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { position: relative; flex: none; width: 42px; height: 24px; margin-top: 1px; border-radius: 99px; background: #d3dade; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.switch input:checked + .switch-ui { background: var(--brand-2); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--ring); }
.switch strong { display: block; font-weight: 700; }
.switch small { display: block; color: var(--ink-3); font-size: 12.5px; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.filters input[type=date] { width: 170px; }
.filters select { width: auto; min-width: 150px; }

.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 920px; margin-top: 16px; padding: 14px 20px; border: 1px dashed #f5b5c3; border-radius: var(--radius); color: var(--ink-2); font-weight: 600; }

/* ---------- Status & tags ---------- */
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 99px; background: var(--st-soft); color: var(--st-ink); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--st); }
.status-berlangsung i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--st); animation: ripple 1.6s ease-out infinite; }
@keyframes ripple { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; background: #eef1f5; color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag .i { width: 13px; height: 13px; }
.tag-ok { background: #e6f8f1; color: #047857; }
.tag-wait { background: #fef5e2; color: #b45309; }
.tag-danger { background: #feecef; color: #be123c; }
.tag-on { background: var(--brand); color: #fff; }

/* ---------- Flash ---------- */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; margin-bottom: 18px; border-radius: 13px; border: 1px solid; font-size: 14px; font-weight: 500; animation: rise .2s ease-out; }
.flash > .i { margin-top: 1px; }
.flash-body { flex: 1; }
.flash-success { background: #ecfaf4; border-color: #bfe9d6; color: #065f46; }
.flash-error { background: #fff1f3; border-color: #fbc6d0; color: #9f1239; }
.flash-info { background: #eef4ff; border-color: #c9dafc; color: #1e40af; }
.flash-password { background: #fffaeb; border-color: #f6dda0; color: #78350f; }
.flash-password .secret { display: inline-block; margin: 0 6px; padding: 2px 9px; border-radius: 7px; background: #fff; border: 1px solid #f6dda0; font-size: 15px; font-weight: 800; letter-spacing: .04em; user-select: all; }
.flash-password .muted { display: block; margin-top: 4px; font-size: 12.5px; }
.flash-close { border: 0; background: none; padding: 2px; color: inherit; opacity: .55; cursor: pointer; border-radius: 6px; }
.flash-close:hover { opacity: 1; }
.flash-close .i { width: 16px; height: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 28px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--st-soft, var(--brand-soft)); color: var(--st-ink, var(--brand)); }
.stat-icon .i { width: 21px; height: 21px; }
.stat dt { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.stat dd { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 24px; align-items: start; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.room {
  position: relative; display: flex; flex-direction: column; padding: 16px 18px 14px; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  background: var(--surface); box-shadow: inset 0 3px 0 var(--st), var(--shadow);
}
.room-kosong { background: var(--surface); }
.room.is-hidden { opacity: .55; background: var(--soft); box-shadow: none; }
.room.is-hidden .room-head .tag { margin-left: auto; }
.room-list-setting { list-style: none; margin: -26px -26px 8px; padding: 0; }
.room-list-setting li:first-child { border-top: 0; }
.room-list-setting li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--line); }
.room-list-setting .switch { margin: 0; }
.room-list-setting a { font-size: 13px; font-weight: 600; }
.room-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -6px 0 0; }
.room-name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-status { margin-top: 8px; }
.status-kosong { box-shadow: inset 0 0 0 1px var(--line); }
.room-case { margin-top: 10px; font-size: 19px; font-weight: 800; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-case-empty { color: #c5cdd3; }
.room-sub { font-size: 13px; color: var(--ink-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.room-meta { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }

.inbox { position: sticky; top: 24px; padding: 18px 0 6px; }
.inbox .panel-head { padding: 0 18px; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #10b981; animation: ripple 1.8s ease-out infinite; }
.inbox-list { list-style: none; margin: 0; padding: 0 10px 6px; max-height: calc(100vh - 150px); overflow-y: auto; }
.inbox-item { margin-top: 8px; padding: 14px; border-radius: 13px; background: var(--soft); border: 1px solid var(--line); animation: rise .25s ease-out; }
.inbox-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.inbox-no { font-size: 15px; }
.people { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.people li { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.people strong { font-weight: 700; }
.people span { color: var(--ink-3); font-size: 12.5px; font-weight: 500; text-align: right; }
.inbox-match { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: #fef5e2; color: #b45309; font-size: 12px; font-weight: 700; }
.inbox-match .i { width: 14px; height: 14px; }
.inbox-match.is-match { background: #e6f8f1; color: #047857; }
.inbox-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.inbox-actions form { margin: 0; }

/* ---------- Ruang ---------- */
.room-tabs { display: flex; gap: 6px; margin-bottom: 20px; padding: 5px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); scrollbar-width: none; }
.room-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px;
  color: var(--ink-2); font-weight: 700; font-size: 13.5px; white-space: nowrap; flex: none;
}
.room-tab:hover { text-decoration: none; background: var(--soft); color: var(--ink); }
.room-tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--st, #d3dade); }
.room-tab.is-active { background: var(--brand); color: #fff; }

.onair { position: relative; padding: 0; overflow: hidden; background: var(--surface); }
.onair::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--st); }
.onair-label { display: inline-flex; align-items: center; gap: 7px; margin: 20px 22px 0; padding: 5px 11px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.onair-label .i { width: 14px; height: 14px; color: var(--brand); }
.onair-body { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 16px 22px 22px; }
.onair-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.onair-no { margin-top: 12px; font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -.025em; word-break: break-word; }
.onair-meta { margin-top: 4px; color: var(--ink-2); font-weight: 500; }
.onair-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 0; }
.onair-parties > div { padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.onair-parties dt { font-size: 11.5px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.onair-parties dd { margin: 3px 0 0; font-weight: 600; }
.onair-actions { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.onair-actions form { margin: 0; }
.onair-actions .btn { width: 100%; }
.onair-empty { padding: 14px 22px 26px; color: var(--ink-3); font-weight: 500; }
.onair-empty p { margin: 0; }

.queue { list-style: none; margin: 0 -22px -22px; padding: 0; }
.queue-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); transition: background .15s; }
.queue-item:hover { background: #fafbfc; }
.queue-item.is-on { background: #f3fbf7; }
.queue-item.q-selesai .queue-no, .queue-item.q-ditunda .queue-no { color: var(--ink-3); }
.queue-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2); }
.queue-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.queue-no { font-size: 16px; }
.queue-meta { margin-top: 3px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.queue-hadir { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.queue-hadir .i { width: 14px; height: 14px; color: #10b981; }
.queue-hadir em { font-style: normal; font-weight: 500; color: var(--ink-3); }
.queue-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.queue-actions form { margin: 0; }

/* ---------- Pos ---------- */
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.pos-grid .form-panel { max-width: none; }
.log-list { list-style: none; margin: 0 -22px -22px; padding: 0; max-height: 640px; overflow-y: auto; }
.log-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); }
.log-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.log-main strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-meta { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.log-meta .mono { color: var(--ink-2); }
.log-side { display: flex; align-items: center; gap: 4px; }
.log-side form { margin: 0; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 12px 18px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: left; white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td strong { font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #fafbfc; }
.table .is-muted td { color: var(--ink-3); }
.table-compact td { padding: 9px 18px; font-size: 13.5px; }
.cell-actions { white-space: nowrap; text-align: right; }
.cell-actions > * { display: inline-flex; vertical-align: middle; }
.cell-actions form { margin: 0; }
.cell-parties { font-size: 13.5px; }
.cell-parties em { font-style: normal; color: var(--ink-3); font-size: 12px; font-weight: 600; }

/* ---------- Dialog ---------- */
.dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px; box-shadow: var(--shadow-lg); color: var(--ink); }
.dialog::backdrop { background: rgba(15, 31, 26, .35); backdrop-filter: blur(3px); }
.dialog-body { display: flex; gap: 14px; padding: 24px 24px 8px; }
.dialog-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 13px; background: #fef5e2; color: #b45309; }
.dialog-body strong { font-size: 16px; }
.dialog-body p { margin: 6px 0 0; color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; padding: 16px; gap: 16px; background: var(--bg); }
.auth-side {
  position: relative; display: flex; align-items: flex-end; padding: 56px; color: #fff; overflow: hidden; border-radius: 26px;
  background:
    radial-gradient(34rem 24rem at 90% 10%, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(30rem 22rem at 0% 100%, rgba(0, 0, 0, .25), transparent 60%),
    linear-gradient(145deg, #25993f, #17803a 50%, #0d5a29);
}
.auth-side::before {
  content: ""; position: absolute; inset: 0; background: var(--gold); opacity: .16;
  -webkit-mask: url("../img/kawung.svg") 0 0 / 52px 52px repeat; mask: url("../img/kawung.svg") 0 0 / 52px 52px repeat;
}
/* Bingkai emas + putih */
.auth-side::after {
  content: ""; position: absolute; inset: 16px; border: 3px solid var(--gold); border-radius: 18px; pointer-events: none;
  outline: 1.5px solid rgba(255, 255, 255, .8); outline-offset: -9px;
}
.auth-side-inner { position: relative; max-width: 460px; }
.brand-mark-lg { width: 56px; height: 56px; border-radius: 16px; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.brand-mark-lg .i { width: 28px; height: 28px; }
.auth-inst { display: inline-block; margin: 26px 0 10px; padding: 5px 13px; border-radius: 99px; background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(240, 180, 24, .6); color: #ffd860; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.auth-app { font-size: 52px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.auth-sub { margin: 12px 0 0; color: rgba(255,255,255,.8); font-size: 17px; font-weight: 500; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 370px; }
.auth-card-head { margin-bottom: 26px; }
.auth-card-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.auth-mobile-mark { display: none; }
.auth-foot { margin-top: 40px; color: var(--ink-3); font-size: 12.5px; font-weight: 500; }

.error-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.error-box { text-align: center; max-width: 420px; }
.error-code { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 800; }
.error-box h1 { margin: 14px 0 10px; font-size: 26px; font-weight: 800; }
.error-box p { color: var(--ink-2); margin: 0 0 22px; }

.wa-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: #128c4b; font-size: 12.5px; font-weight: 700; }
.wa-link .i { width: 13px; height: 13px; }
.wa-link:hover { color: #0b6b38; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 2px 8px 2px 6px; border-radius: 99px;
  background: #e7f8ee; color: #128c4b; font-size: 11.5px; font-weight: 800; vertical-align: middle; transition: background .15s;
}
.wa-btn:hover { background: #cdf0db; text-decoration: none; }
.wa-btn .i { width: 12px; height: 12px; }
.wa-mode { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.wa-mode-label { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 6px; color: #128c4b; font-size: 12px; font-weight: 800; }
.wa-mode-label .i { width: 14px; height: 14px; }
.wa-mode button { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-size: 12px; font-weight: 700; cursor: pointer; }
.wa-mode button:hover { color: var(--ink); }
.wa-mode button.is-active { background: var(--surface); color: #128c4b; box-shadow: 0 1px 3px rgba(15, 31, 26, .12); }
.inbox-tools { padding: 0 18px 4px; }

/* ---------- Laporan ---------- */
.seg { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.seg-item { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.seg-item .i { width: 16px; height: 16px; }
.seg-item:hover { text-decoration: none; background: var(--soft); color: var(--ink); }
.seg-item.is-active { background: var(--brand-soft); color: var(--brand); }
.filters-end { display: flex; gap: 8px; margin-left: auto; }
.filters input[type=month] { width: 190px; }

.report { padding: 44px 48px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: #111; }
.report h3 { margin: 30px 0 10px; font-size: 14px; font-weight: 800; letter-spacing: -.01em; }

.kop { display: flex; align-items: center; gap: 20px; padding-bottom: 14px; border-bottom: 4px double #111; }
.kop-logo { flex: none; width: 76px; height: 76px; object-fit: contain; }
.kop-text { flex: 1; text-align: center; padding-right: 76px; }
.kop-text p { margin: 0; }
.kop-induk { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kop-nama { margin-top: 2px !important; font-size: 21px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.kop-alamat { margin-top: 4px !important; font-size: 12px; color: #444; }

.report-title { margin: 22px 0 18px; text-align: center; }
.report-title h2 { font-size: 17px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.report-title p { margin: 4px 0 0; color: #444; font-weight: 500; }

.report-stats { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; border: 1px solid #cfd6dc; border-radius: 12px; overflow: hidden; }
.report-stats > div { padding: 12px 14px; border-right: 1px solid #cfd6dc; background: #fafbfc; }
.report-stats > div:last-child { border-right: 0; }
.report-stats dt { font-size: 11.5px; font-weight: 600; color: #5b6670; }
.report-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; align-items: start; }

.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.doc-table th, .doc-table td { padding: 7px 10px; border: 1px solid #cfd6dc; text-align: left; vertical-align: top; }
.doc-table th { background: #eef2f4; font-size: 11.5px; font-weight: 800; color: #222; white-space: nowrap; }
.doc-table .num { text-align: right; }
.doc-table tfoot td { background: #f6f8f9; font-weight: 800; }
.doc-table tr.is-zero td { color: #9aa4ad; }
.doc-table .muted { font-size: 11.5px; }
.doc-detail { font-size: 12.5px; }
.doc-parties em { font-style: normal; color: #5b6670; }
.doc-empty { padding: 18px !important; text-align: center !important; color: #8a96a3; }
.doc-status { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; background: #eef1f5; color: #475569; }
.doc-selesai { background: #e6f8f1; color: #047857; }
.doc-ditunda { background: #feecef; color: #be123c; }
.doc-menunggu { background: #fef5e2; color: #b45309; }
.doc-berlangsung { background: #e6f8f1; color: #047857; }
.doc-skors { background: #e8f0fe; color: #1d4ed8; }

.bar { display: inline-block; width: 56px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 99px; background: #e7ebee; overflow: hidden; }
.bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand); }

.sign { margin-top: 36px; break-inside: avoid; page-break-inside: avoid; }
.sign-place { margin: 0 0 6px; text-align: right; padding-right: 40px; }
.sign-cols { display: flex; justify-content: space-between; gap: 40px; padding: 0 40px; }
.sign-cols > div { min-width: 240px; text-align: center; }
.sign-cols p { margin: 0; }
.sign-space { height: 72px; }
.sign-name { font-weight: 800; text-decoration: underline; }
.report-meta { margin: 28px 0 0; font-size: 11px; color: #8a96a3; text-align: center; }

@media (max-width: 900px) {
  .report { padding: 22px 16px; }
  .report-stats { grid-template-columns: repeat(3, 1fr); }
  .report-stats > div { border-bottom: 1px solid #cfd6dc; }
  .report-grid { grid-template-columns: 1fr; }
  .kop-logo { width: 54px; height: 54px; }
  .kop-text { padding-right: 0; }
  .kop-nama { font-size: 16px; }
  .sign-cols { padding: 0; gap: 16px; }
  .sign-cols > div { min-width: 0; flex: 1; }
  .filters-end { width: 100%; margin-left: 0; }
  .filters-end > * { flex: 1; }
}

/* ---------- Cetak ---------- */
@page { size: A4 landscape; margin: 12mm 12mm 14mm; }
@media print {
  html, body { background: #fff !important; font-size: 10pt; }
  .sidebar, .topbar, .scrim, .flash, .no-print, .dialog { display: none !important; }
  .main { margin: 0 !important; }
  .content { max-width: none; padding: 0 !important; }
  .report { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .report h3 { margin-top: 16px; font-size: 10.5pt; break-after: avoid; page-break-after: avoid; }
  .report-grid { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .report-stats { grid-template-columns: repeat(6, 1fr); }
  .report-stats dd { font-size: 14pt; }
  .table-wrap { overflow: visible; }
  .doc-table { font-size: 8.5pt; }
  .doc-table thead { display: table-header-group; }
  .doc-table tr { break-inside: avoid; page-break-inside: avoid; }
  .doc-table th, .doc-table td { padding: 4px 6px; }
  .kop-logo { width: 64px; height: 64px; }
  .kop-text { padding-right: 64px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .dash-grid, .pos-grid { grid-template-columns: 1fr; }
  .inbox { position: static; order: -1; }
  .inbox-list { max-height: 440px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15, 31, 26, .35); backdrop-filter: blur(2px); }
  .main { margin-left: 0; }
  .topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 10px;
    color: #fff; background: linear-gradient(180deg, #1f8f3e, #157a35);
    box-shadow: inset 0 -3px 0 var(--gold), inset 0 -5px 0 rgba(255, 255, 255, .8), 0 4px 14px -6px rgba(0, 0, 0, .35);
  }
  .topbar-title { flex: 1; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .icon-btn { color: #fff; }
  .topbar .icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
  .dot-badge { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; }
  .content { padding: 22px 16px 48px; }
  .page-head h1 { font-size: 23px; }
  .onair-body { grid-template-columns: 1fr; }
  .onair-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .onair-actions form { flex: 1 1 40%; }
  .onair-actions .btn { height: 46px; font-size: 14.5px; }
  .auth { grid-template-columns: 1fr; padding: 0; }
  .auth-side { display: none; }
  .auth-mobile-mark { display: block; width: 64px; height: 64px; margin-bottom: 18px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .field-row { grid-template-columns: 1fr; }
  .form-panel { padding: 20px 16px; }
  .form-actions .btn { flex: 1 1 100%; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .stat dd { font-size: 22px; }
  .onair-no { font-size: 28px; }
  .onair-parties { grid-template-columns: 1fr; }
  .queue-item { grid-template-columns: 32px minmax(0, 1fr); }
  .queue-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 46px; }
  .filters > * { flex: 1 1 100%; width: 100% !important; }
  .nomor-input select { min-width: 0; flex-basis: 100%; order: -1; }
  .nomor-input .slash ~ .slash { display: none; }
  .rooms { grid-template-columns: 1fr; }
  .chip-option span { height: 42px; }

  /* Tabel menjadi kartu */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--ink-3); font-size: 12.5px; text-align: left; font-weight: 600; }
  .table td.cell-actions { justify-content: flex-end; padding-top: 8px; }
  .table td.cell-actions::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
