/* =====================================================================
   SISTEM INFORMASI BIMBINGAN & PAK JABFUNG FKG UI
   Style System: Left Sidebar Layout + Light/Dark Mode + Formal Print
   ===================================================================== */

/* Bookman Old Style disertakan sebagai webfont untuk dokumen cetak, karena
   sebagian browser (mis. Brave) menyembunyikan font sistem non-umum sehingga
   hasil cetak PAK jatuh ke Georgia. Dipakai hanya oleh aturan .docPage / var(--ser). */
@font-face {
  font-family: "Bookman Old Style";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bookman-old-style-regular.ttf") format("truetype");
}
@font-face {
  font-family: "Bookman Old Style";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/bookman-old-style-bold.ttf") format("truetype");
}
@font-face {
  font-family: "Bookman Old Style";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bookman-old-style-italic.ttf") format("truetype");
}
@font-face {
  font-family: "Bookman Old Style";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/bookman-old-style-bold-italic.ttf") format("truetype");
}

:root {
  /* Editorial Akademik FKG UI — Warm Archival Neutral + FKG Forest Green + Makara Gold */
  --bg: #F6F5F1;
  --bg-landing: #F4F1EA;
  --surface: #FFFFFF;
  --surface-muted: #EFECE5;
  --surface-hover: #E7E3DA;
  --border: #E2DFD7;
  --border-strong: #CCC7BC;
  --ink: #191B18;
  --ink-soft: #4A4D47;
  --ink-muted: #656960;
  --primary: #174B3E;
  --primary-hover: #103A30;
  --accent: #174B3E;
  --accent-hover: #103A30;
  --accent-soft: #E9F2EE;
  --gold: #9A6B16;
  --gold-soft: #FBF4E4;
  --ok: #1F6E4A;
  --ok-soft: #E8F5EE;
  --bad: #B8322A;
  --bad-soft: #FCECEB;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --ser: "Bookman Old Style", "URW Bookman L", "Bookman", Georgia, serif;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-card: 12px;
  --radius-panel: 16px;
  --input-h: 40px;
  --sidebar-w: 264px;
  --sidebar-w-mini: 64px;
  --header-h: 60px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sidebar-dur: .28s;
  --sidebar-ease: var(--ease);
}

[data-theme="dark"] {
  /* Warm Graphite Neutral Ramp — calm for long hours */
  --bg: #131514;
  --bg-landing: #121413;
  --surface: #1A1D1B;
  --surface-muted: #222624;
  --surface-hover: #2A2F2C;
  --border: #2E3330;
  --border-strong: #3E4541;
  --ink: #EDEDE9;
  --ink-soft: #B4B7B0;
  --ink-muted: #8C9088;
  --primary: #ECEAE3;
  --primary-hover: #FFFFFF;
  --accent: #52B79A;
  --accent-hover: #6AC8AD;
  --accent-soft: rgba(82, 183, 154, .14);
  --gold: #DFA840;
  --gold-soft: rgba(223, 168, 64, .14);
  --ok: #4CC38A;
  --ok-soft: rgba(76, 195, 138, .14);
  --bad: #E56B63;
  --bad-soft: rgba(229, 107, 99, .15);
}

* { box-sizing: border-box; }

body, header, aside, .card, input, select, textarea, .yearblock, .year-toolbar, .rosterItem, footer, .stat-card, .login-card, .landing-nav, .public-calc-panel, .chart-card, .hero-result, .notif-banner, .modalBox, .roster-filter-bar, .roster-bulk-bar, label.check-pill, .auth-tab-strip, .nav-group-title {
  transition: background-color .22s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}

/* Smooth radial theme switch via View Transitions API */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* Pill switch tema: Matahari (kiri) / Bulan (kanan) dengan thumb bergeser. */
.theme-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 56px;
  height: 28px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border-strong);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.theme-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: opacity .2s var(--ease), color .2s var(--ease);
}
.theme-icon-sun { color: var(--gold); }
.theme-icon-moon { color: var(--ink-muted); opacity: .55; }
.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(25, 27, 24, .18);
  transition: transform .22s var(--ease), background-color .2s var(--ease);
}
[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(28px);
  background: #363C39;
}
[data-theme="dark"] .theme-icon-sun { opacity: .48; }
[data-theme="dark"] .theme-icon-moon {
  color: var(--gold);
  opacity: 1;
}

html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* =====================================================================
   LAYOUT ARSITEKTUR: LEFT SIDEBAR + TOP HEADER
   ===================================================================== */
#appWrapper {
  display: flex;
  min-height: 100vh;
}

/* TOP HEADER BAR */
#topHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.sidebar-toggle-btn svg { display: block; }
.sidebar-toggle-btn:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--ink);
}
.sidebar-toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.header-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-brand-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-badge {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.brand-title {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-family: var(--sans);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* FIXED LEFT SIDEBAR */
#sidebar {
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 999;
  padding: 16px 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform var(--sidebar-dur) var(--sidebar-ease), width var(--sidebar-dur) var(--sidebar-ease);
}

/* Mode mini desktop: sidebar menyusut jadi icon-only (bukan hilang).
   Padding horizontal sidebar (12px) dan padding kiri item (11px) tetap sama
   agar kolom ikon tidak bergeser: 2 x (12 + 11) + 18px ikon = 64px. */
@media (min-width: 901px) {
  #sidebar.collapsed {
    width: var(--sidebar-w-mini);
  }
  #sidebar.collapsed .nav-btn {
    gap: 0;
  }
  #sidebar.collapsed .nav-btn > span {
    opacity: 0;
  }
  #sidebar.collapsed .nav-group-title {
    padding: 0 11px;
    color: transparent;
  }
  #sidebar.collapsed .nav-group-title::after {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
  }
  #contentArea.sidebar-mini {
    margin-left: var(--sidebar-w-mini);
  }
}

.sidebar-backdrop,
.sidebar-mobile-head {
  display: none;
}

.nav-group-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 24px;
  padding: 0 11px;
  margin: 20px 0 6px;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: left;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 0;
  transition: color .18s var(--ease), padding var(--sidebar-dur) var(--sidebar-ease);
}
/* Garis pemisah halus yang muncul menggantikan label saat sidebar mini. */
.nav-group-title::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 50%;
  height: 1px;
  background: var(--border);
  opacity: 0;
  transform: translateY(-50%) scaleX(0);
  transition: opacity .2s var(--ease), transform var(--sidebar-dur) var(--sidebar-ease);
}
.sidebar-mobile-head + .nav-group-title,
.nav-group-title:first-child {
  margin-top: 4px;
}

.nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 11px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: gap var(--sidebar-dur) var(--sidebar-ease), background-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
  line-height: 1.3;
}
.nav-btn:hover {
  background: var(--surface-muted);
  color: var(--ink);
}
.nav-btn:active {
  transform: scale(0.985);
}
.nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--gold);
}
[data-theme="dark"] .nav-btn.active {
  background: var(--surface-muted);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--gold), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--ink-muted);
  transition: color .15s var(--ease);
}
.nav-btn:hover .nav-icon {
  color: var(--ink-soft);
}
.nav-btn.active .nav-icon {
  color: var(--accent);
}
/* Teks menu: selalu satu baris. Lebarnya menyusut otomatis mengikuti lebar
   sidebar (lewat flex), jadi tidak pernah wrap/lompat saat transisi. */
.nav-btn > span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transition: opacity var(--sidebar-dur) var(--sidebar-ease);
}

/* MAIN CONTENT AREA */
#contentArea {
  margin-top: var(--header-h);
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px 64px;
  min-width: 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  transition: margin-left var(--sidebar-dur) var(--sidebar-ease);
}
#contentArea > .panel,
#contentArea > #bannerContainer,
#contentArea > #adminDosenContextBanner,
#contentArea > .portal-footer {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================================
   PANEL SYSTEM & ANIMATION
   ===================================================================== */
