:root {
  --bg: #f7f9fb;
  --surface: #fff;
  --line: #dfe6ee;
  --line-2: #edf1f5;
  --text: #111827;
  --muted: #64748b;
  --green: #006b45;
  --green-2: #008656;
  --green-soft: #e8f7ef;
  --red: #ef4444;
  --red-soft: #fee2e2;
  --orange: #f59e0b;
  --orange-soft: #fff2d8;
  --blue: #2563eb;
  --blue-soft: #e8f1ff;
  --purple: #6d5dfc;
  --purple-soft: #efedff;
  --shadow: 0 10px 26px rgba(15, 23, 42, .07);
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); margin: 0; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.material-symbols-rounded { font-family: "Material Symbols Rounded"; font-feature-settings: "liga"; line-height: 1; vertical-align: middle; }

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: radial-gradient(circle at 20% 10%, rgba(34, 197, 94, .25), transparent 34%), linear-gradient(180deg, #004b35, #003725);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
  padding: 28px 14px 18px;
  position: sticky;
  top: 0;
}

.brand-lockup {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px 1fr;
  padding: 0 10px;
}

.brand-lockup img { height: 54px; object-fit: contain; width: 58px; }
.brand-lockup strong { display: block; font-size: 24px; font-weight: 800; line-height: 1; }
.brand-lockup span { color: #e4fff2; display: block; font-size: 11px; font-weight: 700; margin-top: 4px; }
.product-name { border-bottom: 1px solid rgba(255,255,255,.35); font-size: 21px; font-weight: 800; padding: 8px 10px 18px; }
.nav-label { color: rgba(255,255,255,.72); font-size: 11px; font-weight: 800; padding: 0 10px; text-transform: uppercase; }
.nav { display: grid; gap: 9px; }
.nav a, .logout {
  align-items: center;
  border: 0;
  border-radius: 8px;
  color: #f4fff9;
  display: grid;
  font-size: 14px;
  font-weight: 750;
  gap: 12px;
  grid-template-columns: 28px 1fr;
  min-height: 50px;
  padding: 0 13px;
}
.nav a:hover, .nav a.active { background: rgba(28, 185, 112, .35); box-shadow: inset 3px 0 0 #32d583; }
.nav .material-symbols-rounded, .logout .material-symbols-rounded { font-size: 24px; }
.sidebar-footer { display: grid; gap: 12px; margin-top: auto; }
.sidebar-user {
  align-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 40px 1fr 18px;
  padding: 12px;
}
.sidebar-user strong { display: block; font-size: 13px; }
.sidebar-user span:not(.material-symbols-rounded) { color: #defdec; display: block; font-size: 11px; line-height: 1.35; }
.user-avatar { color: #006b45; font-size: 40px; }
.sidebar-user .user-avatar { color: #fff; }
.logout { background: transparent; cursor: pointer; text-align: left; width: 100%; }
.logout:hover { background: rgba(255,255,255,.1); }

.main { min-width: 0; padding: 0 28px 44px; }
.topbar {
  align-items: center;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 -28px 24px;
  min-height: 80px;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { font-size: 27px; font-weight: 800; letter-spacing: 0; margin: 0; }
.topbar-actions { align-items: center; display: flex; gap: 20px; }
.top-search {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 26px minmax(220px, 1fr);
  height: 48px;
  min-width: 380px;
  padding: 0 14px;
}
.top-search .material-symbols-rounded { color: var(--muted); font-size: 23px; }
.top-search input { border: 0; height: 44px; outline: 0; padding: 0; }
.notification-button {
  background: transparent;
  border: 0;
  color: #334155;
  cursor: pointer;
  position: relative;
}
.notification-button strong {
  align-items: center;
  background: #dc2626;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  height: 16px;
  justify-content: center;
  position: absolute;
  right: -4px;
  top: -5px;
  width: 16px;
}
.top-user { align-items: center; display: grid; gap: 10px; grid-template-columns: 42px 1fr 18px; }
.top-user strong { display: block; font-size: 13px; }
.top-user span:not(.material-symbols-rounded) { color: var(--muted); display: block; font-size: 11px; }

h2 { color: #005c3d; font-size: 18px; font-weight: 800; margin: 0 0 14px; }
h3 { font-size: 14px; margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 13px; font-weight: 600; }
.breadcrumb { color: var(--muted); font-size: 12px; font-weight: 700; margin: -8px 0 16px; }
.breadcrumb span { margin: 0 8px; }

.panel, .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  padding: 20px;
}
.page-actions { display: flex; justify-content: flex-end; margin: -4px 0 14px; }
.grid { display: grid; gap: 16px; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.simple-dashboard { display: grid; gap: 16px; }
.simple-hero { align-items: center; display: flex; justify-content: space-between; }
.metric-card, .summary-card, .summary-mini {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric-card { min-height: 132px; padding: 20px; }
.metric-card span, .metric-card small { color: var(--muted); display: block; font-size: 12px; font-weight: 700; }
.metric-card strong { display: block; font-size: 34px; margin: 16px 0 8px; }

.button {
  align-items: center;
  background: linear-gradient(180deg, #008a5a, #006b45);
  border: 1px solid #006b45;
  border-radius: 8px;
  box-shadow: 0 10px 18px rgba(0, 107, 69, .2);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}
.button.secondary { background: #fff; border-color: #b9c9c1; box-shadow: none; color: #005c3d; }
.button.danger { background: #fff; border-color: var(--red); box-shadow: none; color: var(--red); }
.button.compact { font-size: 12px; min-height: 34px; padding: 0 14px; }
.button.tiny { font-size: 12px; min-height: 32px; padding: 0 11px; }
.button .material-symbols-rounded { font-size: 20px; }

.filter-panel { margin-bottom: 22px; }
.filter-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pengajuan-filter { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { color: #0f172a; display: grid; font-size: 12px; font-weight: 800; gap: 8px; }
input, select, textarea {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  color: var(--text);
  min-height: 44px;
  padding: 0 13px;
  width: 100%;
}
textarea { min-height: 92px; padding: 12px 13px; resize: vertical; }
.filter-actions { align-items: end; display: flex; gap: 12px; grid-column: 1 / -1; }

.summary-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}
.summary-grid.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.summary-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 72px 1fr;
  min-height: 126px;
  padding: 20px;
}
.summary-card > .material-symbols-rounded, .summary-mini > .material-symbols-rounded {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 34px;
  height: 62px;
  justify-content: center;
  width: 62px;
}
.summary-card p, .summary-mini p { font-size: 13px; font-weight: 750; margin: 0; }
.summary-card strong { color: var(--green); display: block; font-size: 30px; line-height: 1.1; margin: 5px 0; }
.summary-card small { color: var(--muted); font-size: 12px; font-weight: 600; }
.summary-card.green > .material-symbols-rounded, .summary-mini.green > .material-symbols-rounded { background: var(--green-soft); color: var(--green); }
.summary-card.orange > .material-symbols-rounded, .summary-mini.orange > .material-symbols-rounded { background: var(--orange-soft); color: var(--orange); }
.summary-card.blue > .material-symbols-rounded, .summary-mini.blue > .material-symbols-rounded { background: var(--blue-soft); color: var(--blue); }
.summary-card.red > .material-symbols-rounded, .summary-mini.red > .material-symbols-rounded { background: var(--red-soft); color: var(--red); }
.summary-mini.purple > .material-symbols-rounded { background: var(--purple-soft); color: var(--purple); }
.summary-mini { display: grid; justify-items: center; min-height: 104px; padding: 14px; text-align: center; }
.summary-mini > .material-symbols-rounded { font-size: 25px; height: 42px; width: 42px; }
.summary-mini strong { font-size: 22px; line-height: 1; }

.table-wrap { overflow-x: auto; }
table { border-collapse: separate; border-spacing: 0; min-width: 900px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); font-size: 13px; padding: 14px 12px; text-align: left; vertical-align: middle; }
th { background: #fafbfc; color: #1f2937; font-size: 11px; font-weight: 800; }
tbody tr:last-child td { border-bottom: 0; }
.data-panel h2 { margin-bottom: 18px; }
.data-table strong { font-weight: 800; }
.compact-data-table { min-width: 680px; }
.table-actions { align-items: center; display: flex; gap: 8px; white-space: nowrap; }
.table-footer { align-items: center; color: var(--muted); display: flex; font-size: 13px; font-weight: 650; justify-content: space-between; margin-top: 14px; }
.empty-state { color: var(--muted); font-weight: 700; text-align: center; }
nav[role="navigation"] { align-items: center; display: flex; gap: 8px; justify-content: flex-end; }
nav[role="navigation"] svg { height: 18px; width: 18px; }

.badge, .status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  min-height: 24px;
  padding: 4px 10px;
  white-space: nowrap;
}
.badge.ok, .status.ok { background: #dff7e8; color: #047857; }
.badge.warn, .status.warn { background: #fff1d6; color: #d97706; }
.badge.soft-warn { background: #ffedd5; color: #c2410c; }
.badge.danger, .status.danger { background: #ffe1e1; color: #dc2626; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.neutral { background: #eef2f7; color: #475569; }
.notice, .errors {
  border-radius: 8px;
  font-weight: 750;
  margin: 0 0 16px;
  padding: 13px 15px;
}
.notice { background: var(--green-soft); border: 1px solid #c0ead4; color: #065f46; }
.notice.soft { align-items: center; display: flex; gap: 10px; }
.errors { background: var(--red-soft); border: 1px solid #fecaca; color: #b91c1c; }

.check-card { margin-bottom: 12px; }
.inline-check-form, .inline-search {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 16px;
}
.form-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr);
}
.form-section h2 { margin-bottom: 14px; }
.field-grid { display: grid; gap: 14px 16px; }
.field-grid.one { grid-template-columns: 1fr; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-all { grid-column: 1 / -1; }
.sticky-actions {
  align-items: center;
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--line);
  bottom: 0;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin: 20px -28px -44px;
  padding: 16px 34px;
  position: sticky;
  z-index: 15;
}

.profile-hero {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, .9fr) auto;
  margin-bottom: 18px;
}
.profile-main { align-items: center; display: grid; gap: 18px; grid-template-columns: 104px 1fr; }
.avatar-xl {
  align-items: center;
  background: var(--green-soft);
  border-radius: 999px;
  color: var(--green);
  display: flex;
  height: 104px;
  justify-content: center;
  width: 104px;
}
.avatar-xl .material-symbols-rounded { font-size: 72px; }
.profile-main h2 { color: var(--text); font-size: 24px; margin: 0 0 8px; }
.profile-main p { color: #334155; font-size: 16px; margin: 0; }
.hero-meta, .info-list { display: grid; gap: 12px; margin: 0; }
.hero-meta div, .info-list div { display: grid; gap: 12px; grid-template-columns: 150px 1fr; }
.hero-meta dt, .info-list dt { color: #334155; font-size: 12px; font-weight: 750; }
.hero-meta dd, .info-list dd { font-size: 13px; font-weight: 700; margin: 0; }
.hero-actions { display: flex; gap: 12px; }
.detail-tabs { margin-bottom: 18px; }
.tabbar { border-bottom: 1px solid var(--line); display: flex; gap: 28px; margin: -20px -20px 18px; padding: 0 20px; }
.tabbar a { border-bottom: 3px solid transparent; font-size: 14px; font-weight: 750; padding: 17px 0; }
.tabbar a.active { border-color: var(--green); color: var(--green); }
.detail-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini-panel { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.mini-panel h3 { align-items: center; color: #064e3b; display: flex; gap: 8px; }
.three-column { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); }
.doc-list, .audit-list { display: grid; gap: 10px; }
.doc-list div {
  align-items: center;
  border-bottom: 1px solid var(--line-2);
  display: grid;
  gap: 10px;
  grid-template-columns: 26px 1fr auto;
  padding: 10px 0;
}
.doc-list p { font-size: 13px; font-weight: 750; margin: 0; }
.doc-list small, .audit-list time { color: var(--muted); font-size: 11px; font-weight: 650; }
.audit-list div { border-bottom: 1px solid var(--line-2); padding: 10px 0; }
.audit-list strong { display: block; font-size: 13px; margin: 3px 0; }
.audit-list p { color: var(--muted); font-size: 12px; margin: 0; }

.section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head h2 { margin-bottom: 4px; }
.section-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.bansos-panel { margin-bottom: 18px; }
.bansos-grid { display: grid; gap: 16px; grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr); }
.bansos-result {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 64px 1fr;
  padding: 16px;
}
.bansos-icon {
  align-items: center;
  border-radius: 999px;
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}
.bansos-icon.ok { background: var(--green-soft); color: var(--green); }
.bansos-icon.warn { background: var(--orange-soft); color: var(--orange); }
.bansos-icon.danger { background: var(--red-soft); color: var(--red); }
.bansos-icon.neutral { background: #eef2f7; color: #475569; }
.bansos-icon .material-symbols-rounded { font-size: 32px; }
.bansos-title-row { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 14px; }
.bansos-title-row strong { font-size: 20px; }
.bansos-facts { display: grid; gap: 10px; margin: 0 0 14px; }
.bansos-facts div { display: grid; gap: 10px; grid-template-columns: 118px 1fr; }
.bansos-facts dt { color: #334155; font-size: 12px; font-weight: 750; }
.bansos-facts dd { font-size: 13px; font-weight: 750; margin: 0; }
.bansos-result-main p { color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.55; margin: 0; }
.bansos-history {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 16px;
}
.bansos-history h3 { align-items: center; color: #064e3b; display: flex; gap: 8px; }

.create-pengajuan-grid { display: grid; gap: 18px; grid-template-columns: minmax(330px, .8fr) minmax(0, 1.2fr); }
.left-stack { display: grid; gap: 18px; }
.selected-person {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr auto;
  margin-top: 14px;
  padding: 13px;
}
.selected-person.large { grid-template-columns: 52px 1fr; }
.selected-person .material-symbols-rounded { color: var(--green); font-size: 38px; }
.selected-person strong { display: block; font-size: 13px; }
.selected-person small { color: var(--muted); display: block; font-size: 11px; line-height: 1.45; }
.warning-box {
  align-items: start;
  background: #fff8e8;
  border: 1px solid #f8d38a;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr;
  margin-top: 18px;
  padding: 14px;
}
.warning-box .material-symbols-rounded { color: var(--orange); }
.warning-box strong { display: block; font-size: 13px; margin-bottom: 5px; }
.warning-box p { color: #5f4310; font-size: 12px; margin: 0; }
.submission-hero {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1.1fr);
  margin-bottom: 14px;
}
.submission-title { align-items: center; display: grid; gap: 16px; grid-template-columns: 58px 1fr; }
.hero-icon {
  align-items: center;
  background: var(--blue-soft);
  border-radius: 8px;
  color: var(--blue);
  display: flex;
  font-size: 34px;
  height: 58px;
  justify-content: center;
  width: 58px;
}
.submission-title h2 { color: var(--text); font-size: 22px; margin: 0 0 8px; }
.submission-title p { font-size: 14px; margin: 3px 0; }
.submission-title small { color: var(--muted); font-size: 12px; }
.timeline { align-items: center; display: grid; grid-template-columns: repeat(5, 1fr); }
.timeline div { color: var(--muted); display: grid; gap: 7px; justify-items: center; position: relative; }
.timeline div::after { background: #cbd5e1; content: ""; height: 2px; left: 55%; position: absolute; top: 11px; width: 90%; }
.timeline div:last-child::after { display: none; }
.timeline .done { color: var(--green); }
.timeline .current { color: var(--blue); }
.timeline span { background: #fff; font-size: 22px; position: relative; z-index: 1; }
.timeline small { font-size: 11px; font-weight: 750; }
.detail-two-col { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.approval-panel { margin-bottom: 18px; }
.approval-box {
  background: #fff8e8;
  border: 1px solid #f9d58d;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto;
  padding: 18px;
}
.approval-box p { color: #4b5563; font-size: 13px; margin: 0; }
.approval-actions { display: flex; gap: 10px; }
.approval-box label { grid-column: 1 / -1; }
form.inline { display: inline; }

@media (max-width: 1280px) {
  .summary-grid, .summary-grid.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .form-layout, .profile-hero, .submission-hero, .create-pengajuan-grid, .detail-two-col, .three-column, .bansos-grid { grid-template-columns: 1fr; }
  .top-search { min-width: 280px; }
}

@media (max-width: 900px) {
  .app { display: block; }
  .mobile-menu-btn { display: block !important; }
  .close-sidebar-btn { display: block !important; }
  .sidebar { 
      position: fixed; 
      left: -300px; 
      top: 0; 
      bottom: 0; 
      width: 280px; 
      z-index: 1000; 
      transition: left 0.3s ease; 
      min-height: 100vh;
      box-shadow: 4px 0 24px rgba(0,0,0,0.5);
  }
  .sidebar.active { left: 0; }
  .main { padding: 0 14px 30px; }
  .topbar { align-items: flex-start; flex-direction: column; margin: 0 -14px 18px; padding: 16px; gap: 12px; }
  .topbar-actions { align-items: stretch; flex-direction: column; width: 100%; gap: 12px; }
  .top-search { min-width: 0; width: 100%; }
  .filter-grid, .pengajuan-filter, .summary-grid, .summary-grid.six, .metrics, .field-grid.two, .field-grid.three { grid-template-columns: 1fr; }
  .profile-main, .selected-person, .submission-title { grid-template-columns: 1fr; }
  .hero-actions, .approval-actions, .sticky-actions, .table-footer, .section-head, .section-actions { align-items: stretch; flex-direction: column; }
  .section-actions form { display: grid; }
  .bansos-result { grid-template-columns: 1fr; }
  .sticky-actions { margin: 20px -14px -30px; padding: 14px; }
}
