/* ==========================================================================
   GENESIS DESIGN SYSTEM
   OSS local component styles; production Dosen overrides below.
   OSS PNJ - Optimization Scheduling System
   Editorial precision, high density, restrained elevation.
   ========================================================================== */

@font-face {
  font-family: "General Sans";
  src: url("/fonts/general-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  src: url("/fonts/general-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Genesis interactive palette */
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-ink: #3730A3;
  --primary-soft: #EEF2FF;
  --primary-soft-2: #E0E7FF;
  --primary-border: #C7D2FE;
  --primary-bright: #818CF8;
  --on-primary: #FFFFFF;  /* text on a primary fill */
  --secondary: #20970B;

  /* Genesis surfaces */
  --neutral: #9C9C9C;
  --bg-page: #FAFAFA;
  --bg-card: #FFFFFF;
  --bg-surface-subtle: #F7F7F8;
  --bg-surface-sunken: #F1F1F3;

  /* Dark navigation keeps hierarchy; indigo marks interaction only */
  --bg-sidebar: #111113;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bg-sidebar-active: rgba(99, 102, 241, 0.18);

  /* Genesis typography */
  --text-primary: #0A0A0A;
  --text-secondary: #6B6B6B;
  --text-muted: #737373;  /* AA (4.6:1) for 11-12px captions on white */
  --text-sidebar: #C6C6CC;
  --text-sidebar-active: #FFFFFF;

  /* Legacy component aliases retained for inline React styles */
  --card: #FFFFFF;
  --border: #E8E8EC;
  --muted: #F1F1F3;
  --muted-foreground: #6B6B6B;

  /* Borders & focus */
  --border-subtle: #E8E8EC;
  --border-strong: #D7D7DC;
  --border-focus: #6366F1;

  /* Semantic status tokens */
  --success: #10B981;
  --success-ink: #047857;  /* text-safe green; #10B981 is fill-only */
  --success-bg: #ECFDF5;
  --success-border: #A7F3D0;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --warning-border: #FDE68A;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --info: #6366F1;
  --info-bg: #EEF2FF;
  --info-border: #C7D2FE;

  /* 4px spacing grid */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;

  /* Genesis radius scale */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-round: 9999px;

  /* Minimal elevation */
  --shadow-none: none;
  --shadow-subtle: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 35px rgba(10, 10, 10, 0.16);
  --shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.12);

  --font-display: "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* ==========================================================================
     TYPE SCALE — one ramp, no ad-hoc sizes.
     Every text role maps to exactly one step. Never hardcode 12.5/13.5px again.
     ========================================================================== */
  --text-display: 32px;   /* page hero, one per screen */
  --text-h1: 24px;        /* page title */
  --text-h2: 18px;        /* card / section title */
  --text-h3: 15px;        /* subsection, table group */
  --text-body: 14px;      /* default body copy, table cells */
  --text-sm: 13px;        /* secondary body, nav, buttons */
  --text-xs: 12px;        /* captions, helper text, table meta */
  --text-overline: 11px;  /* column headers, eyebrow labels */

  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.55;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Vertical rhythm — content sections share one gap */
  --stack-xs: 4px;
  --stack-sm: 8px;
  --stack-md: 16px;
  --stack-lg: 24px;
  --stack-xl: 32px;

  /* Shared content measure so every row of a page lines up on one grid */
  --content-max: 1400px;
  --content-pad: 24px;
  --card-pad: 24px;
}

/* ==========================================================================
   THEMES
   light (default) · dark · night (dim, warm, low-blue — for late sessions)
   Only tokens change; no rule below this block is theme-aware.
   ========================================================================== */

/* Dark: inverted surfaces, same accent hue family, AA text. */
:root[data-theme="dark"] {
  --primary: #818CF8;
  --primary-hover: #A5B4FC;
  --primary-ink: #C7D2FE;
  --primary-soft: rgba(129, 140, 248, 0.16);
  --primary-soft-2: rgba(129, 140, 248, 0.24);
  --primary-border: rgba(129, 140, 248, 0.38);
  --primary-bright: #C7D2FE;
  --on-primary: #14141A;  /* dark ink on a light accent: AA, never white on pastel */

  --bg-page: #0F0F12;
  --bg-card: #17171B;
  --bg-surface-subtle: #1E1E23;
  --bg-surface-sunken: #26262C;

  --bg-sidebar: #0A0A0C;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #F4F4F6;
  --text-secondary: #A8A8B4;
  --text-muted: #86868F;
  --text-sidebar: #A8A8B4;

  --card: #17171B;
  --border: #2C2C33;
  --muted: #26262C;
  --muted-foreground: #A8A8B4;

  --border-subtle: #2C2C33;
  --border-strong: #3C3C45;
  --border-focus: #818CF8;

  --success: #34D399;
  --success-bg: rgba(52, 211, 153, 0.14);
  --success-border: rgba(52, 211, 153, 0.34);
  --success-ink: #6EE7B7;
  --warning: #FBBF24;
  --warning-bg: rgba(251, 191, 36, 0.14);
  --warning-border: rgba(251, 191, 36, 0.34);
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.14);
  --danger-border: rgba(248, 113, 113, 0.34);
  --info: #818CF8;
  --info-bg: rgba(129, 140, 248, 0.14);
  --info-border: rgba(129, 140, 248, 0.34);

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 20px 35px rgba(0, 0, 0, 0.65);
  --shadow-focus: 0 0 0 3px rgba(129, 140, 248, 0.28);
}

