/* =====================================================================
   Self Assessment Soft Competency
   Sistem desain "lingkar tumbuh": warna, font & radius diatur dari
   Admin > Tampilan & Branding melalui CSS custom properties (lihat
   App\Support\Theme). Jangan menulis warna merek langsung di file ini.
   ===================================================================== */

:root {
  --ok: #2f7a4f; --ok-soft: #e1f0e6; --ok-ink: #1f5537;
  --warn: #b7791f; --warn-soft: #fbefd6; --warn-ink: #7a4f0e;
  --bad: #b4442f; --bad-soft: #f8e1dc; --bad-ink: #8a2e1e;
  --shadow-pop: 0 10px 30px -12px rgba(15, 25, 20, .28);
  --side-w: 264px;
  --step: 1.2;
}
[data-bs-theme=dark] {
  --ok: #5fbf88; --ok-soft: #173326; --ok-ink: #9fe0b9;
  --warn: #e0a84c; --warn-soft: #3a2c12; --warn-ink: #f5cf8e;
  --bad: #e47a64; --bad-soft: #3d1d17; --bad-ink: #f4b2a3;
  --shadow-pop: 0 10px 30px -12px rgba(0, 0, 0, .7);
}

html { font-size: 15.5px; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, .display-num {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: 1.95rem; font-weight: 750; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.16rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
a { color: var(--brand-text); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
.text-soft { color: var(--ink-soft) !important; }
.small-note { font-size: .85rem; color: var(--ink-soft); }
.measure { max-width: 68ch; }
:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .45); outline-offset: 2px; }
::selection { background: rgba(var(--brand-rgb), .2); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--surface); padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 12px; }

/* ------------------------------------------------------------ bootstrap */
.btn { font-weight: 650; border-radius: var(--radius-sm); padding: .5rem 1rem; }
.btn-sm { padding: .3rem .7rem; }
.btn-lg { padding: .7rem 1.35rem; font-size: 1rem; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: var(--brand-ink);
  --bs-btn-hover-bg: var(--brand-hover); --bs-btn-hover-border-color: var(--brand-hover); --bs-btn-hover-color: var(--brand-ink);
  --bs-btn-active-bg: var(--brand-active); --bs-btn-active-border-color: var(--brand-active); --bs-btn-active-color: var(--brand-ink);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-disabled-color: var(--brand-ink);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-text); --bs-btn-border-color: var(--brand-line);
  --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: var(--brand-text);
  --bs-btn-active-bg: var(--brand-soft); --bs-btn-active-border-color: var(--brand); --bs-btn-active-color: var(--brand-text);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}
