/*
 * Ethera ERP — sistem desain v2 (Fase 27).
 * Identitas: logo & palet dari dokumen resmi PT Ethera Solusi Asia (arang #1D2124, hijau-teal #1F8F76,
 * teal tua #0E6A66, teal terang #2CB6A3, kertas #F6F7F6). Kerapatan: gaya ERP ringkas — garis 1px,
 * huruf 13–14px, tanpa bayangan tebal, panel dipisah garis, bukan tumpukan kartu.
 * Nama kelas lama (.card, .grid, .flash, .badge, .muted, .num, button.primary/.secondary) tetap berlaku.
 */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/montserrat-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
    --charcoal: #1d2124;
    --charcoal-2: #2a3034;
    --brand: #1f8f76;
    --brand-strong: #0e6a66;
    --brand-bright: #2cb6a3;
    --brand-soft: #e8f4f0;
    --brand-ring: rgb(31 143 118 / .22);
    --ink: #1d2124;
    --ink-2: #3b4347;
    --muted: #6b7479;
    --faint: #98a1a5;
    --line: #e3e7e5;
    --line-strong: #ccd3d0;
    --bg: #f6f7f6;
    --surface: #ffffff;
    --surface-2: #f9faf9;
    --good: #17775f; --good-soft: #eaf5f0; --good-line: #bfe2d4;
    --warn: #9a5b0b; --warn-soft: #fdf5e6; --warn-line: #efd5a4;
    --bad: #b42318;  --bad-soft: #fdf0ef;  --bad-line: #f2c6c1;
    --info: #1e5c9e; --info-soft: #eef4fb; --info-line: #c8daf0;
    --radius: 8px;
    --radius-sm: 6px;
    --nav-w: 236px;
    --top-h: 52px;
    --shadow-pop: 0 10px 30px -12px rgb(29 33 36 / .28);
    --ok: var(--good); --err: var(--bad);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 400 13.5px/1.5 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "cv11", "ss01", "tnum" 0; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-strong); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.45rem; line-height: 1.25; font-weight: 650; letter-spacing: -.012em; margin: 0 0 .9rem; text-wrap: balance; }