/* Night: warmer, lower contrast than dark — kinder at 2am, still AA. */
:root[data-theme="night"] {
  --primary: #C0A585;
  --primary-hover: #D8BE9C;
  --primary-ink: #E8D5B7;
  --primary-soft: rgba(192, 165, 133, 0.16);
  --primary-soft-2: rgba(192, 165, 133, 0.24);
  --primary-border: rgba(192, 165, 133, 0.34);
  --primary-bright: #E8D5B7;
  --on-primary: #17130E;  /* dark ink on the warm accent */

  --bg-page: #16130F;
  --bg-card: #1E1A15;
  --bg-surface-subtle: #26211A;
  --bg-surface-sunken: #2E2820;

  --bg-sidebar: #100E0B;
  --bg-sidebar-hover: rgba(255, 240, 214, 0.06);

  --text-primary: #EFE4D3;
  --text-secondary: #B6A48C;
  --text-muted: #96866F;
  --text-sidebar: #B6A48C;

  --card: #1E1A15;
  --border: #352D24;
  --muted: #2E2820;
  --muted-foreground: #B6A48C;

  --border-subtle: #352D24;
  --border-strong: #463B2F;
  --border-focus: #C0A585;

  --success: #9BBF8A;
  --success-bg: rgba(155, 191, 138, 0.14);
  --success-border: rgba(155, 191, 138, 0.32);
  --success-ink: #B8D9A6;
  --warning: #D9A85F;
  --warning-bg: rgba(217, 168, 95, 0.14);
  --warning-border: rgba(217, 168, 95, 0.32);
  --danger: #D97C6A;
  --danger-bg: rgba(217, 124, 106, 0.14);
  --danger-border: rgba(217, 124, 106, 0.32);
  --info: #C0A585;
  --info-bg: rgba(192, 165, 133, 0.14);
  --info-border: rgba(192, 165, 133, 0.32);

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-modal: 0 20px 35px rgba(0, 0, 0, 0.6);
  --shadow-focus: 0 0 0 3px rgba(192, 165, 133, 0.26);
}

/* Surfaces that were hardcoded white must follow the theme. */
:root[data-theme="dark"] .dosen-view .dosen-table-card,
:root[data-theme="night"] .dosen-view .dosen-table-card,
:root[data-theme="dark"] .dash-card,
:root[data-theme="night"] .dash-card,
:root[data-theme="dark"] .dash-stats,
:root[data-theme="night"] .dash-stats,
:root[data-theme="dark"] .oss-dropdown-menu,
:root[data-theme="night"] .oss-dropdown-menu { background: var(--bg-card); }

:root[data-theme="dark"] td code,
:root[data-theme="night"] td code { background: var(--bg-surface-sunken); color: var(--text-secondary); }

:root[data-theme="dark"] .dash-period,
:root[data-theme="night"] .dash-period { background: var(--bg-card); }

:root[data-theme="dark"] .dash-check,
:root[data-theme="night"] .dash-check { background: var(--bg-card); }

:root[data-theme="dark"] .login-card,
:root[data-theme="night"] .login-card { background: var(--bg-card); }

:root[data-theme="dark"] .login-shell::before,
:root[data-theme="night"] .login-shell::before { background: var(--bg-page); }

:root[data-theme="dark"] .oss-mobile-menu,
:root[data-theme="night"] .oss-mobile-menu { background: var(--bg-sidebar); }

/* Native controls and scrollbars follow the theme instead of staying light. */
:root[data-theme="dark"], :root[data-theme="night"] { color-scheme: dark; }
:root[data-theme="night"] { color-scheme: dark; }

*, *::before, *::after {
  box-sizing: border-box;
}

/* Controls must be theme-aware; the base input styles were written for light only. */
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="night"] input,
:root[data-theme="night"] select,
:root[data-theme="night"] textarea {
  background: var(--bg-surface-sunken);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
:root[data-theme="dark"] input::placeholder,
:root[data-theme="night"] input::placeholder { color: var(--text-muted); }
:root[data-theme="dark"] select option,
:root[data-theme="night"] select option { background: var(--bg-card); color: var(--text-primary); }

:root[data-theme="dark"] .btn-secondary,
:root[data-theme="night"] .btn-secondary {
  background: var(--bg-surface-subtle);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
:root[data-theme="dark"] .btn-secondary:hover,
:root[data-theme="night"] .btn-secondary:hover { background: var(--bg-surface-sunken); }

/* Secondary buttons live in cards here, not in the dark navbar. */
:root[data-theme="dark"] .section-header .btn-secondary,
:root[data-theme="night"] .section-header .btn-secondary,
:root[data-theme="dark"] .actions .btn-secondary,
:root[data-theme="night"] .actions .btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
:root[data-theme="dark"] .section-header .btn-secondary:hover,
:root[data-theme="night"] .section-header .btn-secondary:hover,
:root[data-theme="dark"] .actions .btn-secondary:hover,
:root[data-theme="night"] .actions .btn-secondary:hover { background: var(--bg-surface-subtle); }

/* Dashed/ghost affordances and code chips follow the surface scale. */
:root[data-theme="dark"] .toolbar,
:root[data-theme="night"] .toolbar { background: transparent; }
:root[data-theme="dark"] .search-box,
:root[data-theme="night"] .search-box { background: var(--bg-surface-sunken); border-color: var(--border-strong); }

/* Muted text is doing real work inside tables; lift it one step on dark surfaces. */
:root[data-theme="dark"] th,
:root[data-theme="night"] th { color: var(--text-secondary); }

/* On dark surfaces a 1px border built from a light-theme token disappears;
   selects and inputs need a defined edge, not a shadow. */
:root[data-theme="dark"] select,
:root[data-theme="night"] select,
:root[data-theme="dark"] input[type="text"],
:root[data-theme="night"] input[type="text"],
:root[data-theme="dark"] input[type="email"],
:root[data-theme="night"] input[type="email"],
:root[data-theme="dark"] input[type="password"],
:root[data-theme="night"] input[type="password"] {
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-sunken);
}

/* A dash means "no exception", not "missing" — keep it readable. */
:root[data-theme="dark"] .cell-empty,
:root[data-theme="night"] .cell-empty { color: var(--text-secondary); }

/* Row emphasis: the exception row should out-weigh an ordinary bold number. */
.status-dot-warn { color: var(--text-primary); }

/* Theme swap must be instant: transitioning colours whose value comes from a
   changed custom property leaves the element painted with the stale colour. */

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .top h1, .panel h2, .section-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
}

code, kbd, pre, .font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   LOGIN SHELL & AUTH CARD
   ========================================================================== */
.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: var(--bg-sidebar);
  background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 24px 24px;
}

.login-shell { grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); place-items: stretch; padding: 0; }
.login-hero { display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(32px, 7vw, 96px); color: #fff; background: var(--bg-sidebar); }
.login-hero-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; }
.login-hero-brand b { display: block; font-size: 28px; font-family: var(--font-display); letter-spacing: -0.035em; }
.login-hero-brand span { color: var(--text-sidebar); font-size: 13px; }
.login-hero h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.1; margin: 0 0 48px; }
.login-hero h2 strong { color: var(--primary-bright); }
.login-hero small { color: var(--primary-bright); }
.login-card { align-self: center; margin: 32px; }
.card {
  width: min(440px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-modal);
  position: relative;
}

