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

/* ===================================================================
   MODERN VIBRANT ELEVATED DESIGN SYSTEM — UJIKOM 2026
   Palette: Base Slate #F8FAFC | Surface #FFFFFF | Primary Indigo #6366F1
   Accents: Teal #0D9488, Emerald #10B981, Rose #F43F5E, Amber #F59E0B
   Refined Elevated Drop-Shadows | Proportional Border Radii
   =================================================================== */

:root {
  /* Typography */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Modern Refined Palette */
  --bg-clay: #F1F5F9;
  --bg-base: #F8FAFC;
  --surface: #FFFFFF;
  --surface-secondary: #F1F5F9;
  --surface-border: #E2E8F0;
  --bg-gradient: linear-gradient(135deg, #F8FAFC 0%, #EEF2F6 100%);

  /* Accessible High-Contrast Text (WCAG AAA & AA) */
  --text-main: #0F172A;
  --text-muted: #64748B;

  /* Vibrant Accents */
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --accent-teal: #0D9488;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --danger: #F43F5E;
  --danger-bg: #FFF1F2;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;

  /* Subtle Elegant Dual Opposing Shadows (Soft UI Refined) */
  --shadow-extruded: 0 10px 25px -5px rgba(148, 163, 184, 0.12), 0 8px 10px -6px rgba(148, 163, 184, 0.08), 3px 3px 10px rgba(163, 177, 198, 0.2), -3px -3px 10px rgba(255, 255, 255, 0.9);
  --shadow-extruded-hover: 0 18px 30px -5px rgba(148, 163, 184, 0.18), 0 8px 10px -6px rgba(148, 163, 184, 0.1), 5px 5px 14px rgba(163, 177, 198, 0.25), -5px -5px 14px rgba(255, 255, 255, 0.95);
  --shadow-extruded-sm: 0 4px 8px -2px rgba(148, 163, 184, 0.1), 2px 2px 6px rgba(163, 177, 198, 0.18), -2px -2px 6px rgba(255, 255, 255, 0.85);
  --shadow-inset: inset 2px 2px 5px rgba(163, 177, 198, 0.2), inset -2px -2px 5px rgba(255, 255, 255, 0.75);
  --shadow-inset-deep: inset 3px 3px 6px rgba(163, 177, 198, 0.25), inset -3px -3px 6px rgba(255, 255, 255, 0.8);
  --shadow-inset-sm: inset 1px 1px 3px rgba(163, 177, 198, 0.18), inset -1px -1px 3px rgba(255, 255, 255, 0.7);

  /* Legacy shadow compatibility aliases */
  --shadow-sm: var(--shadow-extruded-sm);
  --shadow-md: var(--shadow-extruded);
  --shadow-lg: var(--shadow-extruded-hover);
  --shadow-xl: 0 20px 35px -5px rgba(148, 163, 184, 0.22), 8px 8px 20px rgba(163, 177, 198, 0.25), -8px -8px 20px rgba(255, 255, 255, 0.95);

  /* Hyper-Rounded Corner Radii */
  --radius-card: 28px;
  --radius-btn: 14px;
  --radius-inner: 12px;
  --radius-pill: 9999px;

  /* Physics Transitions */
  --transition-clay: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   GLOBAL BASE & RESET
   =================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #F1F5F9;
  min-height: 100vh;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px;
}

h1, h2, h3, h4, h5, h6,
.header h1, .header h2, .user-info h1,
.stat-value, .stat-label, .view-tab-btn, .btn-primary, .btn-card-submit,
.badge, .status-pill, .badge-role-guru, .brand-text,
.academic-service-title, .feed-title, .section-title, .smart-card-name,
.profile-user-name, .glass-loader-text, .auth-success-title {
  font-family: var(--font-display);
}

.mono, .rfid-tag, .jam-digital, #liveClock, code, pre, .telemetry,
.glass-loader-subtext, .smart-card-barcode-row {
  font-family: var(--font-mono);
}

/* ===================================================================
   MAIN CONTAINER (CLEAN ELEVATED CARD)
   =================================================================== */

.dashboard-container {
  max-width: 1080px;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-card);
  padding: 32px 36px;
  box-shadow: 0 10px 40px -10px rgba(15, 23, 42, 0.08);
  transition: box-shadow var(--transition-clay);
  overflow: hidden;
}

