body {
  display: block;
}

button,
input,
select,
textarea {
  border-radius: var(--radius-control);
}

button {
  border: 1px solid var(--color-primary-blue);
  padding: var(--space-2) var(--space-4);
  color: var(--color-surface-raised);
  background: var(--color-primary-blue);
  font-weight: 700;
}

button:hover:not(:disabled) {
  filter: brightness(.94);
}

button:disabled {
  opacity: .58;
}

a {
  text-decoration-thickness: .08em;
  text-underline-offset: .16em;
}

main,
form,
section,
article,
fieldset,
table,
nav,
#app-header > div {
  display: flex;
  gap: var(--space-3);
}

#login-screen {
  width: min(calc(100% - var(--space-6)), 31rem);
  margin: clamp(var(--space-6), 10vh, var(--space-8)) auto;
  padding: var(--space-6);
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

#login-screen header,
#login-screen footer {
  display: grid;
  gap: var(--space-2);
}

.school-logo {
  width: 3.5rem;
  height: 3.5rem;
}

#login-screen h1 {
  margin: 0;
  color: var(--color-primary-blue);
  font-size: clamp(1.4rem, 3vw, 2rem);
}

#login-form {
  display: grid;
  gap: var(--space-3);
}

#section-picker {
  display: grid;
  gap: var(--space-3);
}

#login-form button,
#section-picker button {
  width: 100%;
  margin-block-start: var(--space-2);
}

#login-error,
#section-error {
  color: var(--color-danger);
}

#app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

#sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-5);
  color: var(--color-surface-raised);
  background: var(--color-primary-blue);
}

#brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

#primary-navigation {
  display: grid;
  align-content: start;
  gap: var(--space-2);
}

#primary-navigation a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  color: inherit;
  text-decoration: none;
}

#primary-navigation a:hover,
#primary-navigation a[aria-current="page"] {
  background: rgb(255 255 255 / 18%);
}

#app-content {
  min-width: 0;
}

#app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--page-gutter);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

#current-user {
  margin: 0;
  font-weight: 700;
}

#view {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: var(--space-4);
  max-width: var(--content-width);
  margin-inline: auto;
  padding: var(--page-gutter);
}

#view > h1,
#view > form,
#view > table,
#view > p,
#view > div:has(> section) {
  grid-column: 1 / -1;
}

#view > form,
#view > div,
#view article,
#view section {
  min-width: 0;
}

#view form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  align-items: end;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

#view label {
  display: grid;
  gap: var(--space-1);
}

#view table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
}

#view th,
#view td {
  min-width: 7rem;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  text-align: start;
}

#view th {
  background: var(--color-table-header);
}

#view article {
  flex-direction: column;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

#view fieldset {
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
}

#view fieldset label {
  display: flex;
  align-items: center;
}

#view fieldset input[type="checkbox"] {
  width: auto;
}

#view canvas,
#view svg {
  width: 100%;
  max-height: 24rem;
}

#view svg text {
  fill: currentColor;
  font-size: .8rem;
}

@media (max-width: 48rem) {
  :root {
    --page-gutter: .875rem;
    --sidebar-width: auto;
  }

  #app-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  #sidebar {
    gap: var(--space-2);
    padding: var(--space-3) var(--page-gutter);
  }

  #primary-navigation {
    display: flex;
    overflow-x: auto;
    padding-block-end: var(--space-1);
  }

  #primary-navigation a {
    flex: 0 0 auto;
  }

  #app-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #app-header > div {
    flex-wrap: wrap;
  }

  #view > div:has(> section) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #view > form {
    grid-template-columns: minmax(0, 1fr);
  }

  #view {
    grid-template-columns: minmax(0, 1fr);
  }

  #login-screen {
    padding: var(--space-4);
  }
}

#view section {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}

@media (min-width: 48.01rem) {
  #view > div:has(> section) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
  }
}

@media (min-width: 48.01rem) and (max-width: 64rem) {
  #view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Visual language inspired by the supplied mobile reference: soft icon tiles,
   royal blue navigation, green success accents, and rounded cards. */
.nav-icon {
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
}

#primary-navigation a {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 3rem;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}

#primary-navigation a .nav-icon {
  color: currentColor;
}

#primary-navigation a:hover {
  transform: translateY(-1px);
}

#view > article {
  position: relative;
  overflow: hidden;
  min-height: 7rem;
  justify-content: center;
}

#view > article::before {
  content: "";
  position: absolute;
  inset: -2.5rem auto auto -2.5rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: rgb(30 95 191 / 7%);
}

#view > article:nth-of-type(2)::before { background: rgb(31 157 85 / 8%); }
#view > article:nth-of-type(3)::before { background: rgb(243 185 65 / 10%); }
#view > article:nth-of-type(4)::before { background: rgb(213 51 59 / 8%); }

@media (max-width: 48rem) {
  body { padding-bottom: 5.1rem; }

  #app-shell { display: block; min-height: 100vh; }
  #sidebar {
    padding: .75rem 1rem .25rem;
    background: linear-gradient(135deg, #1E5FBF 0%, #174C9B 100%);
  }
  #brand { justify-content: center; font-size: 1.05rem; }
  #primary-navigation {
    position: fixed;
    z-index: 50;
    inset: auto 0 0 0;
    height: 4.75rem;
    padding: .45rem .5rem .35rem;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: .15rem;
    overflow: hidden;
    background: rgb(255 255 255 / 97%);
    border-top: 1px solid #E2E8F0;
    box-shadow: 0 -8px 25px rgb(30 95 191 / 10%);
    backdrop-filter: blur(12px);
  }

  #primary-navigation a {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    height: 3.9rem;
    padding: .35rem .15rem;
    flex-direction: column;
    justify-content: center;
    gap: .22rem;
    color: #6C7785;
    border-radius: 1.25rem;
    font-size: .72rem;
    font-weight: 700;
    text-align: center;
  }

  #primary-navigation a .nav-icon {
    width: 1.55rem;
    height: 1.55rem;
    padding: .26rem;
    box-sizing: content-box;
    border-radius: .9rem;
    background: #EFF4FC;
    color: #1E5FBF;
  }

  #primary-navigation a[aria-current="page"] {
    color: #1E5FBF;
    background: #EDF3FF;
  }

  #primary-navigation a[aria-current="page"] .nav-icon {
    color: #1E5FBF;
    background: #DCE8FB;
  }

  /* Keep the five primary destinations visible like the reference. */
  #primary-navigation a[data-mobile-priority="false"] { display: none; }

  #app-header {
    border-bottom: 0;
    background: transparent;
    padding: .8rem 1rem .25rem;
  }

  #view {
    padding: 1rem;
    gap: .85rem;
  }

  #view > article {
    border-radius: 1.45rem;
    min-height: 8.2rem;
    padding: 1.1rem;
    box-shadow: 0 8px 25px rgb(23 36 58 / 7%);
  }
}