.ta-status { cursor: pointer; min-width: 82px; }
.ta-status:focus-visible { outline: 3px solid rgba(43,168,162,.35); outline-offset: 2px; }
.ta-status:disabled { cursor: wait; opacity: .65; }

/* Clickable status toggle — Jurusan / Program Studi (parity: table-state interaction). */
.status-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 4px 12px;
  border-radius: 9999px; font-size: 12px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.status-toggle-on { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.status-toggle-on:hover { background: #d1fae5; border-color: #6ee7b7; }
.status-toggle-off { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.status-toggle-off:hover { background: #e5e7eb; color: #4b5563; }
.status-toggle.pending { opacity: .6; cursor: wait; }
.status-toggle:focus-visible { outline: 3px solid rgba(4,120,87,.3); outline-offset: 2px; }
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.seal {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-strong);
  flex-shrink: 0;
  overflow: hidden;
}

.seal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand span {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-ink);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  margin-top: 3px;
}

.card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.card > p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 13px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   FORMS & INPUT CONTROLS
   ========================================================================== */
label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-primary);
}

input, select, textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  height: 38px;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
  background: var(--bg-card);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ==========================================================================
   BUTTONS (Genesis 6px Radius, Crisp Hover)
   ========================================================================== */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  /* Never transition colours: their value comes from themed custom properties. */
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}

button:active:not(:disabled), .btn:active:not(:disabled) {
  transform: translateY(1px);
}

button[type="submit"]:not(.btn) {
  width: 100%;
  margin-top: 20px;
  padding: 10px 16px;
  min-height: 40px;
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary-hover);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-subtle);
}

button[type="submit"]:not(.btn):hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-ink);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-none);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-surface-subtle);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--bg-card);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: var(--on-primary);
  border-color: var(--danger);
}

.btn-outline-primary {
  background: var(--primary-soft);
  color: var(--primary-ink);
  border-color: var(--primary-border);
}

.btn-outline-primary:hover:not(:disabled) {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary-hover);
}

.btn-sm {
  padding: 4px 10px;
  min-height: 28px;
  font-size: 12px;
  border-radius: var(--radius-xs);
}

button:disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 12px 0 0;
  font-size: 12.5px;
  font-weight: 500;
}

/* ==========================================================================
   APP LAYOUT & SIDEBAR (Deep Slate Ink)
   ========================================================================== */
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  background: var(--bg-sidebar);
  color: #FFFFFF;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid #1F2937;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar nav {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.sidebar .user-box {
  flex: 0 0 auto;
}

.sidebar-header {
  flex: 0 0 auto;
}

.sidebar .brand {
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.sidebar-close,
.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.top-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar .seal {
  background: #161B22;
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar .brand b {
  color: #FFFFFF;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.sidebar .brand span {
  background: rgba(99, 102, 241, 0.18);
  color: var(--primary-bright);
  border-color: rgba(99, 102, 241, 0.35);
  font-size: 10px;
}

/* ==========================================================================
   REKAP WORKSPACE — labelled filters, real tabs, totals row
   ========================================================================== */
.rekap-workspace { display: flex; flex-direction: column; gap: var(--stack-md); margin-bottom: var(--stack-md); }

.rekap-filters { display: flex; align-items: flex-end; gap: var(--stack-md); flex-wrap: wrap; }
.rekap-filters .field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rekap-filters .field-grow { flex: 1 1 260px; }
.field-label { font-size: var(--text-overline); font-weight: var(--weight-semibold); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.06em; }
.rekap-filters select, .rekap-filters .search-box { height: 36px; font-size: var(--text-sm); min-width: 0; width: 100%; }

/* Tabs: one clear active state, no wrapping row of equal-weight buttons. */
.rekap-tabs { display: flex; gap: var(--stack-xs); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-subtle); }
.rekap-tabs::-webkit-scrollbar { display: none; }
.rekap-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 9px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.rekap-tab:hover { color: var(--text-primary); }
.rekap-tab.is-active { color: var(--primary-hover); border-bottom-color: var(--primary); font-weight: var(--weight-semibold); }
.rekap-tab-meta { font-style: normal; font-size: var(--text-overline); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rekap-tab.is-active .rekap-tab-meta { color: var(--primary-hover); }

/* Numeric columns right-align so values form a scannable column. */
th.num, td.num,
.dosen-view th.num, .dosen-view td.num,
.master-data .panel table th.num, .master-data .panel table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.col-nip, th.col-status { text-align: left; }
td .unit { color: var(--text-muted); font-size: var(--text-xs); }

/* Totals row: the reason the page is called a recap. */
tfoot td {
  border-top: 1px solid var(--border-strong);
  border-bottom: none;
  background: var(--bg-surface-subtle);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  padding: 11px var(--stack-md);
}
tfoot td b { font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .rekap-filters .field, .rekap-filters .field-grow { flex: 1 1 100%; }
}

/* Small indigo text uses the darker accessible shade; indigo remains for actions */
a {
  color: var(--primary-hover);
}

a:hover {
  color: var(--primary-ink);
}

.nav-section {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  padding: 10px 10px 4px;
}

nav {
  display: grid;
  gap: 2px;
  flex: 1;
}

nav a {
  color: var(--text-sidebar);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 2px solid transparent;
}

nav a:hover {
  background: var(--bg-sidebar-hover);
  color: #FFFFFF;
}

nav a.active {
  background: var(--bg-sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
  border-left-color: var(--primary-bright);
}

.user-box {
  margin-top: auto;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-box b {
  font-size: 12px;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-box span {
  color: var(--primary-bright);
  font-size: 10.5px;
  font-weight: 600;
}

/* ==========================================================================
   MAIN CONTENT AREA & HEADER
   ========================================================================== */
.main {
  padding: var(--stack-lg) var(--content-pad);
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
}

.top h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

/* ==========================================================================
   CARDS, PANELS & HIGH-DENSITY METRICS
   ========================================================================== */
.grid, .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat, .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}

.stat:hover, .stat-card:hover {
  border-color: var(--border-strong);
}

.stat b, .stat-card b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat span, .stat-card span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--card-pad);
  margin-top: var(--stack-md);
  box-shadow: var(--shadow-subtle);
}

.panel h2 {
  margin: 0 0 var(--stack-xs);
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

.panel > p {
  margin: 0 0 var(--stack-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

/* ==========================================================================
   SECTION HEADERS, TABS & TOOLBARS
   ========================================================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--stack-md);
  margin-bottom: var(--stack-md);
  padding-bottom: var(--stack-md);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.section-header .sub-tabs {
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-header p {
  margin: var(--stack-xs) 0 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.sub-tabs, .tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-surface-sunken);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid var(--border-subtle);
}

.sub-tab {
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 30px;
}

.sub-tab:hover {
  color: var(--text-primary);
}

.sub-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-subtle);
}

.toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.filter-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group select, .toolbar select {
  width: auto;
  min-width: 160px;
}

/* ==========================================================================
   DATA TABLES (Editorial Precision, High Density)
   ========================================================================== */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body);
  font-variant-numeric: tabular-nums;
}

th, td {
  text-align: left;
  padding: 10px var(--stack-md);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

th {
  background: var(--bg-surface-subtle);
  font-weight: var(--weight-semibold);
  font-size: var(--text-overline);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
  height: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

tbody tr {
  transition: background-color 0.1s ease;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-surface-subtle);
}

td code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-surface-sunken);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
}

/* Data, not state: identifiers read as text so real status chips stand out. */
td code.nip {
  background: none;
  border: 0;
  padding: 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.col-nip { white-space: nowrap; width: 132px; }
.col-nip code.nip { font-size: 11.5px; }
.col-status { white-space: nowrap; width: 104px; }

/* Quiet status marker: a dot carries the signal, the label stays secondary. */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  white-space: nowrap;
}
.status-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-round);
  background: var(--text-muted);
  flex: none;
}
.status-dot-ok { color: var(--text-secondary); }
.status-dot-ok::before { background: var(--success); }
.status-dot-warn { color: var(--text-secondary); }
.status-dot-warn::before { background: var(--warning); }

