* { box-sizing: border-box; }
:root {
  --bg: #f1f5f9;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2f89df;
  --green-soft: #dcfce7;
  --green: #16a34a;
  --red: #dc2626;
  --shadow: 0 1px 6px rgba(14,23,38,.07);
  --shadow-md: 0 4px 14px rgba(14,23,38,.09);
  --radius: 12px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(14, 23, 38, 0.10);
  z-index: 9999;
}
.skip-link:focus{ left: 8px; outline: none; }

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.app.sidebar-hidden{
  grid-template-columns: 1fr;
}
.app.sidebar-hidden .sidebar{
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  transform: translateX(-100%);
  transition: transform .25s ease;
  border-right: 1px solid transparent;
  pointer-events: none;
}
.app.sidebar-hidden .main{
  margin-left: 0;
}

/* Partials slots should not affect layout */
#sidebarSlot,
#topbarSlot,
#footerSlot{
  display: contents;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  padding: 18px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 2px 0 8px rgba(14,23,38,.04);
}

.sidebar::-webkit-scrollbar{
  display: none;
}

.school-brand {
  display: flex;
  justify-content: center;
  padding: 4px 0 14px;
}

.school-brand img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.menu-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 10px 16px;
  margin-top: 6px;
}
.menu-group-title{
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.menu-group-title:focus{ outline: 2px solid rgba(11,132,255,.35); outline-offset: 2px; border-radius: 12px; }
.nav-list.is-collapsed{ display: none; }
.menu-group-title[aria-expanded="false"] .caret{
  transform: rotate(-45deg);
  margin-top: 2px;
}

.caret {
  border: solid #94a3b8;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 4px;
  transform: rotate(45deg);
  margin-top: -4px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.nav-link {
  text-decoration: none;
  color: #475569;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}

.nav-link:hover { background: #f1f5f9; color: #1e293b; }

.nav-link.active {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 6px rgba(14,23,38,.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  max-width: 360px;
}
.topbar-titleWrap{ min-width: 0; }
.topbar-title{
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-subtitle{
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.topbar-center{
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.top-search{
  max-width: 520px;
  min-width: 200px;
  display: flex;
}
.top-search-input{
  width: 100%;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.top-search-input:focus{
  background: #fff;
  border-color: #2f89df;
  box-shadow: 0 0 0 3px rgba(47,137,223,.1);
}

.top-actions{
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-right{ flex-shrink: 0; }

.icon-pill{
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  transition: border-color .15s;
}
.icon-pill:hover{ border-color: #cbd5e1; background: #f1f5f9; }
.icon-pill .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #aaa;
  display: inline-block;
}
.icon-pill .dot.ok{ background: #35b26f; }
.icon-pill .dot.warn{ background: #f2b04c; }

.icon-btn {
  border: none;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.icon-btn:hover{ background: rgba(0,0,0,.05); }
.icon-btn svg{ width: 20px; height: 20px; }

.icon-btn svg { width: 24px; height: 24px; }

.user-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-meta {
  text-align: right;
  line-height: 1.15;
}

.user-meta .name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.user-meta .role {
  color: #94a3b8;
  font-size: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #eaeaea;
}

.content {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2, .card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.muted {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.holiday-green {
  color: #3c8251;
  font-weight: 700;
  margin: 14px 0;
  font-size: 18px;
  line-height: 1.35;
}

.outline-btn {
  margin-top: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #8e8e8e;
  border-radius: 8px;
  background: #efefef;
  cursor: pointer;
  font-size: 16px;
}

.class-card {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 26px;
  align-items: start;
}

.attendance-icons {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 10px;
  margin: 12px 0 12px;
  max-width: 270px;
}

.person-icon {
  width: 24px;
  height: 24px;
  fill: var(--green);
}

.person-icon.red { fill: var(--red); }

.attendance-meta {
  margin-top: 12px;
  line-height: 1.25;
}

.attendance-meta .label {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

.attendance-meta .date {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}

.attendance-meta .score {
  font-size: 20px;
}

.attendance-meta .score strong {
  font-size: 52px;
  line-height: 1;
  font-weight: 500;
}

.students-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}

.student-pill {
  background: var(--green-soft);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
}

.student-pill.gray { background: #ececec; }

.student-pill img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eaeaea;
}

.student-pill .student-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.schedule-wrap {
  overflow-x: auto;
  padding-bottom: 2px;
}

.schedule-row {
  display: flex;
  gap: 16px;
  min-width: max-content;
}

.schedule-item {
  width: 280px;
  min-height: 136px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 18px 20px;
  flex-shrink: 0;
}

.schedule-item.active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.schedule-time {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 20px;
}

.teacher-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.teacher-row img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eaeaea;
}

.subject {
  font-size: 16px;
  font-weight: 700;
  color: #666;
  margin-bottom: 4px;
}

.teacher {
  font-size: 14px;
  color: #ababab;
  line-height: 1.2;
}

.footer {
  margin-top: auto;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  padding: 14px 10px 10px;
}

.footer strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: #1e293b;
}

.footer small { color: #94a3b8; font-size: 12px; }

.hidden { display: none; }

.filters{
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.field label{
  display: block;
  font-size: 13px;
  color: #777;
  margin: 0 0 6px;
}

.input{
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d7d7d7;
  background: #efefef;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus{
  background: #fff;
  border-color: #2f89df;
  box-shadow: 0 0 0 3px rgba(47,137,223,.1);
}
.input::placeholder{ color: #b1b1b1; }

.table-wrap{ overflow: auto; }

.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th,
.table td{
  border-bottom: 1px solid #e2e2e2;
  padding: 12px 10px;
  text-align: left;
  font-size: 14px;
}

.table th{
  color: #64748b;
  font-weight: 700;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.rowlink{ cursor: pointer; }
.rowlink:hover{ background: #f8fafc; }

.badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge.ok{ background: #e8f6ee; color: #1a7f3c; border-color:#ccebd7; }
.badge.warn{ background: #fff3e0; color: #a05a00; border-color:#ffe0b2; }
.badge.critical{ background: #ffe6e6; color: #b42318; border-color:#ffc5c5; }
.badge.closed{ background: #efefef; color: #666; border-color:#d8d8d8; }

.drawer-root{ position: relative; }

.drawer-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.32);
  z-index: 50;
}

.drawer{
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(520px, 94vw);
  background: #fff;
  border-left: 1px solid #e6e6e6;
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.drawer-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.drawer-title{ font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.drawer-body{ padding: 16px; overflow: auto; }

.evidence{
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
}

.evidence-ph{
  height: 180px;
  background: linear-gradient(135deg, #f3f6ff, #f7f7f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-weight: 700;
}

.evidence-meta{
  padding: 12px;
  display: grid;
  gap: 6px;
}

.drawer-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.btn{
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #475569;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover{ background: #f8fafc; border-color: #cbd5e1; }
.btn.primary{ background: #2f89df; border-color: #2f89df; color: #fff; }
.btn.primary:hover{ background: #1d77cc; border-color: #1d77cc; }
.btn.secondary{ background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
.btn.secondary:hover{ background: #e2e8f0; }
.btn.danger{ background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.btn.danger:hover{ background: #fee2e2; }

.notes{ display: grid; gap: 10px; }
.note{
  border-left: 3px solid #e5e5e5;
  padding-left: 10px;
  color: #333;
  line-height: 1.3;
}
.note-at{ font-size: 12px; color: #888; margin-bottom: 2px; }

.steps{ display: grid; gap: 10px; }
.step{
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  line-height: 1.3;
}
.step-num{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
  color: #555;
  font-weight: 900;
  font-size: 12px;
}

.camera-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.camera-tile{
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0,0,0,.03);
}
.camera-tile.offline{ opacity: .72; }

.camera-head{
  padding: 12px 12px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.camera-name{ font-weight: 800; }

.camera-feed{
  height: 130px;
  background: #f4f4f4;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-feed-ph{ color: #666; font-weight: 700; }

.camera-flags{
  padding: 10px 12px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips{ display: flex; gap: 8px; }
.chip{
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d3d3d3;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #333;
}
.chip.active{
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary);
}

.tabs{
  display: inline-flex;
  border: 1px solid #d3d3d3;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.tab-btn{
  height: 34px;
  padding: 0 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  color: #555;
}
.tab-btn.active{
  background: #eff6ff;
  color: var(--primary);
}

.timetable-wrap{ overflow: auto; }
.timetable{
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}
.timetable th,
.timetable td{
  border: 1px solid #e7e7e7;
  padding: 10px;
  vertical-align: top;
  background: #fff;
}
.timetable th{
  background: #fafafa;
  color: #666;
  font-weight: 900;
}
.timetable .sticky-col{
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fafafa;
  width: 160px;
}
.timetable .cell{ cursor: pointer; }
.timetable .cell:hover{ background: #f7faff; }
.slot{
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 10px 10px;
}
.slot.empty{
  border-style: dashed;
  color: #777;
  text-align: center;
  font-weight: 900;
}
.slot-title{ font-weight: 900; color: #222; }
.slot-sub{ color: #777; font-size: 12px; margin-top: 4px; }

.chat-layout{
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 16px;
}
.chat-left{ overflow: hidden; }
.chat-list{
  display: grid;
  gap: 8px;
}
.chat-item{
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px;
  text-align: left;
  cursor: pointer;
}
.chat-item:hover{ background: #f8fafc; }
.chat-item.active{ border-color: #bfdbfe; background: #eff6ff; }
.chat-item-title{ font-weight: 900; color: #222; }
.chat-item-sub{ color: #777; font-size: 12px; margin-top: 4px; }

.chat-right{
  display: flex;
  flex-direction: column;
  min-height: 560px;
}
.chat-head{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}
.chat-messages{
  flex: 1;
  overflow: auto;
  padding: 12px 2px;
  display: grid;
  gap: 10px;
}
.chat-bubble{
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px 10px;
  background: #fff;
  max-width: 760px;
}
.chat-bubble.teacher{ border-color:#bfdbfe; background:#eff6ff; justify-self: end; }
.chat-bubble.parent{ border-color:#e8e8e8; background:#fff; justify-self: start; }
.chat-meta{ color:#777; font-size: 12px; margin-bottom: 6px; display:flex; gap: 8px; flex-wrap: wrap; }
.chat-text{ color:#222; line-height: 1.35; }
.chat-actions{ margin-top: 8px; display:flex; gap: 8px; }
.btn.tiny{ height: 28px; padding: 0 10px; border-radius: 10px; font-size: 12px; }
.chat-compose{
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.kpi-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
}

.kpi{
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.kpi-label{ color: #64748b; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.kpi-value{ font-size: 30px; font-weight: 900; margin-top: 8px; color: #1e293b; }
.kpi-sub{ margin-top: 6px; color: #94a3b8; font-size: 12px; }
.spark{ color: var(--primary); }

.rank{ display: grid; gap: 10px; }
.rank-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}
.rank-left{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-num{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f2f2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #555;
  flex-shrink: 0;
}
.rank-name{ font-weight: 800; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bars{ display: grid; gap: 10px; }
.bar-row{
  display: grid;
  grid-template-columns: 1fr 160px 56px;
  gap: 10px;
  align-items: center;
}
.bar-label{ font-weight: 800; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track{
  height: 10px;
  border-radius: 999px;
  background: #f0f0f0;
  overflow: hidden;
  border: 1px solid #e6e6e6;
}
.bar-fill{ height: 100%; border-radius: 999px; }
.bar-fill.ok{ background: #65c18c; }
.bar-fill.warn{ background: #f2b04c; }
.bar-fill.critical{ background: #ff6b6b; }
.bar-val{ text-align: right; font-weight: 900; color: #444; }

.spark-wrap{ display: grid; gap: 10px; }
.spark-legend{ display: flex; gap: 8px; flex-wrap: wrap; }
.spark-bars{
  height: 120px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  align-items: end;
  padding: 10px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
}
.spark-bar{
  display: grid;
  gap: 2px;
  align-items: end;
  height: 100%;
}
.spark-col{
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  min-height: 2px;
}
.spark-col.count{ background: rgba(242, 176, 76, 0.75); }
.spark-col.rate{ background: rgba(101, 193, 140, 0.85); }

.overview-atmosphere{
  position: relative;
  display: grid;
  gap: 22px;
  padding: 10px 2px 18px;
  isolation: isolate;
}

.overview-dark-shell::before{
  content: "";
  position: absolute;
  inset: -28px -34px -34px;
  border-radius: 36px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18) 0%, rgba(34, 211, 238, 0) 26%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0) 22%),
    radial-gradient(circle at bottom right, rgba(168, 85, 247, 0.12) 0%, rgba(168, 85, 247, 0) 24%),
    linear-gradient(180deg, #07111f 0%, #091422 40%, #050c17 100%);
  border: 1px solid rgba(71, 85, 105, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 30px 60px rgba(2, 6, 23, 0.36);
  z-index: -3;
}

.overview-atmosphere-glow,
.overview-atmosphere-grid{
  position: absolute;
  pointer-events: none;
}

.overview-atmosphere-glow{
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(28px);
  z-index: -2;
}

.overview-atmosphere-glow-a{
  top: -56px;
  left: -58px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18) 0%, rgba(34, 211, 238, 0) 70%);
}

.overview-atmosphere-glow-b{
  right: -36px;
  top: 92px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0) 72%);
}

.overview-atmosphere-grid{
  inset: 8px;
  border-radius: 28px;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(160deg, rgba(0, 0, 0, 0.9), transparent 82%);
  opacity: 0.92;
  z-index: -1;
}

.overview-hero,
.overview-kpi-grid,
.overview-command-grid,
.overview-lower-grid{
  position: relative;
  z-index: 1;
}

.overview-hero{
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr);
  gap: 22px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16) 0%, rgba(34, 211, 238, 0) 24%),
    radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.16) 0%, rgba(37, 99, 235, 0) 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.92) 100%);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.34);
}

.overview-eyebrow,
.overview-panel-kicker,
.overview-hero-panel-label,
.overview-mini-note,
.overview-stat-label{
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 800;
}

.overview-eyebrow{ color: #67e8f9; margin-bottom: 12px; }
.overview-hero-title{
  margin: 0;
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: -.03em;
}
.overview-hero-text{
  margin: 14px 0 18px;
  max-width: 720px;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.7;
}
.overview-hero-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.overview-hero-side{ display: flex; }
.overview-hero-panel{
  width: 100%;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.52);
  background: linear-gradient(180deg, rgba(8, 15, 30, 0.92) 0%, rgba(2, 6, 23, 0.84) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.overview-hero-panel-label{ color: #38bdf8; }
.overview-hero-panel-value{
  margin-top: 12px;
  color: #f8fafc;
  font-size: 56px;
  font-weight: 900;
  line-height: .92;
}
.overview-hero-panel-sub{
  margin-top: 10px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
}
.overview-hero-spark{ margin-top: 18px; }
.overview-hero-meta{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.overview-hero-meta span{
  display: block;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 6px;
}
.overview-hero-meta strong{
  color: #e2e8f0;
  font-size: 16px;
}

.overview-kpi-grid-dark{
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}
.overview-stat{
  position: relative;
  overflow: hidden;
  min-height: 164px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.45);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.88) 100%);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.28);
}
.overview-stat::after{
  content: "";
  position: absolute;
  inset: auto -34px -42px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: .95;
}
.overview-stat-cyan::after{ background: radial-gradient(circle, rgba(34, 211, 238, 0.24) 0%, rgba(34, 211, 238, 0) 72%); }
.overview-stat-red::after{ background: radial-gradient(circle, rgba(248, 113, 113, 0.24) 0%, rgba(248, 113, 113, 0) 72%); }
.overview-stat-green::after{ background: radial-gradient(circle, rgba(74, 222, 128, 0.22) 0%, rgba(74, 222, 128, 0) 72%); }
.overview-stat-amber::after{ background: radial-gradient(circle, rgba(251, 191, 36, 0.24) 0%, rgba(251, 191, 36, 0) 72%); }
.overview-stat-label{ color: #67e8f9; position: relative; z-index: 1; }
.overview-stat-value{
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: #f8fafc;
  font-size: 42px;
  font-weight: 900;
  line-height: .95;
}
.overview-stat-detail{
  position: relative;
  z-index: 1;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
}

.overview-command-grid{
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .9fr);
  align-items: start;
}
.overview-rail{
  display: grid;
  gap: 20px;
}
.overview-card-dark{
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.08) 0%, rgba(34, 211, 238, 0) 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(2, 6, 23, 0.88) 100%);
  border: 1px solid rgba(71, 85, 105, 0.44);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.28);
  overflow: hidden;
}
.overview-panel-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.overview-panel-head h3,
.overview-card-dark h3{
  color: #f8fafc;
}
.overview-panel-kicker{ color: #38bdf8; margin-bottom: 6px; }
.overview-mini-note{
  color: #64748b;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(71, 85, 105, 0.42);
  padding: 8px 10px;
  border-radius: 999px;
}
.overview-panel-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.overview-card-dark .muted{ color: #94a3b8; }
.overview-card-dark .table th{
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.9);
  border-bottom-color: rgba(71, 85, 105, 0.48);
}
.overview-card-dark .table td{
  color: #e2e8f0;
  border-bottom-color: rgba(51, 65, 85, 0.7);
}
.overview-card-dark .rowlink:hover{
  background: rgba(15, 23, 42, 0.72);
}
.overview-card-dark .btn.secondary{
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(71, 85, 105, 0.7);
  color: #e2e8f0;
}
.overview-card-dark .btn.secondary:hover{
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(56, 189, 248, 0.44);
}

.overview-rank-list{
  display: grid;
  gap: 12px;
}
.overview-rank-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(9, 14, 26, 0.82);
}
.overview-rank-main{
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.overview-rank-index{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.22) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #67e8f9;
  font-weight: 900;
}
.overview-rank-name{
  color: #f8fafc;
  font-weight: 800;
  margin-bottom: 8px;
}
.overview-rank-bar{
  height: 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
}
.overview-rank-bar span,
.overview-bar-track span{
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee 0%, #3b82f6 52%, #a855f7 100%);
}
.overview-rank-row strong{
  color: #f8fafc;
  font-size: 18px;
}

.overview-action-grid{
  display: grid;
  gap: 12px;
}
.overview-action-link{
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(9, 14, 26, 0.82);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.overview-action-link:hover{
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.96);
}
.overview-action-link span{
  color: #67e8f9;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
}
.overview-action-link strong{
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.4;
}

.overview-lower-grid{
  grid-template-columns: 1.15fr .85fr;
}
.overview-bars{
  display: grid;
  gap: 14px;
}
.overview-bar-row{
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1.4fr) 48px;
  gap: 12px;
  align-items: center;
}
.overview-bar-label{
  color: #cbd5e1;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.overview-bar-track{
  height: 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.82);
}
.overview-bar-value{
  text-align: right;
  color: #f8fafc;
  font-weight: 800;
}
.overview-summary-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.overview-summary-tile{
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(51, 65, 85, 0.72);
  background: rgba(9, 14, 26, 0.82);
}
.overview-summary-tile span{
  display: block;
  color: #67e8f9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
}
.overview-summary-tile strong{
  display: block;
  margin-top: 10px;
  color: #f8fafc;
  font-size: 34px;
  line-height: .95;
}

.overview-hero .badge,
.overview-card-dark .badge{
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.overview-hero .badge.ok,
.overview-card-dark .badge.ok{
  background: rgba(22, 163, 74, 0.18);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.28);
}
.overview-hero .badge.warn,
.overview-card-dark .badge.warn{
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.28);
}
.overview-hero .badge.critical,
.overview-card-dark .badge.critical{
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
}
.overview-hero .badge.closed,
.overview-card-dark .badge.closed{
  background: rgba(71, 85, 105, 0.34);
  color: #cbd5e1;
  border-color: rgba(100, 116, 139, 0.38);
}

.overview-hero .spark-fade polyline,
.overview-hero .spark-fade polygon{
  filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.28));
}

@media (max-width: 1200px) {
  .row { grid-template-columns: 1fr; }
  .class-card { grid-template-columns: 1fr; }
  .filters{ grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .camera-grid{ grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .kpi-grid{ grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .bar-row{ grid-template-columns: 1fr; }
  .spark-bars{ height: 110px; }
  .chat-layout{ grid-template-columns: 1fr; }
  .overview-hero,
  .overview-command-grid,
  .overview-lower-grid{
    grid-template-columns: 1fr;
  }
  .overview-kpi-grid-dark{
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .students-grid { grid-template-columns: 1fr; }
  .camera-grid{ grid-template-columns: 1fr; }
  .kpi-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .top-search{ display: none; }
  .topbar-left{ max-width: none; min-width: 0; }
  .topbar-titleWrap{ display: none; }
  .user-meta .name { font-size: 15px; }
  .muted { font-size: 15px; }
  .card h2, .card h3 { font-size: 22px; }
  .attendance-meta .score strong { font-size: 40px; }
  .overview-dark-shell::before{
    inset: -12px -12px -16px;
    border-radius: 26px;
  }
  .overview-atmosphere-glow{
    width: 240px;
    height: 240px;
  }
  .overview-hero{
    padding: 20px;
  }
  .overview-hero-panel-value{
    font-size: 46px;
  }
  .overview-kpi-grid-dark,
  .overview-summary-grid{
    grid-template-columns: 1fr;
  }
  .overview-bar-row{
    grid-template-columns: 1fr;
  }
}

/* Global dark dashboard theme */
:root{
  --bg: #050c17;
  --panel: #0f172a;
  --card: #111c31;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --primary: #38bdf8;
  --green-soft: rgba(22, 163, 74, 0.18);
  --green: #4ade80;
  --red: #f87171;
  --shadow: 0 16px 32px rgba(2,6,23,.24);
  --shadow-md: 0 24px 48px rgba(2,6,23,.32);
}

html, body{
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.08) 0%, transparent 22%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08) 0%, transparent 18%),
    linear-gradient(180deg, #07111f 0%, #050c17 100%);
  color: var(--text);
}

.skip-link{
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, .35);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.34);
}

.sidebar{
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(7, 17, 31, 0.98) 100%);
  border-right: 1px solid rgba(51, 65, 85, 0.82);
  box-shadow: 8px 0 28px rgba(2, 6, 23, 0.22);
}

.menu-group-title{
  color: #64748b;
}

.menu-group-title:focus{
  outline: 2px solid rgba(56,189,248,.4);
}

.caret{
  border-color: #64748b;
}

.nav-link{
  color: #cbd5e1;
}

.nav-link:hover{
  background: rgba(30, 41, 59, 0.88);
  color: #f8fafc;
}

.nav-link.active{
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.22) 0%, rgba(59, 130, 246, 0.16) 100%);
  color: #67e8f9;
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.topbar{
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(51, 65, 85, 0.82);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(12px);
}

.topbar-title,
.user-meta .name{
  color: #f8fafc;
}

.topbar-subtitle,
.user-meta .role{
  color: #94a3b8;
}

.top-search-input,
.icon-pill{
  border-color: rgba(51, 65, 85, 0.82);
  background: rgba(2, 6, 23, 0.6);
  color: #e2e8f0;
}

.top-search-input::placeholder{
  color: #64748b;
}

.top-search-input:focus{
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}

.icon-pill:hover{
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.94);
}

.icon-btn{
  color: #cbd5e1;
}

.icon-btn:hover{
  background: rgba(255,255,255,.06);
}

.avatar{
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.65);
}

.content{
  background: transparent;
}

.card,
.kpi,
.camera-tile,
.chat-item,
.chat-bubble,
.rank-row,
.step,
.schedule-item,
.slot,
.spark-bars,
.student-pill,
.timetable th,
.timetable td{
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(2, 6, 23, 0.90) 100%);
  border-color: rgba(51, 65, 85, 0.82);
  box-shadow: var(--shadow);
}

.card h2, .card h3,
.kpi-value,
.drawer-title,
.chat-item-title,
.bar-label,
.rank-name,
.slot-title,
.camera-name,
.subject,
.footer strong{
  color: #f8fafc;
}

.muted,
.kpi-label,
.kpi-sub,
.table th,
.field label,
.chat-meta,
.note-at,
.teacher,
.slot-sub,
.topbar-subtitle{
  color: #94a3b8;
}

.holiday-green{
  color: #86efac;
}

.student-pill.gray{
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.student-pill img,
.teacher-row img{
  background: #1e293b;
  border: 1px solid rgba(71, 85, 105, 0.65);
}

.schedule-item.active,
.chat-item.active,
.chip.active,
.tab-btn.active{
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.22) 0%, rgba(59, 130, 246, 0.16) 100%);
  border-color: rgba(56, 189, 248, 0.4);
  color: #67e8f9;
}

.footer{
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(51, 65, 85, 0.82);
}

.footer small{
  color: #94a3b8;
}

.input,
.chip,
.tabs,
.tab-btn,
.btn,
.outline-btn{
  border-color: rgba(51, 65, 85, 0.82);
}

.input,
.chip,
.tabs,
.outline-btn{
  background: rgba(2, 6, 23, 0.58);
  color: #e2e8f0;
}

.input:focus{
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}

.input::placeholder{
  color: #64748b;
}

select.input{
  color: #e2e8f0;
}

textarea.input{
  padding-top: 10px;
}

.table th{
  background: rgba(15, 23, 42, 0.94);
  border-bottom-color: rgba(51, 65, 85, 0.82);
}

.table td{
  color: #e2e8f0;
  border-bottom-color: rgba(51, 65, 85, 0.72);
}

.rowlink:hover{
  background: rgba(15, 23, 42, 0.72);
}

.badge.ok{
  background: rgba(22, 163, 74, 0.18);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.28);
}
.badge.warn{
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.28);
}
.badge.critical{
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
}
.badge.closed{
  background: rgba(71, 85, 105, 0.34);
  color: #cbd5e1;
  border-color: rgba(100, 116, 139, 0.38);
}

.drawer-backdrop{
  background: rgba(2, 6, 23, 0.64);
  backdrop-filter: blur(6px);
}

.drawer{
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(7, 17, 31, 0.98) 100%);
  border-left: 1px solid rgba(51, 65, 85, 0.82);
  box-shadow: -18px 0 46px rgba(2,6,23,.42);
}

.drawer-head{
  border-bottom: 1px solid rgba(51, 65, 85, 0.72);
}

.evidence,
.camera-feed{
  border-color: rgba(51, 65, 85, 0.82);
}

.evidence-ph,
.camera-feed{
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.88));
  color: #94a3b8;
}

.btn{
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
}

.btn:hover{
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(56, 189, 248, 0.42);
}

.btn.primary{
  background: linear-gradient(180deg, #0ea5e9 0%, #2563eb 100%);
  border-color: rgba(56, 189, 248, 0.72);
  color: #fff;
}

.btn.primary:hover{
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
  border-color: rgba(103, 232, 249, 0.72);
}

.btn.secondary{
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(71, 85, 105, 0.7);
  color: #e2e8f0;
}

.btn.secondary:hover{
  background: rgba(30, 41, 59, 0.94);
}

.btn.danger{
  background: rgba(127, 29, 29, 0.32);
  border-color: rgba(239, 68, 68, 0.34);
  color: #fca5a5;
}

.btn.danger:hover{
  background: rgba(127, 29, 29, 0.5);
}

.chip{
  color: #cbd5e1;
}

.tabs{
  background: rgba(2, 6, 23, 0.58);
}

.tab-btn{
  color: #94a3b8;
}

.note{
  border-left-color: rgba(56, 189, 248, 0.42);
  color: #cbd5e1;
}

.step-num,
.rank-num{
  background: rgba(30, 41, 59, 0.94);
  color: #cbd5e1;
}

.bar-track{
  background: rgba(30, 41, 59, 0.94);
  border-color: rgba(51, 65, 85, 0.82);
}

.bar-val{
  color: #f8fafc;
}

.spark-bars{
  border-color: rgba(51, 65, 85, 0.82);
}

.chat-head,
.chat-compose{
  border-color: rgba(51, 65, 85, 0.72);
}

.chat-bubble.teacher{
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.18) 0%, rgba(59, 130, 246, 0.12) 100%);
}

.chat-bubble.parent{
  border-color: rgba(71, 85, 105, 0.7);
}

.timetable th,
.timetable .sticky-col{
  background: rgba(15, 23, 42, 0.96);
  color: #94a3b8;
}

.timetable td{
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
}

.timetable .cell:hover{
  background: rgba(30, 41, 59, 0.96);
}

.slot.empty{
  color: #94a3b8;
  border-style: dashed;
}

.camera-tile.offline{
  opacity: .78;
}

.chips{
  flex-wrap: wrap;
}

.nav-button{
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

html[data-theme="light"]{
  --bg: #f1f5f9;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2f89df;
  --green-soft: #dcfce7;
  --green: #16a34a;
  --red: #dc2626;
  --shadow: 0 1px 6px rgba(14,23,38,.07);
  --shadow-md: 0 4px 14px rgba(14,23,38,.09);
}

html[data-theme="light"],
html[data-theme="light"] body{
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .app,
html[data-theme="light"] .main,
html[data-theme="light"] .content{
  background: transparent;
}

html[data-theme="light"] .skip-link{
  background: #fff;
  color: #1e293b;
  border: none;
  box-shadow: 0 6px 16px rgba(14, 23, 38, 0.10);
}

html[data-theme="light"] .sidebar{
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 8px rgba(14,23,38,.04);
}

html[data-theme="light"] .menu-group-title{ color: #94a3b8; }
html[data-theme="light"] .caret{ border-color: #94a3b8; }
html[data-theme="light"] .nav-link{ color: #475569; }
html[data-theme="light"] .nav-link:hover{
  background: #f1f5f9;
  color: #1e293b;
}
html[data-theme="light"] .nav-link.active{
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid transparent;
  box-shadow: none;
}

html[data-theme="light"] .topbar{
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 6px rgba(14,23,38,.05);
  backdrop-filter: none;
}

html[data-theme="light"] .topbar-title,
html[data-theme="light"] .user-meta .name,
html[data-theme="light"] .card h2,
html[data-theme="light"] .card h3,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .drawer-title,
html[data-theme="light"] .chat-item-title,
html[data-theme="light"] .bar-label,
html[data-theme="light"] .rank-name,
html[data-theme="light"] .slot-title,
html[data-theme="light"] .camera-name,
html[data-theme="light"] .subject,
html[data-theme="light"] .footer strong{
  color: #1e293b;
}

html[data-theme="light"] .topbar-subtitle,
html[data-theme="light"] .user-meta .role,
html[data-theme="light"] .muted,
html[data-theme="light"] .kpi-label,
html[data-theme="light"] .kpi-sub,
html[data-theme="light"] .table th,
html[data-theme="light"] .field label,
html[data-theme="light"] .chat-meta,
html[data-theme="light"] .note-at,
html[data-theme="light"] .teacher,
html[data-theme="light"] .slot-sub{
  color: #64748b;
}

html[data-theme="light"] .top-search-input,
html[data-theme="light"] .icon-pill{
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

html[data-theme="light"] .top-search-input::placeholder{ color: #94a3b8; }
html[data-theme="light"] .top-search-input:focus{
  background: #fff;
  border-color: #2f89df;
  box-shadow: 0 0 0 3px rgba(47,137,223,.1);
}

html[data-theme="light"] .icon-pill:hover{
  border-color: #cbd5e1;
  background: #f1f5f9;
}

html[data-theme="light"] .icon-btn:hover{ background: rgba(0,0,0,.05); }
html[data-theme="light"] .avatar,
html[data-theme="light"] .student-pill img,
html[data-theme="light"] .teacher-row img{
  background: #eaeaea;
  border: none;
}

html[data-theme="light"] .footer{
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}
html[data-theme="light"] .footer small{ color: #94a3b8; }

html[data-theme="light"] .card,
html[data-theme="light"] .kpi,
html[data-theme="light"] .camera-tile,
html[data-theme="light"] .chat-item,
html[data-theme="light"] .chat-bubble,
html[data-theme="light"] .rank-row,
html[data-theme="light"] .step,
html[data-theme="light"] .schedule-item,
html[data-theme="light"] .slot,
html[data-theme="light"] .spark-bars,
html[data-theme="light"] .student-pill,
html[data-theme="light"] .timetable th,
html[data-theme="light"] .timetable td{
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: var(--shadow);
}

html[data-theme="light"] .student-pill.gray{
  background: #ececec;
}

html[data-theme="light"] .schedule-item.active,
html[data-theme="light"] .chat-item.active,
html[data-theme="light"] .chip.active,
html[data-theme="light"] .tab-btn.active{
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary);
}

html[data-theme="light"] .input,
html[data-theme="light"] .chip,
html[data-theme="light"] .tabs,
html[data-theme="light"] .outline-btn{
  background: #efefef;
  color: #1e293b;
  border-color: #d7d7d7;
}

html[data-theme="light"] .input:focus{
  background: #fff;
  border-color: #2f89df;
  box-shadow: 0 0 0 3px rgba(47,137,223,.1);
}

html[data-theme="light"] .input::placeholder{ color: #b1b1b1; }
html[data-theme="light"] select.input{ color: #1e293b; }

html[data-theme="light"] .table th{
  background: #f8fafc;
  border-bottom-color: #e2e2e2;
}
html[data-theme="light"] .table td{
  color: #1e293b;
  border-bottom-color: #e2e2e2;
}
html[data-theme="light"] .rowlink:hover{ background: #f8fafc; }

html[data-theme="light"] .badge.ok{ background: #e8f6ee; color: #1a7f3c; border-color:#ccebd7; }
html[data-theme="light"] .badge.warn{ background: #fff3e0; color: #a05a00; border-color:#ffe0b2; }
html[data-theme="light"] .badge.critical{ background: #ffe6e6; color: #b42318; border-color:#ffc5c5; }
html[data-theme="light"] .badge.closed{ background: #efefef; color: #666; border-color:#d8d8d8; }

html[data-theme="light"] .drawer-backdrop{
  background: rgba(0,0,0,.32);
  backdrop-filter: none;
}
html[data-theme="light"] .drawer{
  background: #fff;
  border-left: 1px solid #e6e6e6;
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
}
html[data-theme="light"] .drawer-head{
  border-bottom: 1px solid #eee;
}

html[data-theme="light"] .evidence,
html[data-theme="light"] .camera-feed{
  border-color: #eee;
}
html[data-theme="light"] .evidence-ph,
html[data-theme="light"] .camera-feed{
  background: linear-gradient(135deg, #f3f6ff, #f7f7f7);
  color: #666;
}

html[data-theme="light"] .btn{
  background: #fff;
  color: #475569;
  border-color: #e2e8f0;
}
html[data-theme="light"] .btn:hover{
  background: #f8fafc;
  border-color: #cbd5e1;
}
html[data-theme="light"] .btn.primary{
  background: #2f89df;
  border-color: #2f89df;
  color: #fff;
}
html[data-theme="light"] .btn.primary:hover{
  background: #1d77cc;
  border-color: #1d77cc;
}
html[data-theme="light"] .btn.secondary{
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}
html[data-theme="light"] .btn.secondary:hover{ background: #e2e8f0; }
html[data-theme="light"] .btn.danger{
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
html[data-theme="light"] .btn.danger:hover{ background: #fee2e2; }

html[data-theme="light"] .chip{ color: #333; }
html[data-theme="light"] .tabs{ background: #fff; }
html[data-theme="light"] .tab-btn{ color: #555; }
html[data-theme="light"] .note{ border-left-color: #e5e5e5; color: #333; }
html[data-theme="light"] .step-num,
html[data-theme="light"] .rank-num{
  background: #f2f2f2;
  color: #555;
}
html[data-theme="light"] .bar-track{
  background: #f0f0f0;
  border-color: #e6e6e6;
}
html[data-theme="light"] .bar-val{ color: #444; }
html[data-theme="light"] .spark-bars{ border-color: #eee; }
html[data-theme="light"] .chat-head,
html[data-theme="light"] .chat-compose{ border-color: #eee; }
html[data-theme="light"] .chat-bubble.teacher{
  border-color:#bfdbfe;
  background:#eff6ff;
}
html[data-theme="light"] .chat-bubble.parent{ border-color:#e8e8e8; }
html[data-theme="light"] .timetable th,
html[data-theme="light"] .timetable .sticky-col{
  background: #fafafa;
  color: #666;
}
html[data-theme="light"] .timetable td{
  background: #fff;
  color: #1e293b;
}
html[data-theme="light"] .timetable .cell:hover{ background: #f7faff; }
html[data-theme="light"] .slot.empty{ color: #777; }
html[data-theme="light"] .camera-tile.offline{ opacity: .72; }

html[data-theme="light"] .overview-dark-shell::before{
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.24) 0%, rgba(96, 165, 250, 0) 26%),
    radial-gradient(circle at top right, rgba(147, 197, 253, 0.26) 0%, rgba(147, 197, 253, 0) 24%),
    radial-gradient(circle at bottom left, rgba(125, 211, 252, 0.18) 0%, rgba(125, 211, 252, 0) 30%),
    linear-gradient(180deg, #eff6ff 0%, #e8f2ff 48%, #deecff 100%);
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .overview-atmosphere-glow-a{
  background: radial-gradient(circle, rgba(59, 130, 246, 0.20) 0%, rgba(59, 130, 246, 0) 70%);
}

html[data-theme="light"] .overview-atmosphere-glow-b{
  background: radial-gradient(circle, rgba(125, 211, 252, 0.22) 0%, rgba(125, 211, 252, 0) 72%);
}

html[data-theme="light"] .overview-atmosphere-grid{
  background-image: radial-gradient(rgba(255, 255, 255, 0.40) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.18), transparent 40%);
  opacity: 0.75;
}

html[data-theme="light"] .overview-hero{
  border-color: rgba(191, 219, 254, 0.56);
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0) 24%),
    radial-gradient(circle at bottom right, rgba(125, 211, 252, 0.16) 0%, rgba(125, 211, 252, 0) 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 249, 0.96) 100%);
  box-shadow: 0 24px 48px rgba(96, 165, 250, 0.12);
}

html[data-theme="light"] .overview-eyebrow,
html[data-theme="light"] .overview-panel-kicker,
html[data-theme="light"] .overview-hero-panel-label,
html[data-theme="light"] .overview-stat-label,
html[data-theme="light"] .overview-mini-note,
html[data-theme="light"] .overview-action-link span,
html[data-theme="light"] .overview-summary-tile span{
  color: #2f89df;
}

html[data-theme="light"] .overview-hero-title,
html[data-theme="light"] .overview-hero-panel-value,
html[data-theme="light"] .overview-hero-meta strong{
  color: #1e293b;
}

html[data-theme="light"] .overview-hero-text,
html[data-theme="light"] .overview-hero-panel-sub,
html[data-theme="light"] .overview-hero-meta span{
  color: #64748b;
}

html[data-theme="light"] .overview-hero-panel{
  border-color: rgba(191, 219, 254, 0.56);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 255, 0.94) 100%);
  box-shadow:
    0 18px 34px rgba(96, 165, 250, 0.10),
    0 4px 14px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .overview-stat{
  border-color: rgba(191, 219, 254, 0.56);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 255, 0.94) 100%);
  box-shadow:
    0 18px 34px rgba(96, 165, 250, 0.10),
    0 4px 14px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .overview-stat-value{
  color: #1e293b;
}

html[data-theme="light"] .overview-stat-detail{
  color: #64748b;
}

html[data-theme="light"] .overview-card-dark{
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 255, 0.94) 100%);
  border: 1px solid rgba(191, 219, 254, 0.56);
  box-shadow:
    0 18px 34px rgba(96, 165, 250, 0.10),
    0 4px 14px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .overview-card-dark h3,
html[data-theme="light"] .overview-action-link strong,
html[data-theme="light"] .overview-rank-name,
html[data-theme="light"] .overview-bar-label,
html[data-theme="light"] .overview-bar-value,
html[data-theme="light"] .overview-summary-tile strong,
html[data-theme="light"] .overview-rank-row strong{
  color: #1e293b;
}

html[data-theme="light"] .overview-card-dark .muted{
  color: #64748b;
}

html[data-theme="light"] .overview-card-dark .table th{
  background: linear-gradient(180deg, rgba(227, 238, 255, 0.92) 0%, rgba(239, 246, 255, 0.82) 100%);
  border-bottom-color: rgba(191, 219, 254, 0.5);
}

html[data-theme="light"] .overview-card-dark .table td{
  color: #1e293b;
  border-bottom-color: rgba(219, 234, 254, 0.84);
}

html[data-theme="light"] .overview-card-dark .rowlink:hover{
  background: rgba(239, 246, 255, 0.86);
}

html[data-theme="light"] .overview-card-dark .btn.secondary{
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.98) 0%, rgba(228, 238, 251, 0.92) 100%);
  border-color: rgba(191, 219, 254, 0.6);
  color: #475569;
  box-shadow: 0 10px 20px rgba(96, 165, 250, 0.08);
}

html[data-theme="light"] .overview-card-dark .btn.secondary:hover{
  background: linear-gradient(180deg, rgba(236, 244, 255, 1) 0%, rgba(220, 232, 248, 0.96) 100%);
  border-color: rgba(191, 219, 254, 0.72);
}

html[data-theme="light"] .overview-rank-row,
html[data-theme="light"] .overview-action-link,
html[data-theme="light"] .overview-summary-tile{
  background: #ffffff;
  border-color: #e2e8f0;
}

html[data-theme="light"] .overview-rank-index{
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #2f89df;
}

html[data-theme="light"] .overview-rank-bar{
  background: #e2e8f0;
}

html[data-theme="light"] .overview-bar-track{
  background: #f1f5f9;
  border-color: #e2e8f0;
}

html[data-theme="light"] .overview-hero .badge.ok{
  background: #e8f6ee;
  color: #1a7f3c;
  border-color:#ccebd7;
}

html[data-theme="light"] .overview-hero .badge.warn{
  background: #fff3e0;
  color: #a05a00;
  border-color:#ffe0b2;
}

html[data-theme="light"] .overview-hero .badge.critical{
  background: #ffe6e6;
  color: #b42318;
  border-color:#ffc5c5;
}

html[data-theme="light"] .overview-hero .badge.closed{
  background: #efefef;
  color: #666;
  border-color:#d8d8d8;
}
