:root {
  --app-bg: #f4f6fa;
  --app-sidebar: #0f1420;
  --app-sidebar-text: #aab3c5;
  --app-sidebar-active: #1d2638;
  --app-primary: #0d6efd;
  --app-border: #e5e9f0;
}

body {
  background: var(--app-bg);
  font-size: .925rem;
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.auth-bg {
  background: linear-gradient(135deg, #0f1420 0%, #1d2638 55%, #0d6efd 140%);
  min-height: 100vh;
}

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}

.auth-card .brand-icon.big {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--app-primary);
  color: #fff;
  font-size: 1.6rem;
}

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--app-sidebar);
  color: var(--app-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.1rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.app-sidebar .sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--app-primary);
  color: #fff;
  font-size: 1.1rem;
}

.app-sidebar .sidebar-collapse {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.app-sidebar .sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .6rem 0;
  min-width: 0;
}

.app-sidebar .nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #8b96ad;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .7rem;
  font-weight: 600;
  padding: .7rem 1.15rem .45rem;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,.04);
  background: none;
}

.app-sidebar .nav-group-toggle:hover {
  color: #fff;
}

.app-sidebar .nav-group-toggle .nav-group-chevron {
  font-size: .7rem;
  transition: transform .2s ease;
}

.app-sidebar .nav-group-toggle[aria-expanded="false"] .nav-group-chevron {
  transform: rotate(-90deg);
}

.app-sidebar .nav-group-items {
  flex-wrap: nowrap;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--app-sidebar-text);
  padding: .55rem 1.15rem;
  font-size: .9rem;
  border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,.04);
}

.app-sidebar .nav-link.active {
  color: #fff;
  background: var(--app-sidebar-active);
  border-left-color: var(--app-primary);
}

.app-sidebar .nav-link .icon {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  background: #fff;
  border-bottom: 1px solid var(--app-border);
  padding: .7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.5rem;
  flex: 1;
}

.app-footer {
  padding: .9rem 1.5rem;
  color: #8b93a7;
  font-size: .8rem;
  border-top: 1px solid var(--app-border);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}

.stat-card .card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  color: #6c757d;
  font-size: .8rem;
}

/* Dashboard, styled to match the clearer operational overview used across the suite. */
.dashboard-intro { align-items: center; margin-bottom: 1.5rem; }
.dashboard-eyebrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .35rem;
  color: #68758a;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.dashboard-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a085; box-shadow: 0 0 0 4px rgba(22,160,133,.12); }
.dashboard-title { margin: 0 0 .35rem; color: #17243a; font-size: clamp(1.7rem, 3vw, 2.25rem); font-weight: 750; letter-spacing: -.045em; }
.dashboard-subtitle { margin: 0; color: #728096; font-size: .95rem; }
.dashboard-actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.dashboard-date { display: inline-flex; align-items: center; gap: .55rem; padding: .58rem .8rem; border: 1px solid #e4e9f1; border-radius: .65rem; background: #fff; color: #526176; font-size: .84rem; font-weight: 600; }
.dashboard-actions .btn { border-radius: .65rem; padding: .6rem .9rem; font-weight: 600; box-shadow: 0 3px 8px rgba(41,83,170,.14); }
.dashboard-stat, .dashboard-panel { overflow: hidden; border: 1px solid #e7ebf2; border-radius: .9rem; box-shadow: 0 3px 12px rgba(28,43,69,.035); }
.dashboard-stat .card-body { padding: 1.15rem 1.2rem; }
.dashboard-stat-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: #758197; font-size: .74rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.dashboard-icon { display: inline-flex; width: 38px; height: 38px; flex: 0 0 38px; align-items: center; justify-content: center; border-radius: .7rem; font-size: 1.1rem; }
.icon-blue { color: #3766d2; background: #edf2ff; }
.icon-teal { color: #138b83; background: #e8f7f4; }
.icon-indigo { color: #6c59c9; background: #f0edff; }
.icon-orange { color: #c77b28; background: #fff4e7; }
.dashboard-stat-value { margin-top: .55rem; color: #17243a; font-size: 2rem; font-weight: 750; line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.dashboard-money { font-size: clamp(1.25rem, 2vw, 1.75rem); letter-spacing: -.035em; }
.dashboard-stat-note { margin-top: .4rem; color: #8994a6; font-size: .78rem; }
.dashboard-panel .card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; padding: .95rem 1.15rem; border-bottom: 1px solid #edf0f5; background: #fff; }
.dashboard-section-title { margin: 0; color: #253249; font-size: .98rem; font-weight: 700; }
.dashboard-section-note { margin-top: .22rem; color: #8a95a6; font-size: .78rem; }
.dashboard-text-link { color: #476cc0; font-size: .8rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.dashboard-text-link:hover { color: #284eaa; }
.dashboard-panel .card-body { padding: 1rem 1.15rem; }
.dashboard-class-list .list-group-item { display: flex; align-items: center; gap: .75rem; min-height: 57px; padding: .75rem 1rem; border-color: #f0f2f6; }
.dashboard-class-time { min-width: 58px; padding: .32rem .42rem; border-radius: .45rem; background: #edf2ff; color: #4266b8; font-size: .77rem; font-weight: 700; text-align: center; }
.dashboard-class-name { flex: 1; color: #344158; font-weight: 600; }
.dashboard-class-capacity { color: #8994a6; font-size: .78rem; font-variant-numeric: tabular-nums; }
.dashboard-empty { display: flex; min-height: 135px; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; padding: 1rem; color: #8a95a6; font-size: .85rem; text-align: center; }
.dashboard-empty i { color: #b1bdcd; font-size: 1.5rem; }
.dashboard-health-card { display: flex; height: 100%; min-height: 132px; flex-direction: column; align-items: flex-start; justify-content: center; padding: .9rem 1rem; border: 1px solid transparent; border-radius: .75rem; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.dashboard-health-card:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(28,43,69,.08); }
.dashboard-health-label { font-size: .76rem; font-weight: 700; }
.dashboard-health-card strong { margin: .25rem 0 .05rem; font-size: 1.7rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dashboard-health-card small { font-size: .75rem; opacity: .76; }
.health-blue { border-color: #e3eaff; background: #f5f7ff; color: #4266b8; }
.health-teal { border-color: #d9f0eb; background: #f0faf7; color: #148576; }
.health-orange { border-color: #f6e8d5; background: #fff9f0; color: #b8752c; }
.health-red { border-color: #f5dfdf; background: #fff6f5; color: #b95a59; }
.dashboard-table thead th { padding: .72rem 1rem; border-bottom-color: #edf0f5; background: #fbfcfe; font-size: .68rem; }
.dashboard-table tbody td { padding: .72rem 1rem; color: #667287; vertical-align: middle; }
.dashboard-table a { color: #4266b8; text-decoration: none; }
.dashboard-table a:hover { text-decoration: underline; }
.dashboard-table .badge { font-size: .7rem; }
.dashboard-alerts .alert { border: 0; border-radius: .7rem; }

@media (max-width: 767.98px) {
  .dashboard-intro { align-items: flex-start; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .btn { flex: 1; }
  .dashboard-panel .card-header { padding: .85rem .9rem; }
  .dashboard-panel .card-body { padding: .85rem .9rem; }
}

.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6c757d;
}

.pagination-sm .page-link {
  font-size: .8rem;
}

@media (max-width: 991.98px) {
  .app-wrapper { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; position: static; }
  .app-sidebar .sidebar-collapse:not(.show) { display: none; }
  .app-sidebar .sidebar-brand { justify-content: space-between; }
}