h2 { font-size: 1rem; font-weight: 620; margin: 1.2rem 0 .7rem; display: flex; align-items: center; gap: .55rem; }
/* Tanda seksi merek: bilah teal di kiri judul, seperti di dokumen resmi. */
h2::before { content: ""; width: 3px; height: 1em; border-radius: 2px; background: var(--brand); flex: none; }
h3 { font-size: .92rem; font-weight: 620; }
p { margin: .45rem 0; }
.muted { color: var(--muted); font-size: .9em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: calc(var(--logo-h) * .42); color: var(--charcoal); }
.logo-mark { height: var(--logo-h); width: auto; flex: none; }
.logo-word { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-family: "Montserrat", "Inter", sans-serif; font-weight: 600; letter-spacing: .24em; font-size: calc(var(--logo-h) * .62); margin-right: -.24em; }
.logo-sub { font-size: calc(var(--logo-h) * .34); letter-spacing: .32em; color: var(--muted); margin-top: calc(var(--logo-h) * .18); font-weight: 500; }
.logo-light { color: #fff; }
.logo-light .logo-mark { color: var(--brand-bright); }
.logo-light .logo-sub { color: #9fb0ad; }

/* ---------- Kerangka workspace ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
    border-right: 1px solid var(--line); padding: 0 .6rem 1.2rem; display: flex; flex-direction: column;
}
.sidebar > * { flex-shrink: 0; }
.sidebar .brand { display: flex; align-items: center; height: var(--top-h); padding: 0 .55rem; border-bottom: 1px solid var(--line); margin: 0 -.6rem .5rem; padding-left: 1.1rem; color: var(--ink); }
.sidebar .brand:hover { text-decoration: none; }
.workspace-name { margin: .3rem .45rem .6rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.workspace-name strong { display: block; font-size: .88rem; font-weight: 620; line-height: 1.3; }
.workspace-name span { font-size: .78rem; color: var(--muted); }
.sidebar h3 { font-size: .7rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: .95rem .6rem .3rem; display: flex; align-items: center; gap: .45rem; }
.sidebar h3 svg { width: 13px; height: 13px; }
.sidebar a:not(.brand) { display: flex; align-items: center; min-height: 32px; padding: .3rem .65rem; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; font-size: .9rem; position: relative; }
.sidebar a:not(.brand):hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sidebar a.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 620; }
.sidebar a.active::before { content: ""; position: absolute; left: -.6rem; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 5; height: var(--top-h); display: flex; align-items: center; gap: .9rem;
    padding: 0 1.4rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.crumbs { flex: 1; display: flex; align-items: center; gap: .4rem; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: var(--line-strong); }
.topbar .who { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--ink-2); margin-left: auto; white-space: nowrap; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: .78rem; background: var(--charcoal); color: #fff; }
.topbar form { display: inline; margin: 0; }
.topbar button { margin: 0; }
main { padding: 1.3rem 1.5rem 3rem; max-width: 1360px; width: 100%; }
.nav-toggle, .nav-open, .scrim { display: none; }

@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(84vw, 290px); z-index: 20; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
    .nav-toggle:checked ~ .shell .sidebar { transform: none; }
    .nav-toggle:checked ~ .shell .scrim { display: block; position: fixed; inset: 0; background: rgb(29 33 36 / .4); z-index: 15; }
    .nav-open { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex: none; }
    .topbar { padding: 0 .8rem; }
    .crumbs, .topbar .who .name, .topbar .who .badge { display: none; }
    main { padding: 1rem .9rem 3rem; }
}

/* ---------- Panel & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1rem; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .35rem 1rem; align-items: end; }
/* Tombol langsung di dalam grid formulir sejajar dengan kotak isian, bukan dengan labelnya. */
.grid > button, .grid > div > button:only-child { margin-top: 0; justify-self: start; }
form.grid > button, .card.grid > button { align-self: end; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: .2rem 0 0; font-size: .92rem; }
.page-head .button, .page-head button { margin-top: 0; }
.stack { display: grid; gap: 1rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1050px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Formulir ---------- */
label { display: block; margin: .7rem 0 .28rem; font-weight: 560; font-size: .84rem; color: var(--ink-2); }
input, select, textarea {
    width: 100%; min-height: 36px; padding: .4rem .65rem; font: inherit; font-size: .9rem; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 76px; }
input:hover, select:hover, textarea:hover { border-color: #b5bdb9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--brand); margin-right: .35rem; }
input[readonly] { background: var(--surface-2); }
input[type=file] { padding: .35rem; background: var(--surface-2); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1rem; padding: .7rem .9rem; }
legend { font-weight: 620; padding: 0 .3rem; }
fieldset label { display: inline-flex; gap: .35rem; align-items: center; margin: .2rem 1rem .2rem 0; font-weight: 500; }
.error { color: var(--bad); font-size: .84rem; margin-top: .3rem; }

/* ---------- Tombol ---------- */
button, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 36px; margin-top: .85rem;
    padding: .4rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--brand); background: var(--brand); color: #fff;
    font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s;
}
button:hover, .button:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; text-decoration: none; }
button.secondary, .button.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover, .button.secondary:hover { background: var(--surface-2); border-color: #b5bdb9; color: var(--ink); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.ghost, .topbar button { background: transparent; color: var(--ink-2); border-color: var(--line); font-weight: 560; }
button.ghost:hover, .topbar button:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Tabel ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { position: sticky; top: var(--top-h); z-index: 1; background: var(--surface-2); color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; border-bottom-color: var(--line-strong); }
.card > table:first-child thead th:first-child, .table-wrap table thead th:first-child { border-top-left-radius: 6px; }
tbody tr:hover td { background: #fafbfa; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap thead th { position: static; }
.card .table-wrap { margin: 0 -.01rem; }

/* ---------- Status ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .5rem; border-radius: 5px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.5; }
.badge.good, .badge.ok { background: var(--good-soft); color: var(--good); border-color: var(--good-line); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge.info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.flash { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; border-left-width: 3px; font-size: .9rem; background: var(--surface); }
.flash.ok { border-color: var(--good-line); border-left-color: var(--good); color: #14513f; background: var(--good-soft); }
.flash.err { border-color: var(--bad-line); border-left-color: var(--bad); color: #7a1a12; background: var(--bad-soft); }
.flash.warn { border-color: var(--warn-line); border-left-color: var(--warn); color: #6b3d05; background: var(--warn-soft); }

/* ---------- Beranda ---------- */
/* Satu panel dibelah garis 1px (celah grid di atas latar garis), bukan enam kartu terpisah. */
/* Garis dalam digambar tiap sel di tepi kanan/bawahnya sendiri; tepi luar ikut dari sel terakhir. */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--line); border-right: 0; border-bottom: 0; border-radius: var(--radius); overflow: hidden; }
.kpi { display: block; padding: .95rem 1.1rem 1rem; color: var(--ink); background: var(--surface); box-shadow: inset -1px -1px 0 var(--line); }
a.kpi:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.kpi .label { font-size: .8rem; font-weight: 560; color: var(--muted); display: flex; justify-content: space-between; gap: .5rem; }
.kpi .value { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; margin: .3rem 0 .1rem; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.kpi.good .hint::before, .kpi.warn .hint::before, .kpi.bad .hint::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.kpi.good .hint::before { background: var(--good); } .kpi.warn .hint::before { background: #d98e14; } .kpi.bad .hint::before { background: var(--bad); }
.kpi.warn .hint { color: var(--warn); } .kpi.bad .hint, .kpi.bad .value { color: var(--bad); }
.kpi .go { color: var(--faint); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr; } }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo a, .todo .item { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem .2rem; color: var(--ink); }
.todo a:hover { text-decoration: none; background: var(--surface-2); }
.todo .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: .45rem; background: var(--line-strong); }
.todo .info .dot { background: var(--info); } .todo .warn .dot { background: #d98e14; } .todo .bad .dot { background: var(--bad); }
.todo strong { display: block; font-weight: 600; }
.todo span { color: var(--muted); font-size: .86rem; }
.empty { text-align: center; padding: 1.4rem 1rem; color: var(--muted); }
.empty .icon { font-size: 1.4rem; display: block; margin-bottom: .2rem; color: var(--brand); }
.chart svg { width: 100%; height: auto; display: block; }
.chart h2 { justify-content: flex-start !important; }
.chart h2 a { margin-left: auto; font-size: .82rem; font-weight: 560; }
.chart .col { fill: #cfe8df; } .chart .col.last { fill: var(--brand); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#chart-fill); }
.chart text { font-size: 11px; fill: var(--muted); font-family: inherit; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }

/* ---------- Daftar ---------- */
.toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.toolbar input[type=search] { flex: 1 1 260px; max-width: 400px; }
.toolbar select { width: auto; flex: 0 0 auto; }
.toolbar button { margin-top: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; font-size: .86rem; }
.pager .button { margin-top: 0; min-height: 30px; padding: .2rem .7rem; font-size: .82rem; }
.pager .disabled { opacity: .45; pointer-events: none; }
details.create { padding: 0; }
details.create > summary { list-style: none; cursor: pointer; padding: .8rem 1.1rem; font-weight: 600; display: flex; align-items: center; gap: .55rem; color: var(--brand-strong); }
details.create > summary::-webkit-details-marker { display: none; }
details.create > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--good-line); background: var(--brand-soft); font-weight: 700; }
details.create[open] > summary::before { content: "−"; }
details.create > .body { padding: .2rem 1.1rem 1.1rem; border-top: 1px solid var(--line); }
td.actions { text-align: right; white-space: nowrap; }

/* ---------- Pencarian global ---------- */
.global-search { flex: 0 1 380px; position: relative; margin-left: auto; }
.global-search input { min-height: 34px; padding-left: 2rem; background: var(--surface-2); font-size: .86rem; }
.global-search svg { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.global-search kbd { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); font: 600 .7rem/1 "Inter", sans-serif; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: .18rem .35rem; background: var(--surface); }
.global-search + .who { margin-left: 0; }
@media (max-width: 900px) { .global-search { margin-left: 0; flex: 1; } .global-search kbd { display: none; } }
.results ul { list-style: none; margin: 0; padding: 0; }
.results li a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .3rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.results li:last-child a { border-bottom: 0; }
.results li a:hover { background: var(--surface-2); text-decoration: none; }
.results li strong { white-space: nowrap; }
.results li .muted { text-align: right; }

/* ---------- Penyiapan & impor ---------- */
.import-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.import-grid .card { margin-bottom: 0; }
.steps-inline { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1rem; }
.steps-inline li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .84rem; color: var(--ink-2); }
.checklist { list-style: none; margin: .4rem 0 0; padding: 0; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .74rem; font-weight: 700; border: 1.5px solid var(--line-strong); color: var(--muted); }
.checklist li.done .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.checklist li.done strong { color: var(--muted); font-weight: 500; }
.checklist li .go { margin-left: auto; white-space: nowrap; font-size: .86rem; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: .5rem 0 .2rem; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* ---------- Halaman publik & masuk: pita arang–teal seperti kop surat resmi ---------- */
.brandpage { min-height: 100vh; background: var(--bg); position: relative; overflow-x: hidden; }
.band { position: absolute; pointer-events: none; z-index: 0; }
.band-top { top: 0; right: 0; width: min(62vw, 720px); height: auto; }
.band-bottom { bottom: 0; left: 0; width: 100%; height: 96px; }
@media (max-width: 48rem) { .band { display: none; } }
.public-main { position: relative; z-index: 1; max-width: 46rem; margin: 2.2rem auto; padding: 1.7rem 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.auth-main { position: relative; z-index: 1; max-width: 25rem; margin: 0 auto; padding: 12vh 0 4rem; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.7rem 1.6rem; }
.auth-main .tagline { margin: .9rem 0 1.4rem; font-size: .72rem; letter-spacing: .28em; color: var(--muted); text-transform: uppercase; }
.public-main > .logo { margin-bottom: 1.2rem; }
@media (max-width: 48rem) { .public-main { margin: 0; border-radius: 0; border: 0; min-height: 100vh; } .auth-main { padding: 8vh 1rem 3rem; } }
ul.list { list-style: none; padding: 0; }
ul.list li a { display: flex; justify-content: space-between; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .45rem; color: var(--ink); font-weight: 560; }
ul.list li a:hover { border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }
.bar { height: .45rem; background: var(--line); border-radius: 999px; overflow: hidden; } .bar > span { display: block; height: 100%; background: var(--brand); }
.route { padding: .9rem 1rem; border-radius: var(--radius); margin: 1rem 0; border: 1px solid; }
.route.green { background: var(--good-soft); border-color: var(--good-line); } .route.yellow { background: var(--warn-soft); border-color: var(--warn-line); } .route.red { background: var(--bad-soft); border-color: var(--bad-line); }
.unknown { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
    .sidebar, .topbar, .nav-open, button, .toolbar, .pager, details.create { display: none !important; }
    .shell { display: block; } main { padding: 0; }
    .card { break-inside: avoid; }
}

/* ---------- Halaman depan & unduh (Fase 27) ---------- */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: .4rem 0 1.4rem; }
ol.steps li { counter-increment: step; position: relative; padding: .7rem 0 .7rem 2.6rem; border-bottom: 1px solid var(--line); }
ol.steps li:last-child { border-bottom: 0; }
ol.steps li::before { content: counter(step); position: absolute; left: 0; top: .72rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; font-size: .82rem; display: grid; place-items: center; }
ol.steps li strong { display: block; }
ol.steps li span { color: var(--muted); font-size: .9rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.actions .button { margin: 0; }

/* ---------- Rekonsiliasi bank (Fase 28) ---------- */
form.inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0; }
button.small, .button.small { padding: .22rem .6rem; font-size: .8rem; margin: 0; }
.choice { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.choice:last-child { border-bottom: 0; }
.choice form { margin: 0; }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 64rem) { .kpis.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
td.nowrap, th.nowrap { white-space: nowrap; }
@media (max-width: 560px) { .kpis.four { grid-template-columns: 1fr; } }
ul.plain { margin: .2rem 0 0; padding-left: 1.1rem; } ul.plain li { margin: .3rem 0; color: var(--ink-2, var(--ink)); }

/* ---------- Bantuan di dalam workspace (Fase 29) ---------- */
.help-toggle { display: none; }
.help-open { display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: .84rem; }
.help-open > span[aria-hidden] { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; font-size: .74rem; }
.help-open:hover { border-color: var(--brand); color: var(--ink); }
.help-scrim { display: none; }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(26rem, 100vw); overflow-y: auto; padding: 1rem 1.3rem 1.5rem; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgb(29 33 36 / .08); transform: translateX(105%); transition: transform .18s ease; visibility: hidden; }
.help-toggle:checked ~ .help-panel { transform: none; visibility: visible; }
.help-toggle:checked ~ .help-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgb(29 33 36 / .25); }
.help-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: .7rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }
.help-close { cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--muted); }
.help-close:hover { background: var(--surface-2); color: var(--ink); }
.help-panel h2 { margin: .4rem 0 .4rem; }
.help-panel h3 { font-size: .8rem; font-weight: 650; color: var(--muted); margin: 1.1rem 0 .4rem; }
.help-panel ol { padding-left: 1.2rem; margin: 0; } .help-panel ol li { margin: .35rem 0; }
.help-panel dl { margin: 0; } .help-panel dt { font-weight: 600; margin-top: .5rem; } .help-panel dd { margin: .1rem 0 0; color: var(--ink-2); }
.help-more { margin-top: 1.3rem; padding-top: .8rem; border-top: 1px solid var(--line); }
kbd { font: 600 .75rem/1 "Inter", sans-serif; padding: .15rem .35rem; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); }
@media (max-width: 48rem) { .help-open .label { display: none; } }
@media print { .help-panel, .help-scrim, .help-open { display: none !important; } }
.help-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 64rem) { .help-topics { grid-template-columns: 1fr; } }
.help-topics .card { margin: 0; }
.help-topics .card h2 a { color: var(--ink); }
.help-topics dl { margin: .8rem 0 0; } .help-topics dt { font-weight: 600; margin-top: .45rem; } .help-topics dd { margin: .1rem 0 0; } .help-topics ol { padding-left: 1.2rem; }