.btn-accent {
  --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: var(--accent-ink);
  --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent); --bs-btn-hover-color: var(--accent-ink);
  --bs-btn-active-bg: var(--accent); --bs-btn-active-color: var(--accent-ink);
  filter: saturate(1.05);
}
.btn-accent:hover { filter: brightness(.94); }
.btn-quiet {
  --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-color: var(--ink);
  --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: transparent; --bs-btn-disabled-color: var(--ink-soft);
  --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--line); --bs-btn-hover-color: var(--ink);
  --bs-btn-active-bg: var(--surface-2); --bs-btn-active-color: var(--ink);
}
.btn-danger-quiet {
  --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-color: var(--bad);
  --bs-btn-hover-bg: var(--bad-soft); --bs-btn-hover-color: var(--bad-ink); --bs-btn-hover-border-color: transparent;
}
.form-control, .form-select { border-color: var(--line); border-radius: var(--radius-sm); background-color: var(--surface); color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .16); background-color: var(--surface); color: var(--ink); }
.form-control::placeholder { color: var(--ink-soft); opacity: .7; }
.form-label { font-weight: 650; font-size: .9rem; margin-bottom: .35rem; }
.form-text { color: var(--ink-soft); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .2); border-color: var(--brand); }
.form-control-color { width: 3rem; padding: .25rem; }
.invalid-feedback { color: var(--bad); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--bad); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: var(--line); --bs-table-hover-bg: var(--surface-2); --bs-table-hover-color: var(--ink); margin-bottom: 0; }
.table > thead th { color: var(--ink-soft); font-weight: 650; font-size: .84rem; border-bottom-width: 1px; white-space: nowrap; background: transparent; }
.table > :not(caption) > * > * { padding: .7rem .85rem; }
.dropdown-menu { border-color: var(--line); box-shadow: var(--shadow-pop); border-radius: var(--radius); padding: .35rem; background: var(--surface); }
.dropdown-item { border-radius: var(--radius-sm); padding: .45rem .75rem; color: var(--ink); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--ink); }
.dropdown-item.text-danger:hover { background: var(--bad-soft); }
.alert { border-radius: var(--radius); border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok-ink); border-color: transparent; }
.alert-warning { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.alert-danger { background: var(--bad-soft); color: var(--bad-ink); border-color: transparent; }
.alert-info { background: var(--brand-softer); color: var(--ink); border-color: var(--brand-line); }
.nav-tabs { border-color: var(--line); }
.nav-tabs .nav-link { color: var(--ink-soft); font-weight: 600; border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--brand-text); background: transparent; border-bottom-color: var(--brand); }
.pagination { --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-color: var(--brand-text); --bs-pagination-bg: var(--surface); --bs-pagination-border-color: var(--line); margin: 0; }
.progress { background: var(--surface-2); border-radius: 99px; }
.progress-bar { background: var(--brand); }
.list-group-item { background: var(--surface); border-color: var(--line); color: var(--ink); }
.list-group-item.active { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-line); font-weight: 650; }
.modal-content { background: var(--surface); border-color: var(--line); border-radius: var(--radius-lg); }