.panel { display: none; }
.panel.active { display: block; flex: 1 0 auto; animation: panelEnter .26s cubic-bezier(.22, 1, .36, 1); }
.portal-footer { margin-top: auto !important; flex-shrink: 0; }
.report-action-stack { display:flex; flex-direction:column; gap:4px; align-items:stretch; }
.report-action-stack .btn { white-space:nowrap; }
.field-help { display:block; margin-top:5px; color:var(--ink-muted); font-size:.75rem; line-height:1.4; }
@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes panelEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* =====================================================================
   IN-APP NOTIFICATION BANNER
   ===================================================================== */
.notif-banner {
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
[data-theme="dark"] .notif-banner {
  background: var(--gold-soft);
  border-color: rgba(223, 168, 64, 0.28);
}
.notif-banner h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.notif-banner p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

/* TOMBOL LONCENG NOTIFIKASI (HEADER) */
.notif-bell-wrap {
  position: relative;
}
.notif-bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.notif-bell-btn:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--ink);
}
.notif-bell-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.notif-bell-btn[aria-expanded="true"] {
  background: var(--accent-soft);
  border-color: var(--border-strong);
  color: var(--accent);
}
.notif-bell-btn.has-alert {
  color: var(--ink);
}
.notif-bell-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notif-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background: var(--bad);
  color: #fff;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--surface);
}
.notif-bell-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, calc(100vw - 28px));
  max-height: min(72vh, 540px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 32px rgba(25, 27, 24, .12);
  z-index: 4000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transform-origin: top right;
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s var(--ease);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .notif-bell-panel {
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
}
.notif-bell-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-bell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.notif-bell-head strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.notif-bell-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-top: 2px;
}
.notif-bell-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-item {
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-muted);
  transition: background-color .15s var(--ease);
}
.notif-item.unread {
  background: var(--gold-soft);
  border-left-color: var(--gold);
}
.notif-item.read {
  border-left-color: var(--border-strong);
  opacity: .84;
}
.notif-item h5 {
  margin: 0 0 3px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}
.notif-item .notif-sem {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 5px;
}
.notif-item p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.notif-empty {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-muted);
  padding: 24px 12px;
}

