@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800;900&display=swap');
:root{--g:#075a38;--g2:#043b25;--gold:#c6a12b;--bg:#f3f6f4;--text:#173126;--muted:#708079;--red:#b42318;--shadow:0 8px 28px #063b2514}*{box-sizing:border-box}body{margin:0;font:14px Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}.login{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,var(--g2),var(--g),var(--gold))}.login-card{background:#fff;width:min(430px,100%);padding:34px;border-radius:22px;box-shadow:0 25px 80px #0003;text-align:center}.logo{width:100px;height:100px;object-fit:contain}.login h1{font-size:20px;color:var(--g);margin:12px 0 3px}.login p{color:var(--gold);font-weight:700}.login h2{text-align:left;margin-top:28px}.login input{display:block;width:100%;padding:13px;margin:10px 0;border:1px solid #d6e0db;border-radius:10px}.primary,.gold,.ghost,.logout{border:0;border-radius:10px;padding:11px 15px;font-weight:700}.primary{background:var(--g);color:#fff}.gold{background:var(--gold);color:#fff}.ghost{background:#eaf2ee;color:var(--g)}.login .primary{width:100%;margin-top:8px}.msg{margin-top:12px;color:var(--red);min-height:18px}#app{min-height:100vh}aside{position:fixed;left:0;top:0;bottom:0;width:250px;background:var(--g2);color:#fff;padding:18px 13px;overflow:auto}.brand{display:flex;align-items:center;gap:10px;padding:8px 10px 18px;border-bottom:1px solid #ffffff22}.brand small{display:block;color:#b9d0c6;margin-top:3px}nav{padding-top:15px}nav button{display:block;width:100%;text-align:left;background:transparent;color:#d8e8e1;border:0;padding:10px 12px;border-radius:9px;margin:3px 0}nav button:hover,nav button.active{background:#ffffff16;color:#fff}.logout{position:absolute;bottom:16px;left:13px;right:13px;background:#ffffff14;color:#fff}main{margin-left:250px;padding:22px;max-width:1600px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}header h2{margin:0 0 4px}.card{background:#fff;border-radius:15px;box-shadow:var(--shadow);padding:18px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat small{color:var(--muted)}.stat strong{display:block;font-size:28px;color:var(--g);margin-top:5px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.toolbar input,.toolbar select,.field input,.field select,.field textarea{padding:10px;border:1px solid #d6e0db;border-radius:9px;background:#fff}.tablewrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:11px 9px;border-bottom:1px solid #edf0ee;text-align:left;white-space:nowrap}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eaf5ef;color:var(--g);font-size:11px;font-weight:800}.badge.red{background:#feeceb;color:var(--red)}.badge.gold{background:#fff5d6;color:#826708}.charts{display:grid;grid-template-columns:1.4fr 1fr;gap:14px;margin-top:14px}.bars{height:200px;display:flex;align-items:end;gap:9px;padding:20px 8px 28px}.bar{flex:1;background:linear-gradient(#08764a,#0b5a39);border-radius:6px 6px 0 0;position:relative;min-width:16px}.bar span{position:absolute;top:100%;left:50%;transform:translateX(-50%);font-size:10px;color:var(--muted);margin-top:7px}.bar em{position:absolute;top:-17px;left:50%;transform:translateX(-50%);font-style:normal;font-size:10px}.donut{width:145px;height:145px;border-radius:50%;background:conic-gradient(var(--g) 0 42%,var(--gold) 42% 67%,#88a996 67% 82%,#dfe8e3 82%);margin:18px auto;position:relative}.donut:after{content:"";position:absolute;inset:35px;background:#fff;border-radius:50%}.modal{position:fixed;inset:0;background:#0008;display:grid;place-items:center;padding:20px;z-index:20}.modal[hidden]{display:none}.modal-card{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:17px;padding:22px}.x{float:right;border:0;background:#edf3ef;border-radius:8px;font-size:20px}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.field{display:flex;flex-direction:column;gap:5px}.field label{font-weight:700;font-size:12px}.field textarea{min-height:110px}.full{grid-column:1/-1}.signature{border:2px dashed #a9bcb3;border-radius:10px;width:100%;height:180px;touch-action:none;background:#fff}.actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}.section{margin-top:14px}.notice{padding:12px;border-radius:10px;background:#fff8df}.empty{padding:30px;text-align:center;color:var(--muted)}
@media(max-width:1000px){aside{width:72px}.brand div,nav button span,.logout span{display:none}.brand{justify-content:center}main{margin-left:72px}.grid{grid-template-columns:repeat(2,1fr)}.charts{grid-template-columns:1fr}}@media(max-width:650px){aside{display:none}main{margin-left:0;padding:13px}.grid{grid-template-columns:1fr 1fr}.formgrid{grid-template-columns:1fr}.full{grid-column:auto}}
.mini{border:0;background:#eef5f1;color:#075a38;border-radius:7px;padding:6px 9px;font-size:12px;font-weight:700}.danger{border:0;background:#b42318;color:#fff;border-radius:10px;padding:11px 15px;font-weight:700}.filebtn{display:inline-flex;align-items:center}.userBadge{background:#eaf2ee;color:#075a38;border-radius:999px;padding:7px 12px;font-weight:800;font-size:11px}.riskrow{display:flex;justify-content:space-between;border-bottom:1px solid #edf0ee;padding:9px 0;margin:0}.empty{color:#708079;text-align:center;padding:20px}
.dangerMini{background:#feeceb;color:#b42318}.pieWrap{display:flex;gap:30px;align-items:center;justify-content:center;flex-wrap:wrap;padding:15px}.pieWrap canvas{max-width:320px;width:100%;height:auto}.legend{min-width:250px;display:grid;gap:8px}.legend div{display:grid;grid-template-columns:14px 1fr auto;gap:8px;align-items:center}.legend i{width:12px;height:12px;border-radius:50%;background:var(--g);display:block}.siggrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.sigPreview{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sigPreview>div{border:1px solid #dfe8e3;border-radius:10px;padding:10px;min-height:130px}.sigPreview img{display:block;width:100%;height:90px;object-fit:contain;margin-top:8px}.detailgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.section{margin-top:14px}@media(max-width:650px){.siggrid,.sigPreview,.detailgrid{grid-template-columns:1fr}.pieWrap{padding:5px}}

/* V4 visual enhancements */
body{position:relative;overflow-x:hidden}.schoolMotto{font-size:18px;color:var(--gold);font-weight:800;letter-spacing:.3px;margin:6px 0 0}.clockCard{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:170px}.digitalClock{font-family:'Orbitron',monospace;font-size:38px;font-weight:800;letter-spacing:3px;color:var(--g);line-height:1.15;text-shadow:0 2px 0 rgba(0,0,0,.05)}.calendar{width:100%;border-collapse:collapse}.calendar th,.calendar td{text-align:center;padding:7px;border:1px solid #edf0ee}.calendar th{background:#edf5ef;color:var(--g)}.calendar td.today{background:var(--gold);color:#fff;border-radius:7px;font-weight:900}.calendar td.muted{color:#b2bdb7}.chartCard canvas{max-height:340px}.evidence-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}.evidence-item{border:1px solid #dfe8e3;border-radius:10px;padding:7px;background:#fff}.evidence-item img{width:100%;height:120px;object-fit:cover;border-radius:7px}.file-list{display:grid;gap:8px}.file-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid #e1e9e4;border-radius:10px;background:#fbfdfb}.kpm-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.kpm-card{border:1px solid #dfe8e3;border-radius:12px;padding:14px;background:#fff}.chatbox{display:grid;gap:10px}.chatbox textarea{min-height:150px;padding:12px;border:1px solid #d6e0db;border-radius:10px}.chat-note{padding:12px;border-radius:10px;background:#eef7f1}.calendarTitle{text-align:center;font-weight:800;color:var(--g);margin-bottom:8px}.exportHint{font-size:12px;color:var(--muted)}
@media(max-width:650px){.digitalClock{font-size:25px;letter-spacing:2px}.kpm-grid{grid-template-columns:1fr}}
/* V5 enhancements */
.calendarNav{display:flex;align-items:center;justify-content:space-between;gap:10px}.calendarTitle{flex:1;text-align:center;font-weight:800;color:var(--g);margin-bottom:0}.calendarFoot{font-size:12px;color:var(--muted);text-align:center;margin-top:9px}.ref-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:14px}.ref-card{border:1px solid #dfe8e3;border-left:4px solid var(--g);border-radius:12px;padding:14px;background:#fff}.ref-card p{margin:7px 0 0;color:var(--muted);line-height:1.5}.customDoc{border-top:3px solid var(--gold)}
@media(max-width:650px){.ref-grid{grid-template-columns:1fr}.calendar th,.calendar td{padding:6px 4px}}
@media(min-width:1001px){.grid{grid-template-columns:repeat(4,1fr)}}
.schoolHero{display:flex;align-items:center;justify-content:center;gap:18px;text-align:left}.dashboardLogo{width:72px;height:72px;object-fit:contain;border-radius:12px}.clickableRow{transition:background .15s}.clickableRow:hover{background:rgba(30,100,60,.06)}
/* V7 dashboard refinement: logo only in sidebar brand; no page watermark */
body:before{display:none!important}
.schoolHero{justify-content:center;padding:28px 24px;border-left:5px solid var(--gold);text-align:center}.schoolHero>div{width:100%}.schoolHero h1{font-size:clamp(24px,3vw,34px);letter-spacing:.5px}.schoolMotto{font-size:20px;margin-top:8px}.schoolInspiration{margin:14px auto 0;max-width:900px;padding-left:0;border-left:0;text-align:center;font-size:17px}
.dashboardStats{grid-template-columns:repeat(4,1fr);margin-top:14px}
.dashboardStats .stat{min-height:100px;display:flex;flex-direction:column;justify-content:center}

/* V12: sidebar logo and separated school/system identity */
.brand{display:flex;align-items:center;gap:12px;padding:10px 9px 20px;border-bottom:1px solid #ffffff22}
.sidebarLogo{width:42px;height:42px;object-fit:contain;flex:0 0 42px}
.brandText{display:flex;flex-direction:column;min-width:0}
.brandText b{display:block;color:#fff;font-size:13px;line-height:1.25;letter-spacing:.2px;margin-bottom:9px}
.brandText small{display:block;color:#b9d0c6;font-size:11px;line-height:1.35;margin-top:0}
@media(max-width:1000px){.sidebarLogo{width:38px;height:38px;flex-basis:38px}.brandText{display:none}.brand{justify-content:center;gap:0;padding-left:0;padding-right:0}}

.calendar td.publicHoliday{background:#e53935;color:#fff;font-weight:900;position:relative;border-color:#d32f2f}.calendar td.publicHoliday.today{background:#b71c1c;color:#fff}.calendar .holidayDot{display:block;font-size:14px;line-height:8px}.calendarLegend{display:flex;align-items:center;justify-content:center;gap:6px;font-size:11px;color:var(--muted);margin-top:8px}.legendHoliday{display:inline-block;width:10px;height:10px;border-radius:3px;background:#e53935}
.calendar td.schoolHoliday{background:#1976d2;color:#fff;font-weight:900;position:relative;border-color:#1565c0}.calendar td.schoolHoliday.today{background:#0d47a1;color:#fff}.legendSchoolHoliday{display:inline-block;width:10px;height:10px;border-radius:3px;background:#1976d2;margin-left:8px}.calendarFoot small{font-size:10px}
.calendar td.publicHoliday{background:#feeceb;color:#b42318;font-weight:900}.calendar td.schoolHoliday{background:#e9f2ff;color:#1d5ea8;font-weight:800}.calendar td.publicHoliday.schoolHoliday{background:linear-gradient(135deg,#feeceb 50%,#e9f2ff 50%);color:#7b3145}.holidayDot{display:block;font-size:10px;line-height:8px}.calendarLegend{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:9px;font-size:11px;color:var(--muted)}.legendHoliday,.legendSchoolHoliday{width:11px;height:11px;border-radius:3px;display:inline-block}.legendHoliday{background:#feeceb;border:1px solid #b42318}.legendSchoolHoliday{background:#e9f2ff;border:1px solid #1d5ea8}.calendarYearNote{margin-top:8px;padding:8px;border-radius:8px;background:#f1f6f3;color:var(--muted);font-size:11px;text-align:center}.verifiedOk{background:#e8f7ed!important;border:2px solid #2e9b59!important;color:#146b38!important;font-weight:800}.verifiedNo{background:#feeceb!important;border:2px solid #c9362b!important;color:#a51f18!important;font-weight:800}
/* V17: Laporan Polis & Pengurusan Disiplin SJI */
.policeChoices{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0 16px}.policeChoice{border:1px solid #d8e5dd;background:#f4f9f6;color:var(--g);border-radius:11px;padding:12px;font-weight:800}.policeChoice:hover{background:#e7f3ec}.orgPreview{display:flex;align-items:center;gap:18px;padding:14px;border:1px solid #dfe8e3;border-radius:12px;background:#fbfdfb}.orgPreview img{display:block;max-width:100%;max-height:420px;width:auto;height:auto;border-radius:9px;border:1px solid #e1e9e4}.uploadBox{padding:28px;text-align:center;border:2px dashed #b8cbc1;border-radius:12px;color:var(--muted);background:#fbfdfb}.taskGrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.taskCard{border:1px solid #dfe8e3;border-radius:12px;padding:14px;background:#fff}.taskCard b{display:block;color:var(--g);margin-bottom:8px}.taskCard textarea{width:100%;min-height:120px;padding:10px;border:1px solid #d6e0db;border-radius:9px;resize:vertical}
@media(max-width:700px){.policeChoices{grid-template-columns:1fr 1fr}.taskGrid{grid-template-columns:1fr}.orgPreview{flex-direction:column;align-items:stretch}.orgPreview img{max-height:320px;object-fit:contain}}
.checkGrid.policeStudentList{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;max-height:280px;overflow:auto;padding:10px;border:1px solid #d9e4dc;border-radius:12px;background:#f8fbf9}.checkItem{display:flex;align-items:flex-start;gap:8px;padding:9px 10px;border:1px solid #e3ebe5;border-radius:10px;background:#fff;cursor:pointer}.checkItem input{margin-top:3px}.checkItem small{color:#66756c}

.schoolInspiration{margin-top:12px;max-width:820px;font-size:16px;line-height:1.55;font-weight:600;font-style:italic;color:var(--g2);padding-left:14px;border-left:4px solid var(--gold)}

/* V34 Supabase authentication */
.loginScreen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#063c27,#0b5d3b 55%,#d4af37);padding:24px}.loginCard{width:min(430px,100%);background:#fff;border-radius:22px;padding:32px;box-shadow:0 20px 60px rgba(0,0,0,.22);text-align:center}.loginLogo{width:82px;height:82px;object-fit:contain;border-radius:16px;margin-bottom:10px}.loginCard h1{margin:4px 0;color:var(--g);font-size:28px}.loginCard>p{margin:0;color:#66756c;font-weight:800;letter-spacing:.5px}.loginDivider{height:1px;background:#e4ebe6;margin:22px 0}.loginCard h3{text-align:left;margin:0 0 14px;color:var(--g)}.loginCard form{text-align:left}.loginCard label{display:block;margin:10px 0 6px;font-weight:800}.loginCard input{width:100%;box-sizing:border-box;padding:12px 13px;border:1px solid #d4dfd8;border-radius:10px;background:#fff;font-size:14px}.loginCard button{width:100%;margin-top:16px}.loginError{min-height:20px;color:#b42318;font-size:13px;font-weight:700;margin-top:8px}.loginNote{display:block;margin-top:18px;color:#7b887f;line-height:1.45}.headerUser{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.headerUser #cloudStatus{font-size:11px;color:#5f7067}.headerUser .mini{border:1px solid #d5e1da;background:#fff;color:var(--g)}
@media(max-width:650px){.loginCard{padding:25px 20px}.headerUser #cloudStatus{display:none}}

/* V36: OPR Disiplin & Kelab Pencegahan Jenayah */
.oprDashboard{overflow:hidden}.oprDashboardGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.oprDashboardPoster{border:1px solid #dfe8e3;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 4px 14px #063b2510}.oprDashboardPoster img{display:block;width:100%;height:240px;object-fit:contain;background:#f7faf8}.oprPosterMeta{display:flex;flex-direction:column;gap:4px;padding:10px 12px}.oprPosterMeta b{color:var(--g);line-height:1.3}.oprPosterMeta small{color:var(--muted)}.oprGallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:14px}.oprCard{border:1px solid #dfe8e3;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 4px 14px #063b2510}.oprCard>img{display:block;width:100%;height:260px;object-fit:contain;background:#f7faf8}.oprCardBody{display:flex;flex-direction:column;gap:5px;padding:12px}.oprCardBody>b{color:var(--g);line-height:1.3}.oprCardBody>small{color:var(--muted)}.oprCardBody .actions{margin-top:5px}.clubSection{border-top:4px solid var(--gold);padding-top:14px}.fileMeta{font-size:12px;color:var(--muted)}
@media(max-width:900px){.oprGallery{grid-template-columns:repeat(2,minmax(0,1fr))}.oprDashboardGrid{grid-template-columns:1fr 1fr}.oprDashboardPoster:last-child{grid-column:1/-1}}
@media(max-width:650px){.oprGallery,.oprDashboardGrid{grid-template-columns:1fr}.oprDashboardPoster:last-child{grid-column:auto}.oprDashboardPoster img{height:280px}.oprCard>img{height:300px}}

/* V43.2: student action buttons always visible and delete protected for admin */
.studentActions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:320px}.studentActions .mini{white-space:nowrap}.table th:last-child,.table td:last-child{position:sticky;right:0;background:#fff;z-index:2;min-width:320px;box-shadow:-6px 0 12px rgba(0,0,0,.06)}.table th:last-child{z-index:3}.dangerMini{background:#feeceb!important;color:#b42318!important}@media(max-width:900px){.studentActions{min-width:290px}.table th:last-child,.table td:last-child{min-width:290px}}
/* V43.4: MFA/TOTP enrollment */
.mfaEnroll{display:grid;grid-template-columns:220px 1fr;gap:22px;align-items:center;margin-top:14px}.mfaQr{display:flex;justify-content:center;align-items:center;min-height:210px;border:1px solid #dfe8e3;border-radius:14px;background:#fff;padding:10px}.mfaQr img{display:block;width:200px;height:200px;object-fit:contain}.mfaSecret{display:inline-block;padding:8px 10px;background:#f1f6f3;border-radius:8px;word-break:break-all}.mfaCode{width:180px!important;max-width:100%;font-size:22px!important;letter-spacing:5px;text-align:center;font-weight:800}.securityPanel{margin-top:14px}
@media(max-width:650px){.mfaEnroll{grid-template-columns:1fr}.mfaQr{min-height:180px}.mfaQr img{width:170px;height:170px}}

/* V43.12: Full-width desktop layout + compact student profile table.
   Fixes the right side of the screen being clipped so Tindakan/Padam is always visible. */
html,body{width:100%;min-width:0;overflow-x:hidden}
#app{width:100%;min-width:0}
main{width:calc(100% - 250px);max-width:none;min-width:0;margin-left:250px;padding:18px 20px 28px}
header{min-width:0}
header>div:first-child{min-width:0}
header h2{font-size:24px}
#content{width:100%;min-width:0}
.card{min-width:0}
.tablewrap{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden}

/* Profile Kes Murid: use the available screen width efficiently. */
.profile-page .toolbar{align-items:center;margin:0 0 12px}
.profile-page .toolbar input{flex:0 1 245px;min-width:180px}
.profile-page .table{width:100%;table-layout:auto;font-size:12px}
.profile-page .table th,.profile-page .table td{padding:8px 7px}
.profile-page .table th:nth-child(1),.profile-page .table td:nth-child(1){min-width:250px}
.profile-page .table th:nth-child(2),.profile-page .table td:nth-child(2){min-width:105px}
.profile-page .table th:nth-child(3),.profile-page .table td:nth-child(3){min-width:92px}
.profile-page .table th:nth-child(4),.profile-page .table td:nth-child(4){min-width:55px}
.profile-page .table th:nth-child(5),.profile-page .table td:nth-child(5){min-width:145px}
.profile-page .table th:nth-child(6),.profile-page .table td:nth-child(6){min-width:180px}
.profile-page .table th:nth-child(7),.profile-page .table td:nth-child(7){min-width:105px}
.profile-page .table th:nth-child(8),.profile-page .table td:nth-child(8){min-width:45px;text-align:center}
.profile-page .table th:last-child,.profile-page .table td:last-child{position:sticky;right:0;z-index:5;min-width:250px;width:250px;background:#fff;box-shadow:-8px 0 16px rgba(0,0,0,.08)}
.profile-page .table th:last-child{z-index:6;background:#f7faf8}
.profile-page .studentActions{min-width:0;width:100%;gap:5px;flex-wrap:nowrap}
.profile-page .studentActions .mini{padding:6px 8px;font-size:11px;white-space:nowrap}
.profile-page .studentActions .dangerMini{font-weight:800}

/* Keep other tables usable on smaller laptop/iPad widths. */
@media(max-width:1200px){
  main{padding:15px 14px 24px}
  header h2{font-size:21px}
  .table th,.table td{padding:8px 7px;font-size:12px}
}
@media(max-width:1000px){
  main{width:calc(100% - 72px);margin-left:72px}
}
@media(max-width:650px){
  main{width:100%;margin-left:0;padding:12px}
  .profile-page .table th:last-child,.profile-page .table td:last-child{min-width:236px;width:236px}
  .profile-page .studentActions .mini{padding:6px 7px;font-size:10px}
}

/* V43.13 LAPTOP FIX — desktop sahaja.
   iPad/telefon dikekalkan seperti asal. Semua 9 kolum Profil Kes Murid
   dipaksa muat dalam lebar skrin dan teks panjang dipendekkan dengan … . */
@media (min-width:1001px){
  main{width:calc(100% - 250px);max-width:none;min-width:0}
  .profile-page{width:100%;min-width:0}
  .profile-page .tablewrap{overflow-x:hidden}
  .profile-page .table{width:100%;min-width:0;table-layout:fixed;font-size:11.5px}
  .profile-page .table th,.profile-page .table td{
    min-width:0!important;
    width:auto;
    padding:8px 6px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .profile-page .table th:nth-child(1),.profile-page .table td:nth-child(1){width:20%}
  .profile-page .table th:nth-child(2),.profile-page .table td:nth-child(2){width:8%}
  .profile-page .table th:nth-child(3),.profile-page .table td:nth-child(3){width:8%}
  .profile-page .table th:nth-child(4),.profile-page .table td:nth-child(4){width:5%}
  .profile-page .table th:nth-child(5),.profile-page .table td:nth-child(5){width:11%}
  .profile-page .table th:nth-child(6),.profile-page .table td:nth-child(6){width:16%}
  .profile-page .table th:nth-child(7),.profile-page .table td:nth-child(7){width:8%}
  .profile-page .table th:nth-child(8),.profile-page .table td:nth-child(8){width:4%;text-align:center}
  .profile-page .table th:last-child,.profile-page .table td:last-child{
    position:static!important;
    width:20%!important;
    min-width:0!important;
    box-shadow:none;
    background:inherit;
    overflow:visible;
  }
  .profile-page .table th:last-child{background:#f7faf8}
  .profile-page .studentActions{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:4px;
    width:100%;
    min-width:0;
    flex-wrap:nowrap;
  }
  .profile-page .studentActions .mini{
    flex:1 1 0;
    min-width:0;
    padding:6px 5px;
    font-size:10px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}

/* Very narrow laptop widths: slightly tighter without changing iPad/phone. */
@media (min-width:1001px) and (max-width:1250px){
  aside{width:225px}
  main{width:calc(100% - 225px);margin-left:225px;padding:14px}
  .card{padding:13px}
  .profile-page .table{font-size:10.5px}
  .profile-page .table th,.profile-page .table td{padding:7px 4px}
  .profile-page .studentActions{gap:3px}
  .profile-page .studentActions .mini{padding:5px 3px;font-size:9px}
}
