/* ===================================================================
   HADIR.GURU — Design System & Stylesheet
   Sistem Absensi Digital Guru MTs (Madrasah Tsanawiyah)
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Color Tokens - Light Mode (Default) */
  --bg-primary: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-subtle: #F8FAFC;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --border-light: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-focus: #93C572;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Brand Hijau Apple (Hex #93C572) — Mode Guru */
  --emerald-50: #F3F9EE;
  --emerald-100: #E3F2D9;
  --emerald-200: #C9E6B7;
  --emerald-500: #93C572;
  --emerald-600: #78AA56;
  --emerald-700: #5F8E3E;
  --emerald-800: #48702C;

  /* Admin Mode Brand Color (Hex #006A4E) */
  --admin-green: #006A4E;
  --admin-green-light: #008763;
  --admin-green-dark: #004d38;

  /* Accent Colors */
  --amber-50: #FFFBEB;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  --blue-50: #EFF6FF;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;

  --rose-50: #FFF1F2;
  --rose-500: #F43F5E;
  --rose-600: #E11D48;

  --indigo-50: #EEF2FF;
  --indigo-500: #6366F1;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-emerald: 0 10px 25px -5px rgba(120, 170, 86, 0.35);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Dimensions */
  --sidebar-width: 280px;
  --topbar-height: 72px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-primary: #0B1120;
  --bg-surface: #131E32;
  --bg-elevated: #1B2943;
  --bg-subtle: #16233B;
  --bg-glass: rgba(19, 30, 50, 0.85);

  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;

  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 36px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   MODE GURU (Hijau Apple #93C572) vs MODE ADMIN (Hijau Madrasah #006A4E)
   ========================================================================== */
body.mode-guru {
  --emerald-50: #F3F9EE;
  --emerald-100: #E3F2D9;
  --emerald-200: #C9E6B7;
  --emerald-500: #93C572;
  --emerald-600: #78AA56;
  --emerald-700: #5F8E3E;
  --emerald-800: #48702C;
  --border-focus: #93C572;
  --shadow-emerald: 0 10px 25px -5px rgba(120, 170, 86, 0.35);
}

body.mode-admin {
  --emerald-50: #E6F3EE;
  --emerald-100: #C2E3D6;
  --emerald-200: #8CC7AF;
  --emerald-500: #006A4E;
  --emerald-600: #00543D;
  --emerald-700: #00402E;
  --emerald-800: #002B1F;
  --border-focus: #006A4E;
  --shadow-emerald: 0 10px 25px -5px rgba(0, 106, 78, 0.35);
}

.btn-primary-action.checked-in-complete {
  background: linear-gradient(135deg, #78AA56, #5F8E3E) !important;
  box-shadow: 0 4px 14px rgba(95, 142, 62, 0.35) !important;
  opacity: 0.95;
  cursor: default;
}

body.mode-admin .btn-primary-action.checked-in-complete {
  background: linear-gradient(135deg, #006A4E, #004d38) !important;
  box-shadow: 0 4px 14px rgba(0, 106, 78, 0.35) !important;
}

body.mode-admin .mobile-bottom-nav {
  display: none !important;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Modern App Shell Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-bottom: 1px solid var(--border-light);
}

.brand-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--emerald-600);
  line-height: 1.1;
}

.brand-text span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  transform: translateX(3px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #FFFFFF;
  box-shadow: var(--shadow-emerald);
}

#sidebarNavAdmin .nav-link.active {
  background: linear-gradient(135deg, var(--admin-green), var(--admin-green-light));
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(0, 106, 78, 0.4);
}

.nav-link.active svg {
  color: #FFFFFF;
  stroke: #FFFFFF;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 2.2;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.nav-badge-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* Sidebar School Card & Quick Info */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
}

.school-mini-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.school-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--emerald-50);
  color: var(--emerald-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .school-icon-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-500);
}

.school-info-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.school-info-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* Top Bar Styles */
.topbar {
  height: var(--topbar-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.server-clock-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.status-dot-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  background-color: var(--emerald-500);
  border-radius: 50%;
}

.status-dot-pulse::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid var(--emerald-500);
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--emerald-600);
  letter-spacing: -0.01em;
}

[data-theme="dark"] .clock-time {
  color: var(--emerald-500);
}

.clock-tz {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Topbar Actions */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.topbar-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.notif-badge-bubble {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  background-color: var(--rose-500);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
}

/* User Profile Dropdown Pill */
.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-pill:hover {
  border-color: var(--emerald-500);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--emerald-500);
}

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

.user-info-meta {
  text-align: left;
  line-height: 1.1;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-role-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Dashboard Page Container */
.page-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Banner / Welcome Header */
.welcome-banner {
  background: linear-gradient(135deg, #385723 0%, #4E7730 45%, #699843 100%);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 12px 28px -6px rgba(105, 152, 67, 0.35);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(147, 197, 114, 0.45) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.badge-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.welcome-content p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

.welcome-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: #E2E8F0;
}

.welcome-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Presensi Hero Cards Grid */
.attendance-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

/* Left Card: Live Clock & Quick Action */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-title-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--emerald-50);
  color: var(--emerald-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .card-title-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-500);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-belum-absen {
  background-color: #FEF3C7;
  color: #92400E;
}

.status-hadir {
  background-color: var(--emerald-100);
  color: var(--emerald-800);
}

.status-terlambat {
  background-color: #FFE4E6;
  color: #9F1239;
}

.status-pulang {
  background-color: var(--blue-50);
  color: var(--blue-600);
}

.status-izin {
  background-color: var(--indigo-50);
  color: var(--indigo-500);
}

/* Live Time Showcase */
.live-clock-panel {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.clock-live-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.85rem;
  font-weight: 800;
  color: var(--emerald-600);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .clock-live-big {
  color: #34D399;
}

.clock-date-live {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.clock-schedule-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Action Check In / Check Out Buttons */
.attendance-actions-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.btn-primary-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.15rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #93C572, #699843);
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 18px rgba(120, 170, 86, 0.4);
}

.btn-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(120, 170, 86, 0.5);
}

.btn-primary-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: var(--text-muted);
}

.btn-primary-action span.btn-label {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn-primary-action span.btn-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 500;
}

.btn-checkout-action {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.btn-checkout-action:hover:not(:disabled) {
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45);
}

/* Check-in Locked (Sebelum Jam 06:00 WIB) */
.btn-primary-action.check-in-locked {
  background: var(--bg-elevated) !important;
  color: var(--text-secondary) !important;
  border: 1.5px dashed var(--border-light) !important;
  box-shadow: none !important;
  opacity: 0.78;
  cursor: not-allowed;
}
.btn-primary-action.check-in-locked svg {
  color: var(--text-muted);
}
.btn-primary-action.check-in-locked span.btn-sub {
  color: var(--text-muted);
  font-weight: 600;
}

/* Check-in Closed (Melebihi Batas Toleransi Masuk) */
.btn-primary-action.check-in-closed {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #dc2626 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.28) !important;
  box-shadow: none !important;
  opacity: 0.88;
  cursor: not-allowed;
}
.btn-primary-action.check-in-closed svg {
  color: #ef4444;
}
.btn-primary-action.check-in-closed span.btn-sub {
  color: #b91c1c;
  font-weight: 700;
}

/* Check-out Locked (Belum Masuk Jam Pulang) */
.btn-primary-action.check-out-locked {
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
  border: 1.5px dashed rgba(37, 99, 235, 0.32) !important;
  box-shadow: none !important;
  opacity: 0.82;
  cursor: not-allowed;
}
.btn-primary-action.check-out-locked svg {
  color: #3b82f6;
}
.btn-primary-action.check-out-locked span.btn-sub {
  color: #1d4ed8;
  font-weight: 600;
}

/* Today's Log Status Badges */
.today-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  background: var(--bg-elevated);
  padding: 0.85rem;
  border-radius: var(--radius-md);
}

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

.stamp-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.stamp-data {
  line-height: 1.2;
}

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

.stamp-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

/* Geofence Radar Card */
.geofence-card {
  display: flex;
  flex-direction: column;
}

.radar-map-preview {
  position: relative;
  height: 190px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-light);
}

.map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92);
}