/* PEMILIH DOSEN & LAMPIRAN NOTIFIKASI */
.notif-picker-box {
  background: var(--surface-muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notif-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.notif-picker-head > div:first-child {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.notif-picker-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notif-picker-list {
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.notif-picker-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  min-height: 44px;
  transition: border-color .15s ease, background-color .15s ease;
}
.notif-picker-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.notif-picker-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.notif-picker-item:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.notif-picker-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
}
.notif-picker-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.notif-picker-text strong {
  font-size: 0.8rem;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.notif-picker-meta {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.notif-attachment-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}
#sch_lampiran {
  width: 100%;
  padding: 8px 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.82rem;
  cursor: pointer;
}
#sch_lampiran:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.notif-attachment-info {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}
.notif-attachment-info span {
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.notif-attachment-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.notif-attachment-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.notif-mode-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.notif-mode-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.notif-mode-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--input-h);
  padding: 0 10px;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.notif-mode-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.notif-mode-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.notif-mode-option input[type="radio"] {
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.notif-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.notif-card-head h2 {
  margin: 0;
}
.notif-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
@media (max-width: 768px) {
  .notif-picker-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .notif-mode-option {
    min-height: 44px;
  }
}

/* AUDIT TRAIL BADGE */
.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}
.audit-badge strong {
  color: var(--accent);
  font-weight: 600;
}

/* =====================================================================
   CARDS & KPI STAT-CARDS
   ===================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(25, 27, 24, .04);
}
[data-theme="dark"] .card {
  box-shadow: none;
}
@media (max-width: 640px) { .card { padding: 16px; } }

.card h2 {
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.card h3 {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
}
.card .sub {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.kpi-grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.kpi-grid.cols-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1200px) { .kpi-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 992px) { .kpi-grid, .kpi-grid.cols-5, .kpi-grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .kpi-grid, .kpi-grid.cols-5, .kpi-grid.cols-6 { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}
.stat-card .lbl,
.stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-muted);
  margin: 0;
}
.stat-card .val,
.stat-card .stat-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.stat-card .desc {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
  line-height: 1.4;
}

/* PROGRESS BAR */
.prog-wrap { margin-top: 12px; }
.prog-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.prog-bar {
  height: 8px;
  background: var(--surface-muted);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.prog-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .35s var(--ease);
}
.prog-fill.ok { background: var(--ok); }
.prog-fill.gold { background: var(--gold); }

/* CAREER LADDER */
.ladder {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 16px 0 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.rung {
  flex: 1;
  min-width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 8px 10px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border-strong);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.rung.reached {
  background: var(--ok-soft);
  border-color: var(--border);
  border-bottom-color: var(--ok);
  color: var(--ok);
}
.rung.current {
  background: var(--accent);
  border-color: var(--accent);
  border-bottom-color: var(--gold);
  color: #FFFFFF;
  font-weight: 600;
}
.rung.target {
  background: var(--gold-soft);
  border-color: var(--gold);
  border-bottom-color: var(--gold);
  color: var(--ink);
  font-weight: 600;
}
[data-theme="dark"] .rung.current {
  background: var(--accent);
  color: #0D1B17;
  border-bottom-color: var(--gold);
}
[data-theme="dark"] .rung.target {
  background: var(--gold-soft);
  color: var(--ink);
}
.rung .lbl {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.25;
}

/* =====================================================================
   FORM GRIDS & UNIFORM ALIGNMENT
   ===================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
@media (max-width: 992px) {
  .grid, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.grid > *,
.grid-2 > *,
.grid-4 > *,
.refgrid > *,
.public-calc-grid > *,
.kpi-grid > *,
.charts-grid-2x2 > *,
.demographic-grid > * {
  min-width: 0;
}
.card,
.stat-card,
.chart-card,
.public-calc-panel,
.demographic-card,
.yearblock,
.rosterItem,
.active-dosen-banner,
.dashboard-filter-bar {
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}
.field.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .field.span-2 { grid-column: span 1; } }

label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 6px;
  line-height: 1.25;
  min-height: 16px;
}
label .req { color: var(--bad); font-weight: 600; margin-left: 1px; }
label .badge-auto {
  margin-left: auto;
  font-size: 0.68rem;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input:not([type]),
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: var(--input-h);
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input[type="checkbox"] {
  width: auto;
  height: auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
label.check-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: var(--surface-muted);
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
label.check-inline {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--ink);
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[readonly] {
  background: var(--surface-muted);
  color: var(--ink);
}

.split-field {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  width: 100%;
}

/* PASSWORD SHOW/HIDE TOGGLE & AUTH TABS ANIMATION */
.pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.pwd-wrap input {
  padding-right: 44px;
  transition: border-color .2s ease, box-shadow .2s ease, opacity .18s ease, letter-spacing .18s ease, background-color .25s ease;
}
.pwd-wrap input.pwd-mask-fade {
  animation: pwdMaskSwap .22s cubic-bezier(.22, 1, .36, 1);
}
.pwd-wrap.is-animating input {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Tombol ikon mata: 30x30 di dalam input, dua ikon (Eye/EyeOff) ditumpuk
   lalu di-crossfade + scale/rotate saat state berubah. */
.pwd-toggle-btn {
  position: absolute;
  right: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .18s cubic-bezier(.22, 1, .36, 1);
}
.pwd-toggle-btn:hover {
  color: var(--ink);
  background: var(--surface-muted);
}
.pwd-toggle-btn:active {
  transform: scale(0.94);
}
.pwd-toggle-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  color: var(--accent);
}
.pwd-toggle-btn.is-visible {
  color: var(--accent);
}
.pwd-eye {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
.pwd-eye-icon {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  transition: opacity .2s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
/* State default (password tersembunyi): tampilkan Eye. */
.pwd-eye-off {
  opacity: 0;
  transform: scale(.62) rotate(-35deg);
}
/* Saat password ditampilkan: Eye menghilang, EyeOff muncul. */
.pwd-toggle-btn.is-visible .pwd-eye-open {
  opacity: 0;
  transform: scale(.62) rotate(35deg);
}
.pwd-toggle-btn.is-visible .pwd-eye-off {
  opacity: 1;
  transform: scale(1) rotate(0);
}
@media (prefers-reduced-motion: reduce) {
  .pwd-eye-icon {
    transition-duration: .01ms;
  }
}
@keyframes pwdMaskSwap {
  0% { opacity: 0.45; transform: translateY(1px); }
  100% { opacity: 1; transform: none; }
}

.auth-card {
  animation: panelEnter .3s cubic-bezier(.22, 1, .36, 1);
}
.auth-tab-strip {
  display: flex;
  background: var(--surface-muted);
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 20px;
  gap: 4px;
}
.auth-tab-btn {
  flex: 1;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .15s ease;
}
.auth-tab-btn:hover:not(.active) {
  background: var(--surface);
  color: var(--ink);
  opacity: 0.85;
}
.auth-tab-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.auth-panel-enter {
  animation: panelEnter .24s cubic-bezier(.22, 1, .36, 1);
}

/* =====================================================================
   AUTH SPLIT: SLIDING OVERLAY (MASUK <-> REGISTRASI)
   ===================================================================== */
.auth-shell {
  max-width: 960px;
  width: 100%;
  margin: 20px auto;
}
.auth-split {
  position: relative;
  width: 100%;
  min-height: 668px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(25, 27, 24, .08);
}
[data-theme="dark"] .auth-split {
  box-shadow: none;
}
.auth-form-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  padding: 28px 34px;
  overflow-y: auto;
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  transition: transform .48s var(--ease), opacity .38s var(--ease);
}
.auth-form-panel.sign-in {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.auth-form-panel.sign-up {
  z-index: 1;
}
.auth-split.register-mode .auth-form-panel.sign-in {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.auth-split.register-mode .auth-form-panel.sign-up {
  transform: translateX(100%);
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}
.auth-overlay-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 100;
  transition: transform .48s var(--ease);
}
.auth-split.register-mode .auth-overlay-container {
  transform: translateX(-100%);
}
.auth-overlay {
  position: relative;
  left: -100%;
  width: 200%;
  height: 100%;
  color: #F6F5F1;
  background: #17342C;
  transition: transform .48s var(--ease);
}
.auth-split.register-mode .auth-overlay {
  transform: translateX(50%);
}
.auth-overlay-panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  padding: 40px 36px;
  transition: transform .48s var(--ease);
}
.auth-overlay-panel.overlay-left {
  left: 0;
  transform: translateX(-16%);
}
.auth-split.register-mode .auth-overlay-panel.overlay-left {
  transform: translateX(0);
}
.auth-overlay-panel.overlay-right {
  right: 0;
}
.auth-split.register-mode .auth-overlay-panel.overlay-right {
  transform: translateX(16%);
}

/* Ilustrasi cat air Gedung FKG UI tampil jernih di bagian atas, dengan scrim netral di bawah untuk keterbacaan teks. */
.auth-overlay.has-photo {
  background: #1B2420;
}
.auth-overlay.has-photo .auth-overlay-panel {
  background-image:
    linear-gradient(180deg, rgba(18, 24, 21, .08) 0%, rgba(18, 24, 21, .28) 48%, rgba(15, 22, 19, .86) 100%),
    var(--auth-photo);
  background-size: cover, cover;
  background-position: center, center top;
  background-repeat: no-repeat, no-repeat;
}
.auth-overlay.has-photo .auth-overlay-panel h2,
.auth-overlay.has-photo .auth-overlay-panel p {
  text-shadow: 0 1px 10px rgba(10, 14, 12, .55);
}
.auth-overlay-panel h2 {
  font-family: var(--display);
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FAF8F4;
}
.auth-overlay-panel p {
  margin: 0 0 20px;
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(250, 248, 244, .9);
  max-width: 34ch;
}
.auth-overlay-panel .auth-overlay-btn {
  background: rgba(250, 248, 244, .12);
  border: 1px solid rgba(250, 248, 244, .75);
  color: #FAF8F4;
  padding: 0 22px;
  height: 40px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}
.auth-overlay-panel .auth-overlay-btn:hover,
.auth-overlay-panel .auth-overlay-btn:active {
  background: #FAF8F4;
  color: #191B18;
  border-color: #FAF8F4;
}
.auth-panel-brand {
  text-align: left;
  margin-bottom: 20px;
}
.auth-panel-brand.compact {
  margin-bottom: 16px;
}
.auth-panel-brand .landing-brand-logo.auth-brand-logo {
  width: 44px;
  height: 44px;
  margin: 0 0 12px;
}
.auth-panel-title {
  font-family: var(--display);
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.auth-panel-subtitle {
  margin: 0;
  font-size: .84rem;
  color: var(--ink-soft);
}
.auth-switch-hint {
  text-align: left;
  margin: 16px 0 0;
  font-size: .82rem;
  color: var(--ink-muted);
}
.auth-switch-hint a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Fallback bertumpuk untuk layar sempit: overlay disembunyikan. */
@media (max-width: 860px) {
  .auth-shell {
    max-width: 520px;
  }
  .auth-split {
    min-height: 0;
    border-radius: var(--radius-card);
  }
  .auth-form-panel {
    position: relative;
    left: auto;
    width: 100%;
    height: auto;
    padding: 24px 20px;
    transform: none !important;
    opacity: 1;
    pointer-events: auto;
    display: none;
  }
  .auth-form-panel.is-active {
    display: block;
  }
  .auth-overlay-container {
    display: none;
  }
}

/* =====================================================================
   TABLES
   ===================================================================== */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
tbody tr:hover td {
  background: rgba(25, 27, 24, 0.02);
}
[data-theme="dark"] tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}
th {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  background: var(--surface-muted);
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
td.num, th.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Tabel Daftar Evaluasi: beri ruang agar nama mentee/mentor tidak terpotong sempit. */
.table-eval { min-width: 1320px; }
.table-eval td.col-mentee,
.table-eval td.col-mentor { min-width: 190px; }
.table-eval td.col-waktu { min-width: 132px; white-space: nowrap; }
.table-eval tr.row-virtual-eval td { background: rgba(101, 105, 96, 0.05); }
[data-theme="dark"] .table-eval tr.row-virtual-eval td { background: rgba(255, 255, 255, 0.03); }

tr.rowRekomendasi td {
  background: var(--ok-soft) !important;
  font-weight: 600;
  color: var(--ok);
}
[data-theme="dark"] tr.rowRekomendasi td { color: #86EFAC; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.blue { background: var(--accent-soft); color: var(--accent); }
.badge.indigo { background: var(--surface-muted); color: var(--ink-soft); border: 1px solid var(--border); }
.badge.ghost { background: var(--surface-muted); color: var(--ink-soft); border: 1px solid var(--border); }

.note {
  font-size: 0.83rem;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 12px;
  line-height: 1.5;
}
.empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--ink-muted);
  font-size: 0.88rem;
}
.data-error {
  margin: 0 0 18px;
  padding: 12px 16px;
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.84rem;
}
[data-theme="dark"] .data-error {
  background: var(--gold-soft);
  border-color: rgba(223, 168, 64, .32);
  color: var(--ink);
}
.chart-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  padding: 20px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
}
.refgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 820px) { .refgrid { grid-template-columns: 1fr; } }

/* YEAR BLOCKS */
.yearblock {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface);
}
.yearblock.pre2023 {
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
}
[data-theme="dark"] .yearblock.pre2023 { background: var(--gold-soft); }
.yearblock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.yearblock h3 {
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-pre {
  font-family: var(--sans);
  font-size: 0.72rem;
  background: var(--gold-soft);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.year-formula {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--surface-muted);
  border-left: 3px solid var(--accent);
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.year-formula .yf-label {
  font-weight: 700;
  color: var(--ink);
}
.year-formula b { color: var(--accent); }

.year-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.year-toolbar .quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--input-h);
  background: var(--primary);
  color: #FFFFFF;
  border: 1px solid transparent;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.86rem;
  cursor: pointer;
  font-family: var(--sans);
  text-decoration: none;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(0.98); }

/* Tombol Keluar: soft crimson, berubah solid saat hover, tetap kontras di dark mode. */
.btn.logout-btn {
  gap: 6px;
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid rgba(184, 50, 42, .22);
}
.btn.logout-btn:hover {
  background: var(--bad);
  color: #FFFFFF;
  border-color: var(--bad);
}
[data-theme="dark"] .btn.logout-btn {
  background: rgba(229, 107, 99, .14);
  color: #F3A39E;
  border-color: rgba(229, 107, 99, .28);
}
[data-theme="dark"] .btn.logout-btn:hover {
  background: #C9443C;
  color: #FFFFFF;
  border-color: #C9443C;
}
.btn:focus-visible,
.nav-btn:focus-visible,
.landing-link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn.is-busy {
  cursor: progress;
  opacity: .9;
}
.btn-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: inline-block;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btnSpin .7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
.btn.accent { background: var(--accent); color: #FFFFFF; }
.btn.accent:hover { background: var(--accent-hover); }
.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn.ghost:hover { background: var(--surface-muted); }
.btn.gold { background: var(--gold); color: #FFFFFF; }
.btn.gold:hover { background: #7D5510; }
.btn.ok { background: var(--ok); color: #FFFFFF; }
.btn.ok:hover { background: #165236; }
.btn.danger {
  background: var(--surface);
  color: var(--bad);
  border: 1px solid rgba(184, 50, 42, .35);
}
[data-theme="dark"] .btn.danger { border-color: rgba(229, 107, 99, 0.4); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { height: 36px; padding: 0 14px; font-size: 0.82rem; }
.btn.xs { height: 32px; padding: 0 10px; font-size: 0.78rem; border-radius: var(--radius-sm); }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

/* Tombol solid di mode gelap memakai latar terang/berkontras tinggi, teks gelap. */
[data-theme="dark"] .btn,
[data-theme="dark"] .btn.accent,
[data-theme="dark"] .btn.gold,
[data-theme="dark"] .btn.ok {
  color: #101513;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
[data-theme="dark"] .btn.ghost {
  background: var(--surface-muted);
  color: var(--ink);
  box-shadow: none;
}
[data-theme="dark"] .btn.ghost:hover {
  background: var(--surface-hover);
}
[data-theme="dark"] .btn.danger {
  background: transparent;
  color: var(--bad);
  box-shadow: none;
}
[data-theme="dark"] .btn.accent:hover { background: var(--accent-hover); }
[data-theme="dark"] .btn.gold:hover { background: #E9BA5D; }
[data-theme="dark"] .btn.ok:hover { background: #64D29E; }
[data-theme="dark"] .auth-overlay-panel .btn.auth-overlay-btn {
  background: rgba(250, 248, 244, .16);
  border-color: rgba(250, 248, 244, .82);
  color: #FAF8F4;
  box-shadow: none;
}
[data-theme="dark"] .auth-overlay-panel .btn.auth-overlay-btn:hover,
[data-theme="dark"] .auth-overlay-panel .btn.auth-overlay-btn:active {
  background: #FAF8F4;
  border-color: #FAF8F4;
  color: #191B18;
}
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ROSTER ITEM */
.rosterItem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--surface);
  transition: border-color .15s;
}
.rosterItem:hover { border-color: var(--border-strong); }
.rosterItem .meta { font-size: 0.79rem; color: var(--ink-soft); margin-top: 2px; }
.rosterItem b { font-size: 0.95rem; color: var(--ink); }

.roster-filter-bar {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  align-items: end;
}
@media (max-width: 900px) { .roster-filter-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .roster-filter-bar { grid-template-columns: 1fr; } }

.roster-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.roster-check-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  margin: 0;
  user-select: none;
}
.roster-checkbox {
  width: 17px !important;
  height: 17px !important;
  cursor: pointer;
  accent-color: var(--accent);
  margin: 0;
  flex-shrink: 0;
}
.rosterItem-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 220px;
  min-width: 0;
}
.rosterItem-left > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.rosterItem.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* HERO RESULT */
.hero-result {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: var(--radius-card);
  margin-bottom: 20px;
}
.hero-result.ok { border-left-color: var(--ok); }
.hero-result.warn { border-left-color: var(--gold); }
.hero-result .cap {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.hero-result .big {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 6px;
  color: var(--ink);
}
.hero-result .small {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 72ch;
}

/* USER PILL & ROLE BADGE */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-muted);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
}
.role-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: none;
}
.role-badge.admin_sdm { background: var(--bad-soft); color: var(--bad); }
.role-badge.pimpinan { background: var(--gold-soft); color: var(--gold); }
.role-badge.kadep { background: var(--accent-soft); color: var(--accent); }
.role-badge.dosen { background: var(--ok-soft); color: var(--ok); }
[data-theme="dark"] .role-badge.admin_sdm { background: var(--bad-soft); color: var(--bad); }
[data-theme="dark"] .role-badge.pimpinan { background: var(--gold-soft); color: var(--gold); }
[data-theme="dark"] .role-badge.kadep { background: var(--accent-soft); color: var(--accent); }
[data-theme="dark"] .role-badge.dosen { background: var(--ok-soft); color: var(--ok); }
[data-theme="dark"] .badge.indigo { background: var(--surface-muted); color: var(--ink-soft); border: 1px solid var(--border); }

/* TOAST & MODAL */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toastMsg {
  background: #191B18;
  color: #F6F5F1;
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(25, 27, 24, .18);
  font-size: 0.84rem;
  font-weight: 500;
  animation: toastIn .22s var(--ease);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  max-width: 360px;
}
.toastMsg.leaving {
  opacity: 0;
  transform: translateX(12px);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}
[data-theme="dark"] .toastMsg {
  background: #222624;
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
}
.toastMsg.ok { border-left-color: var(--ok); }
.toastMsg.warn { border-left-color: var(--gold); }
.toastMsg.error { border-left-color: var(--bad); }

.modalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 19, .52);
  backdrop-filter: blur(2px);
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s var(--ease), visibility .2s var(--ease);
}
.modalBackdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Dialog konfirmasi harus selalu tampil di depan modal lain (mis. form evaluasi mentor). */
#confirmModal.modalBackdrop {
  z-index: 100001;
}
select option {
  background: var(--surface);
  color: var(--ink);
}

.modalBox {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  padding: 24px;
  border-radius: var(--radius-panel);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 16px 36px rgba(18, 20, 19, .22);
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: transform .22s var(--ease), opacity .2s var(--ease), background-color .22s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.modalBackdrop.show .modalBox {
  opacity: 1;
  transform: none;
}
.modalBox h2, .modalBox h3 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--ink);
}
.modalBox .sub, .modalBox p {
  color: var(--ink-soft);
}
.modalBox label {
  color: var(--ink-soft);
}