/* ------------------------------------------------------------ shell */
.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--side-w); flex: 0 0 var(--side-w);
  background: var(--side-bg); color: var(--side-fg);
  display: flex; flex-direction: column;
  border-right: 1px solid var(--side-border);
}
@media (min-width: 992px) {
  .side { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .shell { background: linear-gradient(to right, var(--side-bg) var(--side-w), transparent var(--side-w)); }
}
.side.offcanvas-lg { background-color: var(--side-bg) !important; color: var(--side-fg); }
@media (max-width: 991.98px) { .side.offcanvas-lg { width: 288px; } }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; color: inherit; text-decoration: none; }
.side-brand:hover { color: inherit; }
.side-brand img { max-height: 40px; max-width: 150px; object-fit: contain; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--radius); background: var(--side-mark); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 24px; height: 24px; }
.side-brand-text { line-height: 1.2; min-width: 0; }
.side-brand-text strong { display: block; font-family: var(--font-heading); font-size: 1.02rem; font-weight: 700; color: var(--side-active-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-brand-text span { display: block; font-size: .78rem; color: var(--side-muted); }
.side-nav { padding: 4px 12px 12px; flex: 1; }
.side-group { margin: 18px 12px 6px; font-size: .78rem; color: var(--side-muted); font-weight: 600; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm); color: var(--side-fg); text-decoration: none; font-weight: 550;
  position: relative;
}
.side-link i { font-size: 1.06rem; width: 20px; text-align: center; opacity: .85; }
.side-link:hover { background: var(--side-hover); color: var(--side-active-fg); }
.side-link.active { background: var(--side-active-bg); color: var(--side-active-fg); font-weight: 650; }
.side-link.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--side-mark); }
.side-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--side-mark); color: #fff; font-size: .74rem; font-weight: 700; display: grid; place-items: center; }
.side-foot { padding: 12px; border-top: 1px solid var(--side-border); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.side-user .who { min-width: 0; line-height: 1.25; }
.side-user .who strong { display: block; color: var(--side-active-fg); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: .78rem; color: var(--side-muted); }
.avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--brand-soft); color: var(--brand-text); }
.side .avatar { background: rgba(255,255,255,.14); color: var(--side-active-fg); }
.sidebar-light .side .avatar { background: var(--brand-soft); color: var(--brand-text); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 32px; background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { font-size: 1.4rem; }
.topbar-crumb { flex: 1; min-width: 0; font-size: .9rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-crumb a { color: var(--ink-soft); text-decoration: none; }
.topbar-crumb a:hover { color: var(--brand-text); }
.content { padding: 28px 32px 48px; flex: 1; width: 100%; max-width: 1240px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--ink-soft); max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-foot { padding: 16px 32px 24px; font-size: .82rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; }
@media (max-width: 575.98px) {
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 40px; }
  .app-foot { padding: 12px 16px 20px; }
  h1 { font-size: 1.6rem; }
}

/* ------------------------------------------------------------ panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 22px 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.05rem; }
.panel-foot { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.panel > .table-responsive > .table > :not(caption) > * > *:first-child { padding-left: 24px; }
.panel > .table-responsive > .table > :not(caption) > * > *:last-child { padding-right: 24px; }
.panel > .table-responsive > .table > tbody > tr:last-child > * { border-bottom: 0; }
.panel-hero { border-radius: var(--radius-lg); background: var(--brand-softer); border-color: var(--brand-line); }
@media (max-width: 575.98px) { .panel-pad { padding: 18px; } .panel-head, .panel-foot { padding: 14px 18px; } }

.section-title { font-size: 1.12rem; margin: 32px 0 12px; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--ink-soft); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty i { font-size: 2rem; color: var(--brand-text); display: block; margin-bottom: 10px; opacity: .8; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* statistik */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 18px 20px; }
.stat-num { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.stat-label { color: var(--ink-soft); font-size: .88rem; margin-top: 6px; }
.stat-warn .stat-num { color: var(--warn); }
.stat-ok .stat-num { color: var(--ok); }
@media (max-width: 767.98px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ badges */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 650; padding: 3px 9px; border-radius: 99px; line-height: 1.3; white-space: nowrap; }
.tag-neutral { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.tag-ok { background: var(--ok-soft); color: var(--ok-ink); }
.tag-warn { background: var(--warn-soft); color: var(--warn-ink); }
.tag-bad { background: var(--bad-soft); color: var(--bad-ink); }
.tag-brand { background: var(--brand-soft); color: var(--brand-text); }
.tag-main { background: var(--ink); color: var(--surface); }
.tag-key { background: var(--brand); color: var(--brand-ink); }
.tag-general { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.rec { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; font-family: var(--font-heading); font-weight: 750; font-size: .82rem; padding: 3px 9px; border-radius: var(--radius-sm); letter-spacing: .02em; }
.rec-ok { background: var(--ok-soft); color: var(--ok-ink); }
.rec-warn { background: var(--warn-soft); color: var(--warn-ink); }
.rec-bad { background: var(--bad-soft); color: var(--bad-ink); }
.rec-none { background: var(--surface-2); color: var(--ink-soft); }
.rate { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); font-weight: 750; font-size: .9rem; font-family: var(--font-heading); }
.rate-sm { width: 24px; height: 24px; font-size: .78rem; }
.rate-1 { background: var(--bad); color: #fff; }
.rate-2 { background: var(--bad-soft); color: var(--bad-ink); }
.rate-3 { background: var(--brand-soft); color: var(--brand-text); }
.rate-4 { background: color-mix(in srgb, var(--brand) 45%, var(--surface)); color: var(--ink); }
.rate-5 { background: var(--brand); color: var(--brand-ink); }
.rate-0 { background: var(--surface-2); color: var(--ink-soft); }

/* ------------------------------------------------------------ login */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-visual { position: relative; overflow: hidden; background: var(--side-bg); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; isolation: isolate; }
.auth-visual .photo { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -2; }
.auth-visual .photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.65)); }
.auth-rings { position: absolute; right: -180px; bottom: -200px; width: 640px; height: 640px; z-index: -1; opacity: .9; }
.auth-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.auth-brand img { max-height: 44px; max-width: 180px; object-fit: contain; }
.auth-brand .brand-mark { background: rgba(255,255,255,.14); }
.auth-brand strong { font-family: var(--font-heading); font-size: 1.08rem; display: block; }
.auth-brand span { font-size: .84rem; opacity: .75; }
.auth-headline { font-family: var(--font-heading); font-size: clamp(2rem, 3.3vw, 3.05rem); font-weight: 750; line-height: 1.06; letter-spacing: -.03em; max-width: 15ch; color: #fff; margin: 0 0 18px; }
.auth-visual p { color: rgba(255,255,255,.78); max-width: 46ch; margin: 0; }
.auth-foot { font-size: .8rem; color: rgba(255,255,255,.6); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 6px; }
@media (max-width: 899.98px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { padding: 28px 24px 32px; min-height: 260px; }
  .auth-rings { width: 420px; height: 420px; right: -160px; bottom: -180px; }
  .auth-headline { font-size: 1.85rem; }
}

/* ------------------------------------------------------------ asesmen */
.choice { display: block; height: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.choice strong { display: block; }
.choice span { color: var(--ink-soft); font-size: .86rem; }
.btn-check:checked + .choice { border-color: var(--brand); background: var(--brand-softer); box-shadow: inset 0 0 0 1px var(--brand); }
.btn-check:focus-visible + .choice { outline: 3px solid rgba(var(--brand-rgb), .4); outline-offset: 2px; }

.journey { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.journey-step { border: 0; background: var(--surface-2); border-radius: var(--radius-sm); padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink-soft); font-size: .72rem; font-weight: 650; line-height: 1.1; }
.journey-step b { font-family: var(--font-heading); font-size: .98rem; }
.journey-step:hover { background: var(--brand-softer); color: var(--brand-text); }
.journey-step.partial { background: var(--warn-soft); color: var(--warn-ink); }
.journey-step.done { background: var(--brand-soft); color: var(--brand-text); }
.journey-step.current { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 767.98px) { .journey { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.comp-intro { padding: 26px 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.comp-intro::after { content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; border: 18px solid var(--brand-softer); box-shadow: 0 0 0 26px var(--surface), 0 0 0 40px var(--brand-softer); pointer-events: none; }
.comp-intro h2 { font-size: 1.75rem; margin: 6px 0 8px; position: relative; z-index: 1; }
.comp-intro p { color: var(--ink-soft); max-width: 70ch; margin: 0; position: relative; z-index: 1; }

.kb { padding: 22px 0; border-bottom: 1px solid var(--line); }
.kb:last-of-type { border-bottom: 0; }
.kb-code { font-size: .82rem; color: var(--brand-text); font-weight: 650; }
.kb-text { font-size: 1.08rem; font-weight: 600; line-height: 1.45; margin: 4px 0 14px; max-width: 75ch; }
.kb.kb-warn .kb-code::after { content: " (contoh perilaku belum cukup)"; color: var(--warn-ink); }

/* skala tumbuh: 5 segmen yang terisi sampai pilihan */
.grow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; max-width: 720px; }
.grow label { cursor: pointer; margin: 0; display: flex; flex-direction: column; gap: 6px; user-select: none; }
.grow .seg { height: 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s ease; }
.grow .lbl { display: flex; align-items: baseline; gap: 6px; font-size: .84rem; color: var(--ink-soft); }
.grow .lbl b { font-family: var(--font-heading); font-size: 1rem; color: var(--ink); }
.grow label:hover .seg { border-color: var(--brand); }
.grow input:focus-visible + label .seg { outline: 3px solid rgba(var(--brand-rgb), .45); outline-offset: 2px; }
.grow:has(input[value="1"]:checked) label:nth-of-type(-n+1) .seg,
.grow:has(input[value="2"]:checked) label:nth-of-type(-n+2) .seg,
.grow:has(input[value="3"]:checked) label:nth-of-type(-n+3) .seg,
.grow:has(input[value="4"]:checked) label:nth-of-type(-n+4) .seg,
.grow:has(input[value="5"]:checked) label:nth-of-type(-n+5) .seg { background: var(--brand); border-color: var(--brand); }
.grow input:checked + label .lbl { color: var(--brand-text); font-weight: 700; }
.grow input:checked + label .lbl b { color: var(--brand-text); }
@media (max-width: 575.98px) { .grow .lbl span { display: none; } }

.evidence-count { font-size: .8rem; }
.action-bar { position: sticky; bottom: 12px; z-index: 20; display: flex; gap: 8px; align-items: center; padding: 10px; margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.action-bar .spacer { flex: 1; }
.action-bar .btn { white-space: nowrap; }

/* ------------------------------------------------------------ laporan */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 40px; }
.report-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 2px solid var(--ink); }
.report-head img { max-height: 46px; max-width: 160px; object-fit: contain; }
.verdict { border-radius: var(--radius-lg); padding: 24px 26px; height: 100%; color: #fff; position: relative; overflow: hidden; }
/* warna latar lebih gelap dari token status agar teks putih memenuhi kontras 4.5:1 */
.verdict-ok { background: #256140; }
.verdict-warn { background: #8a5a12; }
.verdict-bad { background: #9c3624; }
.verdict .code { font-family: var(--font-heading); font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.verdict .name { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; margin: 4px 0 10px; }
.verdict p { margin: 0; opacity: .92; font-size: .92rem; }
.verdict .kind { font-size: .84rem; opacity: .85; }
.criteria td { font-size: .88rem; vertical-align: top; }
.criteria td.hit-D { background: var(--ok-soft); color: var(--ok-ink); font-weight: 650; }
.criteria td.hit-DDP { background: var(--warn-soft); color: var(--warn-ink); font-weight: 650; }
.criteria td.hit-TD { background: var(--bad-soft); color: var(--bad-ink); font-weight: 650; }
.criteria th.col-D { color: var(--ok); } .criteria th.col-DDP { color: var(--warn); } .criteria th.col-TD { color: var(--bad); }
.note-block { border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; }
.note-block.dev { border-color: var(--warn); }
.quote { margin-top: 6px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: .88rem; }
.sign { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 40px; text-align: center; }
.sign .space { height: 70px; }
@media (max-width: 767.98px) { .report { padding: 22px 18px; } }

/* lingkar tumbuh (SVG) */
.rings { width: 100%; height: auto; max-width: 420px; display: block; margin: 0 auto; }
.rings .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rings .ring-threshold { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 4; }
.rings .wedge-bg { fill: var(--surface-2); }
.rings .wedge-1 { fill: var(--bad); }
.rings .wedge-2 { fill: color-mix(in srgb, var(--bad) 55%, var(--surface)); }
.rings .wedge-3 { fill: color-mix(in srgb, var(--brand) 55%, var(--surface)); }
.rings .wedge-4 { fill: color-mix(in srgb, var(--brand) 78%, var(--surface)); }
.rings .wedge-5 { fill: var(--brand); }
.rings .wedge-avg { fill: color-mix(in srgb, var(--brand) 70%, var(--surface)); }
.rings .outline-self { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 3 3; }
.rings .label { font-size: 11px; font-weight: 700; fill: var(--ink-soft); font-family: var(--font-body); }
.rings .label-low { fill: var(--bad); }
.rings .pith { fill: var(--surface); stroke: var(--line); }
.rings .center-num { font-family: var(--font-heading); font-weight: 800; font-size: 20px; fill: var(--ink); }
.rings .center-sub { font-size: 9px; fill: var(--ink-soft); }
.ring-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .82rem; color: var(--ink-soft); margin-top: 10px; }
.ring-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* batang distribusi */
.dist { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.dist span { display: block; height: 100%; }
.dist .d-ok { background: var(--ok); } .dist .d-warn { background: var(--warn); } .dist .d-bad { background: var(--bad); }
.dist-legend { display: grid; gap: 8px; margin-top: 16px; }
.dist-legend div { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; font-size: .92rem; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(130px, 34%) 1fr 42px; gap: 12px; align-items: center; font-size: .88rem; }
.bar-track { height: 10px; border-radius: 99px; background: var(--surface-2); position: relative; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--brand); }
.bar-track .mark { position: absolute; left: 60%; top: -3px; bottom: -3px; width: 2px; background: var(--accent); border-radius: 2px; }
.bar-low .bar-fill { background: var(--bad); }

/* validasi */
.rate-pick { display: inline-flex; gap: 3px; }
.rate-pick label { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-weight: 750; cursor: pointer; margin: 0; color: var(--ink-soft); background: var(--surface); font-family: var(--font-heading); }
.rate-pick label:hover { border-color: var(--brand); }
.rate-pick input:checked + label.p1 { background: var(--bad); border-color: var(--bad); color: #fff; }
.rate-pick input:checked + label.p2 { background: var(--bad-soft); border-color: var(--bad); color: var(--bad-ink); }
.rate-pick input:checked + label.p3 { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.rate-pick input:checked + label.p4, .rate-pick input:checked + label.p5 { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.rate-pick input:focus-visible + label { outline: 3px solid rgba(var(--brand-rgb), .4); outline-offset: 2px; }
.detail { background: var(--surface-2); padding: 14px 24px; display: grid; gap: 12px; }
.detail-row { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.preview-box { position: sticky; top: 84px; }

/* kamus */
.level-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.level-switch a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.level-switch a:hover { border-color: var(--brand); color: var(--brand-text); }
.level-switch a.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.level-switch a .cnt { font-size: .78rem; opacity: .75; margin-left: 4px; }
.level-switch a.incomplete .cnt { color: var(--warn); opacity: 1; }
.level-switch a.active.incomplete .cnt { color: inherit; }
.dict-comp { padding: 22px 0; border-top: 1px solid var(--line); }
.dict-comp:first-child { border-top: 0; padding-top: 4px; }
.dict-row { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 6px 24px; padding: 10px 0; border-top: 1px dashed var(--line); }
@media (max-width: 767.98px) { .dict-row { grid-template-columns: 1fr; } }

/* branding */
.preset { display: block; cursor: pointer; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface); height: 100%; }
.preset .swatch { display: flex; height: 38px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 10px; }
.preset .swatch span { flex: 1; }
.preset strong { display: block; }
.preset small { color: var(--ink-soft); }
.btn-check:checked + .preset { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.asset-tile { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px; display: flex; gap: 14px; align-items: center; background: var(--surface-2); }
.asset-thumb { width: 84px; height: 56px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; flex: 0 0 84px; }
.asset-thumb.dark { background: #1b2420; }
.asset-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.asset-thumb.cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-app { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 110px 1fr; height: 190px; background: var(--page); }
.mini-side { background: var(--side-bg); padding: 12px 10px; display: grid; align-content: start; gap: 7px; }
.mini-side i { display: block; height: 7px; border-radius: 4px; background: var(--side-fg); opacity: .35; }
.mini-side i.on { background: var(--side-mark); opacity: 1; }
.mini-side .mk { width: 22px; height: 22px; border-radius: 6px; background: var(--side-mark); margin-bottom: 6px; }
.mini-main { padding: 14px; display: grid; gap: 8px; align-content: start; }
.mini-main .h { height: 12px; width: 55%; background: var(--ink); border-radius: 4px; opacity: .85; }
.mini-main .p { height: 7px; width: 80%; background: var(--ink-soft); opacity: .4; border-radius: 4px; }
.mini-main .card-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; display: flex; gap: 6px; align-items: center; }
.mini-main .b { height: 18px; width: 64px; border-radius: var(--radius-sm); background: var(--brand); }
.mini-main .a { height: 18px; width: 40px; border-radius: var(--radius-sm); background: var(--accent); }

/* ------------------------------------------------------------ cetak */
@media print {
  @page { size: A4; margin: 14mm; }
  html { font-size: 11pt; }
  body { background: #fff !important; }
  .side, .topbar, .app-foot, .no-print, .action-bar { display: none !important; }
  .content { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
  .verdict, .criteria td, .rate, .tag, .rec, .rings, .dist span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .table-responsive { overflow: visible !important; }
  .row { display: flex; flex-wrap: wrap; }
  .col-lg-5 { width: 41.66%; } .col-lg-7 { width: 58.33%; } .col-md-6 { width: 50%; }
  .page-break { break-before: page; }
  .sign { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

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