/* =====================================================================
   PPD Kemendes — tema hijau desa & emas padi
   ===================================================================== */
:root {
  --green-900: #072f20;
  --green-800: #0b4f35;
  --green-700: #0f6443;
  --green-600: #157a52;
  --green-100: #e3f1ea;
  --green-50:  #f2f8f4;
  --gold-500:  #f2b33d;
  --gold-600:  #d9971c;
  --gold-100:  #fdf1d9;
  --red-600:   #c0392b;
  --red-100:   #fbe5e2;
  --blue-600:  #2463b5;
  --blue-100:  #e3edfa;
  --ink:       #18241e;
  --ink-2:     #4a5a52;
  --ink-3:     #7d8b84;
  --line:      #dfe7e2;
  --bg:        #f4f7f5;
  --card:      #ffffff;
  --radius:    12px;
  --shadow:    0 1px 2px rgba(7,47,32,.06), 0 4px 16px rgba(7,47,32,.06);
  --sidebar-w: 268px;
  font-size: 15px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-700); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- boot / spinner ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--green-100); border-top-color: var(--green-700);
  animation: spin .8s linear infinite;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- brand mark ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
/* logo instansi */
.brand-logo { width: 46px; height: 46px; flex: none; object-fit: contain;
  background: #fff; border-radius: 50%; padding: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.brand-mark {
  width: 42px; height: 42px; flex: none; border-radius: 11px;
  background: var(--gold-500); display: grid; place-items: center;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text strong { display: block; font-weight: 800; letter-spacing: .02em; }
.brand-text span { display: block; font-size: .78rem; opacity: .8; }

/* =====================================================================
   LOGIN
   ===================================================================== */
.login {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero::before, .login-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-hero::before { width: 520px; height: 520px; right: -220px; bottom: -200px;
  background: radial-gradient(circle, rgba(242,179,61,.28), transparent 65%); }
.login-hero::after { width: 340px; height: 340px; left: -120px; top: 30%;
  border: 1px solid rgba(255,255,255,.08); }
.hero-rice { display: none;
  position: absolute; right: 40px; bottom: 0; width: 280px; opacity: .22; pointer-events: none;
}
.login-hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.8rem); font-weight: 800; margin: 18px 0 14px; max-width: 14ch; }
.login-hero h1 em { font-style: normal; color: var(--gold-500); }
.login-hero p { max-width: 44ch; opacity: .85; margin: 0; }
.hero-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; position: relative; z-index: 1; }
.hero-cats span {
  font-size: .8rem; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
}
.hero-foot { font-size: .8rem; opacity: .6; position: relative; z-index: 1; }

.login-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--card); }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 1.6rem; font-weight: 800; }
.login-card .lead { color: var(--ink-2); margin: 6px 0 28px; }
.login-mobile-brand { display: none; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 26px; }
.login-mobile-brand img { width: 88px; height: 88px; object-fit: contain; }
.login-mobile-brand strong { display: block; font-size: 1.1rem; font-weight: 800; color: var(--green-800); }
.login-mobile-brand span { display: block; font-size: .78rem; color: var(--ink-3); max-width: 32ch; margin: 2px auto 0; }
.hero-main { position: relative; z-index: 1; }
.hero-logo { width: 168px; height: 168px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px;
  box-shadow: 0 0 0 8px rgba(255,255,255,.08), 0 18px 40px rgba(0,0,0,.3); }
.login-hero .brand-logo { width: 52px; height: 52px; }
.login-hero .brand-text span { max-width: 36ch; }

/* =====================================================================
   FORM CONTROLS
   ===================================================================== */
.field { margin-bottom: 16px; }
.field > label:not(.file), .field-label {
  display: block; font-size: .84rem; font-weight: 600; margin-bottom: 6px; color: var(--ink);
}
.field .req { color: var(--red-600); }
.field .hint { font-size: .78rem; color: var(--ink-3); margin-top: 5px; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
.select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5a52' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.input:focus, .select:focus, .textarea:focus, .ss-trigger:focus-visible {
  outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(21,122,82,.15);
}
.input-wrap { position: relative; }
.input-wrap .toggle-pw {
  position: absolute; right: 6px; top: 6px; height: 32px; padding: 0 10px; border: 0;
  background: none; color: var(--ink-3); cursor: pointer; font-size: .8rem; font-weight: 600;
}

