/* SIPINTAR LSP UNIMED — identitas visual
   Warna dari logo LSP Unimed (merah + tinta), pola guilloche khas dokumen sertifikat. */
:root {
  --ink: #18202e;
  --ink-2: #3b4556;
  --muted: #687284;
  --paper: #f4f5f7;
  --white: #ffffff;
  --line: #dce1e8;
  --line-2: #eceff3;
  --red: #b0122a;
  --red-ink: #8a0e21;
  --red-soft: #fbecee;
  --green: #0e7a5f;
  --green-soft: #e3f4ee;
  --amber: #8f5200;
  --amber-soft: #fdf1dc;
  --blue: #1f4f99;
  --blue-soft: #e8eef8;
  --bad: #a3181f;
  --bad-soft: #fbe9e9;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
  --side: 256px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); background: var(--paper); color: var(--ink); font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--red); text-underline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .9em; }
small, .muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: 3px solid rgba(176, 18, 42, .35); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================= Situs publik: header atas ================= */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.site-header .in { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; height: 68px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.logo img { width: 40px; height: 40px; object-fit: contain; }
.logo b { font-family: var(--display); font-size: 1.25rem; letter-spacing: -.01em; display: block; line-height: 1; }
.logo span { font-size: .78rem; color: var(--muted); display: block; margin-top: 3px; }
.topnav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.topnav > .grp { position: relative; }
.topnav > .grp > button, .topnav > a {
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink-2); background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: var(--r-sm); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.topnav > .grp > button:hover, .topnav > a:hover { background: var(--paper); color: var(--ink); }
.topnav > .grp.cur > button, .topnav > a.cur { color: var(--red); }
.topnav > .grp > button svg { width: 14px; height: 14px; transition: transform .15s; }
.topnav > .grp.open > button svg { transform: rotate(180deg); }
.drop { position: absolute; top: calc(100% + 8px); left: 0; min-width: 270px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 18px 40px -12px rgba(24, 32, 46, .28); padding: 6px; display: none; }
.grp.open .drop { display: block; }
.drop a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.drop a:hover, .drop a.cur { background: var(--red-soft); }
.drop a svg { width: 18px; height: 18px; color: var(--red); flex: none; margin-top: 2px; }
.drop a b { display: block; font-size: .92rem; }
.drop a small { display: block; font-size: .8rem; line-height: 1.35; }
.btn-track { flex: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; cursor: pointer; color: var(--ink); margin-left: auto; }
.menu-btn svg { width: 22px; height: 22px; display: block; }

.demo-bar { background: var(--amber-soft); color: var(--amber); font-size: .84rem; text-align: center; padding: 6px 16px; border-bottom: 1px solid #f3dcb1; }

@media (max-width: 1020px) {
  .topnav, .site-header .btn-track { display: none; }
  .menu-btn { display: inline-flex; }
  body.nav-open .topnav {
    display: flex; flex-direction: column; align-items: stretch; position: fixed; inset: 68px 0 0 0; background: var(--white);
    padding: 12px 16px 40px; overflow-y: auto; gap: 4px; margin: 0;
  }
  body.nav-open .topnav > .grp > button { display: none; }
  body.nav-open .drop { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 8px; min-width: 0; }
  body.nav-open .grp::before { content: attr(data-label); display: block; font-family: var(--display); font-weight: 700; color: var(--muted); padding: 14px 12px 4px; font-size: .9rem; }
}

.page { max-width: var(--wrap); margin: 0 auto; padding: 28px 20px 48px; }
.page-head { max-width: var(--wrap); margin: 0 auto; padding: 36px 20px 4px; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 68ch; margin: 0; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--muted); }

/* ---------- Hero beranda dengan pola guilloche ---------- */
.hero-wrap { background: var(--white); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.guilloche { position: absolute; right: -180px; top: -140px; width: 760px; height: 760px; color: var(--red); opacity: .16; pointer-events: none; }
.hero { max-width: var(--wrap); margin: 0 auto; padding: 56px 20px 40px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(1.9rem, 3.9vw, 2.9rem); line-height: 1.08; letter-spacing: -.02em; max-width: 19ch; margin-bottom: 18px; }
.hero h1 .h1-lead { display: block; font-size: .5em; line-height: 1.3; letter-spacing: 0; color: var(--red, #b0122a); margin-bottom: 10px; max-width: 34ch; }
.hero .lead { font-size: 1.08rem; color: var(--ink-2); max-width: 54ch; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.track-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 24px 50px -28px rgba(24, 32, 46, .35); position: relative; }
.track-card::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 4px; background: var(--red); border-radius: 0 0 4px 4px; }
.track-card h2 { font-size: 1.2rem; margin-bottom: 4px; }
.track-card p { color: var(--muted); font-size: .9rem; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 36px; gap: 28px; } .guilloche { width: 520px; height: 520px; right: -220px; top: -120px; } }

/* Rel perjalanan sertifikasi (10 langkah SOP) */
.rail-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 36px; position: relative; }
.rail-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rail-title h2 { margin: 0; font-size: 1.1rem; }
.rail { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-template-columns: repeat(10, minmax(108px, 1fr)); overflow-x: auto; scrollbar-width: thin; }
.rail li { position: relative; padding-top: 30px; }
.rail li::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--line); }
.rail li:first-child::before { left: 12px; }
.rail li:last-child::before { right: calc(100% - 12px); }
.rail a { display: block; text-decoration: none; color: var(--ink); padding-right: 12px; }
.rail .node { position: absolute; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 2px solid var(--red); color: var(--red); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.rail a:hover .node { background: var(--red); color: #fff; }
.rail b { display: block; font-size: .86rem; line-height: 1.3; }
.rail small { display: block; font-size: .76rem; margin-top: 2px; }

/* Angka layanan */
.figures { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.figures div { flex: 1 1 150px; padding: 16px 20px; border-left: 1px solid var(--line); }
.figures div:first-child { border-left: 0; }
.figures b { font-family: var(--display); font-size: 1.9rem; display: block; line-height: 1.1; }
.figures span { color: var(--muted); font-size: .88rem; }
@media (max-width: 600px) { .figures div { flex-basis: 50%; border-left: 0; border-top: 1px solid var(--line); } .figures div:nth-child(-n+2) { border-top: 0; } .figures div:nth-child(even) { border-left: 1px solid var(--line); } }

/* Daftar jadwal dengan blok tanggal */
.sched { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.sched li { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line-2); align-items: center; }
.sched li:first-child { border-top: 0; }
.date { text-align: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.date .m { background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 0; }
.date .d { font-family: var(--display); font-size: 1.5rem; font-weight: 700; line-height: 1.25; }
.date .y { font-size: .7rem; color: var(--muted); padding-bottom: 3px; }
.sched h3 { margin: 0 0 2px; font-size: 1rem; }
.sched .meta { color: var(--muted); font-size: .86rem; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sched .end { text-align: right; display: grid; gap: 6px; justify-items: end; }
.quota { font-size: .8rem; color: var(--muted); }
.quota i { display: block; width: 110px; height: 5px; background: var(--line-2); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.quota i::after { content: ''; display: block; height: 100%; width: var(--p, 0%); background: var(--red); }
@media (max-width: 640px) { .sched li { grid-template-columns: 56px 1fr; } .sched .end { grid-column: 1 / -1; justify-items: start; text-align: left; grid-template-columns: auto auto; align-items: center; justify-content: space-between; } }

/* Daftar skema */
.skema-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.skema-item { padding: 18px 20px; border-top: 1px solid var(--line-2); display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; }
.skema-item:first-child { border-top: 0; }
.skema-item h3 { margin: 0; font-size: 1.12rem; }
.skema-item .code { color: var(--red); font-weight: 700; font-size: .84rem; }
.skema-item .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: .88rem; margin-top: 4px; }
.skema-item ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; }
.skema-item .act { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
@media (max-width: 640px) { .skema-item { grid-template-columns: 1fr; } .skema-item .act { flex-direction: row; align-items: center; } }

.site-footer { background: var(--ink); color: #c7ceda; font-size: .88rem; }
.site-footer .in { max-width: var(--wrap); margin: 0 auto; padding: 32px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer b { color: #fff; font-family: var(--display); font-size: 1rem; display: block; margin-bottom: 6px; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
@media (max-width: 760px) { .site-footer .in { grid-template-columns: 1fr; } }
.foot-logos { display: inline-flex; align-items: center; gap: 16px; background: #fff; border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.foot-logos img { height: 50px; width: auto; display: block; }
.foot-lisensi { display: block; margin-top: 10px; }

/* ================= Panel petugas: sidebar terang ================= */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease; }
.brand { display: flex; gap: 12px; align-items: center; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand b { display: block; font-family: var(--display); font-size: 1.15rem; line-height: 1; }
.brand span { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; }
.nav { overflow-y: auto; padding: 8px 10px 20px; flex: 1; }
.nav-group { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 16px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0; color: var(--ink-2); text-decoration: none; border-radius: var(--r-sm); font-size: .9rem; font-weight: 500; position: relative; }
.nav a svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a.active { background: var(--red-soft); color: var(--red-ink); font-weight: 700; }
.nav a.active svg { color: var(--red); }
.nav a.active::before { content: ''; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.side-foot { padding: 12px 18px 16px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.side-foot b { color: var(--ink); }
.main { margin-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(244, 245, 247, .92); backdrop-filter: blur(8px); height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.2rem; margin: 0; }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { margin-left: 0; }
.view { padding: 24px 28px 48px; width: 100%; min-width: 0; }
.view .form, .view .narrow { max-width: 1100px; }
.scrim { display: none; }
.demo-flag { background: var(--amber-soft); color: var(--amber); font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(24, 32, 46, .45); z-index: 35; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .view { padding: 16px; }
  .topbar { padding: 0 16px; }
}
.welcome { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.welcome h2 { font-size: 1.6rem; margin: 0; }
.welcome p { margin: 0; color: var(--muted); }

/* ================= Komponen bersama ================= */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }

.notice { background: var(--blue-soft); border-left: 4px solid var(--blue); color: #1d3561; border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 18px; }
.notice.warn, .notice:not(.info):not(.bad):not(.ok) { background: var(--amber-soft); border-color: #d69a2d; color: #5c3a00; }
.notice.info { background: var(--blue-soft); border-color: var(--blue); color: #1d3561; }
.notice.bad { background: var(--bad-soft); border-color: var(--bad); color: #6d1015; }
.notice.ok { background: var(--green-soft); border-color: var(--green); color: #0b4a3a; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat .k { font-size: .84rem; color: var(--muted); }
.stat .v { font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: var(--red); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .92rem; padding: 10px 18px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; background: var(--red); color: #fff; transition: background .15s; }
.btn:hover { background: var(--red-ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #000; }
.btn.ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-2); background: var(--white); }
.btn.gold { background: var(--red); color: #fff; }
.btn.light { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn.red { background: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--blue-soft); color: var(--blue); }

/* Formulir */
.form { display: grid; gap: 14px; }
.form .row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form .row.r3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form .row, .form .row.r3 { grid-template-columns: 1fr; } }
label.f { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
label.f > input, label.f > select, label.f > textarea { display: block; margin-top: 6px; }
label.f > small { display: block; margin-top: 4px; }
label.f .req { color: var(--red); }
label.f small { font-weight: 400; }
input, select, textarea { font: inherit; font-size: .95rem; width: 100%; padding: 10px 12px; border: 1px solid #c9d0da; border-radius: var(--r-sm); background: var(--white); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(176, 18, 42, .15); border-color: var(--red); }
textarea { min-height: 90px; resize: vertical; }
input[type=file] { padding: 8px; background: var(--paper); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { width: auto; margin-top: 5px; accent-color: var(--red); }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 18px 0 0; margin: 4px 0 0; }
legend { font-family: var(--display); font-weight: 700; font-size: 1rem; padding: 0 10px 0 0; color: var(--ink); }

/* Tabel */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table-wrap td.mono { white-space: nowrap; }
.table-wrap td .badge { white-space: normal; line-height: 1.35; padding: 3px 9px; }
.table-wrap td.c-skema { min-width: 190px; }
.table-wrap td.c-nama { min-width: 150px; }
@media (max-width: 1440px) { .view { padding-left: 20px; padding-right: 20px; } .table-wrap td.c-skema { min-width: 170px; } .table-wrap th, .table-wrap td { padding: 9px 8px; } .table-wrap td.c-nama small { overflow-wrap: anywhere; } }
.table-wrap td.c-ket { min-width: 220px; }
th { background: var(--paper); font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #fafbfc; }
.empty { text-align: center; color: var(--muted); padding: 28px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input:not([type=checkbox]), .toolbar select { width: auto; min-width: 180px; flex: 1 1 180px; }
.toolbar .check { flex: none; }

.tabs { display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button { font: inherit; font-size: .88rem; font-weight: 600; padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tabs button.on { color: var(--red-ink); border-bottom-color: var(--red); }
.tabs button .n { margin-left: 6px; font-size: .78rem; background: var(--line-2); color: var(--ink-2); padding: 1px 7px; border-radius: 999px; }

/* Langkah SOP (halaman alur) */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 0 0 22px; position: relative; }
.step .num { width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 2px solid var(--red); color: var(--red); font-family: var(--display); font-weight: 700; display: grid; place-items: center; font-size: 1.05rem; position: relative; }
.step > div:last-child { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.step h3 { margin: 0 0 4px; }
.step ol { margin: 6px 0; padding-left: 18px; color: var(--ink-2); font-size: .92rem; }
.step .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .8rem; margin-top: 8px; }

/* Lini masa status */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 38px; }
.timeline li::before { content: ''; position: absolute; left: 12px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li.done::before { background: var(--green); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .74rem; font-weight: 800; background: var(--white); border: 2px solid var(--line); color: var(--muted); }
.timeline li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.timeline li.now .dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.timeline li.fail .dot { background: var(--bad); border-color: var(--bad); color: #fff; }
.timeline b { display: block; }
.timeline small { display: block; }

.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (max-width: 600px) { .kv { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 6px 10px; font-size: .88rem; } }

.result-big { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: var(--r); }
.result-big svg { width: 36px; height: 36px; flex: none; }
.result-big.ok { background: var(--green-soft); color: #0b4a3a; }
.result-big.bad { background: var(--bad-soft); color: #6d1015; }
.result-big.wait { background: var(--paper); color: var(--ink-2); }
.result-big .big { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }

.rating { display: flex; gap: 6px; flex-wrap: wrap; }
.rating label { cursor: pointer; }
.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating span { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--line); font-weight: 700; background: var(--white); }
.rating input:focus-visible + span { outline: 3px solid rgba(176, 18, 42, .35); }
.rating input:checked + span { background: var(--red); color: #fff; border-color: var(--red); }

/* Modal & toast */
.modal-back { position: fixed; inset: 0; background: rgba(24, 32, 46, .5); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--white); border-radius: var(--r-lg); width: 100%; max-width: 720px; box-shadow: 0 30px 70px rgba(0, 0, 0, .3); }
.modal.wide { max-width: 1060px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); gap: 12px; }
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 22px; background: var(--paper); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; }
details.card summary { cursor: pointer; list-style: revert; }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); font-size: .9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: tin .18s ease; }
.toast.ok { background: var(--green); }
.toast.bad { background: var(--bad); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 30px; justify-content: center; }
.spin { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.ticket { border: 1px solid var(--line); border-radius: var(--r); padding: 26px 20px; text-align: center; background: var(--white); position: relative; overflow: hidden; }
.ticket::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--red); }
.ticket .no { font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: .02em; margin: 8px 0 12px; }

/* Login petugas */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--white); }
.login-art { background: var(--ink); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.login-art .guilloche { color: #fff; opacity: .12; right: -200px; top: -160px; }
.login-art h1 { font-size: 2.2rem; max-width: 14ch; position: relative; }
.login-art p { color: #c7ceda; max-width: 44ch; position: relative; }
.login-side { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { padding: 0 0 22px; border: 0; }
@media (max-width: 820px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* Cetak */
.print-only { display: none; }
@media print {
  .sidebar, .topbar, .site-header, .site-footer, .no-print, .modal-head, #toasts, .demo-bar { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
  .modal-back { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: none; }
  .modal-body { background: #fff; }
  .print-only { display: block; }
}
.card-head .badge { white-space: normal; }
.step .meta .badge { white-space: normal; }
@media (max-width: 600px) { .steps::before { left: 15px; } .step { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; } .step .num { width: 32px; height: 32px; font-size: .9rem; } }
td.mono { white-space: nowrap; }
.skema-item { scroll-margin-top: 84px; }

/* Logo LSP UNIMED */
.logo img, .brand img { width: auto; height: 44px; object-fit: contain; background: none; border-radius: 0; padding: 0; }
.hero-logo { height: 84px; width: auto; display: block; margin-bottom: 20px; }
.login-logo { height: 96px; width: auto; display: block; margin-bottom: 18px; }
@media (max-width: 860px) { .hero-logo { height: 64px; } }
.mini-alur { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mini-alur span { background: #fff; border: 1px solid #f3dcb1; border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 600; }

/* ---------- Tampilan HP (≤ 640px) ---------- */
@media (max-width: 600px) { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .grid.stats .stat { padding: 12px; } .grid.stats .stat .v { font-size: 1.6rem; } }
@media (max-width: 640px) {
  /* toolbar: kontrol memenuhi lebar, tidak melebar keluar layar */
  .toolbar > * { min-width: 0; }
  .toolbar label.f { flex: 1 1 100% !important; }
  .toolbar label.f select, .toolbar label.f input { width: 100%; min-width: 0; }
  .toolbar input:not([type=checkbox]), .toolbar select { min-width: 0; flex: 1 1 140px; }
  /* tabel menjadi kartu per baris */
  .table-wrap { overflow-x: visible; }
  .table-wrap td.c-skema, .table-wrap td.c-nama, .table-wrap td.c-ket { min-width: 0; }
  .table-wrap table thead { display: none; }
  .table-wrap table, .table-wrap table tbody { display: block; width: 100%; }
  .table-wrap table tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table-wrap table tr:last-child { border-bottom: 0; }
  .table-wrap table td { display: block; position: relative; padding: 4px 0 4px 36%; min-height: 1.6em; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .table-wrap table td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; width: 33%; color: var(--muted); font-size: .8rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  .table-wrap table td[data-label=""] { padding-left: 0; }
  .table-wrap table td[data-label=""]::before { display: none; }
  .table-wrap table td.empty, .table-wrap table td[colspan] { display: block; text-align: center; }
  .table-wrap table td[colspan]::before { display: none; }
  .table-wrap table td.mono { white-space: normal; }
}
@media (max-width: 600px) {
  .modal-back { padding: 10px 6px; }
  .modal-head { padding: 12px 14px; }
  .modal-body { padding: 12px; }
  .modal-body .card { padding: 14px; }
  .welcome { flex-wrap: wrap; gap: 10px; }
}

/* Tautan antar-aplikasi di halaman login */
.login-links { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .88rem; }
.login-links a { font-weight: 600; }
/* Peran lihat saja (Ketua LSP, Bidang Skema): sembunyikan semua kendali ubah */
body.lihat-saja form[data-tahap], body.lihat-saja #bulk, body.lihat-saja #bKel, body.lihat-saja #bVer, body.lihat-saja #bPlot,
body.lihat-saja #bAs, body.lihat-saja #bClr, body.lihat-saja #nsel, body.lihat-saja .ck, body.lihat-saja #ckAll,
body.lihat-saja #fP, body.lihat-saja #fT, body.lihat-saja #fB { display: none !important; }

/* Ringkasan: kepuasan + pintasan (pengganti panel aktivitas) */
.ring-bawah { margin-top: 16px; align-items: stretch; }
.card.puas { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none; color: inherit; border: 1px solid var(--line); }
@media (hover: hover) { .card.puas:hover { border-color: var(--red); } }
.card.puas .k { font-size: .86rem; color: var(--muted); }
.card.puas .v { font-family: var(--display); font-size: 2.2rem; font-weight: 800; line-height: 1.1; margin: 4px 0; }
.card.puas .v small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.card.puas .muted { font-size: .84rem; }
.bintang { font-size: 1.5rem; letter-spacing: 2px; color: var(--line); white-space: nowrap; }
.bintang .on { color: #f2b705; }
.pintas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pintas a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; background: var(--white); }
@media (hover: hover) { .pintas a:hover { border-color: var(--red); color: var(--red-ink); } }
.pintas a svg { flex: none; width: 18px; height: 18px; color: var(--red); }
@media (max-width: 600px) { .pintas { grid-template-columns: 1fr; } .bintang { font-size: 1.2rem; } .card.puas .v { font-size: 1.8rem; } }

/* Tab antrean di HP: satu baris pil yang bisa digeser, tab aktif digeser ke tengah */
@media (max-width: 640px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; gap: 8px; border-bottom: 0; margin: 0 -16px 12px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-ket { font-size: .8rem !important; line-height: 1.45; }
  .toolbar input:not([type=checkbox]), .toolbar select { flex: 1 1 100%; min-width: 0; }
  .tabs button { flex: none; white-space: nowrap; margin: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: .85rem; color: var(--ink-2); }
  .tabs button.on { background: var(--red); border-color: var(--red); color: #fff; }
  .tabs button.on .n { background: rgba(255, 255, 255, .25); color: #fff; }
}
/* Aksi massal di HP: 3 baris rapi (Kelengkapan|Verifikasi, Jadwal|Asesmen, jumlah dipilih|Batal pilih) */
@media (max-width: 640px) {
  #bulk { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  #bulk .btn { width: 100%; justify-content: center; margin: 0; }
  #bKel { order: 1; } #bVer { order: 2; } #bPlot { order: 3; } #bAs { order: 4; }
  #nsel { order: 5; padding-left: 4px; } #bClr { order: 6; }
}