/* High Contrast Badges in Dark Mode */
[data-theme="dark"] .badge.ok {
  background: var(--ok-soft) !important;
  color: var(--ok) !important;
  border: 1px solid rgba(76, 195, 138, 0.28);
}
[data-theme="dark"] .badge.bad {
  background: var(--bad-soft) !important;
  color: var(--bad) !important;
  border: 1px solid rgba(229, 107, 99, 0.3);
}
[data-theme="dark"] .badge.gold {
  background: var(--gold-soft) !important;
  color: var(--gold) !important;
  border: 1px solid rgba(223, 168, 64, 0.3);
}
[data-theme="dark"] .badge.blue {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(82, 183, 154, 0.3);
}
[data-theme="dark"] .badge.ghost {
  background: var(--surface-muted) !important;
  color: var(--ink-soft) !important;
  border: 1px solid var(--border);
}

/* DATE POP */
.date-field-wrap { position: relative; display: flex; align-items: center; width: 100%; }
[data-theme="dark"] input[type="date"] { color-scheme: dark; }

.plotting-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.plotting-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  max-width: 440px;
}
.plotting-search-wrap input {
  width: 100%;
  padding-left: 34px;
  padding-right: 34px;
}
.plotting-search-icon {
  position: absolute;
  left: 11px;
  color: var(--ink-muted);
  pointer-events: none;
}
.plotting-search-clear {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.plotting-search-clear:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

/* =====================================================================
   FLATPICKR GLOBAL DATEPICKER (LIGHT & DARK MODE, MODAL-SAFE Z-INDEX)
   ===================================================================== */
.fp-date-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.fp-date-wrap input.flatpickr-input,
.fp-date-wrap input.fp-alt-input {
  width: 100%;
  padding-right: 36px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
}
.fp-date-wrap .fp-cal-icon {
  position: absolute;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.fp-date-wrap .fp-cal-icon:hover {
  color: var(--accent);
  background: var(--surface-muted);
}
.flatpickr-calendar {
  z-index: 99999 !important;
  font-family: inherit;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
}
.flatpickr-calendar::before,
.flatpickr-calendar::after {
  display: none;
}
.flatpickr-months {
  padding: 6px 6px 2px;
  align-items: center;
}
.flatpickr-months .flatpickr-month {
  height: 36px;
  color: var(--ink);
  fill: var(--ink);
}
.flatpickr-current-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
  font-size: 0.92rem;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  height: 28px;
}
.flatpickr-current-month .numInputWrapper {
  width: 72px;
}
.flatpickr-current-month input.cur-year {
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  height: 28px;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--ink-soft);
  fill: var(--ink-soft);
  padding: 8px;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--accent);
}
span.flatpickr-weekday {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.74rem;
}
.flatpickr-day {
  color: var(--ink);
  border-radius: 8px;
  font-weight: 500;
}
.flatpickr-day:hover,
.flatpickr-day:focus {
  background: var(--surface-muted);
  border-color: var(--surface-muted);
  color: var(--ink);
}
.flatpickr-day.today {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 700;
}
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.flatpickr-disabled {
  color: var(--ink-muted);
  opacity: 0.45;
}
[data-theme="dark"] .flatpickr-calendar {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months option,
[data-theme="dark"] .flatpickr-current-month input.cur-year {
  background: var(--surface-muted);
  color: var(--ink);
  border-color: var(--border);
}
[data-theme="dark"] .flatpickr-day {
  color: var(--ink);
}
[data-theme="dark"] .flatpickr-day:hover {
  background: rgba(148, 163, 184, 0.18);
  border-color: transparent;
}
[data-theme="dark"] .flatpickr-day.selected,
[data-theme="dark"] .flatpickr-day.selected:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.date-field-wrap input[type="text"] { padding-right: 36px; cursor: pointer; background: var(--surface); }
.date-field-wrap .cal-icon { position: absolute; right: 12px; pointer-events: none; color: var(--ink-muted); }
.date-field-wrap .cal-icon-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-top-width: 4px;
  border-radius: 2px;
}
.date-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15,23,42,.15);
  display: none;
  width: 280px;
  max-width: calc(100vw - 32px);
}
.date-pop.open { display: block; animation: fade .15s ease; }
.date-pop-row { display: grid; grid-template-columns: 1fr 1.6fr 1.1fr; gap: 6px; margin-bottom: 10px; }
.date-pop select { height: 34px; padding: 0 6px; font-size: 0.8rem; }
.date-pop-actions { display: flex; justify-content: space-between; gap: 6px; }

