/* SIKOMPETEN — design system (light, navy + emerald, Plus Jakarta Sans) */
:root {
  --navy-900: #0b1f4d;
  --navy-800: #13306e;
  --navy-700: #1e40af;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-50: #eef4ff;
  --emerald-600: #059669;
  --emerald-50: #e7f8f1;
  --amber-600: #b45309;
  --amber-50: #fff6e5;
  --rose-600: #dc2626;
  --rose-50: #fdeeee;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: var(--slate-900);
  --muted: var(--slate-500);
  --line: #e6ebf2;
  --primary: var(--navy-700);
  --primary-hover: var(--navy-800);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -20px rgba(11, 31, 77, .35);
  --hero: linear-gradient(135deg, #0b1f4d 0%, #1e40af 60%, #2563eb 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--blue-600); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; color: var(--slate-900); }
h1 { font-size: 1.5rem; font-weight: 800; }
h2 { font-size: 1.02rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.xs { font-size: .76rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex-shrink: 0; }
.wrap-any { overflow-wrap: anywhere; }

/* ================= LAYOUT ================= */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--hero); display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(30, 64, 175, .6); flex-shrink: 0;
}
.brand .logo svg { width: 22px; height: 22px; color: #fff; }
.brand b { display: block; font-weight: 800; letter-spacing: .02em; font-size: 1rem; }
.brand small { display: block; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.sidebar .brand { padding: 4px 8px 22px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--slate-700);
  font-weight: 600; font-size: .92rem; margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav a svg { width: 20px; height: 20px; color: var(--slate-400); transition: color .15s; }
.nav a:hover { background: var(--slate-100); }
.nav a.active { background: var(--blue-50); color: var(--navy-700); }
.nav a.active svg { color: var(--navy-700); }
.nav .sep { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-400); padding: 18px 12px 8px; }
.sidebar .user {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--slate-100);
}
.sidebar .user .t { min-width: 0; flex: 1; }
.sidebar .user b { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--blue-50); color: var(--navy-700); display: grid; place-items: center;
  font-weight: 800; font-size: .85rem; flex-shrink: 0; letter-spacing: .02em;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; background: rgba(255, 255, 255, .16); color: #fff; border: 2px solid rgba(255, 255, 255, .35); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center;
  color: var(--slate-700); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--slate-100); }

.main { flex: 1; min-width: 0; padding: 28px 36px 48px; max-width: 1240px; margin: 0 auto; width: 100%; }
.topbar, .bottomnav, .mobile-menu, .fab { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--line); padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  }
  .topbar .brand .logo { width: 34px; height: 34px; border-radius: 10px; }
  .topbar .brand .logo svg { width: 18px; height: 18px; }
  .bottomnav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; min-width: 0;
    color: var(--slate-500); font-size: .68rem; font-weight: 600; border-radius: 12px;
  }
  .bottomnav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
  .bottomnav a .pill { display: grid; place-items: center; width: 48px; height: 28px; border-radius: 999px; transition: background .2s var(--ease); }
  .bottomnav a svg { width: 21px; height: 21px; }
  .bottomnav a.active { color: var(--navy-700); }
  .bottomnav a.active .pill { background: var(--blue-50); }
  .mobile-menu:not(.hidden) {
    display: block; position: fixed; inset: 0; z-index: 40; background: rgba(15, 23, 42, .35); animation: fade .2s var(--ease);
  }
  .mobile-menu .sheet {
    position: absolute; top: 0; left: 0; right: 0; background: var(--card); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: calc(14px + env(safe-area-inset-top)) 14px 14px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow-y: auto;
    animation: slideDown .25s var(--ease);
  }
  .mobile-menu .sheet .head { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; }
  .fab {
    display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 25;
    width: 56px; height: 56px; border-radius: 18px; background: var(--hero); color: #fff; border: 0; box-shadow: var(--shadow-lg); cursor: pointer;
  }
  .fab svg { width: 26px; height: 26px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideDown { from { transform: translateY(-16px); opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ================= PAGE ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .t { min-width: 0; }
.page-head .sub { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: .84rem; font-weight: 600; margin-bottom: 8px; }
.main > * { animation: rise .3s var(--ease) both; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-head .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--navy-700); }
.card-head .ic svg { width: 18px; height: 18px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 16px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; background: var(--hero); color: #fff; border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .18), transparent); pointer-events: none;
}
.hero h1 { color: #fff; font-size: 1.45rem; }
.hero .row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.hero .meta { color: rgba(255, 255, 255, .8); font-size: .86rem; margin-top: 2px; }
.hero .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.hero .chip { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); color: #fff; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.hero-stats div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.hero-stats b { display: block; font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.hero-stats span { font-size: .72rem; color: rgba(255, 255, 255, .8); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .hero { padding: 20px 18px; border-radius: 20px; }
  .hero h1 { font-size: 1.2rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); color: inherit; min-width: 0; transition: transform .15s var(--ease), box-shadow .15s;
}
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-50); color: var(--navy-700); }
.stat .ic svg { width: 19px; height: 19px; }
.stat .n { font-size: 1.6rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .8rem; font-weight: 500; line-height: 1.3; }
.tone-ok .ic { background: var(--emerald-50); color: var(--emerald-600); }
.tone-warn .ic { background: var(--amber-50); color: var(--amber-600); }
.tone-bad .ic { background: var(--rose-50); color: var(--rose-600); }
.tone-warn .n { color: var(--amber-600); }
.tone-bad .n { color: var(--rose-600); }