.geofence-radar-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-pulse-ring {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid #93C572;
  background: rgba(147, 197, 114, 0.25);
  animation: radarWave 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes radarWave {
  0% { transform: scale(0.4); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.radar-dot-center {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  background: #78AA56;
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(147, 197, 114, 0.85);
}

.geofence-tag-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Geofence Status Details */
.geofence-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-label {
  color: var(--text-secondary);
}

.meta-value {
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.gps-verified-tag {
  color: var(--emerald-600);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="dark"] .gps-verified-tag {
  color: #34D399;
}

/* Simulation Switcher for GPS testing */
.gps-sim-control {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gps-sim-control span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-toggle-sim {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-toggle-sim:hover {
  background: var(--bg-surface);
  border-color: var(--emerald-500);
}

/* KPI Monthly Statistics Cards */
.section-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-header-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 155px;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

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

.kpi-emerald { background: var(--emerald-50); color: var(--emerald-600); }
.kpi-amber { background: var(--amber-50); color: var(--amber-600); }
.kpi-blue { background: var(--blue-50); color: var(--blue-600); }
.kpi-rose { background: var(--rose-50); color: var(--rose-600); }
.kpi-purple { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }

[data-theme="dark"] .kpi-emerald { background: rgba(16, 185, 129, 0.15); color: #34D399; }
[data-theme="dark"] .kpi-amber { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
[data-theme="dark"] .kpi-blue { background: rgba(59, 130, 246, 0.15); color: #60A5FA; }
[data-theme="dark"] .kpi-rose { background: rgba(244, 63, 94, 0.15); color: #FB7185; }
[data-theme="dark"] .kpi-purple { background: rgba(139, 92, 246, 0.22); color: #a78bfa; }

.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.kpi-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.kpi-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
}

.kpi-footer-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
}

/* Tabs & Content Sections */
.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Filters & Table Toolbar */
.toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.filter-input, .filter-select {
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-input:focus, .filter-select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--text-secondary);
}

.btn-emerald {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #93C572, #78AA56);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 3px 12px rgba(120, 170, 86, 0.35);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #78AA56, #5F8E3E);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(120, 170, 86, 0.45);
}

/* History Table Styles */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table,
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th,
.custom-table th {
  background: var(--bg-elevated);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table td,
.custom-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:last-child td,
.custom-table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td,
.custom-table tr:hover td {
  background: var(--bg-subtle);
}

.time-stamp-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

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

.badge-hadir { background: #E8F5DF; color: #3B5F21; }
.badge-terlambat { background: #FFE4E6; color: #9F1239; }
.badge-izin { background: #EEF2FF; color: #3730A3; }
.badge-sakit { background: #FEF3C7; color: #92400E; }
.badge-belum { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }

.badge-correction-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--amber-600);
  background: var(--amber-50);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 0.35rem;
  cursor: pointer;
}

[data-theme="dark"] .badge-correction-alert {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}

/* Modal System */
.modal-overlay,
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active,
.modal-overlay.show,
.modal.active,
.modal.show {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 1.5rem 1.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn,
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close-btn:hover,
.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--border-light);
}

/* Webcam / Selfie Mock Simulation */
.camera-view-container {
  position: relative;
  width: 100%;
  height: 260px;
  background: #0F172A;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-face-frame {
  position: absolute;
  width: 180px;
  height: 210px;
  border: 2px dashed rgba(16, 185, 129, 0.85);
  border-radius: 50% 50% 45% 45%;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

.camera-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--emerald-500), transparent);
  animation: scanDown 2.5s ease-in-out infinite alternate;
}

@keyframes scanDown {
  0% { top: 15%; opacity: 0.3; }
  100% { top: 85%; opacity: 0.9; }
}

.camera-pill-status {
  position: absolute;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.file-dropzone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.75rem 1rem;
  text-align: center;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-dropzone:hover {
  border-color: var(--emerald-500);
  background: var(--emerald-50);
}

[data-theme="dark"] .file-dropzone:hover {
  background: rgba(16, 185, 129, 0.08);
}

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

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all var(--transition-normal);
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.toast-msg {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Mobile Bottom Navigation Bar (Appears on small screens) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  z-index: 50;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
}

.mobile-nav-item {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.35rem 0.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-fast);
  text-align: center;
}

.mobile-nav-item span {
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.mobile-nav-item.active {
  color: var(--emerald-600);
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .attendance-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
  }
  .main-wrapper {
    margin-left: 0;
    padding-bottom: 72px; /* space for bottom nav */
  }
  .mobile-menu-btn {
    display: block;
  }
  .topbar {
    padding: 0 1rem;
  }
  .page-container {
    padding: 1.25rem;
  }
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .user-info-meta {
    display: none;
  }
  .clock-tz {
    display: none;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .attendance-actions-wrap {
    grid-template-columns: 1fr;
  }
  .today-summary-row {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   KBM & ABSEN MENGAJAR STYLES
   =================================================================== */

.kbm-session-card {
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.kbm-session-card:hover {
  transform: translateY(-2px);
}

/* 1. STATE: WAITING / BELUM MASUK KELAS (Warna Fill Soft Sky/Cyan) */
.kbm-session-card.waiting-session,
.kbm-session-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 50%, #eff6ff 100%);
  border: 1.5px solid #bae6fd;
  border-left: 6px solid #0284c7;
  box-shadow: 0 4px 18px -2px rgba(2, 132, 199, 0.12);
}

.kbm-session-card.waiting-session:hover {
  box-shadow: 0 8px 24px -2px rgba(2, 132, 199, 0.18);
  border-color: #7dd3fc;
}

.kbm-session-card.waiting-session .kbm-session-time {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  color: #0369a1;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
}

/* 2. STATE: ACTIVE / SEDANG MENGAJAR DI KELAS (Warna Fill Vibrant Apple Green) */
.kbm-session-card.active-session {
  background: linear-gradient(135deg, #f4faee 0%, #e8f5df 50%, #f0f9eb 100%);
  border: 1.5px solid #93C572;
  border-left: 6px solid #78AA56;
  box-shadow: 0 8px 26px -2px rgba(120, 170, 86, 0.28), 0 0 0 1px #93C572;
}

.kbm-session-card.active-session:hover {
  box-shadow: 0 10px 30px -2px rgba(120, 170, 86, 0.35);
}

.kbm-session-card.active-session .kbm-session-time {
  background: #ffffff;
  border: 1.5px solid var(--emerald-500);
  color: #3B5F21;
  box-shadow: 0 2px 10px rgba(120, 170, 86, 0.15);
}

/* 3. STATE: COMPLETED / KBM SELESAI (Warna Fill Soft Sage/Teal Success) */
.kbm-session-card.completed-session {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 55%, #f0fdfa 100%);
  border: 1.5px solid #86efac;
  border-left: 6px solid #16a34a;
  box-shadow: 0 4px 18px -2px rgba(22, 163, 74, 0.12);
}

.kbm-session-card.completed-session:hover {
  box-shadow: 0 8px 22px -2px rgba(22, 163, 74, 0.18);
}

.kbm-session-card.completed-session .kbm-session-time {
  background: #ffffff;
  border: 1.5px solid #86efac;
  color: #166534;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
}

/* 4. STATE: UPCOMING / SESI SELANJUTNYA (Belum Waktunya - Soft Neutral Slate) */
.kbm-session-card.kbm-upcoming-session {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  border: 1.5px solid #cbd5e1 !important;
  border-left: 6px solid #94a3b8 !important;
  box-shadow: 0 3px 12px rgba(148, 163, 184, 0.08) !important;
  opacity: 0.95;
}

.kbm-session-card.kbm-upcoming-session:hover {
  box-shadow: 0 4px 14px rgba(148, 163, 184, 0.14) !important;
}

.kbm-session-card.kbm-upcoming-session .kbm-session-time {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
  box-shadow: 0 2px 6px rgba(148, 163, 184, 0.1);
}

/* 5. STATE: NOW OPEN / SIAP CHECK-IN (Jadwal Sedang Aktif Berlangsung) */
.kbm-session-card.kbm-now-open {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #eff6ff 100%) !important;
  border: 1.5px solid #6ee7b7 !important;
  border-left: 6px solid #10b981 !important;
  box-shadow: 0 6px 22px -2px rgba(16, 185, 129, 0.22) !important;
}

.kbm-session-card.kbm-now-open:hover {
  box-shadow: 0 10px 28px -2px rgba(16, 185, 129, 0.3) !important;
  border-color: #34d399 !important;
}

.kbm-session-card.kbm-now-open .kbm-session-time {
  background: #ffffff;
  border-color: #6ee7b7;
  color: #065f46;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* 6. STATE: PASSED / LEWAT JAM JADWAL */
.kbm-session-card.passed-session {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #fef2f2 100%) !important;
  border: 1.5px solid #fde68a !important;
  border-left: 6px solid #f59e0b !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.1) !important;
}

.kbm-session-card.passed-session .kbm-session-time {
  background: #ffffff;
  border-color: #fde68a;
  color: #92400e;
}

.kbm-session-time {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: #ffffff;
  padding: 0.95rem 1.45rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  white-space: nowrap;
  letter-spacing: -0.015em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.kbm-session-time svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.kbm-session-meta {
  flex: 1;
}

.kbm-session-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.kbm-session-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.kbm-session-sub .kbm-jtm-tag,
.kbm-session-sub .badge-pill-status,
.kbm-session-sub > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  line-height: 1.25;
}

.kbm-session-sub .kbm-jtm-tag {
  color: #0369a1;
  border-color: #bae6fd;
}

.kbm-session-card.completed-session .kbm-session-sub .kbm-jtm-tag {
  color: #15803d;
  border-color: #bbf7d0;
}

.kbm-session-sub .badge-hadir {
  background: #ffffff;
  color: #15803d;
  border-color: #86efac;
}

.kbm-session-sub .badge-kbm-ongoing {
  background: #ffffff;
  color: #3B5F21;
  border-color: #C9E6B7;
}

/* Precision Attendance Detail Grid & Chips */
.kbm-attendance-details-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin-top: 0.45rem;
}

.kbm-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  font-size: 0.8rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  line-height: 1.35;
}

.kbm-detail-chip.in-chip {
  border-color: #86efac;
  background: #ffffff;
}

.kbm-detail-chip.out-chip {
  border-color: #cbd5e1;
  background: #ffffff;
}

.kbm-detail-chip.dur-chip {
  border-color: #cbd5e1;
  background: #ffffff;
}

.kbm-detail-chip .chip-label {
  color: #475569;
  font-weight: 700;
  font-size: 0.78rem;
}

.kbm-detail-chip .chip-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: #0f172a;
  font-size: 0.84rem;
}

.kbm-detail-chip .chip-punc {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  margin-left: 0.25rem;
}

.kbm-detail-chip .chip-punc.late {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 700;
}

.kbm-detail-chip .chip-punc.ontime {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: 700;
}

.kbm-session-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 820px) {
  .kbm-session-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .kbm-session-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.badge-kbm-ongoing {
  background: #FEF3C7;
  color: #92400E;
  animation: pulseDot 2s infinite;
}

.badge-kbm-done {
  background: var(--emerald-100);
  color: var(--emerald-800);
}

.badge-kbm-upcoming {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* Student Attendance Input Grid in Journal Modal */
.student-attendance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.student-count-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  text-align: center;
}

.student-count-box label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.student-count-box input {
  width: 100%;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 800;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.student-count-box input:focus {
  border-color: var(--emerald-500);
  outline: none;
}

/* Official Monthly Attendance Report A4 Landscape Preview */
.official-report-page {
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  background: transparent;
  width: 100%;
}
.official-report-page table {
  border-collapse: collapse;
}

.official-report-sheet {
  background: #ffffff;
  color: #000000;
  box-sizing: border-box;
  width: 100%;
}

.official-report-sheet-card {
  background: #ffffff;
  color: #000000;
  padding: 14px 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  border-radius: 2px;
  box-sizing: border-box;
  margin: 0 auto;
}

.sheet-desk-divider {
  user-select: none;
}

.official-report-attendance-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
}
.official-report-attendance-table th {
  font-size: 7.6pt;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  padding: 2px 2px;
}
.official-report-attendance-table td {
  font-size: 7.4pt;
  padding: 2.6px 3px;
  line-height: 1.12;
  font-family: Arial, Helvetica, sans-serif;
}

.official-report-kpi-table,
.official-report-compliance-table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  font-family: Arial, Helvetica, sans-serif !important;
}
.official-report-kpi-table th,
.official-report-kpi-table td {
  text-align: center !important;
  vertical-align: middle !important;
}
.official-report-compliance-table th {
  text-align: center !important;
  vertical-align: middle !important;
}

/* Print Styles for Slip Rekap & Official Monthly Attendance Report (2 Lembar Presisi A4 Landscape) */
@media print {
  @page {
    size: A4 landscape;
    margin: 3mm 5mm 3mm 5mm;
  }
  html, body {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    overflow: visible !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
  .sidebar, .topbar, .mobile-bottom-nav, .attendance-actions-wrap, .gps-sim-control, .toolbar-card, .btn-emerald, .btn-secondary, .role-switcher-wrap, .login-view-wrapper, .modal-header, .modal-footer, .modal-close-btn, #toastContainer, .official-report-filter-toolbar, .tab-section, .app-shell, .main-wrapper, .page-container, .main-content, .modal-overlay:not(#modalOfficialAttendanceReport), .sheet-desk-divider {
    display: none !important;
  }
  #modalOfficialAttendanceReport {
    position: static !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }
  #modalOfficialAttendanceReport .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }
  #modalOfficialAttendanceReport .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
  }
  .official-report-preview-desk {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
  }
  #officialReportPaperSheet {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    color: #000000 !important;
  }
  .official-report-page {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .official-report-sheet {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .official-report-sheet:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }
  #officialReportSheet2 {
    page-break-before: always !important;
    break-before: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .official-report-sheet-card {
    background: #ffffff !important;
    padding: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
  }
  table {
    border-collapse: collapse !important;
    width: 100% !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  tbody {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .official-report-attendance-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }
  .official-report-attendance-table th {
    font-size: 7.6pt !important;
    font-weight: bold !important;
    padding: 2px 2px !important;
  }
  .official-report-attendance-table td {
    font-size: 7.4pt !important;
    padding: 2.6px 3px !important;
    line-height: 1.12 !important;
  }
  .official-report-kpi-table,
  .official-report-compliance-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    margin: 0 auto !important;
  }
}

/* ==========================================================================
   ROLE SWITCHER & LIVE RADAR MONITORING EXTENSIONS
   ========================================================================== */

/* Role Switcher in Top Bar */
.role-switcher-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 4px;
  box-shadow: var(--shadow-sm);
  gap: 4px;
}

.role-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.role-switcher-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.role-switcher-btn.active {
  background: linear-gradient(135deg, #93C572, #78AA56);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(120, 170, 86, 0.4);
}

.role-switcher-btn.active.admin-mode {
  background: linear-gradient(135deg, #008763, #006A4E) !important;
  box-shadow: 0 2px 10px rgba(0, 106, 78, 0.4) !important;
  color: #FFFFFF !important;
}

.live-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: beacon-pulse 1.8s infinite;
}

@keyframes beacon-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Live Monitoring KBM Admin Hero Banner */
.radar-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.radar-hero-banner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -5%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.radar-title-group h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.radar-title-group p {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 600px;
}

.radar-meta-chips {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.radar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

/* Radar KPI Stats Grid */
.radar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.radar-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.radar-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.radar-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
  color: var(--text-primary);
}

.radar-kpi-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Classroom Monitoring Grid */
.classroom-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.room-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition-normal);
}

.room-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Status variants */
.room-card.status-on-time {
  border-top: 4px solid var(--emerald-500);
}

.room-card.status-late {
  border-top: 4px solid #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, var(--bg-surface) 100%);
}

.room-card.status-critical {
  border-top: 4px solid #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.06) 0%, var(--bg-surface) 100%);
  animation: room-alert-border 2.2s infinite ease-in-out;
}

@keyframes room-alert-border {
  0%, 100% { border-color: rgba(239, 68, 68, 0.35); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1); }
  50% { border-color: rgba(239, 68, 68, 0.85); box-shadow: 0 6px 22px rgba(239, 68, 68, 0.3); }
}

.room-card.status-inval {
  border-top: 4px solid #8b5cf6;
}

.room-card.status-waiting {
  border-top: 4px solid #94a3b8;
}

.room-card.status-finished {
  border-top: 4px solid #64748b;
  opacity: 0.9;
}

.room-card.status-break {
  border-top: 4px solid #f59e0b;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-surface) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}

.room-card.status-holiday {
  border-top: 4px solid #0284c7;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.08) 0%, var(--bg-surface) 100%);
  border-color: rgba(2, 132, 199, 0.35);
}

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

.room-title-wrap {
  flex: 1;
}

.room-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.room-building {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.room-badge.badge-on-time {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-600);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.room-badge.badge-late {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.room-badge.badge-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse-danger 1.5s infinite;
}

@keyframes pulse-danger {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.room-badge.badge-inval {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.room-badge.badge-waiting {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.room-badge.badge-finished {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.room-badge.badge-break {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-weight: 800;
}

.room-badge.badge-holiday {
  background: rgba(2, 132, 199, 0.16);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.45);
  font-weight: 800;
}

.holiday-badge-madrasah {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-700);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  padding: 0.22rem 0.7rem;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.holiday-badge-nasional {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(2, 132, 199, 0.15);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.35);
  border-radius: var(--radius-full);
  padding: 0.22rem 0.7rem;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Specific Holiday Table Styles */
#tableHolidays {
  font-size: 0.84rem;
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

#tableHolidays th,
#tableHolidays td {
  vertical-align: middle;
  padding: 0.75rem 0.85rem;
}

#tableHolidays th {
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  background: var(--bg-elevated);
  white-space: nowrap;
}

#tableHolidays tbody tr:hover td {
  background: rgba(2, 132, 199, 0.035);
}

.holiday-date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.holiday-date-main {
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.holiday-date-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.holiday-duration-chip {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
  font-family: 'Outfit', sans-serif;
}

.holiday-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.room-body {
  padding: 0.75rem 0;
  border-top: 1px dashed var(--border-light);
  border-bottom: 1px dashed var(--border-light);
  margin: 0.65rem 0 1rem;
}

.room-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
}

.room-detail-row:last-child {
  margin-bottom: 0;
}

.room-detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.room-detail-val {
  color: var(--text-primary);
  font-weight: 700;
  text-align: right;
}

.room-topic-snippet {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  margin-top: 0.65rem;
  line-height: 1.35;
}

.room-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Activity Feed in Admin */
.admin-feed-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.admin-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.admin-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border-left: 3px solid var(--border-medium);
  font-size: 0.82rem;
}

.admin-feed-item.feed-success {
  border-left-color: var(--emerald-500);
}

.admin-feed-item.feed-warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.admin-feed-item.feed-danger {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.admin-feed-item.feed-info {
  border-left-color: #0284c7;
}

.feed-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.feed-content {
  flex: 1;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Teacher Classroom Live Status Card in Tab Mengajar */
.kbm-live-hero {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%);
  border: 1.5px solid var(--emerald-500);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-emerald);
}

.kbm-live-hero.is-teaching {
  background: linear-gradient(135deg, rgba(147, 197, 114, 0.18) 0%, rgba(95, 142, 62, 0.1) 100%);
  border-color: var(--emerald-500);
}

.kbm-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kbm-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.scanner-frame-sim {
  width: 100%;
  height: 220px;
  background: #0f172a;
  border-radius: var(--radius-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px dashed var(--emerald-600);
  margin-bottom: 1.25rem;
}

.scanner-target {
  width: 140px;
  height: 140px;
  border: 2px solid var(--emerald-500);
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: 0 0 15px rgba(147, 197, 114, 0.4);
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--emerald-500), transparent);
  box-shadow: 0 0 10px var(--emerald-500);
  animation: laser-scan 2s ease-in-out infinite alternate;
}

@keyframes laser-scan {
  0% { top: 5%; }
  100% { top: 95%; }
}

/* Nav Section Header */
.nav-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0.5rem 0.75rem 0.25rem;
  opacity: 0.85;
}

/* Admin Table & Action Styling */
.admin-table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Teacher Switcher Dropdown in Topbar */
.teacher-switcher-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full, 9999px);
  padding: 0.25rem 0.65rem 0.25rem 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.teacher-switcher-wrap:hover {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.teacher-switcher-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald-600);
}

.teacher-switcher-select {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 190px;
}

.teacher-switcher-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 500;
}

