@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@500,600,700,800&display=swap');

:root {
  --sidebar-bg: #0a3a2a;
  --sidebar-active-line: #4ade80;
  --sidebar-bg-hover: rgba(255,255,255,0.05);
  --sidebar-text: #c9ded8;
  --sidebar-text-dim: #8bafa6;
  --topbar-bg: #ffffff;
  --accent: #2563eb;
  --accent-dark: #04403c;
  --amber: #fbbf24;
  --amber-text: #0f172a;
  --danger: #dc2626;
  --warn: #d97706;
  --ok: #047857;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --font-display: 'Cabinet Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --sidebar-width: 250px;
  --radius: 0px;
  --radius-btn: 0px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.label-mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- App shell (sidebar + topbar) ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow: hidden;
  z-index: 20;
}
.sidebar-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-brand-icon .icon { width: 22px; height: 22px; color: #fff; }
.sidebar-brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sidebar-brand-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.25; color: #fff; }
.sidebar-brand-sub {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--sidebar-text-dim);
}
.sidebar-nav { padding: 12px 10px; flex: 1; min-height: 0; overflow-y: auto; }
.nav-section-label {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sidebar-text-dim);
  padding: 18px 12px 8px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-left: 2px solid transparent;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 15px;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: var(--sidebar-bg-hover); color: #fff; }
.sidebar-nav a.active {
  background: rgba(255,255,255,0.08);
  border-left-color: var(--sidebar-active-line);
  color: #fff;
}