/* ===================================================================
   HEADER & USER PROFILE BADGE (DISTINCT ELEVATED AREA WITH VIBRANT AVATAR)
   =================================================================== */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 26px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid #E2E8F0;
  border-radius: 22px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
  gap: 18px;
  flex-wrap: wrap;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  overflow: hidden;
  border: 2.5px solid #FFFFFF;
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
  flex-shrink: 0;
}

.user-avatar:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

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

.user-info h1 {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.user-info p {
  font-size: 13px;
  color: #64748B;
  font-weight: 600;
  margin-top: 3px;
}

/* Header Action Buttons (Vibrant Themed Accents) */
.btn-logout {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid #FECDD3;
  background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
  color: #E11D48;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-logout:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.btn-logout:active {
  transform: translateY(0.5px);
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.2);
}

.btn-profile-header {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid #C7D2FE;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #4338CA;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-profile-header:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-profile-header svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-profile-header:active {
  transform: translateY(0.5px);
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
}

/* ===================================================================
   NAVIGATION TAB BAR (CLEAN NEUMORPHIC SOFT UI — 1 JAJAR RAMPING & RATA)
   =================================================================== */

.view-tabs {
  display: flex;
  flex-wrap: nowrap;
  background: #F1F5F9;
  padding: 8px 10px;
  border-radius: 20px;
  gap: 8px;
  margin-bottom: 28px;
  border: 1.5px solid #E2E8F0;
  box-shadow: inset 0 2px 4px rgba(148, 163, 184, 0.12);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.view-tabs::-webkit-scrollbar {
  height: 4px;
}
.view-tabs::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.view-tab-btn {
  flex: 1 1 0px;
  min-width: 0;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #64748B;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  gap: 6px;
  box-shadow: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  user-select: none;
}

.view-tab-btn span {
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.view-tab-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-tab-btn:hover:not(.active) {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.view-tab-btn:hover:not(.active) svg {
  stroke: #0F172A;
  transform: translateY(-0.5px);
}

.view-tab-btn.active {
  background: #FFFFFF !important;
  color: #4338CA !important;
  border: 1.5px solid #E2E8F0 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
  font-weight: 700 !important;
  transform: translateY(-1px);
}

.view-tab-btn.active svg {
  stroke: #4338CA;
}

.view-tab-btn:focus-visible {
  outline: 2px solid #6366F1;
  outline-offset: 2px;
}

.view-tab-btn.active span {
  filter: none;
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
}

/* ===================================================================
   FILTER BAR & REFINED INPUTS
   =================================================================== */

.filter-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.filter-bar select, .filter-bar input {
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.filter-bar select:focus, .filter-bar input:focus {
  outline: none;
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.filter-bar select {
  min-width: 190px;
  cursor: pointer;
}

.filter-bar input {
  flex: 1;
}

/* ===================================================================
   STAT GRID & THEMED VIBRANT STAT CARDS
   =================================================================== */

.ringkasan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  padding: 22px 26px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sudah Hadir: Emerald / Teal Hijau Segar */
.stat-box.sudah {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%) !important;
  border: 1.5px solid #86EFAC !important;
  box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.18), 0 4px 8px -2px rgba(16, 185, 129, 0.08) !important;
}

.stat-box.sudah:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(16, 185, 129, 0.25) !important;
}

.stat-box.sudah .stat-icon {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
  border: none !important;
}

.stat-box.sudah .stat-number {
  color: #065F46 !important;
}

.stat-box.sudah .stat-label {
  color: #047857 !important;
  font-weight: 700 !important;
}

/* Belum Scan: Rose / Coral Merah Lembut */
.stat-box.belum {
  background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%) !important;
  border: 1.5px solid #FDA4AF !important;
  box-shadow: 0 8px 20px -4px rgba(244, 63, 94, 0.18), 0 4px 8px -2px rgba(244, 63, 94, 0.08) !important;
}

.stat-box.belum:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(244, 63, 94, 0.25) !important;
}

.stat-box.belum .stat-icon {
  background: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35) !important;
  border: none !important;
}

.stat-box.belum .stat-number {
  color: #9F1239 !important;
}

.stat-box.belum .stat-label {
  color: #BE123C !important;
  font-weight: 700 !important;
}

.stat-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-number {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
}

.stat-label {
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 5px;
}

/* ===================================================================
   SISWA GRID & ROSTER CARDS (HIGH CONTRAST & CLEAR VISUAL DISTINCTION)
   =================================================================== */

.section-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.siswa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.siswa-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.siswa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.siswa-card:active {
  transform: translateY(0);
}

.siswa-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #F1F5F9;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid #E2E8F0;
}