/* Roster Table Badges */
.badge-clash {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulse-border 2s infinite;
}

.badge-clean {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-600);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tr-clash {
  background-color: rgba(239, 68, 68, 0.05) !important;
}

.tr-clash:hover {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(239, 68, 68, 0.3); }
  50% { border-color: rgba(239, 68, 68, 0.7); box-shadow: 0 0 6px rgba(239, 68, 68, 0.25); }
}

/* Teacher Database & Credentials Styling */
.cred-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cred-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.cred-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  color: var(--text-muted);
  border-radius: 3px;
  line-height: 1;
  transition: all 0.15s ease;
}

.cred-copy-btn:hover {
  color: var(--emerald-600);
  background: rgba(16, 185, 129, 0.1);
}

/* WhatsApp Direct Send Pill Button */
.btn-wa-direct {
  background: rgba(37, 211, 102, 0.09);
  border: 1px solid rgba(37, 211, 102, 0.4);
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  color: #15803d !important;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.25;
  white-space: nowrap;
}

.btn-wa-direct:hover {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.32);
}

.btn-wa-direct:hover svg {
  color: #ffffff;
}

.btn-wa-direct-empty {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.5);
  color: #b45309 !important;
}

.btn-wa-direct-empty:hover {
  background: #d97706;
  border-color: #b45309;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

.badge-pns {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-pppk {
  background: rgba(147, 197, 114, 0.18);
  color: #3B5F21;
  border: 1px solid rgba(147, 197, 114, 0.4);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-gtt {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-yayasan {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
  border: 1px solid rgba(13, 148, 136, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-dept {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dept-pai { background: rgba(147, 197, 114, 0.18); color: #3B5F21; }
.dept-mipa { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.dept-bahasa { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.dept-ips { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.dept-mulok { background: rgba(236, 72, 153, 0.12); color: #db2777; }

.btn-login-direct {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.btn-login-direct:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

/* ==========================================================================
   DIREKTORI GURU & DATABASE AKUN LOGIN (PRECISION UI/UX STYLING)
   ========================================================================== */

/* 1. Hero Banner */
.teachers-db-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 55%, #075985 100%);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2.5rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.teachers-db-banner::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -50px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.teachers-db-banner::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 25%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.teachers-db-banner .welcome-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.teachers-db-banner .welcome-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.teachers-db-banner .welcome-content p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  margin-bottom: 1.15rem;
}

.teachers-db-banner-actions {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  flex-shrink: 0;
  width: 230px;
}

.btn-banner-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: #ffffff;
  color: #0284c7;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-banner-add:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  color: #0369a1;
}

.btn-banner-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.72rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-banner-export:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 992px) {
  .teachers-db-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.6rem;
    gap: 1.35rem;
  }
  .teachers-db-banner-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
  }
  .teachers-db-banner-actions .btn-banner-add,
  .teachers-db-banner-actions .btn-banner-export {
    flex: 1 1 200px;
  }
}

/* 2. Precision KPI Cards */
.teachers-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .teachers-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .teachers-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-db-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 154px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-db-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(2, 132, 199, 0.35);
}

.kpi-db-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.kpi-db-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.kpi-db-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-db-meta {
  font-size: 0.74rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-light);
}

/* 3. Toolbar: Search Bar & Smart Filters */
.teachers-toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.45rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.teachers-search-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.teachers-search-input-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.teachers-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.teachers-search-input {
  width: 100%;
  padding-left: 2.35rem !important;
  padding-right: 2.2rem !important;
  height: 42px;
  font-size: 0.86rem !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-subtle) !important;
  border: 1px solid var(--border-light) !important;
  transition: all 0.2s ease !important;
}

.teachers-search-input:focus {
  background: var(--bg-surface) !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.teachers-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.teachers-search-clear:hover {
  color: var(--text-primary);
  background: var(--border-light);
}

.teachers-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.teachers-count-pill .count-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0284c7;
}

.teachers-filters-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.teachers-filters-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.filter-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.6rem;
  transition: border-color 0.2s ease;
}

.filter-select-wrap:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.filter-select-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.filter-select {
  border: none !important;
  background: transparent !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  padding: 0.25rem 0.5rem !important;
  height: auto !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
}

.teachers-actions-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.btn-action-util {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-action-util:hover {
  background: var(--bg-subtle);
  border-color: #0284c7;
  color: #0284c7;
}

.btn-action-util.active {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

.btn-action-reset {
  color: var(--text-secondary);
}

.btn-action-reset:hover {
  color: #ef4444;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

/* ==========================================================================
   PIKET PENYAMBUTAN SISWA (5S GERBANG MADRASAH) STYLING
   ========================================================================== */

/* 1. Dashboard Reminder Card (Mode Guru) */
.picket-duty-banner {
  background: linear-gradient(135deg, #2e4a1c 0%, #466e2c 50%, #63923f 100%);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.85rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(120, 170, 86, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

.picket-duty-banner::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -30px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.picket-duty-content {
  position: relative;
  z-index: 2;
  flex: 1;
}

.picket-duty-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(251, 191, 36, 0.2);
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.4);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.picket-duty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.picket-duty-desc {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
}

.picket-duty-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-picket-checkin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #385723;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-picket-checkin:hover {
  background: #f4fbf0;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  color: #48702C;
}

.btn-picket-checkin.confirmed {
  background: var(--emerald-500);
  color: #ffffff;
  cursor: default;
  pointer-events: none;
}

/* 2. Hero Banner Khusus Tab Piket Penyambutan */
.welcoming-picket-banner {
  background: linear-gradient(135deg, #2e4a1c 0%, #466e2c 55%, #63923f 100%);
  border-radius: var(--radius-xl);
  padding: 1.85rem 2.25rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(120, 170, 86, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.welcoming-picket-banner .welcome-content {
  flex: 1 1 0%;
  min-width: 0;
}

body.mode-admin .welcoming-picket-banner {
  background: linear-gradient(135deg, #004d38 0%, #006A4E 55%, #008763 100%);
  box-shadow: 0 10px 25px -5px rgba(0, 106, 78, 0.4);
}

.welcoming-picket-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Mode Guru & Admin Banner Actions for Piket Tab */
#picketBannerActionsUnified,
.picket-banner-actions-unified {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
  width: 310px;
  max-width: 100%;
  flex-shrink: 0;
  z-index: 2;
}

/* Tombol Aksi Banner Piket */
#btnOpenAddPicketModal,
.btn-input-guru-piket {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 46px !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: var(--radius-md) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
  background: #00563b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 14px rgba(0, 45, 30, 0.45) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#btnOpenAddPicketModal:hover,
.btn-input-guru-piket:hover {
  background: #006A4E !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

#btnOpenAddPicketModal:active,
.btn-input-guru-piket:active {
  transform: translateY(0) !important;
}

#btnQuickPicketCheckIn,
.btn-banner-action-piket {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 46px !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: var(--radius-md) !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.25 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.55rem !important;
  text-align: center !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden !important;
}

#btnQuickPicketCheckIn .picket-btn-label,
.btn-banner-action-piket .picket-btn-label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

/* Status: Bukan Jadwal Hari Ini / Belum Ada Jadwal */
#btnQuickPicketCheckIn.btn-picket-status-idle,
.btn-picket-status-idle {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1.5px dashed rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  font-weight: 600 !important;
  cursor: default !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Status: Jadwal Hari Ini (Ready Check-In) */
#btnQuickPicketCheckIn.btn-picket-status-ready,
.btn-picket-status-ready {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45) !important;
  cursor: pointer !important;
}

#btnQuickPicketCheckIn.btn-picket-status-ready:hover,
.btn-picket-status-ready:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.6) !important;
}

/* Status: Sudah Check-In */
#btnQuickPicketCheckIn.btn-picket-status-checkedin,
.btn-picket-status-checkedin {
  background: #ffffff !important;
  color: #1F3D12 !important;
  border: 1.5px solid #C9E6B7 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
  cursor: default !important;
}

.picket-badge-icon.check-done {
  background: #93C572;
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(120, 170, 86, 0.4);
}

#picketAdminBadge,
.admin-picket-status-pill {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 46px !important;
  padding: 0.75rem 1.25rem !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  letter-spacing: 0.02em !important;
  background: rgba(0, 106, 78, 0.35) !important;
  border: 1px solid rgba(0, 106, 78, 0.65) !important;
  color: #ffffff !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  border-radius: var(--radius-md) !important;
}

body.mode-admin .admin-picket-status-pill,
body.mode-admin #picketAdminBadge {
  display: flex !important;
}

@media (max-width: 992px) {
  .welcoming-picket-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 1.5rem !important;
    gap: 1.25rem !important;
  }
  #picketBannerActionsUnified,
  .picket-banner-actions-unified {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 3. Day Selector Pills (Senin s/d Sabtu) */
.picket-day-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.picket-day-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex: 1;
  min-width: 105px;
}

.picket-day-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.picket-day-btn.active {
  background: linear-gradient(135deg, #93C572 0%, #78AA56 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(120, 170, 86, 0.35);
}

body.mode-admin .picket-day-btn.active {
  background: linear-gradient(135deg, #006A4E, #008763);
  box-shadow: 0 4px 12px rgba(0, 106, 78, 0.4);
}

.picket-day-btn .day-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
}

.picket-day-btn.active .day-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.picket-day-btn.today-highlight:not(.active) {
  border-color: #78AA56;
  color: #3B5F21;
  background: rgba(147, 197, 114, 0.12);
}

body.mode-admin .picket-day-btn.today-highlight:not(.active) {
  border-color: #006A4E;
  color: #006A4E;
  background: rgba(0, 106, 78, 0.08);
}

/* 4. Squad Header & Info */
.picket-squad-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.squad-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.squad-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(147, 197, 114, 0.18);
  color: #3B5F21;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

body.mode-admin .squad-icon-badge {
  background: rgba(0, 106, 78, 0.15);
  color: #006A4E;
}

/* 5. Picket Member Cards Grid */
.picket-members-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

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

.picket-member-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.picket-member-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(147, 197, 114, 0.45);
}

.picket-member-card.is-current-user {
  border-color: var(--emerald-500);
  background: linear-gradient(to bottom, rgba(147, 197, 114, 0.08), transparent);
}

.picket-member-card.is-current-user::after {
  content: 'Tugas Anda';
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--emerald-600);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.picket-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.picket-avatar-box {
  position: relative;
  flex-shrink: 0;
}

.picket-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.picket-point-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.25);
  margin-top: 0.35rem;
}

.picket-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
  font-size: 0.78rem;
}

.picket-actions-row,
.member-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  flex-wrap: wrap;
  border-top: 1px dashed var(--border-light);
  padding-top: 0.75rem;
  margin-top: 0.85rem;
}

.member-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.member-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}

.member-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.picket-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full, 999px);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.picket-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.picket-role-badge.role-coord {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

.member-loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.58rem;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.picket-inval-badge {
  margin-top: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  color: #b45309;
  font-size: 0.74rem;
}

.btn-member-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-member-action:hover:not(:disabled) {
  background: #e2e8f0;
  color: var(--text-primary);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-member-action.btn-swap {
  background: rgba(14, 165, 233, 0.1);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.32);
}

.btn-member-action.btn-swap:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.btn-member-action.btn-wa,
a.btn-member-action.btn-wa,
a.btn-member-action.btn-wa:visited {
  background: rgba(37, 211, 102, 0.12);
  color: #15803d !important;
  border: 1px solid rgba(37, 211, 102, 0.45);
  text-decoration: none !important;
  font-weight: 700;
}

.btn-member-action.btn-wa:hover,
a.btn-member-action.btn-wa:hover {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.28);
  text-decoration: none !important;
  transform: translateY(-1px);
}

.badge-standby {
  background: rgba(147, 197, 114, 0.22);
  color: #3B5F21;
  border: 1px solid rgba(147, 197, 114, 0.45);
  font-weight: 700;
}

.badge-otw {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 700;
}

.badge-scheduled {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.25);
  font-weight: 700;
}

/* 6. SOP Card (Budaya 5S Gerbang Madrasah) */
.picket-sop-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.sop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .sop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .sop-grid {
    grid-template-columns: 1fr;
  }
}

.sop-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sop-item-icon {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
}

.sop-item-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.sop-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   7. Live Monitoring Jam Masuk Guru Piket & Real-Time Check-In Styles
   ========================================================================== */

/* Picket Real-Time Check-In Info Box on Member Card */
.picket-checkin-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.picket-checkin-box.confirmed {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
  border-color: rgba(16, 185, 129, 0.35);
}

.picket-checkin-box.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(217, 119, 6, 0.02) 100%);
  border-color: rgba(245, 158, 11, 0.25);
}