/* =====================================================================
   CETAK DOKUMEN (KONTROL UPLOAD LOGO, DAFTAR DOKUMEN & FORMAL PRINT)
   ===================================================================== */
#panel_cetak h3 code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
#panel_cetak input[readonly]:not(#c_tanggal_text) {
  cursor: default;
}
.doclist-fieldset {
  border: none;
  padding: 0;
  margin: 16px 0 0;
  min-width: 0;
}
.field-group-label {
  display: block;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.25;
}
.logoUpload {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--input-h);
}
.logoUpload .preview {
  width: 40px;
  height: 40px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--surface-muted);
  flex-shrink: 0;
}
.logoUpload .preview img { width: 100%; height: 100%; object-fit: contain; }
.logoUpload .preview span { font-size: 0.75rem; color: var(--ink-soft); font-weight: 700; }
.logoUpload input[type="file"] {
  font-size: 0.78rem;
  border: none;
  padding: 4px 0;
  height: auto;
  background: transparent;
  color: var(--ink-soft);
  width: 100%;
  min-width: 0;
}
.logoUpload input[type="file"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.kopUpload .preview {
  width: 104px;
  height: 48px;
  border-radius: 4px;
}
.kopUpload .preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.doclist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}
.doclist label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  padding: 9px 12px;
  min-height: 40px;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.83rem;
  cursor: pointer;
  margin: 0;
  transition: border-color .15s ease, background-color .15s ease;
}
.doclist label:hover {
  border-color: var(--border-strong);
}
.doclist label:has(input:focus-visible),
label.check-inline:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#docArea,
#printModalDocArea {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.docPage, .docPage * {
  font-family: "Bookman Old Style", "URW Bookman L", "Bookman", Georgia, serif !important;
}
.docPage.sktmt-page,
.docPage.sktmt-page * {
  font-family: "Times New Roman", Times, serif !important;
  font-size: 12pt !important;
  color: #000000 !important;
}
.docPage.sktmt-page .docTitle {
  margin-top: 3.75em;
}
.docPage.sktmt-page .docTitle .t1 {
  font-weight: 400;
  text-decoration: none;
}
.sktmt-signature .sktmt-signer-name {
  font-weight: 400;
  text-decoration: none;
}
/* Nama pejabat penandatangan harus satu baris (tidak terlipat). */
.docPage.sktmt-page .sktmt-signer-name {
  white-space: nowrap;
}
/* Pratinjau layar SKTMT disamakan dengan hasil cetak: KOP penuh lebar,
   tinggi proporsional (bukan di-contain ke tinggi tetap). */
.docPage.sktmt-page .docHeadKop img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: fill;
}
.docPage.ba-page table.doc td,
.docPage.ba-page table.doc td.lbl {
  font-weight: 400;
}
/* Berita Acara & Laporan: seluruh teks berwarna hitam dan memakai Times New Roman,
   berlaku untuk setiap semester. Ukuran font dipertahankan agar tata letak dan
   jumlah halaman tidak berubah. */