.siswa-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

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

.siswa-card-nama {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.siswa-card-sub {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
  font-weight: 500;
}

/* Siswa Sudah Hadir (Fresh Emerald Border & Badge) */
.siswa-card.status-sudah {
  background: linear-gradient(135deg, #FFFFFF 0%, #F0FDF4 100%);
  border: 1.5px solid #86EFAC;
  border-left: 5px solid #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.siswa-card.status-sudah:hover {
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.siswa-card.status-sudah .siswa-card-photo {
  border: 2px solid #86EFAC;
  background: #DCFCE7;
}

.siswa-card.status-sudah .status-pill {
  background: #DCFCE7;
  color: #065F46;
  border: 1px solid #86EFAC;
  font-weight: 700;
  box-shadow: none;
}

/* Siswa Belum Scan (Rose / Coral Warning Border & Badge) */
.siswa-card.status-belum {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF1F2 100%);
  border: 1.5px solid #FDA4AF;
  border-left: 5px solid #F43F5E;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.1);
}

.siswa-card.status-belum:hover {
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.2);
}

.siswa-card.status-belum .siswa-card-photo {
  border: 2px solid #FDA4AF;
  background: #FFE4E6;
}

.siswa-card.status-belum .status-pill {
  background: #FFE4E6;
  color: #9F1239;
  border: 1px solid #FDA4AF;
  font-weight: 700;
  box-shadow: none;
}

/* Status: Terlambat */
.siswa-card.status-terlambat {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF7ED 100%);
  border: 1.5px solid #FDBA74;
  border-left: 5px solid #F97316;
}

.siswa-card.status-terlambat .siswa-card-photo {
  border: 2px solid #FDBA74;
  background: #FFEDD5;
}

.siswa-card.status-terlambat .status-pill {
  background: #FFEDD5;
  color: #9A3412;
  border: 1px solid #FDBA74;
}

/* Status: Izin / Dispensasi */
.siswa-card.status-izin {
  background: linear-gradient(135deg, #FFFFFF 0%, #EFF6FF 100%);
  border: 1.5px solid #93C5FD;
  border-left: 5px solid #3B82F6;
}

.siswa-card.status-izin .siswa-card-photo {
  border: 2px solid #93C5FD;
  background: #DBEAFE;
}

.siswa-card.status-izin .status-pill {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #93C5FD;
}

/* Status Pills Base */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 6px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
}

.status-pill.sudah {
  background: #DCFCE7;
  color: #065F46;
  border-color: #86EFAC;
}

.status-pill.belum, .status-pill.alpa {
  background: #FFE4E6;
  color: #9F1239;
  border-color: #FDA4AF;
}

.status-pill.terlambat {
  background: #FFEDD5;
  color: #9A3412;
  border-color: #FDBA74;
}

.status-pill.izin, .status-pill.pending {
  background: #DBEAFE;
  color: #1E40AF;
  border-color: #93C5FD;
}

/* ===================================================================
   HERO OVERVIEW & SMART STUDENT RFID CARD
   =================================================================== */

.hero-welcome {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-card);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
}

.hero-welcome-left {
  flex: 1;
  min-width: 280px;
}

.hero-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EEF2FF;
  color: #4338CA;
  border: 1px solid #C7D2FE;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-welcome-left h2 {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.25;
}

.hero-welcome-left p {
  font-size: 14px;
  color: #64748B;
  margin-top: 6px;
  margin-bottom: 0;
  font-weight: 500;
}

.hero-clock {
  font-size: 13px;
  font-weight: 700;
  color: #4338CA;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EEF2FF;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid #C7D2FE;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.1);
}

.hero-welcome-right {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 410px;
  gap: 12px;
  flex-shrink: 0;
}

/* SMART STUDENT ID RFID CARD (PREMIUM FINTECH DIGITAL SMART BADGE) */
.smart-student-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.22) 0%, transparent 45%),
              radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.15) 0%, transparent 40%),
              linear-gradient(135deg, #090d16 0%, #0f172a 45%, #1e1b4b 100%);
  border: 1.5px solid rgba(129, 140, 248, 0.35);
  border-radius: 22px;
  padding: 22px 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.65), 0 0 25px -4px rgba(99, 102, 241, 0.25);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
  perspective: 1000px;
  transform-style: preserve-3d;
  cursor: default;
}

.nfc-widget-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0 !important;
}

.nfc-widget-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.nfc-widget-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0F172A;
  flex-shrink: 0;
}

