:root {
  --bg-color: #0b0d14;
  --panel-bg: rgba(22, 28, 45, 0.45);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-primary: #edf2f7;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --card-glow: rgba(59, 130, 246, 0.15);
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Glowing background decoration */
.glow-orb {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  animation: orb-float 20s infinite alternate ease-in-out;
}

.glow-indigo {
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
  top: -10%;
  left: -10%;
}

.glow-emerald {
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation-delay: -10s;
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.1); }
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 2rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header style */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.school-logo {
  font-size: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  padding: 0.5rem;
  border-radius: 12px;
}

.app-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.status-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.status-online {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.status-loading {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.2);
}

.status-offline {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

/* Glassmorphism Card base */
.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glassmorphism-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.text-center {
  text-align: center;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.view-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.view-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 2rem;
}

/* Feature bullet list on Login screen */
.feature-bullets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  text-align: left;
}

.bullet-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.bullet-icon {
  font-size: 1.75rem;
}

.bullet-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.bullet-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Buttons style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, #1e40af 100%);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-blue-hover) 0%, #1d4ed8 100%);
  transform: translateY(-2px);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #065f46 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-emerald-hover) 0%, #047857 100%);
  transform: translateY(-2px);
}

.btn-glow {
  position: relative;
}

.btn-glow::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
  opacity: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-xs {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-box {
  margin-top: 1.5rem;
}

.helper-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.helper-text code {
  background: rgba(255, 255, 255, 0.05);
  color: #38bdf8;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* Dashboard screen design */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.card-student {
  position: relative;
  overflow: hidden;
}

.card-glow-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-emerald));
}

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

.student-avatar {
  font-size: 2.25rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
}

.student-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.id-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.divider {
  border: none;
  border-bottom: 1px solid var(--panel-border);
  margin: 1.25rem 0;
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

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

.meta-list dd {
  font-weight: 600;
  text-align: right;
}

.text-highlight {
  color: var(--accent-emerald);
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Under the hood console logging */
.console-panel {
  padding: 1.25rem;
  border-radius: 12px;
  background: rgba(10, 12, 22, 0.8);
}

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

.console-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.console-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.console-body {
  height: 120px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.4rem;
  padding-right: 0.5rem;
}

.console-body::-webkit-scrollbar {
  width: 4px;
}

.console-body::-webkit-scrollbar-track {
  background: transparent;
}

.console-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.log-line {
  padding-left: 0.75rem;
  border-left: 2px solid transparent;
}

.log-system {
  color: var(--text-muted);
  border-color: var(--text-muted);
}

.log-info {
  color: #60a5fa;
  border-color: var(--accent-blue);
}

.log-success {
  color: #34d399;
  border-color: var(--accent-emerald);
}

.log-error {
  color: #f87171;
  border-color: #ef4444;
}

/* Visibility classes */
.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .feature-bullets {
    grid-template-columns: 1fr;
  }
  .container {
    margin: 1rem;
  }
}
