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

:root {
  
  --gemini-blue: #6366f1;
  --gemini-blue-glow: rgba(99, 102, 241, 0.4);
  --gemini-indigo: #4f46e5;
  --gemini-purple: #8b5cf6;
  --gemini-purple-glow: rgba(139, 92, 246, 0.4);
  --gemini-cyan: #06b6d4;
  --gemini-cyan-glow: rgba(6, 182, 212, 0.35);
  --gemini-teal: #14b8a6;
  
  --primary: var(--gemini-blue);
  --primary-light: #818cf8;
  --primary-dark: #4338ca;
  --primary-glow: var(--gemini-blue-glow);

  --bg-dark: #07080e;
  --bg-card: rgba(18, 20, 32, 0.75);
  --bg-card-hover: rgba(26, 29, 46, 0.85);
  --bg-surface: #111322;
  --bg-elevated: #1a1c30;

  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-glow: rgba(99, 102, 241, 0.35);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --glass-shadow-lg: 0 16px 48px 0 rgba(0, 0, 0, 0.65);

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

  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --info: #3b82f6;
  
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(139, 92, 246, 0.14) 0%, transparent 50%);
  background-attachment: fixed;
}

.hidden { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(10, 11, 18, 0.5); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }

.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px; position: relative; z-index: 10;
}
.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 48px 40px; width: 100%; max-width: 440px;
  box-shadow: var(--glass-shadow-lg);
  animation: floatIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gemini-cyan), var(--gemini-blue), var(--gemini-purple));
}

.login-logo { text-align: center; margin-bottom: 32px; }
.logo-circle-cap {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  border-radius: 22px; display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px; box-shadow: 0 8px 24px var(--gemini-blue-glow);
  position: relative; transition: transform 0.3s ease;
}
.logo-circle-cap:hover { transform: scale(1.05) rotate(-3deg); }
.logo-circle-cap svg { width: 44px; height: 44px; fill: #ffffff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

.login-logo h1 { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.5px; background: linear-gradient(135deg, #ffffff, #cbd5e1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-logo p { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

.login-error {
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5; padding: 12px 16px; border-radius: var(--radius-md); font-size: 0.85rem; margin-bottom: 16px; text-align: center;
}

.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  color: #ffffff; border: none; border-radius: var(--radius-md);
  font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s ease; margin-top: 10px;
  box-shadow: 0 4px 16px var(--gemini-blue-glow);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--gemini-purple-glow); }

.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 260px; background: var(--bg-surface);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column; flex-shrink: 0;
  z-index: 50; transition: transform 0.3s ease;
}
.sidebar-header {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 20px; border-bottom: 1px solid var(--glass-border);
}
.sidebar-logo {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px var(--gemini-blue-glow); flex-shrink: 0;
}
.sidebar-logo svg { width: 24px; height: 24px; fill: #ffffff; }

.sidebar-title { display: flex; flex-direction: column; }
.sidebar-school { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.5px; color: #fff; }
.sidebar-sub { color: var(--gemini-cyan); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.nav-menu { list-style: none; flex: 1; padding: 16px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; border-radius: var(--radius-md);
  transition: all 0.2s ease; color: var(--text-muted); font-weight: 600; font-size: 0.9rem;
  position: relative;
}
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-main); transform: translateX(3px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.2));
  color: #ffffff; border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 4px;
  background: var(--gemini-cyan); border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 1.2rem; display: flex; align-items: center; justify-content: center; width: 24px; }

.sidebar-footer {
  padding: 16px 18px; border-top: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(7, 8, 14, 0.5);
}
.user-info { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4); flex-shrink: 0;
}
.user-name { font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.user-role { font-size: 0.72rem; color: var(--text-dim); }

.logout-btn {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
  color: var(--text-muted); width: 34px; height: 34px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: var(--danger); }

.top-header {
  height: 64px; border-bottom: 1px solid var(--glass-border);
  background: rgba(17, 19, 34, 0.8); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; z-index: 40; flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 14px; }

.global-search-trigger {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  padding: 8px 16px; border-radius: 20px; color: var(--text-muted);
  font-size: 0.85rem; display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: all 0.2s ease; width: 280px;
}
.global-search-trigger:hover { border-color: var(--gemini-purple); color: var(--text-main); background: var(--bg-elevated); }
.kbd-shortcut {
  background: rgba(255,255,255,0.1); padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.72rem; margin-left: auto; color: var(--text-dim);
}

.presence-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 12px; border-radius: 20px; font-size: 0.78rem; color: #6ee7b7; font-weight: 600;
}
.presence-dot {
  width: 8px; height: 8px; background: var(--success); border-radius: 50%;
  box-shadow: 0 0 8px var(--success); animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.2); } }

