:root{
  --bg:#06122a;
  --panel:#0a1a3a;
  --panel2:#061735;
  --ink:#eef5ff;
  --muted:rgba(238,245,255,.75);

  --blue:#173a86;
  --gold:#f2c400;

  --border:rgba(238,245,255,.14);
  --borderGold:rgba(242,196,0,.35);

  --shadow:0 12px 30px rgba(0,0,0,.35);
  --r:6px;
  --r2:4px;

  /* Row stripe accents */
  --rowA: rgba(242,196,0,.06);   /* gold tint */
  --rowB: rgba(23,58,134,.10);   /* blue tint */
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,var(--bg),#050b18 75%);
}

a{ color:inherit; text-decoration:none; }
.hidden{ display:none; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }

/* ===== Layout ===== */
.layout{ display:flex; min-height:100vh; }

/* â”€â”€ Sidebar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar{
  width:260px;
  min-width:260px;
  background:#050f25;
  border-right:1px solid var(--border);
  padding:14px;
  display:flex;
  flex-direction:column;
  transition: transform .25s ease, opacity .25s ease;
  z-index:200;
}

.main{
  flex:1;
  padding:18px 18px 40px;
  min-width:0;
}

/* â”€â”€ Burger button (hidden on desktop) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.burgerBtn{
  display:none;
  position:fixed;
  top:12px;
  left:12px;
  z-index:300;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--border);
  border-radius:var(--r2);
  background:#050f25;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
}
.burgerBtn span{
  display:block;
  width:20px;
  height:2px;
  background:var(--ink);
  border-radius:2px;
  transition:transform .2s, opacity .2s;
}
/* X state */
.burgerBtn.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.burgerBtn.open span:nth-child(2){ opacity:0; transform:scaleX(0); }
.burgerBtn.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* â”€â”€ Backdrop overlay (mobile only) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebarBackdrop{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:190;
  backdrop-filter:blur(1px);
}
.sidebarBackdrop.active{ display:block; }

/* â”€â”€ Mobile overrides â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media(max-width:900px){
  .layout{ flex-direction:column; }

  .burgerBtn{ display:flex; }

  /* push content down to clear burger */
  .main{ padding-top:60px; }

  .sidebar{
    position:fixed;
    top:0;
    left:0;
    height:100%;
    overflow-y:auto;
    transform:translateX(-280px);
    opacity:0;
    box-shadow:4px 0 24px rgba(0,0,0,.5);
  }
  .sidebar.open{
    transform:translateX(0);
    opacity:1;
  }
}
/* â”€â”€ Desktop: keep existing responsive grid fix â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* ===== Brand ===== */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-top:3px solid var(--gold);
  border-radius:var(--r);
  background:rgba(255,255,255,.03);
  box-shadow:var(--shadow);
}

.brand img{
  width:44px;
  height:44px;
  background:#fff;
  padding:4px;
  border-radius:4px;
  object-fit:contain;
}

.brand .title{ font-weight:800; }
.brand .sub{ font-size:12px; color:var(--muted); }

/* ===== Nav ===== */
.nav{ margin-top:12px; display:grid; gap:8px; }

.nav a{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--r2);
  background:rgba(255,255,255,.03);
  display:flex;
  gap:10px;
  align-items:center;
}

.nav a.active{
  border-color:rgba(242,196,0,.7);
  box-shadow:0 0 0 3px rgba(242,196,0,.12);
}

/* ===== Cards ===== */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-top:3px solid var(--gold);
  border-radius:var(--r);
  padding:14px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}

.headerRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

h1{ font-size:18px; margin:0; }

