/* ============================================================
   EduOS ERP Redesign Layer
   Dashboard refresh note:
   - Updated the school/admin shell to align more closely with the official Projectworlds school ERP visual language.
   - Added refined dashboard surfaces, classic colorful KPI cards, launcher tiles, chart areas, side widgets and improved mobile behavior.
   - Existing shared layout primitives are preserved so the rest of the project remains compatible.
   ============================================================ */

:root {
  --erp-bg: #eef4ff;
  --erp-bg-2: #f7fbff;
  --erp-surface: rgba(255,255,255,0.88);
  --erp-surface-strong: #ffffff;
  --erp-line: rgba(148,163,184,0.18);
  --erp-text: #0f172a;
  --erp-muted: #64748b;
  --erp-primary: #4f46e5;
  --erp-secondary: #7c3aed;
  --erp-cyan: #06b6d4;
  --erp-teal: #14b8a6;
  --erp-green: #10b981;
  --erp-orange: #f97316;
  --erp-yellow: #f59e0b;
  --erp-pink: #ec4899;
  --erp-red: #ef4444;
  --erp-dark: #0f172a;
  --erp-dark-2: #16213a;
  --erp-dark-3: #1e293b;
  --erp-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --erp-shadow-soft: 0 12px 32px rgba(79, 70, 229, 0.12);
  --erp-gradient-main: linear-gradient(135deg, #4f46e5 0%, #7c3aed 38%, #06b6d4 100%);
  --erp-gradient-cool: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --erp-gradient-warm: linear-gradient(135deg, #fb7185 0%, #f97316 100%);
  --erp-gradient-success: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  color: var(--erp-text);
  background:
    radial-gradient(circle at 0% 0%, rgba(79,70,229,0.14), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(6,182,212,0.16), transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(244,63,94,0.10), transparent 26%),
    linear-gradient(180deg, #f4f8ff 0%, #eef4ff 35%, #f9fbff 100%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 80%);
  opacity: 0.3;
}
body.theme-midnight {
  --erp-bg: #081224;
  --erp-bg-2: #0d1b31;
  --erp-surface: rgba(11, 20, 36, 0.82);
  --erp-surface-strong: rgba(16, 25, 45, 0.96);
  --erp-line: rgba(148,163,184,0.12);
  --erp-text: #e2e8f0;
  --erp-muted: #94a3b8;
  background:
    radial-gradient(circle at 10% 10%, rgba(6,182,212,0.16), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(236,72,153,0.14), transparent 24%),
    radial-gradient(circle at 90% 100%, rgba(79,70,229,0.18), transparent 30%),
    linear-gradient(180deg, #040c18 0%, #081224 38%, #0b1730 100%);
}
body.theme-midnight .card,
body.theme-midnight .stat-card,
body.theme-midnight .settings-panel,
body.theme-midnight .module-cluster,
body.theme-midnight .launcher-card,
body.theme-midnight .data-table thead th,
body.theme-midnight .data-table tbody tr:hover,
body.theme-midnight .workspace-note,
body.theme-midnight .settings-preview-card,
body.theme-midnight .hero-actions,
body.theme-midnight .topbar,
body.theme-midnight .topbar-search-trigger,
body.theme-midnight .topbar-search-field,
body.theme-midnight .topbar-icon-btn,
body.theme-midnight .settings-toolbar,
body.theme-midnight .shortcut-tile,
body.theme-midnight .schedule-card,
body.theme-midnight .student-identity,
body.theme-midnight .roster-item,
body.theme-midnight .command-result,
body.theme-midnight .command-palette-panel {
  background: rgba(15, 23, 42, 0.86) !important;
  color: var(--erp-text);
  border-color: rgba(148,163,184,0.12) !important;
}
body.theme-midnight .card-title,
body.theme-midnight .card-subtitle,
body.theme-midnight .topbar-title,
body.theme-midnight .topbar-sub,
body.theme-midnight .form-label,
body.theme-midnight .kpi-value,
body.theme-midnight .launcher-card-title,
body.theme-midnight .cluster-title,
body.theme-midnight .schedule-title,
body.theme-midnight .timeline-title,
body.theme-midnight .topbar-clock-time,
body.theme-midnight .command-result-title,
body.theme-midnight .hero-title,
body.theme-midnight .page-title-lg,
body.theme-midnight .settings-panel-title,
body.theme-midnight .module-mini-link {
  color: #f8fafc !important;
}
body.theme-midnight .form-control,
body.theme-midnight .form-select,
body.theme-midnight textarea,
body.theme-midnight input {
  background: rgba(8,15,30,0.8) !important;
  border-color: rgba(148,163,184,0.14) !important;
  color: #e2e8f0 !important;
}
body.theme-midnight .form-hint,
body.theme-midnight .launcher-card-meta,
body.theme-midnight .cluster-subtitle,
body.theme-midnight .timeline-meta,
body.theme-midnight .workspace-note,
body.theme-midnight .settings-note,
body.theme-midnight .schedule-meta,
body.theme-midnight .topbar-clock-date,
body.theme-midnight .command-result-meta,
body.theme-midnight .command-empty,
body.theme-midnight .metric-label,
body.theme-midnight .metric-meta {
  color: #94a3b8 !important;
}

.main-content {
  position: relative;
  margin-left: 290px;
  min-height: 100vh;
}
.page-content {
  padding: 1.4rem 1.4rem 2rem;
}

.sidebar {
  width: 290px;
  background:
    radial-gradient(circle at 0% 0%, rgba(6,182,212,0.15), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(168,85,247,0.16), transparent 24%),
    linear-gradient(180deg, #081224 0%, #0f172a 42%, #101b31 100%);
  border-right: 1px solid rgba(148,163,184,0.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 28px 0 70px rgba(15,23,42,0.22);
}
.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 26%);
}
.sidebar-header,
.sidebar-header-advanced {
  position: relative;
  z-index: 1;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid rgba(148,163,184,0.1);
}
.sidebar-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--erp-gradient-main);
  box-shadow: 0 12px 24px rgba(79,70,229,0.35);
}
.sidebar-title {
  color: #f8fafc;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.sidebar-sub {
  color: #91a5c3;
  font-size: 0.74rem;
}
.sidebar-user-panel,
.sidebar-access-summary,
.sidebar-website-panel {
  position: relative;
  z-index: 1;
}
.sidebar-user-panel {
  margin: 1rem;
  padding: 0.95rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(148,163,184,0.12);
  backdrop-filter: blur(10px);
}
.teacher-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}
.teacher-role-pill.admin {
  color: #cffafe;
  background: rgba(34,211,238,0.12);
}
.teacher-role-pill.teacher {
  color: #e9d5ff;
  background: rgba(168,85,247,0.14);
}
.sidebar-access-summary,
.sidebar-website-panel {
  margin: 0 1rem 1rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(79,70,229,0.16), rgba(6,182,212,0.08));
}
.sidebar-access-title {
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 800;
}
.sidebar-access-count {
  margin-top: 0.35rem;
  color: #67e8f9;
  font-size: 1.4rem;
  font-weight: 800;
}
.sidebar-access-caption {
  margin-top: 0.25rem;
  color: #9fb2cf;
  font-size: 0.74rem;
  line-height: 1.5;
}
.sidebar-nav {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0 0.8rem;
}
.nav-section-title {
  padding: 0.9rem 1.3rem 0.3rem;
  color: #5d7396;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}
.nav-item {
  margin: 0.16rem 0.9rem;
  padding: 0.78rem 0.95rem;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 16px;
  color: #bfd0eb;
  font-size: 0.83rem;
}
.nav-item .icon {
  width: 20px;
  color: #7dd3fc;
}
.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg, rgba(79,70,229,0.22), rgba(6,182,212,0.12));
  border-color: rgba(125,211,252,0.12);
  color: #f8fafc;
  transform: translateX(3px);
}
.nav-item:hover .icon,
.nav-item.active .icon {
  color: #f8fafc;
}
.nav-badge {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  box-shadow: 0 6px 12px rgba(239,68,68,0.26);
}
.sidebar-footer-advanced,
.sidebar > div:last-child {
  position: relative;
  z-index: 1;
  padding: 1rem 1.2rem 1.25rem;
  color: #607089;
  border-top: 1px solid rgba(148,163,184,0.08);
}