/* Explicit "no value" so an empty cell never looks like a rendering bug. */
.cell-empty { color: var(--text-muted); }

/* ==========================================================================
   BADGES (Genesis 4px Radius Chips)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-success {
  background: var(--success-bg);
  color: var(--primary-ink);
  border: 1px solid var(--success-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
}

.badge-muted {
  background: var(--bg-surface-sunken);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-star {
  background: var(--primary-soft);
  color: var(--primary-ink);
  border: 1px solid var(--primary-border);
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.45);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}

.modal {
  background: var(--bg-card);
  width: min(540px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-modal);
  animation: modalScaleIn 0.15s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 18px;
  min-height: 28px;
  width: 28px;
  padding: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--bg-surface-sunken);
  color: var(--text-primary);
}

.modal-body {
  padding: 18px 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  margin-top: 0;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   ALERTS & EMPTY STATES
   ========================================================================== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-left-width: 3px;
  border-left-style: solid;
}

.alert-success {
  background: var(--success-bg);
  color: var(--primary-ink);
  border: 1px solid var(--success-border);
  border-left: 3px solid var(--primary);
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
}

.alert-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid var(--info-border);
  border-left: 3px solid var(--info);
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-secondary);
  background: var(--bg-surface-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.empty-state p {
  margin: 0;
  font-size: 13px;
}

.btn-group, .actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 900px) {
  .login-shell { display: block; padding: 24px; }
  .login-hero { display: none; }
  .login-card { margin: 0 auto; }

  .layout {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1100;
    width: min(310px, 86vw);
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 32px rgba(13, 17, 23, 0.24);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  .sidebar-header .brand {
    flex: 1;
    min-width: 0;
  }

  .sidebar-close {
    display: inline-flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    font-size: 22px;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    width: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(13, 17, 23, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .sidebar-backdrop.open {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .sidebar-toggle {
    display: inline-flex;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
  }

  .top {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -16px -16px 16px;
    border-radius: 0;
  }

  .top > .badge {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .main {
    max-width: none;
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .section-header {
    align-items: stretch;
  }

  .section-header > .btn,
  .section-header > button {
    width: 100%;
  }

  .sub-tabs,
  .tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .sub-tab {
    flex: 0 0 auto;
  }

  .toolbar,
  .filter-group {
    align-items: stretch;
  }

  .toolbar input,
  .toolbar select,
  .filter-group input,
  .filter-group select,
  .search-box {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-responsive {
    max-width: calc(100vw - 32px);
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92dvh;
    border-radius: 12px 12px 0 0;
  }
}

@media (max-width: 480px) {
  .grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .top h1 {
    font-size: 16px;
  }
}

/* ==========================================================================
 DASHBOARD — production parity (evidence/prod_screenshots/dashboard.png,
 recovered chunk_xae.js). Scoped to .dashboard-view only.
 ========================================================================== */
.dashboard-view { animation: dash-fade-in .3s ease; }
@keyframes dash-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* One shared rhythm: every dashboard row uses the same gap and full width. */
.dashboard-view { display: flex; flex-direction: column; gap: var(--stack-lg); }

.dash-header { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--stack-md); flex-wrap: wrap; }
.dash-greeting { margin: 0; font-family: var(--font-display); font-size: var(--text-h1); font-weight: var(--weight-bold); letter-spacing: -0.025em; line-height: var(--leading-tight); color: var(--text-primary); }
.dash-sub { margin: var(--stack-xs) 0 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-snug); }
.dash-sub b { color: var(--text-primary); font-weight: var(--weight-semibold); }

.dash-period { display: flex; align-items: center; gap: var(--stack-sm); background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 5px 8px 5px var(--stack-md); min-height: 36px; }
.dash-period select { flex: 1; }
.dash-period-label { font-size: var(--text-xs); color: var(--text-secondary); white-space: nowrap; }
.dash-period select { border: none; background: transparent; font-family: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); outline: none; cursor: pointer; max-width: 240px; padding-right: 2px; appearance: auto; }
.dash-period:focus-within { border-color: var(--border-focus); box-shadow: var(--shadow-focus); }

