:root {
  color-scheme: light;
  --ink: #172522;
  --muted: #6f7c78;
  --muted-2: #95a09c;
  --paper: #f4f2ec;
  --surface: #fffefa;
  --surface-2: #edf4f0;
  --line: #d8ddd7;
  --green: #08453f;
  --green-2: #0b6d63;
  --green-3: #dcefe8;
  --yellow: #f3bf4e;
  --yellow-soft: #fff0c7;
  --red: #e45e50;
  --red-soft: #fbe0dc;
  --blue: #4a8ba0;
  --blue-soft: #dcecf1;
  --shadow: 0 18px 48px rgba(27, 54, 48, 0.09);
  --sidebar: 15.5rem;
  --radius: 1.1rem;
  --radius-sm: 0.65rem;
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 20rem;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.875rem;
  line-height: 1.45;
}

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

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

a {
  color: var(--green-2);
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

:focus-visible {
  outline: 3px solid rgba(11, 109, 99, 0.36);
  outline-offset: 2px;
}

button:active,
.button:active {
  transform: translateY(1px) scale(0.99);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: white;
  background: var(--green);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__mark .icon,
.empty-state__mark .icon {
  fill: currentColor;
  stroke: none;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 12;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  padding: 1.5rem 1.1rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  width: fit-content;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 760;
  letter-spacing: -0.04em;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  color: var(--green);
  background: var(--yellow);
  border-radius: 0.7rem;
}

.brand__mark .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.nav {
  display: grid;
  gap: 0.25rem;
  margin-top: 2.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.7rem;
  padding: 0.7rem 0.82rem;
  color: #394844;
  border-radius: 0.72rem;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-link:hover {
  color: var(--green);
  background: #f1f5f2;
  transform: translateX(2px);
}

.nav-link--active {
  color: var(--green-2);
  background: #d9ece5;
  font-weight: 700;
}

.sidebar__footer {
  display: grid;
  gap: 0.9rem;
  margin-top: auto;
}

.environment {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.72rem;
  color: var(--green);
  background: var(--surface-2);
  border-radius: 0.65rem;
  font-size: 0.78rem;
}

.environment span,
.dot,
.badge__dot {
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  background: #3d9b73;
  border-radius: 50%;
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.admin-chip__avatar {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  place-items: center;
  color: white;
  background: var(--green-2);
  border-radius: 0.7rem;
  font-size: 0.72rem;
  font-weight: 750;
}

.admin-chip strong,
.admin-chip small {
  display: block;
}

.admin-chip strong {
  font-size: 0.8rem;
}

.admin-chip small {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.main {
  display: grid;
  gap: 1rem;
  min-height: 100dvh;
  margin-left: var(--sidebar);
  padding: 1.5rem 1.8rem 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 5.5rem;
  padding: 1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topbar__title {
  min-width: 14rem;
  margin-right: auto;
}

.topbar__title span,
.eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(20rem, 25vw);
  min-width: 12rem;
  padding: 0.6rem 0.75rem;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.72rem;
}

.global-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.icon-button,
.menu-toggle {
  display: inline-grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  color: var(--green-2);
  background: var(--green-3);
  border: 0;
  border-radius: 0.72rem;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.icon-button:hover,
.menu-toggle:hover {
  background: #c8e7dc;
}

.menu-toggle {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.55rem;
  padding: 0.62rem 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
  color: var(--green);
  border-color: #abc8bf;
}

.button--primary {
  color: white;
  background: var(--green-2);
  border-color: var(--green-2);
}

.button--primary:hover {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.button--yellow {
  color: #2c2a20;
  background: var(--yellow);
  border-color: var(--yellow);
}

.button--yellow:hover {
  color: #14130f;
  background: #eab036;
  border-color: #eab036;
}

.button--danger {
  color: white;
  background: var(--red);
  border-color: var(--red);
}

.button--danger:hover {
  color: white;
  background: #c94e43;
  border-color: #c94e43;
}

.button--ghost {
  background: transparent;
}

.button--soft {
  color: var(--green);
  background: var(--green-3);
  border-color: transparent;
}

.button--wide {
  width: 100%;
}

.button[disabled],
.button[aria-busy="true"] {
  opacity: 0.6;
  cursor: wait;
}

.text-button {
  display: block;
  margin: 0.75rem auto 0;
  padding: 0.35rem;
  color: var(--green-2);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.flash {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.78rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
}

.flash--success {
  color: #1b684e;
  background: var(--green-3);
}

.flash--error {
  color: #9b382f;
  background: var(--red-soft);
}

.panel,
.card,
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel,
.card {
  padding: 1.2rem;
}

.panel h2,
.card h2,
.section-title {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 570;
  letter-spacing: -0.02em;
}

.panel__header,
.section-header,
.table-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel__header {
  margin-bottom: 1rem;
}

.panel__meta {
  color: var(--muted);
  font-size: 0.72rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.grid--aside {
  grid-template-columns: minmax(0, 2fr) minmax(17rem, 0.9fr);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric {
  min-height: 7.2rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.metric__label,
.metric__meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.metric__label {
  text-transform: lowercase;
}

.metric__value {
  display: block;
  margin: 0.75rem 0 0.45rem;
  color: var(--green);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1.8rem;
  font-weight: 620;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric--yellow {
  background: var(--yellow-soft);
}

.metric--red {
  background: var(--red-soft);
}

.metric--blue {
  background: var(--blue-soft);
}

.hero {
  padding: 1.35rem;
  color: white;
  background: var(--green);
  border-radius: 1.25rem;
  overflow: hidden;
}

.hero__top,
.hero__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.hero h2 {
  margin: 0.4rem 0 0;
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  font-weight: 480;
  letter-spacing: -0.035em;
}

.hero p {
  margin: 0.4rem 0 0;
  color: #c6ddd7;
}

.hero .eyebrow {
  color: var(--yellow);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 1.3rem;
}

.hero__stat strong,
.mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.hero__stat strong {
  display: block;
  font-size: 1.25rem;
}

.hero__stat small {
  color: #bed5cf;
  font-size: 0.64rem;
}

.lifecycle {
  display: grid;
  grid-template-columns: repeat(6, minmax(7rem, 1fr));
  gap: 0.45rem;
  margin-top: 1rem;
  overflow-x: auto;
}

.lifecycle__step {
  min-width: 7rem;
  padding: 0.72rem;
  color: #c6ddd7;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0.68rem;
}

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

.lifecycle__step strong {
  color: white;
  font-size: 0.71rem;
}

.lifecycle__step small {
  margin-top: 0.22rem;
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
}

.lifecycle__step--current {
  color: #554214;
  background: var(--yellow);
  border-color: var(--yellow);
}

.lifecycle__step--current strong {
  color: #2c281d;
}

.toolbar,
.filters,
.tabs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: space-between;
}

.filters form,
.filter-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.field,
.filter-field,
.auth-card label {
  display: grid;
  gap: 0.38rem;
  color: #33423e;
  font-size: 0.74rem;
  font-weight: 580;
}

.field input,
.field select,
.field textarea,
.filter-field input,
.filter-field select,
.auth-card input,
.confirm-dialog textarea {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.68rem 0.78rem;
  color: var(--ink);
  background: #f6f4ef;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  outline: 0;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.field textarea,
.confirm-dialog textarea {
  min-height: 5rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-field input:focus,
.filter-field select:focus,
.auth-card input:focus,
.confirm-dialog textarea:focus {
  background: white;
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(11, 109, 99, 0.12);
}

.field small,
.form-help {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 400;
}

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

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

.field--full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.filter-field select,
.filter-field input {
  min-width: 9rem;
  min-height: 2.45rem;
  padding-block: 0.5rem;
  background: var(--surface);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.48rem 0.72rem;
  color: #45534f;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2rem;
  font-size: 0.7rem;
}

.tabs {
  padding: 0.38rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.tab {
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  border-radius: 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
}

.tab:hover,
.tab--active {
  color: white;
  background: var(--green-2);
}

.table-card {
  overflow: hidden;
}

.table-card__header,
.table-card__footer {
  min-height: 3.2rem;
  padding: 0.8rem 1rem;
}

.table-card__header {
  border-bottom: 1px solid var(--line);
}

.table-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  background: #eaf3ef;
  font-size: 0.65rem;
  font-weight: 650;
  white-space: nowrap;
}

tbody tr {
  transition: background-color 160ms ease;
}

tbody tr:hover {
  background: #f8faf8;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.63rem;
}

.table-link {
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  max-width: 12rem;
  padding: 0.38rem 0.58rem;
  color: #56645f;
  background: var(--surface-2);
  border-radius: 2rem;
  font-size: 0.62rem;
  white-space: nowrap;
}

.badge__dot {
  background: #7f8e89;
}

.badge--registration-open,
.badge--confirmed,
.badge--present,
.badge--sent,
.badge--completed,
.badge--active,
.badge--rejoined {
  color: #276b54;
  background: var(--green-3);
}

.badge--registration-open .badge__dot,
.badge--confirmed .badge__dot,
.badge--present .badge__dot,
.badge--sent .badge__dot,
.badge--completed .badge__dot,
.badge--active .badge__dot,
.badge--rejoined .badge__dot {
  background: #3b9c72;
}

.badge--confirmation,
.badge--selected,
.badge--retry,
.badge--waitlisted,
.badge--open {
  color: #725517;
  background: var(--yellow-soft);
}

.badge--confirmation .badge__dot,
.badge--selected .badge__dot,
.badge--retry .badge__dot,
.badge--waitlisted .badge__dot,
.badge--open .badge__dot {
  background: #eab441;
}

.badge--cancelled,
.badge--removed,
.badge--expired,
.badge--ambiguous,
.badge--failed,
.badge--absent,
.badge--rejected,
.badge--left {
  color: #9b4037;
  background: var(--red-soft);
}

.badge--cancelled .badge__dot,
.badge--removed .badge__dot,
.badge--expired .badge__dot,
.badge--ambiguous .badge__dot,
.badge--failed .badge__dot,
.badge--absent .badge__dot,
.badge--rejected .badge__dot,
.badge--left .badge__dot {
  background: var(--red);
}

.badge--finished,
.badge--sending,
.badge--profile-changed {
  color: #3d7180;
  background: var(--blue-soft);
}

.badge--finished .badge__dot,
.badge--sending .badge__dot,
.badge--profile-changed .badge__dot {
  background: var(--blue);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.page-button {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

.page-button--disabled {
  opacity: 0.28;
}

.attention-list,
.health-list,
.timeline,
.detail-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attention-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.72rem;
  align-items: center;
  padding: 0.75rem;
  color: var(--ink);
  background: var(--yellow-soft);
  border-radius: 0.72rem;
}

.attention-item--red {
  background: var(--red-soft);
}

.attention-item--blue {
  background: var(--blue-soft);
}

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

.attention-item small {
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.health-row,
.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
}

.health-row strong,
.detail-row dt {
  font-size: 0.72rem;
  font-weight: 650;
}

.health-row span,
.detail-row dd {
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  text-align: right;
}

.progress {
  display: block;
  width: 100%;
  height: 0.48rem;
  border: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  appearance: none;
}

.progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.15);
  border-radius: inherit;
}

.progress::-webkit-progress-value {
  background: var(--yellow);
  border-radius: inherit;
}

.progress::-moz-progress-bar {
  background: var(--yellow);
  border-radius: inherit;
}

.attendance-form select {
  min-width: 8.5rem;
}

.attendance-note {
  display: flex;
  min-width: 18rem;
  gap: 0.45rem;
}

.attendance-note input {
  min-width: 10rem;
}

.empty-state {
  display: grid;
  min-height: 20rem;
  place-items: center;
  align-content: center;
  padding: 3rem 1rem;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #bdc7c1;
  border-radius: var(--radius);
}

.empty-state__mark {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  color: var(--green);
  background: var(--yellow);
  border-radius: 0.9rem;
}

.empty-state h2 {
  margin: 1rem 0 0;
  font-size: 1.25rem;
}

.empty-state p {
  max-width: 34rem;
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.25rem;
  color: white;
  background: var(--green);
  border-radius: 1.2rem;
}

.profile-avatar {
  display: grid;
  width: 4rem;
  height: 4rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green);
  background: var(--yellow);
  border-radius: 1.15rem;
  font-size: 1.2rem;
  font-weight: 750;
}

.profile-hero__identity {
  margin-right: auto;
}

.profile-hero h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 520;
}

.profile-hero p {
  margin: 0.25rem 0 0;
  color: #c5dcd6;
  font-family: ui-monospace, monospace;
  font-size: 0.67rem;
}

.profile-hero__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-hero .button--soft {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

.timeline-item {
  padding-left: 1rem;
  border-left: 2px solid var(--green-3);
}

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

.timeline-item strong {
  color: var(--green-2);
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
}

.timeline-item small {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.62rem;
}

.json-view {
  max-height: 28rem;
  margin: 0;
  padding: 1rem;
  overflow: auto;
  color: #d9ece5;
  background: #102d29;
  border-radius: 0.72rem;
  font-family: ui-monospace, monospace;
  font-size: 0.67rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.confirm-dialog {
  width: min(30rem, calc(100vw - 2rem));
  padding: 0;
  background: transparent;
  border: 0;
}

.confirm-dialog::backdrop {
  background: rgba(9, 27, 24, 0.6);
  backdrop-filter: blur(3px);
}

.confirm-dialog__card {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.confirm-dialog__icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: #a53d34;
  background: var(--red-soft);
  border-radius: 0.7rem;
}

.confirm-dialog h2 {
  margin: 1rem 0 0;
  font-size: 1.25rem;
}

.confirm-dialog p {
  margin: 0.45rem 0 1rem;
  color: var(--muted);
}

.confirm-dialog__reason {
  display: grid;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 650;
}

.confirm-dialog__reason small {
  color: var(--muted);
  font-weight: 400;
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}

.auth-page {
  min-height: 100dvh;
  background: var(--paper);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(30rem, 1.25fr) minmax(25rem, 0.95fr);
  min-height: 100dvh;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
  padding: clamp(2.5rem, 5vw, 4.5rem);
  color: white;
  background: var(--green);
}

.brand--light {
  color: white;
}

.brand--light:hover {
  color: white;
}

.auth-hero {
  max-width: 39rem;
}

.auth-hero > span {
  color: var(--yellow);
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-hero h1 {
  margin: 1.2rem 0 1rem;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  font-weight: 430;
  letter-spacing: -0.05em;
  line-height: 1.02;
  text-wrap: balance;
}

.auth-hero p {
  max-width: 35rem;
  color: #c5dcd6;
  font-size: 1rem;
  line-height: 1.65;
}

.auth-proofs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  max-width: 38rem;
}

.auth-proofs article {
  display: grid;
  gap: 0.48rem;
}

.auth-proofs .icon {
  color: var(--yellow);
}

.auth-proofs strong {
  font-size: 0.78rem;
  font-weight: 520;
}

.auth-proofs small {
  color: #a9c6bf;
  font-size: 0.64rem;
  line-height: 1.5;
}

.auth-form-area {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 2rem;
}

.auth-card {
  width: min(100%, 28.5rem);
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.auth-card__mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  color: var(--green-2);
  background: var(--green-3);
  border-radius: 0.8rem;
}

.auth-card h2 {
  margin: 1.25rem 0 0;
  font-size: 1.55rem;
  font-weight: 520;
  letter-spacing: -0.03em;
}

.auth-card > p {
  margin: 0.7rem 0 1.1rem;
  color: var(--muted);
}

.auth-card form {
  display: grid;
  gap: 0.85rem;
}

.otp-input {
  font-family: ui-monospace, monospace !important;
  font-size: 1.35rem !important;
  font-weight: 650;
  letter-spacing: 0.35em;
  text-align: center;
}

.auth-message {
  margin-bottom: 0.8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.72rem;
}

.auth-message--error {
  color: #9b382f;
  background: var(--red-soft);
}

.auth-message--success {
  color: #24654e;
  background: var(--green-3);
}

.auth-session-note {
  margin: 1rem 0 !important;
  font-family: ui-monospace, monospace;
  font-size: 0.64rem;
}

.auth-states {
  display: grid;
  gap: 0.45rem;
}

.auth-states > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.55rem;
  padding: 0.6rem 0.7rem;
  background: var(--surface-2);
  border-radius: 0.55rem;
}

.auth-states .dot {
  grid-row: 1 / 3;
  align-self: center;
}

.dot--red {
  background: var(--red);
}

.dot--yellow {
  background: var(--yellow);
}

.dot--gray {
  background: #7e8a87;
}

.auth-states strong {
  font-size: 0.68rem;
}

.auth-states small {
  color: var(--muted);
  font-size: 0.6rem;
}

.error-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 2rem;
}

.error-page main {
  max-width: 32rem;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.error-page main > span {
  display: grid;
  width: 3rem;
  height: 3rem;
  margin: auto;
  place-items: center;
  color: var(--green);
  background: var(--green-3);
  border-radius: 0.8rem;
}

.error-page h1 {
  margin: 1rem 0 0.4rem;
}

.error-page p {
  margin: 0 0 1rem;
  color: var(--muted);
}

@media (max-width: 76rem) {
  :root {
    --sidebar: 13.5rem;
  }

  .main {
    padding-inline: 1rem;
  }

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

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

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

  .topbar__tools .button span {
    display: none;
  }
}

@media (max-width: 58rem) {
  .sidebar {
    width: min(19rem, 86vw);
    transform: translateX(-105%);
    box-shadow: var(--shadow);
    transition: transform 220ms ease;
  }

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

  .main {
    margin-left: 0;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .global-search {
    display: none;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: auto;
    padding: 2rem;
  }

  .auth-hero {
    margin: 5rem 0;
  }

  .auth-hero h1 {
    font-size: clamp(2.5rem, 11vw, 4rem);
  }

  .auth-form-area {
    min-height: auto;
    padding: 3rem 1rem;
  }

  .grid--2,
  .grid--3,
  .form-grid,
  .form-grid--3 {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-hero__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 38rem) {
  .main {
    padding: 0.65rem;
  }

  .topbar {
    min-height: 4.5rem;
    padding: 0.8rem;
  }

  .topbar__title {
    min-width: 0;
  }

  .topbar__title span {
    display: none;
  }

  .topbar h1 {
    font-size: 1.35rem;
  }

  .topbar__tools > .button {
    display: none;
  }

  .metrics,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .hero__top,
  .hero__bottom,
  .toolbar,
  .table-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-proofs {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 1.2rem;
  }
}

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