/* Clara Connect V0.7 · design tokens and shared components */
:root {
  color-scheme: light;
  font: 16px/1.42 "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --navy: #101d42;
  --navy-deep: #0d2348;
  --navy-light: #244d86;
  --slate: #42557b;
  --muted: #526582;
  --canvas: #eff4fd;
  --white: #fff;
  --line: #cedbf1;
  --line-strong: #a8bddb;
  --cyan: #087c96;
  --cyan-dark: #00667e;
  --cyan-soft: #d7f7fc;
  --blue: #176dbd;
  --violet: #593cc4;
  --radius-sm: .65rem;
  --radius: .95rem;
  --radius-lg: 1.3rem;
  --shadow: 0 10px 27px #2b55911d, 0 2px 5px #3957840b;
  --surface: linear-gradient(150deg, #ffffffed, #f0f5fded);
  --gap: clamp(.9rem, 1.55vw, 1.55rem);
  --sidebar: clamp(12.7rem, 17.8vw, 17.2rem);
  --focus: #00758e;
  --green-bg: linear-gradient(155deg, #e6fbe9, #adf5bd);
  --green-ink: #073c29;
  --orange-bg: linear-gradient(155deg, #fff2d8, #ffd09b);
  --orange-ink: #743300;
  --red-bg: linear-gradient(155deg, #ffe9ee, #ffb3bf);
  --red-ink: #810f2b;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 0; }
body {
  margin: 0; min-height: 100vh; color: var(--navy);
  background: radial-gradient(ellipse at 83% 100%, #dceefcff, transparent 67%), radial-gradient(ellipse at 1% 82%, #dfe4fb, transparent 43%), var(--canvas);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
a { color: var(--cyan-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input, select, textarea {
  inline-size: 100%; min-inline-size: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .63rem .72rem; background: #f9fbff; min-height: 44px;
}
textarea { resize: vertical; }
input[type=checkbox] { accent-color: var(--cyan); width: 1.2rem; height: 1.2rem; min-height: 0; cursor: pointer; flex: none; margin: 0; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
p, strong, small { overflow-wrap: anywhere; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
small { font-size: .83em; }
img { display: block; max-inline-size: 100%; height: auto; }
summary { cursor: pointer; }
.icon {
  display: inline-block; inline-size: 1.2em; block-size: 1.2em; flex: none; vertical-align: middle;
  stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 20; top: .5rem; left: .5rem; transform: translateY(-160%); padding: .7rem 1rem; background: var(--white); border-radius: var(--radius-sm); }
.skip-link:focus { transform: none; }
.muted { color: var(--muted); }
.print-flag { display: none; }
.startup { margin: 24vh auto; text-align: center; color: var(--muted); }
.btn, .exports summary {
  display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 44px; padding: .52rem .83rem; text-align: center;
  font-weight: 650; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(150deg, #fff, #edf4ff); white-space: normal;
}
.btn:hover:not(:disabled), .exports summary:hover { border-color: #85b5d8; background: #e8f3ff; }
.btn.primary, .segmented .active {
  color: #fff; border-color: #087d98; background: linear-gradient(155deg, #087d9a, #006880); box-shadow: 0 3px 8px #076a8a32;
}
.btn.primary:hover:not(:disabled), .segmented .active:hover { color: #fff; background: #055c74; }
.btn.square { min-width: 44px; padding: 0; }
.btn.text-button { background: transparent; border-color: transparent; color: var(--cyan-dark); box-shadow: none; }
.btn.small { padding: .35rem .65rem; font-size: .85rem; }
.btn.glass { background: #e5f7ff; border-color: #e5f7ff; color: var(--navy-deep); box-shadow: 0 5px 13px #0003; }
.btn.glass:hover:not(:disabled) { background: #fff; }
.btn.light { background: #d9f9fc; color: var(--navy-deep); border-color: #d9f9fc; }
.icon-tile {
  width: 2.9rem; height: 2.9rem; display: inline-grid; place-items: center; flex: none; border-radius: .9rem;
  font-size: 1.4rem; color: #075b9f; background: linear-gradient(140deg, #edf8ff, #c6e9fa);
  box-shadow: inset 0 1px 1px #fff, 0 4px 12px #348ac31a;
}
.icon-tile.cyan { color: #007997; background: linear-gradient(145deg, #e4feff, #acecfa); }
.icon-tile.violet { color: var(--violet); background: linear-gradient(145deg, #f6f2ff, #dfdcfc); }
.icon-tile .icon { inline-size: 1.15em; block-size: 1.15em; }
.icon-tile use[href$="#bolt"] { fill: currentColor; }
.card {
  min-width: 0; padding: clamp(.85rem, 1.55vw, 1.4rem); border: 1px solid #d5e1f4;
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow);
}
.card-heading, .view-heading {
  display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; min-width: 0;
}
.card-heading > div, .view-heading > div { min-width: 0; flex: 1; }
.card-heading h2 { font-size: clamp(1.15rem, 1.7vw, 1.62rem); }
.card-heading p, .view-heading p { margin-top: .2rem; color: var(--slate); }
.card-heading p { font-size: .86rem; }
.view-heading { margin-bottom: var(--gap); }
.view-heading h1 { font-size: clamp(1.65rem, 2.8vw, 2.45rem); }
.view-heading .icon-tile { width: 3.6rem; height: 3.6rem; font-size: 1.7rem; }
.tag, .week-chip, .read-only, .course-state, .time-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: .34rem; white-space: nowrap;
  border-radius: 999px; padding: .38rem .65rem; font-size: .77rem; font-weight: 680;
}
.tag, .time-chip { color: #304a71; background: #e6eefb; }
.week-chip { color: #073851; background: #d7f6fb; font-size: .92rem; padding: .55rem .78rem; }
.week-chip .icon { color: #08798e; }
.read-only { color: #075a9e; background: #dceffe; }
.course-state.upcoming { background: #d8f7fa; color: #07576a; }
.course-state.pending { background: #e2eaff; color: #263c7d; }
.course-state.done { background: #ebeff6; color: #40516d; }
.dot { flex: none; display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); }
.dot.green { background: #168850; } .dot.orange { background: #bf600b; } .dot.red { background: #bc354c; }
.empty {
  text-align: center; display: grid; justify-items: center; align-content: center; gap: .48rem; min-height: 6rem;
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--slate); padding: .8rem;
}
.empty .icon { color: var(--blue); font-size: 1.6rem; }
.hint { color: var(--slate); background: #e6f1fd; border: 1px solid var(--line); padding: .65rem .8rem; border-radius: var(--radius-sm); }
.inline-error { padding: .6rem .75rem; color: #78142c; background: #fff0f2; border: 1px solid #e4a6b4; border-radius: var(--radius-sm); font-weight: 650; }

/* Application shell */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); align-items: start; }
.sidebar {
  display: flex; flex-direction: column; gap: 1.06rem; position: sticky; top: 0; min-height: 100vh; max-height: 100vh; overflow: auto;
  padding: clamp(.85rem, 1.5vw, 1.4rem); color: #f2f7ff; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: radial-gradient(ellipse at 49% 79%, #2456a4 0, transparent 43%), linear-gradient(149deg, #122e54 0, #0d2347 31%, #102c59 100%);
}
.brand { display: flex; align-items: center; gap: .72rem; min-width: 0; }
.brand > div { min-width: 0; }
.brand strong { display: block; line-height: 1.12; font-size: clamp(1rem, 1.54vw, 1.42rem); letter-spacing: -.045em; }
.brand small { color: #cdd2f9; display: block; margin-top: .22rem; font-weight: 550; }
.brand-mark {
  display: grid; place-items: center; flex: none; width: 3.15rem; height: 3.15rem; border-radius: .9rem;
  background: linear-gradient(135deg, #8af7ff, #1bb7df 46%, #2670d8); color: #fff; font-size: 2rem; font-weight: 800;
  text-shadow: 0 1px 5px #043f6b54; box-shadow: inset .1rem .1rem .16rem #ffffff69, 0 5px 13px #011e3980;
}
.sidebar .brand { padding: .72rem .25rem 1.15rem; }
.sidebar nav {
  display: grid; gap: .48rem; border-top: 1px solid #bdd4fd2e; border-bottom: 1px solid #bdd4fd2e; padding: 1.12rem 0;
}
.nav-link {
  min-height: 3.15rem; display: flex; gap: .85rem; align-items: center; text-align: left; border: 1px solid transparent; border-radius: .85rem;
  padding: .5rem .65rem; color: inherit; background: transparent; font-weight: 630;
}
.nav-link .icon { font-size: 1.25rem; }
.sidebar .nav-link:hover { background: #e2f0ff21; }
.sidebar .nav-link.active {
  color: #fff; background: linear-gradient(140deg, #087e96, #006b8e); border-color: #38c9e54f;
  box-shadow: inset 0 1px 9px #25d4e558, 0 4px 15px #0214315c;
}
.sidebar :focus-visible { outline-color: #a4f4ff; }
.sidebar-art { width: min(100%, 14.5rem); margin: auto auto 0; }
.sidebar-art img { width: 100%; }
.sidebar-foot { display: flex; gap: .58rem; align-items: center; color: #f1f6ff; border-top: 1px solid #bdd4fd2e; padding: .8rem .2rem .32rem; }
.sidebar-foot .icon { font-size: 1.45rem; }
.sidebar-foot small { display: block; color: #cddaf5; }
.page { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: clamp(.65rem, 1.7vw, 1.55rem); padding: 1rem calc(var(--gap) + .45rem);
  min-height: 6rem; border-bottom: 1px solid #d6e0f0; background: #fbfcffd1;
}
.desktop-greeting { min-width: 0; flex: 1; }
.desktop-greeting strong { display: block; line-height: 1.1; font-size: clamp(1.15rem, 2.15vw, 2.02rem); font-weight: 750; letter-spacing: -.04em; }
.desktop-greeting em { color: var(--cyan-dark); font-style: normal; }
.desktop-greeting small { display: block; margin-top: .2rem; color: var(--slate); }
.top-date { display: flex; align-items: center; justify-content: center; gap: .45rem; color: var(--slate); border-inline: 1px solid var(--line); padding: .35rem max(.7rem, 1.3vw); font-size: .94rem; }
.demo-label { display: inline-block; margin-left: .45rem; font-size: .74rem; color: #425578; font-weight: 650; }
.profile { position: relative; flex: 0 0 auto; max-width: 15rem; }
.profile summary {
  display: flex; align-items: center; gap: .57rem; padding: .45rem .65rem; min-height: 48px; list-style: none;
  border: 1px solid var(--line); border-radius: 1.3rem; background: linear-gradient(140deg, #fff, #edf3ff); box-shadow: 0 3px 9px #3d629a0d;
}
.profile summary::-webkit-details-marker, .exports summary::-webkit-details-marker { display: none; }
.profile summary > span:nth-child(2) { flex: 1; min-width: 0; }
.profile summary strong, .profile summary small { display: block; max-width: 11.5rem; }
.profile small { color: var(--slate); font-size: .79rem; }
.profile-menu, .exports > div {
  position: absolute; z-index: 5; inset-inline-end: 0; min-width: max-content; margin-top: .35rem; padding: .4rem;
  display: grid; gap: .25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.profile-menu .btn { justify-content: flex-start; border-color: transparent; }
.avatar {
  display: grid; place-items: center; width: 2.65rem; height: 2.65rem; flex: none; border-radius: 50%;
  background: linear-gradient(145deg, #e6faff, #bdd8fb); color: #184675; font-weight: 800;
}
.avatar.violet { background: #eee4ff; color: #5c379f; } .avatar.mint { background: #d7f8f3; color: #12635c; }
.mobile-brand, .mobile-nav { display: none; }
main { max-width: 110rem; margin-inline: auto; padding: var(--gap) calc(var(--gap) + .25rem) 1.5rem; }
#network { display: flex; align-items: center; gap: .55rem; margin-bottom: var(--gap); padding: .6rem .8rem; border-radius: var(--radius-sm); background: #e0ecfb; color: var(--navy); }
.toast-region:not(:empty) {
  z-index: 15; position: fixed; right: 1.15rem; bottom: 1rem; max-width: min(29rem, calc(100% - 2rem));
  display: flex; align-items: center; gap: .5rem; padding: .7rem .9rem; font-weight: 650;
  border-radius: var(--radius-sm); background: #12375a; color: #fff; box-shadow: 0 3px 14px #04193850;
}
.toast-region.failure { background: #7b1833; }

/* Teacher home and quick check-in */
.dashboard-grid, .admin-grid, .summary-grid, .reminders-grid { display: grid; align-items: start; gap: var(--gap); }
.dashboard-grid { grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); }
.dashboard-left, .dashboard-right, .admin-left, .admin-right, .quick-page { display: grid; gap: var(--gap); min-width: 0; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: stretch; gap: var(--gap); }
.hero, .reminder-banner {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0; padding: clamp(1rem, 2.2vw, 1.85rem);
  border: 1px solid #2087bd80; color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  background: radial-gradient(ellipse at 95% 90%, #00b9d7, transparent 64%), linear-gradient(125deg, #123160, #1a5793 66%, #1875b5);
}
.hero::before, .reminder-banner::before {
  content: ""; position: absolute; z-index: -1; right: -17%; bottom: -83%; width: 105%; height: 125%; transform: rotate(-18deg);
  border-radius: 49% 50% 0 0; background: linear-gradient(160deg, #0781ba65 32%, #55f3fc87 61%, #027da66b 80%);
}
.hero-content { position: relative; z-index: 1; }
.hero small { display: block; letter-spacing: .13em; font-weight: 700; color: #e5f5ff; font-size: .85rem; }
.hero h2, .hero h1 { margin: .35rem 0 .55rem; font-size: clamp(1.8rem, 3.25vw, 3.3rem); }
.hero p { display: flex; align-items: center; gap: .55rem; margin-top: .44rem; color: #e6f4ff; font-weight: 550; }
.hero .btn { margin-top: .85rem; font-size: .88rem; }
.next-hero .course-state { position: absolute; top: 1rem; right: 1rem; }
.next-hero .hero-content { padding-top: .9rem; }
.hero-book { position: absolute; right: 1%; bottom: 2%; width: 43%; max-width: 13.5rem; pointer-events: none; }
.timeline-card .card-heading { padding-bottom: .4rem; border-bottom: 1px solid #d5dfef; }
.timeline {
  display: grid; gap: .55rem; border-left: 2px solid #9db5d3; margin: .22rem 0 .42rem .6rem; padding-left: .83rem;
}
.lesson {
  min-width: 0; display: flex; align-items: center; gap: .7rem; text-align: left; padding: .57rem .72rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(140deg, #fcfdff, #e8effa);
}
.lesson-title { min-width: 0; flex: 1; }
.lesson-title strong, .lesson-title small { display: block; }
.lesson-title strong { font-size: 1.06rem; line-height: 1.22; }
.lesson-title small { color: #334a70; }
.timeline-button { position: relative; }
.timeline-button::before {
  content: ""; position: absolute; left: calc(-.83rem - 7px); top: calc(50% - 6px); width: 12px; height: 12px; border-radius: 50%;
  background: #f5f9ff; border: 3px solid #8095b3;
}
.timeline-button:hover, .timeline-button.current { background: #ddf6fc; border-color: #51b8d7; }
.timeline-button.current::before { border-color: #0089a8; }
.lesson-phases { display: flex; gap: .4rem; }
.lesson-phases .btn { min-width: 5.2rem; }
.quick-card .card-heading h2 { font-size: clamp(1.32rem, 2.35vw, 2rem); }
.quick-card .time-chip { font-size: .85rem; }
.quick-card .empty { margin-bottom: .7rem; }
.quick-meta { display: flex; flex-wrap: wrap; gap: .3rem .65rem; margin: -.26rem 0 .65rem; font-size: .79rem; color: var(--muted); }
.quick-meta span + span { border-left: 1px solid var(--line); padding-left: .65rem; }
.current-status { font-weight: 700; color: var(--cyan-dark); }
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: .32rem; padding: .2rem;
  background: #eaf0fa; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem;
}
.segmented .btn { border-color: transparent; background: transparent; }
.segmented .btn.active { color: #fff; border-color: #087d98; background: linear-gradient(155deg, #087d9a, #006880); }
.segmented .btn.active:hover { background: #055c74; }
.check-fieldset, .palette-fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: .48rem .6rem; }
.check-row, .note-toggle.btn {
  display: flex; gap: .57rem; align-items: center; min-width: 0; min-height: 44px; text-align: left; padding: .51rem .68rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(150deg, #fcfdff, #eef3fb);
  font-weight: 540; cursor: pointer;
}
.check-row:hover, .check-row:has(input:checked) { border-color: #86bfd9; background: #e6f7fb; }
.check-row small { display: block; color: var(--muted); }
.observation { margin: .52rem 0 .88rem; }
.observation .note-toggle { width: 100%; justify-content: flex-start; color: var(--slate); }
.observation > label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 690; }
.grade-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.grade-choice {
  display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 4.5rem; gap: .62rem; text-align: left;
  padding: .6rem .45rem; border: 1px solid #1d365225; border-radius: var(--radius); box-shadow: 0 5px 14px #233d6911;
}
.grade-choice.green, .grade-badge.green { background: var(--green-bg); color: var(--green-ink); }
.grade-choice.orange, .grade-badge.orange { background: var(--orange-bg); color: var(--orange-ink); }
.grade-choice.red, .grade-badge.red { background: var(--red-bg); color: var(--red-ink); }
.grade-choice strong, .grade-choice small { display: block; }
.grade-choice strong { font-size: clamp(1.03rem, 1.55vw, 1.43rem); line-height: 1.19; letter-spacing: -.025em; }
.grade-choice small { margin-top: .16rem; }
button.grade-choice:hover { border-color: var(--cyan-dark); }
.grade-choice.chosen { outline: 2px solid var(--cyan-dark); outline-offset: 2px; }
.grade-choice.chosen:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.grade-glyph {
  display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  box-shadow: inset 0 1px 2px #ffffff69; color: #fff; font-size: 1.02rem;
}
.grade-glyph .icon { inline-size: 1.05em; block-size: 1.05em; stroke-width: 2.8; }
.green .grade-glyph { background: linear-gradient(150deg, #28ad67, #137446); }
.orange .grade-glyph { background: linear-gradient(150deg, #d5790e, #a75100); }
.red .grade-glyph { background: linear-gradient(150deg, #df536a, #ad2446); }
.grade-badge {
  display: inline-flex; align-items: center; gap: .37rem; width: max-content; min-width: 4.25rem; border-radius: 999px;
  padding: .28rem .46rem; font-size: .85rem; line-height: 1.1; font-weight: 750;
}
.grade-badge .grade-glyph { width: 1.15rem; height: 1.15rem; font-size: .68rem; }
.quick-actions, .form-actions { display: flex; align-items: center; gap: .44rem; flex-wrap: wrap; margin-top: .8rem; }
.quick-actions .primary { margin-left: auto; }
.red-confirm { margin-top: .65rem; padding: .58rem .7rem; color: var(--red-ink); border-radius: var(--radius-sm); background: #fff0f3; border: 1px solid #f3c4cd; }
.red-confirm label { display: flex; align-items: center; min-height: 44px; gap: .5rem; font-weight: 690; }
.quick-card .inline-error { margin-top: .65rem; }
.updated { display: block; margin-top: .6rem; color: var(--muted); }
.reminder-rows { display: grid; gap: .48rem; }
.reminder-row {
  display: flex; align-items: center; gap: .5rem; padding: .46rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(145deg, #fcfdff, #eff4fb);
}
.reminder-row > div { flex: 1; min-width: 0; }
.reminder-row strong, .reminder-row small { display: block; }
.reminder-row small { color: var(--slate); }
.reminder-row .icon-tile, .preview-item .icon-tile { width: 2rem; height: 2rem; border-radius: .65rem; font-size: 1rem; }
.switch {
  position: relative; display: block; flex: none; width: 2.85rem; height: 1.58rem; padding: 0;
  border: 1px solid #7a94b4; border-radius: 999px; background: #b8c9dd;
}
.switch::after {
  content: ""; position: absolute; top: .13rem; left: .13rem; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px #14395450; transition: transform .15s ease;
}
.switch[aria-checked=true], input:checked + .switch { background: #087f99; border-color: #087f99; }
.switch[aria-checked=true]::after, input:checked + .switch::after { transform: translateX(1.27rem); }
button.switch::before, .switch-label::before { content: ""; position: absolute; inset: -.6rem -.18rem; }
.switch-label { cursor: pointer; position: relative; display: inline-flex; min-height: 44px; align-items: center; }
.switch-label input { position: absolute; opacity: 0; }
.switch-label input:focus-visible + .switch { outline: 3px solid var(--focus); outline-offset: 3px; }
.preview-item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; border: 1px solid #b2dbe3; border-radius: var(--radius); padding: .65rem; background: #eefafd; }
.preview-item > div { flex: 1; }
.preview-item small { display: block; color: var(--muted); }
.date-tile, .report-date { display: inline-flex; justify-content: center; align-items: center; background: #e8f0fa; color: #1d3d67; border-radius: var(--radius-sm); padding: .45rem; font-size: .83rem; font-weight: 700; }
.quick-page { max-width: 56rem; margin: 0 auto; }
.reminder-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; padding: .7rem 3rem .7rem .78rem; }
.reminder-banner > div { flex: 1; min-width: 9rem; }
.reminder-banner strong, .reminder-banner span:not(.icon-tile) { display: block; }
.reminder-banner strong { font-size: 1.25rem; }
.reminder-banner .square { position: absolute; right: .16rem; top: .1rem; background: transparent; border-color: transparent; color: #fff; }
.reminder-banner .square:hover { background: #0f527b; }
.reminders-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
.reminders-grid .form { margin-top: .9rem; }
.reminders-grid .muted { margin-top: .8rem; }
.reminder-course { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: .45rem; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.reminder-course small { color: var(--slate); }

/* Schedule and reports */
.schedule-tools, .summary-tools { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: var(--gap); }
.week-nav, .export-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.week-nav > strong { padding-inline: .3rem; }
.schedule-list { display: grid; gap: var(--gap); margin-top: var(--gap); }
.day-card { display: grid; grid-template-columns: 7.7rem minmax(0, 1fr); align-items: start; gap: .75rem; }
.day-heading strong, .day-heading small { display: block; }
.day-heading strong { font-size: 1.18rem; }
.day-heading small { color: var(--muted); }
.day-heading .tag { margin-top: .25rem; }
.day-lessons { display: grid; gap: .42rem; }
.summary-grid { grid-template-columns: minmax(0, 57fr) minmax(0, 43fr); margin-bottom: var(--gap); }
.overview-title { display: flex; align-items: center; gap: .35rem; font-size: .92rem; margin: .87rem 0 .46rem; }
.day-selector { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .34rem; }
.day-selector .btn { display: flex; flex-direction: column; gap: .14rem; padding: .38rem .24rem; font-size: .81rem; }
.day-selector small { color: var(--slate); }
.day-selector .active { background: #d2f7fd; border-color: #55b6cc; }
.filters-card label { display: grid; grid-template-columns: auto 4.3rem minmax(0, 1fr); align-items: center; gap: .4rem; padding: .35rem 0; }
.filters-card label + label { border-top: 1px solid #e1e8f5; }
.filters-card label .icon-tile { height: 2.45rem; width: 2.45rem; font-size: 1.04rem; border-radius: var(--radius-sm); }
.exports { position: relative; }
.exports .btn { justify-content: flex-start; }
.reports { display: grid; gap: .52rem; border-left: 2px solid #9db5d3; margin-left: .45rem; padding-left: .85rem; }
.report { position: relative; display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: start; gap: .7rem; }
.report::before {
  content: ""; position: absolute; left: calc(-.85rem - 7px); top: 1.32rem; width: 12px; height: 12px;
  border: 3px solid #8095b3; border-radius: 50%; background: #f5f9ff;
}
.report:first-child::before { border-color: #0089a8; }
.report-date { min-height: 54px; text-align: center; border: 1px solid var(--line); }
.report-body {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(5.8rem, .68fr) auto minmax(0, 1.9fr);
  align-items: center; gap: .6rem; border: 1px solid var(--line); padding: .5rem .65rem; border-radius: var(--radius);
  min-height: 54px; background: linear-gradient(145deg, #fff, #f1f5fb);
}
.report-subject, .report-time { display: flex; align-items: center; min-width: 0; gap: .48rem; }
.report-subject small, .report-time small { display: block; color: var(--slate); }
.report-subject .icon-tile { height: 2.1rem; width: 2.1rem; font-size: .95rem; border-radius: .65rem; }
.report-time { font-size: .84rem; }
.report-note { border-left: 1px solid var(--line-strong); padding-left: .65rem; font-size: .88rem; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: .2rem; list-style: none; padding: 0; }
.report-note p + .chips { margin-top: .35rem; }
.chips li { padding: .16rem .35rem; background: #e7effb; border-radius: .35rem; color: #2b446a; }

/* Administration */
.admin-grid { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }
.admin-hero { display: flex; align-items: center; min-height: 10.8rem; }
.admin-hero .hero-content { max-width: 73%; }
.admin-hero h1 { font-size: clamp(1.68rem, 3vw, 3rem); }
.hero-team { position: absolute; right: 1%; bottom: 2%; width: 35%; max-width: 14rem; }
.staff-card .card-heading { flex-wrap: wrap; }
.staff-card .card-heading h2 { font-size: clamp(1.12rem, 1.7vw, 1.55rem); }
.staff-card .card-heading .primary { font-size: .84rem; }
.member-list, .assignment-list, .calendar-list { display: grid; gap: .35rem; list-style: none; padding: 0; }
.member-head, .member {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(4rem, .72fr) minmax(4rem, .86fr) 2.75rem; gap: .35rem; align-items: center;
}
.member-head { color: var(--slate); padding: .36rem .45rem; font-size: .76rem; background: #eaf1fc; border-radius: .6rem; }
.member {
  padding: .33rem .45rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(140deg, #fff, #ecf3fe);
}
.member:first-of-type { border-color: #8dd6ea; background: #e6f8fc; }
.member .avatar { width: 2rem; height: 2rem; font-size: .83rem; }
.member-person, .member-subject, .member-push { display: flex; gap: .38rem; align-items: center; min-width: 0; font-size: .8rem; }
.member-person small { display: block; color: var(--muted); }
.member-subject { color: #17477e; }
.member-push { color: #3d4f77; }
.member-push .icon { color: var(--violet); }
.member .tag { justify-self: start; max-width: 100%; padding: .31rem .4rem; white-space: normal; font-size: .72rem; }
.active-tag { background: #d9f4fb; color: #12536a; }
.assignment-list li, .calendar-list li {
  min-width: 0; display: flex; align-items: center; gap: .5rem; padding: .32rem .42rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(145deg, #fff, #eef4fb);
}
.assignment-list li > span:nth-child(2), .calendar-list li > span { flex: 1; }
.assignment-list strong, .assignment-list small { display: block; }
.assignment-list small { color: var(--slate); }
.assignment-list .icon-tile { width: 2.15rem; height: 2.15rem; font-size: 1rem; border-radius: .65rem; }
.assignment-link { width: 100%; margin-top: .6rem; }
.technical-card dl { display: grid; gap: .32rem; }
.technical-card dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .26rem .38rem; border-bottom: 1px solid var(--line); }
.technical-card dd { text-align: right; font-weight: 700; }
.technical-card dd small { display: block; font-weight: 500; color: var(--muted); }
.calendar-card { margin-top: var(--gap); }
.rules-card form { display: grid; gap: .45rem; }
.rules-card input[type=number] { width: 4.3rem; min-height: 38px; padding: .25rem .4rem; }

/* Forms, dialogs, login */
.form { display: grid; gap: .65rem; }
.form label:not(.check-row) { display: grid; gap: .3rem; color: var(--navy); font-weight: 640; font-size: .92rem; }
.form .btn[type=submit] { justify-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.pick-tools { align-items: end; }
.pick-tools > div { display: flex; flex-wrap: wrap; gap: .29rem; }
dialog {
  width: min(44rem, calc(100vw - 1.5rem)); max-height: min(85vh, 52rem); color: var(--navy); padding: 0; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: #f7fbff; box-shadow: 0 12px 55px #1129506b;
}
dialog::backdrop { background: #0817379c; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.dialog-content { padding: 1rem; }
.more-menu { display: grid; gap: .5rem; }
.more-menu .btn { justify-content: flex-start; }
.slot-picker { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .56rem; }
.slot-picker summary { font-weight: 700; padding: .27rem; min-height: 36px; }
.pick-list { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.checklist-custom { display: grid; gap: .36rem; margin-top: .65rem; padding: 0; list-style: none; }
.checklist-custom li { display: flex; align-items: center; justify-content: space-between; padding: .38rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.login-screen { display: grid; min-height: 100vh; align-items: center; padding: 1rem; }
.login-layout {
  display: grid; width: min(52rem, 100%); margin: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 15px 45px #163d7526; background: var(--surface);
}
.login-art {
  display: flex; flex-direction: column; justify-content: space-between; align-items: start; gap: 1rem; padding: clamp(1rem, 5vw, 2.8rem); color: #fff;
  background: radial-gradient(ellipse at 69% 80%, #2b62a5, transparent 55%), linear-gradient(145deg, #0d2248, #163867);
}
.login-art h1 { font-size: clamp(1.55rem, 3.5vw, 2.8rem); }
.login-art img { align-self: center; }
.login-panel { padding: clamp(1rem, 4.4vw, 2.5rem); display: grid; align-content: center; gap: 1.05rem; }
.login-copy h2 { margin: .65rem 0 .25rem; font-size: clamp(1.45rem, 2.8vw, 2rem); }
.login-copy p { color: var(--slate); }
.login-copy .demo-label { margin: .42rem 0 0; }
.login-panel .form .primary { width: 100%; }

/* Tablet and phone */
@media (max-width: 1150px) {
  .top-date { display: none; }
  .sidebar { padding-inline: .85rem; }
  .dashboard-grid { grid-template-columns: minmax(0, 36fr) minmax(0, 64fr); }
  .dashboard-lower { grid-template-columns: 1fr; }
  .timeline-button { flex-wrap: wrap; gap: .35rem; }
  .timeline-button .course-state { padding: .26rem .43rem; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-right { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .assignment-card { grid-row: span 2; }
}
@media (max-width: 900px) {
  :root { --sidebar: 11.8rem; }
  .desktop-greeting .demo-label { display: block; margin-left: 0; }
  .dashboard-grid, .summary-grid, .reminders-grid { grid-template-columns: 1fr; }
  .dashboard-left { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .dashboard-lower { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-book { opacity: .77; }
}
@media (max-width: 760px) {
  :root { --gap: .72rem; --radius-lg: 1.04rem; }
  .app { display: block; }
  .sidebar, .desktop-greeting { display: none; }
  .topbar {
    min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; color: #fff; align-items: center;
    gap: .57rem; padding: max(.75rem, env(safe-area-inset-top)) .7rem .65rem;
    background: linear-gradient(152deg, #0e2347 7%, #193d72 76%, #e6f1ff 140%);
  }
  .mobile-brand { display: block; }
  .brand { gap: .52rem; }
  .brand strong { font-size: 1.12rem; }
  .brand small { font-size: .72rem; }
  .brand-mark { width: 2.5rem; height: 2.5rem; border-radius: .72rem; font-size: 1.55rem; }
  .topbar .week-chip { font-size: .74rem; padding: .43rem .55rem; white-space: normal; text-align: center; }
  .profile { grid-column: 1 / -1; max-width: none; color: var(--navy); }
  .profile summary { min-height: 46px; padding: .33rem .58rem; border-radius: .82rem; }
  .profile summary strong, .profile summary small { max-width: none; }
  .profile .avatar { width: 1.95rem; height: 1.95rem; font-size: .79rem; }
  main { padding: .7rem .58rem calc(4.9rem + env(safe-area-inset-bottom)); }
  .mobile-nav {
    display: flex; justify-content: space-around; gap: .05rem; position: fixed; z-index: 7; bottom: 0; left: 0; right: 0;
    padding: .23rem .21rem max(.2rem, env(safe-area-inset-bottom)); color: var(--slate); border-top: 1px solid var(--line);
    background: #fbfdff; box-shadow: 0 -4px 14px #2a4a7a15;
  }
  .mobile-nav .nav-link { display: flex; flex: 1; flex-direction: column; gap: .12rem; justify-content: center; min-width: 0; min-height: 3.35rem; padding: .22rem .12rem; font-size: .67rem; text-align: center; line-height: 1.15; }
  .mobile-nav .nav-link .icon { font-size: 1.42rem; }
  .mobile-nav .nav-link.active { background: #d7f4fb; color: #06566a; }
  .mobile-nav .nav-link:hover { border-color: #8dc7de; background: #e6f3fb; }
  .toast-region:not(:empty) { right: .6rem; bottom: calc(4.35rem + env(safe-area-inset-bottom)); }
  .dashboard-left, .dashboard-lower, .admin-right { grid-template-columns: 1fr; }
  .assignment-card { grid-row: auto; }
  .dashboard-right { order: -1; }
  .dashboard-grid .dashboard-right > .quick-card { order: 0; }
  .card { padding: .72rem; }
  .card-heading { gap: .6rem; margin-bottom: .65rem; }
  .card-heading .icon-tile { width: 2.52rem; height: 2.52rem; font-size: 1.1rem; border-radius: .7rem; }
  .card-heading h2 { font-size: 1.2rem; }
  .card-heading p { font-size: .8rem; }
  .view-heading { flex-wrap: wrap; }
  .view-heading p { font-size: .85rem; }
  .view-heading .icon-tile { height: 2.8rem; width: 2.8rem; font-size: 1.3rem; }
  .view-heading .read-only { margin-left: 3.58rem; margin-top: -.4rem; }
  .checks { gap: .35rem; }
  .check-row { font-size: .84rem; gap: .42rem; padding-inline: .46rem; }
  .quick-card .card-heading h2 { font-size: 1.31rem; }
  .quick-card .card-heading p { margin-top: .09rem; }
  .quick-card .time-chip { font-size: .73rem; padding: .29rem .43rem; }
  .quick-meta { margin: -.16rem 0 .5rem; }
  .grade-choice { flex-direction: column; text-align: center; min-height: 4.4rem; padding: .32rem .2rem; gap: .26rem; border-radius: .75rem; }
  .grade-choice .grade-glyph { width: 1.65rem; height: 1.65rem; font-size: .88rem; }
  .grade-choice small { font-size: .67rem; }
  .reminder-banner .btn.light { min-height: 44px; padding-inline: .5rem; font-size: .77rem; }
  .reminder-banner > div { min-width: 0; }
  .reminder-banner strong { font-size: 1.06rem; }
  .reminder-banner span:not(.icon-tile) { font-size: .81rem; }
  .reminder-banner { flex-wrap: nowrap; padding-right: 2.6rem; gap: .4rem; }
  .reminder-banner > .icon-tile { width: 2.2rem; height: 2.2rem; font-size: 1.05rem; border-radius: .62rem; }
  .reminder-banner .square { width: 36px; min-width: 36px; min-height: 44px; }
  .quick-actions { margin-top: .52rem; }
  .quick-actions .primary { min-width: 48%; }
  .dashboard-grid .next-hero { min-height: 10rem; }
  .hero h2 { overflow-wrap: anywhere; }
  .admin-hero { min-height: 9rem; }
  .report { grid-template-columns: 3.55rem minmax(0, 1fr); gap: .33rem; }
  .reports { margin-left: .32rem; padding-left: .52rem; }
  .report::before { left: calc(-.52rem - 6px); width: 10px; height: 10px; }
  .report-body { grid-template-columns: minmax(0, 1fr) auto; gap: .25rem .55rem; }
  .report-time { grid-column: 1; grid-row: 2; }
  .report-note { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); padding: .35rem 0 0; }
  .day-card { grid-template-columns: 1fr; }
  .day-heading { display: flex; align-items: center; gap: .42rem; flex-wrap: wrap; }
  .day-heading .tag { margin-top: 0; }
  .list-lesson { flex-wrap: wrap; padding: .5rem; gap: .47rem; }
  .lesson-phases { flex-basis: 100%; }
  .lesson-phases .btn { flex: 1; }
  .member-head { display: none; }
  .member { grid-template-columns: 1fr 1fr auto; gap: .27rem; }
  .member-person { grid-column: 1 / 3; }
  .member-subject { grid-column: 1 / -1; grid-row: 2; }
  .member .tag { grid-column: 1; grid-row: 3; }
  .member-push { grid-column: 2; grid-row: 3; }
  .member .btn { grid-column: 3; grid-row: 1; }
  .staff-card .card-heading .primary, .calendar-card .card-heading .primary { align-self: start; }
  .calendar-card .card-heading { flex-wrap: wrap; }
  .filters-card label { grid-template-columns: auto 4rem minmax(0, 1fr); }
  .filters-card select, .form input, .form select, .observation textarea { font-size: 1rem; }
  .login-layout { grid-template-columns: 1fr; max-width: 30rem; }
  .login-art { padding: 1rem; gap: .75rem; }
  .login-art img { display: none; }
  .login-art h1 { font-size: 1.3rem; }
}
@media (max-width: 390px) {
  .quick-card .time-chip .icon { display: none; }
  .quick-card .card-heading { column-gap: .4rem; }
  .quick-card .card-heading .icon-tile { width: 2.2rem; height: 2.2rem; }
  .form-grid, .pick-list { grid-template-columns: minmax(0, 1fr); }
  .read-only { padding: .31rem .49rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@page { size: A4; margin: 13mm; }
@media print {
  body { color: #000; background: #fff; font-size: 10.5pt; }
  .sidebar, .topbar, .mobile-nav, .summary-tools, .filters-card, .toast-region, .skip-link, .day-selector, .overview-title, #network { display: none !important; }
  .app, .summary-grid, .report-body { display: block; }
  main { padding: 0; margin: 0; max-width: none; }
  .view-heading, .card { margin-bottom: 3mm; }
  .view-heading h1 { font-size: 19pt; }
  .card { padding: 3mm; }
  .card-heading { margin-bottom: 2mm; }
  .card-heading h2 { font-size: 13pt; }
  .print-flag { display: block; margin: -4mm 0 4mm; font-weight: 700; }
  .reports { margin: 0; padding: 0; border: 0; }
  .report::before { display: none; }
  .card, .report-body { border-color: #caced3; box-shadow: none; background: transparent; }
  .report { grid-template-columns: 25mm minmax(0, 1fr); gap: 2.5mm; break-inside: avoid; }
  .report-date { min-height: 0; padding: 1.3mm 1mm; }
  .report-body { padding: 2mm; }
  .report-subject, .report-time, .grade-badge { display: inline-flex; margin-right: 3mm; }
  .report-note { padding: 1mm 0 0; border: 0; }
  .icon-tile, .report-time .icon, .grade-glyph { display: none; }
  .stats-tile { min-height: 0; box-shadow: none; }
  .grade-badge, .stats-tile { print-color-adjust: exact; }
}
