/* ==========================================================================
   SAVIRA - Design System & Stylesheet
   Modern Glassmorphism, Responsive CSS Grid/Flexbox & Print Media
   ========================================================================== */

:root {
  /* Color Palette - Clean, Bright & Eye-Friendly Light Theme Default */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --border-subtle: #e2e8f0;
  --border-focus: rgba(79, 70, 229, 0.45);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  /* Curated Harmonious Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.2);
  --primary-light: rgba(79, 70, 229, 0.08);

  --secondary: #7c3aed;
  --emerald: #059669;
  --emerald-light: rgba(5, 150, 105, 0.1);
  --emerald-glow: rgba(5, 150, 105, 0.25);

  --amber: #d97706;
  --amber-light: rgba(217, 119, 6, 0.1);
  --cyan: #0284c7;
  --cyan-light: rgba(2, 132, 199, 0.1);
  --rose: #e11d48;
  --rose-light: rgba(225, 29, 72, 0.1);

  /* Layout & Sizing */
  --sidebar-width: 270px;
  --topbar-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Clean Soft Shadows & Glass */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px -3px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --glass-blur: blur(16px);

  /* Transitions */
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Optional Dark Theme Variables */
[data-theme="dark"] {
  --bg-main: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-card: rgba(22, 30, 49, 0.85);
  --bg-card-hover: rgba(30, 41, 68, 0.95);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.6);
}

/* Base Reset & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glowing Background Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  transition: opacity 0.5s ease;
}

[data-theme="dark"] .ambient-glow {
  opacity: 0.35;
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  top: -100px;
  left: -50px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: 50px;
  right: -100px;
}

.glow-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: 40%;
  left: 45%;
  opacity: 0.25;
}

/* Layout Architecture */
.app-layout {
  position: relative;
  display: flex;
  min-height: 100vh;
  z-index: 1;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  height: var(--topbar-height);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-close-btn {
  display: none;
}

/* Navigation Menu */
.sidebar-nav {
  padding: 0.5rem 1rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 0.75rem 0.65rem 0.3rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition);
  position: relative;
}

.nav-item i {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));
  color: var(--primary);
  border-left: 3px solid var(--primary);
  font-weight: 700;
}

.nav-item.active i {
  color: var(--primary);
  transform: scale(1.1);
}

/* Nav Group & Submenu (Data Master) */
.nav-group-wrapper {
  display: flex;
  flex-direction: column;
}

.nav-group-btn {
  justify-content: flex-start;
  position: relative;
}

.nav-group-arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.nav-group-wrapper.active-group .nav-group-arrow,
.nav-group-wrapper.open .nav-group-arrow {
  transform: rotate(180deg);
}

.nav-group-sub {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 1.5rem;
  margin-top: 0.2rem;
  margin-bottom: 0.4rem;
}

.nav-group-wrapper.active-group .nav-group-sub,
.nav-group-wrapper.open .nav-group-sub {
  display: flex;
}

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.nav-sub-item i {
  width: 15px;
  height: 15px;
  color: var(--text-dim);
  transition: var(--transition);
}

.nav-sub-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-sub-item.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
  border-left: 2px solid var(--primary);
}

.nav-sub-item.active i {
  color: var(--primary);
}

/* Sidebar Footer / User Profile */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.1);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-indicator {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  background: var(--emerald);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
}

