/* Dashboard Monitoring Pembelajaran — UPDL Jakarta. Font sistem (Inter bila terpasang), tanpa aset luar. */
:root {
  --text: #1a2230; --muted: #5b6472; --rust: #b03a0c; --rust-soft: #fbe7d6; --navy: #1e4b87; --navy-soft: #dce9f8;
  --card: #f3f4f8; --line: #e5e7eb; --bg: #f4f6fa; --white: #fff; --gray-soft: #e9ecf1; --focus: #1e4b87;
  --r: 12px; --r-sm: 8px; --gap: 16px; --pad: 16px; --tap: 44px;
  --shadow: 0 10px 30px rgba(26, 34, 48, .18);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); overflow-x: hidden; min-width: 320px; }
body.no-scroll { overflow: hidden; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
.ico { width: 18px; height: 18px; flex: none; }
.hide-sm { display: none; }
.only-sm { display: block; }
.alert { color: var(--rust); }
.b { font-weight: 600; }

/* ---------- tombol & kontrol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--outline { color: var(--navy); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn--icon { width: var(--tap); padding: 0; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.btn--primary .ico, .btn--outline .ico { width: 18px; height: 18px; }

.chip { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); font-weight: 600; white-space: nowrap; position: relative; }
.chip[aria-pressed="true"], .chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip--date input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.chip--date:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field__wrap { position: relative; display: block; }
.field__ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field input, .field select { min-height: var(--tap); width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.field__wrap input { padding-left: 36px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("icons/chevron.svg");
  background-repeat: no-repeat; background-position: right 10px center; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }

.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.pill--ok { background: var(--navy-soft); color: var(--navy); }
.pill--warn { background: var(--rust-soft); color: var(--rust); }
.pill--err { background: var(--rust); color: #fff; }
.pill--kritis { background: var(--rust); color: #fff; }
.pill--kurang { background: var(--rust-soft); color: var(--rust); }
.pill--lengkap { background: var(--navy-soft); color: var(--navy); }
.pill--tahapan { background: var(--gray-soft); color: var(--text); }
.pill--muted { background: var(--gray-soft); color: var(--muted); }

.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: .02em; vertical-align: middle; }
.tag--new { background: var(--navy); color: #fff; }
.tag--moved { background: var(--rust-soft); color: var(--rust); }
.tag--check { background: var(--rust-soft); color: var(--rust); text-transform: none; letter-spacing: 0; }

/* ---------- kepala ---------- */
/* Ponsel: grid 2 kolom — judul | aksi, lalu stempel, lalu pil sumber. Desktop: satu baris. */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); padding: 10px var(--pad) 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.topbar__meta, .topbar__row { display: contents; }
.topbar__brand { grid-area: 1 / 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__actions { grid-area: 1 / 2; }
.topbar__stamp { grid-area: 2 / 1 / 3 / 3; }
.pills { grid-area: 3 / 1 / 4 / 3; }
.topbar__sub { display: none; }
.topbar__logo { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.topbar__title { font-size: 20px; line-height: 1.2; font-weight: 700; }
.topbar__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills li { min-width: 0; max-width: 100%; }
.pills button.pill { border: 0; cursor: pointer; max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.topbar__stamp { color: var(--muted); font-size: 13px; }
.topbar__actions { display: flex; gap: 6px; justify-self: end; }
.topbar__actions .btn { padding: 0 12px; }

.banners { display: flex; flex-direction: column; gap: 8px; padding: 0 var(--pad); }
.banners:empty { display: none; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid; font-size: 14px; margin-top: 12px; }
.banner .ico { margin-top: 2px; }
.banner--warn { background: var(--rust-soft); border-color: #efc9ad; color: var(--rust); }
.banner--info { background: var(--navy-soft); border-color: #b9d0ee; color: var(--navy); }
.banner__body { flex: 1; min-width: 0; }
.banner__body p + p { margin-top: 4px; }
.banner__list { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; color: var(--text); }
.banner__list li { font-size: 13px; }
.banner .btn { min-height: 32px; padding: 0 10px; font-size: 13px; }

/* ---------- halaman ---------- */
.page { padding: 12px var(--pad) 24px; display: flex; flex-direction: column; gap: var(--gap); max-width: 1920px; margin: 0 auto; width: 100%; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: var(--pad); min-width: 0; }
.card__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin-bottom: 12px; }
.card__title { font-size: 19px; font-weight: 700; line-height: 1.25; }
.card__note { color: var(--muted); font-size: 13px; margin-top: 2px; }

.toolbar { display: flex; flex-direction: column; gap: 12px; }
.range { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
.filters .field--grow { grid-column: 1 / -1; }
.filters .check { grid-column: 1 / -1; }
.active-filters { font-size: 13px; color: var(--muted); }
.active-filters .b { color: var(--text); }

.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat__label { font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.3; }
.stat__num { font-size: 32px; font-weight: 700; line-height: 1.15; color: var(--navy); letter-spacing: -.01em; }
.stat__num--alert { color: var(--rust); }
.stat__of { font-size: 15px; color: var(--text); font-weight: 600; }
.stat__sub { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.stat__sub--alert:not(:empty) { color: var(--rust); font-weight: 600; }

/* strip minggu */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 60px; padding: 6px 2px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--text); text-align: center; line-height: 1.2; }
.day--weekend { background: var(--gray-soft); color: var(--muted); }
.day--alert { border-color: var(--rust); }
.day--selected { box-shadow: inset 0 0 0 2px var(--navy); border-color: var(--navy); }
.day--today .day__name::after { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--navy); margin-left: 3px; vertical-align: middle; }
.day__name { font-size: 11px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.day__num { font-size: 17px; font-weight: 700; color: var(--text); }
.day--weekend .day__num { color: var(--muted); }
.day__meta { font-size: 11px; color: var(--muted); }
.day__meta--long, .day__alert--long { display: none; }
.day__alert { font-size: 11px; font-weight: 700; color: var(--rust); }

/* jadwal */
.grid { display: flex; flex-direction: column; gap: var(--gap); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg__btn { min-height: 40px; padding: 0 14px; border: 0; background: var(--white); font-weight: 600; color: var(--muted); }
.seg__btn[aria-selected="true"] { background: var(--navy); color: #fff; }
.table-head { display: none; }
.day-group { margin-top: 12px; }
.day-group__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 16px; font-weight: 700; padding: 8px 0 8px; border-top: 1px solid var(--line); }
.day-group:first-child .day-group__title { border-top: 0; padding-top: 0; }
.day-group__title small { font-size: 13px; font-weight: 500; color: var(--muted); }
.day-group__title .b { color: var(--rust); }
.rows { display: flex; flex-direction: column; gap: 10px; }

.row { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--white); display: grid; gap: 6px; position: relative; }
.row--tahapan { background: var(--card); }
.row--gone { opacity: .75; border-style: dashed; }
.row:hover { border-color: #c9ced8; }
.row__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.row__title { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--text);
  overflow-wrap: anywhere; cursor: pointer; }
.row__title:hover { color: var(--navy); }
.row__title small { font-weight: 500; color: var(--muted); }
.row__badge { flex: none; }
.row__meta, .row__line { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.row__meta-desk { display: none; }
.row__done > .pill { display: none; }
.row__line .b { color: var(--text); }
.row__line .alert { font-weight: 600; }
.row__miss { font-size: 13.5px; color: var(--text); }
.row__miss .lbl { color: var(--muted); }
.row__date, .row__who, .row__pic { display: none; }

.ongoing { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--gray-soft); font-size: 14px; }
.ongoing:empty { display: none; }
.ongoing__title { font-weight: 700; }
.ongoing__list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ongoing__item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ongoing__item button { border: 0; background: none; padding: 0; font-weight: 600; color: var(--navy); text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; overflow-wrap: anywhere; min-height: 28px; }
.ongoing__item .pill { min-height: 22px; font-size: 12px; padding: 0 8px; }

.empty { padding: 28px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-sm); }
.empty__title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* kalender */
.cal__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal__title { font-size: 17px; font-weight: 700; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal__dow { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; padding: 4px 0; }
.cal__cell { min-height: 54px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); padding: 4px 3px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font-size: 12px; line-height: 1.2; }
.cal__cell--out { opacity: .45; }
.cal__cell--weekend { background: var(--card); }
.cal__cell--today .cal__day { background: var(--navy); color: #fff; border-radius: 50%; }
.cal__cell--selected { box-shadow: inset 0 0 0 2px var(--navy); border-color: var(--navy); }
.cal__cell--alert { border-color: var(--rust); }
.cal__day { font-weight: 700; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.cal__n { font-size: 11px; color: var(--muted); }
.cal__n .alert { font-weight: 700; }
.cal__run { font-size: 10px; color: var(--navy); }
.cal__n--long { display: none; }

/* PIC */
.pic__list { display: flex; flex-direction: column; }
.pic__row { padding: 10px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; align-items: center; } .pic__row > * { min-width: 0; } .pic__copy { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.pic__row:first-child { border-top: 0; padding-top: 0; }
.pic__name { border: 0; background: none; padding: 0; min-height: 28px; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-align: left; cursor: pointer; justify-self: start; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
.pic__name--none { color: var(--rust); }
.pic__name[aria-pressed="true"] { background: var(--navy); color: #fff; text-decoration: none; padding: 0 10px; border-radius: 6px; }
.pic__name--none[aria-pressed="true"] { background: var(--rust); }
.pic__count { font-size: 13.5px; color: var(--muted); text-align: right; }
.pic__count .b { color: var(--text); }
.pic__row--none .pic__count .b { color: var(--rust); }
.pic__bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--gray-soft); overflow: hidden; }
.pic__bar i { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.pic__row--none .pic__bar i { background: var(--rust); }
.pic__copy { grid-column: 1 / -1; justify-self: start; min-height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.pic__copy .ico { width: 15px; height: 15px; }
.pic .btn--block { margin-top: 12px; }
.pic .card__note:last-child { margin-top: 10px; }

/* matriks */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.cell { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; flex: none; }
.cell .ico { width: 16px; height: 16px; }
.cell--sudah { background: var(--navy-soft); color: var(--navy); }
.cell--belum { background: var(--rust); color: #fff; }
.cell--na { border: 1.5px dashed #c3c8d2; background: transparent; }
.matrix__scroll { overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); -webkit-overflow-scrolling: touch; }
.matrix__table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 13.5px; }
.matrix__table th, .matrix__table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.matrix__table th { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.2; white-space: nowrap; }
.matrix__table th:first-child, .matrix__table td:first-child { text-align: left; position: sticky; left: 0; background: var(--white); z-index: 1; min-width: 132px; max-width: 168px; box-shadow: 1px 0 0 var(--line), 4px 0 6px -4px rgba(26, 34, 48, .18); padding-right: 10px; }
.matrix__hint { margin-top: 8px; }
.matrix__table th:first-child { padding-left: 0; }
.matrix__table td:first-child { padding-left: 0; }
.matrix__table tr:hover td { background: var(--card); }
.matrix__title { border: 0; background: none; padding: 0; font-weight: 700; color: var(--text); text-align: left; cursor: pointer; line-height: 1.3; overflow-wrap: anywhere; }
.matrix__title:hover { color: var(--navy); }
.matrix__meta { font-size: 12px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.matrix__meta .alert { font-weight: 600; }
.matrix__score { font-weight: 700; white-space: nowrap; }
.matrix__score--alert { color: var(--rust); }
.matrix__table th.is-filter { color: var(--navy); }
.matrix__table tbody tr:last-child td { border-bottom: 0; }

.foot { color: var(--muted); font-size: 12.5px; text-align: center; display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }

/* ---------- keadaan muat/gagal ---------- */
.state { position: fixed; inset: 0; background: rgba(244, 246, 250, .92); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.state__box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow); }
.state__title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.state__text { color: var(--muted); margin-bottom: 16px; }

/* ---------- panel detail ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(26, 34, 48, .45); z-index: 70; }
.panel { position: fixed; z-index: 80; background: var(--white); display: flex; flex-direction: column; left: 0; right: 0; bottom: 0; max-height: 92dvh; border-radius: 16px 16px 0 0; box-shadow: var(--shadow);
  padding-bottom: env(safe-area-inset-bottom); }
.panel__grip { width: 40px; height: 4px; border-radius: 2px; background: #c9ced8; margin: 8px auto 0; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 16px 0; }
.panel__head .pill { min-height: 32px; font-size: 14px; padding: 4px 14px; min-width: 0; white-space: normal; }
.panel__body { overflow-y: auto; padding: 8px 16px 20px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; scrollbar-width: thin; }
.panel__title { font-size: 22px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.panel__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.info { background: var(--card); border-radius: var(--r); padding: 12px 14px; display: grid; grid-template-columns: minmax(84px, max-content) 1fr; gap: 8px 14px; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { font-weight: 600; overflow-wrap: anywhere; }
.info dd.alert { font-weight: 600; }
.info dd .tag { margin-left: 6px; }
.progress__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.progress__bar { height: 10px; border-radius: 999px; background: var(--navy-soft); overflow: hidden; }
.progress__bar i { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.checklist { display: flex; flex-direction: column; }
.checklist li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px; min-height: 43px; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.checklist li.is-belum .checklist__label, .checklist li.is-belum .checklist__status { font-weight: 700; }
.checklist li.is-belum .checklist__status { color: var(--rust); }
.checklist li.is-sudah .checklist__label, .checklist li.is-sudah .checklist__status, .checklist li.is-na .checklist__label, .checklist li.is-na .checklist__status { color: var(--muted); }
.notes { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.notes__title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.notes__body { font-size: 14px; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.panel__actions { display: flex; flex-direction: column; gap: 10px; }
.panel__actions .btn { min-height: 48px; }
.panel__foot { text-align: center; color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 90; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow); }

/* ---------- animasi ---------- */
@media (prefers-reduced-motion: no-preference) {
  .panel { animation: up .22s ease-out; }
  .backdrop { animation: fade .2s ease-out; }
  .toast { animation: fade .2s ease-out; }
  .btn, .chip, .row, .day, .cal__cell { transition: background-color .12s, border-color .12s, color .12s; }
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  :root { --pad: 20px; }
  .hide-sm { display: inline; }
  .only-sm { display: none; }
  .topbar__sub { display: block; }
  .topbar__actions .btn { padding: 0 16px; }
  .matrix__table th:first-child, .matrix__table td:first-child { min-width: 180px; max-width: 240px; }
  .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 16px; }
  .stat__num { font-size: 36px; }
  .week { gap: 8px; }
  .day { align-items: flex-start; text-align: left; padding: 10px 12px; gap: 2px; min-height: 84px; }
  .day__name { font-size: 15px; font-weight: 700; color: var(--text); flex-direction: row; align-items: baseline; gap: 4px; }
  .day--weekend .day__name { color: var(--muted); }
  .day__num { font-size: 15px; }
  .day__meta { font-size: 13px; }
  .day__meta--short, .day__alert--short { display: none; }
  .day__meta--long, .day__alert--long { display: inline; }
  .day__alert { font-size: 13px; }
  .day--today .day__name::after { width: 6px; height: 6px; margin-left: 6px; }
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters .field--grow { grid-column: span 2; }
  .filters .check { grid-column: span 2; }
  .cal__cell { min-height: 72px; padding: 6px; font-size: 13px; }
  .cal__n--short { display: none; }
  .cal__n--long { display: block; }
  .cal__dow { font-size: 12px; }
}

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  :root { --pad: 24px; --gap: 20px; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--pad); }
  .topbar__brand { flex: none; }
  .topbar__title { font-size: 22px; }
  .topbar__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
  .topbar__row { display: flex; align-items: center; gap: 12px; }
  .pills { justify-content: flex-end; order: -1; }
  .banners { padding: 0 var(--pad); }
  .toolbar { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
  .range { flex: none; overflow: visible; }
  .filters { flex: 1 1 900px; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto; min-width: 0; }
  .filters .field--grow { grid-column: auto; }
  .filters .check { grid-column: auto; white-space: nowrap; }
  .field input, .field select { font-size: 14px; }
  .active-filters { flex-basis: 100%; }
  :root { --cols: minmax(0, 2fr) minmax(92px, .6fr) minmax(0, 1.2fr) minmax(128px, .6fr) minmax(200px, 1.4fr); }
  .table-head { display: grid; grid-template-columns: var(--cols); gap: 12px; padding: 6px 12px 8px;
    font-size: 12.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
  .day-group__title { padding: 8px 12px; background: var(--card); border-radius: var(--r-sm); border-top: 0; margin-bottom: 4px; }
  .day-group:first-child .day-group__title { padding-top: 8px; }
  .rows { gap: 0; }
  .row { grid-template-columns: var(--cols); gap: 12px; align-items: start; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px; }
  .row:hover { background: var(--card); }
  .row--tahapan { background: transparent; }
  .row--tahapan:hover { background: var(--card); }
  .row__top { display: block; }
  .row__badge { display: none; }
  .row__meta-desk { display: inline; }
  .row__done > .pill { display: inline-flex; }
  .row__title { font-size: 15px; }
  .row__meta { margin-top: 2px; }
  .row__line--mobile { display: none; }
  .row__date, .row__who, .row__pic { display: block; font-size: 14px; overflow-wrap: anywhere; }
  .row__who { color: var(--muted); }
  .row__who .b { color: var(--text); }
  .row__date .tag { display: block; width: max-content; margin-top: 4px; }
  .row__pic .b { color: var(--text); }
  .row__done { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
  .row__miss { font-size: 13px; color: var(--muted); }
  .row__miss .lbl { display: none; }
  .ongoing { margin-top: 0; border-radius: 0 0 var(--r-sm) var(--r-sm); }
  .cal__cell { min-height: 84px; }
  .matrix__table th:first-child, .matrix__table td:first-child { max-width: 320px; }
  .panel { left: auto; top: 0; bottom: 0; width: 480px; max-height: none; border-radius: 0; }
  .panel__grip { display: none; }
  .panel__head { padding-top: 16px; }
  .panel__body { padding: 12px 24px 24px; }
  .info { padding: 16px 18px; }
  .checklist li { font-size: 15px; }
  @media (prefers-reduced-motion: no-preference) { .panel { animation: slide .22s ease-out; } }
}
@keyframes slide { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 1280px) {
  .grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .matrix__hint { display: none; }
}
@media (min-width: 1400px) {
  .grid { grid-template-columns: minmax(0, 1fr) 400px; }
  .filters { grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(140px, 1fr)) auto; }
}

@media print {
  .topbar__actions, .toolbar, .panel, .backdrop, .toast, .skip { display: none !important; }
  .card { break-inside: avoid; }
}

/* ---------- halaman masuk ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.login-body { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login { width: 100%; max-width: 400px; }
.login__box { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login__logo { width: 64px; height: 64px; margin: 0 auto 4px; border-radius: 14px; }
.login__title { font-size: 22px; font-weight: 700; }
.login__sub { color: var(--muted); font-size: 14px; margin-top: -8px; }
.login .field { text-align: left; margin-top: 6px; }
.login .field input { font-size: 17px; }
.login__error { color: var(--rust); font-weight: 600; font-size: 14px; }
.login__note { color: var(--muted); font-size: 13px; }
