:root {
  color-scheme: light;
  --ink: #241617;
  --muted: #6f5c5d;
  --line: #d8cdcd;
  --line-strong: #bca9a9;
  --panel: #ffffff;
  --surface: #f7f4f3;
  --surface-strong: #eee7e6;
  --nav: #0f5f64;
  --nav-dark: #12323a;
  --tab: #0f5f64;
  --tab-active: #d9a441;
  --accent: #0f766e;
  --accent-soft: #dff3ef;
  --gold: #8a5e12;
  --gold-soft: #fff1cf;
  --warning: #9b332c;
  --warning-soft: #f8dfdb;
  --shadow: 0 12px 28px rgba(86, 8, 8, 0.08);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid #aeb8c2;
  background: #eef1f4;
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 8px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 4px;
  background: linear-gradient(135deg, #12323a, #0f766e 62%, #d9a441);
  color: #ffffff;
  font-weight: 800;
}

.brand h1,
.brand p,
.sidebar-footer p {
  margin: 0;
}

.brand h1 {
  font-size: 1rem;
  line-height: 1.1;
}

.brand p,
.sidebar-footer {
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-tabs {
  display: grid;
  gap: 1px;
  padding: 0 8px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 31px;
  border: 1px solid #c9d0d8;
  border-radius: 2px;
  background: linear-gradient(#ffffff, #e8edf2);
  color: var(--ink);
  padding: 5px 8px;
  text-align: left;
  font-size: 0.78rem;
}

.nav-tab span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #946500;
  font-size: 0.7rem;
  font-weight: 800;
}

.nav-tab.active,
.nav-tab:hover {
  border-color: #d6b5b9;
  background: linear-gradient(#fff5f6, #f1dadd);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 7px;
  border-top: 1px solid #c7d0d8;
  padding: 10px;
  line-height: 1.35;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px 16px 24px;
}

.topbar,
.controls-band,
.table-header,
.student-page-toolbar,
.modal-heading,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar {
  min-height: 32px;
  border-radius: 3px;
  background: linear-gradient(#0f766e, var(--nav-dark));
  color: #ffffff;
  padding: 5px 8px;
}

.topbar h2,
.topbar p,
.modal-heading h3,
.modal-heading p {
  margin: 0;
}

.topbar h2 {
  font-size: 0.92rem;
  line-height: 1.1;
}

.eyebrow {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-actions,
.student-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.primary-button,
.secondary-button,
.ghost-button,
.warning-button,
.icon-button,
.small-button {
  min-height: 28px;
  border-radius: 4px;
  padding: 0 9px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.primary-button {
  border-color: #12323a;
  background: linear-gradient(#10847b, #0f5f64);
  color: #ffffff;
}

.secondary-button,
.ghost-button,
.small-button {
  border-color: #b8c2cc;
  background: linear-gradient(#ffffff, #e7ebef);
  color: var(--ink);
}

.warning-button {
  border-color: #ceada8;
  background: var(--warning-soft);
  color: var(--warning);
}

.icon-button {
  width: 30px;
  padding: 0;
  border-color: #b8c2cc;
  background: #ffffff;
  color: var(--muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 8px;
}

.chart-card {
  display: grid;
  gap: 10px;
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  padding: 10px;
  box-shadow: var(--shadow);
}

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chart-heading h3,
.chart-heading span {
  margin: 0;
}

.chart-heading h3 {
  font-size: 0.86rem;
}

.chart-heading span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.bar-chart {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.85fr) minmax(78px, 1fr) 24px;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
}

.bar-row span {
  color: var(--muted);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row strong {
  text-align: right;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e9eb;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #d9a441);
}

.chart-track .bar-fill,
.chart-year .bar-fill {
  background: linear-gradient(90deg, #8A192B, #d9a441);
}

.donut-layout {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.donut {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
}

.donut::after {
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background: var(--panel);
  content: "";
}

.donut span {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 800;
}

.donut-legend {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.donut-legend div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
}

.donut-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.donut-legend span {
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend strong {
  text-align: right;
}

.metric {
  display: grid;
  gap: 2px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  padding: 8px 10px;
}

.metric-label,
.metric span:last-child {
  color: var(--muted);
  font-size: 0.72rem;
}

.metric strong {
  font-size: 1.35rem;
  line-height: 1;
}

.controls-band {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(230px, 0.9fr) minmax(260px, 0.85fr) minmax(280px, 1.05fr) minmax(150px, 0.65fr) minmax(150px, 0.65fr);
  align-items: end;
  justify-content: stretch;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  padding: 10px;
  gap: 10px;
}

label {
  display: grid;
  gap: 3px;
  min-width: 130px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.filter-group {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  border: 1px solid #e3d1d1;
  border-radius: 4px;
  background: #fffafa;
  padding: 7px 8px 8px;
}

.filter-group legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.filter-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
}

#planFilter {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

#branchFilter {
  grid-template-columns: repeat(3, minmax(70px, 1fr));
}

#yearFilter {
  grid-template-columns: repeat(2, minmax(112px, 1fr));
}

.check-option {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 1px solid #decaca;
  border-radius: 999px;
  background: #ffffff;
  padding: 5px 8px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.check-option input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.search-box {
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bcc6cf;
  border-radius: 2px;
  background: #ffffff;
  color: var(--ink);
  padding: 5px 6px;
  outline: none;
  font-size: 0.78rem;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.roster-panel,
.student-page,
.schedule-board,
.schedule-panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.roster-panel {
  overflow: hidden;
}

.table-header {
  min-height: 40px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
}

.table-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.student-table {
  overflow-x: auto;
}

.student-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) 74px 112px 86px 92px 112px minmax(210px, 1.25fr) 82px;
  min-width: 1060px;
  border-bottom: 1px solid #d8dee5;
}

.student-row.header {
  background: linear-gradient(#f7f8f9, #dbe1e7);
  color: #384653;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-row button {
  display: contents;
}

.student-row:not(.header):hover,
.student-row.selected {
  background: #fff3f4;
}

.student-cell {
  display: grid;
  align-content: center;
  min-height: 38px;
  padding: 4px 8px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.student-row.header span {
  padding: 7px 8px;
}

.student-name {
  color: var(--ink);
  font-weight: 800;
}

.student-subtext,
.next-step,
.status-copy {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.plan-pill,
.status-pill,
.deliverable-status {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.plan-pill {
  background: var(--gold-soft);
  color: var(--gold);
}

.plan-pill.standard {
  background: var(--surface-strong);
  color: #33495d;
}

.status-pill.active,
.deliverable-status.complete {
  background: var(--accent-soft);
  color: #155645;
}

.status-pill.past {
  background: #eef0f4;
  color: #596174;
}

.deliverable-status.blocked {
  background: var(--warning-soft);
  color: var(--warning);
}

.deliverable-status.in-progress {
  background: #e5eefb;
  color: #245b9c;
}

.deliverable-status.not-started {
  background: #eef0f4;
  color: #596174;
}

.student-page {
  overflow: hidden;
}

.student-page-toolbar {
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  background: #f8fafb;
  padding: 6px 8px;
}

.record-banner {
  display: grid;
  grid-template-columns: 126px minmax(220px, 1fr) minmax(220px, 0.7fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 10px;
}

.photo-placeholder {
  display: grid;
  min-height: 118px;
  place-items: center;
  border: 1px solid #d6dce3;
  background: #fafafa;
  color: #c1c1c1;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
}

.record-title {
  display: grid;
  align-content: center;
  gap: 4px;
}

.record-title h3,
.record-title p {
  margin: 0;
}

.record-title h3 {
  font-size: 1.35rem;
}

.record-title .eyebrow {
  color: #a0462d;
}

.record-quick {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  margin: 0;
  border: 1px solid var(--line);
}

.record-quick div,
.record-table div {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.record-quick div:last-child,
.record-table div:last-child {
  border-bottom: 0;
}

dt,
dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

dt {
  background: #eeeeee;
  color: #222f3d;
  padding: 5px 7px;
  font-size: 0.7rem;
  font-weight: 800;
}

dd {
  padding: 5px 7px;
  font-size: 0.76rem;
}

dd[contenteditable="true"] {
  background: #fffdf8;
  cursor: text;
}

dd[contenteditable="true"]:focus {
  outline: 2px solid #f0ad4e;
  outline-offset: -2px;
}

.record-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  border-bottom: 3px solid #0f5f91;
  background: #8A192B;
}

.record-tab {
  min-height: 31px;
  border: 0;
  border-right: 1px solid #c88d98;
  background: linear-gradient(#9f263a, #741524);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.record-tab.active {
  background: linear-gradient(#f7c36f, #f0ad4e);
  color: #1b2630;
}

.record-body {
  padding: 10px;
}

.record-grid {
  display: grid;
  gap: 10px;
}

.record-grid.two-column {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

.record-section {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

.record-section h4 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: 6px 8px;
  color: #1b2630;
  font-size: 0.83rem;
}

.record-section h4 span {
  color: #c00000;
  font-size: 0.9rem;
}

.record-table {
  margin: 0;
}

.record-notes {
  width: 100%;
  min-height: 110px;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 0;
  background: #ffffff;
  padding: 9px;
  color: #111111;
  font: 0.78rem/1.45 Arial, Helvetica, sans-serif;
}

.document-list,
.record-list-table {
  display: grid;
  overflow-x: auto;
}

.document-row,
.record-list-header,
.record-list-row {
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.document-row {
  grid-template-columns: 170px minmax(180px, 1fr) 64px;
}

.document-row:last-child,
.record-list-row:last-child {
  border-bottom: 0;
}

.document-row > span,
.document-row input,
.show-toggle {
  min-height: 30px;
}

.document-row > span {
  display: grid;
  align-content: center;
  background: #eeeeee;
  padding: 5px 8px;
  font-size: 0.75rem;
}

.document-row input {
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.show-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  color: var(--ink);
  font-size: 0.7rem;
}

.show-toggle input {
  width: auto;
}

.record-list-header,
.record-list-row {
  grid-template-columns: minmax(210px, 1.6fr) 100px 100px 76px 142px;
  min-width: 720px;
}

.meeting-log-table .record-list-header,
.meeting-log-table .record-list-row {
  grid-template-columns: minmax(210px, 1.5fr) 92px 112px 82px 72px;
}

.record-list-header {
  background: #dce2e8;
  color: #2f3a45;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.record-list-header span,
.record-list-row > span {
  padding: 6px 8px;
}

.record-list-row {
  font-size: 0.76rem;
}

.record-list-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.record-row-actions {
  display: flex;
  gap: 5px;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 36px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(23, 32, 42, 0.24);
}

.modal::backdrop {
  background: rgba(23, 32, 42, 0.46);
}

.modal form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.modal-actions {
  justify-content: flex-end;
}

.schedule-view {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.schedule-overview {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 10px;
}

.schedule-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.schedule-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-panel-heading h3,
.schedule-panel-heading p {
  margin: 0;
}

.calendar-connect-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.calendar-events {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow: auto;
}

.calendar-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdfd;
  padding: 7px;
}

.calendar-event div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-event strong,
.calendar-event span,
.calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event span,
.calendar-event small {
  color: var(--muted);
  font-size: 0.72rem;
}

.meeting-tracker-panel {
  overflow: hidden;
}

.meeting-tracker-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.meeting-tracker-stat {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffdfd;
  padding: 8px;
}

.meeting-tracker-stat strong {
  color: var(--accent);
  font-size: 1rem;
}

.meeting-tracker-stat span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.meeting-tracker-table {
  margin-top: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.meeting-tracker-header,
.meeting-tracker-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(4, minmax(150px, 0.9fr));
  min-width: 880px;
}

.meeting-tracker-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meeting-tracker-header span,
.meeting-tracker-row > div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
}

.meeting-tracker-header span:last-child,
.meeting-tracker-row > div:last-child {
  border-right: 0;
}

.meeting-tracker-client {
  display: grid;
  align-content: start;
  gap: 3px;
}

.meeting-tracker-client strong {
  color: var(--text);
  font-size: 0.78rem;
}

.meeting-tracker-client span {
  color: var(--muted);
  font-size: 0.7rem;
}

.milestone-cell {
  display: grid;
  gap: 7px;
  align-content: start;
  background: #fff8f8;
}

.milestone-cell.complete {
  background: #f3fbf6;
}

.milestone-cell.not-tracked {
  background: #f8f9fa;
}

.milestone-cell.recurring {
  border-left: 3px solid #1a73e8;
}

.milestone-cell strong,
.milestone-cell span {
  display: block;
}

.milestone-cell strong {
  color: var(--text);
  font-size: 0.72rem;
}

.milestone-cell span {
  color: var(--muted);
  font-size: 0.68rem;
}

.milestone-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.milestone-step {
  min-width: 30px;
  min-height: 24px;
  border: 1px solid #e0b4b8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 7px;
  font-size: 0.66rem;
  font-weight: 800;
}

.milestone-step.completed {
  border-color: #9fd3ad;
  background: #188038;
  color: #ffffff;
}

.milestone-step.scheduled {
  border-color: #9ec5ff;
  background: #1a73e8;
  color: #ffffff;
}

.milestone-step:disabled {
  cursor: default;
}

.schedule-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 0;
  overflow: hidden;
}

.schedule-column {
  min-height: 420px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.schedule-column:last-child {
  border-right: 0;
}

.schedule-column h3 {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 9px;
  font-size: 0.82rem;
}

.schedule-items {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.schedule-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px;
}

.schedule-card h4,
.schedule-card p {
  margin: 0;
}

.schedule-card h4 {
  line-height: 1.25;
}

.schedule-card p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.calendar-view {
  display: grid;
  grid-column: 1 / -1;
  min-height: calc(100vh - 96px);
  overflow: hidden;
  border: 1px solid #d5dbe1;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.calendar-toolbar,
.calendar-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #dfe3e7;
  padding: 9px 12px;
}

.calendar-nav-controls,
.calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calendar-nav-controls h3 {
  margin: 0 0 0 6px;
  color: #202124;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  overflow: hidden;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #ffffff;
}

.segment {
  min-height: 30px;
  border: 0;
  border-right: 1px solid #dadce0;
  background: #ffffff;
  color: #3c4043;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: #e8f0fe;
  color: #1967d2;
}

.calendar-status-row {
  justify-content: flex-start;
  min-height: 36px;
  padding-block: 6px;
}

.calendar-native-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 680px;
}

.calendar-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  border-right: 1px solid #e0e0e0;
  background: #ffffff;
  padding: 12px;
}

.mini-calendar-title,
.upcoming-panel h4,
.availability-panel h4 {
  margin: 0 0 8px;
  color: #202124;
  font-size: 0.82rem;
  font-weight: 800;
}

.mini-weekdays,
.mini-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}

.mini-weekdays span {
  color: #5f6368;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 24px;
}

.mini-day {
  width: 28px;
  height: 28px;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3c4043;
  padding: 0;
  font-size: 0.72rem;
}

.mini-day.outside {
  color: #9aa0a6;
}

.mini-day.selected-range {
  background: #e8f0fe;
}

.mini-day.today {
  background: #1a73e8;
  color: #ffffff;
  font-weight: 800;
}

.upcoming-panel {
  display: grid;
  gap: 7px;
}

.availability-panel {
  display: grid;
  gap: 8px;
  border-top: 1px solid #e6eaee;
  padding-top: 12px;
}

.availability-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: end;
}

.availability-heading h4 {
  margin-bottom: 0;
}

.availability-heading label {
  display: grid;
  gap: 3px;
}

.availability-heading label span {
  color: #5f6368;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.availability-heading select {
  min-height: 28px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #ffffff;
  color: #202124;
  padding: 0 6px;
  font-size: 0.72rem;
}

.availability-summary {
  margin: 0;
  color: #5f6368;
  font-size: 0.72rem;
  line-height: 1.35;
}

.availability-smart,
.availability-days,
.availability-day {
  display: grid;
  gap: 6px;
}

.availability-smart {
  border: 1px solid #d2e3fc;
  border-radius: 4px;
  background: #f8fbff;
  padding: 7px;
}

.availability-smart > span,
.availability-day > strong {
  color: #202124;
  font-size: 0.72rem;
  font-weight: 800;
}

.availability-option {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid #c7d9f9;
  border-left: 3px solid #188038;
  border-radius: 4px;
  background: #ffffff;
  color: #202124;
  padding: 6px 7px;
  text-align: left;
}

.availability-option.smart {
  background: #e6f4ea;
  border-color: #b7dfc0;
}

.availability-option span,
.availability-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-option span {
  font-size: 0.72rem;
  font-weight: 800;
}

.availability-option small,
.availability-day small {
  color: #5f6368;
  font-size: 0.66rem;
}

.upcoming-event {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  border-left: 3px solid #1a73e8;
  border-radius: 2px;
  background: #f8fbff;
  color: #202124;
  padding: 7px 8px;
  text-align: left;
}

.upcoming-event span,
.upcoming-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-event span {
  font-size: 0.76rem;
  font-weight: 800;
}

.upcoming-event small {
  color: #5f6368;
  font-size: 0.7rem;
}

.calendar-main-panel {
  min-width: 0;
  overflow: auto;
  background: #ffffff;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
  min-width: 900px;
}

.calendar-weekday {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid #dadce0;
  background: #ffffff;
  color: #5f6368;
  padding: 9px 8px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-month-cell {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 118px;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  background: #ffffff;
  padding: 5px;
}

.calendar-month-cell.outside {
  background: #fafafa;
}

.calendar-month-cell.today {
  background: #fbfdff;
}

.calendar-date-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3c4043;
  padding: 0;
  font-size: 0.78rem;
}

.calendar-month-cell.today .calendar-date-number {
  background: #1a73e8;
  color: #ffffff;
  font-weight: 800;
}

.month-event-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.month-event-chip,
.month-more {
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: #d2e3fc;
  color: #174ea6;
  padding: 3px 5px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 800;
}

.month-event-chip span {
  margin-right: 4px;
  color: #3c4043;
  font-weight: 700;
}

.month-more {
  background: transparent;
  color: #1a73e8;
}

.calendar-time-shell {
  min-width: 980px;
}

.calendar-time-shell.day-mode {
  min-width: 620px;
}

.calendar-time-header,
.calendar-time-body {
  display: grid;
  grid-template-columns: 64px repeat(7, minmax(128px, 1fr));
}

.calendar-time-shell.day-mode .calendar-time-header,
.calendar-time-shell.day-mode .calendar-time-body {
  grid-template-columns: 64px minmax(0, 1fr);
}

.calendar-time-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #dadce0;
  background: #ffffff;
}

.calendar-time-header button {
  display: grid;
  place-items: center;
  min-height: 64px;
  border: 0;
  border-left: 1px solid #e0e0e0;
  background: #ffffff;
  color: #3c4043;
}

.calendar-time-header button span {
  color: #5f6368;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-time-header button strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 500;
}

.calendar-time-header button.today strong {
  background: #1a73e8;
  color: #ffffff;
}

.time-rail {
  display: grid;
  grid-template-rows: repeat(15, 60px);
  border-right: 1px solid #dadce0;
  background: #ffffff;
}

.time-rail span {
  position: relative;
  top: -8px;
  padding-right: 8px;
  color: #70757a;
  text-align: right;
  font-size: 0.68rem;
}

.time-day-column {
  position: relative;
  min-height: 900px;
  border-right: 1px solid #e0e0e0;
}

.time-slot {
  height: 60px;
  border-bottom: 1px solid #eceff1;
}

.timed-event {
  position: absolute;
  left: 6px;
  right: 6px;
  display: block;
  overflow: hidden;
  border: 1px solid #0b57d0;
  border-radius: 4px;
  background: #1a73e8;
  color: #ffffff;
  padding: 6px 8px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(6, 68, 164, 0.34),
    0 1px 2px rgba(60, 64, 67, 0.3);
}

.timed-event + .timed-event {
  border-top-color: rgba(255, 255, 255, 0.86);
}

.timed-event strong,
.timed-event span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.timed-event strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.15;
}

.timed-event span {
  margin-top: 2px;
  font-size: 0.66rem;
  line-height: 1.1;
  opacity: 0.92;
}

.hidden {
  display: none !important;
}

@media (max-width: 1280px) {
  .controls-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 1120px) {
  .record-grid.two-column,
  .schedule-overview,
  .schedule-board,
  .calendar-native-layout {
    grid-template-columns: 1fr;
  }

  .calendar-side-panel {
    border-right: 0;
    border-bottom: 1px solid #e0e0e0;
  }

  .record-banner {
    grid-template-columns: 110px 1fr;
  }

  .record-quick {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .controls-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
  }

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

  .nav-tab {
    justify-content: center;
    min-height: 36px;
    text-align: center;
  }

  .nav-tab span,
  .sidebar-footer {
    display: none;
  }

  .workspace {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

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

  .record-tabs {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar-actions,
  .controls-band,
  .student-page-toolbar,
  .student-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions button,
  .student-actions button,
  .modal-actions button,
  .controls-band label,
  .controls-band .filter-group {
    width: 100%;
    max-width: none;
  }

  .controls-band {
    grid-template-columns: 1fr;
  }

  #branchFilter,
  #yearFilter {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .calendar-connect-row,
  .schedule-panel-heading,
  .calendar-toolbar,
  .calendar-nav-controls,
  .calendar-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .schedule-panel-heading,
  .calendar-toolbar,
  .calendar-nav-controls,
  .calendar-actions {
    display: grid;
  }

  .segmented-control {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metrics-grid,
  .dashboard-charts,
  .form-grid,
  .record-banner {
    grid-template-columns: 1fr;
  }

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

  .photo-placeholder {
    min-height: 86px;
  }

  .record-tabs {
    grid-template-columns: 1fr 1fr;
  }
}