.user-meta {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Main Viewport & Topbar
   ========================================================================== */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.menu-toggle-btn {
  display: none;
}

.view-title-container {
  display: flex;
  flex-direction: column;
}

.view-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.view-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper i {
  position: absolute;
  left: 0.85rem;
  color: var(--text-dim);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-input-wrapper input {
  padding: 0.55rem 1rem 0.55rem 2.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  width: 250px;
  transition: var(--transition);
}

.search-input-wrapper input:focus {
  border-color: var(--primary);
  width: 300px;
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Notification & Theme Buttons */
.btn-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.btn-icon:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

.notify-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--rose);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

/* Button UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn i {
  width: 17px;
  height: 17px;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text-muted);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-link:hover {
  gap: 0.5rem;
  text-decoration: underline;
}

/* Glass Card Common Component */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Content Viewport */
.content-viewport {
  padding: 2rem;
  flex: 1;
}

.page-scroll-actions {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .45rem;
}

.page-scroll-actions[hidden] { display: none !important; }
.page-scroll-actions button[hidden] { display: none !important; }
.page-scroll-actions button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, border-color .2s ease;
}
.page-scroll-actions .page-scroll-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: auto;
  min-width: 124px;
  padding: 0 .85rem;
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  box-shadow: 0 6px 18px var(--primary-glow);
}
.page-scroll-actions button:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--primary); }
.page-scroll-actions button:disabled { opacity: .4; cursor: default; }
.page-scroll-actions button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.page-scroll-actions svg { width: 19px; height: 19px; }
@media (max-width: 520px) {
  .page-scroll-actions { right: calc(.65rem + env(safe-area-inset-right)); bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  .page-scroll-actions button { width: 40px; height: 40px; border-radius: 11px; }
}
@media print { .page-scroll-actions { display: none !important; } }

.view-section {
  display: none;
  animation: fadeIn 0.35s ease;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   VIEW 1: DASHBOARD
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.dashboard-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-badge i {
  width: 18px;
  height: 18px;
}

.kpi-icon-badge.blue { background: var(--primary-light); color: var(--primary); }
.kpi-icon-badge.green { background: var(--emerald-light); color: var(--emerald); }
.kpi-icon-badge.purple { background: rgba(139, 92, 246, 0.15); color: var(--secondary); }
.kpi-icon-badge.orange { background: var(--amber-light); color: var(--amber); }

.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin: 0.6rem 0 0.3rem;
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 700;
}

.kpi-trend i {
  width: 14px;
  height: 14px;
}

.kpi-trend.up { color: var(--emerald); }
.kpi-trend.warn { color: var(--amber); }

.kpi-caption {
  color: var(--text-dim);
}

.kpi-badge-grade {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.grade-a { background: var(--emerald-light); color: var(--emerald); }
.grade-b { background: var(--primary-light); color: var(--primary); }
.grade-c { background: var(--amber-light); color: var(--amber); }
.grade-d { background: var(--rose-light); color: var(--rose); }

.kpi-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.kpi-progress-fill {
  height: 100%;
  border-radius: 0 2px 2px 0;
  transition: width 1s ease;
}

.kpi-progress-fill.blue { background: var(--primary); }
.kpi-progress-fill.green { background: var(--emerald); }
.kpi-progress-fill.purple { background: var(--secondary); }
.kpi-progress-fill.orange { background: var(--amber); }

/* Dashboard Charts Grid */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.chart-card {
  display: flex;
  flex-direction: column;
}

.chart-wrapper {
  position: relative;
  height: 280px;
  width: 100%;
}

.doughnut-wrapper {
  height: 200px;
}

.chart-legend-custom {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-pill::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.grade-distribution-summary {
  display: flex;
  justify-content: space-around;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.grade-sum-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grade-sum-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.grade-sum-count {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Dashboard Bottom Grid */
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

/* Data Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Input tanggal Indonesia: teks dd-mm-yyyy dan kalender lokal. */
.tanggal-id-wrap { position: relative; width: 100%; min-width: 150px; flex: 1; }
.tanggal-id-text { width: 100%; padding-right: 2.8rem !important; }
.tanggal-id-button { position: absolute; top: 0; right: 0; height: 100%; width: 2.6rem; border: 0; background: transparent; color: var(--text-main); font-size: 1.4rem; cursor: pointer; }
.tanggal-id-picker { position: absolute; z-index: 300; top: calc(100% + 4px); left: 0; width: 286px; max-width: calc(100vw - 3rem); padding: .75rem; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-surface); box-shadow: var(--shadow-lg); color: var(--text-main); }
.tanggal-id-heading { display: flex; align-items: center; justify-content: space-between; gap: .3rem; margin-bottom: .5rem; }
.tanggal-id-heading button, .tanggal-id-grid button, .tanggal-id-today { border: 0; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.tanggal-id-heading button { width: 2rem; height: 2rem; font-size: 1.5rem; }
.tanggal-id-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.tanggal-id-grid span, .tanggal-id-grid button { display: grid; place-items: center; height: 2rem; font-size: .8rem; }
.tanggal-id-grid span { color: var(--text-muted); }
.tanggal-id-grid button:hover, .tanggal-id-heading button:hover, .tanggal-id-today:hover { background: var(--primary-light); }
.tanggal-id-grid button.selected { background: var(--primary); color: #fff; }
.tanggal-id-today { display: block; width: 100%; margin-top: .4rem; padding: .4rem; font-weight: 700; color: var(--primary); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 0.85rem 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.teacher-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#tableSupervisi td:first-child {
  min-width: 260px;
}

#tableSupervisi .teacher-name-box {
  min-width: 0;
}

#tableSupervisi .t-name {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

#tableTeachers .t-name {
  white-space: nowrap;
}

.teacher-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.teacher-name-box {
  display: flex;
  flex-direction: column;
}

.t-name {
  font-weight: 700;
  color: var(--text-main);
}

.t-nip {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
}

.badge i {
  width: 12px;
  height: 12px;
}

.badge.primary { background: var(--primary); color: #fff; }
.badge.primary-subtle { background: var(--primary-light); color: var(--primary); }
.badge.green { background: var(--emerald-light); color: var(--emerald); }
.badge.orange { background: var(--amber-light); color: var(--amber); }
.badge.info-subtle { background: var(--cyan-light); color: var(--cyan); }

.badge.jadwal-stage-badge {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  line-height: 1.3;
}

/* Upcoming Schedule Widget */
.schedule-widget .schedule-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.schedule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.schedule-item:hover {
  border-color: var(--border-focus);
  transform: translateX(3px);
}

.schedule-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
}

.sch-day {
  font-size: 1.1rem;
  line-height: 1;
}

.sch-month {
  font-size: 0.65rem;
  text-transform: uppercase;
}

.schedule-info {
  flex: 1;
  min-width: 0;
}

.sch-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.sch-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

/* ==========================================================================
   VIEW 2: TRACKER ALUR 4 TAHAP (INTERACTIVE PIPELINE)
   ========================================================================== */
.tracker-control-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.tracker-picker-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tracker-session-identity { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.tracker-session-identity strong { color: var(--text-main); font-size: 1.1rem; overflow-wrap: anywhere; }
.tracker-session-identity span:last-child { color: var(--text-muted); font-size: .8rem; }

.form-label-inline {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.select-styled {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.6rem 2.2rem 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: var(--transition);
}

.select-styled:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tracker-picker-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Pipeline Stepper Component */
.pipeline-status-hint {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.supervision-stage-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: -0.75rem 0 1.25rem;
}

.pipeline-stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.pipeline-step-node {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  flex: 1;
  cursor: pointer;
}

.pipeline-step-node:last-child {
  flex: none;
}

.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
  z-index: 2;
}

.step-circle i {
  width: 22px;
  height: 22px;
}

.step-circle .step-num {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-info {
  display: flex;
  flex-direction: column;
}

.step-phase {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.step-heading {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.step-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.step-completion {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.step-completion i {
  width: 14px;
  height: 14px;
}

.step-completion.is-complete {
  color: var(--emerald);
}

.step-completion.is-incomplete {
  color: var(--text-muted);
}

.step-line {
  flex: 1;
  height: 3px;
  background: var(--border-subtle);
  margin: 0 1.25rem;
  transition: var(--transition);
}

/* Stepper Node States */
.pipeline-step-node.completed .step-circle {
  background: var(--emerald-light);
  border-color: var(--emerald);
  color: var(--emerald);
}

.pipeline-step-node.completed .step-line {
  background: var(--emerald);
}

.pipeline-step-node.active .step-circle {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 18px var(--primary-glow);
  transform: scale(1.08);
}

.pipeline-step-node.active .step-heading {
  color: var(--primary);
}

/* Stage Workspace */
.stage-workspace-content {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.stage-inner-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.checklist-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.check-item:hover {
  border-color: var(--border-focus);
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.check-text-box h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.check-text-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   VIEW 3: LEMBAR OBSERVASI INTERAKTIF (LIVE)
   ========================================================================== */
.observation-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.obs-teacher-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0.35rem 0;
  color: var(--text-main);
}

.obs-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.obs-meta-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.obs-timer-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 190px;
}

.timer-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--emerald);
  letter-spacing: 0.05em;
  margin: 0.2rem 0 0.5rem;
}

.timer-controls {
  display: flex;
  gap: 0.5rem;
}

.observation-body-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.rubric-live-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.score-big {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--emerald);
}

.score-badge {
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.rubric-indicators-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rubric-indicator-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}

.rubric-indicator-card:hover {
  border-color: var(--border-focus);
}

.ind-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.ind-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.ind-dimension {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}

.scale-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.scale-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.scale-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.scale-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.scale-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.scale-btn.active .scale-val {
  color: var(--primary);
}

.rubric-score-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--primary-light);
}

.rubric-score-summary > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.rubric-score-summary strong {
  color: var(--text-main);
  font-size: 0.9rem;
}

.rubric-score-summary > div:first-child span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.rubric-score-summary-value {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  color: var(--emerald);
  white-space: nowrap;
}

.rubric-score-summary-value span {
  font-size: 1.75rem;
  font-weight: 800;
}

.rubric-score-summary-value small {
  font-size: 0.75rem;
  font-weight: 600;
}

.scale-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.rubric-actions-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* Field Evidence Notes Stream */
.quick-note-box {
  margin-bottom: 1.25rem;
}

.quick-note-box textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  resize: none;
  outline: none;
  transition: var(--transition);
}

.quick-note-box textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.quick-note-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.timestamp-tag {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'JetBrains Mono', monospace;
}

.evidence-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.evidence-item {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ev-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.ev-time {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--cyan);
}

.ev-text {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.4;
}

/* ==========================================================================
   VIEW 4: RAPOR & HASIL SUPERVISI (PRINT-READY)
   ========================================================================== */
.results-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.results-selector-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.report-session-identity { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.report-session-identity span, .report-session-identity small { color: var(--text-muted); font-size: .8rem; }
.report-session-identity strong { color: var(--text-main); font-size: 1rem; overflow-wrap: anywhere; }

.results-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* The Official Printable Paper Sheet */
.formal-report-paper {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-lg);
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  padding: 12mm 15mm;
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  font-family: 'Inter', sans-serif;
}

.official-letterhead {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.official-letterhead-image img {
  display: block;
  width: 100%;
  max-height: 150px;
  object-fit: contain;
}

.school-emblem-image {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.school-emblem-box {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.school-emblem-box i {
  width: 40px;
  height: 40px;
}

.kop-text {
  flex: 1;
}

.kop-text h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.03em;
}

.kop-text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.kop-text h4 {
  font-size: 1.35rem;
  font-weight: 900;
  color: #1e3a8a;
  letter-spacing: -0.01em;
}

.kop-text p {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.report-title-center {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.report-title-center h2 {
  font-size: 1.35rem;
  font-weight: 800;
  text-decoration: underline;
  color: #0f172a;
}

.doc-code {
  font-size: 0.85rem;
  color: #475569;
  font-weight: 600;
  margin-top: 0.2rem;
}

.report-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.report-profile-grid .profile-col { min-width: 0; }
.report-profile-heading {
  margin: 0 0 .35rem;
  font-size: .9rem;
  color: #0f172a;
}

.minimal-info-table {
  width: 100%;
  border-collapse: collapse;
}

.minimal-info-table td {
  padding: 0.35rem 0;
  font-size: 0.88rem;
  color: #334155;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.minimal-info-table td:first-child {
  width: 140px;
  color: #64748b;
}

.report-score-box {
  display: flex;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  justify-content: space-around;
  margin-bottom: 2rem;
  text-align: center;
}

.score-box-col .box-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  display: block;
}

.score-box-col .box-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: #059669;
}

.score-box-col .box-grade {
  display: inline-block;
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 0.4rem;
  padding: 0.2rem 0.85rem;
  border-radius: var(--radius-full);
}

.score-box-col .box-status-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-top: 0.4rem;
}

.report-analytics-section {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
  align-items: center;
}

.radar-box h4, .rubric-table-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.85rem;
}

.radar-chart-container {
  height: 240px;
  position: relative;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th, .report-table td {
  border: 1px solid #cbd5e1;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
}

.report-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #1e293b;
}

.report-reflection-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.text-box-block h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.text-box-block p {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.6;
}

.rtl-list {
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.6;
}

.report-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.sig-box {
  width: 100%;
  max-width: 280px;
  text-align: left;
  font-size: 0.85rem;
  color: #334155;
}

.sig-supervisor { justify-self: start; }
.sig-guru { justify-self: end; }
.sig-kepsek { grid-column: 1 / -1; justify-self: center; }

.sig-date-line { white-space: nowrap; }

.sig-space {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sig-stamp {
  border: 2px dashed #059669;
  color: #059669;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  transform: rotate(-4deg);
}

.sig-stamp.primary {
  border-color: #2563eb;
  color: #2563eb;
  transform: rotate(3deg);
}

.sig-name {
  font-weight: 800;
  color: #0f172a;
  text-decoration: underline;
}

.sig-nip {
  font-size: 0.78rem;
  color: #64748b;
}

/* ==========================================================================
   VIEW 5: DAFTAR GURU & JADWAL
   ========================================================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.select-styled-sm {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 1.8rem 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.teachers-full-table th:last-child,
.teachers-full-table td:last-child {
  text-align: right;
}

/* ==========================================================================
   VIEW 6: PANDUAN & RUBRIK
   ========================================================================== */
.guide-header-hero {
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));
}

.guide-hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.guide-header-hero h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.guide-header-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guide-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
}

.guide-icon-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.guide-icon-header i {
  width: 24px;
  height: 24px;
}

.guide-icon-header.orange { color: var(--amber); }
.guide-icon-header.purple { color: var(--secondary); }
.guide-icon-header.green { color: var(--emerald); }

.guide-icon-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.guide-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.guide-bullets li {
  font-size: 0.88rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.guide-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.guide-bullets strong {
  color: var(--text-main);
}

/* ==========================================================================
   Modals & Toast Notifications
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 3rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-title-box i {
  color: var(--primary);
  width: 22px;
  height: 22px;
}

.modal-title-box h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group:nth-child(1),
.form-group:nth-child(2) {
  grid-column: span 1;
}

.form-group:nth-child(5),
.form-group:nth-child(6) {
  grid-column: span 2;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 300;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  animation: slideToast 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 280px;
}

.toast.success { border-left: 4px solid var(--emerald); }
.toast.info { border-left: 4px solid var(--primary); }
.toast.warn { border-left: 4px solid var(--amber); }

@keyframes slideToast {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-charts-grid,
  .dashboard-bottom-grid,
  .observation-body-grid,
  .stage-inner-grid {
    grid-template-columns: 1fr;
  }

  .scale-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .report-analytics-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .app-main {
    margin-left: 0;
  }

  .menu-toggle-btn {
    display: flex;
  }

  .topbar {
    padding: 0 1rem;
  }

  .content-viewport {
    padding: 1rem;
  }

  .search-input-wrapper input {
    display: none;
  }

  .pipeline-stepper-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .step-line {
    display: none;
  }

  .tracker-control-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .observation-header-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .obs-timer-card {
    width: 100%;
  }

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

  .formal-report-paper {
    padding: 1.5rem;
  }

  .report-profile-grid {
    grid-template-columns: 1fr;
  }

  .report-signatures {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sig-box { justify-self: start; }
  .sig-kepsek { grid-column: 1; }
}

/* Preset Chip Component for Live Observation */
.preset-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.preset-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* SAVIRA visual identity */
:root {
  --bg-main: #f6f7f4;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f4f1;
  --bg-card: #ffffff;
  --border-subtle: #e1e8e2;
  --border-focus: #8ab7a8;
  --text-main: #1e302d;
  --text-muted: #53645e;
  --text-dim: #71817a;
  --primary: #17675d;
  --primary-hover: #0f5149;
  --primary-glow: rgba(23, 103, 93, .16);
  --primary-light: #e8f3ee;
  --secondary: #a26831;
  --emerald: #167654;
  --emerald-light: #e9f5ed;
  --amber: #a76320;
  --amber-light: #fbf0de;
  --cyan: #276d86;
  --cyan-light: #e9f3f6;
  --rose: #b74755;
  --rose-light: #faebed;
  --purple: #655b91;
  --sidebar-width: 276px;
  --topbar-height: 84px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(19, 48, 42, .035);
  --shadow-md: 0 10px 30px rgba(19, 48, 42, .08);
  --shadow-lg: 0 24px 60px rgba(19, 48, 42, .15);
}
[data-theme="dark"] {
  --bg-main: #14201d;
  --bg-surface: #1b2b27;
  --bg-surface-elevated: #243630;
  --bg-card: #1b2b27;
  --border-subtle: #344940;
  --text-main: #eff5ed;
  --text-muted: #b7c9bd;
  --text-dim: #9eb1a5;
  --primary: #89d5b5;
  --primary-hover: #aae4c9;
  --primary-light: #294b3d;
  --secondary: #efbd79;
  --emerald: #83d5a3;
  --emerald-light: #244738;
  --amber: #eebd76;
  --amber-light: #51402a;
  --cyan: #9bd2e0;
  --cyan-light: #29444b;
  --rose: #f2a3ab;
  --rose-light: #513038;
  --purple: #c5bbef;
}
body { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -.01em; }
.ambient-glow { display: none; }
.app-sidebar { background: #173f3c; border-right: 0; backdrop-filter: none; }
.sidebar-header { height: 92px; padding: 0 1.3rem; border-color: rgba(255,255,255,.12); }
.brand-logo { gap: .7rem; min-width: 0; }
.brand-mark { display: block; flex: 0 0 auto; border-radius: 13px; }
.brand-name { color: #fff; font-size: 1.45rem; font-weight: 800; letter-spacing: .095em; line-height: 1.1; }
.brand-sub { color: #b9d2c8; font-size: .69rem; margin-top: .2rem; white-space: nowrap; }
.brand-period { color: #fff; font-size: .71rem; font-weight: 700; margin-top: .25rem; white-space: nowrap; }
.sidebar-nav { padding: .35rem .8rem 1rem; gap: .18rem; }
.nav-section-title { color: #91b2a4; padding: 1.25rem .85rem .45rem; letter-spacing: .14em; }
.app-sidebar .nav-item, .app-sidebar .nav-sub-item { color: #d3e2da !important; border-left: 0; border-radius: 9px; font-weight: 500; }
.app-sidebar .nav-item:hover, .app-sidebar .nav-sub-item:hover { background: rgba(255,255,255,.09) !important; color: #fff !important; }
.app-sidebar .nav-item.active, .app-sidebar .nav-sub-item.active { background: #e7f1e8 !important; color: #164a40 !important; font-weight: 700; }
.app-sidebar .nav-item.active svg, .app-sidebar .nav-sub-item.active svg { color: #17675d; transform: none; }
.app-sidebar .nav-group-sub { border-color: rgba(255,255,255,.18) !important; }
.user-avatar { border-color: #e9bb6b; }
.profile-avatar-status { margin-top: .7rem; color: var(--primary); font-size: .75rem; line-height: 1.45; overflow-wrap: anywhere; }
.profile-avatar-status[hidden], .profile-avatar-cancel[hidden] { display: none !important; }
.profile-avatar-cancel { width: 100%; margin-top: .6rem; }
.profile-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
.profile-layout > *, .profile-layout .glass-card, .profile-layout .form-group { min-width: 0; }
.profile-layout .profile-summary-card { text-align: center; padding: 2.5rem 1.5rem; }
.profile-summary-card h3, .profile-summary-card p { overflow-wrap: anywhere; }
.profile-summary-card .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.profile-content { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.profile-layout .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-layout .form-grid > .profile-field-full { grid-column: 1 / -1; }
.profile-layout .form-control { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
.profile-layout input[type="file"] { overflow: hidden; text-overflow: ellipsis; }
.profile-layout .card-header { flex-wrap: wrap; gap: .75rem; }
.profile-form-actions { margin-top: 1.5rem; text-align: right; }
@media (max-width: 1100px) {
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .profile-layout, .profile-content { gap: 1rem; }
  .profile-layout .profile-summary-card { padding: 1.4rem 1rem; }
  .profile-layout .form-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .profile-layout .form-grid > .form-group { grid-column: 1 / -1; }
  .profile-form-actions .btn { width: 100%; justify-content: center; white-space: normal; }
}
#mentorGroupNew[hidden], #mentorGroupEdit[hidden] { display: none !important; }
.users-search-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin: .1rem 0 1.25rem; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-surface-elevated); }
.users-search-bar { scroll-margin-top: calc(var(--topbar-height) + 12px); }
.users-search-input { position: relative; flex: 1 1 270px; min-width: 0; }
.users-search-input svg { position: absolute; top: 50%; left: .85rem; width: 17px; height: 17px; color: var(--text-dim); transform: translateY(-50%); pointer-events: none; }
.users-search-input input { width: 100%; min-height: 40px; padding: .55rem .8rem .55rem 2.35rem; border: 1px solid var(--border-subtle); border-radius: 9px; outline: none; background: var(--bg-surface); color: var(--text-main); font: inherit; font-size: .82rem; }
.users-search-input input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.users-search-bar .select-styled-sm { min-height: 40px; border-radius: 9px; }
.users-search-bar .btn { min-height: 40px; white-space: nowrap; }
.users-search-count { margin-left: auto; color: var(--text-muted); font-size: .77rem; white-space: nowrap; }
.users-search-empty { padding: 2.5rem 1rem !important; color: var(--text-muted); text-align: center; }
.users-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .45rem; padding: 1.2rem 0 .2rem; }
.users-pagination .btn { min-width: 36px; justify-content: center; }
.users-pagination .is-disabled { opacity: .45; pointer-events: none; }
.data-table.users-table { min-width: 850px; }
.users-table .users-action-cell { width: 176px; min-width: 176px; white-space: nowrap; }
.users-action-list { display: flex; align-items: center; gap: .35rem; flex-wrap: nowrap; }
.users-action-form { display: inline-flex; margin: 0; flex: 0 0 auto; }
.users-action-btn { width: 36px; height: 36px; min-width: 36px; padding: 0; border-radius: 10px; }
.users-action-btn svg, .users-action-btn i { width: 17px; height: 17px; }
.users-action-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.schedule-teacher-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; max-height: 210px; overflow-y: auto; padding: .5rem; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-surface-elevated); }
.schedule-teacher-option { display: flex; align-items: center; gap: .65rem; min-width: 0; padding: .68rem .75rem; border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--bg-surface); color: var(--text-main); font-size: .8rem; line-height: 1.4; cursor: pointer; }
.schedule-teacher-option:hover { border-color: var(--primary); }
.schedule-teacher-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.schedule-teacher-option input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--primary); }
.schedule-teacher-option span { min-width: 0; overflow-wrap: anywhere; }
.schedule-teacher-option[hidden], .schedule-teacher-empty[hidden] { display: none; }
.schedule-teacher-empty { grid-column: 1 / -1; margin: .5rem; color: var(--text-muted); font-size: .8rem; }
.schedule-teacher-result { color: var(--primary); font-size: .78rem; font-weight: 700; }
@media (max-width: 600px) { .schedule-teacher-list { grid-template-columns: minmax(0, 1fr); max-height: 230px; } }
.table-pagination-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; padding-top: .85rem; }
.table-pagination-bar > span { color: var(--text-muted); font-size: .77rem; }
.table-pagination-bar .users-pagination { padding: 0; }
#teacherPagination[hidden], #supervisiPagination[hidden] { display: none !important; }
@media (max-width: 600px) {
  .table-pagination-bar { justify-content: center; text-align: center; }
  .table-pagination-bar > span, .table-pagination-bar .users-pagination { width: 100%; }
  .table-pagination-bar .users-pagination .btn { padding: .45rem .6rem; font-size: .75rem; }
}
@media (max-width: 600px) { .users-search-bar .users-search-input, .users-search-bar .select-styled-sm { flex: 1 1 100%; width: 100%; } .users-search-bar .btn { flex: 1 1 calc(50% - .4rem); justify-content: center; } .users-search-count { width: 100%; margin-left: 0; text-align: center; } }
.topbar { background: var(--bg-main); border-bottom: 1px solid var(--border-subtle); backdrop-filter: none; padding: 0 clamp(1rem, 3vw, 2.5rem); }
.topbar { gap: 1rem; }
.topbar-left, .view-title-container { min-width: 0; }
.topbar-right { flex-shrink: 0; gap: .65rem; }
.topbar-public-results { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; flex: 0 0 auto; min-height: 38px; padding: .45rem .75rem; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-surface); color: var(--primary); font-size: .76rem; font-weight: 800; white-space: nowrap; text-decoration: none; transition: var(--transition); }
.topbar-public-results:hover, .topbar-public-results:focus-visible { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.topbar-public-results svg { width: 17px; height: 17px; flex: 0 0 17px; }
.topbar-profile { display: flex; align-items: center; gap: .65rem; min-width: 0; max-width: 210px; padding: .35rem .65rem .35rem .35rem; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--bg-surface); color: var(--text-main); text-decoration: none; transition: var(--transition); }
.topbar-profile:hover, .topbar-profile:focus-visible { border-color: var(--primary); background: var(--primary-light); color: var(--text-main); }
.topbar-profile .user-avatar { display: block; flex: 0 0 36px; width: 36px; height: 36px; }
.topbar-profile .user-meta { display: block; min-width: 0; }
.topbar-profile .user-name, .topbar-profile .user-role { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: relative; flex: 0 0 auto; }
.topbar-profile { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.account-menu.open .topbar-profile { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 0 0 3px rgba(23,103,93,.09); }
.account-menu-chevron { width: 15px; height: 15px; flex: 0 0 15px; color: var(--text-dim); transition: transform .2s ease; }
.account-menu.open .account-menu-chevron { transform: rotate(180deg); }
.account-menu-panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 80; width: min(310px, calc(100vw - 24px)); padding: 8px; border: 1px solid var(--border-subtle); border-radius: 17px; background: var(--bg-surface); box-shadow: 0 18px 44px rgba(15,35,30,.16), 0 2px 8px rgba(15,35,30,.05); transform-origin: top right; animation: account-menu-in .16s ease-out; }
.account-menu-panel[hidden] { display: none; }
@keyframes account-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.account-menu-identity { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 10px 16px; border-bottom: 1px solid var(--border-subtle); }
.account-menu-avatar { flex: 0 0 44px; width: 44px; height: 44px; overflow: hidden; border-radius: 14px; background: var(--primary-light); }
.account-menu-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.account-menu-details { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.account-menu-caption { color: var(--text-dim); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.account-menu-name { overflow: hidden; color: var(--text-main); font-size: .9rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-role { margin-top: 2px; color: var(--primary); font-size: .72rem; font-weight: 700; letter-spacing: .03em; }
.account-menu-actions { display: grid; gap: 3px; padding-top: 7px; }
.account-menu-link { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 0 11px; border: 0; border-radius: 10px; background: transparent; color: var(--text-main); font: inherit; font-size: .82rem; font-weight: 650; text-align: left; cursor: pointer; transition: background .18s ease, color .18s ease; }
.account-menu-link:hover, .account-menu-link:focus-visible { outline: none; background: var(--primary-light); color: var(--primary); }
.account-menu-link svg { width: 17px; height: 17px; flex: 0 0 17px; }
.account-menu-end-icon { margin-left: auto; opacity: .55; }
.account-menu-logout { color: var(--rose); }
.account-menu-logout:hover, .account-menu-logout:focus-visible { background: var(--rose-light); color: var(--rose); }
.topbar-right .theme-toggle-btn { flex: 0 0 38px; }
.view-title { font-size: clamp(1.05rem, 1.4vw, 1.35rem); font-weight: 750; }
.view-subtitle { color: var(--text-dim); max-width: 55ch; }
.search-input-wrapper input { border-radius: 9px; background: var(--bg-surface); }
.content-viewport { padding: clamp(1rem, 3vw, 2.5rem); max-width: 1680px; width: 100%; margin: 0 auto; }
.app-main { min-width: 0; width: calc(100% - var(--sidebar-width)); }
@media (min-width: 769px) {
  .sidebar-collapsed .app-sidebar { transform: translateX(-100%); }
  .sidebar-collapsed .app-main { margin-left: 0; width: 100%; }
}
.content-viewport, .dashboard-charts-grid > *, .dashboard-bottom-grid > *, .glass-card { min-width: 0; }
.glass-card, .kpi-card { background: var(--bg-card); backdrop-filter: none; border-color: var(--border-subtle); box-shadow: var(--shadow-sm); }
.glass-card:hover { border-color: var(--border-subtle); }
.kpi-card { padding: 1.4rem; border-top: 3px solid #dceae3; }
.dashboard-kpi-grid .kpi-card {
  background: linear-gradient(145deg, var(--kpi-bg-start), var(--kpi-bg-end));
  border-color: var(--kpi-border);
  border-top-color: var(--kpi-accent);
  border-top-width: 2px;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: none;
}
.dashboard-kpi-grid .kpi-card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--kpi-border); }
.dashboard-kpi-grid .kpi-header { gap: 0.5rem; }
.dashboard-kpi-grid .kpi-title { font-size: 0.73rem; font-weight: 700; line-height: 1.25; }
.dashboard-kpi-grid .kpi-icon-badge { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; }
.dashboard-kpi-grid .kpi-icon-badge svg { width: 16px; height: 16px; }
.dashboard-kpi-grid .kpi-value { font-size: clamp(1.45rem, 2vw, 1.75rem); line-height: 1.1; margin: 0.3rem 0 0.15rem; }
.dashboard-kpi-grid .kpi-footer { font-size: 0.68rem; line-height: 1.3; }
.dashboard-kpi-grid .kpi-card:nth-child(1) { --kpi-bg-start: #e8f6f1; --kpi-bg-end: #f5fbf8; --kpi-border: #c9e8db; --kpi-accent: #2a9473; }
.dashboard-kpi-grid .kpi-card:nth-child(2) { --kpi-bg-start: #edf7e7; --kpi-bg-end: #f8fcf4; --kpi-border: #d6eac9; --kpi-accent: #639c44; }
.dashboard-kpi-grid .kpi-card:nth-child(3) { --kpi-bg-start: #fff2dd; --kpi-bg-end: #fffaf0; --kpi-border: #f4dfb7; --kpi-accent: #c58528; }
.dashboard-kpi-grid .kpi-card:nth-child(4) { --kpi-bg-start: #eaf3fb; --kpi-bg-end: #f7fbff; --kpi-border: #d2e5f3; --kpi-accent: #448bb5; }
.dashboard-kpi-grid .kpi-card:nth-child(5) { --kpi-bg-start: #fff0e9; --kpi-bg-end: #fff9f5; --kpi-border: #f4d9ca; --kpi-accent: #c7744c; }
.dashboard-kpi-grid .kpi-card:nth-child(6) { --kpi-bg-start: #f0edfa; --kpi-bg-end: #faf8ff; --kpi-border: #ddd6f0; --kpi-accent: #8a6cb5; }
.dashboard-kpi-grid .kpi-card:nth-child(7) { --kpi-bg-start: #e5f7f3; --kpi-bg-end: #f5fcfa; --kpi-border: #c3e9df; --kpi-accent: #349b88; }
.dashboard-kpi-grid .kpi-card:nth-child(8) { --kpi-bg-start: #fcecf1; --kpi-bg-end: #fff7f9; --kpi-border: #f1d1dc; --kpi-accent: #bd6b87; }
@media (max-width: 1200px) and (min-width: 769px) {
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(1) { --kpi-bg-start: #1d3d35; --kpi-bg-end: #21342e; --kpi-border: #386554; --kpi-accent: #69c4a0; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(2) { --kpi-bg-start: #2b402b; --kpi-bg-end: #26372a; --kpi-border: #4b6843; --kpi-accent: #a7d482; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(3) { --kpi-bg-start: #4a3826; --kpi-bg-end: #382f26; --kpi-border: #715439; --kpi-accent: #efbc71; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(4) { --kpi-bg-start: #243b47; --kpi-bg-end: #22323b; --kpi-border: #3d6173; --kpi-accent: #92cce5; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(5) { --kpi-bg-start: #49342e; --kpi-bg-end: #392e2b; --kpi-border: #705147; --kpi-accent: #eeaa86; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(6) { --kpi-bg-start: #39334a; --kpi-bg-end: #302d3e; --kpi-border: #5b5074; --kpi-accent: #c4afea; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(7) { --kpi-bg-start: #1d403c; --kpi-bg-end: #1f3432; --kpi-border: #386b63; --kpi-accent: #79cbbb; }
[data-theme="dark"] .dashboard-kpi-grid .kpi-card:nth-child(8) { --kpi-bg-start: #462d39; --kpi-bg-end: #372b32; --kpi-border: #71505f; --kpi-accent: #e2a0b7; }
.jadwal-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.guru-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-card:hover { transform: none; box-shadow: var(--shadow-md); border-color: var(--border-focus); }
.jadwal-stats .kpi-card, .guru-stats .kpi-card {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--stat-border);
  border-top: 2px solid var(--stat-accent);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--stat-bg-start), var(--stat-bg-end));
  box-shadow: var(--shadow-sm);
}
.jadwal-stats .kpi-card:hover, .guru-stats .kpi-card:hover { border-color: var(--stat-border); box-shadow: var(--shadow-md); }
.jadwal-stats .kpi-header, .guru-stats .kpi-header { gap: .5rem; }
.jadwal-stats .kpi-title, .guru-stats .kpi-title { line-height: 1.3; overflow-wrap: anywhere; }
.jadwal-stats .kpi-icon-badge, .guru-stats .kpi-icon-badge { flex: 0 0 34px; width: 34px; height: 34px; background: var(--stat-icon-bg); color: var(--stat-accent); }
.jadwal-stats .kpi-value, .guru-stats .kpi-value { margin: .45rem 0 .2rem; font-size: clamp(1.45rem, 2vw, 1.85rem); line-height: 1.1; }
.jadwal-stats .kpi-footer, .guru-stats .kpi-footer { line-height: 1.35; }
.jadwal-stats .kpi-card:nth-child(1), .guru-stats .kpi-card:nth-child(1) { --stat-bg-start: #eaf3fb; --stat-bg-end: #f8fbff; --stat-border: #d2e5f3; --stat-accent: #448bb5; --stat-icon-bg: #dceef9; }
.jadwal-stats .kpi-card:nth-child(2) { --stat-bg-start: #f0edfa; --stat-bg-end: #faf8ff; --stat-border: #ddd6f0; --stat-accent: #8064af; --stat-icon-bg: #e5dcf5; }
.jadwal-stats .kpi-card:nth-child(3), .guru-stats .kpi-card:nth-child(3) { --stat-bg-start: #fff2dd; --stat-bg-end: #fffaf0; --stat-border: #f4dfb7; --stat-accent: #b6771d; --stat-icon-bg: #ffebc7; }
.jadwal-stats .kpi-card:nth-child(4), .guru-stats .kpi-card:nth-child(2) { --stat-bg-start: #e8f6f1; --stat-bg-end: #f5fbf8; --stat-border: #c9e8db; --stat-accent: #27866a; --stat-icon-bg: #d4eee2; }
[data-theme="dark"] .jadwal-stats .kpi-card:nth-child(1), [data-theme="dark"] .guru-stats .kpi-card:nth-child(1) { --stat-bg-start: #243b47; --stat-bg-end: #22323b; --stat-border: #3d6173; --stat-accent: #92cce5; --stat-icon-bg: #304c5b; }
[data-theme="dark"] .jadwal-stats .kpi-card:nth-child(2) { --stat-bg-start: #39334a; --stat-bg-end: #302d3e; --stat-border: #5b5074; --stat-accent: #c4afea; --stat-icon-bg: #48405c; }
[data-theme="dark"] .jadwal-stats .kpi-card:nth-child(3), [data-theme="dark"] .guru-stats .kpi-card:nth-child(3) { --stat-bg-start: #4a3826; --stat-bg-end: #382f26; --stat-border: #715439; --stat-accent: #efbc71; --stat-icon-bg: #5a422b; }
[data-theme="dark"] .jadwal-stats .kpi-card:nth-child(4), [data-theme="dark"] .guru-stats .kpi-card:nth-child(2) { --stat-bg-start: #1d3d35; --stat-bg-end: #21342e; --stat-border: #386554; --stat-accent: #69c4a0; --stat-icon-bg: #2c5141; }
.guru-recap { margin: 0 0 1.5rem; }
.guru-recap-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .85rem; }
.guru-recap-heading h2 { color: var(--text-main); font-size: 1rem; font-weight: 750; }
.guru-recap-heading p { margin-top: .2rem; color: var(--text-muted); font-size: .76rem; }
.guru-recap-total { color: var(--text-muted); font-size: .78rem; }
.guru-recap-total strong { color: var(--text-main); font-size: .95rem; }
.guru-recap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.guru-recap-card { min-width: 0; padding: 1rem 1.1rem; border: 1px solid var(--recap-border); border-left: 3px solid var(--recap-accent); border-radius: 12px; background: linear-gradient(135deg, var(--recap-start), var(--recap-end)); box-shadow: var(--shadow-sm); }
.guru-recap-card:nth-child(4n+1) { --recap-start: #eaf3fb; --recap-end: #f8fbff; --recap-border: #d2e5f3; --recap-accent: #448bb5; }
.guru-recap-card:nth-child(4n+2) { --recap-start: #e8f6f1; --recap-end: #f5fbf8; --recap-border: #c9e8db; --recap-accent: #27866a; }
.guru-recap-card:nth-child(4n+3) { --recap-start: #fff2dd; --recap-end: #fffaf0; --recap-border: #f4dfb7; --recap-accent: #b6771d; }
.guru-recap-card:nth-child(4n) { --recap-start: #f0edfa; --recap-end: #faf8ff; --recap-border: #ddd6f0; --recap-accent: #8064af; }
.guru-recap-card h3 { color: var(--text-main); font-size: .83rem; font-weight: 750; overflow-wrap: anywhere; }
.guru-recap-count { display: block; margin: .35rem 0 .7rem; color: var(--text-main); font-size: 1.7rem; line-height: 1; }
.guru-recap-count span { color: var(--text-muted); font-size: .75rem; font-weight: 600; }
.guru-recap-breakdown { display: flex; flex-wrap: wrap; gap: .45rem .9rem; padding-top: .6rem; border-top: 1px solid var(--recap-border); color: var(--text-muted); font-size: .75rem; }
.guru-recap-breakdown strong { margin-left: .15rem; color: var(--text-main); }
.guru-recap-card small { display: block; margin-top: .55rem; color: var(--text-muted); font-size: .7rem; }
[data-theme="dark"] .guru-recap-card:nth-child(4n+1) { --recap-start: #243b47; --recap-end: #22323b; --recap-border: #3d6173; --recap-accent: #92cce5; }
[data-theme="dark"] .guru-recap-card:nth-child(4n+2) { --recap-start: #1d3d35; --recap-end: #21342e; --recap-border: #386554; --recap-accent: #69c4a0; }
[data-theme="dark"] .guru-recap-card:nth-child(4n+3) { --recap-start: #4a3826; --recap-end: #382f26; --recap-border: #715439; --recap-accent: #efbc71; }
[data-theme="dark"] .guru-recap-card:nth-child(4n) { --recap-start: #39334a; --recap-end: #302d3e; --recap-border: #5b5074; --recap-accent: #c4afea; }
.kpi-value { font-size: clamp(1.7rem, 2.6vw, 2.25rem); }
.kpi-progress-bar { background: var(--bg-surface-elevated); }
.btn-primary { background: #17675d; border-color: #17675d; box-shadow: none; }
.btn-primary:hover { background: #0f5149; border-color: #0f5149; box-shadow: var(--shadow-md); }
.btn-outline { background: var(--bg-surface); }
.btn-outline:hover, .btn-icon:hover { background: var(--bg-surface-elevated); border-color: var(--border-focus); }
.data-table th { background: var(--bg-surface-elevated); white-space: nowrap; }
.data-table td { line-height: 1.45; }
.teacher-initial { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: .86rem; font-weight: 800; }
.data-table tr:hover td { background: var(--bg-surface-elevated); }
.table-responsive { max-width: 100%; -webkit-overflow-scrolling: touch; }
.data-table { min-width: 650px; }
.dashboard-supervision-table { width: max-content; min-width: 100%; }
.dashboard-supervision-table .t-name { white-space: nowrap; }
.guru-dapo-table-wrap { width: 100%; overflow-x: auto; scroll-margin-top: 100px; }
.guru-dapo-table { width: 100%; table-layout: auto; border-collapse: collapse; }
.guru-dapo-table .guru-col-name { width: 40%; }
.guru-dapo-table .guru-col-id, .guru-dapo-table .guru-col-status, .guru-dapo-table .guru-col-action { width: 20%; }
.guru-dapo-table th { padding: .8rem .65rem; background: var(--bg-surface-elevated); border-bottom: 1px solid var(--border-subtle); color: var(--text-dim); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.guru-dapo-table td { padding: .85rem .65rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; font-size: .78rem; min-width: 0; }
.guru-dapo-table tr:hover td { background: var(--bg-surface-elevated); }
.guru-dapo-row[hidden], .guru-dapo-empty[hidden], .guru-dapo-pagination[hidden] { display: none !important; }
.guru-dapo-name { color: var(--text-main); font-size: clamp(.78rem, .85vw, .93rem); font-weight: 800; line-height: 1.35; white-space: nowrap; text-transform: uppercase; }
.guru-dapo-nip { margin-top: .2rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: .72rem; }
.guru-dapo-jabatan { margin-top: .2rem; color: var(--text-muted); font-size: .76rem; line-height: 1.4; }
.guru-dapo-identity, .guru-dapo-employment { overflow-wrap: anywhere; }
.guru-dapo-identity strong, .guru-dapo-identity span, .guru-dapo-employment strong, .guru-dapo-employment .badge, .guru-dapo-meta { display: block; margin-bottom: .2rem; }
.guru-dapo-identity span, .guru-dapo-meta { color: var(--text-muted); font-size: .72rem; }
.guru-dapo-employment .badge { width: fit-content; max-width: 100%; white-space: normal; }
.guru-dapo-actions { display: flex; align-items: flex-start; flex-direction: column; gap: .4rem; }
.guru-dapo-action-cell .btn { min-height: 32px; padding: .3rem .5rem; font-size: .74rem; white-space: nowrap; }
.guru-dapo-mobile-details { display: none; }
.guru-dapo-empty { padding: 2.5rem 1rem; text-align: center; color: var(--text-muted); }
.guru-dapo-pagination { display: flex; justify-content: center; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.4rem; }
.guru-dapo-page-numbers { display: flex; align-items: center; gap: .3rem; }
.guru-dapo-page { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 .4rem; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-main); font-weight: 700; cursor: pointer; }
.guru-dapo-page:hover, .guru-dapo-page.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.guru-dapo-page-dots { padding: 0 .2rem; color: var(--text-dim); }
.guru-dapo-pagination .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 768px) { #searchGuruDapoInput, #searchGuruDapoInput:focus { display: block; width: 100%; } }
@media (max-width: 1150px) {
  .guru-dapo-table .guru-col-name { width: 73%; }
  .guru-dapo-table .guru-col-action { width: 27%; }
  .guru-dapo-table .guru-col-id, .guru-dapo-table .guru-col-status, .guru-dapo-table th:nth-child(2), .guru-dapo-table th:nth-child(3), .guru-dapo-table td:nth-child(2), .guru-dapo-table td:nth-child(3) { display: none; }
  .guru-dapo-mobile-details { display: block; margin-top: .3rem; color: var(--text-muted); font-size: .73rem; }
  .guru-dapo-mobile-details summary { width: fit-content; color: var(--primary); cursor: pointer; }
  .guru-dapo-mobile-details[open] span { display: block; margin-top: .2rem; }
}
@media (max-width: 600px) {
  .guru-dapo-table, .guru-dapo-table tbody, .guru-dapo-table tr { display: block; width: 100%; }
  .guru-dapo-table thead, .guru-dapo-table colgroup { display: none; }
  .guru-dapo-table tr { padding: .65rem 0; border-bottom: 1px solid var(--border-subtle); }
  .guru-dapo-table td { display: block; padding: .25rem .3rem; border: 0; }
  .guru-dapo-table .guru-dapo-identity, .guru-dapo-table .guru-dapo-employment { display: none; }
  .guru-dapo-table .guru-dapo-name { font-size: clamp(.72rem, 2.45vw, .9rem); }
  .guru-dapo-actions { flex-direction: row; align-items: center; justify-content: space-between; }
  .guru-dapo-pagination .btn { padding: .45rem .6rem; font-size: .76rem; }
}
.form-control, .select-styled, .select-styled-sm { background: var(--bg-surface); }
input, button, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #e9bb6b; outline-offset: 2px; }
.sidebar-scrim { display: none; }
.menu-toggle-btn { display: flex; }
.sidebar-close-btn { display: none; }

/* Login */
.login-wrapper { display: grid !important; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); min-height: 100vh; padding: 0 !important; background: var(--bg-main); }
.login-intro { min-height: 100vh; background: #173f3c; color: #fff; padding: clamp(2rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-intro::after { content: ''; position: absolute; width: 50vw; height: 50vw; min-width: 480px; min-height: 480px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -25vw; bottom: -20vw; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.025); pointer-events: none; }
.login-intro-brand { display: flex; align-items: center; gap: .8rem; font-size: 1.35rem; letter-spacing: .12em; font-weight: 800; z-index: 1; }
.login-intro-brand img { flex: 0 0 84px; width: 84px; height: 84px; }
.login-intro-brand img, .login-brand .brand-mark { object-fit: contain; }
.login-intro-brand-text { display: flex; flex-direction: column; min-width: 0; gap: .2rem; }
.login-intro-brand-text small { color: #ccded4; font-size: .68rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.login-intro-brand-text .login-intro-school { color: #e9bb6b; font-weight: 700; letter-spacing: .04em; margin-top: .15rem; }
.login-intro-copy { max-width: 600px; z-index: 1; }
.login-eyebrow { display: block; color: #e9bb6b; font-size: .75rem; font-weight: 700; letter-spacing: .18em; margin-bottom: 1.4rem; }
.login-intro h1 { font-size: clamp(2.5rem, 4.4vw, 5rem); line-height: 1.12; letter-spacing: -.055em; font-weight: 750; }
.login-intro h1 em { color: #e9bb6b; font-style: normal; }
.login-intro-copy p { max-width: 49ch; font-size: 1rem; line-height: 1.75; color: #ccded4; margin-top: 1.6rem; }
.login-intro-footer { color: #aac9ba; letter-spacing: .16em; font-size: .68rem; font-weight: 700; z-index: 1; }
.login-intro-footer span { color: #e9bb6b; margin: 0 .65rem; }
.login-box { margin: auto; max-width: 480px !important; width: min(100% - 3rem, 480px) !important; padding: 2.5rem !important; border: 0 !important; box-shadow: none !important; background: transparent !important; backdrop-filter: none !important; }
.login-brand { align-items: flex-start !important; text-align: left !important; margin-bottom: 2rem !important; }
.login-brand .brand-mark, .login-mobile-name, .login-mobile-description, .login-mobile-school { display: none; }
.login-brand h2 { font-size: clamp(1.65rem, 2.5vw, 2.2rem); letter-spacing: -.04em; line-height: 1.2; color: var(--text-main); }
.login-brand p { color: var(--text-muted); font-size: .9rem; margin-top: .6rem; }
.login-box .form-label { color: var(--text-main); font-size: .84rem; }
.login-box .form-control { min-height: 48px; border-radius: 9px; }
.login-box .btn-primary { min-height: 49px; justify-content: space-between; }
.login-public-results { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; margin-top: 1rem; padding: .75rem; border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--bg-surface); color: var(--primary); font-size: .82rem; font-weight: 800; text-align: center; transition: background .2s ease, border-color .2s ease; }
.login-public-results:hover { background: var(--primary-light); border-color: var(--primary); }
.login-public-results svg { width: 17px; height: 17px; }

@media (max-width: 1550px) {
  .topbar-right .search-input-wrapper { display: none; }
}
@media (max-width: 1100px) {
  .jadwal-stats, .guru-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-subtitle { max-width: 34ch; }
  .topbar-profile { padding: .25rem; }
  .topbar-profile .user-meta { display: none; }
  .account-menu-chevron { display: none; }
}
@media (max-width: 768px) {
  .app-main { width: 100%; }
  .menu-toggle-btn, .sidebar-close-btn { display: flex; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; border: 0; background: rgba(15,35,30,.5); opacity: 0; pointer-events: none; z-index: 90; transition: opacity .2s ease; }
  .sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .sidebar-open { overflow: hidden; }
  .app-sidebar { width: min(85vw, 310px); }
  .sidebar-close-btn { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
  .topbar { min-height: 78px; height: auto; gap: .65rem; }
  .topbar-left { min-width: 0; gap: .65rem; }
  .view-title-container { min-width: 0; }
  .view-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .view-subtitle { display: none; }
  .topbar-right .btn { padding: .55rem .7rem; font-size: .78rem; }
  .topbar-right .btn span { display: none; }
  .topbar-right { gap: .4rem; }
  .topbar-public-results { width: 38px; height: 38px; min-height: 38px; padding: 0; }
  .topbar-public-results span { display: none; }
  .topbar-profile .user-avatar { flex-basis: 32px; width: 32px; height: 32px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
  .dashboard-charts-grid, .dashboard-bottom-grid { gap: 1rem; }
  .glass-card, .kpi-card { padding: 1.1rem; }
  .modal-overlay { padding: .7rem; align-items: flex-end; }
  .modal-container { max-height: calc(100dvh - 1.4rem); overflow-y: auto; }
  .form-grid > .form-group { grid-column: auto; }
  .login-wrapper { grid-template-columns: 1fr !important; align-items: start !important; }
  .login-intro { display: none; }
  .login-box { margin: auto !important; padding: 2rem 0 !important; }
  .login-brand { align-items: stretch !important; }
  .login-brand .brand-mark { display: block; align-self: center; width: 108px; height: 108px; margin: 0 auto .7rem; }
  .login-mobile-name { display: block; text-align: center; font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; color: var(--primary); margin-bottom: .4rem; }
  .login-mobile-description { display: block; align-self: center; max-width: 100%; white-space: nowrap; text-align: center; color: var(--text-muted); font-size: clamp(.66rem, 2.8vw, .75rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.4; margin-bottom: .4rem; }
  .login-mobile-description:last-of-type { margin-bottom: 2.25rem; }
  .login-mobile-school { display: block; align-self: center; max-width: 100%; text-align: center; color: var(--primary); font-size: clamp(.66rem, 2.8vw, .77rem); font-weight: 800; letter-spacing: .025em; line-height: 1.35; margin-bottom: 2.25rem; }
}
@media (max-width: 520px) {
  .kpi-grid, .jadwal-stats, .guru-stats { grid-template-columns: 1fr; }
  .jadwal-stats, .guru-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .jadwal-stats .kpi-card, .guru-stats .kpi-card { padding: .75rem; }
  .jadwal-stats .kpi-title, .guru-stats .kpi-title { font-size: .72rem; }
  .jadwal-stats .kpi-icon-badge, .guru-stats .kpi-icon-badge { flex-basis: 29px; width: 29px; height: 29px; }
  .jadwal-stats .kpi-value, .guru-stats .kpi-value { font-size: 1.5rem; }
  .jadwal-stats .kpi-footer, .guru-stats .kpi-footer { font-size: .67rem; }
  .kpi-grid.dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .dashboard-kpi-grid .kpi-card { padding: .7rem .75rem; }
  .card-header { flex-wrap: wrap; }
  .topbar-right .btn { width: 38px; height: 38px; padding: 0; }
  .account-menu-panel { right: -48px; }
  .content-viewport { padding: 1rem .8rem 2rem; }
}
@media (max-width: 340px) {
  .kpi-grid.dashboard-kpi-grid { grid-template-columns: 1fr; }
  .jadwal-stats, .guru-stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Print Stylesheet (@media print)
   Generates a formal clean school document for official archives
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  .ambient-glow,
  .app-sidebar,
  .topbar,
  .results-action-bar,
  .report-role-warning,
  .btn,
  .btn-icon,
  .toast-container,
  .modal-overlay,
  .sidebar-header,
  .sidebar-footer,
  .app-credit-footer {
    display: none !important;
  }

  .app-layout {
    display: block !important;
  }

  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .content-viewport {
    padding: 0 !important;
    margin: 0 !important;
  }

  .formal-report-paper {
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    max-width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #000000 !important;
  }

  .official-letterhead {
    display: flex !important;
  }

  .report-table {
    border-collapse: collapse !important;
    width: 100% !important;
  }

  .report-table th,
  .report-table td {
    border: 1px solid #333 !important;
    color: #000 !important;
  }

  .report-signatures {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    page-break-inside: avoid !important;
  }

  .report-signatures .sig-box { text-align: left !important; }
  .report-signatures .sig-supervisor { justify-self: start; }
  .report-signatures .sig-guru { justify-self: end; }
  .report-signatures .sig-kepsek { grid-column: 1 / -1; justify-self: center; }

  .report-score-box {
    border: 1px solid #333 !important;
    background: #f8fafc !important;
  }
}

/* Flash Alerts */
.flash-alert { padding: 0.85rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; font-weight: 600; border: 1px solid var(--border-subtle); }
.flash-alert.success { background: var(--emerald-light); color: var(--emerald); border-color: var(--emerald); }
.flash-alert.error { background: var(--rose-light); color: var(--rose); border-color: var(--rose); }
.flash-alert.info { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