.dash-warning { display: flex; align-items: center; gap: var(--stack-sm); background: var(--warning-bg); border: 1px solid var(--warning-border); border-radius: var(--radius-md); padding: 10px var(--stack-md); }
.dash-warning svg { width: 18px; height: 18px; color: var(--warning); flex: none; }
.dash-warning span { flex: 1; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); }
.dash-warning-btn { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-primary); background: var(--bg-card); border: 1px solid var(--warning-border); border-radius: var(--radius-sm); padding: 5px var(--stack-sm); white-space: nowrap; text-decoration: none; transition: background .15s ease; }
.dash-warning-btn:hover { background: var(--warning-bg); }

/* KPI strip: equal columns, one gap, numerals on a tabular scale. */
/* KPI reads as ONE strip so its columns match the card grid below it. */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-stat {
  display: flex;
  flex-direction: column;
  gap: var(--stack-sm);
  padding: var(--stack-lg);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: background-color .15s ease;
}
.dash-stat + .dash-stat { border-left: 1px solid var(--border-subtle); }
.dash-stat:hover { background: var(--bg-surface-subtle); }
.dash-stat-top { display: flex; align-items: center; gap: var(--stack-sm); min-width: 0; }
.dash-stat-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary-ink); }
.dash-stat-icon svg { width: 15px; height: 15px; }
.dash-stat-label { font-size: var(--text-xs); color: var(--text-secondary); font-weight: var(--weight-medium); line-height: var(--leading-snug); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-stat b { font-family: var(--font-display); font-size: var(--text-display); font-weight: var(--weight-bold); color: var(--text-primary); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; }
.dash-stat-green .dash-stat-icon,
.dash-stat-blue .dash-stat-icon,
.dash-stat-amber .dash-stat-icon { background: var(--primary-soft); color: var(--primary-ink); }

.dash-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--stack-lg); }
.dash-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: var(--card-pad); }
.dash-card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, box-shadow .15s ease; }
.dash-card-link:hover { border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.dash-card-link:hover h3 { color: var(--primary-hover); }
.dash-card-head { display: flex; align-items: center; gap: var(--stack-sm); margin-bottom: var(--stack-md); min-height: 36px; }
.dash-card-head h3 { margin: 0; font-size: var(--text-h3); font-weight: var(--weight-semibold); color: var(--text-primary); letter-spacing: -0.01em; }
.dash-card-head p { margin: 2px 0 0; font-size: var(--text-xs); color: var(--text-muted); }
.dash-tile { width: 36px; height: 36px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; background: var(--bg-surface-sunken); color: var(--text-secondary); }
.dash-tile svg { width: 18px; height: 18px; }
.dash-tile-blue, .dash-tile-green { background: var(--primary-soft); color: var(--primary-ink); }
.dash-metric { display: flex; justify-content: space-between; align-items: baseline; gap: var(--stack-sm); font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--stack-sm); }
.dash-metric b { font-size: var(--text-body); font-weight: var(--weight-semibold); color: var(--text-primary); font-variant-numeric: tabular-nums; }
.dash-pct { font-style: normal; font-weight: var(--weight-medium); color: var(--text-secondary); margin-left: 6px; }
.dash-track { width: 100%; height: 10px; background: var(--bg-surface-sunken); border-radius: var(--radius-round); overflow: hidden; }
.dash-fill { height: 100%; min-width: 10px; border-radius: var(--radius-round); transition: width .5s ease; background: var(--primary); }
.dash-fill-blue, .dash-fill-green { background: var(--primary); }
/* 100% must look finished, not like a border. */
.dash-card.is-complete .dash-fill { background: var(--success); }
.dash-card.is-complete .dash-metric b { color: var(--text-primary); }
.dash-done { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--success-ink); }
.dash-done svg { width: 13px; height: 13px; }
.dash-foot { margin: var(--stack-sm) 0 0; font-size: var(--text-xs); color: var(--text-secondary); line-height: var(--leading-snug); }

/* Lower zone: the dashboard must answer "what now?", not just "how many". */
.dash-lower { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--stack-lg); align-items: stretch; }
.dash-lower > .dash-card { display: flex; flex-direction: column; height: 100%; }
.dash-attention .dash-action-list { flex: 1; }

.dash-attention-list, .dash-recent-list { list-style: none; margin: 0; padding: 0; }
.dash-attention-list > li + li, .dash-recent-list > li + li { border-top: 1px solid var(--border-subtle); }

.dash-attention-item {
  display: flex;
  align-items: center;
  gap: var(--stack-md);
  padding: 10px 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  transition: background-color .12s ease;
}
.dash-attention-item:hover { background: var(--bg-surface-subtle); }
.dash-attention-item:hover .dash-attention-arrow { color: var(--text-primary); transform: translateX(2px); }

.dash-attention-count {
  flex: none;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
}
.dash-attention-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-attention-body strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.dash-attention-body span { font-size: var(--text-xs); color: var(--text-secondary); line-height: var(--leading-snug); }
.dash-attention-arrow { width: 16px; height: 16px; flex: none; color: var(--text-muted); margin-left: auto; transition: transform .12s ease, color .12s ease; }

.dash-recent-item { display: flex; align-items: center; gap: var(--stack-md); padding: 10px 0; text-decoration: none; color: inherit; border-radius: var(--radius-sm); transition: background-color .12s ease, padding .12s ease; }
.dash-recent-item:hover { background: var(--bg-surface-subtle); }
.dash-recent-day {
  flex: none;
  width: 68px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-transform: none;
}
.dash-recent-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-recent-main strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-recent-main span { font-size: var(--text-xs); color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-recent-time { margin-left: auto; flex: none; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Status grid replaces a hollow empty state: every cell must earn its space. */
.dash-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); border-radius: var(--radius-sm); overflow: hidden; }
.dash-check { background: var(--bg-card); padding: 12px var(--stack-md); }
.dash-check-label { display: block; font-size: var(--text-xs); color: var(--text-secondary); }
.dash-check-value { display: block; margin-top: 2px; font-family: var(--font-display); font-size: var(--text-h2); font-weight: var(--weight-bold); color: var(--text-primary); font-variant-numeric: tabular-nums; letter-spacing: -0.025em; }
.dash-check-note { display: flex; align-items: center; gap: var(--stack-sm); margin: auto 0 0; padding-top: var(--stack-md); font-size: var(--text-xs); color: var(--text-secondary); }
.dash-check-note + * { margin-bottom: 0; }

