/* Student page redesign. Scoped to body.student-ui so no other page is affected. */
:root:not([data-theme="light"]) body.student-ui{
  --ink:#0B1424;--surface:#121E33;--surface-raised:#182742;--hairline:#233453;
  --text:#EAF0FA;--text-muted:#93A3BE;--accent:#5B9BFF;--accent-soft:rgba(91,155,255,.14);
  --amber:#5B9BFF;--teal:#5B9BFF;}
:root[data-theme="light"] body.student-ui{
  --ink:#F4F7FB;--surface:#FFFFFF;--surface-raised:#F0F4FA;--hairline:#DCE3EE;
  --text:#14213A;--text-muted:#5B6B86;--accent:#2563EB;--accent-soft:rgba(37,99,235,.10);
  --amber:#2563EB;--teal:#2563EB;}

/* One font everywhere (code editor excluded) */
body.student-ui,body.student-ui *:not(.monaco-editor):not(.monaco-editor *):not(code):not(pre):not(pre *){
  font-family:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif !important;}
body.student-ui{background:var(--ink);color:var(--text);font-size:14px;line-height:1.5;
  -webkit-font-smoothing:antialiased;overflow-x:hidden;}
body.student-ui h1,body.student-ui h2,body.student-ui h3,body.student-ui h4{
  font-weight:650;letter-spacing:-.01em;line-height:1.25;}
body.student-ui .num,body.student-ui .timer,body.student-ui .home-ring-num{font-variant-numeric:tabular-nums;}

/* Top bar + sidebar */
body.student-ui .topbar{background:var(--surface);border-bottom:1px solid var(--hairline);box-shadow:none;}
body.student-ui .admin-sidebar{background:transparent;border-right:1px solid var(--hairline);}
body.student-ui #student-sidebar .side-link{background:transparent !important;color:var(--text-muted) !important;
  font-weight:500;border-radius:10px;margin-top:0 !important;padding:10px 12px;}
body.student-ui #student-sidebar .side-link:hover{background:var(--surface-raised) !important;color:var(--text) !important;}
body.student-ui #student-sidebar .side-link.active{background:var(--accent-soft) !important;color:var(--accent) !important;font-weight:600;}

/* Cards */
body.student-ui .card{background:var(--surface);border:1px solid var(--hairline);border-radius:14px;box-shadow:none;}
body.student-ui .btn:not(.btn-icon):not(.btn-ghost):not(.btn-danger){border-radius:10px;}
body.student-ui .btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;}

/* Home: two columns, right rail holds the live company tile */
body.student-ui .admin-main{padding:22px 26px;max-width:1240px;}
body.student-ui .student-dash-layout{grid-template-columns:220px minmax(0,1fr) !important;}
body.student-ui #stab-home{display:grid;grid-template-columns:minmax(0,1fr) 320px;column-gap:20px;align-items:start;}
body.student-ui #stab-home>*{grid-column:1;min-width:0;}
body.student-ui #stab-home>#ios-install-nudge,body.student-ui #stab-home>#home-hero,
body.student-ui #stab-home>#notice-board,body.student-ui #stab-home>#home-news-banner,
body.student-ui #stab-home>#assignment-banner,body.student-ui #stab-home>#announcement-banner{grid-column:1/-1;}
body.student-ui #stab-home>#home-company-tile{grid-column:2;grid-row:7/span 10;position:sticky;top:76px;margin-bottom:16px;}
body.student-ui .home-hero{background:var(--surface);border:1px solid var(--hairline);border-radius:16px;padding:16px 20px;margin-bottom:16px;}
body.student-ui .home-hero-name{font-size:24px;font-weight:700;margin-bottom:8px;}
body.student-ui .home-hero-hi{text-transform:none;letter-spacing:0;font-size:14px;}
body.student-ui .home-chip{background:var(--surface-raised);}
body.student-ui .home-chip.hot{color:var(--accent);border-color:var(--accent);background:var(--accent-soft);}
body.student-ui .home-section-title{font-size:15px;font-weight:650;text-transform:none;letter-spacing:0;color:var(--text);margin:6px 0 10px;display:flex;align-items:center;gap:10px;}
body.student-ui .home-tiles{grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px;}
body.student-ui .home-tile{background:var(--surface);border:1px solid var(--hairline);border-radius:14px;box-shadow:none;}
body.student-ui .home-tile:hover{border-color:var(--accent);}

/* Live company tile: one accent, calm type */
body.student-ui .sct{--k:var(--accent) !important;max-width:100%;height:clamp(360px,calc(100vh - 150px),440px);border-radius:16px;box-shadow:none;
  background:var(--surface);border:1px solid var(--hairline);}
body.student-ui .sct:before{background:var(--accent);height:2px;}
body.student-ui .sct .ch{text-align:left;padding:16px 18px 12px;}
body.student-ui .sct .cb{padding:0 18px;}
body.student-ui .sct .cm{left:18px;right:18px;}
body.student-ui .sct .cm p,body.student-ui .sct .cm li{font-size:13.5px;}
body.student-ui .sct .ch h3{font-size:20px;font-weight:700;}
body.student-ui .sct .ch h3 b{background:none !important;-webkit-text-fill-color:currentColor !important;color:var(--text);animation:none !important;}
body.student-ui .sct .ch span{text-transform:none;letter-spacing:0;font-size:13px;font-weight:500;color:var(--text-muted);}
body.student-ui .sct .cm h5{text-transform:none;letter-spacing:0;font-size:13px;font-weight:650;color:var(--accent);}
body.student-ui .sct .cm .pk{background:none !important;-webkit-text-fill-color:currentColor !important;color:var(--text);font-size:20px;}
body.student-ui .live-pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--accent);
  background:var(--accent-soft);border-radius:999px;padding:3px 10px;}
body.student-ui .live-pill:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);}
@media(prefers-reduced-motion:no-preference){body.student-ui .live-pill:before{animation:lp 1.8s ease-in-out infinite;}}
@keyframes lp{50%{opacity:.35}}

/* Tablet: right rail drops below */
@media(max-width:1100px){
  body.student-ui #stab-home{grid-template-columns:minmax(0,1fr);}
  body.student-ui #stab-home>*,body.student-ui #stab-home>#home-company-tile{grid-column:1;grid-row:auto;position:static;}
  body.student-ui .sct{height:400px;}
}

/* Phones (under 600px): everything stacks, scroll only up and down */
@media(max-width:600px){
  body.student-ui .admin-main,body.student-ui .student-dash-layout .admin-main{padding:14px !important;}
  body.student-ui .home-hero{padding:16px;flex-wrap:wrap;gap:14px;}
  body.student-ui .home-hero-name{font-size:22px;}
  body.student-ui .home-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body.student-ui .home-today-grid,body.student-ui .grid,body.student-ui .grid-2,body.student-ui .grid-3,body.student-ui .grid-4,
  body.student-ui .pr-grid,body.student-ui .subject-tiles{grid-template-columns:minmax(0,1fr) !important;}
  body.student-ui .card{padding:14px;}
  body.student-ui img,body.student-ui canvas,body.student-ui svg,body.student-ui video{max-width:100%;}
  body.student-ui .admin-main table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  body.student-ui .sct{height:380px;}
  body.student-ui .topbar{padding:10px 12px;}
}