.icon-btn-tool {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  color: var(--text-muted); width: 36px; height: 36px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem;
  transition: all 0.2s ease;
}
.icon-btn-tool:hover { border-color: var(--gemini-blue); color: #fff; }

.main-content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.view { padding: 32px; display: none; animation: slideUpFade 0.35s ease forwards; }
.view.active { display: block; }

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

.view-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}
.view-header h2 { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
.view-header p { color: var(--text-muted); font-size: 0.92rem; margin-top: 2px; }
.view-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.dash-welcome-hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.35); border-radius: var(--radius-xl);
  padding: 24px 30px; margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden; backdrop-filter: blur(12px);
}
.dash-welcome-hero::after {
  content: '🎓'; position: absolute; right: -10px; bottom: -20px; font-size: 8rem; opacity: 0.08; pointer-events: none;
}
.hero-text h3 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.hero-text p { color: var(--text-muted); font-size: 0.9rem; max-width: 600px; }

.quick-actions-bar {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px;
}
.btn-action-hero {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  color: var(--text-main); padding: 12px 18px; border-radius: var(--radius-lg);
  font-family: var(--font-main); font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.btn-action-hero:hover {
  background: var(--bg-elevated); border-color: var(--gemini-purple);
  transform: translateY(-3px); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}
.btn-action-hero.primary {
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  border-color: rgba(139, 92, 246, 0.4); color: #ffffff;
}
.btn-action-hero.primary:hover {
  box-shadow: 0 8px 24px var(--gemini-purple-glow);
}
.btn-action-hero.gemini {
  background: linear-gradient(135deg, var(--gemini-cyan), var(--gemini-blue));
  border-color: rgba(6, 182, 212, 0.4); color: #ffffff;
}
.btn-action-hero.gemini:hover {
  box-shadow: 0 8px 24px var(--gemini-cyan-glow);
}

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden;
}
.stat-card:hover {
  border-color: var(--glass-border-glow); transform: translateY(-4px);
  box-shadow: var(--glass-shadow); background: var(--bg-card-hover);
}
.stat-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.s-blue { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.25); }
.s-purple { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.25); }
.s-yellow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.s-red { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.s-green { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }

.stat-info span { font-family: var(--font-heading); font-size: 2.3rem; font-weight: 800; line-height: 1; color: #fff; }
.stat-info p { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; margin-top: 4px; }

.dashboard-grid-2col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 1024px) { .dashboard-grid-2col { grid-template-columns: 1fr; } }

.widget-card {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); padding: 24px; backdrop-filter: blur(12px);
  margin-bottom: 24px;
}
.widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.widget-header h3 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }

.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.recent-pass-card {
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border);
  border-radius: var(--radius-md); padding: 14px 16px; transition: all 0.2s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.recent-pass-card:hover { border-color: var(--gemini-purple); background: rgba(255, 255, 255, 0.06); }
.rpc-header { display: flex; align-items: center; justify-content: space-between; }
.rpc-folio { font-family: var(--font-mono); font-weight: 700; color: var(--text-accent); font-size: 0.85rem; }
.rpc-name { font-size: 0.95rem; font-weight: 700; color: #fff; }
.rpc-info { color: var(--text-dim); font-size: 0.78rem; display: flex; align-items: center; justify-content: space-between; }

.live-feed-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.live-feed-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  background: rgba(255,255,255,0.02); border-radius: var(--radius-md);
  border-left: 3px solid var(--gemini-blue); font-size: 0.82rem;
  animation: slideInLeft 0.3s ease;
}
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.live-feed-user { font-weight: 700; color: var(--text-accent); }
.live-feed-time { margin-left: auto; font-size: 0.72rem; color: var(--text-dim); font-family: var(--font-mono); }

.chart-container { width: 100%; height: 180px; display: flex; align-items: flex-end; gap: 16px; padding: 16px 0 0; }
.chart-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 8px; }
.chart-bar {
  width: 100%; max-width: 32px; background: linear-gradient(180deg, var(--gemini-cyan), var(--gemini-blue));
  border-radius: 6px 6px 0 0; transition: height 0.5s ease; position: relative; min-height: 4px;
}
.chart-bar:hover::after {
  content: attr(data-value); position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  background: #000; padding: 2px 6px; border-radius: 4px; font-size: 0.72rem; font-family: var(--font-mono); color: #fff;
}
.chart-label { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; text-align: center; }

.search-input {
  background: var(--bg-surface); border: 1px solid var(--glass-border);
  color: var(--text-main); padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 0.88rem; font-family: inherit; width: 240px; transition: all 0.2s ease;
}
.search-input:focus { border-color: var(--gemini-purple); outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2); }

.filter-select {
  background: var(--bg-surface); border: 1px solid var(--glass-border);
  color: var(--text-main); padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 0.88rem; font-family: inherit; cursor: pointer; transition: all 0.2s ease;
}
.filter-select:focus { outline: none; border-color: var(--gemini-purple); }