.dash-action-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--stack-sm); flex: 1; }
/* The <li> is the flex item; letting the <a> grow does nothing. */
.dash-attention .dash-action-list > li { flex: 1; display: flex; min-height: 0; }
.dash-action {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  gap: var(--stack-md);
  padding: 10px var(--stack-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color .12s ease, background-color .12s ease;
}
.dash-action:hover { border-color: var(--primary-border); background: var(--primary-soft); }
.dash-action-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--bg-surface-sunken); color: var(--text-secondary); }
.dash-action-icon svg { width: 16px; height: 16px; }
.dash-action:hover .dash-action-icon { background: var(--bg-card); color: var(--primary-ink); }
.dash-action.is-alert { border-color: var(--warning-border); }
.dash-action.is-alert .dash-action-icon { background: var(--warning-bg); color: var(--warning); }
.dash-action.is-alert:hover { background: var(--warning-bg); }
.dash-action-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dash-action-body strong { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.dash-action-body span { font-size: var(--text-xs); color: var(--text-secondary); line-height: var(--leading-snug); }
.dash-action-cta { flex: none; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--primary-hover); }
.dash-action:hover .dash-action-cta { color: var(--primary-ink); }

/* Empty state: explicit, never an unexplained void. */
.dash-empty { display: flex; align-items: flex-start; gap: var(--stack-sm); padding: var(--stack-sm) 0 2px; }
.dash-empty-icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: var(--radius-round); background: var(--success-bg); color: var(--success); }
.dash-empty-icon svg { width: 15px; height: 15px; }
.dash-empty strong { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); }
.dash-empty p { margin: 2px 0 0; font-size: var(--text-xs); color: var(--text-secondary); line-height: var(--leading-snug); }

.dash-link { display: inline-block; margin-top: var(--stack-md); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--primary-hover); text-decoration: none; }
.dash-link:hover { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
  .dash-lower { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-progress { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .dash-header { flex-direction: column; align-items: stretch; }
  .dash-period { justify-content: space-between; }
  /* Three metrics stay on one line: stacking three single digits wastes a screen. */
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-stat { padding: var(--stack-md) var(--stack-sm); gap: 6px; }
  .dash-stat + .dash-stat { border-left: 1px solid var(--border-subtle); }
  .dash-stat-top { flex-direction: column; align-items: flex-start; gap: 4px; }
  .dash-stat-icon { width: 24px; height: 24px; border-radius: var(--radius-xs); }
  .dash-stat-icon svg { width: 13px; height: 13px; }
  .dash-stat-label { font-size: var(--text-overline); white-space: normal; line-height: 1.25; }
  .dash-stat b { font-size: var(--text-h2); }
}

/* Theme switch: a control, not a card. Inherits navbar chrome. */
.theme-switch { display: inline-flex; align-items: center; }
.theme-switch select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  cursor: pointer;
}
.theme-switch select:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.theme-switch option { color: var(--text-primary); background: var(--bg-card); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Navbar actions: logout is a quiet ghost, never the loudest element on screen. */
.oss-navbar .btn.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}
.oss-navbar .btn.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}
.oss-navbar .oss-user-pill { min-height: 36px; padding: 3px 10px 3px 4px; }

/* ==========================================================================
 PRODUCTION OSS TOP NAVBAR & NAVIGATION BARS
 ========================================================================== */
.oss-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-sidebar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 0 max(24px, calc((100vw - 1400px) / 2));
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: none;
}

.oss-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.oss-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px;
  object-fit: contain;
}

.oss-brand-text h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
  color: #ffffff;
}

.oss-brand-text p {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1;
}

.oss-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}

.oss-nav-links .oss-nav-btn {
  border-left: 0;
  font-size: 13px;
  white-space: nowrap;
}

.oss-nav-links a.oss-nav-btn:hover,
.oss-nav-links a.oss-nav-btn:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.oss-nav-item {
  position: relative;
}

.oss-nav-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.oss-nav-btn:hover,
.oss-nav-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.oss-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
}

.oss-dropdown-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s ease;
}

.oss-dropdown-item:hover,
.oss-dropdown-item.active {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

.oss-navbar .user-box {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  flex-direction: row;
}

.oss-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #ffffff;
}

.oss-user-pill:hover {
  background: rgba(255, 255, 255, 0.2);
}

.oss-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oss-page-header {
  margin-bottom: 24px;
}

.oss-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.oss-breadcrumbs span {
  color: var(--text-primary);
  font-weight: 600;
}

.oss-mobile-menu {
  display: none;
  background: #17171A;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
}

.oss-mobile-menu.open {
  display: block;
}

.oss-mobile-section-title {
  padding: 10px 12px 4px;
  color: var(--text-sidebar);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oss-mobile-menu a,
.oss-mobile-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-sidebar);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}