.topbar {
  position: sticky;
  top: 0.9rem;
  margin: 0.95rem 1.2rem 0;
  height: auto;
  min-height: 78px;
  padding: 1rem 1.15rem;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.38);
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.7));
  backdrop-filter: blur(18px);
  box-shadow: var(--erp-shadow-soft);
}
.topbar-shell {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
.topbar-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.topbar-sub {
  font-size: 0.76rem;
  color: var(--erp-muted);
  margin-top: 0.16rem;
}
.topbar-headline {
  min-width: 0;
}
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.topbar-search-trigger,
.topbar-search-field,
.topbar-icon-btn,
.topbar-clock,
.topbar-profile-btn,
.topbar-inline-pill {
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.76);
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}
.topbar-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 230px;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  color: var(--erp-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.topbar-search-trigger:hover,
.topbar-icon-btn:hover,
.topbar-profile-btn:hover,
.topbar-inline-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(15,23,42,0.08);
}
.topbar-search-kbd {
  margin-left: auto;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: rgba(79,70,229,0.1);
  color: var(--erp-primary);
  font-size: 0.66rem;
  font-weight: 800;
}
.topbar-icon-btn,
.topbar-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.75rem 0.95rem;
  border-radius: 18px;
  color: #334155;
  transition: all 0.2s ease;
}
.topbar-icon-btn {
  width: 46px;
  padding: 0;
}
.topbar-clock {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 112px;
  padding: 0.68rem 0.92rem;
  border-radius: 18px;
}
.topbar-clock-time {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}
.topbar-clock-date {
  font-size: 0.68rem;
  color: var(--erp-muted);
  margin-top: 0.18rem;
}
.topbar-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.72rem 0.92rem;
  border-radius: 18px;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
}
.topbar-profile-btn {
  padding-right: 0.85rem;
}
.profile-menu {
  width: 290px;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.18);
  box-shadow: 0 24px 48px rgba(15,23,42,0.16);
}

