/* SmartPlan Shared UI | Executive Navy & Gold | shell v1
   Load after existing SmartPlan styles. ALL shell rules scoped to body.sp-shared-shell.
   Admin standalone dashboard loads its own page-specific css after this file.
*/
:root {
 --sp-navy:#0b2340; --sp-navy-deep:#071e37; --sp-navy-slate:#163859;
 --sp-gold:#c6a268; --sp-gold-light:#e7d3ab; --sp-page:#f2f6fa;
 --sp-ink:#192f47; --sp-muted:#77879a; --sp-border:#e4ebf1;
 --sp-shadow:0 9px 28px rgba(24,58,88,.07);
}
body.sp-shared-shell { --sp-font-scale:1.15; background:var(--sp-page); color:var(--sp-ink); }
body.sp-shared-shell .app-sidebar {
 background:linear-gradient(174deg,#102d50 0%,#071e37 64%,#0b2a4d 100%);
 box-shadow:5px 0 24px rgba(10,46,74,.13); border-right:1px solid #ffffff22;
}
body.sp-shared-shell .sb-brand {border-bottom-color:#ffffff21}
body.sp-shared-shell .sb-brand-icon {background:linear-gradient(145deg,#dec28a,#a98b50);border-color:#ead4a5;color:#0b2340}
body.sp-shared-shell .sb-group{color:#aebfd0}
body.sp-shared-shell .sb-link{color:#d4e2ef;border-radius:11px}
body.sp-shared-shell .sb-link:hover{color:#fff;background:#ffffff18}
body.sp-shared-shell .sb-link.active{background:linear-gradient(110deg,#b99156,#e1c38c);color:#102941;border-left-color:#efd6a3;box-shadow:0 8px 24px #0002}
body.sp-shared-shell .sb-link.active i{color:#102941}
body.sp-shared-shell .app-topbar{background:#fff;border-bottom-color:var(--sp-border);box-shadow:0 1px 9px #0b234009}
body.sp-shared-shell .tb-title,body.sp-shared-shell .tb-title i{color:var(--sp-navy)}
body.sp-shared-shell .tb-year,body.sp-shared-shell .tb-term{background:#f4f7fb;color:#27435e;border-color:#dfe8ef}
body.sp-shared-shell .tb-burger{background:#f1f6fa;color:var(--sp-navy)}
body.sp-shared-shell .app-content{background:var(--sp-page)}
body.sp-shared-shell .hero:not([class*="hero--"]){--h1:#0b2340;--h2:#174864;--h3:#447a85;background:linear-gradient(110deg,#0b2340,#174864 72%,#467d85);border-radius:18px;box-shadow:var(--sp-shadow)}
body.sp-shared-shell .hero-sub{color:#d4e4ef}
body.sp-shared-shell .panel,body.sp-shared-shell .stat-card{border:1px solid var(--sp-border);border-radius:16px;background:#fff;box-shadow:var(--sp-shadow)}
body.sp-shared-shell .panel-head{border-bottom-color:var(--sp-border)}
body.sp-shared-shell .panel-head h3{color:var(--sp-ink)}
body.sp-shared-shell .btn-x.cta{background:linear-gradient(110deg,#b99156,#e1c38c);color:#102941}
/* Shared font preference. Scale only UI text, not entire layout. */
body.sp-shared-shell .app-shell{font-size:calc(1rem * var(--sp-font-scale));}
body.sp-shared-shell .sb-link{font-size:calc(.86rem * var(--sp-font-scale));}
body.sp-shared-shell .sb-group{font-size:calc(.7rem * var(--sp-font-scale));}
body.sp-shared-shell .sb-brand b{font-size:calc(1rem * var(--sp-font-scale));}
body.sp-shared-shell .sb-brand small,body.sp-shared-shell .sb-user small{font-size:calc(.73rem * var(--sp-font-scale));}
body.sp-shared-shell .tb-title{font-size:calc(.96rem * var(--sp-font-scale));}
body.sp-shared-shell .tb-year{font-size:calc(.75rem * var(--sp-font-scale));}
body.sp-shared-shell .app-content :is(p,td,th,label,input,textarea,select,.muted,small){font-size:calc(.84rem * var(--sp-font-scale));}
body.sp-shared-shell .app-content :is(h2,.hero-title){font-size:calc(1.45rem * var(--sp-font-scale));}
body.sp-shared-shell .app-content :is(h3,.panel-head h3){font-size:calc(1.05rem * var(--sp-font-scale));}
body.sp-shared-shell .sp-font-control{display:inline-flex;align-items:center;gap:3px;padding:4px;background:#f1f5f9;border:1px solid #dce6ef;border-radius:12px;white-space:nowrap}
body.sp-shared-shell .sp-font-label{font-size:12px;font-weight:700;color:#29445f;margin:0 5px}
body.sp-shared-shell .sp-font-control button{border:0;background:transparent;color:#29445f;border-radius:8px;min-width:39px;min-height:36px;padding:6px 9px;font-size:12px;font-weight:700}
body.sp-shared-shell .sp-font-control button[aria-pressed="true"]{background:linear-gradient(110deg,#b99156,#e1c38c);color:#102941;box-shadow:0 2px 6px #0002}
body.sp-shared-shell .sp-font-control button:focus-visible{outline:3px solid #39a5d5;outline-offset:2px}
@media(max-width:760px){body.sp-shared-shell .sp-font-label{display:none}body.sp-shared-shell .sp-font-control{padding:3px}body.sp-shared-shell .sp-font-control button{min-height:44px;min-width:37px;padding-inline:5px}body.sp-shared-shell .tb-right{gap:5px}body.sp-shared-shell .tb-year{display:none}}
@media(max-width:390px){body.sp-shared-shell .sp-font-control button{min-width:33px;font-size:11px}}
@media(prefers-reduced-motion:reduce){body.sp-shared-shell .sb-link{transition:none!important}}


/* ================================================================
   SmartPlan Shared UI v2 — cross-page typography & controls
   The font levels use the same absolute baseline as the approved
   Admin demo: small 100%, medium 115%, large 130%.
   All selectors are limited to the shared application shell.
   Existing page-specific functional CSS and data flow are unchanged.
   ================================================================ */
body.sp-shared-shell {
 --sp-base-text: 14px;
 --sp-nav-text: 13px;
 --sp-section-title: 15px;
 --sp-heading-text: 20px;
 --sp-caption-text: 11px;
 --sp-control-text: 14px;
 --sp-surface:#fff;
 --sp-soft-blue:#eef5fa;
 font-family:'Sarabun',system-ui,sans-serif;
}
/* Global text scale: preserve icons, grid geometry and charts */
body.sp-shared-shell .app-content {
 font-size:calc(var(--sp-base-text) * var(--sp-font-scale));
 line-height:1.55;
 color:var(--sp-ink);
}
body.sp-shared-shell .app-content :is(p, td, th, label, input, textarea, select, button, .btn, .btn-x, .form-label, .form-control, .form-select, .muted, .text-muted, .panel-body, .panel-tools, .table) {
 font-size:calc(var(--sp-base-text) * var(--sp-font-scale));
}
body.sp-shared-shell .app-content :is(.panel-head small, .hero-sub, .stat-card span:not(.ic-box), small, .form-text, .text-secondary) {
 font-size:calc(var(--sp-caption-text) * var(--sp-font-scale));
}
body.sp-shared-shell .app-content :is(h2, .hero-title) {
 font-size:calc(var(--sp-heading-text) * var(--sp-font-scale));
 line-height:1.3;
}
body.sp-shared-shell .app-content :is(h3, .panel-head h3) {
 font-size:calc(var(--sp-section-title) * var(--sp-font-scale));
 line-height:1.4;
}
body.sp-shared-shell .app-content h1 {font-size:calc(24px * var(--sp-font-scale));}
body.sp-shared-shell .app-content h4 {font-size:calc(14px * var(--sp-font-scale));}
body.sp-shared-shell .app-content .panel-head small {display:block;line-height:1.45;color:var(--sp-muted)}
body.sp-shared-shell .app-content :is(.form-control, .form-select, input:not([type=checkbox]):not([type=radio]), select, textarea) {
 border-color:#d6e2ec;
 border-radius:10px;
 background-color:#fff;
 color:var(--sp-ink);
 min-height:38px;
}
body.sp-shared-shell .app-content :is(.form-control,.form-select, input, select, textarea):focus-visible {
 outline:2px solid rgba(35,119,157,.4);
 outline-offset:1px;
}
body.sp-shared-shell .app-content :is(.btn-x, .btn, button):focus-visible {
 outline:2px solid #2b8ea9;
 outline-offset:2px;
}
body.sp-shared-shell .app-content .panel {background:var(--sp-surface);border-color:var(--sp-border)}
body.sp-shared-shell .app-content .panel-head {
 background:linear-gradient(90deg,#f3f7fb,#ffffff);
 border-bottom:1px solid var(--sp-border);
}
body.sp-shared-shell .app-content .panel-head .ic-box {background:#eaf3f9;color:#1c668c}
body.sp-shared-shell .app-content :is(.table,table.table) {color:var(--sp-ink)}
body.sp-shared-shell .app-content table.table thead th {background:#f0f5f9;color:#25465e;font-weight:700}
body.sp-shared-shell .app-content table.table tbody tr:hover {background:#f4f9fc}
body.sp-shared-shell .sb-link {font-size:calc(var(--sp-nav-text) * var(--sp-font-scale))}
body.sp-shared-shell .sb-group {font-size:calc(var(--sp-caption-text) * var(--sp-font-scale))}
body.sp-shared-shell .tb-title {font-size:calc(15px * var(--sp-font-scale))}
body.sp-shared-shell .sb-user b {font-size:calc(13px * var(--sp-font-scale))}
body.sp-shared-shell .sp-font-label {font-size:calc(11px * var(--sp-font-scale))}
body.sp-shared-shell .sp-font-control button {font-size:calc(12px * var(--sp-font-scale))}
/* Inline font declarations on the four-department permissions form
   must follow the same global preference; keep its original inputs,
   assignment names, and submit logic intact. */
body.sp-shared-shell.sp-page-user-permissions .app-content fieldset {
 border:1px solid var(--sp-border) !important;
 background:#fff;
 border-radius:14px;
}
body.sp-shared-shell.sp-page-user-permissions .app-content fieldset legend {
 font-size:calc(var(--sp-section-title) * var(--sp-font-scale)) !important;
 color:#173e59;
}
body.sp-shared-shell.sp-page-user-permissions .app-content fieldset label {
 font-size:calc(var(--sp-base-text) * var(--sp-font-scale)) !important;
 line-height:1.45;
}
body.sp-shared-shell.sp-page-user-permissions .app-content fieldset label small {
 font-size:calc(var(--sp-caption-text) * var(--sp-font-scale)) !important;
 color:var(--sp-muted) !important;
}
body.sp-shared-shell.sp-page-user-permissions .app-content fieldset input[type=checkbox] {
 width:18px;
 height:18px;
 flex-shrink:0;
 accent-color:#176d89;
}
/* Avoid modifying official printable templates or page-specific data exports. */
@media print {
 body.sp-shared-shell .app-content #print-root,
 body.sp-shared-shell .app-content #print-root * {font-size:revert;line-height:normal}
}
@media(max-width:760px){
 body.sp-shared-shell .app-content{overflow-wrap:anywhere}
 body.sp-shared-shell .app-content .panel-head{gap:10px}
 body.sp-shared-shell .sp-font-control button{min-height:44px}
}


/* ============================================================
   SmartPlan shared sidebar toggle — desktop and touch devices
   Keep the same menu on every page; only visibility changes.
   ============================================================ */
body.sp-shared-shell .tb-burger {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex: 0 0 auto;
 min-width: 42px;
 min-height: 42px;
 cursor: pointer;
}
body.sp-shared-shell .tb-burger:focus-visible,
body.sp-shared-shell .sb-close:focus-visible {
 outline: 3px solid #c6a268;
 outline-offset: 2px;
}
/* Desktop: hide the fixed sidebar and reclaim its full width. */
@media (min-width: 992px) {
 body.sp-shared-shell .app-sidebar {
  transition: transform .24s ease;
 }
 body.sp-shared-shell .app-main {
  transition: margin-left .24s ease;
 }
 body.sp-shared-shell .app-shell.sb-collapsed .app-sidebar {
  transform: translateX(-105%);
  pointer-events: none;
 }
 body.sp-shared-shell .app-shell.sb-collapsed .app-main {
  margin-left: 0;
 }
}
/* Mobile / iPad: preserve the existing slide-out drawer behavior. */
@media (max-width: 991.98px) {
 body.sp-shared-shell .app-shell.sb-open .app-sidebar {
  transform: translateX(0);
 }
 body.sp-shared-shell .app-shell.sb-open .sb-backdrop {
  display: block;
 }
 body.sp-shared-shell .sb-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
 }
}
@media (prefers-reduced-motion: reduce) {
 body.sp-shared-shell .app-sidebar,
 body.sp-shared-shell .app-main {transition: none !important;}
}

/* Admin sidebar: stable accordion menu on ALL admin pages. */
body.sp-shared-shell .app-sidebar .sp-admin-top-links {padding:3px 0 6px}
body.sp-shared-shell .app-sidebar .sp-admin-group {margin:5px 7px 0}
body.sp-shared-shell .app-sidebar .sp-admin-group-toggle {
  width:100%; min-height:43px; display:flex; align-items:center; gap:10px;
  padding:10px 11px; border:1px solid transparent; border-radius:10px;
  color:#dfeaf3; background:transparent; text-align:left; font-weight:700;
  font-size:calc(var(--sp-nav-text,13px) * var(--sp-font-scale,1));
  cursor:pointer; transition:background .16s ease;
}
body.sp-shared-shell .app-sidebar .sp-admin-group-toggle:hover,
body.sp-shared-shell .app-sidebar .sp-admin-group-toggle[aria-expanded="true"] {
  background:rgba(255,255,255,.085);
}
body.sp-shared-shell .app-sidebar .sp-admin-group-toggle:focus-visible {
  outline:2px solid #d4b476; outline-offset:2px;
}
body.sp-shared-shell .app-sidebar .sp-admin-group-icon {width:20px;text-align:center;color:#d8b77a}
body.sp-shared-shell .app-sidebar .sp-admin-group-toggle span {flex:1;min-width:0;line-height:1.4}
body.sp-shared-shell .app-sidebar .sp-admin-chevron {font-size:11px;color:#b9c9d8;transition:transform .18s ease}
body.sp-shared-shell .app-sidebar .sp-admin-group-toggle[aria-expanded="true"] .sp-admin-chevron {transform:rotate(180deg)}
body.sp-shared-shell .app-sidebar .sp-admin-group-items {padding:3px 0 6px 10px;border-left:1px solid rgba(218,230,242,.19);margin-left:21px}
body.sp-shared-shell .app-sidebar .sp-admin-group-items[hidden] {display:none!important}
body.sp-shared-shell .app-sidebar .sp-admin-group-items .sb-link {margin:2px 3px;padding:9px 9px;min-height:39px;line-height:1.4}
body.sp-shared-shell .app-sidebar .sp-admin-link.active {background:#d1ad70;color:#102a43;font-weight:800}
body.sp-shared-shell .app-sidebar .sp-admin-link.active i {color:#102a43}
body.sp-shared-shell .app-sidebar .sp-admin-top-links .sb-group {margin-top:8px}
@media (max-width:991.98px) {
 body.sp-shared-shell .app-sidebar .sp-admin-group-toggle {min-height:46px}
 body.sp-shared-shell .app-sidebar .sp-admin-group-items .sb-link {min-height:44px}
}
@media (prefers-reduced-motion:reduce) {
 body.sp-shared-shell .app-sidebar .sp-admin-chevron {transition:none}
}


/* === Admin > Users: Executive Navy & Gold (scoped, no side effects on plans / supervision) === */
body.sp-shared-shell.sp-page-users .hero {
  background:linear-gradient(115deg,#0b2340 0%,#173e5e 74%,#315f70 100%);
  border:1px solid #ffffff22;
}
body.sp-shared-shell.sp-page-users .hero .btn-x.cta,
body.sp-shared-shell.sp-page-users .hero .btn-x.primary {
  color:#102941;background:linear-gradient(110deg,#ead29e,#c5a063);
  border:1px solid #e6c78d;box-shadow:0 6px 18px rgba(3,20,39,.18);
}
body.sp-shared-shell.sp-page-users .hero .btn-x.ghost {
  background:rgba(255,255,255,.09);color:#fff;border-color:rgba(255,255,255,.42);
}
body.sp-shared-shell.sp-page-users .panel--purple::before {
  background:linear-gradient(90deg,#0e3453,#c6a268);
}
body.sp-shared-shell.sp-page-users .sp-users-table-wrap {overflow:auto;max-width:100%}
body.sp-shared-shell.sp-page-users .sp-users-table {width:100%;min-width:880px;border-collapse:separate;border-spacing:0}
body.sp-shared-shell.sp-page-users .sp-users-table thead th {
  position:sticky;top:0;z-index:1;background:#eaf1f7;color:#193b55;
  font-weight:800;border-bottom:2px solid #d9c195;padding:13px 12px;
  white-space:nowrap;
}
body.sp-shared-shell.sp-page-users .sp-users-table tbody td {padding:13px 12px;border-bottom:1px solid #e7edf3;vertical-align:middle}
body.sp-shared-shell.sp-page-users .sp-users-table tbody tr:nth-child(even) td {background:#f7f9fc}
body.sp-shared-shell.sp-page-users .sp-users-table tbody tr:hover td {background:#edf5f9}
body.sp-shared-shell.sp-page-users .sp-users-table .icon-btn {border-radius:9px;border:1px solid #dce6ef;background:white;color:#173e5e}
body.sp-shared-shell.sp-page-users .sp-users-table .icon-btn:hover {background:#eaf2fa;border-color:#bfd2e0}

/* SweetAlert is appended outside the page body shell; only opt-in user popup is affected. */
.swal2-popup.sheet.sp-user-modal {
  width:min(740px,calc(100vw - 24px)) !important;
  border:1px solid #dfe7ef;border-radius:20px;overflow:hidden;
  background:#fff;box-shadow:0 28px 85px rgba(3,28,51,.28);
  padding-bottom:17px;
}
.swal2-popup.sheet.sp-user-modal .sheet-head {
  --s1:#0b2340!important;--s2:#164765!important;--s3:#c6a268!important;
  background:linear-gradient(113deg,#0b2340,#184765 78%,#23546a)!important;
  border-bottom:3px solid #c6a268;
}
.swal2-popup.sheet.sp-user-modal .sheet-head h3 {font-family:'Sarabun',sans-serif;font-size:calc(21px * var(--sp-user-scale,1.15));font-weight:800}
.swal2-popup.sheet.sp-user-modal .sheet-body {padding:22px 25px 6px;max-height:min(68vh,680px);overflow-y:auto}
.swal2-popup.sheet.sp-user-modal .sp-user-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 18px;text-align:left}
.swal2-popup.sheet.sp-user-modal .sp-user-intro {grid-column:1/-1;display:flex;gap:11px;align-items:center;background:#eff5f9;padding:13px 15px;border-radius:12px;border:1px solid #dce7f0}
.swal2-popup.sheet.sp-user-modal .sp-user-intro-icon {display:grid;place-items:center;flex-shrink:0;width:39px;height:39px;border-radius:11px;color:#133858;background:#e0cb9f;font-size:20px}
.swal2-popup.sheet.sp-user-modal .sp-user-intro strong {display:block;color:#163851;font-size:calc(14px * var(--sp-user-scale,1.15))}
.swal2-popup.sheet.sp-user-modal .sp-user-intro small {display:block;color:#5b7187;font-size:calc(11px * var(--sp-user-scale,1.15));margin-top:3px}
.swal2-popup.sheet.sp-user-modal .sp-user-field {min-width:0}
.swal2-popup.sheet.sp-user-modal .sp-user-field label {display:block;margin:0 0 7px!important;font-size:calc(13px * var(--sp-user-scale,1.15));font-weight:700;color:#163851}
.swal2-popup.sheet.sp-user-modal .sp-user-field :is(input,select) {
  width:100%;min-height:47px;border:1px solid #d3e0ea;border-radius:10px;background:#fff;
  color:#1b3650;font-family:'Sarabun',sans-serif;font-size:calc(14px * var(--sp-user-scale,1.15));padding:10px 12px;
}
.swal2-popup.sheet.sp-user-modal .sp-user-field :is(input,select):focus {outline:3px solid rgba(35,127,162,.16);border-color:#287fa2;box-shadow:none}
.swal2-popup.sheet.sp-user-modal .sp-user-info {grid-column:1/-1;color:#516b80;background:#fffaf0;border-left:3px solid #c6a268;padding:11px 14px;font-size:calc(11px * var(--sp-user-scale,1.15));line-height:1.6}
.swal2-popup.sheet.sp-user-modal .swal2-actions {padding:8px 23px 0;gap:9px}
.swal2-popup.sheet.sp-user-modal .swal2-confirm {background:linear-gradient(105deg,#0d3d60,#1c6682);border-color:#0d3d60;color:white}
.swal2-popup.sheet.sp-user-modal .swal2-cancel {border-color:#d7e2ea;color:#21445d;background:#fff}
@media(max-width:620px){
 .swal2-popup.sheet.sp-user-modal .sheet-body {padding:15px 15px 4px;max-height:70dvh}
 .swal2-popup.sheet.sp-user-modal .sp-user-form-grid {grid-template-columns:1fr;gap:13px}
 .swal2-popup.sheet.sp-user-modal .sp-user-intro {padding:11px}
 .swal2-popup.sheet.sp-user-modal .swal2-actions{margin-top:10px}
 .swal2-popup.sheet.sp-user-modal .swal2-actions .btn-x{min-height:44px}
}


/* === Shared Admin / Teacher dashboard right rail (Executive Navy & Gold) ===
   The same component classes are used by both dashboards.
   Keep this section in smartplan-ui.css, not in a Teacher-only stylesheet. */
body.sp-shared-shell .sp-shared-rightside{display:flex;flex-direction:column;gap:16px;min-width:0}
body.sp-shared-shell .sp-shared-rightside .sp-rail-panel{background:#fff;border:1px solid #e4ebf1;border-top:3px solid #aaa0ff;border-radius:15px;overflow:hidden;box-shadow:0 9px 28px rgba(24,58,88,.07)}
body.sp-shared-shell .sp-shared-rightside .sp-rail-head{padding:14px 14px 10px;display:flex;justify-content:space-between;align-items:start;gap:7px;border-bottom:1px solid #e4ebf1}
body.sp-shared-shell .sp-shared-rightside .sp-rail-head strong{font-size:calc(13px * var(--sp-font-scale));font-weight:800;color:#243d55}
body.sp-shared-shell .sp-shared-rightside .sp-rail-head small{display:block;color:#8a9cae;font-size:calc(10px * var(--sp-font-scale));margin-top:3px}
body.sp-shared-shell .sp-shared-rightside .sp-rail-head a{font-size:calc(11px * var(--sp-font-scale));font-weight:700;color:#2477a4;white-space:nowrap}
body.sp-shared-shell .sp-shared-rightside .sp-rail-list{padding:0 13px 7px}
body.sp-shared-shell .sp-shared-rightside .sp-rail-item{display:flex;align-items:flex-start;gap:9px;padding:10px 0;border-top:1px solid #edf1f5;color:#213d56;text-decoration:none}
body.sp-shared-shell .sp-shared-rightside .sp-rail-item:first-child{border-top:0}
body.sp-shared-shell .sp-shared-rightside .sp-rail-item:hover strong{text-decoration:underline}
body.sp-shared-shell .sp-shared-rightside .sp-rail-icon{height:31px;width:31px;border-radius:9px;flex:0 0 31px;background:#e9f2fb;color:#2884ca;display:grid;place-items:center}
body.sp-shared-shell .sp-shared-rightside .sp-rail-item strong{display:block;font-size:calc(11px * var(--sp-font-scale));line-height:1.4}
body.sp-shared-shell .sp-shared-rightside .sp-rail-item small{display:block;font-size:calc(10px * var(--sp-font-scale));color:#8d9eaf;margin-top:2px}
body.sp-shared-shell .sp-shared-rightside .sp-rail-count{font-size:calc(10px * var(--sp-font-scale));color:#287dd0;font-weight:700}
body.sp-shared-shell .sp-shared-rightside .sp-rail-cal{padding:9px 13px 14px}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calhead{display:flex;align-items:center;justify-content:space-between;margin:4px 0 10px}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calhead strong{font-size:calc(12px * var(--sp-font-scale))}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calhead button{width:31px;height:31px;border:0;border-radius:8px;background:#eff4f8;color:#637f97;cursor:pointer}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calgrid span{display:grid;place-items:center;min-height:28px;border-radius:8px;font-size:calc(10px * var(--sp-font-scale));color:#60788d}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calgrid .weekday{color:#9aabb9;font-weight:700}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calgrid .today{background:#102d50;color:#fff;font-weight:800}
body.sp-shared-shell .sp-shared-rightside .sp-rail-calgrid .marked{background:#f3e6cf;color:#997126;font-weight:800}
body.sp-shared-shell .sp-shared-rightside .sp-rail-activity{padding:9px 14px 14px;color:#71869a;font-size:calc(11px * var(--sp-font-scale))}
@media(max-width:1220px){body.sp-shared-shell .sp-tw-dashboard-layout{grid-template-columns:1fr}body.sp-shared-shell .sp-shared-rightside{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
@media(max-width:650px){body.sp-shared-shell .sp-shared-rightside{grid-template-columns:1fr}}

/* Content + rail grid shared by Teacher Workspace */
body.sp-shared-shell .sp-tw-dashboard-layout{display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:15px;align-items:start}
body.sp-shared-shell .sp-tw-dashboard-layout>.sp-tw-grid{min-width:0}
@media(max-width:1450px){body.sp-shared-shell .sp-tw-dashboard-layout{grid-template-columns:minmax(0,1fr) 250px}}
@media(max-width:1200px){body.sp-shared-shell .sp-tw-dashboard-layout{grid-template-columns:1fr}body.sp-shared-shell .sp-admin-dashboard .sp-shared-rightside{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}}
@media(max-width:850px){body.sp-shared-shell .sp-admin-dashboard .sp-shared-rightside{grid-template-columns:repeat(2,minmax(0,1fr))}body.sp-shared-shell .sp-admin-dashboard .sp-shared-rightside>.side-panel:last-child{grid-column:1/-1}}
@media(max-width:600px){body.sp-shared-shell .sp-admin-dashboard .sp-shared-rightside{grid-template-columns:1fr}body.sp-shared-shell .sp-admin-dashboard .sp-shared-rightside>.side-panel:last-child{grid-column:auto}}