.nfc-widget-text-col {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.nfc-widget-title {
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nfc-widget-badge {
  font-size: 11px;
  font-weight: 600;
  color: #0F172A;
  margin-top: 2px;
  min-width: 0;
  display: flex;
  align-items: center;
}

.nfc-widget-badge span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#btnTautkanNfcSiswa {
  flex-shrink: 0;
  white-space: nowrap;
}

/* SHEET PILIHAN METODE PRESENSI (satu tombol utama -> dua opsi) */
.nfc-opsi-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #FFFFFF;
  border: 1.2px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nfc-opsi-item:last-child {
  margin-bottom: 0;
}

.nfc-opsi-item:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.12);
}

/* NFC OPSI LOCKED (GEMBOK MODERN & NON-CLICKABLE) */
.nfc-opsi-item.nfc-opsi-locked,
.nfc-opsi-item[disabled],
.nfc-opsi-item.locked {
  background: #f8fafc !important;
  border: 1.5px dashed #cbd5e1 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.75 !important;
  box-shadow: none !important;
  transform: none !important;
  user-select: none !important;
}

.nfc-opsi-item.nfc-opsi-locked:hover,
.nfc-opsi-item[disabled]:hover,
.nfc-opsi-item.locked:hover {
  transform: none !important;
  box-shadow: none !important;
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.nfc-opsi-ikon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
}

.nfc-opsi-judul {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  white-space: normal;
}

.nfc-opsi-desc {
  display: block;
  font-size: 11.5px;
  color: #64748B;
  line-height: 1.45;
  margin-top: 2px;
  white-space: normal;
}

/* MODAL NFC OVERLAY — FIXED VIEWPORT CENTER */
.modal-nfc-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-nfc-overlay.show {
  display: flex !important;
}

.modal-nfc-card {
  background: #ffffff;
  border-radius: 24px;
  max-width: 440px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: nfcModalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* MODERN 2-TIER SMART NFC / RFID WIDGET CARD (ANTI-COLLISION) */
.nfc-widget-card-modern {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0 !important;
}

.nfc-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.nfc-status-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.nfc-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E293B;
  flex-shrink: 0;
}

.nfc-text-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nfc-label {
  font-size: 10px;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.nfc-actions-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.btn-nfc-action-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
}

.btn-nfc-action-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
}

.btn-nfc-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #F8FAFC;
  color: #334155;
  border: 1.2px solid #CBD5E1;
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
}

.btn-nfc-action-secondary:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #0F172A;
}

@media (max-width: 360px) {
  .nfc-actions-row {
    grid-template-columns: 1fr;
  }
}

.smart-student-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 24px 48px -10px rgba(15, 23, 42, 0.75), 0 0 35px -2px rgba(129, 140, 248, 0.35);
  border-color: rgba(165, 180, 252, 0.6);
}

.smart-student-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(99, 102, 241, 0.1) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.smart-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.smart-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.smart-card-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.smart-card-brand-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #e0e7ff;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.smart-card-brand-text span {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #38bdf8;
  font-weight: 700;
}

.smart-card-nfc-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.smart-card-nfc-indicator:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.smart-card-chip {
  width: 38px;
  height: 28px;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 35%, #d97706 70%, #fef08a 100%);
  border-radius: 6px;
  position: relative;
  margin-bottom: 16px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  border: 1px solid #b45309;
}

.smart-card-chip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(180, 83, 9, 0.65);
  transform: translateY(-50%);
}

.smart-card-chip::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(180, 83, 9, 0.7);
  border-radius: 4px;
}

.smart-card-main {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.smart-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid #818cf8;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}

.smart-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

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

.smart-card-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.smart-card-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 3px;
  letter-spacing: 0.01em;
}

/* SMART CARD STATUS BADGE - LINEAR MINIMALIST PILL */
.smart-card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

/* 1. STATUS IZIN / SAKIT / DISPENSASI (Linear Minimalist Pill Amethyst) */
.smart-card-status-badge.izin,
.smart-card-status-badge.dispen,
.smart-card-status-badge.sakit,
.smart-card-status-badge.peringatan:not(.terlambat):not(.belum) {
  background: rgba(168, 85, 247, 0.12) !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
  color: #f3e8ff !important;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.12) !important;
}
.smart-card-status-badge.izin svg,
.smart-card-status-badge.dispen svg,
.smart-card-status-badge.sakit svg {
  stroke: #c084fc !important;
}