.picket-checkin-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.picket-checkin-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.picket-checkin-time-val {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.picket-checkin-time-val.time-in {
  color: #3B5F21;
}

.picket-checkin-time-val.time-pending {
  color: #d97706;
}

.picket-checkin-row-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}

.btn-member-action.btn-picket-checkin-act {
  background: linear-gradient(135deg, #93C572 0%, #78AA56 100%);
  color: #ffffff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(120, 170, 86, 0.3);
  animation: pulse-gentle 2.5s infinite;
}

.btn-member-action.btn-picket-checkin-act:hover {
  background: linear-gradient(135deg, #78AA56 0%, #5F8E3E 100%);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(120, 170, 86, 0.4);
}

.btn-member-action.btn-picket-confirmed {
  background: rgba(147, 197, 114, 0.22);
  color: #385723;
  border: 1px solid rgba(147, 197, 114, 0.45);
  font-weight: 700;
  cursor: default;
}

.btn-member-action.btn-picket-reset-sm {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
}

.btn-member-action.btn-picket-reset-sm:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-member-action.btn-picket-locked {
  background: var(--bg-subtle, rgba(241, 245, 249, 0.7));
  color: var(--text-muted, #94a3b8);
  border: 1px dashed var(--border-light, #cbd5e1);
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.85;
  user-select: none;
  box-shadow: none;
}

.btn-member-action.btn-picket-locked:hover {
  background: var(--bg-subtle, rgba(241, 245, 249, 0.7));
  color: var(--text-muted, #94a3b8);
  border-color: var(--border-light, #cbd5e1);
  transform: none;
  box-shadow: none;
}

/* Live Monitoring Card & Table */
.picket-live-monitor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.picket-live-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.picket-live-dot-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.picket-live-monitor-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.picket-live-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}

/* Modal Check-In Piket Clock Box */
.picket-modal-clock-box {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.08) 0%, rgba(13, 148, 136, 0.05) 100%);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.clock-info-col {
  display: flex;
  flex-direction: column;
}

.clock-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #3B5F21;
}

.clock-digits {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
  margin-top: 0.15rem;
}

.clock-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

@keyframes pulse-gentle {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
  }
  50% {
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.5);
  }
}

/* Radar KBM Filter Bar & Chips (26 Rombel Precision) */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.filter-chip:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.filter-chip.active {
  background: var(--emerald-600);
  color: #ffffff;
  border-color: var(--emerald-600);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.filter-chip.active[data-filter="kosong_kritis"] {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.filter-chip.active[data-filter="terlambat"] {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

.filter-chip.active[data-filter="inval"] {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.room-sessions-mini-list {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border-light);
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.room-mini-session-chip {
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.room-mini-session-chip.active-slot {
  background: rgba(16, 185, 129, 0.18);
  color: var(--emerald-700);
  border-color: rgba(16, 185, 129, 0.4);
  font-weight: 700;
}

/* ==========================================
   WIB 24-HOUR TIME CONTROLS & PRESET CHIPS
   ========================================== */
.wib-time-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.wib-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.wib-input-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.wib-time-input {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  padding-left: 2.5rem !important;
  padding-right: 4.8rem !important;
  height: 44px;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border-medium) !important;
  border-radius: var(--radius-md) !important;
  transition: all 0.2s ease;
  width: 100%;
}

.wib-time-input:focus {
  border-color: var(--emerald-500) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  outline: none;
}

.wib-time-zone-badge {
  position: absolute;
  right: 0.65rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-600);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  letter-spacing: 0.05em;
  z-index: 2;
}

.wib-quick-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.wib-preset-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.wib-preset-btn:hover {
  background: var(--bg-surface);
  color: var(--emerald-600);
  border-color: var(--emerald-500);
  transform: translateY(-1px);
}

.wib-preset-btn.active {
  background: var(--emerald-600);
  color: #ffffff;
  border-color: var(--emerald-600);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* Table Action Buttons with Clean Crisp SVGs */
.btn-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.32rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
}

.btn-table-action svg {
  flex-shrink: 0;
}

.btn-table-action-edit {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.btn-table-action-edit:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

.btn-table-action-delete {
  background: var(--bg-surface);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

.btn-table-action-delete:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
  color: #b91c1c;
}

.btn-table-action-copy {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}

.btn-table-action-copy:hover {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--emerald-600);
  color: var(--emerald-600);
}

/* KBM Period Settings Table */
.kbm-period-cell-input {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 0.3rem 0.5rem !important;
  height: 34px !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border-medium) !important;
  color: var(--text-primary) !important;
}

.kbm-period-cell-input:focus {
  border-color: var(--emerald-600) !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18) !important;
}

/* ========================================================
   ADMIN LOGIN MODAL & AUTHENTICATION STYLES
   ======================================================== */
#modalAdminLogin .modal-dialog {
  border: 1px solid rgba(0, 106, 78, 0.35);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 106, 78, 0.2);
}