/* Progress ring + bar */
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 104px; height: 104px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { stroke: var(--slate-100); }
.ring .fg { transition: stroke-dashoffset .8s var(--ease); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .c b { font-size: 1.45rem; font-weight: 800; }
.ring .c span { font-size: .7rem; color: var(--muted); display: block; }
.progress { height: 8px; background: var(--slate-100); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--blue-600); border-radius: 999px; transition: width .6s var(--ease); }
.progress.ok > span { background: var(--emerald-600); }
.progress.warn > span { background: #f59e0b; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; margin: 12px 0; font-size: .86rem; }
.bar-row .progress { grid-column: 1 / -1; }
.bar-row .v { color: var(--muted); font-weight: 600; font-size: .8rem; }
.bar-row .k { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Chips / badges */
.chip, .badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: var(--slate-100); color: var(--slate-700); white-space: nowrap; line-height: 1.6;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.ok { background: var(--emerald-50); color: var(--emerald-600); }
.badge.warn { background: var(--amber-50); color: var(--amber-600); }
.badge.bad { background: var(--rose-50); color: var(--rose-600); }
.badge.info { background: var(--blue-50); color: var(--navy-700); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--slate-900); border-radius: 12px; padding: 10px 16px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
  min-height: 44px; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; text-align: center;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: #cbd5e1; background: #fbfcfe; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--hero); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px rgba(30, 64, 175, .7); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--navy-700); }
.btn.ghost:hover { background: var(--blue-50); }
.btn.danger { color: var(--rose-600); }
.btn.danger:hover { background: var(--rose-50); border-color: #fecaca; }
.btn.ok { color: var(--emerald-600); }
.btn.ok:hover { background: var(--emerald-50); border-color: #a7f3d0; }
.btn.sm { padding: 6px 12px; min-height: 36px; font-size: .82rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; border-radius: 8px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.list > li:first-child { padding-top: 0; }
.list .t { min-width: 0; flex: 1; }
.list .t b { display: block; font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.list .t .s { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.tile svg { width: 20px; height: 20px; }
.t-blue { background: var(--blue-50); color: var(--navy-700); }
.t-green { background: var(--emerald-50); color: var(--emerald-600); }
.t-amber { background: var(--amber-50); color: var(--amber-600); }
.t-rose { background: var(--rose-50); color: var(--rose-600); }
.t-slate { background: var(--slate-100); color: var(--slate-700); }
.t-violet { background: #f1efff; color: #5b4bd6; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; font-size: .9rem; }
.empty svg { width: 40px; height: 40px; color: var(--slate-400); display: block; margin: 0 auto 8px; }

/* Document cards */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.doc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.doc .top { display: flex; gap: 12px; align-items: flex-start; }
.doc .top .t { flex: 1; min-width: 0; }
.doc .top b { display: block; font-size: .95rem; font-weight: 700; overflow-wrap: anywhere; line-height: 1.35; }
.doc .top .s { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; margin-top: 2px; }
.doc .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.doc .facts div { background: var(--slate-100); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.doc .facts span { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.doc .facts b { display: block; font-size: .84rem; overflow-wrap: anywhere; }
.doc .note { font-size: .82rem; color: var(--rose-600); background: var(--rose-50); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.doc .foot { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto; }

/* Tables: desktop table, mobile cards */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; background: #f8fafc; }
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: #f8fbff; }
td .s { color: var(--muted); font-size: .8rem; }
@media (max-width: 900px) {
  table.resp thead { display: none; }
  table.resp, table.resp tbody, table.resp tr, table.resp td { display: block; width: 100%; }
  table.resp tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 12px 14px; background: var(--card); box-shadow: var(--shadow-sm); }
  table.resp td { border: 0; padding: 4px 0; overflow-wrap: anywhere; }
  table.resp td[data-l]::before { content: attr(data-l); display: block; font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  table.resp td:first-child::before { display: none; }
  table.resp td:first-child { font-size: .95rem; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
  tbody tr:hover td { background: transparent; }
}

/* Forms */
.field { margin-bottom: 14px; min-width: 0; }
.field label { display: block; font-weight: 700; font-size: .82rem; margin-bottom: 6px; color: var(--slate-700); }
.field .hint { font-size: .76rem; color: var(--muted); margin-top: 5px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1.5px solid var(--slate-200); border-radius: 12px;
  padding: 10px 14px; min-height: 46px; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); }
input[type="file"] { padding: 10px; background: var(--slate-100); border-style: dashed; }
textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--slate-700); cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 20px; margin-top: 1px; padding: 0; accent-color: var(--navy-700); -webkit-appearance: checkbox; appearance: auto; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters > * { flex: 1 1 170px; width: auto; min-width: 0; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate-400); pointer-events: none; }
.search input { padding-left: 40px; }
.pin-input { letter-spacing: .5em; font-weight: 700; text-align: center; font-size: 1.15rem; }

/* Name picker */
.picker { border: 1.5px solid var(--slate-200); border-radius: 14px; max-height: 280px; overflow-y: auto; background: #fff; overscroll-behavior: contain; }
.picker button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; min-height: 56px;
}
.picker button:last-child { border-bottom: 0; }
.picker button:hover { background: #f8fbff; }
.picker button .t { min-width: 0; flex: 1; }
.picker button b { display: block; font-size: .9rem; overflow-wrap: anywhere; }
.picker button span { display: block; font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.picked { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--blue-50); border: 1.5px solid #c7d7fe; }
.picked .t { flex: 1; min-width: 0; }
.picked b { display: block; overflow-wrap: anywhere; }
.picked .s { font-size: .8rem; color: var(--slate-700); overflow-wrap: anywhere; }
.nip { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy-700); letter-spacing: .03em; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); }
.auth-side {
  position: relative; overflow: hidden; background: var(--hero); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side::before, .auth-side::after {
  content: ""; position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent);
}
.auth-side::before { width: 520px; height: 520px; right: -200px; top: -160px; }
.auth-side::after { width: 380px; height: 380px; left: -140px; bottom: -140px; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand small { color: rgba(255, 255, 255, .75); }
.auth-side .brand .logo { background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .25); box-shadow: none; }
.auth-side h2 { color: #fff; font-size: 2rem; font-weight: 800; line-height: 1.2; max-width: 460px; margin-bottom: 14px; }
.auth-side p { color: rgba(255, 255, 255, .8); max-width: 440px; }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 440px; }
.features li { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: rgba(255, 255, 255, .9); }
.features li .tile { width: 36px; height: 36px; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 10px; }
.features li .tile svg { width: 18px; height: 18px; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 28px; border-radius: var(--radius-lg); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-mobile-head { display: none; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--slate-100); padding: 4px; border-radius: 14px; margin: 18px 0 20px; }
.tabs a { text-align: center; padding: 10px; border-radius: 11px; color: var(--muted); font-weight: 700; font-size: .9rem; }
.tabs a.active { background: #fff; color: var(--navy-700); box-shadow: var(--shadow-sm); }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .auth-side { display: none; }
  .auth-mobile-head {
    display: block; background: var(--hero); color: #fff; padding: calc(28px + env(safe-area-inset-top)) 22px 88px; position: relative; overflow: hidden;
  }
  .auth-mobile-head::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent); }
  .auth-mobile-head .brand small { color: rgba(255, 255, 255, .75); }
  .auth-mobile-head .brand .logo { background: rgba(255, 255, 255, .15); box-shadow: none; }
  .auth-mobile-head h2 { color: #fff; font-size: 1.35rem; font-weight: 800; margin-top: 22px; }
  .auth-mobile-head p { color: rgba(255, 255, 255, .8); font-size: .88rem; margin: 6px 0 0; }
  .auth-main { padding: 0 14px 32px; margin-top: -64px; place-items: start center; position: relative; z-index: 1; }
  .auth-card .card { padding: 6px 18px 22px; }
}

/* Modal / bottom sheet */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; animation: fade .2s var(--ease); }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 640px; padding: 24px; box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { font-size: 1.15rem; font-weight: 800; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 24px 24px 0 0; max-height: 94vh; overflow-y: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
  .modal::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 99px; background: var(--slate-200); margin: 0 auto 12px; }
  .modal-foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); background: #fff; padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-bottom: 0; }
  .modal-foot .btn { flex: 1; }
}

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(140px); background: var(--slate-900); color: #fff;
  padding: 12px 18px; border-radius: 14px; z-index: 100; transition: transform .3s var(--ease); max-width: calc(100% - 32px);
  font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: transform .3s var(--ease), opacity .2s, visibility .3s;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
#toast.err { background: var(--rose-600); }
@media (max-width: 900px) { #toast { bottom: calc(88px + env(safe-area-inset-bottom)); } }

/* Skeleton */
.skel { display: grid; gap: 14px; }
.skel div { height: 110px; border-radius: var(--radius); background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skel div:first-child { height: 150px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 26px; height: 26px; border: 3px solid var(--slate-200); border-top-color: var(--navy-700); border-radius: 50%; animation: spin .8s linear infinite; margin: 28px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Notice */
.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-50); color: #7c4a03; border-radius: 14px; padding: 12px 14px; font-size: .86rem; margin-bottom: 14px; border: 1px solid #fde4b8; }
.notice svg { width: 18px; height: 18px; margin-top: 1px; }
.notice.info { background: var(--blue-50); color: var(--navy-800); border-color: #d6e2fd; }
.notice.bad { background: var(--rose-50); color: #8f1d1d; border-color: #fbd0d0; }
.notice a { font-weight: 700; }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
@media (max-width: 600px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; } }

/* SKP Kinerja stepper */
.skp-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.skp-step {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 4px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; font: inherit; color: inherit; min-width: 0; cursor: default;
}
button.skp-step { cursor: pointer; }
button.skp-step:hover { border-color: var(--blue-500); background: #f8fbff; }
.skp-step .dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.skp-step .dot svg { width: 18px; height: 18px; }
.skp-step b { font-size: .82rem; max-width: 100%; overflow-wrap: anywhere; line-height: 1.2; }
.skp-step span { font-size: .68rem; color: var(--muted); line-height: 1.25; }
.skp-step.ADA .dot { background: var(--emerald-50); color: var(--emerald-600); }
.skp-step.MENUNGGU .dot { background: var(--amber-50); color: var(--amber-600); }
.skp-step.DITOLAK .dot, .skp-step.LEWAT .dot { background: var(--rose-50); color: var(--rose-600); }
.skp-step.BELUM .dot { background: var(--slate-100); color: var(--slate-400); }
.skp-step.LEWAT { border-color: #fbd0d0; }
@media (max-width: 420px) { .skp-steps { gap: 5px; } .skp-step { padding: 10px 2px; border-radius: 12px; } .skp-step .dot { width: 32px; height: 32px; } .skp-step b { font-size: .72rem; } .skp-step span { font-size: .62rem; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .74rem; color: var(--muted); }

.pin-big { font-size: 2.2rem; font-weight: 800; letter-spacing: .3em; text-align: center; padding: 18px; background: var(--blue-50); color: var(--navy-700); border-radius: 16px; margin: 12px 0; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.card-head .ic.tone-ok { background: var(--emerald-50); color: var(--emerald-600); }
.card-head .ic.tone-warn { background: var(--amber-50); color: var(--amber-600); }
.card-head .ic.tone-violet { background: #f1efff; color: #5b4bd6; }
.card-head .ic.tone-slate { background: var(--slate-100); color: var(--slate-700); }
@media (max-width: 900px) { .desk-only { display: none; } }
@media (max-width: 600px) {
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .filters .search { grid-column: 1 / -1; }
  .filters select { font-size: 15px; }
}
@media (max-width: 600px) {
  .stat { padding: 14px; gap: 8px; }
  .stat .n { font-size: 1.4rem; }
  .card { padding: 16px; }
  h1 { font-size: 1.35rem; }
}
@media (max-width: 900px) {
  table.resp tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  table.resp td { width: auto; }
  table.resp td:first-child, table.resp td:has(.actions) { grid-column: 1 / -1; }
  .card table.resp tr { background: #f8fafc; box-shadow: none; border-color: #edf1f6; }
}