/* Layar HP: tabel lebar menggulir sendiri, bukan mendorong seluruh halaman ke samping (temuan cek bug). */
@media (max-width: 48rem) {
    main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    main .table-wrap table { display: table; overflow: visible; }
    main td, main th { white-space: nowrap; }
    main td:not(.num) { white-space: normal; min-width: 7rem; }
}
dl.roles { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; } dl.roles dt { font-weight: 600; } dl.roles dd { margin: 0; } .topbar .who a.name { color: inherit; } .topbar .who a.name:hover { color: var(--brand-strong); }
td span.bad { color: var(--bad); font-weight: 600; } td span.good { color: var(--good); font-weight: 600; }

/* Cetak / PDF laporan (Fase 30): kepala cetak berisi nama perusahaan dan tanggal; tanpa tombol dan filter. */
.print-head { display: none; }
@media print {
    .print-head { display: block; font-size: .8rem; color: #444; border-bottom: 1px solid #999; padding-bottom: .3rem; margin-bottom: .8rem; }
    .export-actions, .flash, .help-open, .help-panel, form.toolbar, .page-head .actions { display: none !important; }
    .kpis, .card { box-shadow: none !important; border-color: #bbb !important; }
    .table-wrap { overflow: visible !important; border: 0 !important; }
    main table { display: table !important; }
    a { color: inherit !important; text-decoration: none !important; }
}