/* ---------- searchable select ---------- */
.ss { position: relative; }
.ss-trigger {
  width: 100%; height: 44px; padding: 0 38px 0 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
.ss-trigger::after {
  content: ''; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg);
}
.ss-trigger.placeholder { color: var(--ink-3); }
.ss-trigger:disabled { background: var(--bg); cursor: not-allowed; }
.ss.open .ss-trigger { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(21,122,82,.15); }
.ss-pop {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(7,47,32,.16); overflow: hidden;
}
.ss-search { padding: 8px; border-bottom: 1px solid var(--line); }
.ss-search input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px 0 34px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237d8b84' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") no-repeat 11px center;
}
.ss-search input:focus { outline: none; border-color: var(--green-600); background-color: #fff; }
.ss-list { max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; }
.ss-list li {
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: .9rem;
  display: flex; flex-direction: column;
}
.ss-list li small { color: var(--ink-3); font-size: .76rem; }
.ss-list li.active { background: var(--green-50); }
.ss-list li.selected { color: var(--green-700); font-weight: 600; }
.ss-list li mark { background: var(--gold-100); color: inherit; border-radius: 3px; }
.ss-empty { padding: 16px; text-align: center; color: var(--ink-3); font-size: .88rem; }

/* ---------- file input ---------- */
.file {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1.5px dashed var(--line); border-radius: 10px; background: var(--green-50);
  cursor: pointer; transition: border-color .15s, background .15s; position: relative;
}
.file:hover { border-color: var(--green-600); }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(21,122,82,.15); }
.file-icon {
  width: 36px; height: 36px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: #fff; color: var(--green-700); border: 1px solid var(--line);
}
.file-body { min-width: 0; flex: 1; }
.file-body strong { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-body span { font-size: .76rem; color: var(--ink-3); }
.file.has-file { border-style: solid; border-color: var(--green-600); background: #fff; }
.file.has-file .file-icon { background: var(--green-700); color: #fff; border-color: var(--green-700); }

/* ---------- radio cards ---------- */
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff;
}
.radio-card label::before {
  content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); flex: none;
}
.radio-card input:checked + label.ok   { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); }
.radio-card input:checked + label.ok::before { border: 5px solid var(--green-600); }
.radio-card input:checked + label.bad  { border-color: var(--red-600); background: var(--red-100); color: var(--red-600); }
.radio-card input:checked + label.bad::before { border: 5px solid var(--red-600); }
.radio-card input:focus-visible + label { box-shadow: 0 0 0 3px rgba(21,122,82,.2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-800); }
.btn-gold { background: var(--gold-500); color: var(--green-900); }
.btn-gold:hover:not(:disabled) { background: var(--gold-600); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--green-600); color: var(--green-700); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-block { width: 100%; height: 48px; font-size: .95rem; }
.btn-sm { height: 32px; padding: 0 11px; font-size: .8rem; border-radius: 8px; }
.btn-sm svg { width: 15px; height: 15px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn svg { width: 20px; height: 20px; }

.alert {
  padding: 11px 14px; border-radius: 10px; font-size: .86rem; margin-bottom: 16px;
  background: var(--red-100); color: var(--red-600); border: 1px solid #f3c2bb;
}
.alert.info { background: var(--blue-100); color: var(--blue-600); border-color: #c5d8f2; }
.alert.warn { background: var(--gold-100); color: #8a5b00; border-color: #f2d9a2; }

/* =====================================================================
   SHELL (sidebar + topbar)
   ===================================================================== */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 60;
  background: var(--green-900); color: #dfeee6; display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.sidebar .brand { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-group { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(223,238,230,.5);
  padding: 14px 10px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: inherit; text-decoration: none; font-size: .88rem; font-weight: 500; margin-bottom: 2px;
}
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--gold-500); color: var(--green-900); font-weight: 700; }
.nav a.active svg { opacity: 1; }
.nav a .count {
  margin-left: auto; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,.12);
}
.nav a.active .count { background: rgba(7,47,32,.15); }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.05); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--green-600); color: #fff; font-weight: 700; font-size: .85rem;
}
.user-chip .meta { min-width: 0; flex: 1; }
.user-chip .meta strong { display: block; font-size: .84rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .meta span { display: block; font-size: .72rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip button { background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 8px; opacity: .8; }
.user-chip button:hover { background: rgba(255,255,255,.1); opacity: 1; }
.user-chip button svg { width: 18px; height: 18px; display: block; }

.main { margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: rgba(244,247,245,.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .menu-btn { display: none; }
.topbar .crumb { font-size: .8rem; color: var(--ink-3); }
.topbar h1 { font-size: 1.05rem; font-weight: 700; }
.topbar .scope {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; background: var(--green-100); color: var(--green-800);
  max-width: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .scope svg { width: 15px; height: 15px; flex: none; }
.content { padding: 28px; max-width: 1400px; }
.overlay { display: none; }

/* =====================================================================
   CARDS / DASHBOARD
   ===================================================================== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 1rem; font-weight: 700; }
.card-head p { margin: 2px 0 0; font-size: .82rem; color: var(--ink-3); }
.card-body { padding: 22px; }

.welcome {
  border-radius: var(--radius); padding: 26px 28px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--green-800), var(--green-700));
  margin-bottom: 22px;
}
.welcome::after {
  content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,179,61,.35), transparent 70%);
}
.welcome h2 { font-size: 1.35rem; font-weight: 800; position: relative; z-index: 1; }
.welcome-logo { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 120px; height: 120px;
  object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; z-index: 1; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.welcome:has(.welcome-logo) { padding-right: 170px; }
.welcome p { margin: 6px 0 0; opacity: .85; max-width: 60ch; position: relative; z-index: 1; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; transition: border-color .15s;
}
a.stat:hover { border-color: var(--green-600); }
.stat .label { font-size: .8rem; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .dot { width: 9px; height: 9px; border-radius: 50%; }
.stat .value { font-size: 2rem; font-weight: 800; margin-top: 6px; line-height: 1.1; }
.stat .sub { font-size: .76rem; color: var(--ink-3); margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.flow-step { position: relative; padding: 4px 18px 4px 0; }
.flow-step:not(:last-child)::after {
  content: ''; position: absolute; top: 19px; left: 46px; right: 8px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--green-600) 0 6px, transparent 6px 11px);
}
.flow-step .num {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: var(--green-100); color: var(--green-800); position: relative; z-index: 1; margin-bottom: 10px;
}
.flow-step:last-child .num { background: var(--gold-500); color: var(--green-900); }
.flow-step strong { display: block; font-size: .9rem; }
.flow-step span { font-size: .8rem; color: var(--ink-3); }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: .84rem; margin-bottom: 6px; gap: 10px; }
.bar-row .top strong { font-variant-numeric: tabular-nums; }
.bar-track { height: 10px; border-radius: 99px; background: var(--green-50); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--green-600); transition: width .6s ease; }
.bar-row:nth-child(2) .bar-fill { background: var(--gold-500); }
.bar-row:nth-child(3) .bar-fill { background: #3f9c6e; }

/* =====================================================================
   TABLE
   ===================================================================== */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 380px; }
.toolbar .search input { padding-left: 38px; height: 40px; }
.toolbar .search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--ink-3); }
.toolbar .select { height: 40px; width: auto; min-width: 170px; flex: 0 1 auto; }
.toolbar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .87rem; }
table.data th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
  color: var(--ink-2); background: var(--green-50); padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid var(--line);
}
table.data td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:hover { background: #fafcfb; }
table.data td.num { color: var(--ink-3); width: 46px; }
.cell-name strong { display: block; font-weight: 700; }
.cell-name span { font-size: .78rem; color: var(--ink-3); }
.cell-sub { font-size: .78rem; color: var(--ink-3); display: block; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { padding: 56px 20px; text-align: center; color: var(--ink-3); }
.empty svg { width: 46px; height: 46px; color: var(--line); margin-bottom: 8px; }
.empty strong { display: block; color: var(--ink-2); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); }
.pager .pages { display: flex; gap: 4px; }
.pager button {
  min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: .82rem;
}
.pager button.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.gray  { background: #eef1ef; color: var(--ink-2); }
.badge.green { background: var(--green-100); color: var(--green-700); }
.badge.red   { background: var(--red-100); color: var(--red-600); }
.badge.gold  { background: var(--gold-100); color: #8a5b00; }
.cat-pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.cat-pill.c2 { background: var(--blue-100); color: var(--blue-600); border-color: #c5d8f2; }
.cat-pill.c3 { background: var(--gold-100); color: #8a5b00; border-color: #f2d9a2; }

/* =====================================================================
   FORM PAGE
   ===================================================================== */
.form-section { padding: 22px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.form-section > h3 { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.form-section > h3 .n { width: 26px; height: 26px; border-radius: 50%; background: var(--green-700); color: #fff; font-size: .78rem; display: grid; place-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px; background: var(--green-50); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(7,47,32,.45); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
  animation: fade .15s ease;
}
.modal {
  width: 100%; max-width: 760px; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(7,47,32,.3);
  animation: rise .2s ease;
}
.modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 1.08rem; font-weight: 800; }
.modal-head p { margin: 3px 0 0; font-size: .82rem; color: var(--ink-3); }
.modal-head .close { margin-left: auto; flex: none; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--green-50); border-radius: 0 0 16px 16px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

.dl { display: grid; grid-template-columns: 200px 1fr; gap: 0; font-size: .88rem; }
.dl dt { color: var(--ink-3); padding: 9px 0; border-bottom: 1px solid var(--line); }
.dl dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 500; word-break: break-word; }
.section-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--green-700); margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.section-title:first-child { margin-top: 0; }
.section-title .badge { text-transform: none; letter-spacing: 0; }
.doc-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.doc {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit; font-size: .83rem; font-weight: 600; transition: border-color .15s;
}
.doc:hover { border-color: var(--green-600); color: var(--green-700); }
.doc svg { width: 18px; height: 18px; color: var(--green-700); flex: none; }
.doc span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc.missing { color: var(--ink-3); border-style: dashed; pointer-events: none; }

.eval-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.existing { font-size: .76rem; margin-top: 5px; }

/* ---------- toast ---------- */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; min-width: 260px; max-width: 420px;
  background: var(--green-900); color: #fff; font-size: .88rem; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: rise .2s ease;
}
.toast.error { background: var(--red-600); }
.toast svg { width: 20px; height: 20px; flex: none; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-mobile-brand { display: flex; }

  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 12px 0 40px rgba(0,0,0,.25); }
  .shell.nav-open .overlay { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(7,47,32,.4); }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .topbar .menu-btn { display: grid; }
  .content { padding: 18px 16px; }
}
@media (max-width: 720px) {
  .topbar .scope { display: none; }
  .form-grid, .eval-grid, .doc-list { grid-template-columns: 1fr; }
  .form-section, .card-body, .modal-body { padding: 18px 16px; }
  .card-head, .toolbar, .pager, .form-actions, .modal-foot, .modal-head { padding-left: 16px; padding-right: 16px; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .toolbar .select { flex: 1 1 140px; min-width: 0; font-size: .85rem; padding-left: 12px; }
  .flow { grid-template-columns: 1fr; gap: 14px; }
  .flow-step { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; padding: 0; }
  .flow-step .num { margin: 0; grid-row: span 2; }
  .flow-step:not(:last-child)::after { display: none; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; font-size: .78rem; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-height: 94vh; overflow-y: auto; }
  .modal-foot { border-radius: 0; }
  .welcome, .welcome:has(.welcome-logo) { padding: 20px; }
  .welcome-logo { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat .value { font-size: 1.6rem; }
  .radio-cards { grid-template-columns: 1fr; }
  .form-actions .btn, .modal-foot .btn { flex: 1; }

  /* tabel -> kartu */
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  table.data td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
  table.data td::before { content: attr(data-label); font-size: .74rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
  table.data td.num { display: none; }
  table.data td.cell-main { grid-template-columns: 1fr; }
  table.data td.cell-main::before { display: none; }
  table.data td.cell-actions { grid-template-columns: 1fr; padding-top: 10px; }
  table.data td.cell-actions::before { display: none; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}

/* ---------- tambahan v2 ---------- */
.ss-native { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; clip: rect(0 0 0 0); }
.field { position: relative; }
table.data tr[hidden] { display: none !important; }
.confirm-backdrop { z-index: 150; align-items: center; }
#page { transition: opacity .15s; }
.sidebar .brand-logo { box-shadow: 0 0 0 3px rgba(242,179,61,.35); }
@media (max-width: 720px) {
  .confirm-backdrop { align-items: flex-end; }
}