/* 2. STATUS HADIR TEPAT WAKTU (Linear Minimalist Emerald) */
.smart-card-status-badge.hadir {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
  color: #ecfdf5 !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12) !important;
}
.smart-card-status-badge.hadir svg {
  stroke: #34d399 !important;
}

/* 3. STATUS TERLAMBAT (Linear Minimalist Amber) */
.smart-card-status-badge.terlambat,
.smart-card-status-badge.peringatan.terlambat {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
  color: #fffbeb !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12) !important;
}
.smart-card-status-badge.terlambat svg {
  stroke: #fbbf24 !important;
}

/* 4. STATUS TANPA KETERANGAN / ALPA (Linear Minimalist Ruby) */
.smart-card-status-badge.alpa,
.smart-card-status-badge.status-alpa,
.smart-card-status-badge.danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
  color: #fef2f2 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12) !important;
}
.smart-card-status-badge.alpa svg {
  stroke: #f87171 !important;
}

/* 5. STATUS BELUM SCAN / PENGUNJUNG */
.smart-card-status-badge.belum:not(.hadir):not(.izin):not(.status-alpa):not(.terlambat) {
  background: rgba(148, 163, 184, 0.1) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
}

.smart-card-barcode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 12px;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #64748b;
  letter-spacing: 0.05em;
}

.smart-card-barcode-row strong {
  color: #94a3b8;
  letter-spacing: 0.08em;
}

.smart-card-glare {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 5;
}

.smart-student-card:hover .smart-card-glare {
  opacity: 1;
}

/* Sembunyikan Permanen Status KBM Banner sesuai arahan user */
#widgetStatusKelas,
.status-kelas-banner {
  display: none !important;
}

/* ===================================================================
   ACADEMIC SERVICES GRID & THEMED VIBRANT ACTION CARDS
   =================================================================== */

.academic-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.academic-service-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  user-select: none;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.academic-service-card:hover {
  transform: translateY(-3px);
  border-color: #C7D2FE;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.12);
}

.academic-service-card:active {
  transform: translateY(0);
}

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

.academic-service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease;
}

.academic-service-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex-shrink: 0;
}

.academic-service-card:hover .academic-service-icon {
  transform: scale(1.08);
}

.academic-service-card:nth-child(1) .academic-service-icon { background: #EEF2FF; color: #4F46E5; }
.academic-service-card:nth-child(2) .academic-service-icon { background: #ECFEFF; color: #0891B2; }
.academic-service-card:nth-child(3) .academic-service-icon { background: #FFFBEB; color: #D97706; }
.academic-service-card:nth-child(4) .academic-service-icon { background: #FAF5FF; color: #9333EA; }
.academic-service-card:nth-child(5) .academic-service-icon { background: #FFF1F2; color: #E11D48; }
.academic-service-card:nth-child(6) .academic-service-icon { background: #ECFDF5; color: #059669; }

.academic-service-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #1E293B;
  line-height: 1.3;
}

.academic-service-desc {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.45;
}

.academic-service-arrow {
  color: #94A3B8;
  font-size: 16px;
  font-weight: 800;
  transition: transform 0.25s ease, color 0.25s ease;
}

.academic-service-card:hover .academic-service-arrow {
  transform: translateX(4px);
  color: #4F46E5;
}

/* ===================================================================
   HOME SECTION CONTAINERS & FEED CARDS
   =================================================================== */

.home-section-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-card);
  padding: 28px 32px;
  margin-bottom: 28px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.home-section-header h3 {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0F172A;
}

/* Class Chips Filter */
.class-chip-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0 16px;
  margin-bottom: 16px;
}

.class-chip {
  padding: 9px 18px;
  border-radius: 12px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.class-chip:hover:not(.active) {
  transform: translateY(-1px);
  border-color: #94A3B8;
  color: #0F172A;
  background: #F8FAFC;
}

.class-chip:active {
  transform: translateY(0);
}

.class-chip.active {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
  font-weight: 800 !important;
}

/* Schedule Card */
.schedule-timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.schedule-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 18px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.schedule-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07);
}

.schedule-card.is-active {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-color: #818CF8;
}

.schedule-card .live-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.4);
}

.schedule-jam {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.schedule-mapel {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  margin: 4px 0 8px;
}

.schedule-waktu {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

/* School Feed Cards */
.school-feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.feed-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feed-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.07);
}

.feed-card:active {
  transform: translateY(0);
}

.feed-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
  border: 1px solid transparent;
}