.card,
.stat-card,
.hero-actions,
.settings-panel,
.module-cluster,
.launcher-card,
.schedule-card,
.settings-preview-card,
.shortcut-tile,
.student-identity,
.roster-item {
  border: 1px solid rgba(255,255,255,0.58);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.8));
  backdrop-filter: blur(14px);
  box-shadow: var(--erp-shadow);
}
.card {
  border-radius: 28px;
  padding: 1.35rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.card-subtitle {
  color: var(--erp-muted);
}
.card-header {
  margin-bottom: 1rem;
}

.btn {
  border-radius: 16px;
  font-weight: 700;
  padding: 0.72rem 1.08rem;
}
.btn-primary {
  background: var(--erp-gradient-main);
  box-shadow: 0 14px 26px rgba(79,70,229,0.25);
}
.btn-success {
  background: var(--erp-gradient-success);
  box-shadow: 0 14px 26px rgba(16,185,129,0.22);
}
.btn-warning {
  background: var(--erp-gradient-warm);
  box-shadow: 0 14px 26px rgba(249,115,22,0.2);
}
.btn-outline {
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.74);
}
.btn:hover {
  transform: translateY(-1px);
}

.workspace-hero,
.page-hero,
.student-hero,
.driver-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.55rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,0.18), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(34,211,238,0.22), transparent 28%),
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 42%, #06b6d4 100%);
  box-shadow: 0 26px 60px rgba(79,70,229,0.3);
  color: #fff;
}
.workspace-hero::after,
.page-hero::after,
.student-hero::after,
.driver-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -35% auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 62%);
}
.hero-badge,
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.76rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-title,
.page-title-lg {
  margin-top: 0.95rem;
  font-size: clamp(1.8rem, 2.4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.hero-text {
  margin-top: 0.85rem;
  max-width: 780px;
  color: rgba(255,255,255,0.84);
  line-height: 1.7;
  font-size: 0.95rem;
}
.dashboard-feature-pills,
.teacher-feature-chips,
.hero-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.8rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15,23,42,0.24), rgba(15,23,42,0.18));
  color: #fff;
}
.hero-stat-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
}
.hero-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.hero-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
}
.hero-search-band {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding: 0.82rem 1rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
}
.hero-search-band input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
}
.hero-search-band input::placeholder {
  color: rgba(255,255,255,0.7);
}

.launcher-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.15rem 0;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.62);
  box-shadow: 0 14px 28px rgba(79,70,229,0.08);
}
.launcher-title,
.section-title-lg {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.launcher-subtitle,
.section-subtitle {
  margin-top: 0.2rem;
  color: var(--erp-muted);
  font-size: 0.82rem;
}
.launcher-search {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: min(100%, 340px);
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(255,255,255,0.9);
}
.launcher-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
}
.launcher-grid,
.quick-link-grid,
.module-grid,
.workspace-chip-grid,
.workspace-stat-grid {
  display: grid;
  gap: 1rem;
}
.launcher-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.launcher-card,
.shortcut-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  padding: 1.1rem;
  border-radius: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.launcher-card:hover,