.shake-error {
  animation: shakeKeyframes 0.45s ease-in-out;
}

@keyframes shakeKeyframes {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.admin-login-input:focus {
  border-color: #006A4E !important;
  box-shadow: 0 0 0 3px rgba(0, 106, 78, 0.2) !important;
}

#btnSidebarAdminLogout:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #ef4444 !important;
  transform: translateY(-1px);
}

#btnSidebarTeacherLogout:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #ef4444 !important;
  transform: translateY(-1px);
}

/* ========================================================
   TOPBAR SESSION BADGE, SYNC, & LOGOUT CONTROLS
   ======================================================== */
.app-session-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  user-select: none;
}

.app-session-badge.teacher {
  background: rgba(120, 170, 86, 0.14);
  border: 1px solid rgba(120, 170, 86, 0.35);
  color: #3b5f21;
}

.app-session-badge.admin {
  background: rgba(0, 106, 78, 0.14);
  border: 1px solid rgba(0, 106, 78, 0.35);
  color: #006A4E;
}

[data-theme="dark"] .app-session-badge.teacher {
  background: rgba(147, 197, 114, 0.18);
  border-color: rgba(147, 197, 114, 0.4);
  color: #a7f3d0;
}

[data-theme="dark"] .app-session-badge.admin {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.app-session-badge .session-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.app-session-badge.admin .session-dot {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: beacon-pulse 1.8s infinite;
}

/* Topbar Sync Button */
.topbar-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid rgba(2, 132, 199, 0.35);
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.topbar-sync-btn:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

.topbar-sync-btn:active {
  transform: translateY(0);
}

.topbar-sync-btn.syncing {
  opacity: 0.85;
  pointer-events: none;
}

.topbar-sync-btn.syncing .sync-icon-spin {
  animation: spin-clockwise 0.75s linear infinite;
}

@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Topbar Log Out Button */
.topbar-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-full, 9999px);
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.topbar-logout-btn:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.topbar-logout-btn:active {
  transform: translateY(0);
}