.docPage.ba-page,
.docPage.ba-page * {
  font-family: "Times New Roman", Times, serif !important;
  color: #000000 !important;
}
.docPage {
  background: #fff !important;
  border: 1px solid var(--border);
  padding: 22px 32px;
  margin: 0 auto 20px;
  color: #111 !important;
  font-size: 0.86rem;
  line-height: 1.32;
  max-width: 840px;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
[data-theme="dark"] .docPage {
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.docHead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-bottom: 3px double #111;
  padding-bottom: 8px;
  margin-bottom: 10px;
  text-align: center;
}
.docHead .logoBox {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.docHead .logoBox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.docHead .logoBox .fallback {
  font-family: var(--ser);
  font-weight: 800;
  font-size: 1.3rem;
  color: #111;
  border: 2px solid #111;
  border-radius: 50%;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.docHead .txt { text-align: center; }
.docHead .txt .l1 { font-weight: 700; font-size: 0.98rem; letter-spacing: .01em; }
.docHead .txt .l2 { font-weight: 700; font-size: 0.94rem; }
.docHead.docHeadKop {
  padding-bottom: 0;
  border-bottom: none;
  gap: 0;
}
.docHeadKop img {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  object-position: center;
}
.docTitle { text-align: center; margin: 4px 0 2px; }
.docTitle .t1 { font-weight: 700; font-size: 0.98rem; text-decoration: underline; }
.docTitle .t2 { font-size: 0.85rem; margin-top: 1px; }
.docTitle .nomor { font-size: 0.85rem; margin-top: 1px; }
.sktmt-identity {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 4px;
  margin-bottom: 12px;
}
.docMeta { display: flex; justify-content: space-between; font-size: 0.83rem; margin: 8px 0 6px; gap: 12px; }
table.doc { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 7px; }
table.doc td, table.doc th { border: 1px solid #222; padding: 3.5px 6px; vertical-align: middle; white-space: normal; color: #111; }
table.doc th { background: #EEEEEE; font-weight: 700; text-align: center; color: #111; }
table.doc tr.tblSecHead td,
table.doc tr.tblSecHead th { background: #EEEEEE; font-weight: 700; text-align: left; color: #111; }
table.doc td.lbl { font-weight: 600; white-space: nowrap; }
table.doc td.num, table.doc th.num { text-align: center; font-family: var(--ser); }
.docSectionTitle { font-weight: 700; margin: 8px 0 4px; font-size: 0.85rem; }
.docSectionTitle.center { text-align: center; }
.signBlock {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 14px;
  font-size: 0.83rem;
  page-break-inside: avoid;
}
.signBlock .tembusan { max-width: 280px; }
.signBlock .ttd { text-align: center; min-width: 250px; }
.signBlock .ttd .space { height: 46px; }

/* Electronic Signature Box (SI-KADO) */
.ttd-box-container {
  display: inline-block;
  margin: 6px 0;
}
.ttd-digital-box {
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.ttd-digital-box.signed {
  border: 1.5px solid #16A34A !important;
  background: #F0FDF4 !important;
  color: #14532D !important;
}
.ttd-digital-box.pending {
  border: 1.5px dashed #94A3B8 !important;
  background: #F8FAFC !important;
  color: #64748B !important;
}
.page-break {
  page-break-after: always;
  break-after: page;
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
}

/* Demographics Widgets (Sync Admin SDM & Pimpinan) */
.demographic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.demographic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.demographic-card h3 {
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bar-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.bar-track {
  height: 6px;
  background: var(--surface-muted);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .3s ease;
}

/* Retiring Faculty Widget */
.retire-alert-banner {
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.retire-badge-urgent {
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.retire-badge-near {
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .retire-badge-urgent {
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid rgba(229, 107, 99, 0.3);
}
[data-theme="dark"] .retire-badge-near {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(223, 168, 64, 0.3);
}

/* Active Dosen Context Banner (Admin SDM Inspection Mode) */
.active-dosen-banner {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
[data-theme="dark"] .active-dosen-banner {
  background: var(--surface);
  border-color: var(--border-strong);
  border-left-color: var(--gold);
}
.active-dosen-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.active-dosen-badge {
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.active-dosen-title {
  font-size: 0.95rem;
  color: var(--ink);
}
.active-dosen-meta {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-left: 6px;
}
.active-dosen-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
input[type="text"].active-dosen-search,
.active-dosen-select {
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-family: var(--sans);
}
input[type="text"].active-dosen-search {
  width: 200px;
  max-width: 100%;
}
.active-dosen-select {
  width: auto;
  max-width: 260px;
}
.dosen-name-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dotted var(--accent);
  transition: color .15s ease, border-color .15s ease;
}
.dosen-name-link:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* Dashboard Filter Bar */
.dashboard-filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.filter-controls-group {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-field-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-field-item label {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.filter-field-item select {
  height: 36px;
  padding: 0 10px;
  font-size: 0.84rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  min-width: 148px;
}

/* Chart Grid & Containers */
.charts-grid-2x2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 992px) {
  .charts-grid-2x2 {
    grid-template-columns: 1fr;
  }
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}
.chart-card-wide {
  grid-column: 1 / -1;
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.chart-card-header h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-card-header .chart-badge,
.chart-card-header .chart-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink-muted);
}
.chart-canvas-wrap {
  position: relative;
  height: 290px;
  width: 100%;
}
.chart-canvas-sm { height: 220px; }
.chart-canvas-mid { height: 340px; }
.chart-canvas-tall { height: 472px; }

/* Asymmetric Chart Grid — one main chart + supporting breakdown */
.charts-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.charts-bento .chart-card { grid-column: span 6; }
.chart-span-4 { grid-column: span 4 !important; }
.chart-span-5 { grid-column: span 5 !important; }
.chart-span-6 { grid-column: span 6 !important; }
.chart-span-7 { grid-column: span 7 !important; }
.chart-span-8 { grid-column: span 8 !important; }
.chart-span-12 { grid-column: span 12 !important; }

/* Kolom bertumpuk untuk dua doughnut pendamping */
.charts-bento-stack {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.charts-bento-stack .chart-card { grid-column: auto; flex: 1; }

/* Chart utama (hero) — penekanan tenang lewat garis atas emas Makara, tanpa wash ungu */
.chart-card-hero {
  background: var(--surface);
  border-color: var(--border-strong);
  border-top: 2px solid var(--gold);
}
.chart-card-hero .chart-card-header h3 {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--ink);
}

/* Chart peringatan (belum naik jabatan) — tenang, tanpa radial red wash */
.chart-card-alert {
  background: var(--surface);
  border-color: var(--border);
  border-top: 2px solid var(--bad);
}
.chart-card-alert .chart-card-header h3 { color: var(--ink); }

@media (max-width: 1100px) {
  .charts-bento .chart-card,
  .chart-span-4, .chart-span-5, .chart-span-6,
  .chart-span-7, .chart-span-8, .chart-span-12,
  .charts-bento-stack {
    grid-column: 1 / -1 !important;
  }
  .charts-bento { grid-template-columns: 1fr; }
}

/* Kartu ringkasan temuan stagnasi jabfung */
.stagnasi-total {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bad-soft);
  border: 1px solid rgba(184, 50, 42, .18);
  margin-bottom: 16px;
}
.stagnasi-total-num {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
  color: var(--bad);
  font-variant-numeric: tabular-nums;
}
.stagnasi-total-lbl {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.stagnasi-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.stagnasi-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.stagnasi-bar-head b {
  font-family: var(--mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--bad);
}
.stagnasi-bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  overflow: hidden;
}
.stagnasi-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--bad);
  transition: width .45s var(--ease);
}
.stagnasi-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.stagnasi-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}

/* =====================================================================
   HOMEPAGE & PUBLIC LANDING PAGE STYLES (EDITORIAL AKADEMIK FKG UI)
   ===================================================================== */
#landingScreen {
  min-height: 100vh;
  background: var(--bg-landing);
  color: var(--ink);
  overflow-x: clip;
  --landing-nav-h: 64px;
  padding-top: var(--landing-nav-h);
}

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.landing-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.landing-brand-logo {
  width: 38px;
  height: 38px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.landing-brand-logo.auth-brand-logo {
  width: 48px;
  height: 48px;
  margin: 0 0 12px;
}
.landing-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.landing-brand-text h1 {
  font-family: var(--display);
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.landing-brand-text p {
  margin: 0;
  font-size: 0.74rem;
  font-family: var(--sans);
  color: var(--ink-muted);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
}
.landing-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.landing-link {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s var(--ease);
}
.landing-link:hover {
  color: var(--accent);
}
.landing-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.landing-login-link {
  background: transparent;
  border: none;
  padding: 6px 10px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.landing-login-link:hover {
  color: var(--ink);
  background: var(--surface-muted);
}
.landing-login-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pub-result-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pub-result-table-wrap table td:first-child {
  word-break: break-word;
}
.pub-result-table-wrap table td:last-child {
  white-space: nowrap;
  padding-left: 12px;
}

/* Landing Hero — Asymmetric Editorial Split dengan Ilustrasi Gedung FKG UI */
.landing-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 28px 64px;
  min-height: calc(100vh - var(--landing-nav-h));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  text-align: left;
  animation: heroEnter .42s var(--ease) both;
}
@keyframes heroEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.landing-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.landing-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.landing-hero-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
  flex-shrink: 0;
}
.landing-hero h2 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 3.8vw, 3.4rem);
  line-height: 1.08;
  font-weight: 500;
  color: var(--ink);
  max-width: 16ch;
  margin: 0 0 20px;
  letter-spacing: -0.025em;
}
.landing-hero .landing-hero-lead {
  font-size: 1.04rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 48ch;
  margin: 0 0 28px;
}
.landing-hero-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.landing-hero-actions .btn {
  height: 44px;
  padding: 0 20px;
  font-size: 0.9rem;
}
.landing-hero-note {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.landing-hero-note a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
}
.landing-hero-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.landing-hero-metric .m-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}
.landing-hero-metric .m-lbl {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.35;
}
.landing-hero-visual {
  position: relative;
}
.landing-hero-frame {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-panel);
  padding: 12px;
  box-shadow: 0 12px 32px rgba(25, 27, 24, .08);
}
[data-theme="dark"] .landing-hero-frame {
  box-shadow: none;
}
.landing-hero-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3.8;
  object-fit: cover;
  object-position: center 45%;
  border-radius: 8px;
}
.landing-hero,
.landing-section {
  scroll-margin-top: 76px;
}

/* Landing Section General */
.landing-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 28px 80px;
  border-top: 1px solid var(--border);
}
.landing-section-header {
  margin-bottom: 32px;
  text-align: left;
  max-width: 62ch;
}
.landing-section-header h2 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.landing-section-header p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* Public Calc 2-Column Grid */
.public-calc-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .public-calc-grid {
    grid-template-columns: 1fr;
  }
}
.public-calc-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}
.public-calc-panel h3 {
  font-family: var(--display);
  margin: 0 0 4px;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
}
.public-calc-panel .sub {
  margin: 0 0 20px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.public-calc-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0 16px;
}
.public-result-status {
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface-muted);
  margin-bottom: 16px;
}
.public-result-status.memenuhi,
.public-result-status.ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}
.public-result-status.belum,
.public-result-status.warn {
  border-left-color: var(--gold);
  background: var(--gold-soft);
}
.public-result-status .status-tag {
  font-size: 0.74rem;
  font-family: var(--mono);
  font-weight: 500;
  margin-bottom: 4px;
}
.public-result-status .status-headline {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.public-result-status .status-desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}
.public-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}
.public-stat-row:last-child {
  border-bottom: none;
}
.public-stat-row .lbl {
  color: var(--ink-soft);
}
.public-stat-row .val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink);
}