.shortcut-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px rgba(79,70,229,0.14);
}
.launcher-card-icon,
.shortcut-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  font-size: 1.08rem;
  box-shadow: 0 16px 26px rgba(79,70,229,0.18);
}
.gradient-indigo { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.gradient-cyan { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.gradient-emerald { background: linear-gradient(135deg, #10b981, #14b8a6); }
.gradient-orange { background: linear-gradient(135deg, #fb7185, #f97316); }
.gradient-yellow { background: linear-gradient(135deg, #f59e0b, #f97316); }
.gradient-rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.gradient-slate { background: linear-gradient(135deg, #1e293b, #334155); }
.launcher-card-title,
.shortcut-title {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.launcher-card-meta,
.shortcut-meta {
  color: var(--erp-muted);
  font-size: 0.79rem;
  line-height: 1.6;
  margin-top: 0.25rem;
}
.launcher-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}
.launcher-pill {
  padding: 0.26rem 0.54rem;
  border-radius: 999px;
  background: rgba(79,70,229,0.08);
  color: var(--erp-primary);
  font-size: 0.68rem;
  font-weight: 800;
}

.kpi-grid,
.metric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.kpi-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 24px;
  color: #fff;
  min-height: 124px;
  box-shadow: 0 24px 46px rgba(79,70,229,0.18);
}
.kpi-card::after {
  content: '';
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.kpi-card.indigo { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.kpi-card.cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.kpi-card.emerald { background: linear-gradient(135deg, #059669, #14b8a6); }
.kpi-card.orange { background: linear-gradient(135deg, #f97316, #fb7185); }
.kpi-card.purple { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.kpi-card.rose { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.kpi-card.slate { background: linear-gradient(135deg, #0f172a, #334155); }
.kpi-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.16);
  font-size: 1.15rem;
}
.kpi-label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  font-weight: 700;
}
.kpi-value {
  position: relative;
  z-index: 1;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.05;
  margin-top: 0.24rem;
}
.kpi-meta {
  position: relative;
  z-index: 1;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.76);
  margin-top: 0.34rem;
}

.command-center {
  border-radius: 30px;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top right, rgba(6,182,212,0.18), transparent 26%),
    radial-gradient(circle at left bottom, rgba(236,72,153,0.18), transparent 30%),
    linear-gradient(180deg, #07111f 0%, #0c1729 50%, #0f1d33 100%);
  color: #e2e8f0;
  border: 1px solid rgba(56,189,248,0.16);
  box-shadow: 0 30px 60px rgba(2,6,23,0.35);
}
.command-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.command-center-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67e8f9;
}
.command-center-subtitle {
  margin-top: 0.3rem;
  color: #8ea6c6;
  font-size: 0.78rem;
}
.console-clock {
  text-align: right;
}
.console-clock .time {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
}
.console-clock .date {
  color: #94a3b8;
  font-size: 0.72rem;
}
.console-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}
.console-metric {
  padding: 0.9rem;
  border-radius: 18px;
  background: rgba(15,23,42,0.66);
  border: 1px solid rgba(96,165,250,0.12);
}
.metric-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #67e8f9;
  font-weight: 700;
}
.metric-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.3rem;
}
.metric-meta {
  margin-top: 0.24rem;
  color: #8ea6c6;
  font-size: 0.74rem;
}
.signal-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(148,163,184,0.18);
  overflow: hidden;
  margin-top: 0.72rem;
}
.signal-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #06b6d4, #38bdf8, #ec4899);
}
.console-log-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}
.console-log-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.72rem 0.82rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(96,165,250,0.1);
}
.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35rem;
  background: #22d3ee;
  box-shadow: 0 0 0 6px rgba(34,211,238,0.14);
  flex-shrink: 0;
}
.console-log-item.warning .console-dot { background: #f59e0b; box-shadow: 0 0 0 6px rgba(245,158,11,0.14); }
.console-log-item.danger .console-dot { background: #fb7185; box-shadow: 0 0 0 6px rgba(251,113,133,0.14); }
.console-log-title {
  font-size: 0.84rem;
  color: #fff;
  font-weight: 700;
}
.console-log-text {
  margin-top: 0.18rem;
  color: #93a9c5;
  font-size: 0.74rem;
  line-height: 1.55;
}

.module-board {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.module-cluster {
  padding: 1.2rem;
  border-radius: 26px;
}
.cluster-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.cluster-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-size: 1rem;
}
.cluster-title {
  font-size: 0.96rem;
  font-weight: 800;
}
.cluster-subtitle {
  margin-top: 0.2rem;
  color: var(--erp-muted);
  font-size: 0.78rem;
}
.module-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.module-mini-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 72px;
  padding: 0.8rem 0.85rem;
  border-radius: 18px;
  text-decoration: none;
  color: #0f172a;
  border: 1px solid rgba(148,163,184,0.14);
  background: rgba(255,255,255,0.84);
  transition: all 0.2s ease;
}
.module-mini-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 32px rgba(79,70,229,0.12);
}
.module-mini-link i {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(79,70,229,0.1);
  color: var(--erp-primary);
}
.module-mini-link strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
}
.module-mini-link span {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.7rem;
  color: var(--erp-muted);
}

.workspace-note,
.settings-note,
.info-strip {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.12);
  color: var(--erp-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}
.timeline-list,
.schedule-list,
.roster-list {
  display: grid;
  gap: 0.82rem;
}
.timeline-item,
.schedule-item,
.roster-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 0.95rem;
  border-radius: 20px;
}
.timeline-badge,
.schedule-badge,
.roster-badge {
  min-width: 52px;
  padding: 0.42rem 0.55rem;
  border-radius: 14px;
  text-align: center;
  background: rgba(79,70,229,0.1);
  color: var(--erp-primary);
  font-size: 0.72rem;
  font-weight: 800;
}
.timeline-title,
.schedule-title,
.roster-title {
  font-size: 0.88rem;
  font-weight: 800;
}
.timeline-meta,
.schedule-meta,
.roster-meta {
  margin-top: 0.16rem;
  color: var(--erp-muted);
  font-size: 0.76rem;
}

.student-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 24px;
}
.student-mini-profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.student-mini-chip {
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
}
.student-mini-chip-label {
  color: rgba(255,255,255,0.74);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.student-mini-chip-value {
  margin-top: 0.28rem;
  font-size: 1rem;
  font-weight: 800;
}
.app-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}
.app-tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 145px;
  padding: 1rem;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,250,255,0.9));
  border: 1px solid rgba(148,163,184,0.12);
  box-shadow: 0 20px 34px rgba(79,70,229,0.08);
  transition: all 0.2s ease;
}
.app-tile:hover {
  transform: translateY(-3px);
}
.app-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}
.app-tile-title {
  font-size: 0.92rem;
  font-weight: 800;
}
.app-tile-meta {
  font-size: 0.76rem;
  color: var(--erp-muted);
  line-height: 1.55;
}