/* ===== Forms ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

label{
  display:grid;
  gap:4px;
  font-size:12px;
}

input, select, button{
  background:var(--panel2);
  border:1px solid var(--borderGold);
  color:var(--ink);
  padding:8px 10px;
  border-radius:var(--r2);
}

button{ cursor:pointer; font-weight:700; }

button.primary{
  background:var(--gold);
  color:#0b1f45;
}

button.secondary{
  background:var(--blue);
  border-color:rgba(238,245,255,.18);
}

.actions{
  display:flex;
  gap:8px;
  margin-top:10px;
  flex-wrap:wrap;
}

.msg{
  margin-top:10px;
  padding:8px 10px;
  border-radius:var(--r2);
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  font-size:12px;
}
.msg.ok{ border-color:rgba(100,255,170,.45); }
.msg.bad{ border-color:rgba(255,130,130,.45); }

/* ===== Tables ===== */
.tableScroll{
  border:1px solid var(--border);
  border-radius:var(--r);
}

table{
  width:100%;
  border-collapse:collapse;
  background:var(--panel2);
}

/* =========================
   MONTH GRID (fix widths + centering + week divider)
   ========================= */
.monthTable{
  table-layout:fixed;      /* required so widths obey */
  width:100%;
}

.monthTable thead th{
  background:#0b1f45;
  border-bottom:2px solid var(--gold);
  padding:6px;
  font-size:12px;
  text-align:center;
  position:sticky;
  top:0;
  z-index:4;
}

.monthTable tbody td{
  border-bottom:1px solid rgba(238,245,255,.08);
  padding:2px;
  text-align:center;
  font-size:12px;
}

/* Day headers */
.monthTable th.dayHead{
  width:36px;
  padding:4px 2px;
  font-size:11px;
}

.monthTable th.dayHead .wh{ font-weight:800; }
.monthTable th.dayHead .dn{ opacity:.85; }

/* ===== # column (MINIMAL) ===== */
.monthTable th.stickyCol,
.monthTable td.stickyCol{
  width:34px !important;
  min-width:34px !important;
  max-width:34px !important;
  text-align:center;
  padding:4px 2px !important;
}

/* ===== Name column (SMALLER + wraps) ===== */
.monthTable th.stickyCol2,
.monthTable td.stickyCol2{
  width:210px !important;
  min-width:210px !important;
  max-width:210px !important;
  text-align:left !important;
  padding:4px 6px !important;
  white-space:normal;
  line-height:1.15;
  overflow-wrap:anywhere;
}

/* Sticky column positioning */
.stickyCol{
  position:sticky;
  left:0;
  z-index:6;
  background:#061735;
}

.stickyCol2{
  position:sticky;
  left:34px;              /* MUST match stickyCol width */
  z-index:6;
  background:#061735;
}

/* Clickable name */
.nameBtn{
  cursor:pointer;
  padding:2px 4px;
  border-radius:4px;
  display:inline-block;
}
.nameBtn:hover{ background:rgba(242,196,0,.10); }

/* ===== Alternating row colors (readability) ===== */
.monthTable tbody tr:nth-child(odd){
  background: var(--rowA);
}
.monthTable tbody tr:nth-child(even){
  background: var(--rowB);
}

/* hover */
.monthTable tbody tr:hover{
  background: rgba(242,196,0,.12);
}

/* Selected row */
.monthTable tbody tr.rowSelected{
  background:rgba(242,196,0,.20) !important;
  outline:2px solid rgba(242,196,0,.55);
  outline-offset:-2px;
}

/* ===== Tick/A button PERFECTLY centered ===== */
.cellBtn{
  width:18px;
  height:18px;
  border-radius:3px;
  border:1px solid rgba(238,245,255,.2);
  background:rgba(255,255,255,.04);

  display:flex;
  align-items:center;
  justify-content:center;

  font-weight:900;
  font-size:11px;
  line-height:1;
  padding:0;
  margin:0 auto;
}

.cellBtn.absent{
  background:rgba(242,196,0,.25);
  border-color:rgba(242,196,0,.7);
  color:#f2c400;
}

/* ===== Week divider line (after Fridays) ===== */
.weekSep{
  border-right:3px solid rgba(242,196,0,.75) !important;
}

/* Keep divider visible on header too */
.monthTable th.weekSep{
  border-right:3px solid rgba(242,196,0,.85) !important;
}