.feed-badge.info { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.feed-badge.penting { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.feed-badge.event { background: #F0FDF4; color: #15803D; border-color: #BBF7D0; }

.feed-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
  line-height: 1.35;
}

.feed-desc {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.5;
}

/* ===================================================================
   FORM CARD & CONTROLS (VIBRANT BUTTON & CLEAN INPUTS)
   =================================================================== */

.form-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-card);
  padding: 36px 40px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
}

.form-card h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #0F172A;
}

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

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  outline: none !important;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none !important;
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18) !important;
}

.btn-primary-action {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
  color: #FFFFFF;
}

.btn-primary-action:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary-action:disabled {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(148, 163, 184, 0.4) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.85 !important;
  transform: none !important;
  letter-spacing: 0.02em;
}

/* CUSTOM FILE UPLOAD DROPZONE */
.custom-file-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 16px 20px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-file-dropzone:hover {
  border-color: #6366f1;
  background: #f1f5f9;
}
.dropzone-content {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.dropzone-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #ede9fe;
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dropzone-text {
  display: flex;
  flex-direction: column;
}
.dropzone-primary-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
}
.dropzone-sub-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.dropzone-file-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.selected-file-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-file-ready {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* PERIZINAN STATUS CARD ("BERGIZI" VERIFIED CARDS) */
.perizinan-status-card {
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.perizinan-status-card.approved {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.04) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}
.perizinan-status-card.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.04) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}
.perizinan-status-card.rejected {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.04) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.08);
}

/* ===================================================================
   DATA TABLES (REKAP PRESENSI & JADWAL)
   =================================================================== */

.data-table-wrap, .table-container {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
  padding: 6px;
}

table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

table.data-table th {
  background: #F8FAFC;
  color: #475569;
  font-weight: 700;
  padding: 14px 16px;
  font-size: 12.5px;
  border-bottom: 1.5px solid #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: #334155;
  border-bottom: 1px solid #F1F5F9;
}

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

.filter-btn {
  padding: 8px 16px;
  border-radius: 12px;
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.filter-btn:hover:not(.active) {
  transform: translateY(-1px);
  border-color: #94A3B8;
  color: #0F172A;
  background: #F8FAFC;
}

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

.filter-btn.active {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
  font-weight: 800;
  transform: none;
}

/* ===================================================================
   BANNERS & ALERTS
   =================================================================== */

.guru-alert {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-card);
  padding: 18px 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #92400E;
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 4px 16px -2px rgba(245, 158, 11, 0.1);
}

.guru-alert .alert-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-inner);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #F59E0B;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  flex-shrink: 0;
  border: none;
}

.guest-verification-banner {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1.5px solid #93C5FD;
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 4px 16px -2px rgba(59, 130, 246, 0.1);
}

.guest-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.guest-banner-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-btn);
  background: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border: none;
}

.guest-banner-text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 2px;
}

.guest-banner-text p {
  font-size: 13px;
  color: #1E40AF;
  line-height: 1.45;
  margin: 0;
}

.btn-guest-verify {
  background: #FFFFFF;
  color: #2563EB;
  border: 1.5px solid #93C5FD;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
  transition: all 0.2s ease;
}

.btn-guest-verify:hover {
  transform: translateY(-1px);
  background: #2563EB;
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-guest-verify:active {
  transform: translateY(0);
}

/* ===================================================================
   STATUS KELAS & OPERASIONAL KBM BANNER
   =================================================================== */

.status-kelas-banner, #widgetStatusKelas {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%) !important;
  border: 1.5px solid #C7D2FE !important;
  border-radius: 24px !important;
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.15) !important;
}

#iconStatusKelas {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
  border: none !important;
}

#tagStatusKelasOperasional {
  color: #4F46E5 !important;
  font-weight: 800 !important;
}

#badgeStatusKelas {
  background: #4338CA !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(67, 56, 202, 0.3) !important;
  border: none !important;
  font-weight: 800 !important;
}

#judulStatusKelas {
  color: #1E1B4B !important;
}

#descStatusKelas {
  color: #4338CA !important;
  opacity: 0.85;
}

#alertJamkosBox {
  background: #FEF2F2 !important;
  border: 1.5px solid #FECACA !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1) !important;
}

/* ===================================================================
   MODALS (PROFILE & CHAT)
   =================================================================== */

.profile-modal-overlay, .chat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 16px;
}

.profile-modal-overlay.open,
.chat-modal-overlay.open {
  display: flex !important;
}