.btn {
  padding: 10px 18px; border-radius: var(--radius-md); border: none;
  font-family: var(--font-main); font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  color: #ffffff; box-shadow: 0 4px 14px var(--gemini-blue-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--gemini-purple-glow); }

.btn-secondary {
  background: linear-gradient(135deg, var(--gemini-cyan), var(--gemini-blue));
  color: #ffffff; box-shadow: 0 4px 14px var(--gemini-cyan-glow);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px var(--gemini-blue-glow); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border); color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--text-muted); color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 8px; font-size: 0.95rem; }
.btn-edit { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.25); }
.btn-edit:hover { background: rgba(99, 102, 241, 0.3); color: #fff; }

.btn-delete { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.25); }
.btn-delete:hover { background: rgba(239, 68, 68, 0.25); color: #fff; }

.btn-view { background: rgba(139, 92, 246, 0.15); color: #d8b4fe; border: 1px solid rgba(139, 92, 246, 0.25); }
.btn-view:hover { background: rgba(139, 92, 246, 0.3); color: #fff; }

.btn-return { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.25); }
.btn-return:hover { background: rgba(16, 185, 129, 0.3); color: #fff; }

.table-wrapper {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); overflow: hidden; backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
}
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th {
  background: rgba(17, 19, 34, 0.9); padding: 14px 18px;
  font-family: var(--font-heading); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim);
  border-bottom: 1px solid var(--glass-border); white-space: nowrap;
}
.data-table td {
  padding: 14px 18px; border-top: 1px solid var(--glass-border);
  font-size: 0.88rem; vertical-align: middle; transition: background 0.15s ease;
}
.data-table tr:hover td { background: rgba(255, 255, 255, 0.03); }
.table-actions { display: flex; align-items: center; gap: 6px; }

.search-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-input-group .search-input {
  width: 280px;
}

.search-clear-btn {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.12);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.search-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--gemini-cyan);
  padding: 8px 14px;
}

.search-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  position: relative;
}

.sortable-th:hover {
  background: rgba(99, 102, 241, 0.18) !important;
  color: var(--text-bright) !important;
}

.sortable-th:focus-visible {
  outline: 2px solid var(--gemini-purple);
  outline-offset: -2px;
}

.th-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.sortable-th .sort-icon {
  font-size: 0.78rem;
  opacity: 0.5;
  transition: transform 0.15s ease, opacity 0.15s ease, color 0.15s ease;
}

.sortable-th:hover .sort-icon {
  opacity: 0.9;
  color: var(--gemini-cyan);
}

.sortable-th.sort-active {
  background: rgba(99, 102, 241, 0.25) !important;
  color: #ffffff !important;
  border-bottom: 2px solid var(--gemini-cyan) !important;
}

.sortable-th.sort-active .sort-icon {
  opacity: 1;
  color: var(--gemini-cyan);
  font-weight: 800;
  font-size: 0.85rem;
}

.scroll-status-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(17, 19, 34, 0.95);
  border-top: 1px solid var(--glass-border);
  min-height: 52px;
}

.scroll-status-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.scroll-status-info strong {
  color: var(--gemini-cyan);
}

.loading-spinner-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gemini-cyan);
  background: rgba(99, 102, 241, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.spinner-icon.pulse {
  display: inline-block;
  animation: spinRotate 1s linear infinite;
}

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

.data-table tbody tr.row-stagger-in {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  animation: staggerRowIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

@keyframes staggerRowIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.2px; font-family: var(--font-main);
}
.badge-pass { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.35); }
.badge-just { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.35); }
.badge-prog { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-done { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-canc { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-leve { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-moderado { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-grave { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-out { background: rgba(245, 158, 11, 0.2); color: #fde047; border: 1px solid rgba(245, 158, 11, 0.4); animation: pulseOrange 2s infinite; }
@keyframes pulseOrange { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.no-data { text-align: center; color: var(--text-dim); padding: 48px; font-size: 0.95rem; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--bg-surface); border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl); width: 100%; max-width: 580px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--glass-shadow-lg);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1); position: relative;
}
.modal-wide { max-width: 760px; }
.modal-full { max-width: 900px; }

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

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--glass-border);
  background: rgba(17, 19, 34, 0.5);
}
.modal-header h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 800; color: #fff; }
.modal-close {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
  color: var(--text-muted); width: 32px; height: 32px; border-radius: 8px;
  cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); }

.modal-body { padding: 28px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--glass-border);
}

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label {
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  color: var(--text-main); padding: 11px 14px; border-radius: var(--radius-md);
  font-size: 0.92rem; font-family: inherit; transition: all 0.2s ease; width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gemini-purple); outline: none; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