/* ===== Responsive ===== */
@media (max-width:900px){
  .grid{ grid-template-columns:1fr; }

  .monthTable th.stickyCol2,
  .monthTable td.stickyCol2{
    width:170px !important;
    min-width:170px !important;
    max-width:170px !important;
  }
}
/* =========================
   STUDENT DETAILS TABLE
   Alternating row colours
   ========================= */

/* Base background */
#tbl{
  background: var(--panel2);
}

/* Gold / blue alternating rows */
#tbl tbody tr:nth-child(odd){
  background: rgba(242,196,0,.07); /* gold tint */
}

#tbl tbody tr:nth-child(even){
  background: rgba(23,58,134,.12); /* blue tint */
}

/* Hover highlight */
#tbl tbody tr:hover{
  background: rgba(242,196,0,.18);
}

/* Keep text readable */
#tbl td{
  color: var(--ink);
}
/* Thin gold line between each student */
#tbl tbody tr{
  border-bottom: 1px solid rgba(242,196,0,.35);
}

/* Remove divider after last row */
#tbl tbody tr:last-child{
  border-bottom: none;
}
/* =========================
   TRACKER (WEEK) â€“ Student cards, left absences + right contact
   ========================= */

.cardsStack{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.studentCard{
  border: 1px solid rgba(238,245,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

.studentCard.needsGlow{
  border-color: rgba(242,196,0,.70);
  box-shadow:
    0 0 0 3px rgba(242,196,0,.12),
    0 12px 30px rgba(0,0,0,.35);
}

.studentCardHeader{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.studentCardName{
  font-weight: 900;
  font-size: 14px;
}

/* Default split */
.studentCardSplit{
  display:grid;
  gap: 12px;
  align-items: start;
}

/* NEW: left table = 1/3, right panel = 2/3 */
.studentCardSplit.thirdLeft{
  grid-template-columns: 1fr 2fr;
}

/* Right contact panel */
.rightPane{
  border: 1px solid rgba(238,245,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  padding: 10px;
}

/* Info rows */
.infoGroupTitle{
  margin-top: 8px;
  font-weight: 900;
  font-size: 12px;
  opacity: .95;
}

.infoRow{
  display:grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 6px;
}

.infoLabel{ color: rgba(238,245,255,.75); }

/* Guardian 1 & 2 side-by-side */
.guardianGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.guardianBox{
  border: 1px solid rgba(238,245,255,.10);
  border-radius: 10px;
  background: rgba(6,23,53,.35);
  padding: 8px;
}

/* Mini table */
.miniTableWrap{
  border: 1px solid rgba(238,245,255,.10);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(6,23,53,.75);
}

.miniTable{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.miniTable thead th{
  background: rgba(11,31,69,.95);
  border-bottom: 1px solid rgba(242,196,0,.65);
  padding: 6px;
  font-size: 11px;
  text-align:left;
}

.miniTable tbody td{
  padding: 6px;
  font-size: 12px;
  border-bottom: 1px solid rgba(238,245,255,.08);
  vertical-align: top;
}

.miniTable tbody tr:last-child td{ border-bottom:none; }

/* rows needing attention */
.miniTable tbody tr.rowNeeds{
  background: rgba(242,196,0,.12);
}

.miniTable button{
  padding: 6px 8px;
  font-size: 12px;
}

/* Responsive */
@media (max-width: 980px){
  .studentCardSplit.thirdLeft{
    grid-template-columns: 1fr;
  }
  .guardianGrid{
    grid-template-columns: 1fr;
  }
}
/* ===== Student Details table: alternate rows + thin yellow line ===== */
#tbl tbody tr:nth-child(odd){
  background: rgba(23,58,134,.18); /* blue tint */
}
#tbl tbody tr:nth-child(even){
  background: rgba(242,196,0,.06); /* gold tint */
}

/* thin yellow separator between entries */
#tbl tbody td{
  border-bottom: 1px solid rgba(242,196,0,.35) !important;
}
/* =========================
   MODAL POPUP (CENTERED)
   ========================= */

.modalBackdrop{
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px;
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(2px);
}

.modal{
  width: min(760px, 100%);
  max-height: 85vh;
  overflow: auto;

  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.modalHeader{
  position: sticky;
  top: 0;
  z-index: 2;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  padding: 12px;
  border-bottom: 1px solid rgba(238,245,255,.10);
  background: rgba(6,23,53,.92);
}

.modalTitle{
  font-weight: 900;
  font-size: 16px;
}

.modalBody{
  padding: 12px;
}

/* Optional: make the header buttons tighter */
.modalHeader .actions{
  margin: 0 !important;
  gap: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Make "Delete" look dangerous */
#modalDelete{
  border-color: rgba(255,130,130,.55) !important;
}

/* Ensure hidden works */
.hidden{ display:none !important; }
/* ===== Discipline page split layout ===== */
.discSplit{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
}

.discLeft{
  border: 1px solid rgba(238,245,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  padding: 10px;
}

.discRight{
  border: 1px solid rgba(238,245,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  padding: 10px;
}

.discList{
  display:grid;
  gap:8px;
  max-height: 520px;
  overflow:auto;
  padding-right: 6px;
}

.discItem{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border:1px solid rgba(238,245,255,.14);
  border-radius: 8px;
  background: rgba(6,23,53,.55);
}

.discItem.active{
  border-color: rgba(242,196,0,.75);
  box-shadow: 0 0 0 3px rgba(242,196,0,.10);
}

textarea{
  width:100%;
  background: var(--panel2);
  border:1px solid var(--borderGold);
  color: var(--ink);
  border-radius: var(--r2);
  padding: 8px 10px;
  resize: vertical;
}

/* Modal base (if not already in your CSS) */
.modalBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999;
}
.modal{
  width:min(720px, 92vw);
  background: var(--panel);
  border:1px solid var(--border);
  border-top:3px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modalHeader{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding: 12px;
  border-bottom: 1px solid rgba(238,245,255,.10);
  background: rgba(255,255,255,.03);
}
.modalTitle{
  font-weight:900;
  font-size: 14px;
}
.modalBody{
  padding: 12px;
}
/* =========================================================
   SHARED SIDEBAR / HAMBURGER
   Only hide/show when burger is clicked.
   No auto-hide by itself.
   ========================================================= */
:root{
  --bg:#06122a;
  --panel:#0a1a3a;
  --panel2:#061735;
  --ink:#eef5ff;
  --muted:rgba(238,245,255,.75);

  --blue:#173a86;
  --gold:#f2c400;

  --border:rgba(238,245,255,.14);
  --borderGold:rgba(242,196,0,.35);

  --shadow:0 12px 30px rgba(0,0,0,.35);
  --r:6px;
  --r2:4px;

  --rowA: rgba(242,196,0,.06);
  --rowB: rgba(23,58,134,.10);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,var(--bg),#050b18 75%);
}

a{ color:inherit; text-decoration:none; }
.hidden{ display:none; }
.muted{ color:var(--muted); }
.small{ font-size:12px; }

/* ===== Layout ===== */
.layout{
  display:flex;
  min-height:100vh;
  transition:grid-template-columns .2s ease;
}

/* ===== Sidebar ===== */
.sidebar{
  width:260px;
  min-width:260px;
  background:#050f25;
  border-right:1px solid var(--border);
  padding:14px;
  display:flex;
  flex-direction:column;
  transition: width .25s ease, min-width .25s ease, transform .25s ease, opacity .25s ease;
  z-index:200;
}

.sidebar.collapsed{
  width:0;
  min-width:0;
  padding:14px 0;
  overflow:hidden;
  border-right:none;
}

.main{
  flex:1;
  padding:18px 18px 40px;
  min-width:0;
  transition: margin-left .25s ease;
}

.layout.sidebar-collapsed .main{
  flex:1;
}

/* ===== Burger button: ALWAYS visible ===== */
.burgerBtn{
  display:flex;
  position:fixed;
  top:12px;
  left:12px;
  z-index:300;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--border);
  border-radius:var(--r2);
  background:#050f25;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
}

.burgerBtn span{
  display:block;
  width:20px;
  height:2px;
  background:var(--ink);
  border-radius:2px;
}

/* no X animation */
.burgerBtn.open span:nth-child(1),
.burgerBtn.open span:nth-child(2),
.burgerBtn.open span:nth-child(3){
  transform:none;
  opacity:1;
}

/* ===== Backdrop overlay ===== */
.sidebarBackdrop{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  z-index:190;
  backdrop-filter:blur(1px);
}
.sidebarBackdrop.active{ display:block; }

/* ===== Desktop spacing for burger ===== */
@media(min-width:901px){
  .main{
    padding-top:18px;
  }
  .sidebar{
    position:relative;
    transform:none !important;
    opacity:1 !important;
    height:auto;
    overflow:visible;
  }
}

/* ===== Mobile ===== */
@media(max-width:900px){
  .layout{
    flex-direction:column;
  }

  .main{
    padding-top:60px;
  }

  .sidebar{
    position:fixed;
    top:0;
    left:0;
    height:100%;
    overflow-y:auto;
    transform:translateX(-280px);
    opacity:0;
    box-shadow:4px 0 24px rgba(0,0,0,.5);
  }

  .sidebar.collapsed{
    width:260px;
    min-width:260px;
    padding:14px;
    border-right:1px solid var(--border);
  }

  .sidebar.open{
    transform:translateX(0);
    opacity:1;
  }
}

/* ===== Brand ===== */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-top:3px solid var(--gold);
  border-radius:var(--r);
  background:rgba(255,255,255,.03);
  box-shadow:var(--shadow);
}

.brand img{
  width:44px;
  height:44px;
  background:#fff;
  padding:4px;
  border-radius:4px;
  object-fit:contain;
}

.brand .title{ font-weight:800; }
.brand .sub{ font-size:12px; color:var(--muted); }

/* ===== Nav ===== */
.nav{ margin-top:12px; display:grid; gap:8px; }

.nav a{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--r2);
  background:rgba(255,255,255,.03);
  display:flex;
  gap:10px;
  align-items:center;
}

.nav a.active{
  border-color:rgba(242,196,0,.7);
  box-shadow:0 0 0 3px rgba(242,196,0,.12);
}

/* ===== Cards ===== */
.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-top:3px solid var(--gold);
  border-radius:var(--r);
  padding:14px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}

.headerRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}

h1{ font-size:18px; margin:0; }

/* ===== Forms ===== */
.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

label{
  display:grid;
  gap:4px;
  font-size:12px;
}

input, select, button{
  background:var(--panel2);
  border:1px solid var(--borderGold);
  color:var(--ink);
  padding:8px 10px;
  border-radius:var(--r2);
}

button{ cursor:pointer; font-weight:700; }

button.primary{
  background:var(--gold);
  color:#0b1f45;
}

button.secondary{
  background:var(--blue);
  border-color:rgba(238,245,255,.18);
}

.actions{
  display:flex;
  gap:8px;
  margin-top:10px;
  flex-wrap:wrap;
}

.msg{
  margin-top:10px;
  padding:8px 10px;
  border-radius:var(--r2);
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  font-size:12px;
}
.msg.ok{ border-color:rgba(100,255,170,.45); }
.msg.bad{ border-color:rgba(255,130,130,.45); }

/* ===== Tables ===== */
.tableScroll{
  border:1px solid var(--border);
  border-radius:var(--r);
}

table{
  width:100%;
  border-collapse:collapse;
  background:var(--panel2);
}

/* =========================
   MONTH GRID
   ========================= */
.monthTable{
  table-layout:fixed;
  width:100%;
}

.monthTable thead th{
  background:#0b1f45;
  border-bottom:2px solid var(--gold);
  padding:6px;
  font-size:12px;
  text-align:center;
  position:sticky;
  top:0;
  z-index:4;
}

.monthTable tbody td{
  border-bottom:1px solid rgba(238,245,255,.08);
  padding:2px;
  text-align:center;
  font-size:12px;
}

.monthTable th.dayHead{
  width:36px;
  padding:4px 2px;
  font-size:11px;
}

.monthTable th.dayHead .wh{ font-weight:800; }
.monthTable th.dayHead .dn{ opacity:.85; }

.monthTable th.stickyCol,
.monthTable td.stickyCol{
  width:34px !important;
  min-width:34px !important;
  max-width:34px !important;
  text-align:center;
  padding:4px 2px !important;
}

.monthTable th.stickyCol2,
.monthTable td.stickyCol2{
  width:210px !important;
  min-width:210px !important;
  max-width:210px !important;
  text-align:left !important;
  padding:4px 6px !important;
  white-space:normal;
  line-height:1.15;
  overflow-wrap:anywhere;
}

.stickyCol{
  position:sticky;
  left:0;
  z-index:6;
  background:#061735;
}

.stickyCol2{
  position:sticky;
  left:34px;
  z-index:6;
  background:#061735;
}

.nameBtn{
  cursor:pointer;
  padding:2px 4px;
  border-radius:4px;
  display:inline-block;
}
.nameBtn:hover{ background:rgba(242,196,0,.10); }

.monthTable tbody tr:nth-child(odd){
  background: var(--rowA);
}
.monthTable tbody tr:nth-child(even){
  background: var(--rowB);
}

.monthTable tbody tr:hover{
  background: rgba(242,196,0,.12);
}

.monthTable tbody tr.rowSelected{
  background:rgba(242,196,0,.20) !important;
  outline:2px solid rgba(242,196,0,.55);
  outline-offset:-2px;
}

.cellBtn{
  width:18px;
  height:18px;
  border-radius:3px;
  border:1px solid rgba(238,245,255,.2);
  background:rgba(255,255,255,.04);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:11px;
  line-height:1;
  padding:0;
  margin:0 auto;
}

.cellBtn.absent{
  background:rgba(242,196,0,.25);
  border-color:rgba(242,196,0,.7);
  color:#f2c400;
}

.weekSep{
  border-right:3px solid rgba(242,196,0,.75) !important;
}
.monthTable th.weekSep{
  border-right:3px solid rgba(242,196,0,.85) !important;
}

@media (max-width:900px){
  .grid{ grid-template-columns:1fr; }

  .monthTable th.stickyCol2,
  .monthTable td.stickyCol2{
    width:170px !important;
    min-width:170px !important;
    max-width:170px !important;
  }
}

#tbl{
  background: var(--panel2);
}