.dashboard-kpi .kpi-icon {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  margin-bottom: .25rem;
  color: var(--color-primary-blue);
  background: #EAF1FC;
}
.dashboard-kpi .kpi-icon svg { width: 1.65rem; height: 1.65rem; }
.dashboard-kpi .kpi-green { color: var(--color-primary-green); background: #ECF8E8; }
.dashboard-kpi .kpi-chart { color: #2F7BC5; background: #EDF3FC; }
.dashboard-kpi .kpi-report { color: var(--color-danger); background: #FCECEE; }

/* Reference-matched dashboard cards: soft shadow + pastel corner accent. */
.dashboard-kpi {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 10.5rem;
  padding: 1.35rem 1.35rem 1.2rem !important;
  border: 1px solid rgb(223 230 239 / 72%) !important;
  border-radius: 1.65rem !important;
  background: #fff !important;
  box-shadow:
    0 16px 34px rgb(28 55 92 / 9%),
    0 3px 10px rgb(28 55 92 / 5%) !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-kpi:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 40px rgb(28 55 92 / 12%),
    0 4px 12px rgb(28 55 92 / 6%) !important;
}

.dashboard-kpi::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -2.2rem;
  left: -2.2rem;
  width: 6.8rem;
  height: 6.8rem;
  border-radius: 0 0 100% 0;
  opacity: .92;
}

.dashboard-kpi::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto -1.2rem -1.2rem auto;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  filter: blur(1px);
  opacity: .22;
}

.dashboard-kpi .kpi-icon {
  position: relative;
  align-self: flex-end;
  width: 3.55rem;
  height: 3.55rem;
  margin: 0 0 .8rem 0;
  border-radius: 1.15rem;
  box-shadow: 0 8px 18px rgb(28 55 92 / 7%);
}

.dashboard-kpi .kpi-icon svg {
  width: 1.85rem;
  height: 1.85rem;
}

.dashboard-kpi h2 {
  order: 3;
  margin: 0;
  color: #68758A;
  font-size: .98rem;
  font-weight: 700;
}

.dashboard-kpi p {
  order: 2;
  margin: 0 0 .05rem;
  color: #17243A;
  font-size: 1.9rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}

.dashboard-kpi .kpi-icon { order: 1; }
.dashboard-kpi.kpi-users::before { background: rgb(72 137 232 / 22%); }
.dashboard-kpi.kpi-users::after { background: #4B8FE8; }
.dashboard-kpi.kpi-check::before { background: rgb(111 220 98 / 23%); }
.dashboard-kpi.kpi-check::after { background: #5ED36C; }
.dashboard-kpi.kpi-chart::before { background: rgb(255 204 77 / 27%); }
.dashboard-kpi.kpi-chart::after { background: #F4C94E; }
.dashboard-kpi.kpi-report::before { background: rgb(246 105 113 / 20%); }
.dashboard-kpi.kpi-report::after { background: #EF6D74; }

.dashboard-kpi.kpi-users .kpi-icon { color: #2166C5; background: #EAF2FF; }
.dashboard-kpi.kpi-check .kpi-icon { color: #48A93B; background: #ECFAE9; }
.dashboard-kpi.kpi-chart .kpi-icon { color: #D59B16; background: #FFF8DF; }
.dashboard-kpi.kpi-report .kpi-icon { color: #D5333B; background: #FDECEF; }

@media (max-width: 48rem) {
  #view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    padding: 1rem;
    background: linear-gradient(180deg, #F4F7FC 0%, #F8FAFD 100%);
  }

  #view > h1 {
    grid-column: 1 / -1;
  }

  .dashboard-kpi {
    min-height: 10.2rem;
    padding: 1rem !important;
    border-radius: 1.55rem !important;
    box-shadow:
      0 13px 28px rgb(28 55 92 / 10%),
      0 3px 9px rgb(28 55 92 / 5%) !important;
  }

  .dashboard-kpi::before {
    top: -2.1rem;
    left: -2.1rem;
    width: 6.4rem;
    height: 6.4rem;
  }

  .dashboard-kpi .kpi-icon {
    width: 3.15rem;
    height: 3.15rem;
    margin-bottom: .75rem;
    border-radius: 1rem;
  }

  .dashboard-kpi .kpi-icon svg {
    width: 1.65rem;
    height: 1.65rem;
  }

  .dashboard-kpi p {
    font-size: 1.75rem;
  }

  .dashboard-kpi h2 {
    font-size: .88rem;
  }
}

/* Reference dashboard: soft corner color, icon tiles, and elevated cards */
.dashboard-page-title {
  display: none;
}

.dashboard-school-hero {
  grid-column: 1 / -1;
  position: relative;
  min-height: 13rem;
  padding: 2rem 2.5rem;
  align-items: center;
  overflow: hidden;
  border: 0 !important;
  border-radius: 2rem !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 18px 42px rgba(30,95,191,.13), 0 3px 12px rgba(23,36,58,.05) !important;
}
.dashboard-school-hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -2rem;
  inset-block: 0;
  width: 1.1rem;
  background: #1E5FBF;
  border-radius: 1rem 0 0 1rem;
}
.school-hero-icon {
  flex: 0 0 9.5rem;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 2rem;
  background: #E9F1FF;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(30,95,191,.05);
}
.school-hero-icon::before {
  content: "";
  position: absolute;
  inset: 25%;
  border: .35rem solid #1E5FBF;
  border-top-width: .75rem;
  border-radius: .6rem .6rem .35rem .35rem;
  box-shadow: 0 .5rem 0 -0.1rem #1E5FBF;
}
.school-hero-copy { margin-inline-start: auto; text-align: end; gap: .45rem !important; }
.school-pill {
  display: inline-flex;
  width: fit-content;
  margin-inline-start: auto;
  padding: .55rem 1rem;
  border-radius: 999px;
  color: #1454B3;
  background: #E8F0FF;
  font-weight: 800;
}
.school-title { margin: .35rem 0 0; font-size: clamp(1.8rem, 3vw, 2.8rem); color: #172B4D; }
.school-date { margin: 0; color: #66758B; font-size: 1rem; }

.dashboard-kpi {
  position: relative;
  min-height: 14rem;
  padding: 1.5rem 2rem 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(223,230,239,.5) !important;
  border-radius: 2rem !important;
  background: rgba(255,255,255,.97) !important;
  box-shadow: 0 18px 40px rgba(31,55,90,.10), 0 4px 14px rgba(31,55,90,.05) !important;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dashboard-kpi:hover { transform: translateY(-3px); box-shadow: 0 24px 48px rgba(31,55,90,.14), 0 5px 16px rgba(31,55,90,.06) !important; }
.kpi-corner {
  position: absolute;
  inset-block-start: -2.8rem;
  inset-inline-start: -2.8rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  opacity: .95;
}
.kpi-tone-blue .kpi-corner { background: #C9DCFF; }
.kpi-tone-green .kpi-corner { background: #C8F5C8; }
.kpi-tone-yellow .kpi-corner { background: #FFE9A8; }
.kpi-tone-red .kpi-corner { background: #FFC8CC; }
.kpi-icon {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  width: 5.4rem;
  height: 5.4rem;
  display: grid;
  place-items: center;
  margin-block-end: .5rem;
  border-radius: 1.55rem;
  box-shadow: 0 10px 24px rgba(31,55,90,.06);
}
.kpi-tone-blue .kpi-icon { color:#125BC4; background:#E9F1FF; }
.kpi-tone-green .kpi-icon { color:#39A83C; background:#E9FBEA; }
.kpi-tone-yellow .kpi-icon { color:#F2A900; background:#FFF7DE; }
.kpi-tone-red .kpi-icon { color:#E7353D; background:#FFE8EB; }
.kpi-icon svg { width: 3rem; height: 3rem; }
.dashboard-kpi h2 { position:relative; z-index:1; order:3; margin:0; color:#60708F; font-size:1.15rem; font-weight:600; }
.dashboard-kpi p { position:relative; z-index:1; order:2; margin:.15rem 0 0; color:#172B4D; font-size:2.15rem; line-height:1.1; font-weight:800; }
.dashboard-kpi .kpi-icon { order:1; }

.dashboard-shortcuts {
  grid-column: 1 / -1;
  min-height: 5rem;
  align-items: center;
  justify-content: flex-start;
  padding: .7rem 1rem .7rem 1.4rem;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 14px 34px rgba(31,55,90,.09) !important;
}
.dashboard-shortcuts h2 { margin:0; font-size:1.3rem; }
.shortcut-grid-icon { margin-inline-start:auto; width:3.7rem; height:3.7rem; border-radius:1.3rem; background:#E7F0FF; position:relative; }
.shortcut-grid-icon::before { content:""; position:absolute; width:.65rem; height:.65rem; background:#1661CF; border-radius:.15rem; top:.85rem; left:.85rem; box-shadow:1.05rem 0 #1661CF,0 1.05rem #1661CF,1.05rem 1.05rem #1661CF; }

@media (max-width: 48rem) {
  body { background: linear-gradient(180deg, #0D57C9 0 16rem, #F3F7FD 16rem 100%); }
  #app-shell { min-height:100vh; }
  #sidebar { position:fixed; inset-inline:0; inset-block-end:0; z-index:100; height:5.5rem; padding:.45rem .65rem .35rem; border-radius:2rem 2rem 0 0; background:rgba(255,255,255,.96); box-shadow:0 -12px 35px rgba(30,95,191,.14); backdrop-filter:blur(16px); }
  #brand { display:none; }
  #primary-navigation { width:100%; height:100%; display:grid; grid-template-columns:repeat(5,1fr); gap:.25rem; overflow:visible; }
  #primary-navigation a { min-width:0; padding:.35rem .15rem; border-radius:1.7rem; color:#6E7E9C; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.12rem; font-size:.72rem; font-weight:700; text-decoration:none; }
  #primary-navigation a .nav-icon { width:1.75rem; height:1.75rem; }
  #primary-navigation a[aria-current="page"] { color:#155FC9; background:#E8F1FF; }
  #primary-navigation a[data-mobile-priority="false"] { display:none; }
  #app-content { padding-bottom:5.6rem; }
  #app-header { position:relative; min-height:11rem; padding:4.2rem 1.3rem 1rem; border:0; background:transparent; color:#fff; }
  #app-header::before { content:""; position:absolute; inset-block-start:1.2rem; inset-inline-start:1.1rem; width:3.6rem; height:3.6rem; border-radius:1.3rem; background:rgba(255,255,255,.14); box-shadow:0 8px 24px rgba(0,0,0,.05); }
  #current-user { margin-inline-end:0; font-size:.9rem; font-weight:500; }
  #app-header > div { position:absolute; inset-block-start:1.55rem; inset-inline-start:1.65rem; }
  #language-toggle, #logout-button { display:none; }
  #app-header > div::before { content:"⚙"; display:grid; place-items:center; width:2.5rem; height:2.5rem; border-radius:1rem; color:#fff; font-size:1.45rem; }
  #view { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.9rem; padding:0 1rem 1.25rem; max-width:none; }
  #view > h1 { display:none; }
  .dashboard-school-hero { grid-column:1/-1; min-height:12rem; padding:1.1rem 1rem; border-radius:2rem !important; }
  .dashboard-school-hero::after { width:.55rem; inset-inline-end:-.1rem; }
  .school-hero-icon { flex-basis:6.8rem; width:6.8rem; height:6.8rem; border-radius:1.7rem; }
  .school-hero-copy { padding-inline-start:.6rem; }
  .school-pill { font-size:.75rem; padding:.42rem .7rem; }
  .school-title { font-size:1.45rem; line-height:1.25; }
  .school-date { font-size:.72rem; }
  .dashboard-kpi { min-height:12.8rem; padding:1.05rem 1rem 1rem; border-radius:2rem !important; }
  .kpi-corner { width:6.5rem; height:6.5rem; inset-block-start:-2.3rem; inset-inline-start:-2.3rem; }
  .kpi-icon { width:4.4rem; height:4.4rem; border-radius:1.35rem; }
  .kpi-icon svg { width:2.45rem; height:2.45rem; }
  .dashboard-kpi p { font-size:1.9rem; margin-top:.15rem; }
  .dashboard-kpi h2 { font-size:1rem; }
  .dashboard-shortcuts { min-height:4.1rem; padding:.45rem .7rem .45rem 1rem; border-radius:999px !important; }
  .dashboard-shortcuts h2 { font-size:1.05rem; }
  .shortcut-grid-icon { width:3rem; height:3rem; border-radius:1.1rem; }
  .shortcut-grid-icon::before { transform:scale(.85); transform-origin:center; }
  #view > div:has(> section) { display:none; }
}

/* Final reference lock: dashboard mirrors the supplied mobile reference. */
#view[data-route="dashboard"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 66rem;
  align-items: stretch;
  gap: 1.05rem;
  padding-top: 1.2rem;
  padding-bottom: 2rem;
}
#view[data-route="dashboard"] > .dashboard-school-hero,
#view[data-route="dashboard"] > .dashboard-shortcuts,
#view[data-route="dashboard"] > .dashboard-charts {
  grid-column: 1 / -1;
}
#view[data-route="dashboard"] > .dashboard-kpi {
  min-width: 0;
}

.dashboard-school-hero {
  min-height: 13.6rem;
  padding: 1.8rem 2.6rem !important;
  border-radius: 2rem !important;
  background: #fff !important;
  box-shadow: 0 18px 42px rgb(38 82 139 / 13%), 0 3px 12px rgb(23 36 58 / 5%) !important;
}
.dashboard-school-hero::after {
  width: .75rem;
  inset-inline-end: -.1rem;
  background: #2a72e6;
  border-radius: 1rem 0 0 1rem;
}
.school-hero-icon {
  flex: 0 0 9.4rem;
  width: 9.4rem;
  height: 9.4rem;
  border-radius: 2rem;
  background: #e9f1ff;
  color: #1762cf;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgb(30 95 191 / 4%);
}
.school-hero-icon svg { width: 6rem; height: 6rem; }
.school-hero-copy { align-items: flex-end !important; }
.school-pill {
  padding: .55rem 1.05rem;
  border-radius: 999px;
  background: #e8f0ff;
  color: #155fc8;
  font-size: 1rem;
}
.school-title { font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.2; }
.school-date {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  color: #72819a;
  font-size: 1rem;
}
.school-date-dot { width: .62rem; height: .62rem; border-radius: 50%; background: #a9d83b; display: inline-block; }
.school-date-icon { width: 1.35rem; height: 1.35rem; border: .15rem solid #71809a; border-radius: .22rem; position: relative; display: inline-block; }
.school-date-icon::before { content:""; position:absolute; inset-inline: .12rem; top: .22rem; height: .12rem; background:#71809a; }
.school-date-icon::after { content:""; position:absolute; top:-.32rem; inset-inline-start:.22rem; width:.12rem; height:.38rem; background:#71809a; box-shadow:.55rem 0 #71809a; }

.dashboard-kpi {
  min-height: 15.5rem;
  padding: 1.5rem 2rem 1.35rem !important;
  border-radius: 2rem !important;
  background: rgba(255,255,255,.98) !important;
  box-shadow: 0 18px 42px rgb(31 67 112 / 10%), 0 4px 14px rgb(31 67 112 / 5%) !important;
}
.dashboard-kpi::before {
  top: -2.9rem;
  left: -2.9rem;
  width: 8.4rem;
  height: 8.4rem;
}
.dashboard-kpi::after { width: 5rem; height: 5rem; opacity: .18; }
.dashboard-kpi .kpi-icon {
  width: 5.35rem;
  height: 5.35rem;
  margin-bottom: .8rem;
  border-radius: 1.6rem;
}
.dashboard-kpi .kpi-icon svg { width: 3rem; height: 3rem; }
.dashboard-kpi p { font-size: 2.25rem; }
.dashboard-kpi h2 { font-size: 1.25rem; color: #657493; }
.dashboard-kpi.kpi-tone-green::before { background: #c8f5c8; }
.dashboard-kpi.kpi-tone-blue::before { background: #c9dcff; }
.dashboard-kpi.kpi-tone-yellow::before { background: #ffe6a0; }
.dashboard-kpi.kpi-tone-red::before { background: #ffc8cc; }
.dashboard-kpi.kpi-tone-green .kpi-icon { color:#36a73c; background:#e9fbe9; }
.dashboard-kpi.kpi-tone-blue .kpi-icon { color:#1762cf; background:#e9f1ff; }
.dashboard-kpi.kpi-tone-yellow .kpi-icon { color:#f0a800; background:#fff7dd; }
.dashboard-kpi.kpi-tone-red .kpi-icon { color:#e5363f; background:#ffe8eb; }

.dashboard-shortcuts {
  min-height: 5.2rem;
  padding: .65rem 1rem .65rem 1.6rem !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 14px 34px rgb(31 67 112 / 9%) !important;
}
.dashboard-shortcuts h2 { font-size: 1.45rem; color:#172b4d; }
.shortcut-grid-icon { width: 4rem; height: 4rem; border-radius: 1.35rem; background:#e7f0ff; }

.dashboard-charts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem;
}
.dashboard-chart-card {
  background:#fff;
  border-radius:1.5rem;
  padding:1rem;
  box-shadow:0 10px 26px rgb(31 67 112 / 8%);
}
.dashboard-chart-card h2 { margin:0; font-size:1rem; }

.mobile-nav-label { display:none; }

@media (max-width: 48rem) {
  #view[data-route="dashboard"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
    padding: 0 1rem 1.2rem;
    max-width:none;
  }
  .dashboard-school-hero {
    min-height: 13rem;
    padding: 1.25rem 1rem !important;
  }
  .school-hero-icon { flex-basis: 7rem; width:7rem; height:7rem; border-radius:1.75rem; }
  .school-hero-icon svg { width:4.6rem; height:4.6rem; }
  .school-pill { font-size:.78rem; padding:.42rem .72rem; }
  .school-title { font-size:1.55rem; }
  .school-date { font-size:.72rem; gap:.4rem; }
  .school-date-icon { width:1rem; height:1rem; border-width:.11rem; }
  .school-date-icon::before { top:.16rem; height:.08rem; }
  .school-date-icon::after { top:-.24rem; height:.28rem; width:.08rem; box-shadow:.4rem 0 #71809a; }
  .school-date-dot { width:.42rem; height:.42rem; }
  .dashboard-kpi { min-height: 12.9rem; padding:1.1rem 1rem 1rem !important; border-radius:2rem !important; }
  .dashboard-kpi::before { width:6.6rem; height:6.6rem; top:-2.25rem; left:-2.25rem; }
  .dashboard-kpi .kpi-icon { width:4.5rem; height:4.5rem; border-radius:1.35rem; }
  .dashboard-kpi .kpi-icon svg { width:2.55rem; height:2.55rem; }
  .dashboard-kpi p { font-size:1.9rem; }
  .dashboard-kpi h2 { font-size:.98rem; }
  .dashboard-shortcuts { min-height:4.4rem; padding:.45rem .7rem .45rem 1rem !important; }
  .dashboard-shortcuts h2 { font-size:1.1rem; }
  .shortcut-grid-icon { width:3.2rem; height:3.2rem; border-radius:1.1rem; }
  .dashboard-charts { display:none; }
  .desktop-nav-label { display:none; }
  .mobile-nav-label { display:block; }
  #primary-navigation a { order: var(--mobile-order); }
}


/* === FINAL REFERENCE LOCK — DO NOT ALTER DASHBOARD VISUALS === */
#view[data-route="dashboard"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 2.05rem 2rem !important;
  max-width: 64rem !important;
  padding: 1.4rem 1.9rem 7.5rem !important;
  margin: 0 auto !important;
}
#view[data-route="dashboard"] > h1 { display:none !important; }
#view[data-route="dashboard"] > .dashboard-school-hero,
#view[data-route="dashboard"] > .dashboard-shortcuts { grid-column: 1 / -1 !important; }
#view[data-route="dashboard"] > .dashboard-kpi[data-card="teachers"] { grid-column:2; grid-row:2; }
#view[data-route="dashboard"] > .dashboard-kpi[data-card="students"] { grid-column:1; grid-row:2; }
#view[data-route="dashboard"] > .dashboard-kpi[data-card="absences"] { grid-column:2; grid-row:3; }
#view[data-route="dashboard"] > .dashboard-kpi[data-card="classes"] { grid-column:1; grid-row:3; }
#view[data-route="dashboard"] > .dashboard-kpi[data-card="late"] { grid-column:2; grid-row:4; }
#view[data-route="dashboard"] > .dashboard-kpi[data-card="messages"] { grid-column:1; grid-row:4; }
#view[data-route="dashboard"] > .dashboard-school-hero { grid-row:1; }
#view[data-route="dashboard"] > .dashboard-shortcuts { grid-row:5; }
#view[data-route="dashboard"] > .dashboard-charts { display:none !important; }

body:has(#view[data-route="dashboard"]) {
  background: linear-gradient(180deg,#0755c9 0 16.2rem,#f2f6fd 16.2rem 100%) !important;
}
#view[data-route="dashboard"] .dashboard-school-hero {
  min-height: 14.2rem !important;
  padding: 2rem 2.7rem !important;
  border-radius: 2.1rem !important;
  background:#fff !important;
  box-shadow: 0 18px 44px rgba(30,95,191,.15), 0 4px 12px rgba(23,36,58,.05) !important;
}
#view[data-route="dashboard"] .dashboard-school-hero::after { width:.65rem !important; background:#2d74ea !important; }
#view[data-route="dashboard"] .school-hero-icon {
  flex:0 0 9.4rem !important; width:9.4rem !important; height:9.4rem !important;
  border-radius:2rem !important; background:#e8f0ff !important; color:#1260d0 !important;
  box-shadow:none !important;
}
#view[data-route="dashboard"] .school-hero-icon svg { width:6rem !important; height:6rem !important; }
#view[data-route="dashboard"] .school-pill { background:#e7f0ff !important; color:#145fc9 !important; font-size:1rem !important; padding:.5rem 1rem !important; }
#view[data-route="dashboard"] .school-title { color:#14284b !important; font-size:clamp(2rem,3.4vw,3rem) !important; font-weight:800 !important; }
#view[data-route="dashboard"] .school-date { color:#73829d !important; font-size:1rem !important; }

#view[data-route="dashboard"] .dashboard-kpi {
  min-height:15.4rem !important; padding:1.55rem 2rem 1.25rem !important;
  border-radius:2rem !important; background:#fff !important;
  border:1px solid rgba(225,231,240,.65) !important;
  box-shadow:0 18px 42px rgba(31,67,112,.11),0 4px 14px rgba(31,67,112,.055) !important;
}
#view[data-route="dashboard"] .dashboard-kpi::before {
  top:-2.85rem !important; left:-2.85rem !important; width:8.4rem !important; height:8.4rem !important;
  border-radius:50% !important; opacity:1 !important;
}
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-green::before { background:#c8f5c8 !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-blue::before { background:#c9dcff !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-yellow::before { background:#ffe7a1 !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-red::before { background:#ffc8cc !important; }
#view[data-route="dashboard"] .dashboard-kpi::after { display:none !important; }
#view[data-route="dashboard"] .dashboard-kpi .kpi-icon {
  width:5.35rem !important; height:5.35rem !important; border-radius:1.55rem !important;
  margin:0 0 .85rem 0 !important; box-shadow:0 10px 24px rgba(31,55,90,.065) !important;
}
#view[data-route="dashboard"] .dashboard-kpi .kpi-icon svg { width:3rem !important; height:3rem !important; }
#view[data-route="dashboard"] .dashboard-kpi p { color:#172b4d !important; font-size:2.25rem !important; font-weight:800 !important; }
#view[data-route="dashboard"] .dashboard-kpi h2 { color:#647493 !important; font-size:1.2rem !important; font-weight:600 !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-green .kpi-icon { color:#39a83c !important; background:#e9fbe9 !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-blue .kpi-icon { color:#1260d0 !important; background:#e9f1ff !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-yellow .kpi-icon { color:#f0a800 !important; background:#fff7dd !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-tone-red .kpi-icon { color:#e5353e !important; background:#ffe8eb !important; }

#view[data-route="dashboard"] .dashboard-shortcuts {
  min-height:5.1rem !important; padding:.65rem 1rem .65rem 1.6rem !important;
  border-radius:999px !important; background:#fff !important;
  box-shadow:0 14px 34px rgba(31,67,112,.09) !important;
}
#view[data-route="dashboard"] .dashboard-shortcuts h2 { font-size:1.4rem !important; color:#172b4d !important; }
#view[data-route="dashboard"] .shortcut-grid-icon { width:4rem !important; height:4rem !important; border-radius:1.35rem !important; background:#e7f0ff !important; }

@media (max-width:48rem) {
  body:has(#view[data-route="dashboard"]) { background:linear-gradient(180deg,#0755c9 0 16.4rem,#f2f6fd 16.4rem 100%) !important; }
  #app-content { padding-bottom:5.9rem !important; }
  #app-header { min-height:11.1rem !important; padding:4.3rem 1.3rem 1rem !important; }
  #current-user { color:#fff !important; font-size:1rem !important; font-weight:500 !important; }
  #view[data-route="dashboard"] {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:1.95rem 1.9rem !important;
    padding:0 2.8rem 6.8rem !important;
  }
  #view[data-route="dashboard"] > .dashboard-school-hero { grid-column:1/-1 !important; grid-row:1 !important; min-height:14.2rem !important; padding:1.4rem 1.2rem !important; border-radius:2.15rem !important; }
  #view[data-route="dashboard"] .school-hero-icon { flex-basis:9rem !important; width:9rem !important; height:9rem !important; border-radius:2rem !important; }
  #view[data-route="dashboard"] .school-hero-icon svg { width:5.8rem !important; height:5.8rem !important; }
  #view[data-route="dashboard"] .school-pill { font-size:.9rem !important; }
  #view[data-route="dashboard"] .school-title { font-size:1.95rem !important; }
  #view[data-route="dashboard"] .school-date { font-size:.82rem !important; }
  #view[data-route="dashboard"] > .dashboard-kpi { min-height:14.6rem !important; padding:1.25rem 1.1rem 1.15rem !important; border-radius:2rem !important; }
  #view[data-route="dashboard"] > .dashboard-kpi[data-card="teachers"] { grid-column:2 !important; grid-row:2 !important; }
  #view[data-route="dashboard"] > .dashboard-kpi[data-card="students"] { grid-column:1 !important; grid-row:2 !important; }
  #view[data-route="dashboard"] > .dashboard-kpi[data-card="absences"] { grid-column:2 !important; grid-row:3 !important; }
  #view[data-route="dashboard"] > .dashboard-kpi[data-card="classes"] { grid-column:1 !important; grid-row:3 !important; }
  #view[data-route="dashboard"] > .dashboard-kpi[data-card="late"] { grid-column:2 !important; grid-row:4 !important; }
  #view[data-route="dashboard"] > .dashboard-kpi[data-card="messages"] { grid-column:1 !important; grid-row:4 !important; }
  #view[data-route="dashboard"] .dashboard-kpi::before { width:8.2rem !important; height:8.2rem !important; top:-2.8rem !important; left:-2.8rem !important; }
  #view[data-route="dashboard"] .dashboard-kpi .kpi-icon { width:5.3rem !important; height:5.3rem !important; border-radius:1.55rem !important; }
  #view[data-route="dashboard"] .dashboard-kpi .kpi-icon svg { width:3rem !important; height:3rem !important; }
  #view[data-route="dashboard"] .dashboard-kpi p { font-size:2.2rem !important; }
  #view[data-route="dashboard"] .dashboard-kpi h2 { font-size:1.18rem !important; }
  #view[data-route="dashboard"] > .dashboard-shortcuts { grid-column:1/-1 !important; grid-row:5 !important; min-height:5.1rem !important; }
  #view[data-route="dashboard"] .dashboard-shortcuts h2 { font-size:1.35rem !important; }
  #view[data-route="dashboard"] .shortcut-grid-icon { width:4rem !important; height:4rem !important; }
  #view[data-route="dashboard"] .dashboard-charts { display:none !important; }
  #primary-navigation { height:5.9rem !important; border-radius:2.2rem 2.2rem 0 0 !important; padding:.45rem .8rem .35rem !important; box-shadow:0 -14px 36px rgba(30,95,191,.13) !important; }
  #primary-navigation a { height:4.8rem !important; border-radius:1.8rem !important; font-size:.8rem !important; }
  #primary-navigation a .nav-icon { width:1.9rem !important; height:1.9rem !important; }
  #primary-navigation a[aria-current="page"] { background:#e8f1ff !important; color:#155fc9 !important; }
}

/* ===== FINAL REFERENCE DESIGN — locked to the supplied dashboard specification ===== */
.privacy-link{display:inline-block;margin-top:.65rem;color:#1E5FBF;font-weight:800;text-decoration:none}
.privacy-link:hover{text-decoration:underline}
@media (max-width:48rem){
  html,body{background:#F7FAFF}
  body{padding-bottom:5.65rem;font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif}
  #app-shell{display:block;min-height:100vh;background:#F7FAFF}
  #sidebar{position:relative;height:16.2rem;padding:0;background:linear-gradient(135deg,#1E5FBF 0%,#2B75E6 48%,#0D56C9 100%);overflow:hidden;border-radius:0 0 3rem 3rem;box-shadow:0 12px 35px rgb(30 95 191 / 12%)}
  #sidebar::before,#sidebar::after{content:"";position:absolute;border-radius:50%;background:rgb(255 255 255 / 7%);pointer-events:none}
  #sidebar::before{width:12rem;height:12rem;left:-5rem;top:-7rem}
  #sidebar::after{width:11rem;height:11rem;right:-4rem;bottom:-7rem}
  #brand{display:none}
  #primary-navigation{position:fixed;z-index:80;inset:auto .25rem .35rem .25rem;height:5.25rem;padding:.4rem .5rem;display:flex;align-items:center;justify-content:space-around;gap:.15rem;overflow:hidden;background:rgb(255 255 255 / 98%);border:1px solid #E8EEF7;border-radius:2.4rem;box-shadow:0 12px 34px rgb(23 36 58 / 12%);backdrop-filter:blur(14px)}
  #primary-navigation a{order:var(--mobile-order,99);flex:1 1 0;height:4.45rem;min-width:0;min-height:0;padding:.3rem .1rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.22rem;color:#71809B;border-radius:2rem;font-size:.76rem;font-weight:700;text-align:center;text-decoration:none;transform:none}
  #primary-navigation a .nav-icon{width:1.75rem;height:1.75rem;padding:.15rem;color:#71809B;background:transparent;border-radius:1rem;box-sizing:content-box}
  #primary-navigation a[aria-current="page"]{color:#1E5FBF;background:#DCE9FF;box-shadow:0 4px 12px rgb(30 95 191 / 10%)}
  #primary-navigation a[aria-current="page"] .nav-icon{color:#1E5FBF;background:transparent}
  .desktop-nav-label{display:none}.mobile-nav-label{display:block}
  #app-content{position:relative;margin-top:-8.7rem;z-index:2}
  #app-header{position:relative;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:1rem 1.15rem 0;background:transparent;border:0;color:#fff}
  #current-user{margin:0;color:#fff;font-size:1.05rem;font-weight:500}
  #app-header>div{display:flex;align-items:center;gap:.35rem}
  #language-toggle,#logout-button{display:none}
  #app-header::before{content:"⚙";display:grid;place-items:center;width:3.15rem;height:3.15rem;border-radius:1.1rem;background:rgb(255 255 255 / 14%);color:#fff;font-size:1.8rem;order:2;box-shadow:inset 0 0 0 1px rgb(255 255 255 / 10%)}
  #view{position:relative;z-index:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.9rem;padding:0 1rem 1.2rem;background:transparent;max-width:none;margin:0}
  #view[data-route="dashboard"]{padding-top:1.15rem}
  #view[data-route="dashboard"]>.dashboard-page-title{display:none}
  #view[data-route="dashboard"]>.dashboard-school-hero{grid-column:1/-1;grid-row:1;min-height:13.6rem;margin:0;padding:1.2rem 1.1rem;border-radius:2.25rem;background:#fff;box-shadow:0 15px 34px rgb(30 95 191 / 13%),0 3px 9px rgb(23 36 58 / 5%);border:1px solid rgb(223 230 239 / 50%);display:flex;align-items:center;gap:1rem;overflow:hidden;position:relative}
  #view[data-route="dashboard"]>.dashboard-school-hero::after{content:"";position:absolute;right:-.1rem;top:0;bottom:0;width:.65rem;background:#2B75E6;border-radius:0 2.25rem 2.25rem 0}
  .dashboard-school-hero .school-hero-icon{width:6.4rem;height:6.4rem;flex:0 0 6.4rem;display:grid;place-items:center;border-radius:1.9rem;background:#EAF2FF;color:#1260D0}
  .dashboard-school-hero .school-hero-icon svg{width:4.2rem;height:4.2rem}
  .dashboard-school-hero .school-hero-copy{display:flex;flex:1;flex-direction:column;align-items:flex-end;text-align:right;min-width:0}
  .dashboard-school-hero .school-pill{display:inline-flex;align-items:center;padding:.5rem .95rem;border-radius:1.5rem;background:#EAF2FF;color:#1260D0;font-weight:800;font-size:.85rem;white-space:nowrap}
  .dashboard-school-hero .school-title{margin:.65rem 0 .35rem;color:#172B4D;font-size:1.85rem;line-height:1.15;font-weight:800}
  .dashboard-school-hero .school-date{display:flex;flex-direction:row;align-items:center;gap:.45rem;margin:0;color:#71809B;font-size:.8rem;font-weight:600}
  .dashboard-school-hero .school-date-dot{width:.55rem;height:.55rem;border-radius:50%;background:#A9D84B;order:0}.dashboard-school-hero .school-date-icon{width:1.15rem;height:1.15rem;position:relative;display:inline-block;border:2px solid #71809B;border-radius:.18rem;order:1}.dashboard-school-hero .school-date-icon::before{content:"";position:absolute;left:-2px;right:-2px;top:.2rem;border-top:2px solid #71809B}.dashboard-school-hero .school-date-icon::after{content:"";position:absolute;top:-.25rem;left:.18rem;width:.12rem;height:.35rem;background:#71809B;box-shadow:.55rem 0 #71809B}
  #view[data-route="dashboard"]>.dashboard-kpi{min-height:12.8rem;grid-column:auto;grid-row:auto;padding:1.1rem 1rem 1rem!important;border-radius:2rem!important;background:#fff!important;border:1px solid rgb(223 230 239 / 55%)!important;box-shadow:0 14px 31px rgb(23 36 58 / 10%),0 3px 10px rgb(23 36 58 / 5%)!important;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;position:relative;overflow:hidden}
  #view[data-route="dashboard"]>.dashboard-kpi::before{content:"";position:absolute;z-index:0;top:-2.65rem;left:-2.65rem;width:8rem;height:8rem;border-radius:0 0 100% 0;opacity:.95}
  #view[data-route="dashboard"]>.dashboard-kpi.kpi-tone-green::before{background:#C7F4C6}.kpi-tone-blue::before{background:#BFD6FF}.kpi-tone-yellow::before{background:#FFE59A}.kpi-tone-red::before{background:#FFC2C8}
  #view[data-route="dashboard"]>.dashboard-kpi::after{display:none}
  #view[data-route="dashboard"]>.dashboard-kpi .kpi-icon{position:relative;z-index:1;align-self:flex-end;width:4.15rem;height:4.15rem;margin:0 0 .7rem;border-radius:1.35rem;box-shadow:0 8px 18px rgb(23 36 58 / 7%)}
  #view[data-route="dashboard"]>.dashboard-kpi .kpi-icon svg{width:2.25rem;height:2.25rem}
  #view[data-route="dashboard"]>.dashboard-kpi p{position:relative;z-index:1;margin:0;color:#172B4D!important;font-size:2rem!important;line-height:1.15;font-weight:800!important}
  #view[data-route="dashboard"]>.dashboard-kpi h2{position:relative;z-index:1;margin:.35rem 0 0;color:#647493!important;font-size:1rem!important;font-weight:600!important}
  #view[data-route="dashboard"]>.dashboard-kpi.kpi-tone-green .kpi-icon{color:#34A853!important;background:#E9FBE9!important}.kpi-tone-blue .kpi-icon{color:#1260D0!important;background:#E9F1FF!important}.kpi-tone-yellow .kpi-icon{color:#F5A900!important;background:#FFF7DE!important}.kpi-tone-red .kpi-icon{color:#EA3543!important;background:#FDEBED!important}
  #view[data-route="dashboard"]>.dashboard-kpi[data-card="teachers"]{grid-column:2;grid-row:2}#view[data-route="dashboard"]>.dashboard-kpi[data-card="students"]{grid-column:1;grid-row:2}#view[data-route="dashboard"]>.dashboard-kpi[data-card="absences"]{grid-column:2;grid-row:3}#view[data-route="dashboard"]>.dashboard-kpi[data-card="classes"]{grid-column:1;grid-row:3}#view[data-route="dashboard"]>.dashboard-kpi[data-card="late"]{grid-column:2;grid-row:4}#view[data-route="dashboard"]>.dashboard-kpi[data-card="messages"]{grid-column:1;grid-row:4}
  #view[data-route="dashboard"]>.dashboard-shortcuts{grid-column:1/-1;grid-row:5;min-height:4.5rem;margin:.15rem 0 0;padding:.45rem .9rem  .45rem 1rem!important;border-radius:2.2rem;background:#fff;box-shadow:0 12px 28px rgb(23 36 58 / 8%);display:flex;align-items:center;justify-content:flex-start;gap:.7rem}
  #view[data-route="dashboard"]>.dashboard-shortcuts h2{margin:0;color:#172B4D;font-size:1.25rem;font-weight:800}
  .dashboard-shortcuts .shortcut-grid-icon{margin-inline-start:auto;width:3.55rem;height:3.55rem;border-radius:1.5rem;background:#EAF2FF;position:relative}
  .dashboard-shortcuts .shortcut-grid-icon::before{content:"";position:absolute;width:.62rem;height:.62rem;border-radius:.12rem;background:#1260D0;left:.95rem;top:.9rem;box-shadow:.95rem 0 #1260D0,0 .95rem #1260D0,.95rem .95rem #1260D0}
  #view[data-route="dashboard"]>.dashboard-charts{display:none!important}
}

@media (max-width:48rem){
  #settings-shortcut{position:absolute;left:1.15rem;top:.75rem;width:3.25rem;height:3.25rem;border:0;border-radius:1.15rem;background:rgb(255 255 255 / 14%);color:#fff;font-size:1.75rem;line-height:1;box-shadow:inset 0 0 0 1px rgb(255 255 255 / 9%);cursor:pointer;z-index:6}
  #current-user{font-size:0!important}
  #current-user::after{content:attr(data-role-label);font-size:1.05rem}
}
@media (min-width:48.01rem){#settings-shortcut{display:none}}

/* Update 2.0: password visibility control */
.password-field{position:relative;display:flex;align-items:center;width:100%}
.password-field input{width:100%;padding-inline-start:3.2rem;padding-inline-end:var(--space-4)}
/* Password eye: fixed at the far-left edge of the field in RTL */
#login-form .password-field .password-toggle{position:absolute;inset-inline-start:.45rem;inset-inline-end:auto;top:50%;transform:translateY(-50%);width:2.35rem!important;min-width:2.35rem;height:2.35rem!important;min-height:2.35rem;margin:0!important;padding:0!important;border:0;border-radius:50%;background:transparent;color:#1E5FBF;cursor:pointer;font-size:1.15rem;line-height:1;display:grid;place-items:center;z-index:2}
#login-form .password-field .password-toggle:hover:not(:disabled){filter:none;background:#EAF2FF}
#login-form .password-field .password-toggle:focus-visible{outline:3px solid rgb(30 95 191 / 30%);outline-offset:2px}

/* Update 2.0: section/manager header */
#current-user{line-height:1.5}
.section-context-banner{grid-column:1/-1;padding:.75rem 1rem;border-radius:1.25rem;background:#EAF2FF;color:#1E5FBF;font-weight:800;text-align:right;box-shadow:0 8px 20px rgb(30 95 191 / 8%)}
.grades-analytics{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.grades-stat{padding:1rem;border-radius:1.25rem;background:#fff;border:1px solid #E4EAF3;box-shadow:0 8px 20px rgb(23 36 58 / 6%)}
.grades-stat strong{display:block;font-size:1.6rem;color:#1E5FBF}
.grades-chart-card{grid-column:1/-1;padding:1rem;border-radius:1.25rem;background:#fff;border:1px solid #E4EAF3;box-shadow:0 8px 20px rgb(23 36 58 / 6%)}
.grades-chart-card svg{width:100%;height:auto;max-height:300px}
.grades-actions{display:flex;gap:.6rem;flex-wrap:wrap}
.report-preview{grid-column:1/-1;overflow:auto;background:#fff;border-radius:1rem;border:1px solid #E4EAF3;padding:.5rem}
.report-preview table{width:100%;border-collapse:collapse}.report-preview th,.report-preview td{padding:.55rem;border-bottom:1px solid #E8EEF5;text-align:right}.report-pagination{display:flex;align-items:center;justify-content:center;gap:.75rem;grid-column:1/-1}
@media (max-width:48rem){#current-user{font-size:.78rem!important;max-width:75%;white-space:normal}.grades-analytics{grid-template-columns:1fr}.section-context-banner{font-size:.9rem}}
@media print{.no-print,#primary-navigation,#sidebar,#app-header{display:none!important}#view{display:block!important;padding:0!important;max-width:none!important}#view>*{break-inside:avoid}.report-preview{border:0}.certificate-print{width:100%;margin:0}}

/* v11: management selectors and action buttons */
.timetable-section-bar, .teacher-section-bar {
  display:flex; align-items:center; gap:10px; margin:0 0 14px; padding:12px 14px;
  background:#fff; border-radius:14px; box-shadow:0 5px 16px rgba(19,42,99,.07);
}
.timetable-section-bar label, .teacher-section-bar label { font-weight:800; }
.timetable-section-bar select, .teacher-section-bar select { min-width:180px; }

/* Attendance / homeroom management panel */
.attendance-homeroom-manager {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid #dbe5f3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 58, 138, .08);
}
.attendance-homeroom-manager h2 { margin-top: 0; }
.attendance-homeroom-manager .homeroom-form {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto minmax(180px, 1fr) auto auto;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1rem;
}
.attendance-homeroom-manager table { width: 100%; }
.attendance-homeroom-manager td:last-child,
.attendance-homeroom-manager th:last-child { white-space: nowrap; }
.attendance-homeroom-manager td:last-child button { margin-inline-start: .4rem; }
@media (max-width: 800px) {
  .attendance-homeroom-manager .homeroom-form { grid-template-columns: 1fr; }
}

/* Final homeroom attendance fix: teacher-visible class/leader map */
.attendance-homeroom-summary {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid #dbe5f3;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 10px 28px rgba(30, 58, 138, .08);
}
.attendance-homeroom-summary h2 { margin: 0 0 .8rem; color:#163a76; font-size:1.1rem; }
.attendance-homeroom-summary table { width:100%; border-collapse:collapse; }
.attendance-homeroom-summary th,.attendance-homeroom-summary td { padding:.7rem .65rem; border-bottom:1px solid #e7edf6; text-align:right; }
.attendance-homeroom-summary th { color:#31527f; font-weight:800; background:#eef4ff; }
.attendance-homeroom-summary tr:last-child td { border-bottom:0; }
.attendance-homeroom-summary td:last-child { color:#23814a; font-weight:700; }
@media (max-width:800px){.attendance-homeroom-summary{overflow:auto}.attendance-homeroom-summary table{min-width:620px}}

/* V26: compact full-week timetable matching the requested landscape grid */
.timetable-grid-wrap { width: 100%; overflow-x: auto; background: #fff; border: 1px solid #dbe5f3; border-radius: 18px; box-shadow: 0 10px 30px rgba(30,58,138,.08); }
.timetable-grid { width: 100%; min-width: 920px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.timetable-grid th, .timetable-grid td { border-left: 1px solid #dbe5f3; border-bottom: 1px solid #dbe5f3; padding: .55rem .4rem; text-align: center; vertical-align: middle; }
.timetable-grid thead th { background: #eaf1fa; color: #17345f; font-weight: 800; height: 46px; }
.timetable-grid .timetable-day-head { width: 120px; }
.timetable-grid .timetable-day-label { background: #f5f8fc; color: #17345f; font-weight: 800; white-space: nowrap; }
.timetable-grid .timetable-cell { min-height: 92px; height: 92px; background: #fff; }
.timetable-grid .timetable-cell:nth-child(even) { background: #fbfdff; }
.timetable-entry { display: flex; flex-direction: column; gap: .18rem; align-items: center; line-height: 1.25; }
.timetable-entry strong { font-size: .92rem; color: #17345f; }
.timetable-entry span { font-size: .86rem; color: #1e5fbf; font-weight: 700; }
.timetable-entry small { font-size: .72rem; color: #64748b; }
.timetable-entry-actions { display: flex; gap: .25rem; justify-content: center; margin-top: .2rem; }
.timetable-entry-actions button { padding: .2rem .42rem; font-size: .7rem; }
.timetable-empty { color: #b5c0cf; font-size: 1rem; }
@media print { .timetable-grid-wrap { box-shadow:none; border:0; overflow:visible; } .timetable-grid { min-width:0; font-size:10px; } .timetable-entry-actions { display:none!important; } }

/* ===== V27 MOBILE FINAL FIT PATCH =====
   Keeps the V27 design but makes the mobile viewport behave like a native app:
   fixed bottom navigation, no horizontal clipping, smaller icon tiles, and
   content that scrolls independently above the navigation bar. */
@media (max-width: 48rem) {
  html, body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
  }

  body {
    padding-bottom: calc(5.65rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  #app-shell,
  #app-content,
  #view {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  /* The navigation is ALWAYS at the bottom of the phone viewport. */
  #sidebar {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100% !important;
    height: calc(5.35rem + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important;
    padding: .35rem .45rem env(safe-area-inset-bottom, 0px) !important;
    z-index: 9999 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    pointer-events: none;
  }

  #sidebar::before,
  #sidebar::after {
    display: none !important;
  }

  #primary-navigation {
    position: absolute !important;
    inset: .15rem .35rem auto .35rem !important;
    width: auto !important;
    height: 4.85rem !important;
    min-height: 0 !important;
    padding: .3rem .4rem !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: .15rem !important;
    overflow: hidden !important;
    pointer-events: auto;
    background: rgba(255,255,255,.98) !important;
    border: 1px solid #e4ebf5 !important;
    border-radius: 1.75rem !important;
    box-shadow: 0 -8px 28px rgba(25,55,100,.14) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  #primary-navigation a {
    width: 100% !important;
    height: 4.15rem !important;
    min-height: 0 !important;
    padding: .2rem .08rem !important;
    margin: 0 !important;
    gap: .12rem !important;
    border-radius: 1.35rem !important;
    font-size: .68rem !important;
    line-height: 1.1 !important;
    overflow: hidden !important;
  }

  #primary-navigation a .nav-icon {
    width: 1.42rem !important;
    height: 1.42rem !important;
    padding: .08rem !important;
    box-sizing: content-box !important;
  }

  #primary-navigation a[aria-current="page"] {
    background: #eaf2ff !important;
    box-shadow: none !important;
  }

  #primary-navigation .mobile-nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* The blue header is only the visual header; it must not become a second
     scrolling/navigation area. */
  #app-content {
    padding-bottom: calc(5.9rem + env(safe-area-inset-bottom, 0px)) !important;
    margin-top: -8.7rem !important;
  }

  #app-header {
    min-height: 0 !important;
    height: 4.35rem !important;
    padding: .7rem 1rem .45rem !important;
    margin: 0 !important;
  }

  #current-user {
    max-width: calc(100% - 4rem) !important;
    font-size: .78rem !important;
    line-height: 1.35 !important;
  }

  #settings-shortcut {
    width: 2.75rem !important;
    height: 2.75rem !important;
    min-height: 2.75rem !important;
    left: auto !important;
    inset-inline-start: 1rem !important;
    top: .7rem !important;
    border-radius: .9rem !important;
    font-size: 1.35rem !important;
  }

  #view {
    padding-left: .9rem !important;
    padding-right: .9rem !important;
    padding-bottom: 1.5rem !important;
    gap: .75rem !important;
  }

  /* Dashboard: fit the complete hero card and icon inside narrow screens. */
  #view[data-route="dashboard"] {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .75rem !important;
    padding: .8rem .9rem 1.5rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-school-hero {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 11.8rem !important;
    padding: 1rem .85rem !important;
    gap: .7rem !important;
    border-radius: 1.65rem !important;
    overflow: hidden !important;
  }

  #view[data-route="dashboard"] .school-hero-icon {
    flex: 0 0 5.15rem !important;
    width: 5.15rem !important;
    height: 5.15rem !important;
    border-radius: 1.45rem !important;
  }

  #view[data-route="dashboard"] .school-hero-icon svg {
    width: 3.35rem !important;
    height: 3.35rem !important;
  }

  #view[data-route="dashboard"] .school-pill {
    max-width: 100%;
    padding: .38rem .65rem !important;
    font-size: .72rem !important;
  }

  #view[data-route="dashboard"] .school-title {
    font-size: 1.42rem !important;
    line-height: 1.18 !important;
    margin: .4rem 0 .25rem !important;
  }

  #view[data-route="dashboard"] .school-date {
    font-size: .68rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-kpi {
    min-width: 0 !important;
    min-height: 10.2rem !important;
    padding: .9rem .8rem !important;
    border-radius: 1.55rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-kpi .kpi-icon {
    width: 3.55rem !important;
    height: 3.55rem !important;
    margin-bottom: .5rem !important;
    border-radius: 1.05rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-kpi .kpi-icon svg {
    width: 2rem !important;
    height: 2rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-kpi p {
    font-size: 1.7rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-kpi h2 {
    font-size: .82rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-shortcuts {
    min-height: 4rem !important;
    padding: .4rem .7rem !important;
    border-radius: 1.5rem !important;
  }

  #view[data-route="dashboard"] > .dashboard-shortcuts h2 {
    font-size: 1rem !important;
  }

  #view[data-route="dashboard"] .shortcut-grid-icon {
    width: 2.9rem !important;
    height: 2.9rem !important;
    border-radius: 1rem !important;
  }
}

@media (max-width: 360px) {
  #primary-navigation a { font-size: .62rem !important; }
  #primary-navigation a .nav-icon { width: 1.28rem !important; height: 1.28rem !important; }
  #view[data-route="dashboard"] .school-hero-icon { flex-basis: 4.55rem !important; width: 4.55rem !important; height: 4.55rem !important; }
  #view[data-route="dashboard"] .school-hero-icon svg { width: 3rem !important; height: 3rem !important; }
  #view[data-route="dashboard"] .school-title { font-size: 1.25rem !important; }
}

/* V27.1 mobile polish: real shortcut tiles and safe fixed navigation. */
.dashboard-shortcuts{display:block !important}
.dashboard-shortcuts__head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.8rem}
.dashboard-shortcuts__head h2{margin:0}
.dashboard-shortcuts__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.dashboard-shortcut{min-width:0;min-height:7rem;padding:.8rem .45rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.55rem;border-radius:1.35rem;background:#fff;border:1px solid #E8EEF7;color:#172B4D;text-decoration:none;box-shadow:0 8px 20px rgba(23,36,58,.06);font-weight:800;font-size:.85rem;text-align:center;transition:transform .15s ease,box-shadow .15s ease}
.dashboard-shortcut:active{transform:scale(.98)}
.dashboard-shortcut__icon{width:3.2rem;height:3.2rem;border-radius:1.1rem;display:grid;place-items:center;background:#EAF2FF;color:#1260D0}
.dashboard-shortcut__icon svg{width:1.8rem;height:1.8rem}
.shortcut-tone-check{background:#EAF8E8;color:#35A853}.shortcut-tone-message{background:#EAF8E8;color:#34A853}.shortcut-tone-report{background:#FFF6DD;color:#B08A27}.shortcut-tone-school{background:#EAF2FF;color:#1260D0}.shortcut-tone-calendar{background:#EAF8E8;color:#34A853}.shortcut-tone-book{background:#EAF2FF;color:#1260D0}.shortcut-tone-settings{background:#EEF1F5;color:#6E7E8D}
@media (max-width:48rem){
  html,body{width:100%;min-width:0;overflow-x:hidden}
  body{padding-bottom:6.15rem;overscroll-behavior-x:none}
  #primary-navigation{position:fixed !important;inset:auto .55rem .55rem .55rem !important;bottom:max(.55rem,env(safe-area-inset-bottom)) !important;height:5.35rem !important;z-index:1000 !important}
  #app-content{padding-bottom:6.4rem !important}
  #view[data-route="dashboard"]>.dashboard-shortcuts{min-height:0 !important;padding:1rem !important;display:block !important}
  .dashboard-shortcuts__head{margin-bottom:.7rem}
  .dashboard-shortcuts__grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.55rem}
  .dashboard-shortcut{min-height:5.4rem;padding:.5rem .2rem;border-radius:1.15rem;font-size:.68rem;gap:.35rem;box-shadow:0 6px 16px rgba(23,36,58,.05)}
  .dashboard-shortcut__icon{width:2.65rem;height:2.65rem;border-radius:.9rem}
  .dashboard-shortcut__icon svg{width:1.5rem;height:1.5rem}
}

/* V27.21 — Pastel shortcut system: filled icons, 4x2 grid, responsive and theme-ready. */
#view[data-route="dashboard"] .dashboard-shortcuts {
  display:block !important;
  width:100%;
  margin:14px 0 24px !important;
  padding:16px !important;
  border:1px solid #E8EDF7 !important;
  border-radius:24px !important;
  background:#FFFFFF !important;
  box-shadow:0 8px 24px rgba(30,64,175,.06) !important;
  box-sizing:border-box;
}
#view[data-route="dashboard"] .dashboard-shortcuts__head {
  display:flex !important; align-items:center !important; justify-content:space-between !important;
  margin-bottom:16px !important; gap:12px;
}
#view[data-route="dashboard"] .dashboard-shortcuts__head h2 {
  margin:0 !important; color:#172033 !important; font-size:18px !important; font-weight:800 !important;
  line-height:1.35 !important;
}
#view[data-route="dashboard"] .dashboard-shortcuts__grid {
  display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:12px !important;
  width:100%;
}
#view[data-route="dashboard"] .dashboard-shortcut {
  min-width:0 !important; min-height:112px !important; padding:12px 8px !important;
  display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important;
  gap:9px !important; border-radius:18px !important; border:1px solid #E5EAF4 !important;
  background:#FFFFFF !important; color:#172033 !important; text-decoration:none !important;
  font-weight:800 !important; font-size:13px !important; line-height:1.35 !important;
  text-align:center !important; overflow:visible !important; box-shadow:0 4px 12px rgba(23,36,58,.045) !important;
}
#view[data-route="dashboard"] .dashboard-shortcut > span:last-child {
  display:block !important; width:100% !important; min-height:1.35em !important;
  color:#172033 !important; white-space:normal !important; overflow:visible !important;
  text-overflow:clip !important; overflow-wrap:anywhere !important; word-break:normal !important;
}
#view[data-route="dashboard"] .dashboard-shortcut__icon {
  width:52px !important; height:52px !important; flex:0 0 52px !important; border-radius:18px !important;
  display:grid !important; place-items:center !important;
  background:var(--shortcut-bg,#EAF0FF) !important; color:var(--shortcut-color,#1E50CE) !important;
  border:1px solid color-mix(in srgb, var(--shortcut-color,#1E50CE) 12%, transparent) !important;
}
#view[data-route="dashboard"] .dashboard-shortcut__icon svg { width:30px !important; height:30px !important; display:block !important; }
#view[data-route="dashboard"] .dashboard-shortcut__icon svg * { fill:currentColor !important; stroke:none !important; }
#view[data-route="dashboard"] .shortcut-tone-teacher { --shortcut-color:#1E50CE; --shortcut-bg:#E8EEFF; }
#view[data-route="dashboard"] .shortcut-tone-book { --shortcut-color:#1B49C4; --shortcut-bg:#EAF0FF; }
#view[data-route="dashboard"] .shortcut-tone-calendar { --shortcut-color:#2DBE2C; --shortcut-bg:#EAF8EA; }
#view[data-route="dashboard"] .shortcut-tone-chart { --shortcut-color:#9E822B; --shortcut-bg:#FAF6E9; }
#view[data-route="dashboard"] .shortcut-tone-school { --shortcut-color:#4A62D6; --shortcut-bg:#EAF0FF; }
#view[data-route="dashboard"] .shortcut-tone-settings { --shortcut-color:#525C6A; --shortcut-bg:#EEF1F5; }
#view[data-route="dashboard"] .shortcut-tone-award { --shortcut-color:#D31D28; --shortcut-bg:#FDEAEB; }
#view[data-route="dashboard"] .shortcut-tone-homeroom { --shortcut-color:#31A200; --shortcut-bg:#E9F7E9; }
#view[data-route="dashboard"] .dashboard-shortcut:hover { transform:translateY(-1px); box-shadow:0 8px 18px rgba(30,64,175,.08) !important; }
#view[data-route="dashboard"] .dashboard-shortcut:focus-visible { outline:3px solid rgba(30,80,206,.22); outline-offset:2px; }

.data-import-section .import-preview { overflow:auto; max-height:360px; margin-top:12px; }
.data-import-section table { width:100%; border-collapse:collapse; }
.data-import-section th,.data-import-section td { padding:7px 8px; border:1px solid #E3E8F1; text-align:right; }
.data-import-section th { background:#EAF0FF; color:#1B49C4; }

@media (max-width:640px){
  #view[data-route="dashboard"] .dashboard-shortcuts { padding:14px !important; border-radius:22px !important; }
  #view[data-route="dashboard"] .dashboard-shortcuts__grid { gap:9px !important; }
  #view[data-route="dashboard"] .dashboard-shortcut { min-height:98px !important; padding:10px 5px !important; border-radius:17px !important; font-size:12px !important; }
  #view[data-route="dashboard"] .dashboard-shortcut__icon { width:46px !important; height:46px !important; flex-basis:46px !important; border-radius:16px !important; }
  #view[data-route="dashboard"] .dashboard-shortcut__icon svg { width:27px !important; height:27px !important; }
}
@media (max-width:360px){
  #view[data-route="dashboard"] .dashboard-shortcuts__grid { gap:7px !important; }
  #view[data-route="dashboard"] .dashboard-shortcut { min-height:90px !important; font-size:11px !important; }
  #view[data-route="dashboard"] .dashboard-shortcut__icon { width:42px !important; height:42px !important; flex-basis:42px !important; border-radius:15px !important; }
  #view[data-route="dashboard"] .dashboard-shortcut__icon svg { width:24px !important; height:24px !important; }
}

/* V27.22 — LiveKit teacher meetings */
.dashboard-meetings-cta{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;margin-top:.55rem;padding:.55rem .9rem;border-radius:999px;background:#1E50CE;color:#fff;text-decoration:none;font-weight:800;box-shadow:0 8px 18px rgb(30 80 206 / 18%)}
.dashboard-meetings-cta:hover{filter:brightness(.97)}
.meetings-page,.meeting-room-page{display:grid;gap:1rem;min-width:0}
.meetings-header,.meeting-room-topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.15rem 1.25rem;border:1px solid var(--color-border);border-radius:1.6rem;background:#fff;box-shadow:var(--shadow-soft)}
.meetings-header h1{margin:.15rem 0 .35rem;color:#172B4D}.meetings-header p{margin:0;color:#68758a;line-height:1.7}.meeting-eyebrow{font-size:.82rem;font-weight:800;color:#1E50CE}
.meeting-header-actions,.meeting-card-actions,.meeting-modal-actions{display:flex;gap:.55rem;flex-wrap:wrap;align-items:center}
.primary-button,.danger-button,.ghost-button,.meeting-control{border:0;border-radius:1rem;padding:.72rem 1rem;font:inherit;font-weight:800;cursor:pointer}.primary-button{background:#1E50CE;color:#fff}.danger-button{background:#D31D28;color:#fff}.ghost-button{background:#EEF1F5;color:#26364f}.meeting-status{margin:0;padding:.65rem .9rem;border-radius:1rem;background:#f6f8fb;color:#5d6a7c}.meeting-status[data-tone="success"]{background:#EAF8EA;color:#247b2a}.meeting-status[data-tone="error"]{background:#FDEAEB;color:#a51620}
.meetings-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(17rem,1fr));gap:1rem}.meeting-card{display:flex;justify-content:space-between;gap:1rem;padding:1.15rem;border:1px solid var(--color-border);border-radius:1.5rem;background:#fff;box-shadow:var(--shadow-soft)}.meeting-card h2{margin:0 0 .4rem;font-size:1.1rem}.meeting-card p,.meeting-card small{display:block;margin:.2rem 0;color:#68758a}.meeting-empty{padding:2rem;text-align:center;border:1px dashed var(--color-border);border-radius:1.5rem;color:#68758a;background:#fff}
.meeting-room-page{min-height:calc(100dvh - 2rem)}.meeting-room-topbar{position:sticky;top:0;z-index:10}.meeting-room-title{display:grid;gap:.2rem;min-width:0}.meeting-room-title strong{font-size:1.1rem;color:#172B4D;overflow-wrap:anywhere}.meeting-room-title span{font-size:.82rem;color:#738097}.meeting-security-badge{padding:.4rem .65rem;border-radius:999px;background:#EAF8EA;color:#267a2d;font-weight:800;font-size:.78rem}
.meeting-room-layout{display:grid;grid-template-columns:minmax(0,1fr) 22rem;gap:1rem;min-height:65vh}.meeting-stage{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:.75rem;min-width:0;padding:1rem;border-radius:1.5rem;background:#101827;box-shadow:var(--shadow-soft)}.meeting-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.75rem;align-content:center;min-height:22rem}.meeting-tiles[data-view-mode="speaker"]{grid-template-columns:1fr}.meeting-tiles[data-view-mode="speaker"] .meeting-participant:not([data-identity=""]){min-height:28rem}.meeting-participant{position:relative;overflow:hidden;min-height:12rem;border-radius:1.1rem;background:#1c2636;border:1px solid rgb(255 255 255 / 10%)}.meeting-participant-media{position:absolute;inset:0;display:grid;place-items:center}.meeting-video{width:100%;height:100%;object-fit:cover}.meeting-audio{display:none}.meeting-participant-name{position:absolute;inset-inline-start:.65rem;bottom:.55rem;padding:.35rem .55rem;border-radius:.7rem;background:rgb(0 0 0 / 55%);color:#fff;font-weight:800;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meeting-participant-badge{position:absolute;inset-inline-end:.55rem;top:.55rem;padding:.3rem .5rem;border-radius:.6rem;background:rgb(0 0 0 / 50%);color:#fff;font-size:.75rem}
.meeting-controls{position:sticky;bottom:0;z-index:5;display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center;padding:.55rem;border-radius:1rem;background:rgb(16 24 39 / 92%);backdrop-filter:blur(10px)}.meeting-control{background:#263449;color:#fff}.meeting-control.danger{background:#a81722}.meeting-side-panel{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;overflow:hidden;border:1px solid var(--color-border);border-radius:1.5rem;background:#fff}.meeting-side-tabs{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--color-border)}.meeting-side-tabs button{border:0;background:transparent;padding:.7rem .35rem;font:inherit;font-weight:800;color:#66758b;cursor:pointer}.meeting-side-tabs button.is-active{color:#1E50CE;background:#E8EEFF}.meeting-side-content{min-height:0;overflow:auto;padding:.8rem}.meeting-chat-list{display:grid;gap:.55rem;max-height:45vh;overflow:auto}.meeting-chat-message{display:grid;gap:.2rem;padding:.65rem .7rem;border-radius:.9rem;background:#F6F8FB}.meeting-chat-message strong{color:#1E50CE}.meeting-chat-form{display:grid;grid-template-columns:1fr auto;gap:.5rem;margin-top:.7rem}.meeting-chat-form input,.meeting-modal input,.meeting-modal select{min-width:0;padding:.7rem;border:1px solid var(--color-border);border-radius:.9rem;background:#fff;font:inherit}.meeting-person-row{display:grid;grid-template-columns:1fr auto auto auto;gap:.35rem;align-items:center;padding:.55rem 0;border-bottom:1px solid #edf0f4}.meeting-person-row button{border:0;border-radius:.7rem;padding:.35rem .55rem;background:#EEF1F5;cursor:pointer;font:inherit}.meeting-whiteboard{width:100%;height:auto;aspect-ratio:16/9;border:1px solid #e3e7ee;border-radius:1rem;touch-action:none;background:#fff}.meeting-files-list{display:grid;gap:.5rem;margin-top:.7rem}.meeting-files-list a{display:block;padding:.6rem .7rem;border-radius:.8rem;background:#EAF0FF;color:#1E50CE;text-decoration:none;font-weight:700;overflow-wrap:anywhere}.meeting-modal-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:1rem;background:rgb(15 24 39 / 45%)}.meeting-modal{width:min(32rem,100%);display:grid;gap:.65rem;padding:1.2rem;border-radius:1.5rem;background:#fff;box-shadow:0 24px 70px rgb(0 0 0 / 20%)}.meeting-modal h2{margin:0 0 .35rem;color:#172B4D}.meeting-modal label{font-weight:800;color:#47556b}
@media (max-width: 62rem){.meeting-room-layout{grid-template-columns:1fr}.meeting-side-panel{min-height:22rem}.meeting-chat-list{max-height:18rem}}
@media (max-width: 42rem){.meetings-header,.meeting-room-topbar{align-items:flex-start;flex-direction:column}.meeting-card{flex-direction:column}.meeting-room-topbar{position:relative}.meeting-controls{justify-content:stretch}.meeting-control{flex:1 1 calc(50% - .5rem)}.meeting-side-tabs button{font-size:.78rem}.meeting-participant{min-height:10rem}.dashboard-meetings-cta{font-size:.78rem}}

/* V27.23 — unified shortcut palette + admin section switcher */
:root {
  --shortcut-label: #1F2937;
  --shortcut-teacher: #2350B8;
  --shortcut-subject: #1F4DB5;
  --shortcut-classes: #2350B8;
  --shortcut-homeroom: #5B7FE0;
  --shortcut-schedule: #3FA000;
  --shortcut-certificate: #B89B4A;
  --shortcut-settings: #6B7280;
}

#view[data-route="dashboard"] .dashboard-shortcuts__grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
#view[data-route="dashboard"] .dashboard-shortcut {
  color:var(--shortcut-label) !important;
  font-weight:700 !important;
  border-radius:18px !important;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
#view[data-route="dashboard"] .dashboard-shortcut__icon {
  background:var(--shortcut-bg) !important;
  color:var(--shortcut-color) !important;
  border:1px solid var(--shortcut-border) !important;
  box-shadow:inset 0 1px 0 rgb(255 255 255 / 55%), 0 5px 12px rgb(30 50 80 / 5%);
}
#view[data-route="dashboard"] .dashboard-shortcut__icon svg * { fill:currentColor !important; stroke:none !important; }
#view[data-route="dashboard"] .shortcut-tone-teacher { --shortcut-color:#2350B8; --shortcut-bg:linear-gradient(135deg,#E4E9F7,#EEF2FC); --shortcut-border:#CDD6EE; }
#view[data-route="dashboard"] .shortcut-tone-book { --shortcut-color:#1F4DB5; --shortcut-bg:linear-gradient(135deg,#E4E9F7,#EEF2FC); --shortcut-border:#CDD6EE; }
#view[data-route="dashboard"] .shortcut-tone-school { --shortcut-color:#2350B8; --shortcut-bg:linear-gradient(135deg,#E4E9F7,#EEF2FC); --shortcut-border:#CDD6EE; }
#view[data-route="dashboard"] .shortcut-tone-homeroom { --shortcut-color:#5B7FE0; --shortcut-bg:linear-gradient(135deg,#E8EEFD,#F2F5FF); --shortcut-border:#D6E0F8; }
#view[data-route="dashboard"] .shortcut-tone-calendar { --shortcut-color:#3FA000; --shortcut-bg:linear-gradient(135deg,#E6F2DC,#F1F8EA); --shortcut-border:#D4E8C4; }
#view[data-route="dashboard"] .shortcut-tone-award,
#view[data-route="dashboard"] .shortcut-tone-chart { --shortcut-color:#B89B4A; --shortcut-bg:linear-gradient(135deg,#F5F0E3,#FAF7EF); --shortcut-border:#EDE5CC; }
#view[data-route="dashboard"] .shortcut-tone-settings { --shortcut-color:#6B7280; --shortcut-bg:linear-gradient(135deg,#EDEEF0,#F5F5F7); --shortcut-border:#E0E2E6; }
#view[data-route="dashboard"] .dashboard-shortcut:active { transform:scale(.96); box-shadow:0 4px 10px rgb(30 50 80 / 7%) !important; }

/* Dashboard KPI icon repair and exact palette from the specification. */
#view[data-route="dashboard"] .dashboard-kpi .kpi-icon { width:48px; height:48px; border-radius:50%; display:grid; place-items:center; }
#view[data-route="dashboard"] .dashboard-kpi .kpi-icon svg { width:22px; height:22px; display:block; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-card-student .kpi-icon { color:#2350B8 !important; background:#E4EBFA !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-card-teacher .kpi-icon { color:#2563EB !important; background:#E3EEFC !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-card-class .kpi-icon { color:#D4A017 !important; background:#FFF3CC !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-card-absence .kpi-icon { color:#DC2626 !important; background:#FDE4E6 !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-card-message .kpi-icon { color:#16A34A !important; background:#DCF7E3 !important; }
#view[data-route="dashboard"] .dashboard-kpi.kpi-card-clock .kpi-icon { color:#0EA5E9 !important; background:#E0F2FE !important; }

.header-actions { display:flex; align-items:center; gap:.5rem; }
#section-switch-button { border:0; border-radius:12px; padding:.55rem .8rem; background:#1E40AF; color:#fff; font:inherit; font-weight:800; cursor:pointer; box-shadow:0 6px 16px rgb(30 64 175 / 15%); }
#section-switch-button:hover { filter:brightness(.97); }
#section-switch-button:active { transform:scale(.97); }

.section-switch-backdrop { position:fixed; inset:0; z-index:3000; display:flex; align-items:flex-end; justify-content:center; padding:0; background:rgb(15 23 42 / 42%); backdrop-filter:blur(3px); }
.section-switch-backdrop[hidden] { display:none; }
.section-switch-sheet { width:min(620px,100%); max-height:min(82dvh,720px); overflow:auto; background:#fff; border-radius:28px 28px 0 0; padding:10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow:0 -20px 70px rgb(15 23 42 / 20%); }
.section-switch-handle { width:46px; height:5px; border-radius:99px; background:#D8DEE9; margin:4px auto 14px; }
.section-switch-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.section-switch-eyebrow { display:block; color:#64748B; font-size:.78rem; font-weight:800; }
.section-switch-header h2 { margin:.15rem 0 0; color:#172033; font-size:1.35rem; }
.section-switch-close { border:0; background:#EEF1F5; color:#475569; width:40px; height:40px; border-radius:50%; font-size:1.6rem; cursor:pointer; }
.section-switch-list { display:grid; gap:10px; margin:18px 0 10px; }
.section-switch-option { width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; padding:12px; border:1px solid #E5EAF3; border-radius:18px; background:#fff; text-align:right; cursor:pointer; font:inherit; }
.section-switch-option[aria-checked="true"] { border-color:var(--section-color); background:var(--section-bg); box-shadow:0 7px 20px rgb(30 64 175 / 8%); }
.section-switch-option-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:15px; color:var(--section-color); background:rgb(255 255 255 / 75%); }
.section-switch-option-icon svg { width:25px; height:25px; }
.section-switch-option-text { display:grid; gap:2px; min-width:0; }
.section-switch-option-text strong { color:#1F2937; font-size:1rem; }
.section-switch-option-text small { color:#64748B; font-size:.75rem; }
.section-switch-option-mark { width:26px; height:26px; display:grid; place-items:center; border:2px solid #CBD5E1; border-radius:50%; color:transparent; font-weight:900; }
.section-switch-option[aria-checked="true"] .section-switch-option-mark { border-color:var(--section-color); background:var(--section-color); color:#fff; }
.section-switch-status { min-height:1.4em; margin:.5rem 0; color:#64748B; font-size:.82rem; font-weight:700; }
.section-switch-actions { display:grid; grid-template-columns:1fr 1.6fr; gap:10px; }
.section-switch-actions button { min-height:48px; border:0; border-radius:14px; font:inherit; font-weight:800; cursor:pointer; }
.section-switch-secondary { background:#EEF1F5; color:#475569; }
.section-switch-primary { background:#1E40AF; color:#fff; }
.section-switch-primary:disabled { opacity:.45; cursor:not-allowed; }
body.section-switch-open { overflow:hidden; }
.section-switch-settings { border:1px solid #E5EAF3; border-radius:20px; background:#fff; padding:1rem; display:grid; gap:.5rem; }
.section-switch-settings h2,.section-switch-settings p { margin:0; }
.section-switch-settings p { color:#64748B; line-height:1.7; }
.section-switch-settings-button { width:max-content; border:0; border-radius:12px; padding:.7rem 1rem; background:#1E40AF; color:#fff; font:inherit; font-weight:800; cursor:pointer; }

@media (max-width:640px) {
  .header-actions { gap:.35rem; }
  #section-switch-button { padding:.48rem .55rem; font-size:.72rem; }
  #view[data-route="dashboard"] .dashboard-shortcut { border-radius:18px !important; }
}

/* V27.23.1 — reliable section switch action + top refresh control */
#refresh-shortcut {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0;
  border-radius: .9rem;
  background: rgb(255 255 255 / 14%);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 9%);
  z-index: 6;
}
#refresh-shortcut svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#refresh-shortcut:hover { background: rgb(255 255 255 / 20%); }
#refresh-shortcut:active { transform: scale(.95); }
#refresh-shortcut.is-refreshing svg { animation: rehab-refresh-spin .65s linear infinite; }
@keyframes rehab-refresh-spin { to { transform: rotate(360deg); } }
.section-switch-primary:not(:disabled) { opacity: 1; pointer-events: auto; }
.section-switch-primary[aria-disabled="false"] { cursor: pointer; }
.section-switch-option:focus-visible,
.section-switch-primary:focus-visible,
.section-switch-secondary:focus-visible,
.section-switch-close:focus-visible,
#refresh-shortcut:focus-visible,
#settings-shortcut:focus-visible { outline: 3px solid rgb(37 99 235 / 28%); outline-offset: 2px; }

@media (max-width:48rem) {
  #header-actions { position: relative; }
  #refresh-shortcut { position: absolute; inset-inline-start: 4.15rem; top: .7rem; }
  #settings-shortcut { position: absolute !important; inset-inline-start: 1rem !important; top: .7rem !important; }
}

@media (min-width:48.01rem) {
  #refresh-shortcut { width: 2.45rem; height: 2.45rem; min-width: 2.45rem; min-height: 2.45rem; border-radius: .75rem; }
  #refresh-shortcut svg { width: 1.2rem; height: 1.2rem; }
}

/* V27.24 — refresh/toast polish */
.rehab-app-toast{
  position:fixed; inset-inline:50%; bottom:max(78px, calc(env(safe-area-inset-bottom) + 76px));
  transform:translate(-50%, 12px); opacity:0; pointer-events:none; z-index:12000;
  min-width:min(280px, calc(100vw - 32px)); max-width:calc(100vw - 32px);
  padding:.72rem 1rem; border-radius:14px; background:#17345f; color:#fff;
  box-shadow:0 12px 30px rgb(15 31 65 / 20%); text-align:center; font-weight:800;
  transition:opacity .18s ease, transform .18s ease;
}
.rehab-app-toast.is-visible{opacity:1; transform:translate(-50%,0);}
.rehab-app-toast[data-tone="error"]{background:#A51620;}
#header-actions{display:flex;align-items:center;gap:10px;}
#refresh-shortcut,#settings-shortcut{position:static !important; inset:auto !important; flex:0 0 auto;}
#refresh-shortcut{display:grid;place-items:center;}
@media (max-width:48rem){
  #header-actions{gap:10px;}
  #refresh-shortcut,#settings-shortcut{width:2.45rem;height:2.45rem;min-width:2.45rem;min-height:2.45rem;}
}