/* Landing Footer */
.landing-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 28px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.landing-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.landing-footer-meta {
  text-align: right;
}
@media (max-width: 768px) {
  .landing-footer-meta {
    text-align: left;
  }
}

/* =====================================================================
   RESPONSIVE VIEWPORTS (TABLET & MOBILE)
   ===================================================================== */
/* Responsive Landing Hero + Nav */
@media (max-width: 960px) {
  #landingScreen { --landing-nav-h: 116px; }
  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 36px 20px 44px;
    gap: 32px;
  }
  .landing-hero h2 {
    max-width: none;
  }
  .landing-hero-frame img {
    aspect-ratio: 16 / 10;
  }
  .landing-nav {
    position: fixed;
  }
  .landing-hero,
  .landing-section {
    scroll-margin-top: 16px;
  }
  .landing-links {
    display: flex;
    order: 3;
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    padding: 0 0 2px;
    scrollbar-width: none;
  }
  .landing-links::-webkit-scrollbar { display: none; }
  .landing-link {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .landing-link:hover { background: var(--surface-hover); }
  .landing-nav-inner {
    height: auto;
    min-height: 60px;
    padding: 10px 18px;
    gap: 10px;
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 12px;
  }
  #appWrapper {
    flex-direction: column;
  }
  #topHeader {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    width: 100%;
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .header-left {
    min-width: 0;
    flex: 1 1 auto;
    gap: 10px;
  }
  .header-brand-lockup {
    min-width: 0;
    gap: 8px;
  }
  .header-brand-logo {
    width: 32px;
    height: 32px;
  }
  .brand-title {
    font-size: 0.94rem;
    line-height: 1.2;
  }
  .brand-sub {
    display: none;
  }
  .header-right {
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
  }
  #headerUserName {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #sidebar {
    top: 0;
    bottom: 0;
    width: min(280px, 84vw);
    z-index: 1200;
    transform: translateX(-100%);
    padding-top: 12px;
  }
  #sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1150;
  }
  .sidebar-backdrop.show {
    display: block;
    animation: fade .18s ease;
  }
  .sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink);
  }
  #contentArea {
    margin-top: 0;
    margin-left: 0 !important;
    width: 100%;
    padding: 14px 12px 56px;
  }
}

@media (max-width: 768px) {
  #landingScreen { --landing-nav-h: 145px; }
  .period-filter-row { overflow-x: auto; }
  .period-filter-row select { min-width: 190px; flex: 0 0 auto; }
  .landing-nav-inner {
    height: auto;
    min-height: 58px;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .landing-brand {
    min-width: 0;
    flex: 1 1 200px;
    gap: 10px;
  }
  .landing-brand-logo {
    width: 34px;
    height: 34px;
  }
  .landing-brand-text {
    min-width: 0;
  }
  .landing-brand-text p {
    font-size: 0.62rem;
    line-height: 1.25;
  }
  .landing-brand-text h1 {
    font-size: 0.94rem;
  }
  .landing-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }
  .landing-actions .theme-toggle {
    margin-right: auto;
  }
  .landing-hero {
    padding: 28px 16px 32px;
  }
  .landing-hero h2 {
    font-size: 1.95rem;
  }
  .landing-hero .landing-hero-lead {
    font-size: 0.94rem;
    margin-bottom: 22px;
  }
  .landing-hero-metrics {
    margin-top: 28px;
    padding-top: 20px;
    gap: 14px;
  }
  .landing-hero-metric .m-val {
    font-size: 1.25rem;
  }
  .landing-section {
    padding: 40px 16px 48px;
  }
  .landing-section-header {
    margin-bottom: 24px;
  }
  .landing-section-header h2 {
    font-size: 1.45rem;
  }
  .public-calc-panel {
    padding: 16px;
  }
  .public-calc-grid {
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .doclist label {
    width: 100%;
    min-height: 44px;
  }
  #panel_cetak .row-actions .btn {
    width: 100%;
    min-height: 44px;
  }
  .date-pop select {
    height: 38px;
  }
  .split-field {
    grid-template-columns: 1fr;
  }
  .year-custom-add {
    width: 100%;
    flex-wrap: wrap;
  }
  #customYearInput {
    width: auto !important;
    flex: 1 1 130px;
    min-width: 0;
  }
  .btn {
    white-space: normal;
    height: auto;
    min-height: var(--input-h);
    padding: 8px 14px;
    line-height: 1.25;
    text-align: center;
    max-width: 100%;
  }
  .btn.small {
    height: auto;
    min-height: 36px;
    padding: 6px 11px;
  }
  .btn.xs {
    height: auto;
    min-height: 34px;
    padding: 4px 9px;
  }
  #topHeader .btn.small,
  .landing-actions .btn.small,
  .auth-top-bar .btn.small {
    white-space: nowrap;
  }
  .auth-tab-btn {
    padding: 7px 8px;
    font-size: 0.78rem;
  }
  .badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
  .active-dosen-banner {
    padding: 12px 14px;
    gap: 10px;
  }
  .active-dosen-meta {
    margin-left: 0;
    display: block;
    margin-top: 2px;
  }
  .active-dosen-actions,
  .dashboard-filter-bar > div:last-child {
    width: 100%;
  }
  input[type="text"].active-dosen-search,
  .active-dosen-select {
    max-width: 100%;
    width: 100%;
    flex: 1 1 100%;
  }
  .dashboard-filter-bar {
    padding: 12px 14px;
  }
  .filter-controls-group {
    width: 100%;
  }
  .filter-field-item {
    flex: 1 1 100%;
    width: 100%;
  }
  .filter-field-item select {
    min-width: 0;
    width: 100%;
  }
  .charts-grid-2x2 {
    gap: 14px;
  }
  .chart-card {
    padding: 14px;
  }
  .chart-canvas-wrap {
    height: 230px;
  }
  .modalBackdrop {
    padding: 10px;
  }
  .modalBox {
    padding: 16px;
    max-height: 92vh;
  }
  .auth-card {
    padding: 20px 14px !important;
  }
}

