/*!
 * SERUNI — Sistem Elektronik Rawat, UGD & Informasi Bed
 * RS Hermina Serpong
 * File   : assets/css/app.css
 * Fungsi : Seluruh tampilan aplikasi (tema terang & gelap, responsif HP s.d. desktop,
 *          layar display TV, dan gaya cetak). Tanpa CDN, font dimuat dari folder assets.
 * © 2026 Agung Putra D — IT RSH Serpong
 */

/* ==================== FONT ==================== */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-medium.woff') format('woff');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/poppins-bold.woff') format('woff');
    font-weight: 600 800;
    font-style: normal;
    font-display: swap;
}

/* ==================== TOKEN ==================== */
:root {
    --brand: #15432a;
    --brand-2: #2f8f46;
    --brand-3: #59c26e;
    --sun: #ffd21f;
    --ember: #f26b1d;

    --bg: #f2f6f1;
    --bg-2: #e6ede6;
    --surface: #ffffff;
    --surface-2: #f8faf8;
    --line: #dde6dd;
    --line-2: #eef3ee;
    --ink: #17241c;
    --ink-2: #445448;
    --muted: #6d7f72;
    --shadow: 0 1px 2px rgba(19, 48, 30, .06), 0 8px 24px -12px rgba(19, 48, 30, .18);
    --shadow-lg: 0 12px 40px -16px rgba(19, 48, 30, .34);
    --r: 14px;
    --r-sm: 9px;
    --r-lg: 20px;
    --sb: 254px;
    --gap: 16px;
    --ff: 'Poppins', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

/* nada warna: --t = warna utama, --tw = latar lembut */
.t-green, .b-green, .c-green, .f-green { --t: #2f8f46; --tw: #e6f4ea; }
.t-teal, .b-teal, .c-teal, .f-teal { --t: #0d8a82; --tw: #e0f3f1; }
.t-sky, .b-sky, .c-sky, .f-sky { --t: #1c8dc4; --tw: #e2f1fa; }
.t-blue, .b-blue, .c-blue, .f-blue { --t: #2563c9; --tw: #e5edfb; }
.t-violet, .b-violet, .c-violet, .f-violet { --t: #7552d6; --tw: #eee9fc; }
.t-amber, .b-amber, .c-amber, .f-amber { --t: #c7780a; --tw: #fdf0dc; }
.t-orange, .b-orange, .c-orange, .f-orange { --t: #e07a19; --tw: #fdeede; }
.t-coral, .b-coral, .c-coral, .f-coral { --t: #e0562b; --tw: #fdebe4; }
.t-red, .b-red, .c-red, .f-red { --t: #d8342a; --tw: #fce8e6; }
.t-pink, .b-pink, .c-pink, .f-pink { --t: #cc3f74; --tw: #fce9f1; }
.t-slate, .b-slate, .c-slate, .f-slate { --t: #5f7166; --tw: #eaefea; }
.t-dark, .b-dark, .c-dark, .f-dark { --t: #26312b; --tw: #e6e9e7; }
.t-gray, .b-gray, .c-gray { --t: #6d7f72; --tw: #edf1ed; }

[data-theme="dark"] {
    --bg: #101713;
    --bg-2: #0b110d;
    --surface: #17211a;
    --surface-2: #1d2921;
    --line: #2a382e;
    --line-2: #223028;
    --ink: #e8f0ea;
    --ink-2: #bccbc0;
    --muted: #8fa295;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 16px 44px -18px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

/* atribut hidden harus selalu menang atas display: flex/grid pada kelas komponen */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--ff);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .4em; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .6em; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
small { font-size: .82em; }
b, strong { font-weight: 700; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; }
.wrap-md { max-width: 34ch; }
.strong { font-weight: 700; }
.inline { display: inline; }
.req { color: #d8342a; }
.ic { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }

:focus-visible { outline: 3px solid var(--brand-3); outline-offset: 2px; border-radius: 4px; }

/* ==================== TOMBOL ==================== */
.btn {
    display: inline-flex; align-items: center; gap: .45em; justify-content: center;
    padding: .55rem .95rem; border-radius: var(--r-sm); border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none;
    background: var(--surface); color: var(--ink); transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(150deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 6px 16px -8px rgba(21, 67, 42, .8); }
.btn-primary:hover { background: linear-gradient(150deg, var(--brand-3), var(--brand-2)); }
.btn-soft { background: var(--tw, #e6f4ea); color: var(--t, var(--brand)); border-color: transparent; }
[data-theme="dark"] .btn-soft { background: rgba(255, 255, 255, .07); color: var(--brand-3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: #d8342a; color: #fff; }
.btn-danger:hover { background: #b9281f; }
.btn.danger { color: #d8342a; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-xs { padding: .25rem .55rem; font-size: .78rem; border-radius: 7px; }
.btn-lg { padding: .7rem 1.2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--gap); }

/* ==================== BADGE, CHIP, FLAG ==================== */
.badge {
    display: inline-flex; align-items: center; gap: .3em; padding: .18em .55em; border-radius: 999px;
    font-size: .76rem; font-weight: 700; background: var(--tw, #eaefea); color: var(--t, var(--ink-2)); white-space: nowrap;
}
[data-theme="dark"] .badge { background: transparent; box-shadow: inset 0 0 0 1px var(--t); }
.chip {
    display: inline-flex; align-items: center; gap: .3em; padding: .2em .6em; border-radius: 999px;
    font-size: .78rem; font-weight: 600; background: var(--tw, #eaefea); color: var(--t, var(--ink-2));
}
[data-theme="dark"] .chip { background: rgba(255, 255, 255, .06); color: var(--t); }
.chip .ic { width: 1em; height: 1em; }
.flags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.flag { display: inline-block; padding: .1em .45em; border-radius: 6px; font-size: .7rem; font-weight: 700; background: var(--t); color: #fff; }
.tri-badge { display: inline-flex; align-items: center; gap: .35em; padding: .18em .6em; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; background: var(--t); }
.jk { display: inline-flex; width: 1.25em; height: 1.25em; align-items: center; justify-content: center; border-radius: 5px; font-size: .72rem; font-weight: 700; color: #fff; }
.jk-l { background: #1c8dc4; }
.jk-p { background: #cc3f74; }
.role-chip { display: inline-flex; padding: .16em .55em; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #fff; background: var(--c, var(--brand)); }
.rank { display: inline-flex; width: 1.9em; height: 1.9em; align-items: center; justify-content: center; border-radius: 8px; font-weight: 700; font-size: .8rem; background: var(--surface-2); color: var(--muted); }
.rank.r1 { background: #ffd21f; color: #4a3500; }
.rank.r2 { background: #d8e0d9; color: #33423a; }
.rank.r3 { background: #f0c08a; color: #5b3a12; }
.yes { color: var(--brand-2); }
.no { color: var(--muted); }

/* ==================== KERANGKA APLIKASI ==================== */
.app { display: flex; min-height: 100vh; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
    width: var(--sb); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    background: linear-gradient(185deg, #15432a 0%, #11351f 60%, #0d2a19 100%); color: #dbe9df;
    display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; z-index: 40;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; color: #fff; }
.sb-brand:hover { text-decoration: none; }
.sb-logo { width: 42px; height: 42px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .7); }
.sb-logo img { width: 30px; height: auto; display: block; }
.sb-name b { display: block; font-size: 1.15rem; letter-spacing: .04em; }
.sb-name small { display: block; font-size: .72rem; color: #9ec4ab; }
.sb-nav { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; }
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-title { margin: 0 0 4px; padding-left: 12px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--t, #7fae8d); }
.sb-link {
    display: flex; align-items: center; gap: 10px; padding: .5rem .7rem; border-radius: 10px;
    color: #cfe2d5; font-size: .9rem; font-weight: 500; border-left: 3px solid transparent;
}
.sb-link:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.sb-link.active { background: rgba(255, 255, 255, .12); color: #fff; border-left-color: var(--t, var(--brand-3)); font-weight: 700; }
.sb-link .ic { color: var(--t, #8fc6a0); }
.sb-link span { flex: 1 1 auto; }
.sb-badge { font-style: normal; font-size: .7rem; font-weight: 700; background: var(--ember); color: #fff; border-radius: 999px; padding: .05em .45em; }
.sb-ext { width: .85em; height: .85em; opacity: .5; }
.sb-user { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border-top: 1px solid rgba(255, 255, 255, .12); }
.sb-user-info b { display: block; font-size: .82rem; color: #fff; }
.sb-user-info small { display: block; font-size: .7rem; color: #9ec4ab; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--c, var(--brand-2)); color: #fff; font-size: .8rem; font-weight: 700; flex: none; }
.avatar-lg { width: 52px; height: 52px; font-size: 1.1rem; border-radius: 16px; }

.topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { background: var(--surface); } }
.tb-title { min-width: 0; }
.tb-title b { display: block; font-size: .98rem; }
.tb-title span { display: block; font-size: .75rem; color: var(--muted); }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-search { position: relative; display: flex; align-items: center; }
.tb-search .ic { position: absolute; left: 10px; color: var(--muted); }
.tb-search input[type="search"] { width: 220px; padding: .45rem .7rem .45rem 2.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; font-size: .85rem; color: var(--ink); }
.tb-user { display: flex; align-items: center; gap: 8px; padding: .25rem .5rem .25rem .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.tb-user-name { font-size: .85rem; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown { position: relative; }
.menu-pop {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
}
.menu-pop a { display: flex; align-items: center; gap: 8px; padding: .5rem .6rem; border-radius: 8px; color: var(--ink); font-size: .88rem; }
.menu-pop a:hover { background: var(--surface-2); text-decoration: none; }
.menu-pop a.danger { color: #d8342a; }
.menu-head { padding: .5rem .6rem; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menu-head b { display: block; font-size: .9rem; }
.menu-head span { font-size: .75rem; color: var(--muted); }
.i-sun { display: none; }
[data-theme="dark"] .i-moon { display: none; }
[data-theme="dark"] .i-sun { display: inline-block; }

.content { flex: 1 1 auto; padding: 20px 18px 40px; max-width: 1560px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.ph-text { min-width: 0; flex: 1 1 320px; }
.page-title { margin: 0; font-size: 1.5rem; }
.page-sub { margin: .2em 0 0; color: var(--muted); font-size: .9rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 18px 20px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(9, 22, 14, .45); z-index: 35; }
.backdrop.on { display: block; }
.bottom-nav { display: none; }
.only-mobile { display: none; }

/* ==================== KARTU & KPI ==================== */
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.grid-tempat { display: grid; grid-template-columns: minmax(250px, 330px) minmax(320px, 1.25fr) minmax(280px, 1fr); gap: var(--gap); align-items: start; }
.grid-2 > *, .grid-3 > *, .grid-tempat > *, .dash-grid > *, .kpis > *, .card, .card-body { min-width: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: var(--gap); }
.stack > .card, .grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; }
.card-title { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: .45em; }
.card-title .ic { color: var(--brand-2); }
.card-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-body { padding: 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); font-size: .85rem; border-radius: 0 0 calc(var(--r) - 1px) calc(var(--r) - 1px); }
.card-alert { border-color: #f4ddb9; }
.filters-card .card-body { padding: 10px 12px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.kpis-sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
    border-left: 4px solid var(--t, var(--brand-2)); color: inherit;
}
a.kpi:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.kpi-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tw); color: var(--t); flex: none; }
[data-theme="dark"] .kpi-ic { background: rgba(255, 255, 255, .07); }
.kpi-body { min-width: 0; }
.kpi-val { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.kpi-val small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.kpi-lbl { display: block; font-size: .82rem; color: var(--ink-2); }
.kpi-sub { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }

/* ==================== TABEL ==================== */
.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: .6rem .6rem; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tfoot th { border-top: 2px solid var(--line); font-size: .85rem; background: var(--surface-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-sm { font-size: .82rem; }
.tbl-sm th, .tbl-sm td { padding: .42rem .5rem; }
.tbl-sensus { font-variant-numeric: tabular-nums; }
.tbl-sensus thead th { text-align: center; }
.row-off td { opacity: .58; }
.row-live { background: linear-gradient(90deg, rgba(226, 86, 43, .1), transparent 40%); }
.row-ready { background: linear-gradient(90deg, rgba(47, 143, 70, .12), transparent 45%); }
.matrix td { text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.pt b { display: block; }
.pt small { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: .76rem; }
.loc { border-left: 3px solid var(--w, var(--line)); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; font-size: .84rem; }
.pager-links { display: flex; flex-wrap: wrap; gap: 5px; }

/* ==================== FORM ==================== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .field > label > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); display: flex; gap: .3em; align-items: center; }
.field .hint { font-size: .74rem; color: var(--muted); font-weight: 400; }
.static { margin: 0; padding-top: .2rem; }
input[type="text"], input[type="search"], input[type="password"], input[type="number"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="tel"], input:not([type]), select, textarea {
    width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; min-height: 40px;
}
textarea { min-height: 70px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input, select, textarea { min-width: 0; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); outline: none; box-shadow: 0 0 0 3px rgba(47, 143, 70, .16); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[type="color"] { padding: 3px; height: 40px; }
.input-btn { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.input-btn input { flex: 1 1 130px; min-width: 0; }
.input-btn .btn { flex: none; }
.check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: .5em; font-size: .88rem; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand-2); }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { flex: 1 1 180px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { flex: 0 1 165px; }
.filters .field.grow { flex: 1 1 220px; }
.filters .btn { min-height: 40px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: .35rem .75rem; border-radius: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg span small { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); }
.seg input:checked + span { background: var(--brand-2); color: #fff; }
.seg input:checked + span small { color: rgba(255, 255, 255, .8); }
.seg input:focus-visible + span { outline: 2px solid var(--brand-3); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 2.6rem; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; }
.ac-wrap { position: relative; }
.ac-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; z-index: 40; }
.ac-list button { display: block; width: 100%; text-align: left; padding: .5rem .7rem; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); }
.ac-list button:hover, .ac-list button.on { background: var(--tw, #e6f4ea); }
.ac-list b { display: block; }
.ac-list small { color: var(--muted); }
.subbox { margin-top: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface-2); }
.subbox h3 { display: flex; align-items: center; gap: .4em; font-size: .9rem; margin-bottom: .6em; }
.copy-row { display: flex; gap: 6px; margin-bottom: 8px; }
.copy-row input { flex: 1 1 auto; font-size: .8rem; }

/* triage & penanda */
.tri-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.tri { position: relative; display: block; }
.tri input { position: absolute; opacity: 0; }
.tri span { display: block; padding: .6rem .8rem; border: 2px solid var(--line); border-left: 6px solid var(--t); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.tri b { display: block; color: var(--t); }
.tri small { color: var(--muted); font-size: .74rem; line-height: 1.3; display: block; }
.tri input:checked + span { border-color: var(--t); background: color-mix(in srgb, var(--t) 12%, var(--surface)); box-shadow: 0 6px 16px -10px var(--t); }
.tri-stat { display: flex; flex-direction: column; justify-content: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--t); color: inherit; box-shadow: var(--shadow); }
.tri-stat:hover { text-decoration: none; transform: translateY(-1px); }
.tri-stat.on { background: color-mix(in srgb, var(--t) 12%, var(--surface)); }
.tri-stat b { font-size: 1.5rem; color: var(--t); line-height: 1.1; }
.tri-stat span { font-size: .8rem; color: var(--ink-2); }
.flag-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.flag-opt { position: relative; }
.flag-opt input { position: absolute; opacity: 0; }
.flag-opt span { display: block; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; cursor: pointer; }
.flag-opt input:checked + span { background: var(--t); border-color: var(--t); color: #fff; }

/* pilihan yang bisa diketik (combobox) */
.combo { position: relative; }
.combo-src { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.combo-btn {
    position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px;
    padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.combo-btn:hover { border-color: var(--brand-3); }
.combo-btn[disabled] { opacity: .6; cursor: not-allowed; }
.combo-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-label.kosong { color: var(--muted); }
.combo-caret { flex: none; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--muted); }
.combo.buka .combo-btn { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 143, 70, .16); }
.combo-pop {
    position: fixed; z-index: 90; width: max-content; max-width: min(380px, 88vw);
    padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
}
.combo-pop[hidden] { display: none; }
.combo-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 244px; overflow-y: auto; }
.combo-list li { padding: .42rem .55rem; border-radius: 7px; font-size: .87rem; cursor: pointer; }
.combo-list li.on, .combo-list li:hover { background: #e6f4ea; color: #17532c; }
[data-theme="dark"] .combo-list li.on, [data-theme="dark"] .combo-list li:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.combo-list li.terpilih { font-weight: 700; }
.combo-list li.combo-grup { cursor: default; background: none; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .5rem .55rem .15rem; }
.combo-kosong { margin: .5rem .55rem 0; color: var(--muted); font-size: .84rem; }

/* ==================== ALERT, EMPTY, TAB, MODAL ==================== */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); margin-bottom: var(--gap); border: 1px solid; font-size: .88rem; }
.alert .ic { flex: none; margin-top: .15em; }
.alert-msg { flex: 1 1 auto; }
.alert-x { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .6; }
.alert-success { background: #e6f4ea; border-color: #b9dcc4; color: #17532c; }
.alert-error { background: #fce8e6; border-color: #f2bdb7; color: #8c1f18; }
.alert-warn { background: #fdf3dd; border-color: #f0d69a; color: #78520a; }
.alert-info { background: #e2f1fa; border-color: #b2d8ec; color: #124f6f; }
[data-theme="dark"] .alert { background: var(--surface-2); color: var(--ink); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 38px; height: 38px; color: var(--line); margin-bottom: 8px; }
.empty h3 { color: var(--ink-2); }
.empty p { max-width: 46ch; margin: 0 auto .8em; font-size: .88rem; }
.sec-title { display: flex; align-items: center; gap: .45em; font-size: 1rem; margin: 20px 0 10px; }
.sec-title em { font-style: normal; font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: .05em .5em; color: var(--muted); }
.sub-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: var(--gap); padding-bottom: 2px; scrollbar-width: thin; }
.tab {
    display: inline-flex; align-items: center; gap: .4em; padding: .5rem .85rem; border-radius: 999px; white-space: nowrap;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
}
.tab:hover { text-decoration: none; background: var(--surface-2); }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab em { font-style: normal; font-size: .72rem; background: rgba(0, 0, 0, .08); border-radius: 999px; padding: 0 .4em; }
.tab.active em { background: rgba(255, 255, 255, .2); }
.tab-panel[hidden] { display: none; }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(9, 22, 14, .5); overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-box { width: min(560px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; margin: auto; }
.modal-box.modal-lg { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; flex: 1 1 auto; }
.modal-body { padding: 16px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.modal-lead { display: flex; align-items: center; gap: .5em; padding: .5rem .7rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: .88rem; }
.modal-extra { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px dashed var(--line); }

/* ==================== DASHBOARD KAMAR ==================== */
.legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.lg { display: inline-flex; align-items: center; gap: .4em; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.lg:hover { text-decoration: none; }
.lg::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--muted); }
.lg-kosong::before { background: #2f8f46; }
.lg-terisi::before { background: #d8342a; }
.lg-dibersihkan::before { background: #e0a209; }
.lg-perbaikan::before { background: #5f7166; }
.lg.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.lg-bar { flex: 1 1 160px; height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; min-width: 120px; }
.lg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-3), var(--brand-2)); }

.ward { margin-bottom: var(--gap); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.ward-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; border-left: 6px solid var(--w, var(--brand-2)); background: var(--surface-2); }
.ward-name h2 { margin: 0; font-size: 1rem; }
.ward-name span { font-size: .78rem; color: var(--muted); }
.ward-stat { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .8rem; color: var(--ink-2); }
.ward-stat b { font-size: 1rem; }
.ws-kosong { color: #2f8f46; }
.ws-bersih { color: #c7780a; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 14px 16px 18px; }
.room { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px; background: var(--surface-2); }
.room-head { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.room-head b { color: var(--ink); }
.beds { display: grid; gap: 6px; }
.bed {
    display: flex; flex-direction: column; gap: 2px; padding: .55rem .65rem; border-radius: var(--r-sm);
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted); color: inherit; font-size: .82rem;
}
a.bed:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.bed-top { display: flex; align-items: center; gap: 6px; }
.bed-code { font-size: .78rem; letter-spacing: .02em; }
.bed-state { margin-left: auto; font-size: .72rem; color: var(--muted); }
.bed-name { font-weight: 700; }
.bed-sub { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; color: var(--muted); font-size: .74rem; }
.bed-doc { display: flex; align-items: center; gap: .3em; color: var(--ink-2); font-size: .74rem; }
.bed-doc .ic { width: .9em; height: .9em; }
.bed-foot { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 2px; }
.bed-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.bed.st-terisi { border-left-color: #d8342a; }
.bed.st-kosong { border-left-color: #2f8f46; background: #f2faf4; }
.bed.st-dibersihkan { border-left-color: #e0a209; background: #fdf7e9; }
.bed.st-perbaikan { border-left-color: #5f7166; background: var(--surface-2); }
[data-theme="dark"] .bed.st-kosong, [data-theme="dark"] .bed.st-dibersihkan { background: var(--surface-2); }
.stock { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--gap); padding: 10px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.stock-title { display: flex; align-items: center; gap: .4em; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.stock-item { display: inline-flex; align-items: baseline; gap: .3em; padding: .25rem .6rem; border-radius: 999px; background: #e6f4ea; color: #17532c; font-size: .8rem; font-weight: 600; }
.stock-item b { font-size: 1rem; }
.stock-item small { color: var(--muted); }
.stock-item.habis { background: #fce8e6; color: #8c1f18; }
.stock-wl { margin-left: auto; display: inline-flex; align-items: center; gap: .4em; font-size: .82rem; font-weight: 600; }
.wl-group { margin-bottom: var(--gap); }
.wl-no { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px;
    background: #fdeede; color: #b35a0a; font-size: 1.05rem; font-weight: 700; }
.wl-no.tinggi { background: #d8342a; color: #fff; }
[data-theme="dark"] .wl-no { background: rgba(224, 122, 25, .2); color: #f3b37a; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ==================== PAPAN OPERASI ==================== */
.daybar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.daybar-form { display: flex; gap: 6px; align-items: center; }
.daybar-form input { min-height: 38px; }
.ok-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.ok-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ok-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; background: var(--k, var(--brand-2)); color: #fff; }
.ok-head b { font-size: .95rem; }
.ok-head span { font-size: .75rem; opacity: .85; margin-left: auto; }
.ok-col.st-perbaikan .ok-head, .ok-col.st-nonaktif .ok-head { background: #5f7166; }
.ok-col > .op-card { margin: 10px 12px; }
.ok-empty { padding: 18px 12px; text-align: center; color: var(--muted); font-size: .84rem; }
.ok-dot { display: inline-flex; white-space: nowrap; align-items: center; padding: .12em .5em; border-radius: 6px; background: var(--k, var(--brand-2)); color: #fff; font-size: .74rem; font-weight: 700; }
.ok-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.ok-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--k, var(--brand-2)); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.ok-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ok-card header b { font-size: 1.05rem; }
.ok-card-act { display: flex; gap: 6px; margin-top: 8px; }
.op-card { border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: var(--r-sm); padding: 10px; background: var(--surface); font-size: .85rem; }
.op-card.is-cito { border-left-color: #d8342a; background: #fdf1ee; }
[data-theme="dark"] .op-card.is-cito { background: var(--surface-2); }
.op-card.os-selesai { opacity: .75; border-left-color: #2f8f46; }
.op-card.os-berlangsung { border-left-color: #e0a209; box-shadow: 0 0 0 2px rgba(224, 162, 9, .2); }
.op-card.os-ditunda, .op-card.os-batal { border-left-color: #5f7166; }
.op-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.op-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.op-pt { display: block; }
.op-tindakan { margin: 2px 0; color: var(--ink-2); }
.op-team { list-style: none; margin: 4px 0 0; padding: 0; font-size: .78rem; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.op-team .ic { width: .9em; height: .9em; }
.op-note { display: flex; gap: .4em; font-size: .78rem; color: #8c1f18; margin-top: 4px; }
.op-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* ==================== DETAIL PASIEN ==================== */
.pt-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 16px; margin-bottom: var(--gap);
    background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--w, var(--brand-2)); border-radius: var(--r); box-shadow: var(--shadow); }
.pt-card-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.pt-avatar { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--brand-2); color: #fff; font-weight: 700; font-size: 1.1rem; flex: none; }
.pt-avatar.jk-p { background: #cc3f74; }
.pt-avatar.jk-l { background: #1c8dc4; }
.pt-card-id h2 { margin: 0; font-size: 1.25rem; }
.pt-card-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: .35em 0 0; }
.pt-card-loc { display: flex; flex-direction: column; justify-content: center; padding-left: 16px; border-left: 1px dashed var(--line); }
.pt-card-loc b { font-size: 1.05rem; }
.pt-card-bed { font-size: 1.5rem; font-weight: 700; color: var(--brand-2); letter-spacing: .02em; }
.pt-card-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding-left: 16px; border-left: 1px dashed var(--line); }
.pt-card-stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pt-card-stats dd { margin: 0; font-size: .9rem; font-weight: 600; }
.dl { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 6px 14px; margin: 0; font-size: .88rem; }
.dl dt { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.pt-hero { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pt-hero h3 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.pt-hero p { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: .82rem; }
.pt-ringkas .card-body { padding-top: 14px; }
.card-danger { border-color: #f2bdb7; }
.card-danger .card-head { background: #fdf0ee; color: #8c1f18; }
[data-theme="dark"] .card-danger .card-head { background: var(--surface-2); color: #f0a79f; }
.mini-dl { display: flex; gap: 14px; margin: 8px 0; }
.mini-dl dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mini-dl dd { margin: 0; font-weight: 700; }
.doc-main { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: .5rem .6rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: .85rem; }
.soap { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.soap-k { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 6px; background: var(--brand-2); color: #fff; font-size: .75rem; margin-right: .4em; }
.cppt-list { display: flex; flex-direction: column; gap: 10px; }
.cppt { border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.cppt.cp-dokter { border-left-color: #1c8dc4; }
.cppt header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; font-size: .85rem; }
.cppt header time { color: var(--muted); font-size: .8rem; }
.cppt-del { margin-left: auto; }
.cppt-vital { font-size: .82rem; color: var(--ink-2); display: flex; gap: .4em; align-items: center; margin: 0 0 6px; }
.cppt-soap { display: grid; grid-template-columns: 2em 1fr; gap: 4px 10px; margin: 0; font-size: .88rem; }
.cppt-soap dt { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 6px; background: var(--surface-2); font-weight: 700; font-size: .78rem; color: var(--ink-2); }
.cppt-soap dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; font-size: .88rem; }
.timeline li::before { content: ''; position: absolute; left: -18px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--w, var(--brand-2)); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.timeline li::after { content: ''; position: absolute; left: -14px; top: 1.4em; bottom: -14px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; }
.timeline span { display: block; color: var(--ink-2); font-size: .84rem; }
.timeline small { display: block; }
.timeline.compact { gap: 10px; }
.money-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.money { padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--t); box-shadow: var(--shadow); }
.money-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tw); color: var(--t); }
.money-lbl { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.money-val { display: block; font-size: 1.2rem; }
.money-form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.money-form input { flex: 1 1 110px; font-size: .85rem; }
.ratio { text-align: center; padding: 8px 0; }
.ratio-val { display: block; font-size: 2.2rem; line-height: 1.1; color: var(--t, var(--ink)); }
.rumus { margin-top: 12px; font-size: .84rem; color: var(--ink-2); }
.rumus summary { cursor: pointer; font-weight: 600; }
.rumus ul { margin: 8px 0 0; padding-left: 18px; }

/* status kartu pasien, PN, alat medis, discharge planning */
.pt-card.sk-baru { border-left-color: #e0a209; background: linear-gradient(90deg, #fdf6e6, var(--surface) 40%); }
.pt-card.sk-dnr { border-left-color: #7552d6; background: linear-gradient(90deg, #f1ecfd, var(--surface) 40%); }
.pt-card.sk-pengawasan { border-left-color: #1c8dc4; background: linear-gradient(90deg, #e7f2fa, var(--surface) 40%); }
.pt-card.sk-rencana-pulang { border-left-color: #d8342a; background: linear-gradient(90deg, #fdeceb, var(--surface) 40%); }
.pt-card.sk-normal { border-left-color: #2f8f46; }
[data-theme="dark"] .pt-card.sk-baru, [data-theme="dark"] .pt-card.sk-dnr,
[data-theme="dark"] .pt-card.sk-pengawasan, [data-theme="dark"] .pt-card.sk-rencana-pulang { background: var(--surface); }
.bed.st-terisi.sk-baru { border-left-color: #e0a209; background: #fdf8ec; }
.bed.st-terisi.sk-dnr { border-left-color: #7552d6; background: #f5f1fd; }
.bed.st-terisi.sk-pengawasan { border-left-color: #1c8dc4; background: #eef6fb; }
.bed.st-terisi.sk-rencana-pulang { border-left-color: #d8342a; background: #fdf0ef; }
[data-theme="dark"] .bed.st-terisi[class*="sk-"] { background: var(--surface); }

.status-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: var(--gap); }
.sp-lbl { display: inline-flex; align-items: center; gap: .35em; font-size: .82rem; font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.sp-btn {
    padding: .32rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    color: var(--ink-2); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.sp-btn:hover { border-color: var(--t); color: var(--t); }
.sp-btn.on { background: var(--t); border-color: var(--t); color: #fff; }

.pt-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: var(--gap); }
.ps-item { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.ps-lbl { display: flex; align-items: center; gap: .4em; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.ps-val { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: .84rem; }
.pn-chip { display: inline-flex; flex-direction: column; padding: .2rem .55rem; border-radius: 8px; background: var(--surface-2); font-size: .8rem; }
.pn-chip b { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rw-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 2px; }
.rw-line .ic { width: .95em; height: .95em; color: var(--muted); }
.pn-cell { min-width: 186px; }
.pt-cell { min-width: 250px; }
.tbl .loc { min-width: 120px; }
.pn-form { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; }
.pn-form label { display: flex; align-items: center; gap: 5px; }
.pn-form label b { width: 1.1em; font-size: .7rem; color: var(--muted); }
.pn-form input { min-height: 28px; padding: .18rem .4rem; font-size: .78rem; }
.pn-form button { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
.icon-btn.xs { width: 24px; height: 24px; border-radius: 7px; }
.icon-btn.xs .ic { width: .95em; height: .95em; }

.dp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.dp-steps li { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); }
.dp-steps .dp-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--line-2); color: var(--muted); flex: none; }
.dp-steps li.ok { border-color: #b9dcc4; background: #f1faf3; }
.dp-steps li.ok .dp-ic { background: #2f8f46; color: #fff; }
.dp-steps li.telat { border-color: #f2bdb7; background: #fdf1f0; }
.dp-steps li.telat .dp-ic { background: #d8342a; color: #fff; }
[data-theme="dark"] .dp-steps li.ok, [data-theme="dark"] .dp-steps li.telat { background: var(--surface-2); }
.dp-txt b { display: block; font-size: .84rem; }
.dp-txt small { color: var(--muted); font-size: .74rem; }
.dp-steps.ringkas { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.dp-steps.ringkas li { padding: 5px 8px; gap: 7px; align-items: center; min-width: 0; }
.dp-steps.ringkas .dp-ic { width: 20px; height: 20px; border-radius: 6px; }
.dp-steps.ringkas .dp-ic .ic { width: 12px; height: 12px; }
.dp-steps.ringkas .dp-txt { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.dp-steps.ringkas .dp-txt b { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dp-steps.ringkas .dp-st { margin-left: auto; flex: none; font-size: .68rem; color: var(--muted); }
.dp-steps.ringkas li.ok .dp-st { color: #2f8f46; font-weight: 600; }
.dp-steps.ringkas li.telat .dp-st { color: #d8342a; font-weight: 600; }
.pemisah { border: 0; border-top: 1px dashed var(--line); margin: 14px 0; }

/* formasi tim kamar operasi */
.tim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tim-col { border: 1px solid var(--line); border-top: 4px solid var(--t, var(--brand-2)); border-radius: var(--r); padding: 12px; background: var(--surface); }
.tim-col header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.tim-col header b { font-size: .95rem; }
.tim-col header span { font-size: .74rem; color: var(--muted); }
.tim-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: .35rem 0; border-bottom: 1px dashed var(--line-2); font-size: .85rem; }
.tim-row:last-child { border-bottom: 0; }
.tim-tabel th.grup { text-align: center; color: #fff; background: var(--t); border-radius: 0; letter-spacing: .04em; }
.tim-tabel th.grup small { display: block; font-weight: 400; font-size: .68rem; opacity: .85; text-transform: none; letter-spacing: 0; }
.tim-tabel thead tr:nth-child(2) th { background: var(--surface-2); text-align: left; }
.tim-tabel td { vertical-align: middle; }
.tim-tabel td.num { width: 42px; color: var(--muted); font-weight: 700; }
.tim-tabel .tim-sel { padding: .2rem .25rem; min-width: 130px; }
.tim-tabel .tim-sel input { min-height: 30px; padding: .2rem .45rem; font-size: .82rem; }
.tim-tabel tbody tr:nth-child(odd) { background: var(--surface-2); }
.tim-tabel tbody tr:hover { background: var(--tw, #e6f4ea); }
.tim-row small { color: var(--muted); font-size: .76rem; white-space: nowrap; }

/* ==================== DASHBOARD ==================== */
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo a { display: flex; gap: 10px; align-items: center; padding: .6rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--line-2); border-left: 4px solid var(--t, var(--brand-2)); color: inherit; }
.todo a:hover { text-decoration: none; background: var(--surface-2); }
.todo-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--tw); color: var(--t); flex: none; }
.todo b { display: block; font-size: .88rem; }
.todo small { color: var(--muted); font-size: .78rem; }
.todo .ic:last-child { margin-left: auto; color: var(--muted); }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mini-list li { font-size: .86rem; }
.mini-list li > a, .mini-list li { display: flex; gap: 10px; align-items: center; }
.mini-list li > a { color: inherit; padding: .35rem .2rem; border-radius: var(--r-sm); }
.mini-list li > a:hover { background: var(--surface-2); text-decoration: none; }
.mini-loc, .mini-time { display: inline-grid; place-items: center; min-width: 54px; padding: .2rem .4rem; border-radius: 8px; background: var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.mini-side { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.ward-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ward-bars a { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(80px, 2fr) auto auto; gap: 10px; align-items: center; color: inherit; padding: .3rem 0; }
.ward-bars a:hover { text-decoration: none; }
.wb-name b { display: block; font-size: .86rem; }
.wb-name small { color: var(--muted); font-size: .74rem; }
.wb-bar { display: flex; height: 12px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.wb-isi { background: var(--w, var(--brand-2)); }
.wb-bersih { background: #e0a209; }
.wb-num { text-align: right; font-size: .78rem; color: var(--muted); }
.wb-num b { display: block; font-size: .95rem; color: var(--brand-2); }
.wb-num small { display: block; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.quick-item { display: flex; flex-direction: column; gap: 4px; padding: .7rem; border-radius: var(--r-sm); background: var(--tw); color: var(--t); font-size: .82rem; font-weight: 600; }
.quick-item:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
[data-theme="dark"] .quick-item { background: rgba(255, 255, 255, .06); }
.barlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.barlist li { display: grid; grid-template-columns: minmax(80px, 1.1fr) minmax(60px, 2fr) auto; gap: 8px; align-items: center; font-size: .82rem; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bl-track { height: 9px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bl-track i { display: block; height: 100%; border-radius: 999px; background: var(--t, var(--brand-2)); }
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 11px; }
.ch-val { fill: var(--ink-2); font-size: 11px; font-weight: 600; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; font-size: .8rem; color: var(--ink-2); }
.ch-legend span { display: inline-flex; align-items: center; gap: .4em; }
.ch-legend i { width: 10px; height: 10px; border-radius: 3px; }
.cap-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px; font-size: .84rem; }
.cap-list li { display: flex; gap: .4em; align-items: center; }
.cap-list .ic { color: var(--brand-2); }

/* ==================== INFO KAMAR ==================== */
.finder { background: linear-gradient(140deg, var(--brand), #1d5c38); border-radius: var(--r-lg); padding: 22px; margin-bottom: var(--gap); color: #fff; }
.finder-form { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 999px; padding: 6px 6px 6px 16px; }
.finder-form .ic { color: var(--muted); flex: none; }
.finder-form input { flex: 1 1 auto; border: 0; background: none; font-size: 1.05rem; min-height: 44px; }
.finder-form input:focus { box-shadow: none; }
.finder-note { display: flex; gap: .4em; align-items: center; margin: 12px 0 0; font-size: .85rem; color: #bfe0ca; }
.finder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.room-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--w, var(--muted)); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.rc-who b { font-size: 1.05rem; display: block; }
.rc-who small { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.rc-where { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }
.rc-ward { font-size: 1.1rem; font-weight: 700; color: var(--w, var(--brand-2)); }
.rc-floor { display: inline-flex; align-items: center; gap: .3em; font-size: .82rem; color: var(--muted); }
.rc-bed { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); font-size: .8rem; color: var(--muted); }
.rc-bed b { font-size: 1.4rem; color: var(--ink); }
.room-card.wait { border-left-color: #e0a209; }
.room-card.gone { border-left-color: #5f7166; opacity: .85; }
.floors { display: flex; flex-direction: column; gap: 10px; }
.floor { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.floor-name { min-width: 90px; font-size: .85rem; color: var(--muted); }
.floor-rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.floor-rooms span { display: inline-flex; flex-direction: column; padding: .3rem .7rem; border-radius: var(--r-sm); background: var(--surface-2); border-left: 4px solid var(--w); font-size: .84rem; font-weight: 600; }
.floor-rooms small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.mk-room { margin-bottom: 14px; }
.mk-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.mk-act { margin-left: auto; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ward-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ward-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--w, var(--brand-2)); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.ward-card.off { opacity: .6; }
.ward-flags { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.ward-card header { display: flex; flex-direction: column; margin-bottom: 4px; }
.ward-card header b { font-size: 1.05rem; }
.pick-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.pick { padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--brand-2); background: var(--surface); color: var(--brand-2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.pick:hover { background: var(--tw, #e6f4ea); }

/* ==================== LOGIN ==================== */
.login-body { background: linear-gradient(160deg, #0f3520, #15432a 45%, #10301d); min-height: 100vh; }
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); min-height: 100vh; }
.login-art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px; overflow: hidden; }
.login-art::after { content: ''; position: absolute; inset: auto -10% -35% -10%; height: 60%; background: radial-gradient(ellipse at center, rgba(89, 194, 110, .35), transparent 70%); }
.bloom { position: relative; width: min(380px, 62vw); aspect-ratio: 1; display: grid; place-items: center; }
.bloom-svg { width: 100%; height: 100%; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .45)); animation: bloom-in 1.2s cubic-bezier(.2, .9, .3, 1) both; }
.petal { opacity: 0; animation: petal-in .7s ease-out both; }  /* rotasi memakai atribut SVG, titik putar = pusat viewBox */
.bloom-core { position: absolute; display: grid; place-items: center; width: 30%; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: core-in .8s .9s ease-out both; }
.bloom-core img { width: 62%; height: auto; }
@keyframes bloom-in { from { transform: scale(.55) rotate(-24deg); } to { transform: scale(1) rotate(0); } }
@keyframes petal-in { from { opacity: 0; } to { opacity: .94; } }
@keyframes core-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
    .bloom-svg, .petal, .bloom-core { animation: none; opacity: 1; }
    .petal { opacity: .94; }
}
.login-brand { position: relative; text-align: center; color: #eaf5ed; z-index: 1; }
.login-rs { margin: 0; font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; color: #8fc6a0; }
.login-brand h1 { margin: .1em 0; font-size: 3rem; letter-spacing: .12em; color: #fff; }
.login-long { margin: 0 0 14px; color: #bfe0ca; font-size: .95rem; }
.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: .85rem; color: #cfe2d5; }
.login-points li { display: flex; align-items: center; gap: .4em; }
.login-points .ic { color: var(--sun); }
.login-panel { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 32px; background: var(--surface); }
.login-card { width: min(390px, 100%); margin: 0 auto; }
.login-logo { display: none; width: 70px; margin: 0 auto 10px; }
.login-card h2 { font-size: 1.35rem; margin-bottom: .2em; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.versi-app { margin-top: 16px; text-align: center; font-size: .78rem; color: var(--muted); }
.login-foot { text-align: center; font-size: .75rem; color: var(--muted); }

/* ==================== LAYAR DISPLAY TV ==================== */
.display-body { background: #0c2a19; color: #eaf5ed; }
.dsp { display: flex; flex-direction: column; min-height: 100vh; padding: 18px 22px 0; gap: 14px; }
.dsp-head { display: flex; align-items: center; gap: 16px; }
.dsp-head img { width: 54px; }
.dsp-head h1 { margin: 0; font-size: 1.9rem; color: #fff; }
.dsp-head p { margin: 0; color: #9ec4ab; }
.dsp-clock { margin-left: auto; text-align: right; }
.dsp-clock b { display: block; font-size: 2.2rem; line-height: 1; color: var(--sun); font-variant-numeric: tabular-nums; }
.dsp-clock span { font-size: .9rem; color: #9ec4ab; }
.dsp-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.ds { padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border-left: 5px solid var(--t, var(--brand-3)); }
.ds b { display: block; font-size: 2rem; line-height: 1.1; color: #fff; }
.ds span { font-size: .85rem; color: #b9d4c2; }
.dsp-kelas { display: flex; flex-wrap: wrap; gap: 8px; }
.dk { display: inline-flex; align-items: baseline; gap: .35em; padding: .35rem .8rem; border-radius: 999px; background: rgba(89, 194, 110, .2); color: #d9f2e0; font-size: .9rem; }
.dk b { font-size: 1.3rem; color: #fff; }
.dk small { color: #9ec4ab; }
.dk.habis { background: rgba(216, 52, 42, .25); color: #ffd9d5; }
.dsp-wards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; flex: 1 1 auto; }
.dsp-ward { background: rgba(255, 255, 255, .05); border-radius: 16px; border-top: 5px solid var(--w, var(--brand-3)); padding: 12px; }
.dsp-ward header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.dsp-ward header b { font-size: 1.15rem; color: #fff; }
.dsp-ward header span { font-size: .8rem; color: #9ec4ab; }
.dsp-ward header em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--sun); }
.dsp-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.db { display: flex; flex-direction: column; padding: .35rem .5rem; border-radius: 9px; background: rgba(255, 255, 255, .06); border-left: 4px solid #5f7166; font-size: .8rem; }
.db b { color: #fff; }
.db small { color: #b9d4c2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db.st-kosong { border-left-color: #59c26e; background: rgba(89, 194, 110, .18); }
.db.st-terisi { border-left-color: #e0562b; }
.db.st-dibersihkan { border-left-color: #ffd21f; }
.dsp-table { flex: 1 1 auto; overflow: hidden; }
.dsp-table table { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.dsp-table th { text-align: left; padding: .5rem .6rem; color: #9ec4ab; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.dsp-table td { padding: .55rem .6rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.dt-jam { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--sun); }
.dt-pt { color: #fff; font-weight: 600; }
.dt-cito { font-style: normal; font-size: .7rem; background: #d8342a; color: #fff; padding: .1em .4em; border-radius: 5px; margin-left: .4em; }
.dt-st { font-size: .85rem; color: #cfe2d5; }
.dsp-table tr.os-berlangsung { background: rgba(255, 210, 31, .12); }
.dsp-table tr.os-selesai { opacity: .6; }
.dsp-foot { display: flex; gap: 16px; align-items: center; padding: 10px 0 14px; border-top: 1px solid rgba(255, 255, 255, .1); color: #9ec4ab; font-size: .82rem; }
.dsp-foot marquee { flex: 1 1 auto; }
.display-block { display: grid; place-items: center; gap: 10px; min-height: 60vh; text-align: center; color: #cfe2d5; padding: 30px; }
.display-block .ic { width: 46px; height: 46px; color: var(--sun); }

/* ==================== RESPONSIF ==================== */
@media (max-width: 1180px) {
    .dash-grid { grid-template-columns: minmax(0, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-tempat { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .pt-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pt-card-stats { grid-column: 1 / -1; padding-left: 0; border-left: 0; border-top: 1px dashed var(--line); padding-top: 10px; }
}
@media (max-width: 900px) {
    :root { --gap: 13px; }
    .grid-2, .grid-3, .grid-tempat { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .sidebar.on { transform: translateX(0); }
    .only-mobile { display: inline-flex; }
    .content { padding: 14px 13px 90px; }
    .page-title { font-size: 1.25rem; }
    .tb-search { display: none; }
    .tb-user-name { display: none; }
    .footer { padding-bottom: 86px; }
    .bottom-nav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; display: flex; justify-content: space-around;
        gap: 2px; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface);
        border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -12px rgba(19, 48, 30, .5);
    }
    .bn-link {
        flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .3rem .1rem;
        border: 0; background: none; font: inherit; font-size: .66rem; color: var(--muted); border-radius: 10px; cursor: pointer;
    }
    .bn-link.active { color: var(--brand-2); background: var(--tw, #e6f4ea); font-weight: 700; }
    .bn-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
    .bn-link .ic { width: 1.35em; height: 1.35em; }
    .pt-card { grid-template-columns: minmax(0, 1fr); }
    .pt-card-loc { padding-left: 0; border-left: 0; border-top: 1px dashed var(--line); padding-top: 10px; }
    .login { grid-template-columns: minmax(0, 1fr); }
    .login-art { padding: 26px 20px 8px; gap: 12px; }
    .bloom { width: min(210px, 52vw); }
    .login-brand h1 { font-size: 2.1rem; }
    .login-points { display: none; }
    .login-panel { padding: 22px 18px 34px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
    .modal-box { width: 100%; }
    .modal-body { max-height: 62vh; }
}
@media (max-width: 560px) {
    body { font-size: 14.5px; }
    .card-body { padding: 13px; }
    .tbl-wrap { margin: 0 -13px; padding: 0 13px; }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span2 { grid-column: span 1; }
    .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .kpi-val { font-size: 1.35rem; }
    .rooms { grid-template-columns: minmax(0, 1fr); padding: 10px 12px 14px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1 1 auto; }
    .dsp-head h1 { font-size: 1.3rem; }
    .dsp-clock b { font-size: 1.5rem; }
}

/* ==================== CETAK ==================== */
.print-only { display: none; }
@media print {
    @page { size: A4 landscape; margin: 12mm; }
    body { background: #fff; color: #000; font-size: 11px; }
    .sidebar, .topbar, .bottom-nav, .footer, .no-print, .backdrop, .modal, .tabs, .filters, .pager, .page-actions, .btn { display: none !important; }
    .content { padding: 0; max-width: none; }
    .print-only { display: block; }
    .print-title { margin-bottom: 10px; border-bottom: 2px solid #000; padding-bottom: 6px; }
    .print-title h2 { margin: 0; font-size: 15px; }
    .print-title p { margin: 0; font-size: 11px; }
    .card { border: 1px solid #bbb; box-shadow: none; page-break-inside: avoid; margin-bottom: 8px; }
    .card-head { background: #f2f2f2; }
    .tbl { font-size: 10px; }
    .tbl th, .tbl td { padding: 3px 4px; border-bottom: 1px solid #ccc; }
    .tbl thead th { background: #eee; color: #000; }
    .kpi, .chart, .ward, .bed, .op-card { page-break-inside: avoid; }
    a { color: #000; text-decoration: none; }
}

/* Kode verifikasi (captcha) halaman login */
.captcha-box { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.captcha-box img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #f4f8f3; }
.captcha-box .icon-btn { flex: none; }

/* Hak akses role */
.akses-role { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--gap); }
.akses-role a { display: inline-flex; align-items: center; gap: 6px; padding: .4rem .75rem; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--text); font-weight: 600; font-size: .85rem; text-decoration: none; }
.akses-role a::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.akses-role a.on { background: var(--c); border-color: var(--c); color: #fff; }
.akses-role a.on::before { background: #fff; }
.akses-role a small { opacity: .8; font-weight: 500; }
.akses-grup { margin: 0 0 12px; }
.akses-grup h3 { margin: 0 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.akses-item { display: flex; align-items: center; gap: 10px; padding: .45rem .55rem; border-radius: 10px; }
.akses-item:hover { background: var(--surface-2); }
.akses-item input { width: 18px; height: 18px; flex: none; accent-color: var(--primary, #2f8f46); }
.akses-item .ak-teks { flex: 1 1 auto; min-width: 0; }
.akses-item .ak-teks small { display: block; color: var(--muted); font-size: .72rem; }
.akses-item .ak-tanda { flex: none; }

/* Daftar pemberian obat */
.obat-hari { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 7px; border-radius: 8px;
    background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .82rem; }
.obat-hari.ab { background: #ece6fb; color: #5b3fc4; }
[data-theme="dark"] .obat-hari.ab { background: rgba(117, 82, 214, .25); color: #c6b6f5; }
.bed-sub.bed-ab { color: #5b3fc4; font-weight: 600; }
[data-theme="dark"] .bed-sub.bed-ab { color: #c6b6f5; }