/* Login Modal Portal Tabs */
.login-portal-tabs {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 3px;
  margin-bottom: 1.25rem;
}

.login-portal-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-portal-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.login-portal-tab-btn.active {
  background: linear-gradient(135deg, #006A4E, #008763);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 106, 78, 0.35);
}

/* ===================================================================
   STANDALONE FULL-SCREEN LOGIN PORTAL & MODE ISOLATION
   =================================================================== */

/* Body state when in login mode */
body.mode-login {
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  background: #022c22 !important;
}

/* Completely isolate and hide the entire app shell, sidebars, headers & bottom nav in login mode */
body.mode-login .app-shell,
body.mode-login .mobile-bottom-nav,
body.mode-login .sidebar,
body.mode-login .topbar,
body.mode-login .modal-overlay,
body.mode-login .modal,
body.mode-login .toast-container {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* When in login mode, display the standalone login view */
body.mode-login #appLoginView.login-view-wrapper {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* When NOT in login mode (e.g. guru or admin), hide login portal completely */
body:not(.mode-login) #appLoginView.login-view-wrapper {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Fullscreen Background & Canvas for Standalone Login */
.login-view-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 10% 20%, #064e3b 0%, #022c22 45%, #011612 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

/* Ambient glow accents */
.login-backdrop-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.45;
}

.login-glow-1 {
  width: 480px;
  height: 480px;
  background: rgba(16, 185, 129, 0.28);
  top: -100px;
  left: -80px;
}

.login-glow-2 {
  width: 440px;
  height: 440px;
  background: rgba(14, 165, 233, 0.22);
  bottom: -80px;
  right: -80px;
}

/* Main Container centered */
.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 520px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Brand Header */
.login-brand-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-logo-ring {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(16, 185, 129, 0.4));
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.35);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-logo {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-app-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.login-school-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #a7f3d0;
  text-transform: uppercase;
  margin: 0.25rem 0 0.65rem 0;
  opacity: 0.95;
}

.login-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseLiveDot 2s infinite ease-in-out;
}

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.login-clock-tz {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  color: #94a3b8;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 0.55rem;
}

/* Glassmorphism Card */
.login-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(16, 185, 129, 0.25);
  color: #f8fafc;
}

/* Dual Mode Switcher Tabs */
.login-tabs-nav {
  display: flex;
  background: rgba(2, 44, 34, 0.75);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.35rem;
}

.login-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 0.85rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.login-tab-btn.active {
  background: linear-gradient(135deg, #006A4E 0%, #008763 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 106, 78, 0.45);
}

.login-tab-btn[data-auth-mode="admin"].active {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.45);
}

/* Alert Box */
.login-alert-box {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.login-alert-box.shake-error {
  animation: loginShake 0.45s ease-in-out;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Panel Intro */
.login-panel-intro {
  margin-bottom: 1.2rem;
}

.login-panel-intro h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.35rem 0;
}

.login-panel-intro p {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin: 0;
}

.admin-badge-ribbon {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(13, 148, 136, 0.25);
  border: 1px solid rgba(13, 148, 136, 0.5);
  color: #2dd4bf;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Forms & Inputs */
.login-panel .form-label {
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: block;
}

.login-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon-wrap > svg {
  position: absolute;
  left: 0.95rem;
  color: #64748b;
  pointer-events: none;
  transition: color 0.2s ease;
}

.login-input-field,
.login-select-account {
  width: 100%;
  height: 46px;
  background: rgba(2, 44, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0 1rem 0 2.75rem;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.login-input-field:focus,
.login-select-account:focus {
  border-color: #10b981;
  background: rgba(2, 44, 34, 0.85);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.login-input-field:focus + svg,
.login-input-icon-wrap:focus-within > svg {
  color: #10b981;
}

.login-select-account option {
  background: #0f172a;
  color: #ffffff;
  padding: 8px;
}

.login-input-icon-wrap.has-eye-btn input {
  padding-right: 2.75rem;
}

.btn-toggle-eye {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s ease;
}

.btn-toggle-eye:hover {
  color: #10b981;
}

/* Smart Teacher Combobox Autocomplete */
.teacher-combobox-wrap {
  position: relative;
}

.login-input-icon-wrap.has-combobox-btn input {
  padding-right: 2.75rem;
}

.btn-toggle-combobox {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #a7f3d0;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-toggle-combobox:hover {
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.btn-toggle-combobox.open svg {
  transform: rotate(180deg);
}

.teacher-combobox-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #06241c;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.18);
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  z-index: 9999;
  display: none;
  flex-direction: column;
  padding: 0.4rem;
  backdrop-filter: blur(12px);
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.teacher-combobox-dropdown.show {
  display: flex;
}

.teacher-combobox-dropdown::-webkit-scrollbar {
  width: 6px;
}

.teacher-combobox-dropdown::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.teacher-combobox-dropdown::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.4);
  border-radius: 6px;
}

.teacher-combobox-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.7);
}

.combobox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.combobox-item:hover,
.combobox-item.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.35);
}

