:root {
  --admin-bg: #f8fafc;
  --sidebar-bg: #06162c;
  --primary: #0b2447;
  --primary-light: #19376d;
  --secondary: #64748b;
  --text-dark: #0f172a;
  --border: #f1f5f9;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --typography: #1e293b;
}

body {
  background-color: var(--admin-bg);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  margin: 0;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  flex-shrink: 0;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow-y: auto;
}

.sidebar-header {
  padding: 2.5rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  color: #fff;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 0 1rem;
}

.nav-label {
  padding: 1.5rem 1rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 12px;
  margin-bottom: 0.25rem;
  transition: 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.nav-item:hover, .nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item i {
  margin-right: 0.75rem;
  width: 20px;
  font-size: 0.9rem;
  opacity: 0.5;
}

.nav-item.active i {
  color: #fff;
  opacity: 1;
}

/* Main Content */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

header.admin-top-nav {
  height: 80px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.search-form {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-input {
  background: #f9fafb;
  border: 1px solid transparent;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  width: 100%;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.nav-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-icon-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.avatar-badge {
  width: 40px;
  height: 40px;
  background: #0b2447;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-badge:hover {
  box-shadow: 0 0 0 4px rgba(11, 36, 71, 0.1);
}

/* High Fidelity KPI & Widget System */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 640px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.kpi-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.1);
}

.kpi-card:hover .kpi-icon-box {
  transform: rotate(-6deg) scale(1.1);
}

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-label {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.05em;
  margin: 0;
}

.kpi-secondary {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.4;
}

.kpi-status-line {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse-indicator {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-text {
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.2em;
  opacity: 0.4;
}

/* Widget Cards */
.widget-card {
  background: white;
  border-radius: 20px;
  border: 1px solid #f3f4f6;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.3s;
}

.widget-card:hover {
  box-shadow: 0 15px 30px rgba(0,0,0,0.05);
}

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

.widget-title {
  font-size: 13px;
  font-weight: 900;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin: 0;
}

.widget-subtitle {
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.5rem;
  opacity: 0.4;
}

.widget-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fdfefe;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: #f3f4f6;
  color: #1e293b;
  background: #fff;
}

/* Grid Utilities */
.col-span-12 { grid-column: span 12 / span 12; }
@media (min-width: 1024px) {
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
}
@media (min-width: 1280px) {
  .xl\:col-span-4 { grid-column: span 4 / span 4; }
  .xl\:col-span-8 { grid-column: span 8 / span 8; }
}

.fab-item:hover {
  transform: translateX(-5px) !important;
}

.fab-item:hover span {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
}

.content-body {
  padding: 2.5rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* Utility Classes mirrored from Next.js Tailwind config */
.font-black { font-weight: 900; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-widest { letter-spacing: 0.2em; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }

/* KPI Component */
.kpi-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.kpi-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-label {
  font-size: 0.55rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--secondary);
  opacity: 0.4;
  letter-spacing: 0.15rem;
  margin-bottom: 0.25rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.05rem;
  color: var(--text-dark);
}

.kpi-sync {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pulse {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Widgets */
.widget-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  height: 100%;
}

.widget-title-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.widget-title {
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: var(--text-dark);
}

.widget-subtitle {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--secondary);
  opacity: 0.4;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-top: 0.25rem;
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

/* AdmissionSeason Premium Additions */
.sidebar {
  position: relative;
  overflow: hidden;
}

.bg-glow-top {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: rgba(59, 130, 246, 0.2);
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.bg-glow-bottom {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(16, 185, 129, 0.1);
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.sidebar-header {
  position: relative;
  z-index: 10;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
}

.sidebar-divider {
  margin: 0 1.75rem 1rem;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

.nav-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  padding: 2rem 1.75rem 0.75rem;
}

.nav-label-under {
  width: 32px;
  height: 2px;
  background: rgba(59, 130, 246, 0.3);
  margin-top: 4px;
  border-radius: 100px;
  margin-left: 1.75rem;
}

.nav-item {
  position: relative;
  margin: 0.25rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  transition: all 0.3s;
  overflow: hidden;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.2), transparent);
  pointer-events: none;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 2rem;
  background: #3b82f6;
  border-radius: 0 100px 100px 0;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
}

.nav-item i {
  font-size: 20px;
  width: 20px;
  transition: all 0.3s;
}

.nav-item.active i {
  color: #60a5fa;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.4));
}

.nav-item:hover i {
  transform: scale(1.1);
  color: #93c5fd;
}

.sidebar-footer {
  padding: 1.25rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.btn-signout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.btn-signout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
