/* The Light Alhuda — Teaching Portal Pro
   Microsoft / Excel inspired professional design */
:root {
  --navy: #174F43;
  --navy-dark: #0F3D33;
  --copper: #C7AA63;
  --excel-green: #087F5B;
  --excel-green-dark: #065F46;
  --ms-blue: #174F43;
  --ms-blue-dark: #0F3D33;
  --red: #d13438;
  --red-dark: #a92b2e;
  --orange: #065F46;
  --purple: #0A3527;
  --bg: #FAF7EF;
  --card: #ffffff;
  --ink: #2B3A35;
  --muted: #45554D;
  --line: #E5D9B8;
  --radius: 20px;
  --shadow: 0 8px 30px rgba(15,76,58,0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "DM Sans", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ms-blue); }

/* ---------- Header ---------- */
.topbar {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff; padding: 14px 22px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  position: sticky; top: 0; z-index: 50;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--copper), #D9BC72);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: var(--navy-dark);
}
.topbar h1 { font-size: 19px; margin: 0; letter-spacing: .3px; }
.topbar .sub { font-size: 12px; opacity: .75; margin-top: 2px; }
.topbar .spacer { flex: 1; }
.topbar .datepill {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
}
.btn-logout {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn-logout:hover { background: rgba(255,255,255,.12); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---------- KPI boxes ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi {
  border-radius: var(--radius); padding: 18px; color: #fff;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.kpi .num { font-size: 34px; font-weight: 700; line-height: 1; }
.kpi .lbl { font-size: 13px; opacity: .92; margin-top: 6px; }
.kpi.blue { background: linear-gradient(135deg, #2563EB, #1E40AF); }
.kpi.green { background: linear-gradient(135deg, #16A34A, #15803D); }
.kpi.orange { background: linear-gradient(135deg, #EA580C, #C2410C); }
.kpi.purple { background: linear-gradient(135deg, #7C3AED, #6D28D9); }

/* ---------- Cards & sections ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
  border: 1px solid var(--line);
}
.card h2 {
  margin: 0 0 4px; font-size: 17px; color: var(--navy);
  display: flex; align-items: center; gap: 8px;
}
.card .hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons: proper coloured boxes ---------- */
.btn {
  border: none; border-radius: 14px; padding: 9px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; color: #fff;
  font-family: inherit; transition: transform .05s, filter .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.08); }
.btn.green { background: var(--excel-green); }
.btn.green:hover { background: var(--excel-green-dark); }
.btn.blue { background: var(--ms-blue); }
.btn.blue:hover { background: var(--ms-blue-dark); }
.btn.red { background: var(--red); }
.btn.red:hover { background: var(--red-dark); }
.btn.orange { background: var(--orange); }
.btn.navy { background: var(--navy); }
.btn.ghost { background: #FAF6EC; color: var(--navy); border: 1px solid var(--line); }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.btn.big { padding: 13px 26px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.pulse { animation: pulse 1.6s infinite; }
.btn.whatsapp { background: #25d366; }
.btn.whatsapp:hover { background: #1eb856; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(15,76,58,.5); }
  70% { box-shadow: 0 0 0 12px rgba(15,76,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,76,58,0); }
}

/* ---------- Excel-like table ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.grid th {
  background: var(--navy); color: #fff; text-align: left;
  padding: 11px 12px; font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: .4px; white-space: nowrap;
}
table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tbody tr:nth-child(even) { background: #FDFBF5; }
table.grid tbody tr:hover { background: #EAF3EC; }
.codechip {
  font-family: Consolas, monospace; font-weight: 700; font-size: 15px;
  background: #FAF6EC; border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 6px; color: var(--navy);
}
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
}
.badge.trial { background: #1F2937; color: #FFDC82; border: 1px solid #C7AA63; }
.badge.regular { background: #e2f3e9; color: var(--excel-green-dark); border: 1px solid #bfe3cd; }
.badge.present { background: #e2f3e9; color: var(--excel-green-dark); }
.badge.absent { background: #fde7e8; color: var(--red-dark); }
.badge.leave { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge.available { background: #CCFBF1; color: #0F766E; border: 1px solid #99F6E4; }
.badge.open { background: #fff4e0; color: #b26a00; border: 1px solid #f5d9a8; }
.badge.dropped { background: #E9DFC8; color: #45554D; border: 1px solid #E9DFC8; }
.badge.cancelled { background: #E9DFC8; color: #45554D; border: 1px solid #E9DFC8; }
.badge.rescheduled { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.sup-panel.red-rows tbody tr { background: #fef2f2; }
.sup-panel.red-rows h4 { color: #b91c1c; }
.badge.study { background: #E6F2EC; color: var(--ms-blue-dark); border: 1px solid #BFE3CD; text-transform: none; letter-spacing: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Active session banner ---------- */
.livebanner {
  background: linear-gradient(135deg, #0A3527, #087F5B);
  color: #fff; border-radius: var(--radius); padding: 18px 22px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 4px 18px rgba(15,76,58,.35); margin-bottom: 20px;
}
.livebanner .dot { width: 12px; height: 12px; border-radius: 50%; background: #4ade80; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.livebanner .who { font-size: 17px; font-weight: 700; }
.livebanner .kind { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.livebanner .timer {
  font-family: Consolas, monospace; font-size: 30px; font-weight: 700;
  background: rgba(0,0,0,.25); padding: 4px 18px; border-radius: 10px;
  margin-left: auto;
}

/* ---------- Login ---------- */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy) 60%, #1B6B4F); }
.logincard {
  background: #fff; border-radius: 16px; padding: 36px 34px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center;
}
.logincard .brand-mark { margin: 0 auto 12px; width: 60px; height: 60px; font-size: 28px; }
.logincard h1 { font-size: 20px; color: var(--navy); margin: 0 0 4px; }
.logincard p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.pinpad button {
  font-size: 22px; padding: 14px 0; border-radius: 10px; border: 1px solid var(--line);
  background: #FDFBF5; cursor: pointer; font-family: inherit; font-weight: 600; color: var(--navy);
}
.pinpad button:hover { background: #EAF3EC; }
.pindots { display: flex; gap: 10px; justify-content: center; margin-bottom: 6px; }
.pindots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--navy); }
.pindots span.on { background: var(--navy); }
.loginerr { color: var(--red); font-size: 13px; min-height: 20px; }

/* ---------- Modal ---------- */
.modalback {
  position: fixed; inset: 0; background: rgba(15,76,58,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100;
}
.modal {
  background: #fff; border-radius: 14px; padding: 26px; width: 100%; max-width: 480px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35); max-height: 92vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 16px; color: var(--navy); font-size: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--ms-blue); border-color: var(--ms-blue);
}
.field textarea { min-height: 74px; resize: vertical; }
.modal .btnrow { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-dark); color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; opacity: 0; transition: all .25s; z-index: 200; box-shadow: 0 8px 30px rgba(0,0,0,.3);
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: var(--excel-green-dark); }
.toast.err { background: var(--red-dark); }

/* ---------- Parent view ---------- */
.parent-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: #fff; border-radius: 16px; padding: 30px; text-align: center; margin-bottom: 20px;
}
.parent-hero h1 { margin: 6px 0 2px; font-size: 24px; }
.parent-hero p { opacity: .8; margin: 0; font-size: 14px; }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.statbox { background: #fff; border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); }
.statbox .n { font-size: 26px; font-weight: 800; color: var(--navy); }
.statbox .t { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.lessonitem { border-left: 4px solid var(--excel-green); background: #f7faf8; padding: 12px 14px; border-radius: 0 10px 10px 0; margin-bottom: 10px; }
.lessonitem .d { font-size: 12px; color: var(--muted); }
.lessonitem .ti { font-weight: 700; color: var(--navy); margin: 2px 0; }
.empty { text-align: center; color: var(--muted); padding: 26px; font-size: 14px; }

@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .statgrid { grid-template-columns: 1fr 1fr 1fr; }
  .topbar h1 { font-size: 16px; }
  .livebanner .timer { margin-left: 0; }
}

/* ---------- Office ERP shell ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; background: linear-gradient(180deg, var(--navy-dark), #0A3527);
  color: #dbe4ee; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.side-brand { padding: 20px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.1); display: flex; gap: 12px; align-items: center; }
.side-brand .brand-mark { width: 40px; height: 40px; font-size: 17px; }
.side-brand b { font-size: 15px; color: #fff; display: block; }
.side-brand small { font-size: 11px; opacity: .65; }
.sidenav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.navitem {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 13px; margin-bottom: 4px; border-radius: 9px;
  background: transparent; border: none; color: #c4d2e3; cursor: pointer;
  font-size: 14px; font-family: inherit; text-align: left; font-weight: 500;
}
.navitem:hover { background: rgba(255,255,255,.07); color: #fff; }
.navitem.active { background: var(--ms-blue); color: #fff; font-weight: 600; }
.navitem .ico { width: 22px; text-align: center; font-size: 16px; }
.navitem .nbadge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  min-width: 20px; height: 20px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; padding: 0 6px; font-weight: 700;
}
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; opacity: .7; }
.main { flex: 1; min-width: 0; }
.main .topbar { position: sticky; }
.content { padding: 22px; max-width: 1200px; }

/* ---------- Login tabs ---------- */
.logintabs { display: flex; gap: 8px; margin-bottom: 18px; }
.logintabs button {
  flex: 1; padding: 10px; border-radius: 9px; border: 1px solid var(--line);
  background: #F3EDDD; cursor: pointer; font-family: inherit; font-weight: 600;
  color: var(--navy); font-size: 14px;
}
.logintabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- HR components ---------- */
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkcard {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: linear-gradient(135deg, #FDFBF5, #eef2f7);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.checkcard .big-time { font-family: Consolas, monospace; font-size: 26px; font-weight: 700; color: var(--navy); }
.slip {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.slip-head { background: var(--navy); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.slip-head b { font-size: 16px; }
.slip-body { padding: 6px 18px 14px; background: #fff; }
.slip-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.slip-row.total { font-weight: 800; font-size: 16px; color: var(--excel-green-dark); border-bottom: none; }
.slip-row .neg { color: var(--red-dark); font-weight: 600; }
.leaveitem { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; background: #fff; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.leaveitem .grow { flex: 1; min-width: 200px; }
.alertbar {
  background: #fff8e6; border: 1px solid #f0d98a; color: #8a6d00;
  border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px;
}
.alertbar b { color: #6d5600; }
.money { font-family: Consolas, monospace; font-weight: 700; white-space: nowrap; }
.shift-morning { background: #E6F2EC; color: #0F4C3A; border: 1px solid #BFE3CD; }
.shift-night { background: #2b2f4a; color: #cfd6ff; border: 1px solid #4a5180; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidenav { display: flex; overflow-x: auto; padding: 8px; }
  .navitem { white-space: nowrap; margin-bottom: 0; margin-right: 6px; }
  .side-foot { display: none; }
  .formgrid { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}

/* class-day checkboxes (student form) */
.daychecks { display: flex; gap: 8px; flex-wrap: wrap; }
.daycheck { display: flex; align-items: center; gap: 7px; background: #F3EDDD; border: 1px solid #E9DFC8; border-radius: 8px; padding: 8px 13px; cursor: pointer; font-weight: 600; font-size: 14px; color: #0F4C3A; user-select: none; }
.daycheck input { accent-color: #087F5B; width: 16px; height: 16px; cursor: pointer; }
.daycheck:has(input:checked) { background: #E6F2EC; border-color: #087F5B; color: #0A3527; }

/* Owner chat widget */
#agent-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; background: linear-gradient(135deg, #0F4C3A, #0A3527); color: #fff; border: none; border-radius: 999px; padding: 13px 20px; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 20px rgba(15,76,58,.35); }
#agent-fab:hover { transform: translateY(-2px); }
#agent-panel { position: fixed; right: 22px; bottom: 78px; z-index: 61; width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: 70vh; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #E9DFC8; }
#agent-panel.hidden { display: none; }
.agent-head { background: linear-gradient(135deg, #0F4C3A, #0A3527); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.agent-head b { font-size: 15px; }
.agent-head small { display: block; opacity: .75; font-size: 11px; }
.agent-x { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; opacity: .8; }
#agent-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #FDFBF5; }
.amsg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.amsg.bot { background: #fff; border: 1px solid #E9DFC8; align-self: flex-start; border-bottom-left-radius: 4px; color: #2B3A35; }
.amsg.user { background: #0F4C3A; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.amsg.typing { opacity: .6; }
.agent-chips { display: flex; gap: 6px; padding: 8px 12px; flex-wrap: wrap; background: #fff; border-top: 1px solid #F3EDDD; }
.agent-chips button { background: #eef2f7; border: 1px solid #E9DFC8; border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; color: #0F4C3A; font-weight: 600; }
.agent-chips button:hover { background: #E6F2EC; border-color: #087F5B; }
.agent-input { display: flex; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid #E9DFC8; }
.agent-input input { flex: 1; border: 1px solid #E9DFC8; border-radius: 999px; padding: 9px 14px; font-size: 13.5px; outline: none; }
.agent-input input:focus { border-color: #0F4C3A; }
.agent-input button { background: #087F5B; color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; font-size: 16px; cursor: pointer; flex-shrink: 0; }
@media (max-width: 640px) { #agent-panel { right: 12px; bottom: 72px; } #agent-fab { right: 12px; bottom: 14px; } }

/* Supervisor dashboard (demo-style) */
.sup-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sup-kpi { border-radius: 10px; padding: 14px 8px; text-align: center; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.sup-kpi .n { font-size: 28px; font-weight: 800; line-height: 1.1; }
.sup-kpi .l { font-size: 11.5px; opacity: .92; margin-top: 2px; }
.sup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 12px; }
.sup-panel { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #E9DFC8; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.sup-panel h4 { background: #0F4C3A; color: #fff; margin: 0; padding: 9px 12px; font-size: 13.5px; font-weight: 700; }
.sup-panel table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sup-panel th { text-align: left; padding: 6px 10px; color: #45554D; font-size: 11px; font-weight: 700; border-bottom: 1px solid #F3EDDD; background: #FDFBF5; }
.sup-panel td { padding: 6px 10px; border-bottom: 1px solid #FDFBF5; vertical-align: top; }

/* Next Class banner (supervisor / manager / teacher schedule) */
.nextclass { background: linear-gradient(90deg, #0F4C3A, #0F4C3A); color: #fff; border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(15,76,58,.25); }
.nextclass .nl { font-size: 13px; opacity: .85; font-weight: 700; letter-spacing: .4px; }
.nextclass .nn { font-size: 21px; font-weight: 800; margin-top: 3px; }
.nextclass .nt { font-size: 14.5px; opacity: .92; margin-top: 3px; }

/* Computer: bigger class-status boxes */
@media (min-width: 1000px) {
  .sup-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
  .sup-panel { border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
  .sup-panel h4 { padding: 14px 18px; font-size: 17px; }
  .sup-panel table { font-size: 15px; }
  .sup-panel th { padding: 10px 14px; font-size: 13px; }
  .sup-panel td { padding: 10px 14px; }
  .sup-panel > div { max-height: 320px !important; }
  .sup-kpi .n { font-size: 32px; }
  .sup-kpi .l { font-size: 13px; }
}

/* Student Portal boxes (desktop ERP style) */
.pgrid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (min-width: 900px) { .pgrid { grid-template-columns: 1fr 1fr; } .pbox.wide { grid-column: 1 / -1; } }
.pbox { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #E9DFC8; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.pbox > h4 { background: #0F4C3A; color: #fff; margin: 0; padding: 10px 14px; font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.pbox-b { padding: 12px 14px; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid #F3EDDD; }
.prow:last-child { border-bottom: none; }
.prow .k { color: #45554D; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.prow .v { font-weight: 700; color: var(--navy); text-align: right; font-size: 14.5px; }
.pbox table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pbox th { text-align: left; padding: 6px 10px; color: #45554D; font-size: 11px; font-weight: 700; border-bottom: 1px solid #F3EDDD; background: #FDFBF5; }
.pbox td { padding: 6px 10px; border-bottom: 1px solid #FDFBF5; vertical-align: top; }

/* Teacher self-service tiles */
.tilegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.tile { background: #FDFBF5; border: 1px solid #E9DFC8; border-radius: 12px; padding: 20px 12px; text-align: center; cursor: pointer; transition: transform .12s, box-shadow .12s; font-family: inherit; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(15,76,58,.15); border-color: #0F4C3A; }
.tile-icon { font-size: 30px; margin-bottom: 8px; }
.tile-label { font-weight: 700; font-size: 14px; color: #2B3A35; margin-bottom: 4px; }
.tile-sub { font-size: 11.5px; color: #45554D; }

/* ============ PREMIUM OWNER PORTAL (admin shell only, #px-layout) ============ */
body { font-family: "DM Sans", "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif; }
#px-layout { --px-navy: #0F4C3A; --px-slate: #0A3527; --px-royal: #0F4C3A; --px-gold: #D6B56D; --px-emerald: #087F5B; --px-red: #DC2626; --px-amber: #D97706; --px-bg: #FAF6EC; --px-muted: #45554D; --px-line: #E9DFC8; }
#px-layout .sidebar { width: 248px; background: linear-gradient(180deg, #0F4C3A, #0A3527); }
#px-layout .side-brand { padding: 20px 18px 16px; }
#px-layout .side-brand .brand-mark { background: linear-gradient(135deg, #D6B56D, #E9CE8F); color: #0F4C3A; width: 42px; height: 42px; font-size: 16px; border-radius: 11px; }
#px-layout .px-brand-text b { font-size: 15px; color: #fff; display: block; letter-spacing: .2px; }
#px-layout .px-brand-text small { font-size: 11.5px; color: #98A2B3; }
#px-layout .sidenav { padding: 12px 12px; }
#px-layout .navitem { padding: 10px 12px; border-radius: 10px; color: #B8C2D0; font-size: 14px; font-weight: 500; position: relative; }
#px-layout .navitem:hover { background: rgba(255,255,255,.07); color: #fff; }
#px-layout .navitem.active { background: rgba(15,76,58,.22); color: #fff; font-weight: 600; }
#px-layout .navitem.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #0F4C3A; }
#px-layout .navitem .nbadge { background: #DC2626; }
#px-layout .px-nav-ico { width: 20px; height: 20px; flex: none; }
#px-layout .side-foot { border-top: 1px solid rgba(255,255,255,.1); }
#px-layout .px-owner b { color: #fff; font-size: 13.5px; display: block; }
#px-layout .px-owner small { color: #98A2B3; font-size: 11.5px; }
#px-layout .main { background: #FAF6EC; }
#px-layout .content { max-width: 1240px; padding: 24px; }
#px-layout.collapsed .sidebar { width: 76px; }
#px-layout.collapsed .px-brand-text, #px-layout.collapsed .navlabel, #px-layout.collapsed .side-foot, #px-layout.collapsed .navitem .nbadge { display: none; }
#px-layout.collapsed .navitem { justify-content: center; padding: 11px 0; }
#px-layout.collapsed .side-brand { justify-content: center; padding: 20px 0 16px; }

/* ---------- Premium topbar ---------- */
.px-topbar { background: #fff !important; color: #0F4C3A; border-bottom: 1px solid #E9DFC8; box-shadow: 0 1px 4px rgba(15,76,58,.05); padding: 12px 24px; gap: 14px; flex-wrap: nowrap; }
.px-topbar h1 { color: #0F4C3A; font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.px-topbar .sub { color: #45554D; opacity: 1; font-size: 12.5px; }
.px-title { min-width: 0; }
.px-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-iconbtn { background: #FAF6EC; border: 1px solid #E9DFC8; border-radius: 10px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #2B3A35; flex: none; position: relative; }
.px-iconbtn:hover { background: #EAF3EC; border-color: #0F4C3A; color: #0F4C3A; }
.px-iconbtn svg { width: 20px; height: 20px; }
.px-burger, .px-collapse { display: none; }
.px-burger { display: none; }
.px-iconbtn .nbadge { position: absolute; top: -6px; right: -6px; background: #DC2626; color: #fff; font-size: 11px; min-width: 19px; height: 19px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 700; }
.px-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.px-search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #98A2B3; display: flex; }
.px-search-ico svg { width: 18px; height: 18px; }
.px-search input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid #E9DFC8; border-radius: 10px; font-size: 14px; font-family: inherit; background: #FFFFFF; outline: none; color: #0F4C3A; }
.px-search input:focus { border-color: #0F4C3A; background: #fff; box-shadow: 0 0 0 3px rgba(15,76,58,.12); }
.px-search-results { position: absolute; top: 46px; left: 0; right: 0; background: #fff; border: 1px solid #E9DFC8; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,76,58,.14); overflow: hidden; z-index: 80; }
.px-search-results.hidden { display: none; }
.px-sr-head { padding: 9px 14px 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #98A2B3; }
.px-sr-row { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: none; padding: 10px 14px; cursor: pointer; font-family: inherit; }
.px-sr-row:hover { background: #FAF6EC; }
.px-sr-row b { display: block; font-size: 13.5px; color: #0F4C3A; }
.px-sr-row small { color: #45554D; font-size: 12px; }
.px-sr-go { color: #0F4C3A; font-size: 12.5px; font-weight: 600; }
.px-sr-none { padding: 14px; font-size: 13.5px; color: #45554D; }
.px-profile { position: relative; flex: none; }
.px-profile-btn { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid #E9DFC8; border-radius: 10px; padding: 5px 12px 5px 5px; cursor: pointer; font-family: inherit; }
.px-profile-btn:hover { border-color: #0F4C3A; }
.px-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #0F4C3A, #0F4C3A); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.px-profile-name { font-size: 13.5px; font-weight: 600; color: #0F4C3A; }
.px-profile-menu { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid #E9DFC8; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,76,58,.14); width: 220px; overflow: hidden; z-index: 80; }
.px-profile-menu.hidden { display: none; }
.px-pm-head { padding: 14px; border-bottom: 1px solid #F3EDDD; }
.px-pm-head b { display: block; font-size: 14px; color: #0F4C3A; }
.px-pm-head small { color: #45554D; font-size: 12px; }
.px-profile-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 11px 14px; cursor: pointer; font-family: inherit; font-size: 13.5px; color: #2B3A35; }
.px-profile-menu button:hover { background: #FAF6EC; }
.px-scrim { display: none; }

/* ---------- Welcome panel ---------- */
.px-welcome { background: linear-gradient(135deg, #0F4C3A, #1B6B4F); border-radius: 16px; padding: 28px 30px; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; border-left: 4px solid #D6B56D; box-shadow: 0 4px 20px rgba(15,76,58,.12); flex-wrap: wrap; }
.px-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #D6B56D; margin-bottom: 8px; }
.px-welcome h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.px-welcome p { margin: 0; color: #C7D0DD; font-size: 14.5px; line-height: 1.55; max-width: 640px; }
.px-welcome-date { text-align: right; flex: none; }
.px-wd-day { font-size: 20px; font-weight: 700; }
.px-wd-sub { color: #98A2B3; font-size: 13px; margin-top: 3px; }

/* ---------- Sections & stat cards ---------- */
.px-section { background: #fff; border: 1px solid #E9DFC8; border-radius: 14px; padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(15,76,58,.05); }
.px-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.px-section-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: #0F4C3A; letter-spacing: -.2px; }
.px-section-head p { margin: 3px 0 0; font-size: 13px; color: #45554D; }
.px-statgrid { display: grid; gap: 12px; }
.px-statgrid-3 { grid-template-columns: repeat(3, 1fr); }
.px-statgrid-4 { grid-template-columns: repeat(4, 1fr); }
.px-stat { background: #FFFFFF; border: 1px solid #E9DFC8; border-radius: 12px; padding: 16px; transition: box-shadow .15s, transform .15s; }
.px-stat:hover { box-shadow: 0 4px 14px rgba(15,76,58,.08); transform: translateY(-1px); }
.px-stat-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--acc) 12%, #fff); color: var(--acc); margin-bottom: 10px; }
.px-stat-ico svg { width: 19px; height: 19px; }
.px-stat-num { font-size: 28px; font-weight: 700; color: #0F4C3A; line-height: 1.1; letter-spacing: -.3px; }
.px-stat-lbl { font-size: 13px; font-weight: 600; color: #2B3A35; margin-top: 3px; }
.px-stat-sub { font-size: 12px; color: #98A2B3; margin-top: 1px; }
.px-note { font-size: 12.5px; color: #98A2B3; margin: 12px 0 0; }

/* ---------- Request lists ---------- */
.px-req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.px-req-col h4 { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: #0F4C3A; }
.px-req-item { border: 1px solid #E9DFC8; border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #fff; }
.px-req-main { flex: 1; min-width: 200px; }
.px-req-main b { font-size: 14px; color: #0F4C3A; }
.px-req-main small { display: block; color: #45554D; font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
.px-req-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.px-empty { text-align: center; color: #45554D; padding: 24px; font-size: 13.5px; background: #FFFFFF; border: 1px dashed #E9DFC8; border-radius: 12px; }
.px-loading { text-align: center; color: #45554D; padding: 24px; font-size: 13.5px; }

/* ---------- Fee collection ---------- */
.px-fee-filter { display: flex; gap: 8px; }
.px-fee-filter select { padding: 8px 10px; border: 1px solid #E9DFC8; border-radius: 9px; font-size: 13.5px; font-family: inherit; background: #fff; color: #0F4C3A; cursor: pointer; }
.px-fee-topline { font-size: 14px; color: #2B3A35; margin-bottom: 14px; }
.px-fee-topline b { color: #0F4C3A; }
.px-fee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.px-fee-cur { border: 1px solid #E9DFC8; border-radius: 12px; padding: 16px; background: #FFFFFF; }
.px-fee-cur-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.px-fee-cur-head b { font-size: 15px; color: #0F4C3A; }
.px-fee-cur-head span { font-size: 12px; color: #45554D; }
.px-fee-rows div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #E9DFC8; font-size: 13.5px; }
.px-fee-rows div:last-child { border-bottom: none; }
.px-fee-rows span { color: #45554D; }
.px-fee-rows b { color: #0F4C3A; }
.px-fee-rows b.ok { color: #087F5B; }
.px-fee-rows b.warn { color: #B54708; }
.px-progress { height: 8px; background: #E9DFC8; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.px-progress span { display: block; height: 100%; background: linear-gradient(90deg, #087F5B, #12B76A); border-radius: 4px; }

/* ---------- Module grid ---------- */
.px-modulegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.px-module { background: #FFFFFF; border: 1px solid #E9DFC8; border-radius: 12px; padding: 20px 14px; text-align: center; cursor: pointer; font-family: inherit; transition: transform .12s, box-shadow .12s, border-color .12s; }
.px-module:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15,76,58,.12); border-color: #0F4C3A; background: #fff; }
.px-mod-ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #EAF3EC; color: #0F4C3A; margin-bottom: 10px; }
.px-mod-ico svg { width: 22px; height: 22px; }
.px-mod-label { display: block; font-weight: 700; font-size: 14px; color: #0F4C3A; margin-bottom: 4px; }
.px-mod-sub { display: block; font-size: 12px; color: #45554D; line-height: 1.45; }

/* ---------- Responsive (admin shell only) ---------- */
@media (max-width: 1020px) {
  .px-statgrid-4 { grid-template-columns: repeat(2, 1fr); }
  .px-req-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #px-layout .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 90; height: 100dvh; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 40px rgba(0,0,0,.25); }
  #px-layout .sidebar.open { transform: none; }
  #px-layout .sidenav { display: block; overflow-y: auto; }
  #px-layout .side-foot { display: block; }
  .px-scrim.show { display: block; position: fixed; inset: 0; background: rgba(15,76,58,.5); z-index: 85; }
  .px-burger { display: inline-flex; }
  .px-collapse { display: none; }
  #px-layout .content { padding: 16px; padding-bottom: 96px; }
  .px-topbar { flex-wrap: wrap; padding: 12px 16px; }
  .px-search { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .px-profile-name { display: none; }
  .px-profile-btn { padding: 5px; }
  .px-welcome { padding: 22px 20px; }
  .px-welcome h2 { font-size: 22px; }
  .px-welcome-date { text-align: left; }
  .px-statgrid-3 { grid-template-columns: 1fr 1fr; }
  .px-modulegrid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-width: 560px) {
  .px-statgrid-3 { grid-template-columns: 1fr; }
  .px-stat-num { font-size: 24px; }
  .px-section { padding: 16px; }
  .px-fee-filter select { flex: 1; }
}

/* ============ PREMIUM CONTENT VIEWS (admin shell only) ============ */
/* Dashboard KPI boxes: loud gradients -> clean white cards, subtle top accent */
#px-layout .kpi { background: #fff; color: #0F4C3A; border: 1px solid #E9DFC8; border-top: 3px solid #0F4C3A; box-shadow: 0 1px 3px rgba(15,76,58,.05); }
#px-layout .kpi::after { display: none; }
#px-layout .kpi.blue { background: #fff; border-top-color: #0F4C3A; }
#px-layout .kpi.green { background: #fff; border-top-color: #087F5B; }
#px-layout .kpi.orange { background: #fff; border-top-color: #C9A24B; }
#px-layout .kpi.purple { background: #fff; border-top-color: #45554D; }
#px-layout .kpi .num { color: #0F4C3A; font-size: 30px; }
#px-layout .kpi .lbl { color: #45554D; opacity: 1; font-weight: 600; }
/* Manager KPI boxes: inline colors -> white cards, gold top accent */
#px-layout .sup-kpi { background: #fff !important; color: #0F4C3A !important; border: 1px solid #E9DFC8; border-top: 3px solid #D6B56D !important; box-shadow: 0 1px 3px rgba(15,76,58,.05); }
#px-layout .sup-kpi .n { color: #0F4C3A !important; }
#px-layout .sup-kpi .l { color: #45554D !important; opacity: 1; font-weight: 600; }
/* Manager panels + Next Class banner: premium navy/gold (also fixes red-on-blue Missed header) */
#px-layout .sup-panel { border-radius: 12px; }
#px-layout .sup-panel h4 { background: #0F4C3A; color: #fff; }
#px-layout .nextclass { background: linear-gradient(135deg, #0F4C3A, #1B6B4F); border-left: 4px solid #D6B56D; box-shadow: 0 4px 20px rgba(15,76,58,.12); }
#px-layout table.grid th { background: #0F4C3A; }

/* ============ PREMIUM DESIGN SYSTEM v2 — master prompt (admin shell only) ============ */
/* Emerald accent (new brief): sidebar active, brand mark, welcome + manager accents */
#px-layout .navitem.active { background: rgba(8,127,91,.18); }
#px-layout .navitem.active::before { background: #087F5B; }
#px-layout .navitem { transition: background .15s ease, color .15s ease; }
#px-layout .sidebar { transition: width .2s ease, transform .2s ease; }
#px-layout .side-brand .brand-mark { background: linear-gradient(135deg, #C9A24B, #D9BC72); color: #0A3527; }
#px-layout .px-welcome { border-left-color: #C9A24B; }
#px-layout .nextclass { border-left-color: #C9A24B; }
#px-layout .sup-kpi { border-top-color: #C9A24B !important; }
/* Buttons: consistent size, tappable, visible focus */
#px-layout .btn { border-radius: 10px; font-weight: 600; padding: 9px 16px; transition: background .15s ease, box-shadow .15s ease, transform .05s ease; }
#px-layout .btn:active { transform: translateY(1px); }
#px-layout .btn.small { min-height: 34px; padding: 7px 11px; font-size: 13px; border-radius: 10px; }
#px-layout .btn:focus-visible, #px-layout input:focus-visible, #px-layout select:focus-visible, #px-layout textarea:focus-visible, #px-layout .navitem:focus-visible { outline: 2px solid #087F5B; outline-offset: 2px; }
/* Forms: full-width-safe, emerald focus ring */
#px-layout input, #px-layout select, #px-layout textarea { box-sizing: border-box; max-width: 100%; border: 1px solid #D8CFAF; border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff; }
#px-layout input:focus, #px-layout select:focus, #px-layout textarea:focus { border-color: #087F5B; box-shadow: 0 0 0 3px rgba(8,127,91,.15); }
/* Cards + section titles */
#px-layout .card { border-radius: 14px; border: 1px solid #E9DFC8; box-shadow: 0 1px 3px rgba(15,76,58,.05); }
#px-layout .card h2 { font-size: 15px; font-weight: 700; color: #0F4C3A; }
#px-layout .sup-panel { overflow: hidden; }
#px-layout .sup-panel h4 { padding: 12px 14px; font-size: 14px; }
/* Tables: roomy rows, hover, scrollable on mobile */
#px-layout .tablewrap { -webkit-overflow-scrolling: touch; }
#px-layout table.grid td { padding: 10px 12px; }
#px-layout table.grid tbody tr:hover td { background: #FFFFFF; }
#px-layout .empty { color: #45554D; }
#px-layout .sup-panel tbody td[colspan] { text-align: center; color: #45554D; padding: 20px 12px; }
/* Stat cards: uniform radius */
#px-layout .kpi, #px-layout .sup-kpi { border-radius: 14px; }
/* No horizontal overflow (clip keeps sticky topbar working) */
#px-layout { overflow-x: clip; }
#px-layout .topbar, #px-layout .px-topbar { position: sticky; top: 0; z-index: 80; }
/* Responsive */
@media (max-width: 640px) {
  #px-layout table.grid { min-width: 520px; }
  #px-layout .statgrid { grid-template-columns: 1fr 1fr; }
  #px-layout input, #px-layout select, #px-layout textarea { font-size: 16px; }
  #px-layout .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Website-style serif headlines (matches thelightalhuda.com) */
h1, h2, .topbar h1, .logincard h1, .parent-hero h1, .px-welcome h2, .card h2, .px-section-head h3 { font-family: "Cormorant Garamond", Georgia, serif; }

/* ============ PREMIUM LOOK v2 — 2026-10-23 (CSS-only refinement, same green/gold palette) ============ */
:root { --shadow: 0 14px 34px rgba(15,76,58,.10), 0 2px 8px rgba(15,76,58,.05); }
.card { border-radius: 18px; border-color: #E7DCC0; }
.card h2 { font-size: 18px; letter-spacing: -.2px; }
.topbar { border-bottom: 2px solid rgba(201,162,75,.65); }
.topbar h1 { font-size: 20px; letter-spacing: .2px; }
.sidebar { border-right: 1px solid rgba(201,162,75,.25); }
.btn { box-shadow: 0 2px 10px rgba(15,76,58,.16); transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,76,58,.22); }
.kpi { transition: transform .15s ease, box-shadow .15s ease; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,76,58,.14); }
.statbox { transition: transform .15s ease, box-shadow .15s ease; }
.statbox:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,76,58,.12); }
table.grid th { letter-spacing: .6px; }
.modal { border-radius: 18px; }
.logincard { border-radius: 20px; border: 1px solid rgba(201,162,75,.55); box-shadow: 0 24px 70px rgba(0,0,0,.38); }
.logincard .brand-mark { box-shadow: 0 0 0 4px rgba(201,162,75,.30); }
.px-topbar { box-shadow: 0 1px 0 rgba(201,162,75,.6), 0 1px 4px rgba(15,76,58,.05); }
#px-layout .px-section { border-radius: 16px; box-shadow: 0 4px 18px rgba(15,76,58,.08); }
#px-layout .px-section-head h3 { font-size: 18px; letter-spacing: -.2px; }
#px-layout .px-welcome { border-radius: 18px; box-shadow: 0 8px 28px rgba(15,76,58,.16); }

/* ---------- Weekly grid (Mon-Sun) — green/gold theme, distinct status colors ---------- */
.wk-wrap { overflow-x: auto; }
.wk-grid { width: 100%; border-collapse: collapse; min-width: 760px; }
.wk-grid th, .wk-grid td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.wk-grid td:first-child, .wk-grid th:first-child { text-align: left; }
.wk-cell { display: inline-block; min-width: 44px; padding: 6px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.wk-cell.present { background: #16A34A; color: #fff; }
.wk-cell.absent { background: #DC2626; color: #fff; }
.wk-cell.leave { background: #F59E0B; color: #fff; }
.wk-cell.available { background: #0D9488; color: #fff; }
.wk-cell.trial { background: #1F2937; color: #FFDC82; }
.wk-cell.unmarked { background: #F1F5F1; color: #64748b; border-color: var(--line); }
.wk-cell.noclass { background: #E9ECE9; color: #94a3b8; cursor: default; }
.wk-cell.ro { cursor: default; }
.wk-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0; font-size: 14px; }
.wk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wk-dot { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }

/* ---------- Desktop vs Mobile: Students list (separate layouts) ---------- */
/* Desktop: full 12-column table (stu-desktop). Mobile: stacked cards (stu-mobile). */
.stu-mobile { display: none; }
.stu-mcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.stu-mtop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.stu-mline { margin-top: 8px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.stu-mactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.stu-mactions .btn { flex: 1 1 auto; }
/* Search icon fix: the generic #px-layout input rule was overwriting the search
   input's left padding, so the icon sat on top of the placeholder text. */
#px-layout .px-search input { padding: 10px 14px 10px 40px; }
#px-layout .px-search-ico { pointer-events: none; }
@media (max-width: 700px) {
  #px-layout .stu-desktop .tablewrap { display: none; }
  .stu-mobile { display: block; }
  #px-layout .content { padding: 12px; }
  .row-between { flex-direction: column; align-items: stretch; gap: 10px; }
  .row-between .btn { width: 100%; }
}
@media (min-width: 701px) {
  .stu-mobile { display: none; }
}