.oss-mobile-menu a:hover,
.oss-mobile-menu a.active,
.oss-mobile-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (min-width: 901px) {
  .oss-navbar .sidebar-toggle,
  .oss-mobile-menu {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .oss-navbar {
    padding: 0 16px;
  }

  .oss-nav-links,
  .hide-mobile {
    display: none !important;
  }

  .main {
    padding: 20px 16px;
  }
}


/* Fresh authenticated OSS production parity: /master/dosen, desktop capture. */
body { background: var(--bg-page); color: var(--text-primary); font-family: var(--font-body); }
.dosen-view { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; }
.dosen-view .dosen-page-header { display:flex; align-items:center; justify-content:space-between; gap:16px; margin: 0 0 28px; padding: 0; border: 0; }
.dosen-title-group { display:flex; align-items:center; gap:12px; }
.dosen-title-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:12px; background:var(--primary-soft); color:var(--primary); font-size:24px; }
.dosen-view .section-header h2 { margin:0; color:var(--text-primary); font-size:24px; line-height:32px; font-weight:700; }
.dosen-view .section-header p { margin:2px 0 0; color:var(--text-secondary); font-size:14px; }
.dosen-view .dosen-table-card { overflow:hidden; border:1px solid var(--border-subtle); border-radius:16px; background:#fff; }
.dosen-table-summary { height:52px; display:flex; align-items:center; justify-content:flex-end; padding:0 16px; border-bottom:1px solid var(--border-subtle); color:var(--text-secondary); font-size:14px; }
.dosen-view .table-responsive { overflow-x:auto; }
.dosen-view table { width:100%; border-collapse:collapse; font-size:14px; }
.dosen-view thead { background:var(--bg-surface-subtle); }
.dosen-view th { height:41px; padding:12px 16px; color:var(--text-secondary); font-size:12px; font-weight:600; letter-spacing:.05em; text-align:left; text-transform:uppercase; white-space:nowrap; }
.dosen-view td { height:53px; padding:12px 16px; border-top:1px solid var(--border-subtle); color:var(--text-secondary); font-size:14px; vertical-align:middle; }
.dosen-view td code { display:inline-block; padding:3px 7px; border-radius:4px; background:var(--bg-surface-sunken); color:var(--text-secondary); font:12px ui-monospace,SFMono-Regular,Menlo,monospace; }
.dosen-view td strong { color:var(--text-primary); font-weight:500; }
.dosen-view .btn-secondary, .dosen-view .btn-primary { min-height:36px; padding:8px 16px; border-radius:var(--radius-sm); font-size:var(--text-sm); font-weight:var(--weight-medium); box-shadow:none; }
.dosen-view .btn-secondary { border:1px solid var(--border-strong); background:var(--bg-card); color:var(--text-secondary); }
.dosen-view .btn-secondary:hover { background:var(--bg-surface-subtle); color:var(--text-primary); }
.dosen-view .btn-primary { border:1px solid var(--primary); background:var(--primary); color:var(--on-primary); }
.dosen-view .btn-primary:hover { background:var(--primary-hover); border-color:var(--primary-hover); }
.dosen-view .pagination-bar { border-top:1px solid var(--border-subtle); padding:12px 16px; }
@media(max-width:900px){ .dosen-view .dosen-page-header{align-items:flex-start;flex-direction:column}.dosen-view .dosen-page-header>div:last-child{width:100%}.dosen-view .table-responsive{overflow-x:auto}.dosen-view table{min-width:900px} }

/* Master Data production shell/table visual baseline from authenticated captures. */
body:has(.master-data) { background:var(--bg-page); color:var(--text-primary); font-family:var(--font-body); }
body:has(.master-data) .oss-navbar { min-height:64px; background:var(--bg-sidebar); box-shadow:none; }
.main.master-data { max-width:1400px; margin:0 auto; padding:24px; }
.master-data .master-data-view .toolbar { display:flex; }
.master-data .master-data-view .section-header .master-title-icon { width:48px; height:48px; flex:none; display:grid; place-items:center; border-radius:12px; background:var(--primary-soft); color:var(--primary); }
.master-data .master-data-view .section-header .master-title-icon svg { width:24px; height:24px; }
.master-data .master-data-view .section-header .master-title-group { display:flex; align-items:center; gap:12px; }
.master-data .master-data-view .btn-group { flex-wrap:nowrap; }
.master-data .master-data-view .btn-group .btn { width:30px; height:30px; padding:5px; min-height:30px; border:0; border-radius:8px; background:transparent; color:var(--primary); box-shadow:none; font-size:0; }
.master-data .master-data-view .btn-group .btn-danger { color:#ef4444; }
.master-data .master-data-view .btn-group .btn svg { width:17px; height:17px; }
.master-data .master-data-view .btn-group .btn:hover { background:var(--primary-soft); }
.master-data .master-data-view .btn-group .btn-danger:hover { background:#fef2f2; color:var(--danger); }
.master-data .panel:has(.section-header) { background:transparent; border:0; box-shadow:none; padding:0; overflow:visible; }
.master-data .panel .section-header { min-height:48px; margin:0 0 28px; padding:0; border:0; }
.master-data .panel .section-header h2 { margin:0; color:var(--text-primary); font-size:24px; line-height:32px; font-weight:700; }
.master-data .panel .section-header p { margin:2px 0 0; color:var(--text-secondary); font-size:14px; }
.master-data .panel .table-responsive { overflow-x:auto; border:1px solid var(--border-subtle); border-radius:16px 16px 0 0; background:#fff; }
.master-data .panel table { width:100%; border-collapse:collapse; font-size:14px; }
.master-data .panel table thead { background:var(--bg-surface-subtle); }
.master-data .panel table th { height:41px; padding:12px 16px; color:var(--text-secondary); font-size:12px; font-weight:600; letter-spacing:.05em; text-align:left; text-transform:uppercase; white-space:nowrap; }
.master-data .panel table td { min-height:53px; padding:12px 16px; border-top:1px solid var(--border-subtle); color:var(--text-secondary); font-size:14px; vertical-align:middle; }
.master-data .panel .section-header .btn-secondary, .master-data .panel .section-header .btn-primary { min-height:36px; padding:8px 16px; border-radius:var(--radius-sm); font-size:var(--text-sm); font-weight:var(--weight-medium); box-shadow:none; }
.master-data .panel .section-header .btn-secondary { border:1px solid var(--border-strong); background:var(--bg-card); color:var(--text-secondary); }
.master-data .panel .section-header .btn-secondary:hover { background:var(--bg-surface-subtle); color:var(--text-primary); }
.master-data .panel .section-header .btn-primary { border:1px solid var(--primary); background:var(--primary); color:var(--on-primary); }
.master-data .panel .section-header .btn-primary:hover { background:var(--primary-hover); border-color:var(--primary-hover); }
.master-data .panel > .pagination-bar { border:1px solid var(--border-subtle); border-top:1px solid var(--border-subtle); border-radius:0 0 16px 16px; background:#fff; padding:12px 16px; }
@media(max-width:900px){ .main.master-data{padding:20px 16px}.master-data .panel .section-header{align-items:flex-start;flex-direction:column;gap:12px}.master-data .panel .table-responsive{overflow-x:auto}.master-data .panel table{min-width:720px} }

/* Akademik, Penjadwalan, Rekap responsive parity. Scoped to view shell; no spreadsheet selectors. */
.academic-data .panel, .scheduling-data .panel, .recap-data .panel { max-width:100%; overflow:visible; }
.academic-data .section-header, .scheduling-data .section-header, .recap-data .section-header { align-items:flex-start; gap:12px; }
.academic-data .toolbar, .scheduling-data .toolbar, .recap-data .toolbar { align-items:flex-end; }
.academic-data .table-responsive, .scheduling-data .table-responsive, .recap-data .table-responsive { max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; }
.academic-data table, .scheduling-data table, .recap-data table { min-width:720px; }
.academic-data .modal, .scheduling-data .modal, .recap-data .modal { width:min(680px, calc(100vw - 32px)); max-height:calc(100vh - 32px); overflow:auto; }
.kurikulum-detail-page { margin-top: 18px; }
.detail-page-content { width: 100%; }
.kurikulum-detail-page .modal-header { border-bottom: 1px solid var(--border, var(--border-subtle)); padding-bottom: 16px; margin-bottom: 16px; }
.kurikulum-detail-page .modal-close { display: none; }
.kurikulum-detail-page .modal-body { padding: 0; }
.kurikulum-detail-page .modal-footer { padding: 16px 0 0; }
.academic-data .btn-group, .scheduling-data .btn-group, .recap-data .btn-group { flex-wrap:wrap; }
.academic-data .modal .sidebar-close, .scheduling-data .modal .sidebar-close, .recap-data .modal .sidebar-close { display:inline-flex; }
.academic-data input, .academic-data select, .scheduling-data input, .scheduling-data select, .recap-data input, .recap-data select { min-width:0; }

/* Fresh logged-out production login: isolated so other cards/forms retain their styles. */
.login-shell { grid-template-columns: 1fr 1fr; background:var(--bg-sidebar); padding:0; place-items:stretch; }
.login-hero { min-width:0; padding:80px; background:var(--bg-sidebar); }
.login-hero-brand { margin-bottom:36px; gap:16px; }
.login-hero-brand .seal { width:64px; height:64px; padding:11px; border-radius:16px; background:#ffffff19; border:1px solid #ffffff33; }
.login-hero-brand b { font-size:30px; line-height:36px; }
.login-hero-brand span { font-size:14px; color:var(--text-sidebar); }
.login-hero h2 { font-size:clamp(36px,3.4vw,48px); line-height:1; margin:0 0 104px; }
.login-hero h2 strong { color:var(--primary-bright); }
.login-hero small { color:var(--text-sidebar); font-size:14px; }
.login-shell::before { content:""; grid-column:2; grid-row:1 / 3; background:var(--bg-surface-subtle); border-radius:48px 0 0 48px; }
.login-card { grid-column:2; grid-row:1; align-self:center; justify-self:center; width:min(448px,calc(100% - 64px)); margin:0 0 20px; padding:32px; border:1px solid var(--border-subtle); border-radius:16px; box-shadow:0 6px 24px rgba(10,10,10,0.04); }
.login-card h1 { font-size:24px; line-height:32px; color:var(--text-primary); }
.login-card > p { font-size:16px; color:var(--text-secondary); padding:0; border:0; margin:0 0 28px; }
.login-card label { font-size:14px; color:var(--text-secondary); font-weight:500; margin:18px 0 0; }
.login-card input { height:50px; margin-top:8px; border:1px solid var(--border-strong); border-radius:12px; padding:0 16px; font-size:14px; color:var(--text-primary); }
.password-field { display:block; position:relative; }
.password-field input { width:100%; padding-right:48px; }
.password-visibility { position:absolute; right:4px; bottom:3px; width:44px; height:44px; display:grid; place-items:center; padding:0; border:0; border-radius:10px; background:transparent; color:var(--text-secondary); }
.password-visibility svg { width:20px; height:20px; }
.password-visibility:hover { color:var(--primary); background:var(--success-bg); }
.password-visibility:focus-visible { outline:2px solid var(--primary); outline-offset:1px; }
.login-card button[type="submit"] { height:48px; margin-top:20px; border:0; border-radius:12px; background:var(--primary); color:white; font-size:16px; }
.login-card button[type="submit"]:hover:not(:disabled) { background:var(--primary-hover); }
.login-footer { grid-column:2; grid-row:2; align-self:start; justify-self:center; margin:-14px 0 0; color:var(--text-muted); font-size:12px; }
.oss-mobile-menu-link { min-height:44px; display:flex !important; align-items:center; }
.oss-navbar .oss-user-pill { font-size:inherit; font-weight:inherit; min-height:40px; }
.oss-nav-btn:focus-visible,.oss-dropdown-item:focus-visible,.oss-user-pill:focus-visible,.oss-mobile-menu-link:focus-visible { outline:2px solid var(--primary-bright); outline-offset:2px; }
@media(max-width:900px) {
  .login-shell { display:flex; flex-direction:column; align-items:stretch; min-height:100vh; padding:0; background:var(--bg-surface-subtle); }
  .login-shell::before { display:none; }
  .login-hero { display:flex; padding:28px 24px; flex:0 0 auto; }
  .login-hero-brand { margin:0; }
  .login-hero-brand .seal { width:48px; height:48px; padding:6px; }
  .login-hero-brand b { font-size:23px; line-height:27px; }
  .login-hero-brand span { font-size:12px; }
  .login-hero h2,.login-hero small { display:none; }
  .login-card { width:min(448px,calc(100% - 32px)); align-self:center; margin:32px 16px 0; padding:28px 24px; }
  .login-footer { align-self:center; margin:20px 16px 32px; text-align:center; }
}
@media (max-width:900px) {
  .academic-data .panel, .scheduling-data .panel, .recap-data .panel { padding:16px; }
  .academic-data .section-header, .scheduling-data .section-header, .recap-data .section-header { flex-direction:column; }
  .academic-data .section-header > div:last-child, .scheduling-data .section-header > div:last-child, .recap-data .section-header > div:last-child { width:100%; }
  .academic-data .section-header > div:last-child > *, .scheduling-data .section-header > div:last-child > *, .recap-data .section-header > div:last-child > * { max-width:100%; }
  .academic-data .toolbar, .scheduling-data .toolbar, .recap-data .toolbar { align-items:stretch; }
  .academic-data .toolbar > *, .scheduling-data .toolbar > *, .recap-data .toolbar > * { flex:1 1 180px; min-width:0; }
}
@media (max-width:480px) {
  .academic-data .panel, .scheduling-data .panel, .recap-data .panel { padding:12px; }
  .academic-data .panel h2, .scheduling-data .panel h2, .recap-data .panel h2 { font-size:18px; line-height:1.3; }
  .academic-data .toolbar, .scheduling-data .toolbar, .recap-data .toolbar { padding:8px; gap:8px; }
  .academic-data .table-responsive, .scheduling-data .table-responsive, .recap-data .table-responsive { margin-inline:-4px; }
}