.profile-modal-card, .chat-modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.profile-modal-header, .chat-modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border-bottom: 1.5px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.profile-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-btn-close {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-inner);
  border: none;
  background: var(--bg-clay);
  box-shadow: var(--shadow-extruded-sm);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-clay), box-shadow var(--transition-clay), color var(--transition-clay);
}

.profile-btn-close:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
  color: var(--danger);
}

.profile-btn-close:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

.profile-role-badge, .profile-auth-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  background: var(--bg-clay);
  box-shadow: var(--shadow-inset-sm);
  border: none;
}

.profile-role-badge.role-admin { color: var(--accent-teal); }
.profile-role-badge.role-walas { color: var(--primary); }
.profile-role-badge.role-guru { color: #2B6CB0; }
.profile-role-badge.role-siswa { color: var(--accent-teal); }
.profile-role-badge.role-pengunjung { color: var(--text-muted); }

.profile-auth-tag.google { color: #DD6B20; }
.profile-auth-tag.verified { color: #38B2AC; }

#boxPreviewSiswa, #boxPreviewGuru, #boxPreviewWalas {
  background: var(--bg-clay) !important;
  border: none !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-inset-sm) !important;
}

.profile-avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--bg-clay);
  box-shadow: var(--shadow-extruded-sm);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.profile-section-box {
  background: var(--bg-clay);
  border: none;
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow-inset-sm);
}

.profile-read-only-field {
  padding: 12px 16px;
  background: var(--bg-clay);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-inset);
}

.profile-input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  color: var(--text-main);
  background: var(--bg-clay);
  box-shadow: var(--shadow-inset);
  outline: none;
}

.profile-input:focus {
  box-shadow: var(--shadow-inset-deep);
}

.profile-btn-action {
  padding: 12px 22px;
  background: var(--bg-clay);
  color: var(--primary);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-extruded-sm);
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
}

.profile-btn-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
}

.profile-btn-action:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

.profile-btn-secondary {
  padding: 12px 20px;
  background: var(--bg-clay);
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-extruded-sm);
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
}

.profile-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
  color: var(--text-main);
}

.profile-btn-secondary:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

/* ===================================================================
   PERIJINAN CARDS & STATUS TRACKS
   =================================================================== */

.perijinan-card {
  background: var(--bg-clay);
  border: none;
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-extruded-sm);
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
}

.perijinan-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
}

.perijinan-card:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

.perijinan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.perijinan-nama {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.perijinan-kelas-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--bg-clay);
  box-shadow: var(--shadow-inset-sm);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
}

.perijinan-jenis-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  background: var(--bg-clay);
  box-shadow: var(--shadow-inset-sm);
  color: var(--primary);
}

.perijinan-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.perijinan-alasan-box {
  background: var(--bg-clay);
  border-radius: var(--radius-btn);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.5;
  box-shadow: var(--shadow-inset);
  margin-bottom: 14px;
}

.perijinan-dok-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-btn);
  background: var(--bg-clay);
  box-shadow: var(--shadow-extruded-sm);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-teal);
  text-decoration: none;
  margin-bottom: 14px;
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
}

.perijinan-dok-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
}

.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-chat, .btn-chat-close, .btn-chat-send {
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  border: none;
  background: var(--bg-clay);
  box-shadow: var(--shadow-extruded-sm);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition-clay), box-shadow var(--transition-clay), color var(--transition-clay);
}

.btn-chat:hover, .btn-chat-close:hover, .btn-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
}

.btn-chat:active, .btn-chat-close:active, .btn-chat-send:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

.btn-chat-close {
  color: var(--text-main);
}

.btn-chat-close:hover {
  color: var(--danger);
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-bubble.saya {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.chat-bubble.lawan {
  align-self: flex-start;
  background: var(--bg-clay);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-extruded-sm);
}

/* ===================================================================
   ANIMATIONS & LENIS SMOOTH SCROLL INTEGRATION
   =================================================================== */

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: tabFadeSlideUp 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tabFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.pulsing-dot {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  animation: liveDotPulse 2s infinite ease-out;
}

@keyframes liveDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 178, 172, 0.7); }
  60% { box-shadow: 0 0 0 9px rgba(56, 178, 172, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 178, 172, 0); }
}

/* Glass Loader Overlay */
.glass-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 36, 48, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.glass-loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.glass-loader-spinner {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
}

.glass-loader-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3.5px solid transparent;
  border-top-color: #6C63FF;
  border-right-color: #8B84FF;
  animation: glassRingSpin 1.3s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 25px rgba(108, 99, 255, 0.45);
}