.settings-shell {
  max-width: 1300px;
  margin: 0 auto;
}
.settings-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 26px;
}
.settings-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.settings-toolbar-icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #fb923c);
  box-shadow: 0 18px 34px rgba(249,115,22,0.24);
}
.settings-toolbar-title {
  font-size: 1.15rem;
  font-weight: 800;
}
.settings-toolbar-subtitle {
  margin-top: 0.18rem;
  font-size: 0.8rem;
  color: var(--erp-muted);
}
.settings-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.15rem;
  border-radius: 18px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #f97316);
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(249,115,22,0.24);
}
.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.72fr);
}
.settings-main,
.settings-side {
  display: grid;
  gap: 1rem;
}
.settings-panel {
  padding: 1.2rem;
  border-radius: 28px;
}
.settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.settings-panel-title {
  font-size: 1rem;
  font-weight: 800;
}
.settings-panel-subtitle {
  margin-top: 0.22rem;
  color: var(--erp-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.settings-panel-tag {
  padding: 0.38rem 0.62rem;
  border-radius: 999px;
  background: rgba(79,70,229,0.08);
  color: var(--erp-primary);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.settings-input-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-input-grid .full-span {
  grid-column: 1 / -1;
}
.form-group { margin-bottom: 0; }
.form-label {
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  color: #334155;
  font-weight: 700;
}
.form-control {
  min-height: 48px;
  border-radius: 16px;
  border-color: rgba(148,163,184,0.18);
  background: rgba(250,252,255,0.96);
}
textarea.form-control {
  min-height: 110px;
}
.settings-side .settings-panel {
  position: sticky;
  top: 6.7rem;
}
.settings-preview-card {
  padding: 1rem;
  border-radius: 22px;
}
.settings-preview-row {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(148,163,184,0.12);
}
.settings-preview-row:last-child { border-bottom: 0; }
.settings-preview-row span {
  color: var(--erp-muted);
  font-size: 0.74rem;
}
.settings-preview-row strong {
  font-size: 0.82rem;
  text-align: right;
}

.data-table {
  overflow: hidden;
  border-radius: 20px;
}
.data-table thead th {
  background: rgba(79,70,229,0.06);
  color: #475569;
  font-size: 0.68rem;
}
.data-table tbody td {
  font-size: 0.8rem;
}
.data-table tbody tr:hover {
  background: rgba(79,70,229,0.04);
}
.badge {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-weight: 800;
}
.badge-yellow { background: rgba(245,158,11,0.14); color: #b45309; }
.badge-blue { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.badge-green { background: rgba(16,185,129,0.12); color: #047857; }
.badge-red { background: rgba(239,68,68,0.12); color: #b91c1c; }
.badge-purple { background: rgba(168,85,247,0.12); color: #7e22ce; }
.badge-gray { background: rgba(148,163,184,0.14); color: #475569; }

.command-palette {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 7vh 1rem 1rem;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(10px);
  z-index: 120;
}
.command-palette.open {
  display: flex;
}
.command-palette-panel {
  width: min(760px, 100%);
  border-radius: 30px;
  padding: 1rem;
  border: 1px solid rgba(148,163,184,0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,252,255,0.92));
  box-shadow: 0 32px 64px rgba(15,23,42,0.24);
}
.command-palette-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.25rem 0.9rem;
}
.command-palette-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: var(--erp-gradient-main);
}
.command-palette-input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 1rem;
  font-weight: 600;
}
.command-palette-subtitle {
  color: var(--erp-muted);
  font-size: 0.74rem;
}
.command-palette-results {
  display: grid;
  gap: 0.65rem;
  max-height: 56vh;
  overflow: auto;
  padding-right: 0.25rem;
}
.command-result {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0.95rem;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(148,163,184,0.12);
  background: rgba(255,255,255,0.72);
}
.command-result:hover,
.command-result.active {
  border-color: rgba(79,70,229,0.18);
  transform: translateY(-1px);
}
.command-result-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: var(--erp-gradient-main);
}
.command-result-title {
  font-size: 0.9rem;
  font-weight: 800;
}
.command-result-meta {
  margin-top: 0.18rem;
  color: var(--erp-muted);
  font-size: 0.74rem;
}
.command-empty {
  padding: 1.1rem;
  border-radius: 22px;
  text-align: center;
  color: var(--erp-muted);
  background: rgba(148,163,184,0.08);
}

.mobile-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: var(--erp-gradient-main);
  box-shadow: 0 20px 34px rgba(79,70,229,0.26);
}

@media (max-width: 1280px) {
  .topbar-search-trigger {
    min-width: 180px;
  }
  .workspace-hero,
  .page-hero,
  .student-hero,
  .driver-hero,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .topbar {
    top: 0.7rem;
    margin-inline: 0.85rem;
  }
  .topbar-shell {
    flex-wrap: wrap;
  }
  .topbar-tools {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .settings-side .settings-panel {
    position: static;
  }
}
@media (max-width: 768px) {
  .page-content {
    padding: 0.85rem;
  }
  .topbar {
    margin-inline: 0.65rem;
    padding: 0.9rem;
    border-radius: 22px;
  }
  .topbar-search-trigger,
  .topbar-clock,
  .topbar-inline-pill {
    display: none;
  }
  .workspace-hero,
  .page-hero,
  .student-hero,
  .driver-hero {
    padding: 1.15rem;
    border-radius: 26px;
  }
  .hero-title,
  .page-title-lg {
    font-size: 1.75rem;
  }
  .launcher-grid,
  .app-tile-grid,
  .module-board,
  .settings-input-grid,
  .console-grid,
  .module-mini-grid,
  .kpi-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .settings-input-grid .full-span {
    grid-column: auto;
  }
  .mobile-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================================
   School Admin dashboard refresh overrides
   ============================================================ */
.pw-dashboard-v2 {
  display: grid;
  gap: 1.25rem;
}
.pw-surface-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.88));
  border: 1px solid rgba(255,255,255,0.58);
  border-radius: 26px;
  padding: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}
.pw-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.95fr);
  gap: 1.25rem;
}
.pw-hero-card {
  padding: 1.45rem;
  position: relative;
  overflow: hidden;
}
.pw-hero-card::before {
  content: '';
  position: absolute;
  inset: auto -100px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(79,70,229,0.16), transparent 62%);
  pointer-events: none;
}
.pw-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(79,70,229,0.08);
  color: #4338ca;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pw-hero-title-lg {
  margin-top: 0.95rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 900;
  color: #0f172a;
}
.pw-hero-copy {
  margin-top: 0.7rem;
  max-width: 58ch;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.7;
}
.pw-hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}
.pw-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  border-radius: 16px;
  background: rgba(248,250,252,0.95);
  border: 1px solid rgba(148,163,184,0.16);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
}
.pw-meta-pill i { color: #f97316; }
.pw-hero-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pw-hero-side-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pw-side-header,
.pw-card-head-v2 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.pw-card-head-wrap {
  flex-wrap: wrap;
}
.pw-side-title,
.pw-card-title-v2 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}
.pw-side-subtitle,
.pw-card-subtitle-v2 {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.78rem;
}
.pw-mini-link,
.pw-view-link {
  color: #4f46e5;
  font-size: 0.78rem;
  font-weight: 700;
}
.pw-mini-stacked {
  display: grid;
  gap: 0.9rem;
}
.pw-mini-progress-card {
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148,163,184,0.14);
}
.pw-mini-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}
.pw-mini-progress-top strong {
  color: #0f172a;
  font-size: 0.98rem;
}
.pw-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.pw-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
}
.pw-progress-violet span { background: linear-gradient(90deg, #8b5cf6, #ec4899); }
.pw-mini-progress-meta {
  margin-top: 0.6rem;
  color: #64748b;
  font-size: 0.75rem;
}
.pw-mini-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.pw-side-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 54px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(6,182,212,0.07));
  border: 1px solid rgba(79,70,229,0.08);
  color: #0f172a;
  font-weight: 700;
}
.pw-side-tile i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}
.pw-stat-grid-v2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.pw-stat-card-v2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-height: 120px;
  padding: 1rem 1.05rem;
  border-radius: 24px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
