/* SiapSMK2 — palette and layout follow mockup/*.dc.html */
:root {
  --bg: #F4F3EE;
  --surface: #FFFFFF;
  --surface-muted: #F8F7F3;
  --border: #E3E0D6;
  --border-soft: #EFEDE6;
  --border-input: #CFCBBF;
  --text: #1B1F23;
  --text-muted: #5E6267;
  --text-soft: #45484D;
  --primary: #0F5E63;
  --primary-dark: #0A4347;
  --primary-soft: #EEF5F4;
  --sidebar: #12302F;
  --sidebar-muted: #9FBDBA;
  --sidebar-link: #C9DCDA;
  --accent: #F2B544;
  --ok-bg: #DCEFEA; --ok: #0B4F4A;
  --warn-bg: #FBEBCB; --warn: #7A4A00;
  --miss-bg: #F8DEDA; --miss: #8E2A20;
  --none-bg: #ECEAE3; --none: #45484D;
  --note-bg: #FDF6E6; --note: #4A3A12;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex-shrink: 0; background: var(--sidebar); color: #fff; display: flex; flex-direction: column; padding: 28px 18px; gap: 28px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.brand-logo { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 7px; padding: 2px; flex-shrink: 0; }
.logo-preview { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.org-card { padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.07); }
.org-card .label { font-size: 12px; color: var(--sidebar-muted); }
.org-card .name { font-size: 14px; font-weight: 700; margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-radius: 10px; text-decoration: none; color: var(--sidebar-link); }
.nav a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 700; }
.sidebar-foot { margin-top: auto; font-size: 12px; color: var(--sidebar-muted); line-height: 1.5; display: flex; flex-direction: column; gap: 10px; }
.sidebar-foot .user { color: #fff; font-weight: 700; font-size: 13px; }
.sidebar-foot a { color: #fff; }
.sidebar-foot button { background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 8px; min-height: 36px; cursor: pointer; }
.main { flex-grow: 1; min-width: 0; padding: 36px 40px; display: flex; flex-direction: column; gap: 22px; }

/* Header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; font-size: 15px; color: var(--text-muted); }
.crumb { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--border-input); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--primary); color: var(--text); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--text); font-weight: 700; }
.btn-danger { color: var(--miss); border-color: var(--miss); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-dashed { border-style: dashed; border-color: var(--primary); color: var(--primary); font-weight: 700; }
.btn-dashed.miss { border-color: var(--miss); color: var(--miss); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.input, .select, .textarea { width: 100%; min-height: 44px; border: 1px solid var(--border-input); border-radius: 8px; padding: 0 10px; background: var(--surface); }
.textarea { padding: 10px; min-height: 72px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-caps { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.error { color: var(--miss); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-dark { background: var(--sidebar); color: #fff; border: none; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.kpi .t { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.kpi .v { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.kpi .v small { font-size: 20px; color: var(--text-muted); font-weight: 600; }
.kpi .d { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.grid-2b { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Chips */
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-miss { background: var(--miss-bg); color: var(--miss); }
.chip-none { background: var(--none-bg); color: var(--none); }
.code-chip { font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; background: var(--primary-soft); color: var(--ok); display: inline-flex; gap: 6px; align-items: center; }
.code-chip button { border: none; background: none; color: var(--miss); cursor: pointer; padding: 0; font-weight: 800; }

/* Dashboard element progress */
.el-row { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface-muted); text-decoration: none; color: var(--text); }
.el-row:hover { color: var(--text); background: var(--primary-soft); }
.el-badge { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--sidebar); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.el-body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.el-top, .el-bottom { display: flex; justify-content: space-between; gap: 12px; }
.el-top { font-weight: 700; }
.el-top .pct { color: var(--primary); }
.el-bottom { font-size: 12px; color: var(--text-muted); }
.bar { height: 8px; border-radius: 99px; background: var(--border); }
.bar > div { height: 8px; border-radius: 99px; background: var(--primary); }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); text-decoration: none; color: var(--text); }
.alert-row .code { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-soft); width: 56px; flex-shrink: 0; }
.alert-row .txt { font-size: 13px; flex-grow: 1; line-height: 1.4; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.step { padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.08); }
.step .n { font-size: 12px; font-weight: 700; color: var(--sidebar-muted); }
.step .l { font-size: 13px; margin-top: 4px; line-height: 1.35; }
.step.current { background: var(--accent); color: var(--text); }
.step.current .n { color: var(--text); }
.step.done .n { color: var(--accent); }