#tbl tbody tr:nth-child(odd){
  background: rgba(23,58,134,.18);
}

#tbl tbody tr:nth-child(even){
  background: rgba(242,196,0,.06);
}

#tbl tbody tr:hover{
  background: rgba(242,196,0,.18);
}

#tbl td{
  color: var(--ink);
}

#tbl tbody tr{
  border-bottom: 1px solid rgba(242,196,0,.35);
}

#tbl tbody tr:last-child{
  border-bottom: none;
}

#tbl tbody td{
  border-bottom: 1px solid rgba(242,196,0,.35) !important;
}

.cardsStack{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.studentCard{
  border:1px solid rgba(238,245,255,.14);
  border-radius:10px;
  background:rgba(255,255,255,.03);
  padding:12px;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
}

.studentCard.needsGlow{
  border-color: rgba(242,196,0,.70);
  box-shadow:
    0 0 0 3px rgba(242,196,0,.12),
    0 12px 30px rgba(0,0,0,.35);
}

.studentCardHeader{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.studentCardName{
  font-weight: 900;
  font-size: 14px;
}

.studentCardSplit{
  display:grid;
  gap:12px;
  align-items:start;
}

.studentCardSplit.thirdLeft{
  grid-template-columns: 1fr 2fr;
}

.rightPane{
  border:1px solid rgba(238,245,255,.12);
  border-radius:10px;
  background:rgba(255,255,255,.03);
  padding:10px;
}

.infoGroupTitle{
  margin-top:8px;
  font-weight:900;
  font-size:12px;
  opacity:.95;
}

.infoRow{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:8px;
  font-size:12px;
  line-height:1.2;
  margin-top:6px;
}

.infoLabel{ color: rgba(238,245,255,.75); }

.guardianGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:10px;
}

.guardianBox{
  border:1px solid rgba(238,245,255,.10);
  border-radius:10px;
  background:rgba(6,23,53,.35);
  padding:8px;
}

.miniTableWrap{
  border:1px solid rgba(238,245,255,.10);
  border-radius:8px;
  overflow:hidden;
  background:rgba(6,23,53,.75);
}

.miniTable{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.miniTable thead th{
  background:rgba(11,31,69,.95);
  border-bottom:1px solid rgba(242,196,0,.65);
  padding:6px;
  font-size:11px;
  text-align:left;
}

.miniTable tbody td{
  padding:6px;
  font-size:12px;
  border-bottom:1px solid rgba(238,245,255,.08);
  vertical-align:top;
}

.miniTable tbody tr:last-child td{ border-bottom:none; }

.miniTable tbody tr.rowNeeds{
  background: rgba(242,196,0,.12);
}

.miniTable button{
  padding:6px 8px;
  font-size:12px;
}

@media (max-width: 980px){
  .studentCardSplit.thirdLeft{
    grid-template-columns:1fr;
  }
  .guardianGrid{
    grid-template-columns:1fr;
  }
}

.modalBackdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.60);
  backdrop-filter:blur(2px);
}

