/* OPERA — tema mengikuti mockup: sidebar navy, aksen merah, kartu putih. */
:root {
    --brand: #c8102e;
    --brand-ink: #9e0c24;
    --navy: #0f1b2d;
    --navy-2: #182840;
    --bg: #f2f4f8;
    --surface: #ffffff;
    --line: #e3e7ee;
    --ink: #1a2333;
    --muted: #6b7587;
    --ok: #10915a;
    --warn: #d98a00;
    --info: #2563eb;
    --radius-lg: 14px;
    --radius: 9px;
    --radius-sm: 6px;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.5; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 13px; font-weight: 700; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mt { margin-top: 18px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Shell */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--navy) 260px, var(--bg) 260px); }
.sidebar { background: var(--navy); color: #c6cfdd; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; padding: 4px 10px 18px; }
.brand--dark { color: var(--ink); padding: 0 0 24px; }
.brand__mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; }
.brand__mark i { width: 9px; height: 9px; border-radius: 50%; }
.brand__mark i:nth-child(1) { background: #e63946; } .brand__mark i:nth-child(2) { background: #f4a261; }
.brand__mark i:nth-child(3) { background: #2a9d8f; } .brand__mark i:nth-child(4) { background: #457bdd; }
.brand__name { font-weight: 800; letter-spacing: .08em; font-size: 16px; }
.nav__group { font-size: 11px; font-weight: 600; color: #6f7d94; margin: 16px 10px 6px; }
.nav__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; font-size: 13px; font-weight: 500; }
.nav__item svg { width: 17px; height: 17px; flex: none; }
.nav__item:hover { background: var(--navy-2); color: #fff; }
.nav__item.is-active { background: var(--brand); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 500; }
.topbar__title { display: flex; flex-direction: column-reverse; }
.topbar__title h1 { font-size: 18px; font-weight: 800; }
.crumb { margin: 0; font-size: 12px; color: var(--muted); font-weight: 500; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .topbar__menu { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.user-chip__text { display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; }
.user-chip__text small { color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--info); color: #fff; display: grid; place-items: center; font-weight: 700; }
.content { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 18px; }

/* Building blocks */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.box { background: #f8f9fb; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.box h3 { margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.title-lg { font-size: 17px; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--map { grid-template-columns: 1.7fr 1fr; }
.grid--detail { grid-template-columns: 1fr 300px; }
.link { color: var(--brand); font-weight: 600; font-size: 13px; text-decoration: none; }
.chip { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: #f1f3f7; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 600; font-size: 13px; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-ink); }
.btn--block { width: 100%; }
.page-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 14px; text-decoration: none; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.is-active { color: var(--brand); border-color: var(--brand); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.kpi__icon { width: 42px; height: 42px; flex: none; border-radius: var(--radius); background: var(--brand); color: #fff; display: grid; place-items: center; }
.kpi__label { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi__value { margin: 2px 0; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi__hint { margin: 0; font-size: 12px; color: var(--muted); }

/* Charts & lists */
.donut { position: relative; width: 190px; margin: 0 auto 14px; }
.donut strong { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; font-weight: 800; pointer-events: none; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i, .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.legend b { margin-left: auto; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border: 0; }
.feed a, .feed span:not(.badge):not(.dot) { flex: 1; display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.feed small { color: var(--muted); }
.feed svg { width: 18px; color: var(--muted); }
.feed a.icon-btn { flex: none; display: inline-grid; }

/* Badges */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #eef1f6; color: var(--muted); white-space: nowrap; }
.badge--new, .badge--reopened { background: #e8efff; color: var(--info); }
.badge--assigned, .badge--in_progress { background: #fff4dd; color: var(--warn); }
.badge--escalated, .badge--offline { background: #fde8eb; color: var(--brand); }
.badge--resolved, .badge--verified, .badge--online { background: #e3f6ec; color: var(--ok); }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-sm); color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
.sev { font-weight: 700; font-size: 12px; }
.sev--critical { color: var(--brand); } .sev--high { color: #e0531f; } .sev--medium { color: var(--warn); } .sev--low { color: var(--ok); }

/* Tables & forms */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr[data-href] { cursor: pointer; }
.table tr[data-href]:hover td { background: #fafbfd; }
.table a { font-weight: 600; text-decoration: none; }
.sub { display: block; color: var(--muted); }
.table td.mono { white-space: nowrap; }
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 16px 0 0; }
.pagination a { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; font-size: 13px; }
.pagination .active a { background: var(--brand); border-color: var(--brand); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; min-height: 36px; }
input[type=checkbox] { min-height: 0; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: 12px; align-items: end; }
.form { display: grid; gap: 14px; }
.form--grid { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
legend { font-weight: 700; padding: 0 6px; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.form__actions { display: flex; justify-content: flex-end; gap: 10px; }
.action { display: grid; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.person span:last-child { display: flex; flex-direction: column; }
.person small { color: var(--muted); }
.person .avatar { background: #fde8eb; color: var(--brand); }
input[type=file] { padding: 6px; font-size: 13px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #f4f6f9; border-radius: var(--radius-sm); padding: 4px 10px; margin-right: 10px; cursor: pointer; }
input[type=checkbox] { accent-color: var(--brand); width: 16px; height: 16px; }
.summary { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.summary li { background: #f6f7fa; border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; color: var(--muted); }
.summary b { display: block; font-size: 18px; color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.flash { padding: 10px 14px; border-radius: var(--radius); font-weight: 600; }
.flash--ok { background: #e3f6ec; color: var(--ok); }
.flash--err { background: #fde8eb; color: var(--brand); }

/* Timeline & media */
.timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 8px; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline p { margin: 4px 0; }
.timeline small { color: var(--muted); }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.media img, .media video { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); display: block; background: #000; }
.doc { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13px; }
.upload { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* Maps */
.map { width: 100%; border-radius: var(--radius); z-index: 1; }
.map--mini { height: 320px; }
.map--pick { height: 280px; margin-top: 8px; }
.map--full { height: calc(100vh - 140px); min-height: 460px; border-radius: 0; }
.map-layout { display: grid; grid-template-columns: 1fr 280px; gap: 18px; }
.checks { display: grid; gap: 8px; margin-top: 10px; }
.checks label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); font-size: 13px; }

/* CCTV wall — satu-satunya area gelap selain sidebar, supaya video terasa seperti control room */
.cams { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 12px; background: var(--navy); padding: 12px; border-radius: var(--radius-lg); }
.cam { margin: 0; background: #0a1322; border-radius: var(--radius); overflow: hidden; color: #d9e0ea; }
.cam figcaption, .cam footer { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12px; font-weight: 600; }
.cam figcaption small { margin-left: auto; color: #7d8aa0; font-weight: 500; }
.cam footer { justify-content: space-between; color: #7d8aa0; font-weight: 500; }
.cam .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(16,145,90,.25); }
.cam--offline .dot, .cam--unknown .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(200,16,46,.25); }
.cam figcaption small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam__view { aspect-ratio: 16/9; background: #000; display: grid; place-items: center; position: relative; }
.cam--offline .cam__view img { filter: grayscale(1) brightness(.35); }
.cam--offline .cam__view::after { content: "Sinyal terputus · menampilkan frame terakhir"; position: absolute; inset: auto 0 50%; transform: translateY(50%); text-align: center; font-size: 12px; font-weight: 700; color: #ffb3bf; }
.cam__view img, .cam__view video { width: 100%; height: 100%; object-fit: cover; }
.cam__off { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #7d8aa0; font-size: 12px; }
.seg { display: flex; gap: 4px; }

/* Login */
.login { display: grid; grid-template-columns: minmax(340px, 460px) 1fr; min-height: 100vh; background: var(--surface); }
.login__panel { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.login__panel h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.login__panel .form { margin-top: 24px; }
.login__art { background: radial-gradient(circle at 75% 20%, #23395c, var(--navy) 65%); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: flex-end; }
.login__art h2 { font-size: 34px; font-weight: 800; line-height: 1.15; max-width: 16ch; }
.login__art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; }
.login__art li { border-top: 2px solid var(--brand); padding-top: 10px; color: #c6cfdd; font-size: 13px; }
.login__art li strong { display: block; color: #fff; font-size: 14px; }

.sidebar-scrim { display: none; }

/* Responsive */
@media (max-width: 1100px) {
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .grid--map, .grid--2, .grid--detail, .map-layout { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
    .facts { grid-template-columns: repeat(2, 1fr); }
    .cams { --cols: 2 !important; }
}
@media (max-width: 760px) {
    .shell { grid-template-columns: 1fr; background: var(--bg); }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 1000; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.is-open { transform: none; }
    .sidebar.is-open + .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(15,27,45,.5); z-index: 999; }
    .topbar .topbar__menu { display: inline-grid; }
    .user-chip__text { display: none; }
    .content { padding: 16px; }
    .filters, .form--grid { grid-template-columns: 1fr; }
    .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi { flex-direction: column; gap: 8px; padding: 12px; }
    .kpi__icon { width: 32px; height: 32px; }
    .kpi__icon svg { width: 17px; height: 17px; }
    .kpi__value { font-size: 22px; }
    .topbar { padding: 10px 14px; gap: 10px; }
    .topbar__title h1 { font-size: 16px; }
    .facts { grid-template-columns: 1fr 1fr; }
    .media { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    input[type=file] { max-width: 100%; }
    .span-2 { grid-column: auto; }
    .cams { --cols: 1 !important; }
    .login { grid-template-columns: 1fr; }
    .login__art { display: none; }
    .login__panel { padding: 40px 24px; }
}
/* ---------- Sidebar modul (accordion) ---------- */
.nav__module { margin: 1px 0; }
.nav__module summary { list-style: none; cursor: pointer; }
.nav__module summary::-webkit-details-marker { display: none; }
.nav__item.is-current { color: #fff; }
.nav__caret { margin-left: auto; width: 15px !important; height: 15px !important; opacity: .55; transition: transform .15s; }
.nav__module[open] .nav__caret { transform: rotate(180deg); }
.nav__sub { display: block; padding: 6px 10px 6px 37px; font-size: 12.5px; text-decoration: none; color: #9aa6b8; border-radius: var(--radius-sm); position: relative; }
.nav__sub:hover { color: #fff; background: var(--navy-2); }
.nav__sub.is-active { color: #fff; background: var(--brand); }
.nav__sub.is-planned::after { content: ""; position: absolute; right: 10px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: #3b4a62; }

/* ---------- Umum admin ---------- */
.kpis--slim .kpi { align-items: center; padding: 14px 16px; }
.kpis--slim .kpi__value { font-size: 22px; margin: 0; }
.filters--users { grid-template-columns: 2fr 1fr 1.4fr 1fr auto; }
.filters--audit { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.avatar--sm { width: 30px; height: 30px; font-size: 13px; background: #e8efff; color: var(--info); flex: none; }
.person a { font-weight: 600; text-decoration: none; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px 2px 2px; border-radius: 99px; background: color-mix(in srgb, var(--app) 9%, white); color: color-mix(in srgb, var(--app) 80%, black); white-space: nowrap; }
.role-chip b { font-size: 10px; letter-spacing: .03em; padding: 2px 6px; border-radius: 99px; background: var(--app); color: #fff; }
.row-actions { white-space: nowrap; text-align: right; }
.assign .row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.row-actions > * { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.row-actions .icon-btn { width: 32px; height: 32px; }
.btn--sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn--ghost-danger { color: var(--brand); border-color: #f3c3cb; margin-right: auto; }
.chip--xs { font-size: 10.5px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.coverage { min-width: 160px; }
.bar { height: 6px; border-radius: 99px; background: #edf0f5; overflow: hidden; margin-bottom: 4px; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.coverage small { color: var(--muted); }
.stack { display: grid; gap: 18px; align-content: start; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state > svg { width: 36px; height: 36px; color: var(--muted); margin-bottom: 10px; }
.empty-state h2 { margin-bottom: 6px; }
.empty-state p { max-width: 60ch; margin: 6px auto; }

/* ---------- Form user ---------- */
.form-layout { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.form-layout__main, .form-layout__side { display: grid; gap: 18px; }
.form-layout__side { position: sticky; top: 84px; }
.form--narrow { max-width: 760px; }
.form__actions--stack { display: grid; gap: 8px; justify-content: stretch; }
.table--middle td { vertical-align: middle; }
.app-tile__roles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.app-tile__roles span { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--app) 10%, white); color: color-mix(in srgb, var(--app) 80%, black); }
.app-access { border: 1px solid var(--line); border-left: 4px solid var(--app); border-radius: var(--radius); padding: 14px; margin-top: 12px; }
.app-access__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.app-access__head .muted { margin-left: auto; font-size: 12px; }
.app-dot { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--app, #475569); color: #fff; flex: none; }
.app-dot svg { width: 16px; height: 16px; }
.app-dot--lg { width: 40px; height: 40px; border-radius: 11px; }
.app-dot--lg svg { width: 21px; height: 21px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.check-card { flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); font-weight: 400; }
.check-card:has(input:checked) { border-color: var(--app, var(--brand)); background: color-mix(in srgb, var(--app, var(--brand)) 6%, white); }
.check-card input { margin-top: 2px; flex: none; }
.check-card span { display: flex; flex-direction: column; font-size: 13px; }
.check-card small { color: var(--muted); font-size: 12px; }
.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: 13px; cursor: pointer; }
.switch--inline { align-self: end; padding-bottom: 8px; }
.meta { display: grid; gap: 10px; margin: 6px 0 12px; font-size: 13px; }
.meta dt { color: var(--muted); font-size: 12px; }
.meta dd { margin: 2px 0 0; font-weight: 600; word-break: break-all; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.secret { display: block; padding: 8px; background: #fff7e0; border-radius: var(--radius-sm); font-size: 12px; word-break: break-all; margin-bottom: 4px; }
input[type=color] { padding: 3px; height: 38px; }

/* ---------- Matriks akses ---------- */
.matrix-bar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.matrix-bar__pick { display: flex; gap: 12px; flex-wrap: wrap; }
.matrix-bar__pick label { min-width: 200px; }
.matrix-bar__info { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix-form { overflow: visible; }
.matrix thead th { position: sticky; top: 64px; z-index: 2; background: #f6f7fa; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: center; width: 84px; }
.matrix thead th.matrix__menu { text-align: left; width: auto; padding-left: 18px; }
.matrix td { text-align: center; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.matrix th[scope=row] { text-align: left; font-weight: 600; padding: 9px 8px 9px 52px; border-bottom: 1px solid var(--line); }
.matrix th[scope=row] .sub { font-weight: 400; font-size: 11px; }
.matrix__module th, .matrix__module td { background: #fbfbfd; border-bottom: 1px solid var(--line); }
.matrix__module th { text-align: left; padding: 10px 8px 10px 14px; font-weight: 700; }
.matrix__module th > svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 8px; color: var(--brand); }
.matrix__fold { border: 0; background: none; padding: 0; margin-right: 4px; cursor: pointer; color: var(--muted); vertical-align: middle; }
.matrix__fold svg { width: 16px; height: 16px; transition: transform .15s; }
.matrix__group.is-folded .matrix__fold svg { transform: rotate(-90deg); }
.matrix__group.is-folded .matrix__row { display: none; }
.matrix__count { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--muted); background: #eef1f6; padding: 1px 8px; border-radius: 99px; }
.matrix__count.is-full { background: #e3f6ec; color: var(--ok); }
.matrix__row:hover th, .matrix__row:hover td { background: #fcf6f7; }
.matrix__row.is-off { opacity: .5; }
.matrix input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.matrix .na { color: #c9ced8; }
.matrix-save { position: sticky; bottom: 0; z-index: 3; border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); flex-wrap: wrap; }
.matrix-save div { display: flex; gap: 8px; }

/* ---------- Aplikasi ---------- */
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.app-card { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--app); border-radius: var(--radius-lg); padding: 18px; text-decoration: none; }
.app-card:hover { border-color: color-mix(in srgb, var(--app) 45%, var(--line)); border-top-color: var(--app); }
.app-card header { display: flex; align-items: center; gap: 12px; }
.app-card header > span:nth-child(2) { display: flex; flex-direction: column; margin-right: auto; }
.app-card header small { color: var(--muted); }
.app-card p { margin: 0; }
.app-card__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.app-card__stats dt { font-size: 11px; color: var(--muted); }
.app-card__stats dd { margin: 0; font-size: 20px; font-weight: 800; }
.menu-tree details { border-bottom: 1px solid var(--line); }
.menu-tree summary { display: flex; align-items: center; gap: 10px; padding: 12px 4px; cursor: pointer; list-style: none; }
.menu-tree summary svg { width: 16px; height: 16px; color: var(--brand); }
.menu-tree summary .muted { margin-left: auto; font-size: 12px; }
.menu-tree ul { list-style: none; margin: 0 0 10px; padding: 0 0 0 30px; }
.menu-tree li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px dashed var(--line); }
.menu-tree li.is-off .menu-tree__name { opacity: .45; text-decoration: line-through; }
.menu-tree__name { flex: 1; display: flex; flex-direction: column; font-size: 13px; font-weight: 600; }
.menu-tree__name small { font-weight: 400; font-size: 11px; }
.acts { display: flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.act { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: #eef1f6; color: var(--muted); }
.act--approve { background: #e3f6ec; color: var(--ok); } .act--delete { background: #fde8eb; color: var(--brand); } .act--export { background: #e8efff; color: var(--info); }
.toggle { width: 36px; height: 20px; border-radius: 99px; border: 0; background: #d5dae3; position: relative; cursor: pointer; flex: none; }
.toggle span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle.is-on { background: var(--ok); }
.toggle.is-on span { left: 18px; }
.payload code { font-size: 11.5px; color: var(--muted); }

/* ---------- Portal ---------- */
.portal__hello { font-size: 15px; color: var(--muted); margin: 0 0 4px; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.app-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px; min-height: 250px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.app-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--app); }
.app-tile:hover { border-color: var(--app); }
.app-tile__icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--app); color: #fff; margin-bottom: 8px; }
.app-tile__code { font-size: 11px; font-weight: 700; color: var(--app); }
.app-tile strong { font-size: 18px; }
.app-tile__go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--app); }
.app-tile__go svg { width: 15px; height: 15px; }

@media (min-width: 900px) { .matrix-form .table-wrap { overflow: visible; } }
@media (max-width: 899px) { .matrix thead th { top: 0; } }
@media (max-width: 1100px) {
    .form-layout { grid-template-columns: 1fr; }
    .form-layout__side { position: static; }
    .filters--users, .filters--audit { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .filters--users, .filters--audit { grid-template-columns: 1fr; }
    .matrix thead th { width: 56px; font-size: 10.5px; padding: 10px 4px; }
    .matrix th[scope=row] { padding-left: 14px; min-width: 150px; }
    .matrix-bar__pick label { min-width: 0; flex: 1 1 140px; }
    .matrix-bar__info { align-items: flex-start; }
    .danger-zone { flex-direction: column; align-items: stretch; }
    .row-actions .btn--sm { display: none; }
}

/* ---------- Patrol ---------- */
.badge--p-scheduled { background: #eef1f6; color: var(--muted); }
.badge--p-in_progress { background: #e8efff; color: var(--info); }
.badge--p-completed { background: #fff4dd; color: var(--warn); }
.badge--p-verified { background: #e3f6ec; color: var(--ok); }
.badge--p-rejected, .badge--p-missed { background: #fde8eb; color: var(--brand); }
.txt-danger { color: var(--brand); }
tr.is-off td { opacity: .5; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row > label { flex: 1 1 120px; }
.row--2 > label { flex: 1 1 0; }

.route-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.route-card { display: grid; grid-template-rows: 130px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.route-card.is-off { opacity: .6; }
.route-card__preview { background: linear-gradient(135deg, #f6f7fa, #eef1f6); border-bottom: 1px solid var(--line); display: grid; place-items: center; position: relative; }
.route-card__preview::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 22px 22px; opacity: .6; }
.route-svg { position: relative; width: 100%; height: 100%; }
.route-svg text { font: 700 9px "Plus Jakarta Sans", sans-serif; fill: var(--ink); }
.route-card__body { padding: 16px; display: grid; gap: 10px; }
.route-card__body header { display: flex; justify-content: space-between; gap: 8px; }
.route-card__body header > span { display: flex; flex-direction: column; }
.route-card__body p { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; }
.route-card__body p svg { width: 14px; height: 14px; }
.route-card__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.route-card__stats dt { font-size: 11px; color: var(--muted); }
.route-card__stats dd { margin: 0; font-weight: 800; font-size: 15px; }
.route-card footer { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }

.route-editor { display: grid; grid-template-columns: 1fr 400px; gap: 18px; align-items: start; }
.route-editor__map { position: sticky; top: 84px; }
.route-editor__side { display: grid; gap: 18px; }
.map--editor { height: calc(100vh - 130px); min-height: 480px; border-radius: 0; cursor: crosshair; }
.map-hint { position: absolute; left: 12px; bottom: 12px; z-index: 500; margin: 0; display: flex; align-items: center; gap: 6px; background: rgba(15,27,45,.85); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: var(--radius-sm); }
.map-hint svg { width: 14px; height: 14px; }
.cp-pin { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c, var(--brand)); color: #fff; font: 800 12px "Plus Jakarta Sans", sans-serif; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); flex: none; }
.cp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; }
.cp-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.cp-item__fields { flex: 1; display: grid; gap: 6px; min-width: 0; }
.cp-item__fields > input { font-weight: 600; }
.cp-item__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; }
.cp-item__meta label { flex-direction: row; align-items: center; gap: 4px; font-weight: 500; }
.cp-item__meta input[type=number] { width: 60px; min-height: 28px; padding: 3px 6px; }
.cp-item__btns { display: flex; flex-direction: column; gap: 2px; }
.cp-item__btns .icon-btn { width: 28px; height: 28px; }
.cp-item__btns svg { width: 14px; height: 14px; }

.checklist-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.checklist-card.is-off { opacity: .6; }
.q-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 13px; }
.q-list li > span:first-child { margin-right: 6px; }
.req { color: var(--brand); }
.checklist-card footer { font-size: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.q-builder { display: grid; gap: 8px; }
.q-row { display: flex; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.q-row__n { width: 24px; height: 24px; border-radius: 50%; background: #eef1f6; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.q-row__q { flex: 1 1 260px; }
.q-row select { flex: 0 0 auto; }
.q-row__req { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; }

.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week__day { background: #f8f9fb; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: grid; gap: 6px; align-content: start; min-height: 150px; }
.week__day.is-today { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.week__label { margin: 0 0 2px; font-size: 12px; color: var(--muted); }
.week__label b { color: var(--ink); font-size: 15px; }
.week__item { display: grid; gap: 1px; padding: 6px 8px; border-radius: var(--radius-sm); background: #fff; border-left: 3px solid var(--app); text-decoration: none; font-size: 12px; }
.week__item strong { font-size: 12px; line-height: 1.3; }
.week__item small, .week__item .mono { color: var(--muted); font-size: 11px; }
.week__empty { font-size: 12px; color: #a9b1bf; }
.shift { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eef1f6; color: var(--muted); }
.shift--pagi { background: #fff4dd; color: #a86b00; } .shift--siang { background: #e8efff; color: var(--info); }
.shift--malam { background: #1b2a44; color: #c6cfdd; } .shift--adhoc { background: #fde8eb; color: var(--brand); }
.days { display: flex; gap: 2px; }
.days span { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: #f1f3f7; color: #b3bac6; }
.days span.on { background: var(--brand); color: #fff; }
.seg--choice { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px; }
.seg--choice label { flex-direction: row; cursor: pointer; }
.seg--choice input { position: absolute; opacity: 0; pointer-events: none; }
.seg--choice span { padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ink); }
.seg--choice label + label span { border-left: 1px solid var(--line); }
.seg--choice input:checked + span { background: var(--brand); color: #fff; }
.seg--choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-picker label { flex-direction: row; cursor: pointer; }
.day-picker input { position: absolute; opacity: 0; }
.day-picker span { display: grid; place-items: center; width: 52px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; color: var(--ink); }
.day-picker input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.day-picker input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.date-nav { display: flex; align-items: center; gap: 6px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--muted); }
.chip-link svg { width: 14px; height: 14px; }
.chip-link.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-link.is-danger { background: #fde8eb; border-color: #f3c3cb; color: var(--brand); }
.assign-list { display: grid; }
.assign { display: grid; grid-template-columns: 60px minmax(220px, 1.4fr) minmax(160px, 1fr) 150px 200px; gap: 16px; align-items: center; padding: 12px 6px 12px 14px; border-top: 1px solid var(--line); position: relative; text-decoration: none; }
.assign::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--app); }
.assign:first-child { border-top: 0; }
.assign--link:hover { background: #fafbfd; }
.assign__time { font-weight: 700; display: flex; flex-direction: column; line-height: 1.2; }
.assign__time small { color: var(--muted); font-weight: 500; }
.assign__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.assign__who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.assign__who small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assign__progress small { color: var(--muted); font-size: 12px; }
.reassign select { min-height: 32px; padding: 4px 8px; font-size: 12px; max-width: 150px; }
.adhoc summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.adhoc summary svg { width: 18px; height: 18px; color: var(--brand); }
.adhoc__form { grid-template-columns: repeat(3, 1fr); margin-top: 16px; align-items: end; }
.span-all { grid-column: 1 / -1; }

.result-head__title { display: flex; align-items: center; gap: 14px; }
.result-head__title > div { flex: 1; }
.result-head__title p { margin: 2px 0 0; }
.facts--5 { grid-template-columns: repeat(5, 1fr); }
.facts dd small { display: block; font-weight: 600; }
.legend-inline { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend-inline .dot { margin-left: 6px; }
.map--result { height: 380px; margin-bottom: 18px; }
.cp-timeline { list-style: none; margin: 0; padding: 0; }
.cp-timeline__item { display: flex; gap: 14px; padding-bottom: 16px; position: relative; }
.cp-timeline__item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.cp-timeline__item:last-child::before { display: none; }
.cp-timeline__seq { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: #b9c0cc; flex: none; position: relative; }
.cp--ok .cp-timeline__seq { background: var(--ok); } .cp--issue .cp-timeline__seq { background: #d61f3a; }
.cp-timeline__body { flex: 1; min-width: 0; padding-top: 3px; }
.cp-timeline__body header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.geo { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.geo svg { width: 13px; height: 13px; }
.geo--ok { background: #e3f6ec; color: var(--ok); } .geo--far { background: #fff4dd; color: #a86b00; }
.answers-wrap summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ok); list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.answers-wrap summary::before { content: "▸"; font-size: 10px; transition: transform .15s; }
.answers-wrap[open] summary::before { transform: rotate(90deg); }
.answers-wrap[open] summary { margin-bottom: 6px; }
.cp--issue .answers-wrap summary { color: var(--brand); }
.answers { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; }
.answers li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-top: 1px solid var(--line); }
.answers li:first-child { border-top: 0; }
.answers li.is-bad { background: #fff5f6; } .answers li.is-bad b { color: var(--brand); }
.note { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; font-size: 13px; background: #f8f9fb; padding: 8px 10px; border-radius: var(--radius-sm); }
.note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--muted); }
.cp-timeline__foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.cp-timeline__foot:empty { display: none; }
.cp-timeline__foot img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; margin: 12px auto 16px; display: grid; place-content: center; text-align: center;
    background: radial-gradient(closest-side, #fff 78%, transparent 79% 100%), conic-gradient(var(--brand) calc(var(--p) * 1%), #edf0f5 0); }
.ring strong { font-size: 30px; font-weight: 800; line-height: 1; } .ring small { color: var(--muted); }
.verify-box .btn + .btn { margin-top: -4px; }

.run { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.run__head { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; border-top: 4px solid var(--app); }
.run__head p { margin: 0; }
.run__count { font-size: 15px; color: var(--muted); }
.run__count strong { font-size: 30px; color: var(--ink); }
.run__head .bar, .run__head .note { grid-column: 1 / -1; }
.bar--lg { height: 10px; }
.run__start { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 28px 20px; }
.run__start > svg { width: 40px; height: 40px; color: var(--brand); }
.run__start p { margin: 0 0 8px; }
.btn--xl { height: 52px; font-size: 16px; }
.run__step { margin: 0; font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.gps { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: #f1f3f7; font-size: 13px; font-weight: 600; color: var(--muted); }
.gps svg { width: 18px; height: 18px; flex: none; }
.gps--ok { background: #e3f6ec; color: var(--ok); } .gps--far { background: #fff4dd; color: #a86b00; }
.qr-input { display: flex; gap: 8px; }
.qr-input input { flex: 1; font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.qr-video { width: 100%; border-radius: var(--radius); background: #000; }
fieldset.q { border: 0; padding: 0; margin: 0; }
fieldset.q legend { padding: 0; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.seg--yn { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 0; }
.seg--yn label { display: block; }
.seg--yn span { display: block; text-align: center; padding: 11px; }
fieldset.q select, fieldset.q input { width: 100%; }
.qr-input input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 500; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 8px 0; position: relative; }
.steps li + li::before { content: ""; position: absolute; left: 12px; top: -10px; height: 18px; width: 2px; background: var(--line); }
.steps li > span:last-child { display: flex; flex-direction: column; font-size: 13px; }
.steps small { color: var(--muted); }
.steps__dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #f1f3f7; color: var(--muted); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); flex: none; }
.steps li.is-done .steps__dot { background: var(--ok); box-shadow: none; }
.steps li.is-done .steps__dot::after { content: "✓"; color: #fff; }
.steps li.is-issue .steps__dot { background: #d61f3a; }
.steps li.is-issue .steps__dot::after { content: "!"; }
.steps li.is-next .steps__dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px #fde8eb; }
.steps li.is-next strong { color: var(--brand); }
.filters--results { grid-template-columns: 1fr 1fr 1.3fr 1.3fr 1fr auto; }

@media (max-width: 1100px) {
    .route-editor { grid-template-columns: 1fr; }
    .route-editor__map { position: static; }
    .map--editor { height: 60vh; }
    .week { grid-template-columns: repeat(4, 1fr); }
    .assign { grid-template-columns: 56px 1fr 140px; }
    .assign__progress { grid-column: 2; }
    .facts--5 { grid-template-columns: repeat(3, 1fr); }
    .filters--results { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .week { grid-template-columns: repeat(2, 1fr); }
    .assign { grid-template-columns: 48px 1fr; gap: 8px 12px; }
    .assign > div:nth-child(4), .assign .row-actions { grid-column: 2; }
    .assign .row-actions { text-align: left; }
    .adhoc__form { grid-template-columns: 1fr; }
    .facts--5 { grid-template-columns: 1fr 1fr; }
    .filters--results { grid-template-columns: 1fr; }
    .page-actions .inline-form { width: 100%; }
}

/* ---------- Map & Tracking ---------- */
.tabs { align-items: center; }
.tabs__action { margin-left: auto; margin-bottom: 6px; }
.kpi--alert .kpi__icon { animation: none; box-shadow: 0 0 0 4px #fde8eb; }
.kpi--alert .kpi__value { color: var(--brand); }
.badge--lg { font-size: 12.5px; padding: 5px 12px; }
.badge--s-planned { background: #eef1f6; color: var(--muted); }
.badge--s-loaded { background: #fff4dd; color: #a86b00; }
.badge--s-in_transit { background: #e8efff; color: var(--info); }
.badge--s-arrived { background: #e7f7f6; color: #0f766e; }
.badge--s-completed { background: #e3f6ec; color: var(--ok); }
.badge--s-discrepancy { background: #fde8eb; color: var(--brand); }
.badge--s-resolved { background: #f1ecfd; color: #6d28d9; }
.badge--s-cancelled { background: #eef1f6; color: #9aa3b2; text-decoration: line-through; }
.inline-ico { width: 16px; height: 16px; vertical-align: -2px; }
.monitor { display: grid; grid-template-columns: 1fr 360px; gap: 18px; }
.monitor__map { position: relative; }
.map--monitor { height: 560px; border-radius: 0; }
.map-hint--top { top: 12px; bottom: auto; left: 56px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }
.monitor__side .panel { height: 560px; display: flex; flex-direction: column; }
.ship-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 8px; }
.ship-list a { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.ship-list a:hover { border-color: var(--info); }
.ship-list header, .ship-list footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.ship-list p { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ship-list p svg { width: 14px; height: 14px; color: var(--muted); }
.ship-list__route { color: var(--muted); }
.ship-list footer .txt-danger { display: inline-flex; gap: 3px; align-items: center; font-weight: 700; }
.ship-list footer svg { width: 13px; height: 13px; }
.alert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alert-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 4px solid var(--warn); }
.alert-item--high { border-left-color: var(--brand); background: #fffafa; }
.alert-item--low { border-left-color: #94a3b8; }
.alert-item.is-acked { opacity: .6; background: transparent; }
.alert-item > div { flex: 1; min-width: 0; }
.alert-item p { margin: 2px 0; font-size: 13px; }
.alert-item__icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #fff4dd; color: #a86b00; flex: none; }
.alert-item--high .alert-item__icon { background: #fde8eb; color: var(--brand); }
.alert-item__icon svg { width: 16px; height: 16px; }
.alert-list--compact .alert-item { padding: 10px; }
.ack { display: flex; gap: 6px; align-items: center; }
.ack input { min-height: 32px; font-size: 12.5px; width: 230px; }
.ship-head__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ship-head__top p { margin: 0 0 2px; }
.stepper { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.stepper__item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); position: relative; text-align: center; }
.stepper__item::before { content: ""; position: absolute; top: 16px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper__item:first-child::before { display: none; }
.stepper__item > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #f1f3f7; color: var(--muted); position: relative; z-index: 1; border: 2px solid #fff; }
.stepper__item svg { width: 16px; height: 16px; }
.stepper__item.is-done { color: var(--ink); } .stepper__item.is-done > span { background: var(--ok); color: #fff; } .stepper__item.is-done::before { background: var(--ok); }
.stepper__item.is-now { color: var(--info); } .stepper__item.is-now > span { background: var(--info); color: #fff; box-shadow: 0 0 0 4px #e8efff; } .stepper__item.is-now::before { background: var(--ok); }
.stepper__item.is-bad { color: var(--brand); } .stepper__item.is-bad > span { background: var(--brand); color: #fff; } .stepper__item.is-bad::before { background: var(--ok); }
.facts--6 { grid-template-columns: repeat(6, 1fr); }
.facts dd .bar { margin-top: 6px; }
.legend-inline .ln { display: inline-block; width: 18px; height: 4px; border-radius: 2px; margin-left: 8px; }
.ln--plan { background: repeating-linear-gradient(90deg, #2563eb 0 5px, transparent 5px 8px); box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.ln--ok { background: #10915a; } .ln--off { background: #d61f3a; }
.map--ship { height: 430px; }
.compliance { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0 0; }
.compliance > div { padding: 10px 12px; border-radius: var(--radius-sm); background: #f6f7fa; }
.compliance dt { font-size: 11.5px; color: var(--muted); }
.compliance dd { margin: 2px 0 0; font-weight: 800; font-size: 16px; }
.compliance dd small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.compliance .is-bad { background: #fde8eb; } .compliance .is-bad dd { color: var(--brand); }
.compliance .is-ok dd { color: var(--ok); }
.verdict { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 99px; }
.verdict svg { width: 16px; height: 16px; }
.verdict--ok { background: #e3f6ec; color: var(--ok); } .verdict--bad { background: #fde8eb; color: var(--brand); }
.num { text-align: right !important; }
.recon tr.is-bad td { background: #fff5f6; }
.recon small { color: var(--muted); font-size: 11px; }
.seals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.seals h3 { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.seal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seal { font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 9px; border-radius: 6px; background: #eef1f6; border: 1px solid #dfe3ea; }
.seal--missing { background: #fde8eb; border-color: #f3c3cb; color: var(--brand); text-decoration: line-through; }
.seal--extra { background: #fff4dd; border-color: #f4d9a0; color: #a86b00; }
.seal-verdict { grid-column: 1 / -1; margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; padding: 9px 12px; border-radius: var(--radius-sm); }
.seal-verdict svg { width: 16px; height: 16px; }
.seal-verdict.is-ok { background: #e3f6ec; color: var(--ok); } .seal-verdict.is-bad { background: #fde8eb; color: var(--brand); }
.action-card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.action-card h2 svg { width: 18px; height: 18px; color: var(--brand); }
.action-card { border-top: 4px solid var(--info); }
.action-card--bad { border-top-color: var(--brand); background: #fffafa; }
.action-card--ok { border-top-color: var(--ok); }
.action-card--ok h2 svg { color: var(--ok); }
.ev-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.ev { display: grid; grid-template-columns: 78px 1fr; gap: 10px; font-size: 13px; padding-left: 10px; border-left: 3px solid var(--line); }
.ev p { margin: 2px 0; } .ev .mono { font-size: 12px; }
.ev--deviation, .ev--discrepancy, .ev--stop { border-left-color: var(--brand); }
.ev--received, .ev--resolved, .ev--back_on_route { border-left-color: var(--ok); }
.ev--departed, .ev--arrived { border-left-color: var(--info); }
.filters--ship { grid-template-columns: 1.6fr 1.2fr 1.2fr 1fr 1fr 1fr auto; }
.geo--bad { background: #fde8eb; color: var(--brand); }
.item-row { display: grid; grid-template-columns: 2fr 1fr 90px 80px 14px; gap: 8px; align-items: center; margin-bottom: 8px; }
.share { display: flex; align-items: center; gap: 12px; }
.share > svg { width: 28px; height: 28px; color: var(--info); }
.share > div { flex: 1; } .share p { margin: 2px 0 0; }
.trip { display: grid; gap: 8px; }
.trip header { display: flex; justify-content: space-between; align-items: center; }
.trip p { margin: 0; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.split > .panel--flush { position: sticky; top: 84px; }
.map--fleet { height: 560px; border-radius: 0; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.state--moving { color: var(--ok); } .state--moving::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.state--idle { color: #a86b00; } .state--idle::before { background: #f59e0b; }
.state--offline { color: var(--muted); }
.veh-pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; background: var(--navy); color: #fff;
    font: 700 11px "Plus Jakarta Sans", sans-serif; padding: 4px 8px 4px 5px; border-radius: 99px; box-shadow: 0 2px 6px rgba(0,0,0,.35); border: 2px solid #fff; }
.veh-pin i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.veh-pin--idle i { background: #f59e0b; } .veh-pin--offline i { background: #94a3b8; }
.veh-pin--alert { background: var(--brand); }
.site-pin { position: absolute; transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: #fff; border: 2px solid var(--navy);
    border-radius: 99px; padding: 2px 9px 2px 2px; font: 800 12px "Plus Jakarta Sans", sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.site-pin::first-letter { }
.site-pin { counter-reset: none; }
.site-pin--origin, .site-pin--dest { color: #fff; }
.site-pin--origin { background: var(--ok); border-color: #fff; } .site-pin--dest { background: var(--navy); border-color: #fff; }
.site-pin b { font-weight: 600; font-size: 11.5px; background: rgba(255,255,255,.18); padding: 2px 6px; border-radius: 99px; }
.alert-pin { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.dot-pin { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font: 700 11px "Plus Jakarta Sans", sans-serif;
    background: #fff; color: var(--ink); padding: 3px 8px 3px 4px; border-radius: 99px; box-shadow: 0 1px 5px rgba(0,0,0,.3); }
.dot-pin i { width: 12px; height: 12px; border-radius: 50%; background: var(--info); border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d6ee; }
.dot-pin--asset i { border-radius: 3px; background: #7c3aed; }
.dot-pin--offline { opacity: .65; } .dot-pin--offline i { background: #94a3b8; }
.dot-pin--idle.dot-pin--personnel i { background: #f59e0b; }
.stop-pin { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #f59e0b; color: #fff; font-weight: 800; font-size: 11px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.stop-no { width: 24px; height: 24px; border-radius: 6px; background: #fff4dd; color: #a86b00; display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.player { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.player input[type=range] { flex: 1; accent-color: var(--brand); }

@media (max-width: 1100px) {
    .monitor, .split { grid-template-columns: 1fr; }
    .monitor__side .panel { height: auto; max-height: 520px; }
    .split > .panel--flush { position: static; }
    .facts--6 { grid-template-columns: repeat(3, 1fr); }
    .compliance { grid-template-columns: repeat(3, 1fr); }
    .filters--ship { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .map--monitor, .map--fleet { height: 380px; }
    .stepper { grid-template-columns: repeat(5, 1fr); font-size: 10px; }
    .stepper__item { font-size: 10px; }
    .facts--6, .compliance, .seals { grid-template-columns: 1fr 1fr; }
    .ack { flex-direction: column; align-items: stretch; } .ack input { width: 100%; }
    .alert-item { flex-wrap: wrap; }
    .item-row { grid-template-columns: 1fr 1fr; }
    .filters--ship { grid-template-columns: 1fr; }
    .tabs__action { display: none; }
    .grid--ship { display: flex; flex-direction: column; }
    .grid--ship > aside { display: contents; }
    .grid--ship .action-card { order: -1; }
}

/* ---------- Surveillance ---------- */
.btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.cam footer .cam__pb { display: inline-flex; align-items: center; gap: 4px; color: #c6cfdd; text-decoration: none; font-weight: 600; }
.cam footer .cam__pb svg { width: 13px; height: 13px; }
.cam--degraded .dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.25); }
.cam-pin { position: absolute; transform: translate(-50%, -50%); background: var(--c); color: #fff; font: 800 10.5px "Plus Jakarta Sans", sans-serif; padding: 3px 7px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); white-space: nowrap; }
.cam-thumb { float: left; width: 64px; height: 36px; border-radius: 5px; background: #0a1322; margin-right: 10px; overflow: hidden; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-bar { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.pb-bar > label { min-width: 320px; }
.pb-bar__info { margin-left: auto; display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.pb-bar__info b { color: var(--ink); font-size: 16px; }
.pb { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.pb > * { min-width: 0; }
.clip-times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clip-times input { min-width: 0; width: 100%; font-size: 13px; padding: 6px; }
.clip-times .btn { padding: 0 8px; }
.pb__main { background: var(--navy); border-radius: var(--radius-lg); padding: 14px; display: grid; gap: 12px; }
.player-wrap { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; }
.player-wrap video { width: 100%; height: 100%; object-fit: contain; display: block; }
.player-wrap__osd { position: absolute; inset: 0 0 auto; display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: linear-gradient(rgba(0,0,0,.55), transparent); color: #fff; font-size: 13px; }
.player-wrap__osd .mono:last-child { margin-left: auto; font-size: 15px; font-weight: 700; letter-spacing: .03em; }
.rec { color: #ff4d5e; font-weight: 800; font-size: 12px; }
.player-wrap__gap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #9aa6b8; background: repeating-linear-gradient(45deg, #0b1424 0 14px, #0e192d 14px 28px); }
.player-wrap__gap svg { width: 34px; height: 34px; }
.player-wrap__gap strong { color: #fff; }
.pb-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pb-controls .icon-btn { background: #182840; border-color: #24375a; color: #c6cfdd; }
.pb-controls .seg .btn, .pb-controls > .btn:not(.btn--primary) { background: #182840; border-color: #24375a; color: #c6cfdd; }
.pb-controls .seg .btn.is-active { background: #fff; color: var(--navy); border-color: #fff; }
.pb-jump { flex-direction: row; align-items: center; gap: 6px; color: #9aa6b8; }
.pb-jump input { min-height: 32px; padding: 3px 6px; background: #182840; border-color: #24375a; color: #fff; color-scheme: dark; }
.seg--zoom { margin-left: auto; }
.timeline { position: relative; user-select: none; }
.timeline__track { position: relative; height: 54px; background: repeating-linear-gradient(45deg, #1a2740 0 6px, #16223a 6px 12px); border-radius: 8px; cursor: pointer; overflow: hidden; }
.tl-future { position: absolute; top: 0; bottom: 0; right: 0; background: #0b1424; }
.tl-seg { position: absolute; top: 18px; bottom: 6px; background: #1f9d63; border-radius: 2px; }
.tl-seg--motion { background: #2bb673; }
.tl-ev { position: absolute; top: 4px; width: 3px; height: 12px; margin-left: -1px; border: 0; padding: 0; border-radius: 2px; background: #f59e0b; cursor: pointer; }
.tl-ev--span { height: 10px; border-radius: 3px; }
.tl-ev--offline { background: #ef4444; top: 4px; } .tl-ev--online { display: none; }
.tl-ev--tamper, .tl-ev--intrusion { background: #f472b6; }
.tl-inc { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; border: 2px solid #fff; padding: 0; background: #8b5cf6; transform: rotate(45deg); cursor: pointer; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ff4d5e; pointer-events: none; }
.tl-head span { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -2px); background: #ff4d5e; color: #fff; font: 700 10px ui-monospace, monospace; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.timeline__track { overflow: visible; margin-top: 16px; }
.timeline__axis { position: relative; height: 18px; margin-top: 4px; }
.timeline__axis span { position: absolute; transform: translateX(-50%); font: 600 10.5px ui-monospace, monospace; color: #7d8aa0; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0; font-size: 11.5px; color: #9aa6b8; }
.tl-legend .sw { display: inline-block; width: 14px; height: 8px; border-radius: 2px; margin-right: -8px; }
.sw--rec { background: #1f9d63; } .sw--gap { background: repeating-linear-gradient(45deg, #2a3a58 0 3px, #16223a 3px 6px); } .sw--motion { background: #f59e0b; } .sw--offline { background: #ef4444; } .sw--incident { background: #8b5cf6; }
.pb-events { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 300px; overflow-y: auto; }
.pb-ev { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left; background: none; border: 0; border-left: 3px solid #f59e0b; padding: 6px 8px; border-radius: 0 6px 6px 0; cursor: pointer; font: inherit; color: var(--ink); }
.pb-ev:hover { background: #f6f7fa; }
.pb-ev > span:last-child { display: flex; flex-direction: column; font-size: 13px; }
.pb-ev strong { display: inline-flex; align-items: center; gap: 4px; }
.pb-ev strong svg { width: 13px; height: 13px; }
.pb-ev small { color: var(--muted); }
.pb-ev--offline { border-left-color: #ef4444; } .pb-ev--online { border-left-color: var(--ok); } .pb-ev--incident { border-left-color: #8b5cf6; }
.strip { display: grid; grid-template-columns: repeat(96, 1fr); gap: 1px; width: 300px; height: 22px; }
.strip i { border-radius: 1px; background: #e5e8ee; }
.strip i.strip--online { background: #22c55e; } .strip i.strip--degraded { background: #f59e0b; } .strip i.strip--offline { background: #ef4444; }
.strip-axis { display: flex; justify-content: space-between; width: 300px; font-size: 10px; color: var(--muted); margin-top: 2px; }
.bar--sm { height: 4px; margin-top: 6px; width: 90px; }
.bar--danger span { background: var(--brand); }
.bar span { background: var(--brand); }
.health-table .bar span, .nvr-list .bar span { background: var(--info); }
.health-table .bar--danger span, .nvr-list .bar--danger span { background: var(--brand); }
.nvr-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.nvr-list li { display: flex; align-items: center; gap: 12px; }
.nvr-list li > span { flex: 1; display: flex; flex-direction: column; }
.nvr-list small { color: var(--muted); }
.nvr-list__bar { display: flex; align-items: center; gap: 8px; width: 170px; }
.nvr-list__bar .bar { flex: 1; height: 8px; margin: 0; }
.test-result ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.test-result li { display: grid; grid-template-columns: 20px 160px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.test-result li svg { width: 18px; height: 18px; }
.test-result .is-ok svg { color: var(--ok); } .test-result .is-bad svg { color: var(--brand); }
.step-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; margin-right: 8px; vertical-align: 1px; }
fieldset.form-layout__main { border: 0; padding: 0; margin: 0; min-width: 0; }
.cam-pos { display: grid; grid-template-columns: 1fr 240px; gap: 14px; }
.map--campos { height: 300px; }
.cam-pos__fields { display: grid; gap: 10px; align-content: start; }
.cam-pos__fields input[type=range] { accent-color: var(--brand); }
.storage-est { margin: 0; display: flex; align-items: center; gap: 8px; background: #f6f7fa; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.storage-est svg { width: 16px; height: 16px; color: var(--muted); }
.cam-preview { aspect-ratio: 16/9; background: #0a1322; border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; margin: 8px 0 12px; }
.cam-preview img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1100px) {
    .pb { grid-template-columns: 1fr; }
    .cam-pos { grid-template-columns: 1fr; }
    .strip, .strip-axis { width: 200px; }
}
@media (max-width: 760px) {
    .pb-bar > label { min-width: 0; width: 100%; }
    .pb-bar__info { margin-left: 0; }
    .seg--zoom { margin-left: 0; }
    .test-result li { grid-template-columns: 20px 1fr; } .test-result li span { grid-column: 2; }
}

/* ---------- Tracking devices ---------- */
.batt { display: inline-block; width: 26px; height: 12px; border: 2px solid #94a3b8; border-radius: 3px; position: relative; vertical-align: -2px; padding: 1px; }
.batt::after { content: ""; position: absolute; right: -4px; top: 2px; width: 2px; height: 4px; background: #94a3b8; border-radius: 0 1px 1px 0; }
.batt i { display: block; height: 100%; background: var(--ok); border-radius: 1px; }
.batt--low { border-color: var(--brand); } .batt--low i { background: var(--brand); }
.pairing { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; border-top: 4px solid var(--info); }
.pairing__qr { width: 220px; height: 220px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.pairing__qr svg { width: 100%; height: 100%; }
.pairing__info ol { padding-left: 18px; margin: 10px 0; display: grid; gap: 6px; font-size: 13.5px; }
.pairing__manual { display: grid; gap: 8px; margin: 12px 0; padding: 12px; background: #f6f7fa; border-radius: var(--radius); }
.pairing__manual dt { font-size: 12px; color: var(--muted); }
.pairing__manual dd { margin: 0; word-break: break-all; }
.pair-code { font: 800 26px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--navy); }
.pair-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.pair-card { width: 100%; max-width: 420px; display: grid; gap: 12px; }
.pair-card h1 { font-size: 22px; font-weight: 800; margin: 6px 0 0; }
.pair-card p { margin: 0; }
@media (max-width: 760px) { .pairing { grid-template-columns: 1fr; justify-items: center; } }

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