/* Foglio di stile ripreso dal prototipo dell'interfaccia (29/07/2026).
   Unica modifica: tolto l'import di Tailwind — nel markup non c'era una sola
   classe utility, quindi bastava rimettere l'azzeramento di base qui sotto.
   Le classi restano identiche, così il disegno è quello. */

*, *::before, *::after { box-sizing: border-box; }

/* Nel prototipo gli elementi nascosti non esistevano proprio: React li toglieva
   dalla pagina. Qui invece li teniamo e usiamo l'attributo `hidden`, che però
   perde contro il `display` scritto nelle classi (il velo del menu, per esempio,
   restava sopra la pagina). Questa riga rimette le cose a posto. */
[hidden] { display: none !important; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, svg, video { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; }
table { border-collapse: collapse; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }


:root {
  --ink: #162035;
  --muted: #657087;
  --muted-2: #8a94a8;
  --paper: #ffffff;
  --canvas: #f3f5fa;
  --line: #dce1eb;
  --line-soft: #edf0f6;
  --sidebar: #172033;
  --sidebar-soft: #222e49;
  --green: #3b5ccc;
  --green-dark: #2d48a5;
  --green-soft: #e8edff;
  --success: #18775a;
  --success-soft: #e4f3ed;
  --blue: #3678b9;
  --blue-soft: #e8f1fa;
  --amber: #a76b16;
  --amber-soft: #fbefd8;
  --red: #b54d48;
  --red-soft: #fae9e7;
  --violet: #7658a0;
  --violet-soft: #f0eafb;
  --shadow: 0 1px 2px rgba(22, 32, 53, 0.04), 0 10px 32px rgba(22, 32, 53, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(29, 106, 83, 0.2);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  bottom: 0;
  color: #d8e2dc;
  display: flex;
  flex-direction: column;
  left: 0;
  padding: 22px 14px 14px;
  position: fixed;
  top: 0;
  width: 248px;
  z-index: 30;
}

.brand {
  align-items: center;
  display: flex;
  gap: 11px;
  padding: 0 10px 20px;
}

.brand-mark {
  align-items: center;
  background: #eef1ff;
  border-radius: 10px;
  color: #2f4eb5;
  display: flex;
  font-size: 17px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  letter-spacing: -0.04em;
  width: 34px;
}

.brand > span:last-child,
.school-switcher > span:nth-child(2),
.user-card > span:nth-child(2),
.help-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  color: #fff;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand small {
  color: #8fa098;
  font-size: 10px;
  margin-top: 1px;
}

.school-switcher {
  align-items: center;
  background: var(--sidebar-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  display: flex;
  gap: 9px;
  margin-bottom: 22px;
  padding: 10px;
}

.school-monogram {
  align-items: center;
  background: #32405f;
  border-radius: 8px;
  color: #dfe5fa;
  display: flex;
  font-size: 10px;
  font-weight: 750;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.school-switcher strong,
.user-card strong,
.help-card strong {
  color: #f4f7f5;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-switcher small,
.user-card small,
.help-card small {
  color: #8fa098;
  font-size: 9px;
  margin-top: 2px;
}

.school-switcher button {
  background: none;
  color: #94a39c;
  margin-left: auto;
  padding: 4px;
}

.main-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.main-nav p {
  color: #6e8077;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.15em;
  margin: 7px 10px 7px;
}

.main-nav button {
  align-items: center;
  background: transparent;
  border-radius: 9px;
  color: #aebbb4;
  display: flex;
  gap: 10px;
  margin-bottom: 2px;
  min-height: 39px;
  padding: 6px 10px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
  width: 100%;
}

.main-nav button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f3;
}

.main-nav button.active {
  background: #edf0ff;
  color: #2d49aa;
  font-weight: 680;
}

.nav-glyph {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 5px;
  display: flex;
  font-size: 9px;
  font-weight: 750;
  height: 19px;
  justify-content: center;
  opacity: 0.85;
  width: 19px;
}

.main-nav button > small {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: flex;
  font-size: 9px;
  height: 18px;
  justify-content: center;
  margin-left: auto;
  min-width: 18px;
  padding: 0 5px;
}

.main-nav button.active > small {
  background: #dce3ff;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 12px;
}

.help-card,
.user-card {
  align-items: center;
  background: transparent;
  border-radius: 9px;
  color: inherit;
  display: flex;
  gap: 9px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.help-card:hover,
.user-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.help-card > span:first-child {
  align-items: center;
  border: 1px solid #60736a;
  border-radius: 50%;
  display: flex;
  font-size: 10px;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.user-card {
  margin-top: 2px;
}

.user-card > span:last-child {
  color: #778a80;
  margin-left: auto;
}

.main-area {
  margin-left: 248px;
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 64px;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.global-search-wrap {
  max-width: 570px;
  position: relative;
  width: min(46vw, 570px);
}

.search-field {
  align-items: center;
  background: #f5f7f5;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted-2);
  display: flex;
  gap: 9px;
  height: 38px;
  padding: 0 11px;
  transition: background 160ms ease, border 160ms ease;
  width: 100%;
}

.search-field:focus-within {
  background: #fff;
  border-color: #9dbcae;
  box-shadow: 0 0 0 3px rgba(29, 106, 83, 0.08);
}

.search-field input {
  background: transparent;
  border: 0;
  font-size: 12px;
  outline: 0;
  width: 100%;
}

.search-field input::placeholder {
  color: #99a39e;
}

.search-field kbd {
  background: #fff;
  border: 1px solid #d8ded9;
  border-radius: 5px;
  color: #8d9691;
  font-family: inherit;
  font-size: 9px;
  padding: 3px 6px;
  white-space: nowrap;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 9px;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 9px;
}

.icon-button:hover {
  background: #f6f8f6;
}

.notification-button {
  position: relative;
}

.notification-button::before {
  border: 1.5px solid currentColor;
  border-radius: 7px 7px 4px 4px;
  content: "";
  height: 12px;
  position: absolute;
  top: 8px;
  width: 11px;
}

.notification-button::after {
  background: var(--red);
  border: 2px solid #fff;
  border-radius: 50%;
  content: "";
  height: 7px;
  position: absolute;
  right: 6px;
  top: 5px;
  width: 7px;
}

.notification-button > span {
  bottom: 4px;
  font-size: 13px;
  position: absolute;
}

.quick-button,
.primary-button {
  align-items: center;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 7px;
  height: 36px;
  justify-content: center;
  padding: 0 14px;
  white-space: nowrap;
}

.quick-button:hover,
.primary-button:hover {
  background: var(--green-dark);
}

.quick-button small {
  color: #b7d4c7;
  font-size: 9px;
  margin-left: 3px;
}

.quick-wrap,
.notification-wrap {
  position: relative;
}

.search-results,
.notification-popover,
.quick-menu {
  animation: pop 130ms ease-out;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 55px rgba(23, 36, 31, 0.16);
  position: absolute;
  z-index: 60;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-results {
  left: 0;
  padding: 8px;
  right: 0;
  top: 43px;
}

.search-results > p {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  margin: 6px 8px;
}

.search-results button {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 9px;
  text-align: left;
  width: 100%;
}

.search-results button:hover {
  background: #f5f7f5;
}

.search-results button > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.search-results strong {
  font-size: 12px;
}

.search-results small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.search-kind {
  align-items: center;
  background: var(--green-soft);
  border-radius: 7px;
  color: var(--green);
  display: flex;
  font-size: 10px;
  font-weight: 750;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.notification-popover {
  padding: 8px;
  right: 0;
  top: 43px;
  width: 370px;
}

.notification-popover > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 8px 9px 10px;
}

.notification-popover h3 {
  font-size: 14px;
  margin: 0;
}

.notification-popover > div button {
  background: none;
  color: var(--green);
  font-size: 10px;
}

.notification-popover > button:not(.all-notifications) {
  align-items: flex-start;
  background: transparent;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  padding: 10px 9px;
  text-align: left;
  width: 100%;
}

.notification-popover > button:hover {
  background: #f6f8f6;
}

.notification-popover > button > span:last-child {
  display: flex;
  flex-direction: column;
}

.notification-popover strong {
  font-size: 11px;
}

.notification-popover small,
.notification-popover em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  margin-top: 3px;
}

.notification-popover em {
  color: var(--muted-2);
}

.notification-dot {
  border-radius: 50%;
  flex: 0 0 auto;
  height: 7px;
  margin-top: 4px;
  width: 7px;
}

.all-notifications {
  background: none;
  border-top: 1px solid var(--line-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 650;
  margin-top: 3px;
  padding: 10px;
  width: 100%;
}

.quick-menu {
  padding: 7px;
  right: 0;
  top: 43px;
  width: 235px;
}

.quick-menu button {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  padding: 9px;
  text-align: left;
  width: 100%;
}

.quick-menu button:hover {
  background: #f5f7f5;
}

.quick-menu button > span:first-child {
  align-items: center;
  background: var(--green-soft);
  border-radius: 7px;
  color: var(--green);
  display: flex;
  font-size: 9px;
  font-weight: 750;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.quick-menu button > span:last-child {
  display: flex;
  flex-direction: column;
}

.quick-menu strong {
  font-size: 11px;
}

.quick-menu small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}

.page {
  margin: 0 auto;
  max-width: 1640px;
  padding: 28px 30px 48px;
}

.page-header {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header > div {
  display: flex;
  flex-direction: column;
}

.page-header p {
  color: var(--green);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.06em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.page-header h1 {
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin: 0;
}

.page-header > div > span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 7px;
}

.secondary-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  font-size: 11px;
  font-weight: 620;
  gap: 7px;
  height: 36px;
  justify-content: center;
  padding: 0 13px;
  white-space: nowrap;
}

.secondary-button:hover {
  background: #f8faf8;
}

.focus-dot {
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--green-soft);
  height: 7px;
  width: 7px;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.metric-card {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  min-height: 112px;
  padding: 16px;
  text-align: left;
  transition: border 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.metric-card:hover {
  border-color: #c5d3cb;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.metric-critical {
  border-top: 3px solid var(--red);
  padding-top: 14px;
}

.metric-icon {
  align-items: center;
  background: var(--red-soft);
  border-radius: 10px;
  color: var(--red);
  display: flex;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 750;
  height: 39px;
  justify-content: center;
  width: 39px;
}

.metric-icon-emerald { background: var(--green-soft); color: var(--green); }
.metric-icon-blue { background: var(--blue-soft); color: var(--blue); font-size: 10px; }
.metric-icon-amber { background: var(--amber-soft); color: var(--amber); }

.metric-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.metric-copy > span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  min-height: 25px;
}

.metric-copy strong {
  font-size: 24px;
  letter-spacing: -0.045em;
  line-height: 1.1;
  margin-top: 2px;
}

.metric-copy small {
  color: var(--muted-2);
  font-size: 9px;
  margin-top: 4px;
}

.metric-arrow,
.row-arrow {
  color: #9ba59f;
  font-size: 15px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, 0.75fr);
}

.lower-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(20, 36, 30, 0.02);
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 17px 19px;
}

.panel-heading > div {
  display: flex;
  flex-direction: column;
}

.section-kicker {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.panel-heading h2 {
  font-size: 15px;
  letter-spacing: -0.015em;
  margin: 0;
}

.text-button {
  background: transparent;
  color: var(--green);
  font-size: 10px;
  font-weight: 660;
}

.text-button:hover {
  color: var(--green-dark);
}

.panel-caption {
  color: var(--muted);
  font-size: 10px;
}

.attention-list {
  border-top: 1px solid var(--line-soft);
}

.attention-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  gap: 11px;
  grid-template-columns: 3px 34px minmax(150px, 1fr) minmax(180px, 1.25fr) 18px;
  min-height: 71px;
  padding: 9px 18px 9px 0;
  text-align: left;
  width: 100%;
}

.attention-row:last-child {
  border-bottom: 0;
  border-radius: 0 0 12px 12px;
}

.attention-row:hover {
  background: #fafbf9;
}

.attention-line {
  align-self: stretch;
  border-radius: 0 4px 4px 0;
}

.avatar {
  align-items: center;
  background: #e4eae6;
  border-radius: 10px;
  color: #385148;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 720;
  height: 34px;
  justify-content: center;
  letter-spacing: -0.02em;
  width: 34px;
}

.avatar-small {
  border-radius: 8px;
  font-size: 9px;
  height: 28px;
  width: 28px;
}

.attention-main,
.attention-reason,
.stacked-cell,
.practice-code {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.attention-main strong,
.stacked-cell strong,
.practice-code strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-main > span,
.attention-reason small,
.stacked-cell small,
.practice-code small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-reason {
  align-items: flex-start;
}

.status {
  align-items: center;
  border-radius: 20px;
  display: inline-flex;
  font-size: 9px;
  font-weight: 630;
  gap: 5px;
  line-height: 1;
  padding: 6px 8px;
  white-space: nowrap;
}

.status > span {
  background: currentColor;
  border-radius: 50%;
  height: 5px;
  width: 5px;
}

.status-red { background: var(--red-soft); color: var(--red); }
.status-amber { background: var(--amber-soft); color: var(--amber); }
.status-emerald { background: var(--success-soft); color: var(--success); }
.status-blue { background: var(--blue-soft); color: var(--blue); }
.status-violet { background: var(--violet-soft); color: var(--violet); }
.status-slate { background: #edf0ed; color: #64716b; }

.tone-red { background: var(--red); }
.tone-amber { background: #c18b39; }
.tone-emerald { background: var(--success); }
.tone-blue { background: var(--blue); }
.tone-violet { background: var(--violet); }
.tone-slate { background: #829087; }
.tone-bg-red { background: var(--red); }
.tone-bg-amber { background: #c18b39; }
.tone-bg-emerald { background: var(--success); }
.tone-bg-blue { background: var(--blue); }
.tone-bg-violet { background: var(--violet); }
.tone-bg-slate { background: #829087; }
.tone-border-red { border-left-color: var(--red) !important; }
.tone-border-amber { border-left-color: #c18b39 !important; }
.tone-border-emerald { border-left-color: var(--success) !important; }
.tone-border-blue { border-left-color: var(--blue) !important; }
.tone-border-violet { border-left-color: var(--violet) !important; }
.tone-border-slate { border-left-color: #829087 !important; }
.tone-soft-red { background: var(--red-soft); color: var(--red); }
.tone-soft-amber { background: var(--amber-soft); color: var(--amber); }
.tone-soft-emerald { background: var(--success-soft); color: var(--success); }
.tone-soft-blue { background: var(--blue-soft); color: var(--blue); }
.tone-soft-violet { background: var(--violet-soft); color: var(--violet); }
.tone-soft-slate { background: #edf0ed; color: #64716b; }

.schedule-panel {
  display: flex;
  flex-direction: column;
}

.agenda-date {
  align-items: center;
  background: #f7f9f7;
  border-bottom: 1px solid var(--line-soft);
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  padding: 8px 18px;
}

.agenda-date span {
  color: var(--green);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.agenda-date strong {
  font-size: 10px;
}

.agenda-tomorrow {
  margin-top: auto;
}

.schedule-row {
  align-items: center;
  background: transparent;
  display: grid;
  gap: 9px;
  grid-template-columns: 48px 6px 1fr 19px;
  min-height: 58px;
  padding: 7px 16px;
  text-align: left;
  width: 100%;
}

.schedule-row:hover {
  background: #fafbf9;
}

.schedule-row.is-done {
  opacity: 0.48;
}

.schedule-row.is-done strong {
  text-decoration: line-through;
}

.schedule-time {
  color: var(--muted);
  font-size: 9px;
}

.schedule-dot {
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.schedule-row > span:nth-child(3) {
  display: flex;
  flex-direction: column;
}

.schedule-row strong {
  font-size: 10px;
}

.schedule-row small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.task-check {
  align-items: center;
  border: 1px solid #ccd4cf;
  border-radius: 6px;
  color: var(--green);
  display: flex;
  font-size: 10px;
  height: 18px;
  justify-content: center;
  width: 18px;
}

.flow-chart {
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
}

.flow-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 105px 1fr 25px;
}

.flow-row > span:first-child {
  color: var(--muted);
  font-size: 10px;
}

.flow-row > strong {
  font-size: 10px;
  text-align: right;
}

.flow-track,
.team-progress,
.ranking-track {
  background: #eef1ee;
  border-radius: 20px;
  height: 7px;
  overflow: hidden;
}

.flow-fill,
.team-progress span,
.ranking-track span {
  border-radius: inherit;
  display: block;
  height: 100%;
}

.team-panel {
  padding-bottom: 7px;
}

.team-row {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 112px 1fr 19px 42px;
  min-height: 57px;
  padding: 8px 18px;
}

.team-name {
  display: flex;
  flex-direction: column;
}

.team-name strong,
.team-row > strong {
  font-size: 10px;
}

.team-name small,
.team-row > small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 3px;
}

.team-progress {
  height: 6px;
}

.team-progress span {
  background: var(--green);
}

.list-summary,
.document-stats,
.report-metrics {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.list-summary > div {
  align-items: baseline;
  border-right: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  padding: 14px 18px;
}

.list-summary > div:last-child {
  border-right: 0;
}

.list-summary strong {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.list-summary span {
  color: var(--muted);
  font-size: 10px;
}

.table-panel {
  overflow: hidden;
}

.toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}

.search-field.compact {
  height: 34px;
  max-width: 330px;
  min-width: 240px;
}

.toolbar select,
.panel-heading select,
.status-control select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10px;
  height: 34px;
  padding: 0 28px 0 10px;
}

.toolbar-count {
  color: var(--muted);
  font-size: 9px;
  margin-left: auto;
}

.toolbar .primary-button {
  height: 34px;
}

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

table {
  border-collapse: collapse;
  min-width: 920px;
  width: 100%;
}

thead {
  background: #f7f9f7;
}

th {
  color: #7d8983;
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.075em;
  padding: 10px 14px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  border-top: 1px solid var(--line-soft);
  color: #39453f;
  font-size: 10px;
  height: 57px;
  padding: 8px 14px;
  white-space: nowrap;
}

tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

tbody tr:hover {
  background: #fafbf9;
}

.person-cell {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.person-cell > span {
  display: flex;
  flex-direction: column;
}

.person-cell strong {
  color: var(--ink);
  font-size: 10px;
}

.person-cell small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 3px;
}

.practice-tags {
  display: flex;
  gap: 4px;
}

.practice-tags > span {
  background: #edf1ee;
  border-radius: 5px;
  color: #536159;
  font-size: 8px;
  font-weight: 680;
  padding: 4px 6px;
}

.document-progress {
  align-items: center;
  display: flex;
  gap: 7px;
}

.document-progress.wide {
  min-width: 120px;
}

.mini-progress {
  background: #e8ece9;
  border-radius: 10px;
  height: 5px;
  overflow: hidden;
  width: 58px;
}

.wide .mini-progress {
  width: 85px;
}

.mini-progress > span {
  background: var(--green);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.document-progress small {
  color: var(--muted);
  font-size: 8px;
}

.money-open {
  color: var(--red);
  font-weight: 650;
}

.money-paid,
.positive {
  color: var(--success);
  font-weight: 620;
}

.negative,
.urgent-text {
  color: var(--red) !important;
}

.row-menu {
  border: 0;
  height: 26px;
  min-width: 26px;
  padding: 0;
}

.owner-pill {
  align-items: center;
  background: #ecf0ed;
  border-radius: 20px;
  color: #526159;
  display: inline-flex;
  font-size: 8px;
  font-weight: 700;
  gap: 6px;
  height: 24px;
  justify-content: center;
  padding: 0 8px;
}

.owner-pill > span {
  font-weight: 540;
}

.empty-state {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  padding: 50px;
}

.empty-mark {
  align-items: center;
  background: var(--green-soft);
  border-radius: 50%;
  color: var(--green);
  display: flex;
  height: 38px;
  justify-content: center;
  margin-bottom: 10px;
  width: 38px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 12px;
}

.empty-state span {
  font-size: 10px;
  margin-top: 4px;
}

.segment-bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  min-height: 43px;
}

.segment-bar button {
  align-items: center;
  align-self: stretch;
  background: transparent;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  font-weight: 600;
  gap: 6px;
  padding: 0 2px;
}

.segment-bar button span {
  align-items: center;
  background: #e8ece9;
  border-radius: 12px;
  color: #69766f;
  display: inline-flex;
  font-size: 8px;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
}

.segment-bar button.active {
  border-color: var(--green);
  color: var(--green);
}

.segment-bar button.active span {
  background: var(--green-soft);
  color: var(--green);
}

.week-strip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.week-heading {
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 8px;
  padding: 12px 14px;
}

.week-heading > strong {
  font-size: 12px;
  margin: 0 4px;
}

.week-heading .secondary-button {
  margin-left: auto;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.week-days button {
  align-items: center;
  background: transparent;
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  min-height: 72px;
  padding: 10px;
  position: relative;
}

.week-days button:last-child {
  border-right: 0;
}

.week-days button:hover {
  background: #fafbf9;
}

.week-days button.active {
  background: var(--green-soft);
  color: var(--green);
}

.week-days button.faded {
  color: var(--muted-2);
}

.week-days span {
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.week-days strong {
  font-size: 18px;
  margin-top: 5px;
}

.week-days small {
  background: currentColor;
  border-radius: 50%;
  bottom: 7px;
  height: 4px;
  position: absolute;
  width: 4px;
}

.calendar-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 380px;
}

.timeline-panel {
  padding-bottom: 20px;
}

.day-timeline {
  border-top: 1px solid var(--line-soft);
  padding: 8px 18px;
}

.timeline-event {
  align-items: stretch;
  background: transparent;
  display: grid;
  gap: 13px;
  grid-template-columns: 44px 1fr;
  padding: 7px 0;
  text-align: left;
  width: 100%;
}

.timeline-event.is-done {
  opacity: 0.5;
}

.event-time {
  color: var(--muted);
  font-size: 9px;
  padding-top: 11px;
}

.event-card {
  background: #f8faf8;
  border: 1px solid var(--line-soft);
  border-left: 3px solid;
  border-radius: 8px;
  display: grid;
  gap: 5px 10px;
  grid-template-columns: auto 1fr auto;
  min-height: 64px;
  padding: 9px 11px;
}

.event-card .status {
  align-self: start;
  grid-row: span 2;
}

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

.event-card > small {
  color: var(--muted);
  font-size: 9px;
}

.event-owner {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  grid-column: 3;
  grid-row: 1 / span 2;
}

.deadline-panel {
  align-self: start;
  padding-bottom: 6px;
}

.deadline-row {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 11px;
  padding: 10px 17px;
}

.date-tile {
  align-items: center;
  border-radius: 8px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.date-tile strong {
  font-size: 12px;
}

.date-tile small {
  font-size: 7px;
  font-weight: 720;
}

.deadline-row > span:last-child {
  display: flex;
  flex-direction: column;
}

.deadline-row > span:last-child strong {
  font-size: 10px;
}

.deadline-row > span:last-child small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 4px;
}

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

.doc-stat {
  align-items: center;
  border-right: 1px solid var(--line-soft);
  display: flex;
  gap: 12px;
  min-height: 84px;
  padding: 13px 18px;
}

.doc-stat:last-child {
  border-right: 0;
}

.doc-stat > strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.doc-stat > span:last-child {
  display: flex;
  flex-direction: column;
}

.doc-stat b,
.doc-stat span > strong {
  font-size: 10px;
}

.doc-stat small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 4px;
}

.doc-ring {
  align-items: center;
  border: 5px solid var(--green-soft);
  border-right-color: var(--green);
  border-top-color: var(--green);
  border-radius: 50%;
  color: var(--green);
  display: flex;
  font-size: 11px;
  font-weight: 720;
  height: 48px;
  justify-content: center;
  transform: rotate(10deg);
  width: 48px;
}

.doc-ring::first-line {
  transform: rotate(-10deg);
}

.missing-docs {
  color: var(--amber);
  font-size: 9px;
}

.finance-overview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
}

.finance-overview > div {
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 102px;
  padding: 16px 20px;
}

.finance-overview > div:last-child {
  border-right: 0;
}

.finance-overview span {
  color: var(--muted);
  font-size: 9px;
}

.finance-overview strong {
  font-size: 21px;
  letter-spacing: -0.04em;
  margin-top: 5px;
}

.finance-overview small {
  color: var(--muted-2);
  font-size: 8px;
  margin-top: 5px;
}

.finance-primary {
  background: var(--sidebar);
  border-radius: 11px 0 0 11px;
  color: #fff;
}

.finance-primary span,
.finance-primary small {
  color: #a6b6ae;
}

.finance-primary strong {
  font-size: 28px;
}

.tasks-toolbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.compact-segments {
  border: 0;
  gap: 17px;
}

.compact-segments button {
  min-height: 36px;
}

.kanban {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.kanban-column {
  background: #eef1ee;
  border: 1px solid #e1e6e2;
  border-radius: 12px;
  min-height: 520px;
  padding: 12px;
}

.kanban-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 35px;
  padding: 0 3px 9px;
}

.kanban-heading strong {
  font-size: 11px;
}

.kanban-heading > span:nth-child(3) {
  align-items: center;
  background: #dfe5e1;
  border-radius: 20px;
  color: var(--muted);
  display: flex;
  font-size: 8px;
  height: 18px;
  justify-content: center;
  min-width: 18px;
}

.kanban-heading .icon-button {
  border: 0;
  height: 26px;
  margin-left: auto;
  min-width: 26px;
}

.kanban-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  padding: 13px;
  text-align: left;
  transition: box-shadow 150ms ease, transform 150ms ease;
  width: 100%;
}

.task-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.task-card .status {
  align-self: flex-start;
}

.task-card > strong {
  font-size: 11px;
  margin-top: 11px;
}

.task-card p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  margin: 5px 0 14px;
}

.task-card > div {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
}

.task-card > div > span:first-child {
  color: var(--muted);
  font-size: 8px;
}

.kanban-empty {
  border: 1px dashed #ccd5cf;
  border-radius: 9px;
  color: var(--muted-2);
  font-size: 9px;
  padding: 24px;
  text-align: center;
}

.report-metrics {
  grid-template-columns: repeat(4, 1fr);
}

.report-metrics > div {
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  min-height: 92px;
  padding: 15px 19px;
}

.report-metrics > div:last-child {
  border-right: 0;
}

.report-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.report-metrics strong {
  font-size: 23px;
  letter-spacing: -0.04em;
  margin-top: 5px;
}

.report-metrics small {
  font-size: 8px;
  margin-top: 5px;
}

.reports-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.35fr 0.65fr;
}

.chart-panel {
  min-height: 405px;
}

.bar-chart {
  align-items: end;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(12, 1fr);
  height: 320px;
  padding: 48px 22px 25px;
}

.bar-column {
  align-items: center;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

.bar {
  background: #cadaD2;
  border-radius: 5px 5px 2px 2px;
  display: block;
  min-height: 15px;
  width: min(28px, 70%);
}

.bar-column:nth-last-child(-n + 3) .bar {
  background: var(--green);
}

.bar-value {
  color: var(--muted);
  font-size: 7px;
  margin-bottom: 5px;
}

.bar-column small {
  color: var(--muted-2);
  font-size: 7px;
  margin-top: 9px;
}

.branch-ranking {
  padding-bottom: 8px;
}

.ranking-row {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 19px 92px 1fr 30px;
  min-height: 53px;
  padding: 8px 17px;
}

.rank {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
}

.ranking-name {
  display: flex;
  flex-direction: column;
}

.ranking-name strong,
.ranking-row > strong {
  font-size: 9px;
}

.ranking-name small {
  color: var(--muted);
  font-size: 7px;
  margin-top: 3px;
}

.ranking-track {
  height: 5px;
}

.ranking-track span {
  background: var(--green);
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.setting-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 36px 1fr 18px;
  min-height: 145px;
  padding: 18px;
  text-align: left;
  transition: border 150ms ease, box-shadow 150ms ease;
}

.setting-card:hover {
  border-color: #b9c9c0;
  box-shadow: var(--shadow);
}

.setting-glyph {
  align-items: center;
  background: var(--green-soft);
  border-radius: 9px;
  color: var(--green);
  display: flex;
  font-size: 11px;
  font-weight: 750;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.setting-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

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

.setting-card p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  margin: 7px 0 12px;
}

.setting-card small {
  color: var(--green);
  font-size: 8px;
  font-weight: 620;
}

.audit-card {
  grid-column: 1 / -1;
}

.audit-row {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 9px;
  grid-template-columns: 28px 1fr auto;
  min-height: 51px;
  padding: 8px 18px;
}

.audit-row > span {
  color: var(--muted);
  font-size: 10px;
}

.audit-row > span strong {
  color: var(--ink);
}

.audit-row > small {
  color: var(--muted-2);
  font-size: 8px;
}

.drawer-layer,
.modal-layer {
  align-items: stretch;
  background: rgba(10, 20, 16, 0.4);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  position: fixed;
  z-index: 100;
}

.drawer {
  animation: slide-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--canvas);
  box-shadow: -20px 0 60px rgba(17, 31, 25, 0.17);
  height: 100%;
  max-width: 100%;
  overflow-y: auto;
  width: 670px;
}

.practice-drawer {
  width: min(840px, 100vw);
}

@keyframes slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-top {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  height: 61px;
  justify-content: flex-end;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.drawer-top .icon-button {
  margin-right: auto;
}

.student-hero,
.practice-hero {
  align-items: center;
  background: #fff;
  display: flex;
  min-height: 112px;
  padding: 21px 25px;
}

.student-hero .avatar {
  border-radius: 14px;
  font-size: 16px;
  height: 56px;
  width: 56px;
}

.student-hero > div,
.practice-identity > div {
  display: flex;
  flex-direction: column;
  margin-left: 14px;
}

.student-hero p,
.practice-identity p,
.next-action-card > p,
.modal-heading p {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: 0.1em;
  margin: 0 0 3px;
}

.student-hero h2,
.practice-hero h2 {
  font-size: 22px;
  letter-spacing: -0.035em;
  margin: 0;
}

.student-hero > div > span,
.practice-identity > div > span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}

.drawer-tabs {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  padding: 0 25px;
}

.drawer-tabs button {
  background: transparent;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
  height: 43px;
  padding: 0;
}

.drawer-tabs button.active {
  border-color: var(--green);
  color: var(--green);
}

.drawer-body {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px 24px 35px;
}

.detail-card,
.next-action-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 17px;
}

.detail-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
}

.detail-heading h3 {
  font-size: 12px;
  margin: 0;
}

.detail-heading button {
  background: none;
  color: var(--green);
  font-size: 9px;
  font-weight: 620;
}

.detail-heading > span,
.detail-heading > strong {
  color: var(--muted);
  font-size: 9px;
}

.detail-card dl {
  display: grid;
  gap: 0 24px;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
}

.detail-card dl > div {
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.detail-card dt {
  color: var(--muted);
  font-size: 8px;
}

.detail-card dd {
  font-size: 10px;
  font-weight: 580;
  margin: 4px 0 0;
}

.contact-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.contact-actions button {
  background: #f3f6f3;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--green);
  font-size: 9px;
  font-weight: 620;
  height: 31px;
  padding: 0 10px;
}

.related-practice {
  align-items: center;
  background: transparent;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 38px 1fr auto 18px;
  padding: 11px 0;
  text-align: left;
  width: 100%;
}

.category-tile {
  align-items: center;
  background: var(--sidebar);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-size: 10px;
  font-weight: 720;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  padding: 0 7px;
}

.category-tile.large {
  border-radius: 12px;
  font-size: 16px;
  height: 54px;
  min-width: 54px;
}

.related-practice > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.related-practice strong {
  font-size: 10px;
}

.related-practice small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 4px;
}

.big-progress {
  background: #e9edea;
  border-radius: 20px;
  display: block;
  height: 7px;
  overflow: hidden;
}

.big-progress > span {
  background: var(--green);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.card-note {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  margin: 11px 0 0;
}

.finance-card {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.finance-card > span {
  display: flex;
  flex-direction: column;
}

.finance-card small {
  color: var(--muted);
  font-size: 8px;
}

.finance-card strong {
  font-size: 20px;
  letter-spacing: -0.035em;
  margin-top: 4px;
}

.practice-hero {
  align-items: flex-end;
  justify-content: space-between;
}

.practice-identity {
  align-items: center;
  display: flex;
}

.status-control {
  display: flex;
  flex-direction: column;
}

.status-control label {
  color: var(--muted);
  font-size: 8px;
  margin-bottom: 5px;
}

.status-control select {
  min-width: 190px;
}

.practice-body {
  gap: 14px;
}

.next-action-card {
  background: #f5f9f6;
  border-color: #bfd4c8;
}

.next-action-card > div {
  align-items: center;
  display: flex;
  gap: 11px;
  margin-top: 8px;
}

.attention-mark {
  align-items: center;
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 740;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.next-action-card > div > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.next-action-card strong {
  font-size: 11px;
}

.next-action-card small {
  color: var(--muted);
  font-size: 8px;
  margin-top: 4px;
}

.next-action-card .primary-button {
  height: 33px;
}

.checklist {
  display: grid;
  gap: 0 13px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 11px;
}

.checklist label {
  align-items: center;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: 20px 1fr auto;
  min-height: 46px;
}

.checklist input {
  display: none;
}

.checklist label > span {
  align-items: center;
  border: 1px solid #c8d0cb;
  border-radius: 5px;
  color: #fff;
  display: flex;
  font-size: 9px;
  height: 19px;
  justify-content: center;
  width: 19px;
}

.checklist label.checked > span {
  background: var(--green);
  border-color: var(--green);
}

.checklist label.checked strong {
  color: var(--muted);
  text-decoration: line-through;
}

.checklist strong {
  font-size: 9px;
}

.checklist small {
  color: var(--amber);
  font-size: 8px;
}

.detail-split {
  display: grid;
  gap: 14px;
  grid-template-columns: 0.9fr 1.1fr;
}

.compact-timeline > div {
  display: grid;
  gap: 8px;
  grid-template-columns: 8px 38px 1fr;
  min-height: 43px;
  position: relative;
}

.compact-timeline > div::after {
  background: #dce2de;
  content: "";
  height: calc(100% - 11px);
  left: 3px;
  position: absolute;
  top: 10px;
  width: 1px;
}

.compact-timeline > div:last-child::after {
  display: none;
}

.compact-timeline > div > span {
  background: #aab5af;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #c7cfca;
  height: 7px;
  margin-top: 3px;
  width: 7px;
  z-index: 1;
}

.compact-timeline > div > span.current {
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.compact-timeline small {
  color: var(--muted-2);
  font-size: 8px;
}

.compact-timeline p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.compact-timeline strong {
  font-size: 9px;
}

.compact-timeline em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  margin-top: 3px;
}

.modal-layer {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  animation: pop 160ms ease-out;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 25px 70px rgba(10, 22, 17, 0.22);
  max-height: calc(100vh - 40px);
  max-width: 100%;
  overflow-y: auto;
  width: 570px;
}

.modal-heading {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 21px 23px;
}

.modal-heading h2 {
  font-size: 20px;
  letter-spacing: -0.03em;
  margin: 0;
}

.modal-heading span {
  color: var(--muted);
  display: block;
  font-size: 9px;
  margin-top: 6px;
}

.modal-heading .icon-button {
  border: 0;
  font-size: 19px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  padding: 22px 23px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
}

.form-grid label.full {
  grid-column: 1 / -1;
}

.form-grid label > span {
  font-size: 9px;
  font-weight: 620;
  margin-bottom: 6px;
}

.form-grid input,
.form-grid select {
  background: #fff;
  border: 1px solid #d3dbd6;
  border-radius: 8px;
  height: 38px;
  padding: 0 10px;
}

.modal-footer {
  align-items: center;
  background: #f7f9f7;
  border-radius: 0 0 14px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 23px;
}

.toast {
  align-items: center;
  animation: toast-in 220ms ease-out;
  background: var(--sidebar);
  border-radius: 9px;
  bottom: 22px;
  box-shadow: 0 12px 35px rgba(11, 24, 18, 0.25);
  color: #fff;
  display: flex;
  font-size: 10px;
  gap: 8px;
  left: 50%;
  padding: 11px 14px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 200;
}

.toast span {
  align-items: center;
  background: var(--green);
  border-radius: 50%;
  display: flex;
  height: 18px;
  justify-content: center;
  width: 18px;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.mobile-menu,
.mobile-scrim {
  display: none;
}

/* Larger, more readable desktop scale */
body {
  font-size: 16px;
}

.sidebar {
  padding: 24px 16px 16px;
  width: 276px;
}

.main-area {
  margin-left: 276px;
}

.brand {
  gap: 13px;
  padding: 0 11px 22px;
}

.brand-mark {
  border-radius: 11px;
  font-size: 20px;
  height: 40px;
  width: 40px;
}

.brand strong {
  font-size: 19px;
}

.brand small {
  font-size: 12px;
}

.school-switcher {
  gap: 11px;
  padding: 12px;
}

.school-monogram {
  font-size: 11px;
  height: 34px;
  width: 34px;
}

.school-switcher strong,
.user-card strong,
.help-card strong {
  font-size: 13px;
}

.school-switcher small,
.user-card small,
.help-card small {
  font-size: 11px;
}

.main-nav p {
  font-size: 10px;
  margin: 10px 11px 8px;
}

.main-nav button {
  border-radius: 10px;
  font-size: 14px;
  gap: 12px;
  min-height: 45px;
  padding: 7px 11px;
}

.nav-glyph {
  font-size: 10px;
  height: 22px;
  width: 22px;
}

.main-nav button > small {
  font-size: 11px;
  height: 21px;
  min-width: 21px;
}

.help-card,
.user-card {
  gap: 11px;
  min-height: 48px;
  padding: 9px;
}

.topbar {
  height: 72px;
  padding: 0 34px;
}

.search-field {
  border-radius: 10px;
  gap: 11px;
  height: 44px;
  padding: 0 13px;
}

.search-field input {
  font-size: 14px;
}

.search-field kbd {
  font-size: 11px;
  padding: 4px 7px;
}

.icon-button {
  border-radius: 9px;
  height: 40px;
  min-width: 40px;
}

.quick-button,
.primary-button,
.secondary-button {
  border-radius: 9px;
  font-size: 13px;
  height: 40px;
  padding: 0 16px;
}

.page {
  padding: 34px 34px 54px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header p {
  font-size: 12px;
  margin-bottom: 7px;
}

.page-header h1 {
  font-size: clamp(31px, 2.5vw, 40px);
}

.page-header > div > span {
  font-size: 14px;
  margin-top: 9px;
}

.page-stack {
  gap: 20px;
}

.metric-grid {
  gap: 15px;
}

.metric-card {
  border-radius: 14px;
  gap: 14px;
  min-height: 136px;
  padding: 19px;
}

.metric-icon {
  border-radius: 11px;
  font-size: 18px;
  height: 45px;
  width: 45px;
}

.metric-icon-blue {
  font-size: 12px;
}

.metric-copy > span {
  font-size: 13px;
  min-height: 32px;
}

.metric-copy strong {
  font-size: 31px;
}

.metric-copy small {
  font-size: 11px;
  margin-top: 6px;
}

.panel,
.list-summary,
.document-stats,
.finance-overview,
.report-metrics,
.week-strip,
.setting-card {
  border-radius: 14px;
}

.panel-heading {
  padding: 20px 22px;
}

.section-kicker {
  font-size: 10px;
  margin-bottom: 5px;
}

.panel-heading h2 {
  font-size: 18px;
}

.text-button,
.panel-caption {
  font-size: 12px;
}

.attention-row {
  gap: 13px;
  grid-template-columns: 4px 40px minmax(180px, 1fr) minmax(220px, 1.25fr) 20px;
  min-height: 84px;
}

.avatar {
  border-radius: 11px;
  font-size: 12px;
  height: 40px;
  width: 40px;
}

.avatar-small {
  border-radius: 8px;
  font-size: 10px;
  height: 32px;
  width: 32px;
}

.attention-main strong,
.stacked-cell strong,
.practice-code strong,
.person-cell strong {
  font-size: 13px;
}

.attention-main > span,
.attention-reason small,
.stacked-cell small,
.practice-code small,
.person-cell small {
  font-size: 11px;
  margin-top: 5px;
}

.status {
  font-size: 11px;
  gap: 6px;
  padding: 7px 9px;
}

.status > span {
  height: 6px;
  width: 6px;
}

.agenda-date {
  padding: 10px 21px;
}

.agenda-date span {
  font-size: 10px;
}

.agenda-date strong {
  font-size: 12px;
}

.schedule-row {
  gap: 11px;
  grid-template-columns: 62px 7px 1fr 22px;
  min-height: 70px;
  padding: 9px 19px;
}

.schedule-time,
.schedule-row small {
  font-size: 11px;
}

.schedule-row strong {
  font-size: 13px;
}

.task-check {
  font-size: 12px;
  height: 21px;
  width: 21px;
}

.flow-chart {
  gap: 18px;
  padding: 23px;
}

.flow-row {
  grid-template-columns: 130px 1fr 32px;
}

.flow-row > span:first-child,
.flow-row > strong {
  font-size: 12px;
}

.team-row {
  grid-template-columns: 32px 140px 1fr 22px 50px;
  min-height: 66px;
  padding: 9px 21px;
}

.team-name strong,
.team-row > strong {
  font-size: 12px;
}

.team-name small,
.team-row > small {
  font-size: 10px;
}

.list-summary > div {
  padding: 18px 21px;
}

.list-summary strong {
  font-size: 25px;
}

.list-summary span {
  font-size: 12px;
}

.toolbar {
  gap: 10px;
  padding: 14px 16px;
}

.search-field.compact {
  height: 40px;
  max-width: 390px;
  min-width: 270px;
}

.toolbar select,
.panel-heading select,
.status-control select {
  font-size: 12px;
  height: 40px;
  padding-left: 12px;
}

.toolbar-count {
  font-size: 11px;
}

.toolbar .primary-button {
  height: 40px;
}

table {
  min-width: 1080px;
}

th {
  font-size: 10px;
  padding: 12px 16px;
}

td {
  font-size: 13px;
  height: 68px;
  padding: 10px 16px;
}

.practice-tags > span {
  font-size: 10px;
  padding: 5px 7px;
}

.mini-progress {
  height: 7px;
  width: 72px;
}

.document-progress small {
  font-size: 10px;
}

.owner-pill {
  font-size: 10px;
  height: 28px;
  padding: 0 10px;
}

.segment-bar {
  gap: 24px;
  min-height: 49px;
}

.segment-bar button {
  font-size: 13px;
}

.segment-bar button span {
  font-size: 10px;
  height: 21px;
  min-width: 21px;
}

.week-heading > strong,
.detail-heading h3,
.setting-card strong {
  font-size: 14px;
}

.week-days span {
  font-size: 10px;
}

.week-days strong {
  font-size: 22px;
}

.event-time,
.event-card > small,
.event-owner,
.deadline-row > span:last-child small,
.setting-card p,
.audit-row > small {
  font-size: 11px;
}

.event-card > strong,
.deadline-row > span:last-child strong,
.ranking-name strong,
.ranking-row > strong,
.audit-row > span {
  font-size: 13px;
}

.doc-stat b,
.doc-stat span > strong {
  font-size: 13px;
}

.doc-stat small,
.finance-overview small,
.report-metrics small {
  font-size: 10px;
}

.finance-overview span,
.report-metrics span {
  font-size: 12px;
}

.finance-overview strong,
.report-metrics strong {
  font-size: 27px;
}

.task-card > strong {
  font-size: 14px;
}

.task-card p {
  font-size: 12px;
}

.task-card > div > span:first-child,
.kanban-empty,
.setting-card small {
  font-size: 11px;
}

.kanban-heading strong {
  font-size: 13px;
}

.student-hero h2,
.practice-hero h2 {
  font-size: 27px;
}

.student-hero > div > span,
.practice-identity > div > span,
.detail-card dd,
.contact-actions button,
.related-practice strong,
.card-note,
.next-action-card strong,
.checklist strong,
.compact-timeline strong {
  font-size: 12px;
}

.detail-card dt,
.detail-heading button,
.related-practice small,
.next-action-card small,
.checklist small,
.compact-timeline small,
.compact-timeline em {
  font-size: 10px;
}

.drawer-tabs button {
  font-size: 12px;
  height: 49px;
}

.form-grid label > span {
  font-size: 11px;
}

.form-grid input,
.form-grid select {
  font-size: 13px;
  height: 43px;
}

@media (max-width: 1250px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .lower-grid,
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .schedule-panel {
    min-height: 430px;
  }

  .calendar-layout {
    grid-template-columns: 1fr 330px;
  }

  .document-stats,
  .finance-overview,
  .report-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .finance-primary {
    border-radius: 11px 0 0 0;
  }

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

@media (max-width: 980px) {
  .sidebar {
    box-shadow: 18px 0 50px rgba(13, 27, 21, 0.25);
    transform: translateX(-105%);
    transition: transform 200ms ease;
    z-index: 110;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-scrim {
    background: rgba(10, 20, 16, 0.42);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 105;
  }

  .main-area {
    margin-left: 0;
  }

  .mobile-menu {
    background: transparent;
    color: var(--ink);
    display: block;
    font-size: 17px;
    margin-right: 12px;
  }

  .topbar {
    padding: 0 20px;
  }

  .global-search-wrap {
    margin-right: auto;
    width: min(60vw, 480px);
  }

  .page {
    padding: 24px 20px 40px;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

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

  .kanban-column {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 58px;
    padding: 0 14px;
  }

  .search-field kbd,
  .quick-button small {
    display: none;
  }

  .quick-button {
    padding: 0 10px;
  }

  .quick-button > span {
    display: none;
  }

  .notification-popover {
    position: fixed;
    right: 12px;
    top: 62px;
    width: calc(100vw - 24px);
  }

  .page {
    padding: 21px 14px 35px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .metric-grid,
  .list-summary,
  .document-stats,
  .finance-overview,
  .report-metrics,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .list-summary > div,
  .doc-stat,
  .finance-overview > div,
  .report-metrics > div {
    border-bottom: 1px solid var(--line-soft);
    border-right: 0;
  }

  .finance-primary {
    border-radius: 11px 11px 0 0;
  }

  .attention-row {
    grid-template-columns: 3px 32px 1fr 18px;
  }

  .attention-reason {
    display: none;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .search-field,
  .toolbar select {
    max-width: none;
    width: 100%;
  }

  .toolbar-count {
    margin-left: 0;
  }

  .week-days button {
    min-height: 60px;
  }

  .week-days span {
    font-size: 7px;
  }

  .week-days strong {
    font-size: 14px;
  }

  .week-heading > strong {
    font-size: 10px;
  }

  .detail-card dl,
  .checklist,
  .detail-split,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid label.full {
    grid-column: auto;
  }

  .practice-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .status-control,
  .status-control select {
    width: 100%;
  }

  .drawer-top {
    padding: 0 13px;
  }

  .drawer-top .secondary-button {
    display: none;
  }

  .drawer-body {
    padding: 14px;
  }

  .drawer-tabs {
    gap: 15px;
    overflow-x: auto;
    padding: 0 16px;
  }

  .next-action-card > div {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .next-action-card .primary-button {
    margin-left: 45px;
  }

  .bar-chart {
    gap: 4px;
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