.combobox-item.selected {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.55);
}

.combobox-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

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

.combobox-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.combobox-sub {
  font-size: 0.74rem;
  color: #a7f3d0;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.combobox-check {
  font-size: 0.9rem;
  color: #10b981;
  font-weight: 800;
}

.combobox-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

/* Teacher Selected Preview Card */
.teacher-login-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 106, 78, 0.2);
  border: 1px solid rgba(0, 106, 78, 0.45);
  border-radius: 14px;
  margin: 0.85rem 0;
}

.preview-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.preview-info {
  flex: 1;
  overflow: hidden;
}

.preview-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-detail {
  font-size: 0.74rem;
  color: #a7f3d0;
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Extra Row (Remember Me & Help) */
.login-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  font-size: 0.8rem;
}

.login-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.login-remember-label input[type="checkbox"] {
  accent-color: #10b981;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-help-chip,
.btn-quick-fill-admin {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: #93c5fd;
  font-size: 0.74rem;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-help-chip:hover,
.btn-quick-fill-admin:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: #60a5fa;
  color: #ffffff;
}

/* Submit Buttons */
.btn-login-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-submit-teacher {
  background: linear-gradient(135deg, #006A4E 0%, #008763 100%);
  box-shadow: 0 4px 18px rgba(0, 106, 78, 0.45);
}

.btn-submit-teacher:hover {
  background: linear-gradient(135deg, #008763 0%, #059669 100%);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.btn-submit-admin {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  box-shadow: 0 4px 18px rgba(13, 148, 136, 0.45);
}

.btn-submit-admin:hover {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  box-shadow: 0 6px 24px rgba(20, 184, 166, 0.45);
  transform: translateY(-1px);
}

.btn-login-submit:active {
  transform: translateY(0);
}

/* Quick Demo Chips */
.quick-demo-accounts-wrap {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-demo-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.55rem;
}

.quick-demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.demo-chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-chip-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Footer Info */
.login-footer-info {
  text-align: center;
  font-size: 0.74rem;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0.85;
}

.login-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #a7f3d0;
  font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .login-card {
    padding: 1.25rem;
    border-radius: 20px;
  }
  .login-app-title {
    font-size: 1.8rem;
  }
  .login-tabs-nav {
    flex-direction: column;
  }
}

/* ===================================================================
   TEMA TERANG HALAMAN LOGIN (Putih - Hijau Mint)
   =================================================================== */
body.mode-login {
  background: #d1fae5 !important;
}

.login-view-wrapper {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
}

.login-glow-1 { background: rgba(16, 185, 129, 0.22); }
.login-glow-2 { background: rgba(125, 211, 252, 0.35); }
.login-backdrop-glow { opacity: 0.55; }

.login-logo-ring {
  background: linear-gradient(135deg, #ffffff, #a7f3d0);
  box-shadow: 0 10px 25px -5px rgba(0, 106, 78, 0.25), 0 0 20px rgba(16, 185, 129, 0.25);
}

.login-app-title { color: #064e3b; text-shadow: none; }
.login-school-name { color: #047857; }

.login-clock-badge {
  background: #ffffff;
  border: 1px solid rgba(0, 106, 78, 0.25);
  color: #334155;
  box-shadow: 0 4px 12px rgba(0, 106, 78, 0.12);
}
.login-clock-tz { color: #64748b; border-left-color: rgba(0, 0, 0, 0.12); }

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 106, 78, 0.15);
  box-shadow: 0 20px 50px -15px rgba(0, 106, 78, 0.28), 0 0 0 1px rgba(16, 185, 129, 0.12);
  color: #0f172a;
}

.login-tabs-nav {
  background: #ecfdf5;
  border: 1px solid rgba(0, 106, 78, 0.2);
}
.login-tab-btn { color: #475569; }
.login-tab-btn:hover { color: #064e3b; background: rgba(0, 106, 78, 0.08); }
.login-tab-btn.active { color: #ffffff; }

.login-alert-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.login-panel-intro h4 { color: #064e3b; }
.login-panel-intro p { color: #475569; }

.admin-badge-ribbon {
  background: #ccfbf1;
  border: 1px solid #5eead4;
  color: #0f766e;
}

.login-panel .form-label { color: #1e293b; }
.login-input-icon-wrap > svg { color: #64748b; }

.login-input-field,
.login-select-account {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}
.login-input-field::placeholder { color: #94a3b8; }
.login-input-field:focus,
.login-select-account:focus {
  background: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.login-select-account option { background: #ffffff; color: #0f172a; }

.btn-toggle-eye { color: #64748b; }
.btn-toggle-eye:hover { color: #059669; }
.btn-toggle-combobox { color: #047857; }
.btn-toggle-combobox:hover { color: #059669; background: rgba(16, 185, 129, 0.12); }

.teacher-combobox-dropdown {
  background: #ffffff;
  border: 1px solid rgba(0, 106, 78, 0.3);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}
.teacher-combobox-dropdown::-webkit-scrollbar-track { background: #f1f5f9; }
.combobox-item:hover,
.combobox-item.active { background: #ecfdf5; border-color: rgba(16, 185, 129, 0.35); }
.combobox-item.selected { background: #d1fae5; border-color: rgba(5, 150, 105, 0.5); }
.combobox-name { color: #0f172a; }
.combobox-sub { color: #047857; }
.combobox-empty { color: #64748b; }

.teacher-login-preview {
  background: #ecfdf5;
  border: 1px solid rgba(0, 106, 78, 0.3);
}
.preview-name { color: #064e3b; }
.preview-detail { color: #047857; }

.login-remember-label { color: #334155; }

.login-help-chip,
.btn-quick-fill-admin {
  border: 1px dashed #60a5fa;
  color: #1d4ed8;
}
.login-help-chip:hover,
.btn-quick-fill-admin:hover {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e3a8a;
}

.quick-demo-accounts-wrap { border-top: 1px solid rgba(0, 0, 0, 0.08); }
.quick-demo-title { color: #64748b; }
.demo-chip-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}
.demo-chip-btn:hover {
  background: #d1fae5;
  border-color: #34d399;
  color: #064e3b;
}

.login-footer-info { color: #475569; opacity: 1; }
.login-footer-links { color: #047857; }

/* KBM Day Groups Tabs & Duration Settings */
.kbm-day-groups-nav {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.btn-kbm-day-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-kbm-day-tab:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-kbm-day-tab.active {
  background: linear-gradient(135deg, #006A4E, #008763);
  color: #FFFFFF;
  border-color: #006A4E;
  box-shadow: 0 4px 14px rgba(0, 106, 78, 0.28);
}

.btn-kbm-day-tab .day-duration-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  transition: all var(--transition-fast);
}

.btn-kbm-day-tab.active .day-duration-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.kbm-group-info-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
  gap: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.badge-hadir.duration-match {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-700);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-hadir.duration-mismatch {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* KBM Break Settings & Table Break Dividers */
.kbm-breaks-card {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
  transition: all var(--transition-normal);
}

.kbm-break-item-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.kbm-break-item-box:focus-within {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.kbm-break-item-box.is-inactive {
  opacity: 0.6;
  background: var(--bg-subtle);
}

.kbm-table-break-divider {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.09) 0%, rgba(245, 158, 11, 0.03) 100%);
  border-top: 1px dashed rgba(245, 158, 11, 0.4);
  border-bottom: 1px dashed rgba(245, 158, 11, 0.4);
}

.kbm-table-break-divider td {
  padding: 0.55rem 1rem !important;
  color: #b45309;
  font-weight: 700;
  font-size: 0.8rem;
}

.kbm-table-break-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator-dot.green {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.status-indicator-dot.amber {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
}

/* Card Pemeliharaan & Reset Presensi Admin */
.purge-option-card:hover {
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: rgba(239, 68, 68, 0.04) !important;
  transform: translateY(-1px);
}

.purge-option-card:has(input:checked) {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  box-shadow: 0 0 0 1px #ef4444;
}

/* =========================================================================
   RESPONSIVE ANDROID & MOBILE PRECISION: PROFIL GURU & JADWAL KBM
   ========================================================================= */

/* 1. Layout Grid Profil & Jadwal Lengkap (#tab-profil) */
.profile-schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.75rem;
  width: 100%;
  max-width: 100%;
  align-items: start;
}

.profile-schedule-grid > * {
  min-width: 0;
  max-width: 100%;
}

.profile-bio-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  background: var(--bg-elevated);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.profile-bio-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed var(--border-light);
}

.profile-bio-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.profile-bio-label {
  color: var(--text-muted);
  flex-shrink: 0;
  font-weight: 500;
}

.profile-bio-val {
  color: var(--text-primary);
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.profile-bio-badge {
  text-align: center;
  max-width: 100%;
  white-space: normal;
}

.profile-schedule-actions-cell {
  text-align: right;
}

.profile-schedule-actions-wrap {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* 2. Layout Presensi Mengajar & Jadwal KBM (#tab-mengajar) */
.kbm-kpi-grid {
  grid-template-columns: repeat(2, 1fr);
}

.kbm-day-filter-bar {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
  background: var(--bg-surface);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.kbm-day-chips-group {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.kbm-day-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 0.25rem;
  white-space: nowrap;
}

.btn-add-kbm-toolbar {
  padding: 0.4rem 0.85rem;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

.kbm-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}

.today-schedule-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

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

/* 3. Toolbar Jadwal Mengajar Admin (#tab-admin-roster) */
.roster-toolbar-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: space-between;
  align-items: center;
}

.roster-filters-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.roster-search-box {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.roster-filter-select {
  width: auto;
  font-size: 0.82rem;
  min-width: 120px;
}

.roster-filter-teacher {
  max-width: 220px;
}

.roster-actions-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* 4. Form Grid Modals (Edit Profil & Form Jadwal KBM) */
.modal-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.profile-avatar-upload-box {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  background: var(--bg-surface);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  flex-wrap: wrap;
}

/* =========================================================================
   MEDIA QUERIES: TABLET & ANDROID SMARTPHONE (MAX-WIDTH: 1024px -> 360px)
   ========================================================================= */

@media (max-width: 1024px) {
  .profile-schedule-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 820px) {
  .kbm-action-stack {
    width: 100%;
    align-items: stretch;
  }

  .kbm-action-stack > button,
  .kbm-action-stack > .badge-pill-status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .kbm-action-subtext {
    text-align: center;
  }
}

@media (max-width: 640px) {
  /* Pastikan container halaman tidak pernah meluber secara horizontal di layar Android */
  html,
  body,
  .app-shell,
  .main-wrapper,
  .page-container,
  .tab-section {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .page-container {
    padding: 0.9rem 0.75rem 2.25rem;
  }

  .card {
    padding: 1.1rem 0.95rem;
    border-radius: var(--radius-md);
  }

  .section-header-title {
    margin-bottom: 1.1rem;
  }

  .section-header-title h3 {
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .section-header-title p {
    font-size: 0.78rem !important;
    line-height: 1.4;
  }

  /* Kartu Profil Guru (#tab-profil) di layar Android */
  .profile-bio-card {
    padding-top: 1.35rem;
  }

  #btnEditProfileQuick {
    position: static !important;
    margin: 0 auto 0.85rem auto;
    display: inline-flex !important;
  }

  #profileCardName {
    font-size: 1.2rem !important;
    word-break: break-word;
  }

  #profileCardRole {
    font-size: 0.8rem !important;
    margin-bottom: 1rem !important;
  }

  .profile-bio-list {
    padding: 0.9rem 0.85rem;
    gap: 0.6rem;
    font-size: 0.8rem;
  }

  .profile-bio-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding-bottom: 0.55rem;
  }

  .profile-bio-val {
    text-align: left;
    font-size: 0.84rem;
    width: 100%;
  }

  /* Header & Tabel Jadwal Mengajar Lengkap (#tab-profil) -> Tampilan Kartu Mobile Presisi */
  .profile-schedule-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .profile-schedule-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  #btnProfileAddSchedule {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.75rem !important;
  }

  .profile-schedule-table-wrap {
    overflow-x: visible;
    margin: 0;
  }

  .profile-schedule-table,
  .profile-schedule-table tbody {
    display: block;
    width: 100%;
  }

  .profile-schedule-table thead {
    display: none;
  }

  .profile-schedule-table tr.profile-schedule-row {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-left: 4px solid var(--emerald-500);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.9rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  }

  .profile-schedule-table tr.profile-schedule-row:last-child {
    margin-bottom: 0;
  }

  .profile-schedule-table tr.profile-schedule-row td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0 !important;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.82rem;
    text-align: right;
    min-width: 0;
  }

  .profile-schedule-table tr.profile-schedule-row td:last-child {
    border-bottom: none;
    padding-top: 0.45rem !important;
    padding-bottom: 0 !important;
  }

  .profile-schedule-table tr.profile-schedule-row td::before {
    content: attr(data-label);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    flex-shrink: 0;
  }

  .profile-schedule-actions-wrap {
    width: 100%;
    justify-content: flex-end;
  }

  .profile-schedule-actions-wrap .btn-table-action {
    flex: 1;
    justify-content: center;
    padding: 0.4rem 0.65rem;
  }

  /* Tab Mengajar (#tab-mengajar): KPI, Filter Hari & Kartu Sesi KBM di Android */
  .kbm-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
    margin-bottom: 1.25rem !important;
  }

  .kbm-section-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.6rem !important;
  }

  .kbm-live-clock-pill {
    width: 100%;
    justify-content: center;
  }

  .kbm-day-filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem;
    gap: 0.65rem;
  }

  .kbm-day-chips-group {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .kbm-day-chips-group::-webkit-scrollbar {
    display: none;
  }

  .kbm-day-chips-group .filter-chip {
    flex-shrink: 0;
    padding: 0.38rem 0.75rem;
    font-size: 0.76rem;
  }

  .btn-add-kbm-toolbar {
    width: 100%;
    padding: 0.52rem 0.85rem;
    font-size: 0.8rem;
  }

  /* Kartu Sesi KBM (.kbm-session-card) Presisi Layar Android */
  .kbm-session-card {
    padding: 0.95rem !important;
    gap: 0.85rem !important;
    border-radius: var(--radius-md);
  }

  .kbm-session-time {
    width: 100%;
    justify-content: center;
    font-size: 1.05rem !important;
    padding: 0.65rem 0.9rem !important;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
  }

  .kbm-session-time svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .kbm-session-meta {
    width: 100%;
    min-width: 0;
  }

  .kbm-session-title {
    font-size: 1.02rem !important;
    line-height: 1.35;
    word-break: break-word;
  }

  .kbm-session-sub {
    gap: 0.4rem !important;
    margin-top: 0.4rem !important;
  }

  .kbm-jtm-tag,
  .kbm-session-sub .badge-pill-status {
    font-size: 0.73rem !important;
    padding: 0.28rem 0.65rem !important;
    white-space: normal !important;
    line-height: 1.35;
    max-width: 100%;
  }

  .kbm-attendance-details-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .kbm-detail-chip {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    font-size: 0.75rem;
    padding: 0.4rem 0.65rem;
    box-sizing: border-box;
  }

  .kbm-door-code-note {
    line-height: 1.45;
    word-break: break-word;
  }

  /* Daftar Jadwal Hari Ini di Beranda (#todayScheduleList) */
  .today-schedule-item {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.65rem !important;
  }

  .today-schedule-action {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.45rem;
    border-top: 1px dashed var(--border-light);
  }

  /* Toolbar & Tabel Jadwal Mengajar Admin (#tab-admin-roster) di Android */
  .roster-toolbar-wrap,
  .roster-filters-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .roster-search-box,
  .roster-filter-select,
  .roster-filter-teacher {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .roster-actions-group {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .roster-actions-group > button {
    width: 100%;
    justify-content: center;
    font-size: 0.76rem !important;
    padding: 0.45rem 0.5rem !important;
  }

  /* Modals (Edit Profil & Form Jadwal KBM) di Android */
  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    max-height: 92vh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 0.9rem 1rem;
  }

  .modal-body {
    padding: 0.9rem 1rem !important;
    max-height: 75vh !important;
  }

  .modal-footer {
    padding: 0.75rem 1rem !important;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .modal-footer > button {
    flex: 1;
    justify-content: center;
  }

  .modal-form-grid-2,
  .modal-form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .profile-avatar-upload-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar-upload-box > div:last-child > div {
    justify-content: center;
  }
}

/* ==========================================================================
   Table Horizontal Precision & Responsive Pagination
   ========================================================================== */
.table-scroll-container {
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-top: 0.75rem;
}

.table-scroll-container::-webkit-scrollbar {
  height: 6px;
}
.table-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}
.table-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(0, 106, 78, 0.25);
  border-radius: 4px;
}
.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--emerald-600);
}

.table-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding: 0 0.25rem;
}

.table-scroll-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.7rem;
}

.table-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.table-pagination-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  flex-wrap: wrap;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-medium);
  color: var(--emerald-600);
}

.pagination-btn.active {
  background: var(--emerald-600) !important;
  border-color: var(--emerald-600) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 106, 78, 0.25);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-btn-nav {
  padding: 0 0.6rem;
  gap: 0.25rem;
  font-size: 0.78rem;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 34px;
  color: var(--text-muted);
  font-weight: 600;
}

.pagination-size-select {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
}

.pagination-size-select:focus {
  border-color: var(--emerald-500);
}

@media (max-width: 768px) {
  .table-pagination-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  .table-pagination-info {
    justify-content: space-between;
    width: 100%;
  }
  .table-pagination-controls {
    justify-content: center;
    width: 100%;
  }
}