.glass-loader-ring-inner {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 3.5px solid transparent;
  border-bottom-color: #38B2AC;
  border-left-color: #4FD1C5;
  animation: glassRingSpinReverse 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  box-shadow: 0 0 18px rgba(56, 178, 172, 0.45);
}

.glass-loader-core {
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #6C63FF 0%, rgba(56, 178, 172, 0.25) 70%, transparent 100%);
  animation: glassCorePulse 1.8s ease-in-out infinite;
}

@keyframes glassRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes glassRingSpinReverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

@keyframes glassCorePulse {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
}

.glass-loader-text {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
}

.glass-loader-subtext {
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

/* Lenis Smooth Scroll Rules */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

/* Chat Bubble Sub-elements */
.bubble-name {
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  opacity: 0.85;
}

.bubble-time {
  font-size: 10px;
  text-align: right;
  margin-top: 4px;
  opacity: 0.75;
}

/* Table Empty State */
.empty-state {
  text-align: center;
  padding: 36px 20px !important;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  line-height: 1;
}

.empty-state p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}

/* Status Kelas Widget Pill Buttons */
.btn-switch-kelas-widget {
  padding: 6px 14px;
  font-size: 11.5px;
  border-radius: var(--radius-inner);
  border: none !important;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  transition: all var(--transition-clay);
}

.btn-switch-kelas-widget:hover:not(.active) {
  color: var(--text-main);
  box-shadow: var(--shadow-extruded-sm);
  transform: translateY(-1px);
}

.btn-switch-kelas-widget.active,
.btn-switch-kelas-widget[style*="#4f46e5"],
.btn-switch-kelas-widget[style*="rgb(79, 70, 229)"] {
  background: var(--bg-clay) !important;
  color: var(--primary) !important;
  box-shadow: var(--shadow-inset-sm) !important;
  font-weight: 800 !important;
  transform: none !important;
}

.btn-switch-kelas-widget:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

/* Deep Inset Focus on All Inputs */
#pilihKelasHome:focus, #cariNamaSiswaHome:focus, #pilihSiswaRekap:focus, #chatInputPesan:focus {
  outline: none;
  box-shadow: var(--shadow-inset-deep) !important;
}

/* Teacher Dashboard Cards & Legacy Class Support */
.stat-card, .jadwal-card, .card-kbm, .card-siswa-guru, .summary-box {
  background: var(--bg-clay);
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-extruded-sm);
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
}

.card-siswa-guru:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-extruded-hover);
}

.btn-mini-action {
  border-radius: var(--radius-btn);
  border: none;
  background: var(--bg-clay);
  box-shadow: var(--shadow-extruded-sm);
  transition: transform var(--transition-clay), box-shadow var(--transition-clay);
}

.btn-mini-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-extruded-hover);
}

.btn-mini-action:active {
  transform: translateY(0.5px);
  box-shadow: var(--shadow-inset-sm);
}

@media (max-width: 1024px) {
  .view-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .view-tab-btn {
    flex: 1 1 0px;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    padding: 24px 18px;
    border-radius: 24px;
  }
  .ringkasan-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .filter-bar {
    flex-direction: column;
    gap: 12px;
  }
  .view-tabs {
    gap: 6px;
    padding: 6px 8px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .view-tab-btn {
    flex: 0 0 auto;
    min-width: max-content;
    font-size: 11.5px;
    padding: 8px 12px;
    gap: 6px;
    justify-content: center;
    justify-content: safe center;
  }
  .academic-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .hero-welcome {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .hero-welcome-right {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .view-tabs {
    gap: 6px;
    padding: 6px 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .view-tab-btn {
    flex: 0 0 auto;
    min-width: max-content;
    font-size: 11px;
    padding: 8px 10px;
    justify-content: center;
    justify-content: safe center;
    gap: 5px;
  }
  .academic-services-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ===== SUB-TAB KEHADIRAN (SISWA & DEWAN GURU) ===== */
.subtab-kehadiran-wrap {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 14px;
  gap: 6px;
  margin-bottom: 22px;
  border: 1px solid #E2E8F0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.subtab-kehadiran-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}
.subtab-kehadiran-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.subtab-kehadiran-btn:hover:not(.active) {
  color: #1E293B;
  background: rgba(255, 255, 255, 0.6);
}
.subtab-kehadiran-btn.active {
  color: #0F172A;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.subtab-kehadiran-btn.active svg {
  stroke: #4F46E5;
}

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