:root {
  color-scheme: dark;
  --navy: #061326;
  --navy-2: #081724;
  --navy-3: #0a1d2a;
  --navy-4: #0d2635;
  --surface: #0a1d2a;
  --surface-2: #0d2533;
  --surface-3: #102c3b;
  --surface-hover: #143646;
  --teal: #0799ad;
  --teal-bright: #18c0cf;
  --teal-dark: #087d91;
  --teal-soft: #dff6f8;
  --gold: #f4b400;
  --gold-soft: #fff3c4;
  --purple: #7559d9;
  --purple-soft: #eee9ff;
  --green: #0a8b62;
  --green-soft: #e7f8f1;
  --red: #c64c43;
  --red-soft: #fff0ee;
  --orange: #d87827;
  --paper: #fcfaf5;
  --ivory: #fff8ec;
  --white: #ffffff;
  --ink: #102033;
  --text: #eef7fa;
  --text-2: #cfdee4;
  --muted: #819aa8;
  --muted-2: #5f7a89;
  --line: #d8e2e8;
  --line-dark: #173746;
  --line-strong: #255061;
  --shadow: 0 18px 48px rgba(0, 0, 0, .22);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --topbar-h: 70px;
  --bottomnav-h: 72px;
  --desktop-rail: 92px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #06141f;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

svg {
  flex: none;
}

.app {
  width: 100%;
  min-height: 100vh;
  padding-bottom: calc(var(--bottomnav-h) + 18px + var(--safe-bottom));
  background:
    radial-gradient(circle at 20% 0%, rgba(7, 153, 173, .10), transparent 34%),
    linear-gradient(180deg, #06141f 0%, #071823 100%);
}

.page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 20px 14px 34px;
}

/* App shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-h);
  background: rgba(8, 23, 36, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(100%, 760px);
  min-height: var(--topbar-h);
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-brand,
.topbar-alert {
  border: 0;
  color: var(--text);
}

.topbar-brand {
  min-width: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  text-align: left;
}

.topbar-brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

.topbar-brand span {
  min-width: 0;
  display: grid;
}

.topbar-brand strong {
  font-size: 13px;
  line-height: 1.2;
}

.topbar-brand small {
  margin-top: 2px;
  font-size: 9px;
  color: #8da6b4;
}

.topbar-alert {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #0d2635;
  border: 1px solid #193d4d;
}

.topbar-alert span {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e25348;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border: 2px solid #081724;
}

.account-menu {
  position: fixed;
  z-index: 80;
  top: 62px;
  right: 14px;
  width: min(250px, calc(100vw - 28px));
  padding: 8px;
  border-radius: 16px;
  background: #0e2735;
  border: 1px solid #254858;
  box-shadow: var(--shadow);
}

.account-menu button {
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text-2);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.account-menu button:hover {
  background: #173746;
  color: #fff;
}

.bottomnav {
  position: fixed;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 24, 35, .97);
  border-top: 1px solid #193847;
  padding-bottom: var(--safe-bottom);
  backdrop-filter: blur(18px);
}

.bottomnav-inner {
  width: min(100%, 760px);
  height: var(--bottomnav-h);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.navitem {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #78919f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 800;
  transition: color .18s ease, background .18s ease;
}

.navitem svg {
  width: 20px;
  height: 20px;
}

.navitem.active {
  color: #1cc0cf;
}

.navitem:active {
  background: rgba(24, 192, 207, .08);
}

/* Shared typography and controls */
.eyebrow,
.sheet-kicker {
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 10px;
  font-weight: 800;
  color: #21b7c5;
}

.title {
  margin: 5px 0 7px;
  color: #f3f9fb;
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.subtitle {
  margin: 0;
  color: #8da5b3;
  font-size: 13px;
  line-height: 1.55;
}

.head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-head,
.today-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-head {
  margin: 20px 0 11px;
}

.section-title {
  margin: 3px 0 0;
  color: #eef7fa;
  font-size: 18px;
  line-height: 1.25;
}

.meta,
.helper,
.hint {
  color: var(--muted);
}

.meta {
  font-size: 11px;
  line-height: 1.5;
}

.helper {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.5;
}

.hint {
  font-size: 10px;
}

.btn,
.btn-icon,
.tab,
.quick-chip,
.template,
.choice,
.status-option,
.preset-card,
.advanced-toggle {
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.btn {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.btn:active,
.btn-icon:active,
.choice:active,
.today-quick-card:active,
.today-attendance-btn:active,
.today-open-btn:active,
.navitem:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, #0799ad, #087f91);
  color: #fff;
  box-shadow: 0 8px 20px rgba(7, 153, 173, .18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0aabba, #08798a);
}

.btn-secondary {
  background: #102a38;
  color: #dce9ee;
  border-color: #2b4b5a;
}

.btn-secondary:hover {
  background: #173746;
  border-color: #3a6272;
}

.btn-gold {
  background: #f4b400;
  color: #302200;
  box-shadow: 0 8px 20px rgba(244, 180, 0, .16);
}

.btn-danger {
  background: #b8423b;
  color: #fff;
}

.btn-soft-danger {
  background: #3b2022;
  color: #ff9b93;
  border-color: #643235;
}

.btn-link {
  min-height: 34px;
  padding: 6px 3px;
  border: 0;
  background: transparent;
  color: #29bfcd;
}

.btn-compact {
  min-height: 40px;
  padding: 8px 12px;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #2b4c5b;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #102a38;
  color: #d9e8ed;
}

.field,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #315260;
  border-radius: 12px;
  outline: none;
  background: #0d2634;
  color: #edf7f9;
}

.field::placeholder,
.textarea::placeholder {
  color: #67808f;
}

.field:focus,
.textarea:focus,
.select:focus {
  border-color: #0fa7b8;
  box-shadow: 0 0 0 3px rgba(15, 167, 184, .14);
}

.textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.55;
}

.select option {
  color: #102033;
}

.label {
  display: block;
  margin-bottom: 6px;
  color: #b6c9d1;
  font-size: 11px;
  font-weight: 800;
}

.group {
  margin-top: 15px;
}

.grid2,
.grid3 {
  display: grid;
  gap: 10px;
}

.grid2 {
  grid-template-columns: 1fr 1fr;
}

.grid3 {
  grid-template-columns: repeat(3, 1fr);
}

.search-wrap {
  position: relative;
  margin: 13px 0;
}

.search-wrap > svg {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #75909f;
  pointer-events: none;
}

.search-wrap .field {
  padding-left: 43px;
}

.tabs {
  display: flex;
  gap: 7px;
  margin: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  min-width: 84px;
  min-height: 42px;
  flex: 1;
  border: 1px solid #2a4958;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0d2634;
  color: #8da5b2;
  font-size: 11px;
  font-weight: 800;
}

.tab.active {
  background: rgba(7, 153, 173, .16);
  border-color: #087f91;
  color: #32c2cf;
}

.count {
  min-width: 21px;
  padding: 2px 6px;
  border-radius: 99px;
  display: inline-grid;
  place-items: center;
  background: rgba(24, 192, 207, .12);
  color: #a8dfe4;
  font-size: 10px;
  font-weight: 800;
}

.banner {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  line-height: 1.5;
}

.banner-error {
  background: #3e2022;
  color: #ffaaa3;
  border: 1px solid #693538;
}

.banner-warn {
  background: #3a3117;
  color: #f1d06b;
  border: 1px solid #63552b;
}

.banner-success {
  background: #113b30;
  color: #8ee1bd;
  border: 1px solid #1f624d;
}

.loading,
.empty {
  padding: 26px 16px;
  border: 1px dashed #31505e;
  border-radius: 15px;
  background: rgba(13, 38, 52, .72);
  color: #7f98a6;
  text-align: center;
  font-size: 12px;
}

.spinner {
  width: 23px;
  height: 23px;
  margin: 0 auto 9px;
  border: 3px solid #1b3d4c;
  border-top-color: #1bc0ce;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}

.pill {
  max-width: 150px;
  padding: 4px 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #1a3441;
  color: #a9bec8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.package-line,
.progress-bar,
.today-package-track,
.summary-progress {
  overflow: hidden;
  border-radius: 99px;
}

.package-line {
  height: 5px;
  margin: 10px 0 8px;
  background: #183746;
}

.package-line > span,
.today-package-track span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #0da7b8, #1ac8d4);
}

/* Today dashboard */
.today-page {
  width: min(100%, 480px);
  padding-top: 14px;
}

.today-hero {
  padding: 2px 1px 0;
}

.today-greeting h1 {
  margin: 4px 0 3px;
  color: #f3f9fb;
  font-size: clamp(24px, 7vw, 30px);
  line-height: 1.14;
  letter-spacing: -.035em;
}

.today-kicker {
  color: #8ca5b3;
  font-size: 10px;
  font-weight: 700;
}

.today-greeting p {
  margin: 0;
  color: #5f7c8c;
  font-size: 10px;
}

.today-quick-grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.today-quick-card {
  position: relative;
  min-width: 0;
  min-height: 88px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-content: center;
  background: linear-gradient(145deg, #087f92, #0b667c);
  color: #fff;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.today-quick-card.upload {
  background: linear-gradient(145deg, #0b607d, #0a4966);
}

.today-quick-card.active {
  background: linear-gradient(145deg, #0a8b62, #076047);
}

.today-quick-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}

.today-quick-card > span {
  grid-row: 1 / 3;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .13);
}

.today-quick-card strong {
  min-width: 0;
  align-self: end;
  font-size: 10px;
  line-height: 1.25;
}

.today-quick-card small {
  min-width: 0;
  margin-top: 3px;
  align-self: start;
  color: #bee7ec;
  font-size: 7.5px;
  line-height: 1.35;
}

.today-quick-card > b {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f2a21b;
  color: #2b1c00;
  font-size: 8px;
}

.today-dashboard-grid,
.today-classes,
.today-attention {
  min-width: 0;
}

.today-classes,
.today-attention {
  margin-top: 18px;
}

.today-section-head {
  margin: 0 2px 9px;
}

.today-section-head h2 {
  margin: 0;
  color: #f1f8fa;
  font-size: 16px;
  line-height: 1.25;
}

.today-section-head p {
  margin: 3px 0 0;
  color: #6e8998;
  font-size: 9px;
}

.today-section-head > button,
.today-group-label button {
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #1bc0cf;
  font-size: 9px;
  font-weight: 800;
}

.today-student-group + .today-student-group {
  margin-top: 10px;
}

.today-group-label {
  margin: 0 2px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-group-label strong {
  color: #91a8b5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.today-student-list {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.today-student-card {
  min-width: 0;
  overflow: hidden;
  padding: 11px;
  border: 1px solid #193b49;
  border-radius: 15px;
  background: linear-gradient(145deg, #0b2230, #091c28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
}

.today-student-main {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.today-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}

.today-student-copy {
  min-width: 0;
}

.today-student-copy strong,
.today-student-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-student-copy strong {
  color: #f5fafb;
  font-size: 13px;
}

.today-student-copy small {
  margin-top: 3px;
  color: #7d96a5;
  font-size: 9px;
}

.today-session-state {
  padding: 5px 7px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.state-scheduled {
  background: #0c3c4f;
  color: #55ccda;
}

.state-summary {
  background: #4b3610;
  color: #f5bd35;
}

.state-completed {
  background: #0c422f;
  color: #61dfad;
}

.state-absent {
  background: #4b2222;
  color: #ff9187;
}

.state-no-class {
  background: #2a3841;
  color: #b2c0c7;
}

.today-package {
  margin-top: 9px;
}

.today-package > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #89a0ad;
  font-size: 9px;
}

.today-package b {
  color: #cfe1e7;
}

.today-package small {
  color: #647f8e;
  font-size: 8px;
}

.today-package-track {
  height: 4px;
  margin-top: 5px;
  background: #183746;
}

.today-focus {
  width: 100%;
  margin: 7px 0 8px;
  overflow: hidden;
  color: #708a99;
  font-size: 8.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-attendance-actions {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.today-attendance-btn,
.today-open-btn {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 3px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.today-attendance-btn {
  border: 1px solid #2a4a58;
  background: #102936;
  color: #90a5b1;
}

.today-attendance-btn.present {
  border-color: #1f604d;
  color: #73ceb0;
}

.today-attendance-btn.absent {
  border-color: #623737;
  color: #e6938c;
}

.today-attendance-btn.na {
  border-color: #3a4e59;
  color: #a7b5bd;
}

.today-attendance-btn.active.present {
  background: #0c6046;
  border-color: #168461;
  color: #fff;
}

.today-attendance-btn.active.absent {
  background: #793431;
  border-color: #a44a45;
  color: #fff;
}

.today-attendance-btn.active.na {
  background: #42535d;
  border-color: #657983;
  color: #fff;
}

.today-open-btn {
  border: 1px solid #365361;
  background: #152c38;
  color: #dae8ec;
}

.today-attention-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 5px 10px;
  border: 1px solid #173844;
  border-radius: 14px;
  background: #0a1d2a;
}

.today-attention-item {
  width: 100%;
  min-height: 54px;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid #17333f;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.today-attention-item:last-child {
  border-bottom: 0;
}

.today-attention-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.attention-summary .today-attention-icon {
  background: #54351a;
  color: #f3a33a;
}

.attention-attendance .today-attention-icon {
  background: #4b3d13;
  color: #efc248;
}

.attention-package .today-attention-icon {
  background: #502424;
  color: #f47d70;
}

.today-attention-item strong,
.today-attention-item small {
  display: block;
}

.today-attention-item strong {
  color: #dce9ed;
  font-size: 9px;
}

.today-attention-item small {
  margin-top: 2px;
  color: #6e8795;
  font-size: 7px;
}

.today-attention-item > b {
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #193846;
  color: #c1d8df;
  font-size: 8px;
}

.attention-summary > b {
  background: #b66421;
  color: #fff;
}

.attention-attendance > b {
  background: #a97a13;
  color: #fff;
}

.attention-package > b {
  background: #a63e37;
  color: #fff;
}

.today-attention-item > svg {
  color: #527180;
}

/* Student directory */
.directory-page {
  width: min(100%, 900px);
}

.directory-page .head-row {
  margin-bottom: 14px;
}

.directory-page .head-row .btn {
  flex: none;
}

.summary-upload-launcher {
  margin: 14px 0;
  padding: 13px;
  border: 1px solid #4b4425;
  border-left: 4px solid #f4b400;
  border-radius: 16px;
  background: linear-gradient(145deg, #242616, #13242b);
}

.summary-upload-launcher.has-pending {
  border-color: #6a5620;
}

.summary-upload-launcher-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.summary-upload-launcher-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f4b400;
  color: #2e2200;
}

.summary-upload-launcher-copy {
  min-width: 0;
}

.summary-upload-launcher-copy strong {
  display: block;
  color: #f5f8f9;
  font-size: 14px;
}

.summary-upload-launcher-copy p {
  margin: 3px 0 0;
  color: #9caeb4;
  font-size: 9px;
  line-height: 1.4;
}

.summary-upload-launcher-btn {
  min-height: 40px;
}

.summary-upload-ready,
.summary-upload-waiting {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(244, 180, 0, .2);
  color: #b1c1c8;
  font-size: 9px;
}

.summary-upload-ready {
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-upload-waiting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.summary-upload-waiting > span {
  margin-right: 2px;
  color: #f2cf64;
  font-weight: 800;
}

.summary-upload-waiting button {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #5a4b22;
  border-radius: 99px;
  background: #2c2d19;
  color: #ead78f;
  font-size: 8px;
}

.directory-strip {
  margin: 13px 0;
  padding: 13px 14px;
  border: 1px solid #244958;
  border-left: 4px solid #0ca4b5;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0c2634;
}

.directory-strip strong {
  color: #f0f7f9;
  font-size: 13px;
}

.directory-strip p {
  margin: 3px 0 0;
  color: #718c9a;
  font-size: 9px;
}

.directory-strip > svg {
  color: #25bcc9;
}

.directory-tabs {
  max-width: 390px;
}

.student-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.student-row {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #1b3d4c;
  border-radius: 16px;
  background: linear-gradient(145deg, #0b2230, #0a1d2a);
  box-shadow: var(--shadow-soft);
}

.student-row-main {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.student-row-info {
  min-width: 0;
}

.name-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.student-name {
  min-width: 0;
  overflow: hidden;
  color: #f3f8fa;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-meta-line {
  min-width: 0;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-focus {
  color: #6f8998;
}

.row-status {
  max-width: 124px;
  padding: 5px 7px;
  border-radius: 99px;
  overflow: hidden;
  background: #132f3d;
  color: #9bc6d0;
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pending,
.status-notes {
  background: #493a13;
  color: #f3c54b;
}

.status-done {
  background: #0f402f;
  color: #67dcae;
}

.status-absent {
  background: #4c2223;
  color: #ff9188;
}

.status-na {
  background: #2b3a43;
  color: #b1c0c7;
}

.row-actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  gap: 7px;
}

.row-actions .btn {
  min-width: 0;
  min-height: 38px;
  padding: 7px 8px;
  font-size: 10px;
}

.archived-row {
  opacity: .72;
}

/* Student profile */
.student-detail-page {
  width: min(100%, 920px);
}

.profile-head {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-detail-page .profile-head strong {
  color: #f2f8fa !important;
}

.student-detail-grid,
.student-detail-summary,
.student-detail-timeline {
  min-width: 0;
}

.student-detail-grid {
  display: grid;
  gap: 14px;
}

.student-detail-summary {
  display: grid;
  gap: 12px;
  align-content: start;
}

.profile-card,
.coach-brief,
.student-management-card,
.timeline-card {
  border: 1px solid #1c3e4d;
  background: linear-gradient(145deg, #0c2330, #0a1d2a);
  box-shadow: var(--shadow-soft);
}

.profile-card {
  padding: 15px;
  border-radius: 18px;
}

.profile-top {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-title {
  margin: 0;
  color: #f3f8fa;
  font-size: 21px;
  line-height: 1.2;
}

.focus-box {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid #514922;
  border-radius: 14px;
  background: linear-gradient(145deg, #252617, #102630);
}

.focus-box strong {
  display: block;
  margin-top: 4px;
  color: #f2d36c;
  font-size: 13px;
}

.focus-box p {
  margin: 4px 0 0;
  color: #a8aa8a;
  font-size: 10px;
  line-height: 1.5;
}

.progress-card {
  padding: 15px;
  border: 1px solid #195366;
  border-radius: 18px;
  background: linear-gradient(145deg, #0a6174, #09384a);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.progress-number {
  font-size: 23px;
  font-weight: 800;
}

.progress-label {
  color: #b8d5dd;
  font-size: 10px;
}

.progress-bar {
  height: 8px;
  margin: 11px 0;
  background: rgba(255, 255, 255, .17);
}

.progress-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #f4b400;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.stat-mini {
  min-width: 0;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .09);
  text-align: center;
}

.stat-mini strong,
.stat-mini span {
  display: block;
}

.stat-mini strong {
  font-size: 14px;
}

.stat-mini span {
  margin-top: 2px;
  color: #c3d7de;
  font-size: 8px;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-grid .btn {
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
}

.coach-brief {
  padding: 14px;
  border-radius: 17px;
}

.coach-brief h3 {
  margin: 4px 0 9px;
  color: #f2f8fa;
  font-size: 14px;
}

.brief-list {
  display: grid;
  gap: 0;
}

.brief-item {
  padding: 8px 0;
  border-bottom: 1px solid #173542;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 9px;
  font-size: 10px;
  line-height: 1.5;
}

.brief-item:last-child {
  border-bottom: 0;
}

.brief-item span:first-child {
  color: #7793a1;
  font-weight: 800;
}

.brief-item strong {
  color: #cfdee4;
  font-weight: 700;
}

.student-management-card {
  padding: 13px;
  border-radius: 16px;
}

.student-management-card p {
  margin: 4px 0 10px;
  color: #758e9b;
  font-size: 10px;
  line-height: 1.5;
}

.student-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.student-detail-timeline {
  padding: 0;
}

.student-detail-timeline .section-head {
  margin-top: 0;
}

.timeline {
  display: grid;
  gap: 9px;
}

.timeline-card {
  padding: 12px;
  border-left: 4px solid #10a9b9;
  border-radius: 14px;
}

.timeline-card.planned {
  border-left-color: #f4b400;
}

.timeline-card.absent {
  border-left-color: #d05249;
}

.timeline-card.na {
  border-left-color: #84909c;
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-chip {
  padding: 4px 7px;
  border-radius: 99px;
  background: #103d4b;
  color: #62d2de;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.timeline-card.planned .status-chip {
  background: #493b14;
  color: #f1c64d;
}

.timeline-card.absent .status-chip {
  background: #4c2223;
  color: #ff9188;
}

.timeline-card.na .status-chip {
  background: #2d3a43;
  color: #b1bec5;
}

.timeline-date {
  color: #7f98a6;
  font-size: 9px;
  font-weight: 700;
}

.timeline-card h3 {
  margin: 8px 0 5px;
  color: #eef7fa;
  font-size: 13px;
}

.timeline-card p {
  margin: 4px 0;
  color: #a6bbc4;
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.timeline-next {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 9px;
  background: #102f3d;
  color: #93cbd2;
  font-size: 10px;
}

.timeline-actions {
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px solid #173541;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Follow-ups */
.followups-page {
  width: min(100%, 900px);
}

.followups-hero {
  margin-bottom: 18px;
}

.followups-layout {
  display: grid;
  gap: 12px;
}

.followup-list {
  display: grid;
  gap: 9px;
}

.followup-row {
  width: 100%;
  min-height: 66px;
  padding: 12px;
  border: 1px solid #1e4050;
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: linear-gradient(145deg, #0c2330, #0a1d2a);
  color: inherit;
}

.followup-row strong {
  color: #edf6f8;
  font-size: 13px;
}

.followup-row p {
  margin: 3px 0 0;
  color: #8198a5;
  font-size: 10px;
  line-height: 1.4;
}

.followup-kind {
  padding: 5px 8px;
  border-radius: 99px;
  background: #463814;
  color: #f1c451;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.kind-attendance,
.kind-overdue {
  background: #4d2423;
  color: #ff948b;
}

.kind-focus,
.kind-baseline {
  background: #173b49;
  color: #6ad3dc;
}

.kind-inactive {
  background: #2e3541;
  color: #b4bec8;
}

.backup-card {
  padding: 14px;
  border: 1px solid #1e4050;
  border-radius: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  background: #0c2330;
}

.backup-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #153746;
  color: #42c6d1;
}

.backup-card h3 {
  margin: 0 0 4px;
  color: #f0f7f9;
  font-size: 14px;
}

.backup-card p {
  margin: 0 0 10px;
  color: #8198a5;
  font-size: 10px;
  line-height: 1.5;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Schedule */
.schedule-page {
  width: min(100%, 1240px);
}

.schedule-head-row {
  margin-bottom: 15px;
}

.schedule-overview {
  margin-bottom: 8px;
  padding: 12px 13px;
  border: 1px solid #1f4251;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0c2431;
}

.schedule-overview strong,
.schedule-overview span {
  display: block;
}

.schedule-overview strong {
  color: #edf7f9;
  font-size: 13px;
}

.schedule-overview span {
  margin-top: 3px;
  color: #7893a0;
  font-size: 9px;
}

.schedule-week-controls {
  display: flex;
  gap: 7px;
}

.schedule-scroll-hint {
  margin: 8px 1px;
  color: #718b98;
  font-size: 9px;
}

.schedule-scroll {
  width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #234756;
  border-radius: 15px;
  background: #0b1e2a;
  box-shadow: var(--shadow-soft);
  scrollbar-color: #2b596a #0a1b27;
}

.schedule-matrix {
  min-width: 1110px;
  display: grid;
  grid-template-columns: 88px repeat(7, minmax(145px, 1fr));
}

.schedule-matrix-corner,
.schedule-matrix-day,
.schedule-matrix-time,
.schedule-matrix-cell {
  border-right: 1px solid #183745;
  border-bottom: 1px solid #183745;
}

.schedule-matrix-corner,
.schedule-matrix-day {
  min-height: 62px;
  position: sticky;
  top: 0;
  z-index: 4;
  background: #071727;
}

.schedule-matrix-corner {
  left: 0;
  z-index: 6;
  display: grid;
  place-items: center;
}

.schedule-matrix-corner span {
  color: #7f9ba8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.schedule-matrix-day {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.schedule-matrix-day.today {
  background: linear-gradient(145deg, #0a6175, #0b4053);
}

.schedule-matrix-day strong,
.schedule-matrix-day span {
  display: block;
}

.schedule-matrix-day strong {
  color: #edf7f9;
  font-size: 11px;
}

.schedule-matrix-day span {
  margin-top: 2px;
  color: #7894a2;
  font-size: 8px;
}

.schedule-matrix-day.today span {
  color: #b8e5e8;
}

.schedule-matrix-day b {
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #1b3441;
  color: #c7d8de;
  font-size: 8px;
}

.schedule-matrix-time {
  min-height: 75px;
  position: sticky;
  left: 0;
  z-index: 3;
  padding: 10px 7px;
  background: #091b27;
  color: #8099a6;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
}

.schedule-matrix-time.stripe,
.schedule-matrix-cell.stripe {
  background-color: rgba(255, 255, 255, .012);
}

.schedule-matrix-cell {
  min-width: 0;
  min-height: 75px;
  padding: 5px;
  background: #0a1d29;
}

.schedule-matrix-cell.today {
  background: #0b2633;
}

.schedule-free {
  width: 100%;
  min-height: 64px;
  padding: 7px;
  border: 1px dashed transparent;
  border-radius: 9px;
  background: transparent;
  color: #496473;
  font-size: 8px;
  text-align: left;
}

button.schedule-free:hover {
  border-color: #295363;
  color: #7cbac4;
}

.schedule-entry {
  width: 100%;
  min-width: 0;
  min-height: 63px;
  padding: 7px;
  border: 1px solid #245262;
  border-left: 3px solid #16b5c4;
  border-radius: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  background: #102c39;
  color: inherit;
  text-align: left;
}

.schedule-entry.group {
  border-left-color: #f4b400;
  background: #302a18;
}

.schedule-entry span {
  min-width: 0;
}

.schedule-entry strong,
.schedule-entry small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-entry strong {
  color: #edf7f9;
  font-size: 9px;
}

.schedule-entry small {
  margin-top: 3px;
  color: #718c99;
  font-size: 6.8px;
}

.schedule-entry em {
  padding: 3px 5px;
  border-radius: 99px;
  font-size: 6.5px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-entry em.done,
.schedule-entry em.resolved {
  background: #0f432f;
  color: #65dcae;
}

.schedule-entry em.absent,
.schedule-entry em.pending {
  background: #4b2223;
  color: #ff9288;
}

.schedule-entry em.na {
  background: #2a3942;
  color: #b0bdc4;
}

.schedule-entry em.notes,
.schedule-entry em.planned {
  background: #493a13;
  color: #f3c54c;
}

.schedule-entry em.scheduled {
  background: #123c4c;
  color: #64ccd7;
}

.unscheduled-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #1e4050;
  border-radius: 16px;
  background: #0b2230;
}

.unscheduled-list {
  display: grid;
  gap: 8px;
}

.unscheduled-student {
  width: 100%;
  padding: 9px;
  border: 1px solid #234654;
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: #102a37;
  color: inherit;
  text-align: left;
}

.unscheduled-student strong,
.unscheduled-student small {
  display: block;
}

.unscheduled-student strong {
  color: #eef7f9;
  font-size: 11px;
}

.unscheduled-student small {
  margin-top: 2px;
  color: #748e9b;
  font-size: 8px;
}

/* Modal sheets */
.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(1, 8, 15, .72);
  backdrop-filter: blur(3px);
}

.sheet {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 0;
  width: min(100%, 720px);
  max-height: 94vh;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid #294b59;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  background: #081c28;
  color: var(--text);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, .42);
}

.sheet-head {
  padding: 14px 15px 12px;
  border-bottom: 1px solid #1d3b49;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0b2230;
}

.sheet-title {
  margin-top: 2px;
  color: #f3f8fa;
  font-size: 17px;
  font-weight: 800;
}

.sheet-body {
  min-height: 0;
  padding: 15px 15px 22px;
  overflow: auto;
  overscroll-behavior: contain;
}

.sheet-foot {
  padding: 10px 15px calc(10px + var(--safe-bottom));
  border-top: 1px solid #1d3b49;
  display: flex;
  gap: 8px;
  background: #0b2230;
}

.student-strip,
.choice,
.review-card,
.delete-choice,
.advanced-panel {
  border: 1px solid #294a59;
  background: #0d2634;
}

.student-strip {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice {
  width: 100%;
  min-height: 62px;
  padding: 11px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e5f0f3;
  text-align: left;
}

.choice:hover {
  background: #133342;
  border-color: #376171;
}

.choice-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #143846;
  color: #4bc7d2;
}

.choice strong,
.choice small {
  display: block;
}

.choice strong {
  font-size: 12px;
}

.choice small {
  margin-top: 3px;
  color: #78919e;
  font-size: 9px;
  line-height: 1.4;
}

.voice-hero {
  padding: 14px;
  border: 1px solid #176174;
  border-radius: 16px;
  background: linear-gradient(145deg, #0a5a6e, #0a3143);
  color: #fff;
}

.voice-hero > strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.voice-hero p {
  margin: 5px 0 10px;
  color: #bdd9df;
  font-size: 10px;
  line-height: 1.5;
}

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voice-btn,
.parse-btn {
  min-height: 41px;
  padding: 9px 11px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 800;
}

.voice-btn {
  border: 0;
  background: #f4b400;
  color: #332500;
}

.voice-btn.listening {
  background: #ffdb59;
  box-shadow: 0 0 0 5px rgba(244, 180, 0, .16);
}

.parse-btn {
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .10);
  color: #fff;
}

.voice-status {
  margin-top: 8px;
  color: #a8cbd3;
  font-size: 9px;
}

.voice-keyboard {
  min-height: 30px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #d0e8ed;
  font-size: 9px;
  font-weight: 800;
  text-decoration: underline;
}

.templates,
.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template,
.quick-chip {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #31515f;
  border-radius: 99px;
  background: #102b38;
  color: #9fc4cc;
  font-size: 9px;
}

.quick-chip.active,
.template:hover {
  border-color: #0ca2b4;
  background: #103a47;
  color: #64d2db;
}

.review-card {
  padding: 12px;
  border-radius: 15px;
}

.review-row {
  padding: 8px 0;
  border-bottom: 1px solid #1c3b48;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 9px;
  font-size: 10px;
  line-height: 1.5;
}

.review-row:last-child {
  border-bottom: 0;
}

.review-row strong {
  color: #829aa6;
}

.review-row span {
  color: #d2e0e5;
  white-space: pre-wrap;
}

.status-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.status-option {
  min-height: 62px;
  padding: 8px 5px;
  border: 1px solid #2c4b58;
  border-radius: 12px;
  background: #0e2835;
  color: #9eb0b9;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.status-option.active.present {
  border-color: #1d805e;
  background: #0d513d;
  color: #91e2bf;
}

.status-option.active.absent {
  border-color: #91433f;
  background: #642e2c;
  color: #ffb0aa;
}

.status-option.active.na {
  border-color: #657984;
  background: #384a54;
  color: #d1dce1;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.preset-card {
  min-width: 0;
  min-height: 62px;
  padding: 9px;
  border: 1px solid #2a4b59;
  border-radius: 12px;
  background: #0e2835;
  color: #d8e6ea;
  text-align: left;
}

.preset-card strong,
.preset-card span {
  display: block;
}

.preset-card strong {
  font-size: 10px;
}

.preset-card span {
  margin-top: 3px;
  color: #77919e;
  font-size: 8px;
}

.advanced-toggle {
  width: 100%;
  min-height: 40px;
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px solid #2b4b59;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #102a37;
  color: #a8c0c8;
  font-size: 10px;
  font-weight: 800;
}

.advanced-panel {
  margin-top: 10px;
  padding: 12px;
  border-radius: 13px;
}

.optional {
  color: #6f8794;
  font-weight: 600;
}

.compact-custom {
  margin-top: 8px;
}

.delete-choice {
  padding: 10px;
  border-radius: 13px;
}

.delete-choice .choice {
  border: 0;
  padding: 0;
  background: transparent;
}

/* Zoom upload */
.summary-inbox-explain,
.summary-attendance-note,
.summary-session-chip,
.summary-processing,
.summary-coach-box {
  border-radius: 13px;
}

.summary-inbox-explain {
  margin-bottom: 13px;
  padding: 11px;
  border: 1px solid #1b6070;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #0b3948;
  color: #d5edf0;
}

.summary-inbox-explain strong {
  font-size: 11px;
}

.summary-inbox-explain p {
  margin: 3px 0 0;
  color: #8db6bf;
  font-size: 8.5px;
  line-height: 1.45;
}

.summary-list-heading {
  margin: 13px 1px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-list-heading strong {
  color: #dce9ed;
  font-size: 10px;
}

.summary-list-heading span {
  color: #718b98;
  font-size: 8px;
}

.summary-pending-list {
  display: grid;
  gap: 7px;
}

.summary-pending-item {
  width: 100%;
  min-height: 62px;
  padding: 9px;
  border: 1px solid #294b59;
  border-left: 4px solid #11a8b9;
  border-radius: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  background: #0d2634;
  color: inherit;
  text-align: left;
}

.summary-pending-item.ready {
  border-left-color: #0a8b62;
}

.summary-pending-item strong,
.summary-pending-item small {
  display: block;
}

.summary-pending-item strong {
  color: #eef7f9;
  font-size: 11px;
}

.summary-pending-item small {
  margin-top: 3px;
  color: #76909c;
  font-size: 8px;
}

.summary-pending-item em {
  padding: 4px 7px;
  border-radius: 99px;
  background: #123d4b;
  color: #62ccd6;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.summary-pending-item.ready em {
  background: #0e4330;
  color: #68dcae;
}

.summary-session-chip {
  margin: 9px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.summary-session-chip span {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #2b4c5a;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #102a37;
  color: #9cb4bf;
  font-size: 8px;
  font-weight: 800;
}

.summary-dropzone {
  min-height: 190px;
  padding: 20px 15px;
  border: 1px dashed #4d7887;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #0b2532;
  color: #dfecef;
  text-align: center;
}

.summary-dropzone.dragging {
  border-color: #1ac1cf;
  background: #0c3441;
}

.summary-dropzone input,
.summary-add-more input {
  display: none;
}

.summary-drop-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 3px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #0e1626;
  color: #d9e9ee;
}

.summary-dropzone strong {
  font-size: 12px;
}

.summary-dropzone small,
.summary-dropzone em {
  color: #7e98a5;
  font-size: 8.5px;
  font-style: normal;
}

.summary-dropzone em {
  color: #4dbeca;
  font-size: 8px;
  font-weight: 700;
}

.summary-or {
  position: relative;
  margin: 13px 0;
  text-align: center;
}

.summary-or::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #1e3d49;
}

.summary-or span {
  position: relative;
  padding: 0 8px;
  background: #081c28;
  color: #6f8895;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.summary-paste {
  min-height: 124px;
}

.summary-file-basket {
  padding: 12px;
  border: 1px solid #285160;
  border-radius: 15px;
  background: #0b2532;
}

.summary-file-basket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-file-basket-head strong,
.summary-file-basket-head span {
  display: block;
}

.summary-file-basket-head strong {
  color: #edf7f9;
  font-size: 11px;
}

.summary-file-basket-head span {
  margin-top: 2px;
  color: #758e9b;
  font-size: 8px;
}

.summary-file-count {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  display: grid !important;
  place-items: center;
  background: #123f4d;
  color: #5cd0da !important;
  font-size: 9px !important;
  font-weight: 800;
}

.summary-file-list {
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.summary-file-list li {
  min-width: 0;
  padding: 8px;
  border: 1px solid #244653;
  border-radius: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: #102b38;
}

.summary-file-index {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #164253;
  color: #61d1dc;
  font-size: 8px;
  font-weight: 800;
}

.summary-file-info {
  min-width: 0;
}

.summary-file-info strong,
.summary-file-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-file-info strong {
  color: #dce9ed;
  font-size: 9px;
}

.summary-file-info small {
  margin-top: 2px;
  color: #718a97;
  font-size: 7px;
}

.summary-file-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #54363a;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #321f22;
  color: #ff9e98;
}

.summary-basket-drop-hint {
  padding: 9px;
  border: 1px dashed #315965;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #68cad3;
}

.summary-basket-drop-hint strong,
.summary-basket-drop-hint small {
  display: block;
}

.summary-basket-drop-hint strong {
  font-size: 9px;
}

.summary-basket-drop-hint small,
.summary-file-order {
  color: #718a97;
  font-size: 7.5px;
}

.summary-file-order {
  margin: 7px 0;
}

.summary-file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.summary-add-more {
  cursor: pointer;
}

.summary-processing {
  padding: 20px;
  border: 1px solid #225263;
  background: #0b2d3a;
  text-align: center;
}

.summary-processing strong,
.summary-processing small {
  display: block;
}

.summary-processing strong {
  color: #dcecef;
  font-size: 11px;
}

.summary-processing small {
  margin-top: 6px;
  color: #7f99a6;
  font-size: 8px;
}

.summary-progress {
  height: 6px;
  margin-top: 11px;
  background: #173746;
}

.summary-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #0da6b7, #22cad4);
}

.summary-source-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-source-badge {
  padding: 5px 7px;
  border-radius: 99px;
  background: #173846;
  color: #9bc8d0;
  font-size: 8px;
}

.summary-coach-box {
  padding: 11px;
  border: 1px solid #244d5b;
  background: #0d2936;
}

/* Voice dock and guide */
.voice-dock {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(var(--bottomnav-h) + 10px + var(--safe-bottom));
  width: min(680px, calc(100vw - 24px));
  min-height: 62px;
  padding: 8px;
  transform: translateX(-50%);
  border: 1px solid #2b4e5d;
  border-radius: 17px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: rgba(13, 39, 53, .97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.voice-dock.voice-paused {
  display: none;
}

.voice-dock.voice-listening {
  border-color: #1e8b67;
  background: rgba(12, 78, 57, .97);
}

.voice-dock.voice-processing {
  border-color: #176881;
}

.voice-dock.voice-confirm {
  border-color: #8d6d1d;
}

.voice-dock.voice-blocked,
.voice-dock.voice-error {
  border-color: #823b3b;
}

.voice-dock-main,
.voice-dock-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.voice-state-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #193947;
  color: #d9e9ed;
}

.voice-dock-copy {
  min-width: 0;
}

.voice-dock-copy strong,
.voice-dock-copy > span,
.voice-dock-transcript {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-dock-copy strong {
  color: #f0f7f9;
  font-size: 10px;
}

.voice-dock-copy > span,
.voice-dock-transcript {
  margin-top: 2px;
  color: #8ba5b2;
  font-size: 8px;
}

.voice-dock-help,
.voice-dock-toggle {
  min-height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.voice-dock-help {
  width: 40px;
  padding: 0;
  border: 1px solid #315260;
  background: #102b38;
  color: #d5e6ea;
}

.voice-dock-toggle {
  padding: 8px 11px;
  border: 0;
  gap: 6px;
  background: #0799ad;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.voice-help-intro,
.voice-confirm-command {
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid #28505e;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0d2936;
}

.voice-help-mic,
.voice-confirm-command > span,
.voice-option-number {
  display: grid;
  place-items: center;
  background: #154151;
  color: #54cad5;
}

.voice-help-mic,
.voice-confirm-command > span {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.voice-help-intro p,
.voice-confirm-command p {
  margin: 3px 0 0;
  color: #8299a5;
  font-size: 9px;
}

.voice-command-list {
  display: grid;
  gap: 7px;
}

.voice-command-list > div {
  padding: 9px;
  border: 1px solid #244553;
  border-radius: 10px;
  background: #102a37;
}

.voice-command-list b,
.voice-command-list span {
  display: block;
}

.voice-command-list b {
  color: #dce9ed;
  font-size: 9px;
}

.voice-command-list span {
  margin-top: 3px;
  color: #7e96a2;
  font-size: 8px;
}

.voice-colour-legend {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.voice-colour-legend > div {
  padding: 8px;
  border: 1px solid #244552;
  border-radius: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 7px;
  background: #102a37;
}

.voice-colour-legend > div > span {
  grid-row: 1 / 3;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-listening > span { background: #22b27e; }
.legend-processing > span { background: #1d91c4; }
.legend-confirm > span { background: #d8a621; }
.legend-paused > span { background: #82909a; }
.legend-blocked > span { background: #d05249; }

.voice-colour-legend b {
  color: #d6e5e9;
  font-size: 8px;
}

.voice-colour-legend small {
  color: #738c98;
  font-size: 7px;
}

.voice-option-number {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 800;
}

/* Login and toast */
.login {
  min-height: 100vh;
  padding: 24px 16px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(7, 153, 173, .32), transparent 36%),
    linear-gradient(160deg, #0a2637, #05111d 62%, #020811);
}

.login-wrap {
  width: min(410px, 100%);
}

.login-brand {
  margin-bottom: 18px;
  color: #fff;
  text-align: center;
}

.login-brand img {
  width: 68px;
  height: 68px;
  border: 2px solid rgba(255, 255, 255, .78);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.login-brand h1 {
  margin: 9px 0 0;
  font-size: 28px;
}

.login-brand p {
  margin: 3px 0 0;
  color: #adc3cd;
  font-size: 11px;
}

.login-card {
  padding: 20px;
  border: 1px solid #284a59;
  border-radius: 21px;
  background: #0b2230;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .36);
}

.login-card h2 {
  margin: 0;
  color: #f3f8fa;
}

.login-card > p {
  color: #839ca8;
  font-size: 11px;
  line-height: 1.5;
}

.login-remember {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  color: #cad9df;
}

.login-remember input {
  margin-top: 3px;
}

.login-remember strong,
.login-remember small {
  display: block;
}

.login-remember strong {
  font-size: 10px;
}

.login-remember small {
  margin-top: 3px;
  color: #718b98;
  font-size: 8px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: calc(var(--bottomnav-h) + 16px + var(--safe-bottom));
  max-width: calc(100vw - 28px);
  padding: 11px 15px;
  transform: translateX(-50%);
  border: 1px solid #2b5361;
  border-radius: 12px;
  background: #0c2634;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 11px;
  text-align: center;
}

/* Tablet */
@media (min-width: 761px) and (max-width: 1120px) {
  .page,
  .topbar-inner,
  .bottomnav-inner {
    width: min(100%, 960px);
  }

  .page {
    padding: 26px 24px 44px;
  }

  .today-page {
    width: min(100%, 900px);
  }

  .today-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, .9fr);
    align-items: center;
    gap: 26px;
  }

  .today-quick-grid {
    margin-top: 0;
  }

  .today-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr);
    align-items: start;
    gap: 16px;
  }

  .today-attention {
    position: sticky;
    top: calc(var(--topbar-h) + 18px);
  }

  .today-student-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-attendance-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-attention-list {
    padding: 6px 10px;
  }

  .student-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-page {
    width: min(100%, 960px);
  }

  .student-detail-page {
    width: min(100%, 960px);
  }

  .student-detail-grid {
    grid-template-columns: minmax(310px, .8fr) minmax(0, 1.2fr);
    gap: 18px;
  }

  .student-detail-summary {
    position: sticky;
    top: calc(var(--topbar-h) + 18px);
  }

  .followups-page {
    width: min(100%, 920px);
  }

  .followups-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    align-items: start;
  }

  .backup-card {
    position: sticky;
    top: calc(var(--topbar-h) + 18px);
  }

  .sheet {
    top: 50%;
    bottom: auto;
    max-height: 90vh;
    transform: translate(-50%, -50%);
    border-bottom: 1px solid #294b59;
    border-radius: 22px;
  }
}

/* Desktop */
@media (min-width: 1121px) {
  :root {
    --topbar-h: 76px;
  }

  .app {
    padding: 0 0 36px var(--desktop-rail);
  }

  .topbar {
    margin-left: calc(-1 * var(--desktop-rail));
  }

  .topbar-inner {
    width: 100%;
    max-width: none;
    padding: 12px 28px 12px 24px;
  }

  .topbar-brand img {
    width: 42px;
    height: 42px;
  }

  .topbar-brand strong {
    font-size: 14px;
  }

  .topbar-brand small {
    font-size: 10px;
  }

  .account-menu {
    top: 68px;
    right: 26px;
  }

  .bottomnav {
    top: var(--topbar-h);
    right: auto;
    width: var(--desktop-rail);
    padding: 12px 8px;
    border-top: 0;
    border-right: 1px solid #193847;
    background: #071823;
  }

  .bottomnav-inner {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .navitem {
    width: 100%;
    min-height: 68px;
    border-radius: 14px;
    gap: 6px;
  }

  .navitem:hover {
    background: #0d2936;
    color: #bdd2d9;
  }

  .navitem.active {
    background: rgba(7, 153, 173, .13);
    color: #26c3d0;
  }

  .navitem span {
    font-size: 9px;
  }

  .page {
    width: min(100%, 1260px);
    padding: 34px 34px 52px;
  }

  .title {
    font-size: 40px;
  }

  .today-page {
    width: min(100%, 1260px);
  }

  .today-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, .75fr);
    align-items: center;
    gap: 42px;
    padding: 7px 0 4px;
  }

  .today-greeting h1 {
    font-size: 38px;
  }

  .today-kicker,
  .today-greeting p {
    font-size: 11px;
  }

  .today-quick-grid {
    margin-top: 0;
    gap: 12px;
  }

  .today-quick-card {
    min-height: 104px;
    padding: 15px;
  }

  .today-quick-card > span {
    width: 46px;
    height: 46px;
  }

  .today-quick-card strong {
    font-size: 12px;
  }

  .today-quick-card small {
    font-size: 9px;
  }

  .today-dashboard-grid {
    margin-top: 5px;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, .72fr);
    align-items: start;
    gap: 22px;
  }

  .today-attention {
    position: sticky;
    top: calc(var(--topbar-h) + 22px);
  }

  .today-student-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .today-student-card {
    padding: 13px;
  }

  .today-attention-list {
    padding: 6px 11px;
  }

  .today-attention-item {
    min-height: 62px;
  }

  .directory-page {
    width: min(100%, 1180px);
  }

  .directory-page .head-row,
  .directory-page > .summary-upload-launcher,
  .directory-page > .directory-strip,
  .directory-page > .search-wrap,
  .directory-page > .tabs {
    max-width: 1180px;
  }

  .student-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .student-row {
    padding: 14px;
  }

  .student-detail-page {
    width: min(100%, 1180px);
  }

  .student-detail-grid {
    grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr);
    gap: 22px;
  }

  .student-detail-summary {
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
  }

  .student-detail-timeline .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .followups-page {
    width: min(100%, 1040px);
  }

  .followups-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .55fr);
    align-items: start;
    gap: 18px;
  }

  .backup-card {
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
  }

  .schedule-page {
    width: min(100%, 1420px);
  }

  .schedule-matrix {
    min-width: 1220px;
    grid-template-columns: 94px repeat(7, minmax(155px, 1fr));
  }

  .schedule-scroll-hint {
    display: none;
  }

  .sheet {
    top: 50%;
    bottom: auto;
    width: min(760px, calc(100vw - 160px));
    max-height: 90vh;
    transform: translate(-50%, -50%);
    border-bottom: 1px solid #294b59;
    border-radius: 22px;
  }

  .voice-dock {
    left: calc(50% + var(--desktop-rail) / 2);
    bottom: 22px;
  }

  .toast {
    left: calc(50% + var(--desktop-rail) / 2);
    bottom: 24px;
  }
}

/* Small mobile safeguards */
@media (max-width: 520px) {
  .page {
    padding-left: 11px;
    padding-right: 11px;
  }

  .head-row {
    align-items: flex-start;
  }

  .head-row .title {
    font-size: 27px;
  }

  .directory-page .head-row .btn {
    min-width: 42px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .summary-upload-launcher-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .summary-upload-launcher-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .directory-strip p {
    max-width: 250px;
  }

  .student-row-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-row-main > .row-status {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }

  .row-actions {
    grid-template-columns: 1.2fr .9fr auto;
  }

  .row-actions .btn {
    font-size: 9px;
  }

  .profile-title {
    font-size: 19px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brief-item {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .student-detail-timeline .tabs .tab {
    min-width: 82px;
  }

  .schedule-head-row {
    gap: 8px;
  }

  .schedule-head-row .btn {
    padding-left: 10px;
    padding-right: 10px;
  }

  .backup-card {
    grid-template-columns: 1fr;
  }

  .backup-actions .btn {
    flex: 1;
  }

  .sheet-foot .btn {
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .voice-colour-legend {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 390px) {
  .grid2 {
    grid-template-columns: 1fr;
  }

  .today-greeting h1 {
    font-size: 22px;
  }

  .today-quick-card {
    min-height: 84px;
    padding: 10px;
    column-gap: 7px;
  }

  .today-quick-card > span {
    width: 35px;
    height: 35px;
  }

  .today-attendance-actions {
    gap: 4px;
  }

  .today-attendance-btn,
  .today-open-btn {
    min-height: 36px;
    font-size: 7.5px;
  }

  .today-attendance-btn svg {
    width: 11px;
    height: 11px;
  }

  .pill {
    display: none;
  }

  .status-options {
    gap: 5px;
  }

  .review-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