/* Assessment page */
.split { display: flex; gap: 18px; align-items: flex-start; }
.el-nav { width: 268px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; }
.el-nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; line-height: 1.3; }
.el-nav a .count { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.el-nav a.el-active { background: var(--sidebar); color: #fff; font-weight: 700; }
.el-nav a.el-active .count { color: var(--accent); }
.el-nav a.crit { padding-left: 24px; font-size: 13px; font-weight: 500; color: var(--text-soft); }
.el-nav a.crit.crit-active { background: var(--primary-soft); color: var(--ok); font-weight: 700; }
.el-nav hr { border: none; height: 1px; background: var(--border-soft); margin: 8px 0; width: 100%; }
.guidance { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--note-bg); font-size: 13px; line-height: 1.5; color: var(--note); }
.guidance textarea { background: #fff; }
.sub-table-head, .sub-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) 104px minmax(0, 1.5fr) 150px 140px; gap: 16px; }
.sub-table-head { padding: 0 4px 10px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sub-row { padding: 14px 4px; border-bottom: 1px solid var(--border-soft); }
.sub-grid { align-items: start; }
.sub-desc { font-size: 14px; line-height: 1.45; }
.sub-desc strong { font-family: var(--mono); font-size: 12px; color: var(--primary); }
.sub-guidance { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.evidence { display: flex; flex-direction: column; gap: 6px; }
.evidence-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--bg); font-size: 13px; font-weight: 600; }
.evidence-item { padding: 6px 10px; line-height: 1.35; flex-wrap: wrap; }
.evidence-item a { text-decoration: none; overflow-wrap: anywhere; flex: 1 1 120px; min-width: 0; }
.evidence-item button { border: none; background: none; color: var(--miss); cursor: pointer; font-weight: 800; }
.evidence-item.expired { background: var(--warn-bg); }
.sub-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.sub-notes { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.sub-notes .warn { color: var(--miss); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notes-editor { margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--surface-muted); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crit-list { display: flex; flex-direction: column; gap: 8px; }
.crit-link { min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); font-weight: 600; color: var(--text); text-decoration: none; }

/* Tables (document bank, settings) */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tr.selectable { cursor: pointer; }
.table tr.selectable:hover td { background: var(--surface-muted); }
.table tr.selected td { background: var(--primary-soft); }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { flex-grow: 1; min-width: 260px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-input); border-radius: 10px; background: #fff; }
.search input { border: none; outline: none; flex-grow: 1; background: transparent; min-height: 40px; }
.pill { min-height: 44px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border-input); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.pill.active { background: var(--sidebar); color: #fff; border-color: var(--sidebar); font-weight: 700; }
.pill.miss { color: var(--miss); font-weight: 700; }
.pill.miss.active { color: #fff; }
.detail { width: 360px; flex-shrink: 0; position: sticky; top: 16px; }
.version-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.version-row.inactive { color: var(--text-muted); }

/* Report page */
.export-box { padding: 18px; border-radius: 12px; background: rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 12px; }
.export-box .t { font-size: 15px; font-weight: 700; }
.export-box .d { font-size: 13px; color: var(--sidebar-link); line-height: 1.5; }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-ghost-light:hover { color: #fff; }

/* Tabs */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

/* Flash & modal */
.flash { padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--miss-bg); color: var(--miss); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(18,48,47,.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.modal-list button { text-align: left; display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-muted); cursor: pointer; }
.modal-list button:hover { border-color: var(--primary); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 420px; }

/* Tablet */
@media (max-width: 1180px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 20px; gap: 14px; }
  .org-card, .sidebar-foot .note { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .main { padding: 24px 20px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2b { grid-template-columns: 1fr; }
  .split { flex-direction: column; }
  .el-nav, .detail { width: 100%; position: static; }
  .sub-table-head { display: none; }
  .sub-grid { grid-template-columns: 1fr 1fr; }
  .sub-grid > .sub-desc { grid-column: 1 / -1; }
  .notes-editor, .form-grid { grid-template-columns: 1fr; }
}

/* Review comments */
.comment { padding: 10px 12px; border-radius: 10px; background: var(--surface-muted); border: 1px solid var(--border-soft); font-size: 13px; line-height: 1.45; }
.comment-return { background: var(--miss-bg); border-color: transparent; }
.check-row { display: flex; align-items: center; gap: 14px; min-height: 52px; border-bottom: 1px solid var(--border-soft); }
.check-dot { width: 28px; height: 28px; border-radius: 99px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.check-details { padding: 8px 0 12px 42px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }

/* DJK comparison */
.cmp-grid { display: grid; grid-template-columns: minmax(0, 2fr) 1fr 1fr 1fr; gap: 12px; align-items: center; min-height: 40px; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.cmp-head { min-height: 32px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; border-bottom-color: var(--border); }
.prev-djk { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Tugas & PIC */
.pic-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pic-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.pic-card:hover { border-color: var(--primary); }
.pic-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; background: var(--primary-soft); }
.kpi-mini { font-size: 26px; font-weight: 800; margin-top: 8px; }