@media (max-width: 600px) {
  #topHeader {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .header-right {
    width: 100%;
    justify-content: flex-end;
  }
  .header-right .user-pill {
    margin-right: auto;
    min-width: 0;
    max-width: 100%;
    padding: 3px 8px;
    font-size: 0.72rem;
  }
  #headerUserName {
    max-width: 82px;
  }
  #topHeader .btn.small {
    min-height: 34px;
    padding: 5px 9px;
    font-size: 0.76rem;
  }
}

@media (max-width: 540px) {
  .notif-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .retire-alert-banner {
    flex-direction: column;
    padding: 12px 14px;
  }
  #toastContainer {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .toastMsg {
    max-width: none;
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .docPage {
    padding: 14px 12px;
    font-size: 0.78rem;
    max-width: 100%;
    overflow-x: auto;
  }
  .docHead-inner {
    flex-direction: column;
    gap: 8px !important;
  }
  .docHead .logoBox {
    width: 56px;
    height: 56px;
  }
  .docMeta {
    flex-direction: column;
    gap: 4px;
  }
  table.doc {
    font-size: 0.75rem;
  }
  table.doc td.lbl {
    white-space: normal;
  }
  .signBlock {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .signBlock .tembusan,
  .signBlock .ttd {
    max-width: 100%;
    min-width: 0;
    text-align: left;
  }
  .ttd-box-container {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .doc-sign-pair {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }
  .doc-sign-pair > div {
    width: 100% !important;
  }
}

@media print {
  @page { size: A4 portrait; margin: 8mm 10mm; }
  /* Page setup SKTMT mengikuti KOP surat: kiri 2cm, kanan 2cm.
     Isi surat (3cm/2.5cm) di-indent lewat .sktmt-body, bukan margin negatif
     (margin negatif dipotong browser saat mencetak sehingga KOP terpotong). */
  @page sktmt {
    size: A4 portrait;
    margin-top: 8mm;
    margin-left: 2cm;
    margin-right: 2cm;
    margin-bottom: 3cm;
  }
  body { background: #fff !important; color: #111 !important; }

  /* Sembunyikan seluruh elemen antarmuka aplikasi. */
  #landingScreen,
  #loginScreen,
  #topHeader,
  #sidebar,
  #bannerContainer,
  #adminDosenContextBanner,
  #toastContainer,
  .no-print,
  footer { display: none !important; }

  /* Hanya lembaran dokumen (.docPage) yang boleh tercetak. */
  .panel { display: none !important; }
  body:not(:has(#printModal.show)) #panel_cetak { display: block !important; }

  #appWrapper { display: block !important; min-height: 0 !important; }
  body:has(#printModal.show) #appWrapper { display: none !important; }

  .modalBackdrop:not(.show) { display: none !important; }
  .modalBackdrop.show {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    backdrop-filter: none !important;
    padding: 0 !important;
  }
  .modalBackdrop.show .modalBox {
    opacity: 1 !important;
    transform: none !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }
  #contentArea { margin: 0 !important; padding: 0 !important; }
  #docArea, #printModalDocArea { overflow: visible !important; max-width: none !important; }

  .docPage, .docPage * {
    font-family: "Bookman Old Style", "URW Bookman L", "Bookman", Georgia, serif !important;
  }
  .docPage {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-after: always;
    page-break-inside: auto;
    max-width: none !important;
    width: 100% !important;
    font-size: 9.2pt;
    line-height: 1.25;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .docPage:last-child { page-break-after: auto; }
  .docPage.sktmt-page { page: sktmt; }
  /* KOP mengisi lebar penuh page setup-nya (2cm kiri, 2cm kanan = 17cm). */
  .docPage.sktmt-page .docHead {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
  }
  /* Isi surat tetap pada margin 3cm kiri / 2.5cm kanan (hanya KOP yang lebih lebar). */
  .docPage.sktmt-page .sktmt-body {
    padding-left: 1cm;
    padding-right: 0.5cm;
  }
  table.doc { font-size: 8.8pt; margin-bottom: 5px; }
  table.doc td, table.doc th { padding: 2.5px 5px; }
  .docHead { padding-bottom: 6px; margin-bottom: 6px; }
  .docHead .logoBox { width: 64px; height: 64px; }
  .docHead .logoBox .fallback { width: 58px; height: 58px; font-size: 1.15rem; }
  .docHead.docHeadKop { padding-bottom: 0; margin-bottom: 8px; }
  .docHeadKop img { max-height: 30mm; }
  /* KOP SKTMT harus mengisi lebar penuh page setup-nya, bukan ter-letterbox (contain + max-height). */
  .docPage.sktmt-page .docHeadKop img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: fill;
  }
  .signBlock { margin-top: 10px; font-size: 8.8pt; }
  .signBlock .ttd .space { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================================
   LOADING SCREEN PEMULIHAN SESI (ditampilkan saat refresh/F5 ketika sudah login)
   ===================================================================== */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--ink);
  padding: 24px;
}
.boot-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.boot-loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-strong);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: bootSpin .8s linear infinite;
}
.boot-loader-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.boot-loader-sub {
  font-size: .82rem;
  color: var(--ink-muted);
}
@keyframes bootSpin { to { transform: rotate(360deg); } }

/* =====================================================================
   VERIFIKASI & PERSETUJUAN, BADGE SIDEBAR, GOOGLE LOGIN & DIFF PROFIL
   ===================================================================== */
.nav-badge {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--bad);
  color: #FFFFFF;
  font-style: normal;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}
@media (min-width: 901px) {
  #sidebar.collapsed .nav-btn .nav-badge {
    position: absolute;
    top: 3px;
    right: 6px;
    margin-left: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.64rem;
    line-height: 16px;
    opacity: 1;
  }
}

.auth-flash-alert {
  padding: 10px 13px;
  border-radius: var(--radius);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-muted);
  color: var(--ink);
}
.auth-flash-alert.ok {
  background: var(--ok-soft, #ECFDF5);
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--ink);
}
.auth-flash-alert.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--ink);
}
.auth-flash-alert.error {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--ink);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  color: var(--ink-muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.google-btn:hover {
  background: var(--surface-muted);
  border-color: var(--accent);
}
.google-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.google-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}
.google-toggle-info {
  flex: 1 1 auto;
  min-width: 0;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 46px;
  cursor: pointer;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color .2s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform .2s ease;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.approval-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.approval-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.approval-tab-btn:hover {
  color: var(--ink);
}
.approval-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
.approval-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 500;
}
.approval-tab-btn.active .approval-tab-count {
  background: var(--accent-soft);
  border-color: var(--border-strong);
  color: var(--accent);
}

.approval-req-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 16px;
  margin-bottom: 14px;
}
.approval-req-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  margin-bottom: 12px;
}
.diff-table th,
.diff-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.diff-table th {
  font-size: 0.76rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-muted);
  background: var(--surface-muted);
}
.diff-old {
  color: var(--ink-muted);
  text-decoration: line-through;
}
.diff-new {
  color: var(--ok, #15803D);
  font-weight: 600;
}
[data-theme="dark"] .diff-new {
  color: #4ADE80;
}
.approval-meta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.profil-pending-banner {
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-left: 4px solid #D97706;
  background: rgba(245, 158, 11, 0.1);
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.5;
}
.profil-pending-banner.ok {
  border-color: rgba(22, 163, 74, 0.35);
  border-left-color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
}
.profil-pending-banner.error {
  border-color: rgba(220, 38, 38, 0.35);
  border-left-color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
}
#f_jabatan:disabled {
  background: var(--surface-muted);
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.85;
}
@media (max-width: 640px) {
  .google-toggle-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