.pw-stat-card-v2::after {
  content: '';
  position: absolute;
  right: -22px;
  top: -22px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}
.pw-stat-card-v2.tone-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.pw-stat-card-v2.tone-emerald { background: linear-gradient(135deg, #10b981, #14b8a6); }
.pw-stat-card-v2.tone-violet { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.pw-stat-card-v2.tone-amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.pw-stat-card-v2.tone-rose { background: linear-gradient(135deg, #ef4444, #fb7185); }
.pw-stat-card-v2.tone-cyan { background: linear-gradient(135deg, #0891b2, #38bdf8); }
.pw-stat-card-v2.tone-pink { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.pw-stat-card-v2.tone-slate { background: linear-gradient(135deg, #334155, #0f172a); }
.pw-stat-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255,255,255,0.16);
  font-size: 1.2rem;
}
.pw-stat-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.2rem;
}
.pw-stat-copy span {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.9;
  text-transform: uppercase;
}
.pw-stat-copy strong {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.pw-stat-copy small {
  font-size: 0.76rem;
  opacity: 0.9;
}
.pw-dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
  gap: 1.25rem;
}
.pw-dashboard-main-column,
.pw-dashboard-side-column,
.pw-dashboard-bottom-grid {
  display: grid;
  gap: 1.25rem;
}
.pw-chip-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.pw-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.pw-chip.success {
  background: rgba(16,185,129,0.1);
  color: #047857;
}
.pw-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.9fr);
  gap: 1rem;
  margin-top: 1rem;
}
.pw-chart-card,
.pw-chart-mini-card {
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148,163,184,0.14);
}
.pw-chart-headline {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.8rem;
}
.pw-chart-headline span {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 800;
}
.pw-chart-headline small {
  color: #64748b;
  font-size: 0.74rem;
}
.pw-chart-wrap {
  position: relative;
  min-height: 340px;
}
.pw-chart-mini-wrap {
  position: relative;
  min-height: 210px;
}
.pw-chart-stack {
  display: grid;
  gap: 1rem;
}
.pw-chart-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248,250,252,0.9), rgba(241,245,249,0.82));
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  z-index: 1;
}
.pw-chart-wrap canvas,
.pw-chart-mini-wrap canvas {
  position: relative;
  z-index: 2;
}
.pw-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
  margin-top: 1rem;
}
.pw-quick-action {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 86px;
  padding: 0.95rem 1rem;
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,0.14);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pw-quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15,23,42,0.08);
}
.pw-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  flex-shrink: 0;
}
.pw-quick-action.tone-emerald .pw-quick-icon { background: linear-gradient(135deg, #10b981, #14b8a6); }
.pw-quick-action.tone-violet .pw-quick-icon { background: linear-gradient(135deg, #8b5cf6, #4f46e5); }
.pw-quick-action.tone-rose .pw-quick-icon { background: linear-gradient(135deg, #ef4444, #fb7185); }
.pw-quick-action.tone-cyan .pw-quick-icon { background: linear-gradient(135deg, #0891b2, #38bdf8); }
.pw-quick-action.tone-amber .pw-quick-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.pw-quick-action.tone-blue .pw-quick-icon { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.pw-quick-action.tone-slate .pw-quick-icon { background: linear-gradient(135deg, #475569, #0f172a); }
.pw-quick-action.tone-pink .pw-quick-icon { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.pw-quick-action.tone-teal .pw-quick-icon { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.pw-quick-action.tone-orange .pw-quick-icon { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.pw-quick-action.tone-indigo .pw-quick-icon { background: linear-gradient(135deg, #4338ca, #6366f1); }
.pw-quick-action.tone-lime .pw-quick-icon { background: linear-gradient(135deg, #65a30d, #10b981); }
.pw-quick-text { display: grid; gap: 0.18rem; }
.pw-quick-text strong {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 800;
}
.pw-quick-text small {
  color: #64748b;
  font-size: 0.72rem;
}
.pw-table-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pw-table-search {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 250px;
  padding: 0.72rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.18);
  background: #fff;
  color: #64748b;
}
.pw-table-search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  font-size: 0.82rem;
  color: #0f172a;
}
.pw-export-group {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.pw-side-widget {
  padding: 1.1rem;
}
.pw-card-head-v2.compact { margin-bottom: 0.9rem; }
.pw-attendance-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.pw-attendance-pill {
  padding: 0.9rem;
  border-radius: 18px;
  display: grid;
  gap: 0.3rem;
  text-align: center;
}
.pw-attendance-pill span {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pw-attendance-pill strong {
  font-size: 1.15rem;
  font-weight: 900;
}
.pw-attendance-pill.success { background: rgba(16,185,129,0.12); color: #047857; }
.pw-attendance-pill.danger { background: rgba(239,68,68,0.12); color: #b91c1c; }
.pw-attendance-pill.warning { background: rgba(245,158,11,0.16); color: #b45309; }
.pw-widget-list,
.pw-insight-list,
.pw-feed-list-v2 {
  display: grid;
  gap: 0.75rem;
}
.pw-widget-item,
.pw-feed-item-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148,163,184,0.12);
}
.pw-widget-item.align-start {
  align-items: flex-start;
}
.pw-widget-item strong,
.pw-feed-item-v2 strong {
  display: block;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
}
.pw-widget-item small,
.pw-feed-item-v2 small {
  display: block;
  margin-top: 0.22rem;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.5;
}
.pw-widget-item span,
.pw-feed-time {
  flex-shrink: 0;
  color: #4f46e5;
  font-size: 0.74rem;
  font-weight: 800;
}
.pw-insight-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(148,163,184,0.12);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.pw-insight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
}
.pw-insight-item strong {
  display: block;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
}
.pw-insight-item p {
  margin-top: 0.32rem;
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.65;
}
.pw-insight-item.tone-warning .pw-insight-icon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.pw-insight-item.tone-danger .pw-insight-icon { background: linear-gradient(135deg, #ef4444, #fb7185); }
.pw-insight-item.tone-info .pw-insight-icon { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.pw-insight-item.tone-success .pw-insight-icon { background: linear-gradient(135deg, #10b981, #14b8a6); }
.pw-dashboard-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pw-empty-state-alt {
  padding: 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(148,163,184,0.24);
  color: #64748b;
  text-align: center;
  font-size: 0.78rem;
}
[data-dashboard-row-hidden="true"] {
  display: none !important;
}
.sidebar-search {
  position: relative;
  z-index: 1;
  padding: 1rem 1rem 0.25rem;
}
.sidebar-search-shell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 0.9rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(148,163,184,0.12);
  color: #94a3b8;
}
.sidebar-search-shell input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 0.8rem;
}
.sidebar-search-shell input::placeholder { color: #7d92b4; }
body.theme-midnight .pw-surface-card,
body.theme-midnight .pw-chart-card,
body.theme-midnight .pw-chart-mini-card,
body.theme-midnight .pw-mini-progress-card,
body.theme-midnight .pw-widget-item,
body.theme-midnight .pw-quick-action,
body.theme-midnight .pw-insight-item,
body.theme-midnight .pw-feed-item-v2,
body.theme-midnight .pw-table-search,
body.theme-midnight .pw-side-tile {
  background: rgba(15, 23, 42, 0.86) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148,163,184,0.14) !important;
}
body.theme-midnight .pw-hero-title-lg,
body.theme-midnight .pw-card-title-v2,
body.theme-midnight .pw-side-title,
body.theme-midnight .pw-widget-item strong,
body.theme-midnight .pw-insight-item strong,
body.theme-midnight .pw-quick-text strong,
body.theme-midnight .pw-chart-headline span {
  color: #f8fafc !important;
}
body.theme-midnight .pw-card-subtitle-v2,
body.theme-midnight .pw-side-subtitle,
body.theme-midnight .pw-widget-item small,
body.theme-midnight .pw-insight-item p,
body.theme-midnight .pw-quick-text small,
body.theme-midnight .pw-hero-copy,
body.theme-midnight .pw-mini-progress-meta,
body.theme-midnight .pw-chart-headline small,
body.theme-midnight .pw-empty-state-alt {
  color: #94a3b8 !important;
}
body.theme-midnight .pw-meta-pill {
  background: rgba(15,23,42,0.76) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148,163,184,0.12) !important;
}
body.theme-midnight .pw-table-search input,
body.theme-midnight .sidebar-search-shell input {
  color: #f8fafc !important;
}
@media (max-width: 1400px) {
  .pw-stat-grid-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .pw-hero-grid,
  .pw-dashboard-main-grid,
  .pw-chart-layout,
  .pw-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .pw-stat-grid-v2,
  .pw-attendance-split,
  .pw-mini-grid-2,
  .pw-quick-grid,
  .pw-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
  .pw-hero-actions,
  .pw-table-tools,
  .pw-export-group {
    flex-direction: column;
    align-items: stretch;
  }
  .pw-table-search {
    min-width: 0;
    width: 100%;
  }
  .pw-surface-card,
  .pw-hero-card,
  .pw-side-widget {
    padding: 1rem;
    border-radius: 22px;
  }
  .topbar {
    margin: 0.75rem 0.75rem 0;
  }
  .page-content {
    padding: 1rem 0.75rem 1.5rem;
  }
}