/* ---------- Unit Sekolah: dikelompokkan per kampus, lalu per unit (details/summary bersarang, tanpa JS) ---------- */
.nav-campus { margin-bottom: 2px; }
.nav-campus > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  color: var(--sidebar-text); font-size: 14px; font-weight: 400; list-style: none;
}
.nav-campus > summary::-webkit-details-marker { display: none; }
.nav-campus > summary:hover { background: var(--sidebar-bg-hover); color: #fff; }
.nav-campus > summary .icon:last-child { margin-left: auto; width: 14px; height: 14px; transition: transform 0.15s ease; }
.nav-campus[open] > summary .icon:last-child { transform: rotate(180deg); }
.nav-campus .nav-unit summary { padding-left: 22px; font-size: 13px; }
.nav-campus .nav-unit a { padding-left: 34px; }

.nav-unit { margin-bottom: 2px; }
.nav-unit summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  color: var(--sidebar-text); font-size: 14px; list-style: none;
}
.nav-unit summary::-webkit-details-marker { display: none; }
.nav-unit summary:hover { background: var(--sidebar-bg-hover); color: #fff; }
.nav-unit summary span, .nav-unit summary { }
.nav-unit summary .icon:last-child { margin-left: auto; width: 14px; height: 14px; transition: transform 0.15s ease; }
.nav-unit[open] summary .icon:last-child { transform: rotate(180deg); }
.nav-unit a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 27px;
  border-left: 2px solid transparent;
  color: var(--sidebar-text-dim); text-decoration: none; font-size: 13px; margin-bottom: 1px;
}
.nav-unit a:hover { background: var(--sidebar-bg-hover); color: #fff; }
.nav-unit a.active {
  background: rgba(255,255,255,0.08);
  border-left-color: var(--sidebar-active-line);
  color: #fff;
}
/* ---------- Sidebar bottom: backup, language, signed-in-as, logout (fixed, does not scroll with nav) ---------- */
.sidebar-bottom { flex-shrink: 0; border-top: 1px solid rgba(255,255,255,0.08); padding: 14px 10px 18px; }

.sidebar-backup-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-bottom: 14px;
  background: var(--amber); color: var(--amber-text);
  font-weight: 700; font-size: 15px;
  padding: 14px 12px; text-decoration: none;
}
.sidebar-backup-btn:hover { background: #fcd34d; }

.sidebar-lang { padding: 0 2px; margin-bottom: 14px; }
.sidebar-lang .nav-section-label { padding: 0 0 8px; }
.sidebar-lang-toggle { display: flex; gap: 2px; }
.sidebar-lang-toggle a {
  padding: 5px 12px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--sidebar-text-dim); text-decoration: none;
}
.sidebar-lang-toggle a:hover { color: #fff; }
.sidebar-lang-toggle a.active { background: #fff; color: var(--sidebar-bg); }

.sidebar-user { border-top: 1px solid rgba(255,255,255,0.08); padding: 14px 2px 0; }
.sidebar-user .nav-section-label { padding: 0 0 4px; }
.sidebar-user-name { font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 12px; color: var(--sidebar-text-dim); margin-top: 1px; }

.sidebar-logout { padding-top: 10px; }
.sidebar-logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  color: var(--sidebar-text-dim);
  border: none;
  padding: 8px 2px;
  cursor: pointer;
  font-size: 14px;
}
.sidebar-logout button:hover { color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--topbar-bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.sidebar-toggle { display: none; background: transparent; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px; width: auto; }
.topbar-title { flex: 1; margin-bottom: 0; font-size: 12px; letter-spacing: 0.18em; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.bell { position: relative; color: var(--muted); display: flex; }
.bell:hover { color: var(--text); }
.bell-badge {
  position: absolute; top: -6px; right: -8px;
  background: #e11d48; color: white; font-size: 10px; font-weight: 700;
  border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.lang-toggle { display: flex; align-items: center; gap: 2px; border: 1px solid var(--border); padding: 2px; }
.lang-toggle a {
  padding: 4px 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  background: transparent; color: var(--muted); text-decoration: none;
}
.lang-toggle a:hover { color: var(--text); }
.lang-toggle a.active { background: var(--accent-dark); color: #fff; }
.topbar-dept { font-size: 13px; color: var(--muted); }
.user-avatar-link { display: flex; text-decoration: none; }
.user-avatar-sq {
  width: 32px; height: 32px;
  background: var(--accent-dark); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 12px;
}

main {
  max-width: none;
  width: 100%;
  padding: 40px 48px 56px;
}
body:not(:has(.app-shell)) main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

/* ---------- Page header, chip, icon buttons (gaya Aset Manajemen) ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head h1 { margin-bottom: 20px; }
.page-head-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.page-head-actions .btn { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.chip { display: inline-block; padding: 4px 12px; background: #f1f5f9; border: 1px solid var(--border); font-size: 13px; color: var(--text); }
td.td-actions { white-space: nowrap; }
td.td-actions form.inline { margin: 0; }
button.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin: 0 2px 0 0;
  background: transparent; color: var(--muted); border: none;
}
button.icon-btn:hover { background: #f1f5f9; color: var(--text); }
button.icon-btn.danger { color: var(--danger); background: transparent; }
button.icon-btn.danger:hover { background: #fee2e2; }

/* ---------- Cards & content ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 24px;
}
h1 { font-family: var(--font-display); font-weight: 700; font-size: 38px; line-height: 1.1; letter-spacing: -0.02em; margin: 4px 0 24px; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }

/* ---------- Dashboard header (eyebrow + title) ---------- */
.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

/* ---------- Dashboard cards: icon + big number ---------- */
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.card-head h2 { margin: 0; }
.icon-chip { flex-shrink: 0; display: flex; color: var(--muted); }
.icon-chip .icon { width: 20px; height: 20px; }
.kpi-number { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin: 6px 0 2px; color: var(--accent-dark); }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap table { min-width: 760px; }
.table-wrap td, .table-wrap th { white-space: nowrap; }
.table-wrap td.wrap { white-space: normal; }
.table-wrap .col-kegiatan { min-width: 280px; }
.table-wrap .col-waktu { max-width: 200px; }
.table-wrap .col-keterangan { min-width: 200px; }
.table-wrap .col-tujuan { min-width: 200px; max-width: 320px; word-break: break-word; }
.table-wrap .col-uraian { min-width: 220px; max-width: 300px; word-break: break-word; }
th, td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--card); padding-top: 22px; padding-bottom: 22px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-family: var(--font-mono); font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f8fafc; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 0; font-size: 12px; font-weight: 500; }
.badge.status-DRAFT { background: #e5e7eb; color: #374151; }
.badge.status-SUBMITTED, .badge.status-MENUNGGU_YAYASAN, .badge.status-MENUNGGU_MPM, .badge.status-REVIEW { background: #dbeafe; color: #1e40af; }
.badge.status-APPROVED_ICT, .badge.status-APPROVED_KEPSEK, .badge.status-APPROVED_YAYASAN, .badge.status-APPROVED, .badge.status-ACTIVE { background: #d1fae5; color: var(--ok); }
.badge.status-PENDING_RAB, .badge.status-PENDING_YAYASAN { background: #fef3c7; color: var(--warn); }
.badge.status-REVISI { background: #fef9c3; color: #854d0e; }
.badge.status-REJECTED, .badge.status-EXPIRED { background: #fee2e2; color: var(--danger); }
.badge.status-NEW_ORDER { background: #e5e7eb; color: #374151; }
.badge.status-PARTIALLY_RECEIVED { background: #fef3c7; color: var(--warn); }
.badge.status-DAMAGED_LOST { background: #fee2e2; color: var(--danger); }
form.inline { display: inline; }
input, select, textarea, button {
  font-size: 15px;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--card);
  width: 100%;
  font-family: inherit;
}
label { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(4,64,60,0.2); outline-offset: 0; border-color: var(--accent-dark); }
.field-row { display: flex; gap: 8px; align-items: center; }
.field-row-total { background: #f8fafc; color: var(--muted); flex: 0 0 40%; }
button, .btn {
  background: var(--accent-dark);
  color: white;
  border: 1px solid transparent; /* sama tebal dengan .secondary supaya tinggi tombol seragam */
  cursor: pointer;
  width: auto;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  display: inline-block;
  text-decoration: none;
  margin-right: 6px;
  margin-top: 6px;
  font-weight: 600;
}
button:hover, .btn:hover { background: #063530; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { margin: 0; }
button.secondary, .btn.secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
button.secondary:hover, .btn.secondary:hover { background: #f1f5f9; }
button.danger, .btn.danger { background: var(--danger); }
button.danger:hover, .btn.danger:hover { background: #b91c1c; }
button.amber, .btn.amber { background: var(--amber); color: var(--amber-text); }
button.amber:hover, .btn.amber:hover { background: #fcd34d; }
.errors { background: #fee2e2; border: 1px solid #fecaca; padding: 12px; margin-bottom: 16px; }
.errors li { margin-bottom: 4px; }

dialog {
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  color: var(--text);
  padding: 32px;
  width: min(600px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
dialog::backdrop { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(2px); }
dialog h2 { margin: 0 0 20px; font-size: 22px; font-weight: 700; }
dialog input[disabled] { background: #f1f5f9; color: var(--muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.modal-actions button, .modal-actions .btn { margin: 0; }

/* Kartu KPI — kartu putih, angka besar */
.stat { display: flex; gap: 1px; flex-wrap: wrap; background: var(--border); border: 1px solid var(--border); }
.stat .box {
  flex: 1; min-width: 180px;
  background: var(--card);
  color: var(--text);
  padding: 24px 26px;
}
.stat .box .num { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--accent-dark); }
.stat .box .muted { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

.muted { color: var(--muted); font-size: 13px; }
img.thumb { max-width: 80px; max-height: 80px; border-radius: 4px; }

/* ---------- Tabel interaktif (data-table.js): toolbar, urutkan, paginasi ---------- */
.dt-wrapper { margin-top: 4px; }
.dt-table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--border); }
.dt-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dt-pagesize { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dt-pagesize select { width: auto; padding: 6px 8px; }
.dt-search input { width: 360px; max-width: 100%; }
.dt-table-scroll td, .dt-table-scroll th { white-space: nowrap; }
.dt-buttons { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dt-buttons .dt-btn { margin: 0; padding: 8px 12px; font-size: 13px; }
.dt-colvis-holder { position: relative; display: inline-block; }
.dt-colvis-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1); padding: 8px; z-index: 30; min-width: 180px;
}
.dt-colvis-menu label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 13px; margin: 0; padding: 6px 4px; }
.dt-colvis-menu input[type="checkbox"] { width: auto; }
table.dt-sortable-table, .dt-wrapper table {}
th.dt-sortable { cursor: pointer; user-select: none; }
th.dt-sortable::after { content: '\2195'; opacity: 0.35; margin-left: 4px; font-size: 11px; }
th.dt-sort-asc::after { content: '\2191'; opacity: 1; }
th.dt-sort-desc::after { content: '\2193'; opacity: 1; }
tr.dt-col-search-row th { background: var(--card); padding: 4px 8px 10px; }
tr.dt-col-search-row input { padding: 6px 8px; font-size: 12px; }
.dt-pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dt-pager-nav { display: flex; align-items: center; gap: 10px; }
.dt-pager-nav button { margin: 0; padding: 6px 12px; font-size: 13px; background: var(--accent-dark); }
.dt-pager-nav button:disabled { background: #cbd5e1; cursor: not-allowed; }
.dt-pager-page { color: var(--text); font-weight: 600; }
@media (max-width: 700px) {
  .dt-toolbar { flex-direction: column; align-items: stretch; }
  .dt-search input { width: 100%; }
  .dt-buttons { margin-left: 0; justify-content: flex-end; }
  tr.dt-col-search-row { display: none; }
}

@media (max-width: 1200px) {
  main { padding: 28px 24px 40px; }
  .topbar { padding: 16px 24px; }
  h1 { font-size: 30px; }
  th, td { padding: 14px 14px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: 2px 0 12px rgba(0,0,0,0.2); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-block; }
}
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { margin-bottom: 12px; border: 1px solid var(--border); padding: 8px; }
  td { border: none; padding: 4px 0; }
  td::before { content: attr(data-label) ": "; font-weight: 600; }
  .topbar { padding: 12px 16px; }
  .topbar-dept { display: none; }
}

/* ---------- Halaman autentikasi (login, lupa & reset kata sandi) ---------- */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; position: relative;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(4,64,60,0.10), transparent 60%),
    radial-gradient(700px 420px at 100% 110%, rgba(37,99,235,0.08), transparent 60%),
    var(--bg);
}
.auth-page::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url('/images/auth-watermark.svg') center / 420px 420px repeat;
  opacity: 0.09;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, transparent 0%, #000 100%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, transparent 0%, #000 100%);
}
.auth-box { position: relative; z-index: 1; }
.auth-lang { position: absolute; z-index: 1; top: 20px; right: 20px; background: var(--card); }
.auth-box { width: 100%; max-width: 420px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 22px; }
.auth-brand img { width: 44px; height: 44px; object-fit: contain; }
.auth-brand-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.2; }
.auth-brand-sub { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); margin-top: 3px; }
.auth-card {
  background: var(--card); border: 1px solid var(--border);
  border-top: 3px solid var(--accent-dark);
  padding: 32px 32px 28px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.07);
}
.auth-eyebrow { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.auth-title { margin: 6px 0 6px; font-size: 28px; }
.auth-sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }
.auth-card label { margin-top: 16px; }
.auth-card input:focus { outline: 2px solid rgba(4,64,60,0.25); outline-offset: 0; border-color: var(--accent-dark); }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.auth-link { color: var(--accent-dark); font-size: 13px; font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 1px; top: 1px; bottom: 1px; margin: 0; padding: 0 12px;
  background: transparent !important; border: none; color: var(--muted); display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--text); }
.auth-submit { display: block; width: 100%; margin: 24px 0 0; padding: 12px 16px; text-align: center; font-size: 14px; }
.auth-alt { text-align: center; margin: 20px 0 0; }
.auth-success { background: #dcfce7; border: 1px solid #bbf7d0; color: #15803d; padding: 12px; margin: 14px 0 6px; font-size: 14px; line-height: 1.5; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .auth-lang { top: 12px; right: 12px; }
}

/* ---------- Toolbar tabel ala Aset Manajemen: satu kotak cari berikon, tanpa baris cari per kolom ---------- */
tr.dt-col-search-row { display: none; }
.dt-search input {
  padding-left: 44px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 14px center;
}

/* ---------- Penyempurnaan halaman: tabel di dalam kartu, tombol kecil, tautan Buka ---------- */
.card .dt-table-scroll { border: none; background: none; }
.card .table-wrap { border: none; background: none; }
.muted.lead { margin: -4px 0 24px; font-size: 14px; max-width: 760px; }
.page-head + .muted.lead { margin-top: 0; }
button.sm, .btn.sm { padding: 8px 14px; font-size: 13px; }
a.link-open { display: inline-block; padding: 7px 14px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
a.link-open:hover { background: #f1f5f9; }
td a:not(.link-open):not(.btn) { color: var(--accent-dark); font-weight: 500; }

/* ---------- Jadwal siklus bertahap ---------- */
.jadwal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .jadwal-grid { grid-template-columns: 1fr; } }
.jadwal-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.jadwal-list li { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; white-space: normal; }
.jadwal-dot { width: 8px; height: 8px; flex-shrink: 0; background: #cbd5e1; align-self: center; }
.jadwal-SELESAI .jadwal-dot { background: var(--ok); }
.jadwal-BERJALAN .jadwal-dot { background: var(--amber); }
.jadwal-SELESAI { color: var(--muted); }
.jadwal-date { font-family: var(--font-mono); font-size: 12px; min-width: 82px; }
.jadwal-BERJALAN .jadwal-label { font-weight: 600; }
td.td-jadwal { min-width: 340px; }
.jadwal-wide { font-size: 14px; margin-top: 8px; }
.jadwal-wide li { padding: 6px 0; }
.status-MENUNGGU_KAMPUS, .status-MENUNGGU_YAYASAN { background: #dbeafe; color: #1e40af; }
.status-DITOLAK_KAMPUS, .status-DITOLAK_YAYASAN { background: #fee2e2; color: var(--danger); }
.status-DISETUJUI { background: #d1fae5; color: var(--ok); }

/* ---------- Garis waktu jadwal siklus (gaya Gantt) ---------- */
.gantt { --gantt-label: 250px; }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12.5px; color: var(--muted); margin: 6px 0 18px; }
.gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 14px; height: 8px; }
.lg-SELESAI { background: var(--ok); }
.lg-BERJALAN { background: var(--amber); }
.lg-AKAN_DATANG { background: #cbd5e1; }
.lg-today { width: 2px; height: 12px; background: #e11d48; }
.gantt-axis { display: grid; grid-template-columns: var(--gantt-label) 1fr; border-bottom: 1px solid var(--border); }
.gantt-axis-track { position: relative; height: 28px; }
.gantt-tick { position: absolute; top: 4px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.gantt-axis-track .gantt-tick:first-child { transform: none; }
.gantt-body { position: relative; }
.gantt-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #e11d48; z-index: 2; }
.gantt-today em { position: absolute; top: -2px; left: 6px; font-style: normal; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #e11d48; background: var(--card); padding: 0 2px; white-space: nowrap; }
.gantt-row { display: grid; grid-template-columns: var(--gantt-label) 1fr; align-items: center; border-bottom: 1px solid var(--border); min-height: 64px; position: relative; z-index: 1; }
.gantt-row:last-child { border-bottom: none; }
.gantt-label { padding: 10px 16px 10px 0; font-size: 13.5px; line-height: 1.35; }
.gantt-name { font-weight: 600; }
.gantt-label .muted { font-size: 12px; margin-top: 2px; }
.gantt-track { position: relative; height: 36px; }
.gantt-bar { position: absolute; top: 4px; height: 28px; display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; min-width: 6px; overflow: hidden; }
.gantt-bar-text { font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.gb-SELESAI { background: var(--ok); color: #fff; }
.gb-BERJALAN { background: var(--amber); color: var(--amber-text); font-weight: 600; }
.gb-AKAN_DATANG { background: #e2e8f0; color: #475569; }
.gantt-remain { position: absolute; top: 9px; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .gantt { --gantt-label: 150px; }
  .gantt-label { font-size: 12.5px; }
  .gantt-bar-text { display: none; }
}

/* ---------- Ringkasan Request per kampus & unit ---------- */
.sum { margin-bottom: 28px; position: relative; }
.sum-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.sum-head h2 { margin: 0; font-size: 22px; }
.sum-tabs { display: inline-flex; border: 1px solid var(--border); background: var(--card); }
.sum-tab { margin: 0; background: transparent; color: var(--muted); border: none; padding: 9px 18px; font-size: 13px; font-weight: 600; }
.sum-tab:hover { background: #f1f5f9; color: var(--text); }
.sum-tab.active { background: var(--accent-dark); color: #fff; }
.sum-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 14px; }
.sum-kpi { background: var(--card); padding: 16px 20px; }
.sum-kpi .muted { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.sum-kpi-num { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--accent-dark); margin-top: 2px; }
.sum-kpi-money { font-size: 20px; padding-top: 6px; }
.sum-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.sum-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sum-dot { display: inline-block; width: 10px; height: 10px; flex-shrink: 0; }
.sg-disetujui { background: #0ca30c; color: #fff; }
.sg-menunggu { background: #fab219; color: #0b0b0b; }
.sg-ditolak { background: #d03b3b; color: #fff; }
.sg-draft { background: #cbd5e1; color: #0f172a; }
.sum-campuses { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sum-campus { background: var(--card); border: 1px solid var(--border); padding: 22px 24px 8px; }
.sum-campus-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.sum-campus-name { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.sum-campus-q { text-align: right; display: flex; flex-direction: column; font-size: 12px; }
.sum-campus-q strong { font-family: var(--font-display); font-size: 22px; color: var(--accent-dark); }
.sum-unit { padding: 16px 0; border-bottom: 1px solid var(--border); }
.sum-unit:last-child { border-bottom: none; }
.sum-unit-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.sum-unit-name { font-weight: 600; font-size: 14px; }
.sum-unit-count { font-size: 13px; white-space: nowrap; }
.sum-bar { display: flex; gap: 2px; height: 26px; }
.sum-bar-empty { background: #f1f5f9; align-items: center; justify-content: center; font-size: 12px; }
.sum-seg { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; min-width: 4px; cursor: default; }
.sum-seg:first-child { border-radius: 4px 0 0 4px; }
.sum-seg:last-child { border-radius: 0 4px 4px 0; }
.sum-seg:only-child { border-radius: 4px; }
.sum-unit-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 10px; font-size: 12.5px; }
.sum-unit-meta strong { font-weight: 600; }
.sum-flag { display: inline-flex; align-items: center; gap: 4px; color: #b45309; font-weight: 600; }
.sum-flag .icon { width: 14px; height: 14px; }
.sum-table { margin-top: 16px; }
.sum-table summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 0; }
.sum-tip { position: absolute; z-index: 5; background: #0f172a; color: #fff; font-size: 12px; padding: 6px 10px; pointer-events: none; white-space: nowrap; }
@media (max-width: 1100px) { .sum-campuses { grid-template-columns: 1fr; } .sum-kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Impor massal ---------- */
.impor-steps { list-style: none; padding-left: 0; margin: 0 0 8px; }
.impor-steps li { margin-bottom: 16px; }
.impor-steps .btn { margin-top: 8px; }
.impor-errors { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--danger); }
.impor-upload { margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.impor-upload input[type=file] { width: 190px; font-size: 12px; padding: 4px; }

/* ---------- Ringkasan Budget Plan ---------- */
.sg-barang { background: #2a78d6; color: #fff; }
.sg-kegiatan { background: #eb6834; color: #fff; }
.sum-legend-sep { width: 1px; height: 14px; background: var(--border); align-self: center; }
.sum-split { display: flex; gap: 2px; height: 6px; margin-top: 6px; }
.sum-split span { display: block; min-width: 3px; }
.sum-split span:first-child { border-radius: 3px 0 0 3px; }
.sum-split span:last-child { border-radius: 0 3px 3px 0; }
.sum-split span:only-child { border-radius: 3px; }
.sum-unit-meta .sum-dot { margin-right: 6px; vertical-align: -1px; }
.sum-months { margin-top: 20px; padding-bottom: 20px; }
.sum-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; padding-top: 12px; }
.sum-col { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.sum-col-val { font-size: 11px; color: var(--muted); height: 16px; white-space: nowrap; font-weight: 600; }
.sum-col-bar { width: 100%; height: 150px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--border); }
.sum-col-bar span { display: block; width: 62%; max-width: 42px; border-radius: 4px 4px 0 0; }
.sum-col-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 700px) { .sum-cols { gap: 3px; } .sum-col-val { font-size: 9px; } }