.modal{
  width:min(760px, 100%);
  max-height:85vh;
  overflow:auto;
  background:var(--panel);
  border:1px solid var(--border);
  border-top:3px solid var(--gold);
  border-radius:10px;
  box-shadow:var(--shadow);
}

.modalHeader{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border-bottom:1px solid rgba(238,245,255,.10);
  background:rgba(6,23,53,.92);
}

.modalTitle{
  font-weight:900;
  font-size:16px;
}

.modalBody{
  padding:12px;
}

.modalHeader .actions{
  margin:0 !important;
  gap:8px;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
}

#modalDelete{
  border-color:rgba(255,130,130,.55) !important;
}

.hidden{ display:none !important; }

.discSplit{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:12px;
}

.discLeft{
  border:1px solid rgba(238,245,255,.12);
  border-radius:10px;
  background:rgba(255,255,255,.03);
  padding:10px;
}

.discRight{
  border:1px solid rgba(238,245,255,.12);
  border-radius:10px;
  background:rgba(255,255,255,.03);
  padding:10px;
}

.discList{
  display:grid;
  gap:8px;
  max-height:520px;
  overflow:auto;
  padding-right:6px;
}

.discItem{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border:1px solid rgba(238,245,255,.14);
  border-radius:8px;
  background:rgba(6,23,53,.55);
}

.discItem.active{
  border-color:rgba(242,196,0,.75);
  box-shadow:0 0 0 3px rgba(242,196,0,.10);
}

textarea{
  width:100%;
  background:var(--panel2);
  border:1px solid var(--borderGold);
  color:var(--ink);
  border-radius:var(--r2);
  padding:8px 10px;
  resize:vertical;
}
/* =========================
   NAV GROUPS
   ========================= */
.nav{
  margin-top:12px;
  display:grid;
  gap:12px;
}

.navSection{
  display:grid;
  gap:8px;
  padding-top:4px;
}

.navSection + .navSection{
  border-top:1px solid rgba(242,196,0,.18);
  padding-top:12px;
}

.navSectionTitle{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(242,196,0,.85);
  padding:0 2px 2px;
}

.navSectionSolo .navSectionTitle{
  color:rgba(255,130,130,.9);
}

.nav a{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--r2);
  background:rgba(255,255,255,.03);
  display:flex;
  gap:10px;
  align-items:center;
}

.nav a.active{
  border-color:rgba(242,196,0,.7);
  box-shadow:0 0 0 3px rgba(242,196,0,.12);
}