.form-group textarea { resize: vertical; min-height: 85px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }

.spotter-modal { max-width: 600px; padding: 0; background: var(--bg-surface); }
.spotter-input-wrapper {
  display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--glass-border);
  gap: 12px;
}
.spotter-input-wrapper svg { width: 22px; height: 22px; fill: var(--text-muted); }
.spotter-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 1.1rem; font-family: inherit;
}
.spotter-results { max-height: 380px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.spotter-item {
  padding: 12px 16px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background 0.15s ease; color: var(--text-main);
}
.spotter-item:hover, .spotter-item.selected { background: var(--bg-elevated); border: 1px solid var(--gemini-purple); }
.spotter-type { font-size: 0.72rem; text-transform: uppercase; font-family: var(--font-mono); color: var(--text-accent); }

.exp-header-banner {
  background: linear-gradient(135deg, var(--gemini-blue), var(--gemini-purple));
  border-radius: var(--radius-lg); padding: 20px 24px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.exp-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--gemini-purple);
  font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.exp-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--glass-border); margin-bottom: 20px; }
.exp-tab {
  padding: 10px 18px; cursor: pointer; color: var(--text-muted); font-weight: 700; font-size: 0.88rem;
  border-bottom: 2px solid transparent; transition: all 0.2s ease;
}
.exp-tab.active { color: var(--gemini-purple); border-bottom-color: var(--gemini-purple); }

.pass-preview-wrapper { display: flex; justify-content: center; padding: 10px 0; }
.pass-doc {
  width: 210mm; min-height: 148mm; background: #ffffff; color: #0f172a;
  padding: 14mm 14mm; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  font-family: 'Inter', Arial, sans-serif; position: relative; font-size: 10.5pt;
  border: 4px double #4338ca;
}
.pass-doc-header {
  display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #4338ca;
  padding-bottom: 12px; margin-bottom: 14px;
}
.pass-doc-logo { width: 50px; height: 50px; }
.pass-doc-school { flex: 1; }
.pass-doc-school h1 { font-family: 'Outfit', sans-serif; font-size: 15pt; font-weight: 800; color: #4338ca; margin: 0; line-height: 1.1; }
.pass-doc-school p { font-size: 8.5pt; color: #475569; margin: 2px 0 0; }
.pass-doc-folio { text-align: right; }
.pass-doc-folio .folio-label { font-size: 8pt; color: #64748b; text-transform: uppercase; font-weight: 700; }
.pass-doc-folio .folio-val { font-family: 'JetBrains Mono', monospace; font-size: 15pt; font-weight: 800; color: #4338ca; }
.pass-doc-type {
  text-align: center; font-size: 16pt; font-weight: 800; color: #4338ca;
  text-transform: uppercase; letter-spacing: 2px; margin: 12px 0;
  border-bottom: 1px solid #e2e8f0; padding-bottom: 6px;
}
.pass-doc-grid { display: grid; grid-template-columns: 1fr 120px; gap: 16px; margin-top: 10px; }
.pass-field { display: flex; border-bottom: 1px solid #f1f5f9; padding: 6px 0; }
.pass-field-label { font-weight: 700; width: 140px; flex-shrink: 0; color: #475569; font-size: 9.5pt; }
.pass-field-value { flex: 1; font-size: 10pt; color: #0f172a; font-weight: 600; }
.pass-qr-box { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px; background: #f8fafc; }
.pass-qr-box svg { width: 90px; height: 90px; }
.pass-qr-box p { font-size: 7pt; color: #64748b; margin-top: 4px; font-weight: 700; text-align: center; }

.pass-doc-signatures { display: flex; justify-content: space-around; margin-top: 24mm; }
.sig-block { text-align: center; }
.sig-line { border-top: 1px solid #334155; width: 140px; margin: 0 auto 6px; }
.sig-label { font-size: 8pt; color: #475569; font-weight: 600; }
.pass-doc-footer { text-align: center; font-size: 7.5pt; color: #94a3b8; margin-top: 8mm; border-top: 1px solid #f1f5f9; padding-top: 6px; }

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: var(--bg-surface); border: 1px solid var(--glass-border-glow);
  color: #fff; padding: 14px 20px; border-radius: var(--radius-lg);
  font-size: 0.88rem; font-weight: 600; box-shadow: var(--glass-shadow-lg);
  display: flex; align-items: center; gap: 12px; pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toastIn { from { transform: translateY(20px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  @page { size: A4 portrait; margin: 10mm; }
  body > *:not(#printable-pass-area) { display: none !important; }
  #printable-pass-area { display: block !important; background: #fff; }
  .pass-doc { box-shadow: none; border-radius: 0; width: 100%; border: 3px double #4338ca; }
}

.pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--glass-border);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}
.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}
