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

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.heading {
  font-family: var(--font-heading);
  margin: 0;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-muted {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.section {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Layout shell */

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

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 24px;
  text-decoration: none;
  color: inherit;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.sidebar__nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar__nav-item--active svg {
  opacity: 1;
}

.sidebar__nav-section {
  margin: 14px 0 4px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar__nav-section:first-child {
  margin-top: 0;
}

.sidebar__nav-item:hover {
  background: var(--secondary);
  color: var(--fg);
}

.sidebar__nav-item--active {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.sidebar__nav-item--disabled {
  opacity: 0.5;
  cursor: default;
}

.sidebar__footer {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

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

.topbar {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.topbar__title {
  font-family: var(--font-heading);
  font-size: 15px;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topbar__language {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.topbar__language label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar__language select {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.network-status {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.network-status--offline {
  color: var(--accent);
}

.low-bandwidth-toggle {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.low-bandwidth-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.mobile-nav-toggle__icon {
  display: grid;
  gap: 4px;
  width: 16px;
}

.mobile-nav-toggle__icon span {
  display: block;
  height: 1px;
  background: currentColor;
}

.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;
}

.page {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

.low-bandwidth * {
  animation: none !important;
  transition: none !important;
}

.low-bandwidth .sidebar__footer,
.low-bandwidth .text-muted {
  color: var(--muted);
}

.offline-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.offline-page__content {
  width: min(100%, 480px);
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.hero-panel h1 {
  max-width: 860px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.hero-panel__copy {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero-panel__note {
  margin-top: 10px;
  text-align: right;
}

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

.metric-card {
  min-height: 156px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 14px;
}

.workflow-card,
.attention-card,
.account-card {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading h2,
.attention-card h2,
.account-card h2 {
  margin: 0;
  font-size: 1.12rem;
}

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

.workflow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
}

.workflow-row:hover {
  border-color: var(--accent);
}

.workflow-row strong,
.workflow-row small {
  display: block;
}

.workflow-row small {
  max-width: 72ch;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.stacked-actions {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
}

.status-strip {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.status-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 520px);
  gap: 18px;
  align-items: stretch;
  min-height: calc(100vh - 108px);
}

.account-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.account-brand h1 {
  max-width: 680px;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
}

.account-brand p {
  max-width: 52ch;
  margin: 14px 0 0;
  color: var(--muted);
}

.account-brand__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-brand__checks span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
}

.account-card {
  align-self: center;
}

.account-card form {
  margin-top: 20px;
}

.field--checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field--checkbox input {
  width: auto;
}

.field--checkbox .field__label {
  margin: 0;
}

/* Card */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px 0;
}

.card__value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 4px 0;
  overflow-wrap: anywhere;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}

.btn--primary {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.btn--primary:hover {
  background: #d8d4cd;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--fg);
  font-weight: 500;
}

.btn--ghost:hover {
  border-color: var(--fg);
  background: var(--secondary);
}

.btn--link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  gap: 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn--link:hover {
  color: #e0ab1a;
  text-decoration: underline;
}

.btn--danger {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--red);
}

.btn[disabled],
.btn[disabled]:hover {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

.btn:focus-visible,
.sidebar__nav-item:focus-visible,
.account-row:focus-visible,
.settings-row:focus-visible,
.group-row:focus-visible,
.tabs__item:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Forms */

.field {
  display: block;
  margin-bottom: 16px;
}

.field__label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.field__help {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* Django's default form-error markup (`{{ field.errors }}`,
   `{{ form.non_field_errors }}`) renders as a bare, unstyled `<ul>` —
   without this it's plain body-colored text, easy to miss entirely. */
.errorlist {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.errorlist li {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.4;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--fg);
  outline: none;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Verification-code entry (2FA, phone verify, password reset) */

.code-input {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 18px;
}

/* Recovery codes grid */

.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.code-chip {
  display: block;
  text-align: center;
  padding: 9px 6px;
  border-radius: 4px;
  background: var(--secondary);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

/* Authenticator QR code — fixed white ground regardless of theme, since a
   dark background defeats real-world camera scanning. */

.qr-frame {
  display: inline-block;
  padding: 12px;
  background: #ffffff;
  border-radius: var(--radius);
  line-height: 0;
}

.qr-frame svg {
  display: block;
  width: 160px;
  height: 160px;
}

.key-chip {
  display: inline-block;
  margin: 2px 0;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--secondary);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* Centered single-action confirmation (sign out, destructive confirms) */

.confirm-card-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: 32px 0;
}

.confirm-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.confirm-card h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.confirm-card p {
  margin: 0 0 22px;
}

.confirm-card .btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Table */

.table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

.table thead th {
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
}

.table tbody td {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 13px 20px;
  font-size: 13px;
}

/* Status badge */

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge--success {
  background: rgba(74, 222, 128, 0.1);
  color: var(--green);
}

.badge--warning {
  background: rgba(200, 151, 10, 0.1);
  color: var(--accent);
}

.badge--neutral {
  background: var(--secondary);
  color: var(--muted);
}

.badge--error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Privacy chip */

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Status dot */

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot--success {
  background: var(--green);
}

.status-dot--warning {
  background: var(--accent);
}

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

.status-dot--neutral {
  background: var(--muted);
}

/* Progress bar */

.progress-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--secondary);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 99px;
  background: var(--fg);
}

.progress-bar--segmented {
  display: flex;
  height: 8px;
}

.progress-bar__segment {
  height: 100%;
}

.progress-bar__segment--success {
  background: var(--green);
}

.progress-bar__segment--error {
  background: var(--red);
}

.progress-bar__segment--neutral {
  background: var(--muted);
}

/* Avatar */

.avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar--primary {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: var(--bg);
  font-size: 13px;
}

.avatar--secondary {
  width: 32px;
  height: 32px;
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 11px;
  font-weight: 600;
}

/* Alert / notice banner */

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
}

.alert--warning {
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(200, 151, 10, 0.07);
  border: 1px solid rgba(200, 151, 10, 0.22);
}

.alert--neutral {
  padding: 12px 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
}

.alert--success {
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.24);
}

.alert--error {
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.24);
}

/* Modal overlay */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
}

/* Slide-in detail panel */

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 320px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  padding: 24px;
}

/* Tabs */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tabs__item {
  display: inline-block;
  flex-shrink: 0;
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.tabs__item:hover {
  color: var(--fg);
}

.tabs__item--active {
  border-bottom-color: var(--fg);
  font-weight: 600;
  color: var(--fg);
}

/* Filter pills */

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

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

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(82vw, 280px);
    transform: translateX(-100%);
    transition: transform 160ms ease-out;
    box-shadow: 16px 0 32px rgba(0, 0, 0, 0.3);
  }

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

  .app-shell.nav-open::after {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.65);
    content: "";
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .topbar {
    height: auto;
    min-height: 56px;
    gap: 12px;
    padding: 8px 16px;
  }

  .topbar__title {
    flex: 1;
    min-width: 0;
  }

  .topbar__tools {
    gap: 6px;
  }

  .network-status {
    font-size: 0;
  }

  .network-status::before {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    content: "";
  }

  .network-status--offline::before {
    background: var(--accent);
  }

  .low-bandwidth-toggle:not(.account-row) {
    max-width: 34px;
    overflow: hidden;
    padding: 6px;
    font-size: 0;
  }

  .low-bandwidth-toggle:not(.account-row)::before {
    content: "BW";
    font-family: var(--font-mono);
    font-size: 9px;
  }

  .topbar__language {
    max-width: 108px;
  }

  .topbar__language label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .topbar__language select {
    padding: 8px;
  }

  .page {
    padding: 20px 16px;
  }

  /* Only pages without a group sidebar get the fixed bottom-nav bar
     (see base.html) — reserve room for it so the last row of content
     isn't hidden behind it. */
  .page:has(~ .bottom-nav) {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .hero-panel,
  .dashboard-grid,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 20px;
  }

  .hero-panel__actions {
    justify-content: flex-start;
  }

  .hero-panel__note {
    text-align: left;
  }

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

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

  .account-layout {
    min-height: 0;
  }

  .account-brand {
    padding: 20px;
  }

  .card {
    padding: 16px;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
  }
}

.filter-pill--active {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

/* Recipient card (Rotation) */

.recipient-card {
  padding: 24px;
  background: rgba(200, 151, 10, 0.05);
  border: 1px solid rgba(200, 151, 10, 0.22);
  border-radius: var(--radius);
}

.recipient-card__top {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.recipient-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px;
}

.recipient-card__eyebrow--muted {
  color: var(--muted);
}

.recipient-card__name {
  font-size: 22px;
  margin: 0 0 3px;
}

.recipient-card__meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.recipient-card__readiness {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  margin: 0;
}

.recipient-card__foot {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(200, 151, 10, 0.18);
  font-size: 13px;
}

.recipient-card__foot span {
  color: var(--muted);
}

.recipient-card__foot strong {
  color: var(--fg);
}

.recipient-card__block-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(200, 151, 10, 0.08);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--accent);
}

/* Rotation timeline */

.rotation-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rotation-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rotation-row__dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--fg);
}

.rotation-row__dot--current {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.rotation-row__dot--received {
  background: var(--secondary);
}

.rotation-row__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}

.rotation-row__body--current {
  background: rgba(200, 151, 10, 0.05);
  border-color: rgba(200, 151, 10, 0.22);
}

.rotation-row__name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
}

.rotation-row__meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.rotation-row__amount {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .recipient-card__top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Role switcher */

.role-switcher {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.role-switcher__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px;
}

.role-switcher__option {
  padding: 5px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
}

.role-switcher__option--active-admin {
  background: var(--accent);
  color: var(--bg);
}

.role-switcher__option--active-member {
  background: var(--fg);
  color: var(--bg);
}

/* Group pill (sidebar, group-scoped rail) */

.group-pill {
  display: block;
  margin: 12px 12px 4px;
  padding: 10px 12px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.group-pill:hover {
  border-color: var(--fg);
}

.group-pill:hover .group-pill__back {
  color: var(--fg);
}

.group-pill__label {
  margin: 0 0 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.group-pill__back {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

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

.group-pill__name {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Full-bleed auth shell (login/signup split panel) */

.auth-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
}

.auth-brand {
  width: 480px;
  min-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 48px;
  background: var(--panel);
  border-right: 1px solid var(--border);
}

.auth-brand__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 26px;
}

.auth-brand__quote {
  max-width: 40ch;
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.25;
}

.auth-brand__lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.auth-form-panel__wrap {
  width: 100%;
  max-width: 400px;
}

.auth-form-panel h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 400;
}

.auth-tabs {
  display: flex;
  margin-bottom: 28px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}

.auth-tabs__item {
  flex: 1;
  padding: 8px 0;
  border-radius: 4px;
  border: none;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
}

.auth-tabs__item--active {
  background: var(--fg);
  color: var(--bg);
}

.auth-tabs__item--disabled {
  opacity: 0.5;
  cursor: default;
}

.auth-disclaimer {
  margin-top: 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider__line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider__text {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .auth-shell {
    flex-direction: column;
    min-height: 0;
  }

  .auth-brand {
    width: 100%;
    min-width: 0;
    padding: 28px 20px;
  }

  .auth-form-panel {
    padding: 28px 20px;
  }
}

/* Overview dashboard (group Overview page) */

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

.overview-header__eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.overview-header h1 {
  margin: 0 0 6px;
  font-size: 2.2rem;
}

.overview-header__meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.stat-card__sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.collection-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
  margin-top: 18px;
}

.collection-breakdown__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin: 0 auto 6px;
}

.collection-breakdown__label {
  margin: 0 0 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.collection-breakdown__value {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

.spotlight-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

.position-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.position-row--total {
  padding-top: 14px;
  border-bottom: none;
  font-weight: 600;
}

.formula-list {
  display: grid;
  gap: 10px;
}

.formula-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12.5px;
}

.formula-row:last-child {
  border-bottom: none;
}

.activity-list {
  display: grid;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 12px;
}

.activity-item__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.activity-item__body {
  flex: 1;
  min-width: 0;
}

.activity-item__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.activity-item__label {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 500;
}

.activity-item__time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
}

.activity-item__detail {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

/* Journal card (Ledger) */

.journal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
}

.journal-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.journal-card__meta {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.journal-lines {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6px;
}

.journal-lines th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.journal-lines td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.journal-lines tr:last-child td {
  border-bottom: none;
}

.correction-block {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.correction-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* Notification feed item */

.notif-item {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--card);
}

.notif-item--unread {
  background: var(--secondary);
  border-color: rgba(200, 151, 10, 0.3);
}

.notif-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--muted);
}

.notif-item__dot--critical {
  background: var(--red);
}

.notif-item__body {
  flex: 1;
  min-width: 0;
}

.notif-item__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.notif-item__title {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 600;
}

.notif-item__meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.notif-item__actions {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

/* Notification preference row and switch toggle */

.pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.pref-row:last-child {
  border-bottom: none;
}

.pref-row__label {
  font-size: 13px;
  margin: 0;
}

.pref-row__help {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch__track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.15s;
}

.switch input:checked ~ .switch__track {
  background: var(--accent);
}

.switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fg);
  transition: left 0.15s;
}

.switch input:checked ~ .switch__knob {
  left: 18px;
  background: var(--bg);
}

.switch--locked .switch__track,
.switch--locked input:checked ~ .switch__track {
  background: var(--secondary);
}

.switch--locked .switch__knob,
.switch--locked input:checked ~ .switch__knob {
  background: var(--muted);
}

/* Notification share text */

.share-box {
  padding: 16px 18px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .overview-header {
    align-items: flex-start;
  }

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

/* ---------------------------------------------------------------------
   Primary navigation — bottom tab bar (mobile) for the role-agnostic
   surfaces (Overview, Notifications, Account). A fixed, always-visible,
   labeled tab bar reads more clearly than a hidden hamburger drawer for
   a low-vision or first-time smartphone user; it mirrors the tab bar
   pattern already familiar from WhatsApp. Group-scoped pages keep the
   existing sidebar + hamburger drawer (`.sidebar`, `.mobile-nav-toggle`)
   unchanged, since their sub-navigation doesn't fit a 3-item tab bar.
   --------------------------------------------------------------------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
}

.bottom-nav__item--active {
  color: var(--fg);
}

.bottom-nav__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav__badge {
  position: absolute;
  top: 6px;
  right: 30%;
}

@media (min-width: 721px) {
  .bottom-nav {
    display: none;
  }
}

.sidebar__nav-item-badge {
  margin-left: auto;
}

/* Small nav-sized avatar, reusing the existing avatar shape/weight but
   at bottom-nav / sidebar icon scale. */
.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------
   Overview — role-agnostic "my groups" list. Larger type and taller
   tap targets than the rest of the app is deliberate: this is the page
   a first-time, low-vision, or low-literacy tester lands on first.
   --------------------------------------------------------------------- */

.overview-greeting {
  margin-bottom: 24px;
}

.overview-greeting h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.overview-greeting p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-height: 72px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
}

.group-row:hover {
  border-color: var(--muted);
}

.group-row__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--bg);
}

.group-row__avatar--a { background: var(--accent); }
.group-row__avatar--b { background: #4a6fa5; }
.group-row__avatar--c { background: #5a8f6b; }
.group-row__avatar--d { background: var(--secondary); color: var(--muted); border: 1px solid var(--border); }

.group-row__body {
  flex: 1;
  min-width: 0;
}

.group-row__name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-row__status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 14px;
  color: var(--fg);
}

.group-row__status--muted {
  color: var(--muted);
}

.group-row__chevron {
  flex-shrink: 0;
  color: var(--muted);
}

.add-group-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.overview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 8px 0;
}

.overview-empty__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--muted);
}

.overview-empty h1 {
  font-size: 21px;
  margin-bottom: 12px;
}

.overview-empty p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 0 26px;
}

.overview-empty p strong {
  color: var(--fg);
}

/* ---------------------------------------------------------------------
   Account — folds identity, security, and app settings into one page,
   reached from the same nav destination on every screen size.
   --------------------------------------------------------------------- */

.account-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.account-header__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.account-header h1 {
  font-size: 20px;
  margin-bottom: 3px;
}

.account-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.account-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  min-height: 60px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  color: inherit;
  text-decoration: none;
  width: 100%;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

a.account-row:hover,
button.account-row:hover {
  background: var(--secondary);
  border-color: var(--fg);
}

.account-row__label {
  flex: 1;
  text-align: left;
}

.account-row__sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
}

.account-row__value {
  font-size: 13px;
  color: var(--muted);
}

.account-row__value--on {
  display: none;
}

.account-row[aria-pressed="true"] .account-row__value--off {
  display: none;
}

.account-row[aria-pressed="true"] .account-row__value--on {
  display: inline;
}

.account-row select.account-row__select {
  width: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.account-row--signout {
  justify-content: center;
  color: var(--red);
  font-weight: 600;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Settings blocks — grouped rows inside one shared card, used by the
   per-group Settings hub. */

.settings-block {
  margin-bottom: 24px;
}

.settings-block__head {
  margin-bottom: 10px;
}

.settings-block__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.settings-row:last-child {
  border-bottom: none;
}

a.settings-row:hover {
  background: var(--secondary);
}

.settings-row__label {
  font-size: 13.5px;
  font-weight: 500;
  margin: 0;
}

.settings-row__sub {
  font-size: 11.5px;
  color: var(--muted);
  margin: 2px 0 0;
}

.settings-row__value {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.settings-row__value--ok {
  color: var(--green);
}

/* Search box */

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
}

.search-box svg {
  flex-shrink: 0;
  color: var(--muted);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
}

.search-box input::placeholder {
  color: var(--muted);
}

/* "You" tag */

.you-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* Member list row */

.member-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.member-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
}

.member-row:hover {
  border-color: var(--muted);
}

.member-row__body {
  flex: 1;
  min-width: 0;
}

.member-row__name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.member-row__meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.member-row__chevron {
  flex-shrink: 0;
  color: var(--muted);
}

/* Member detail header */

.detail-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.detail-header h1 {
  font-size: 21px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Label/value info row */

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row__label {
  color: var(--muted);
}

.info-row__value {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Stacked action list */

.action-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Compact table for inside a card (e.g. a member's contribution history) */

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.history-table th {
  text-align: left;
  padding: 8px 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.history-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.history-table tr:last-child td {
  border-bottom: none;
}

/* Proposal list row (Governance) */

.proposal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proposal-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
}

.proposal-row:hover {
  border-color: var(--muted);
}

.proposal-row__body {
  flex: 1;
  min-width: 0;
}

.proposal-row__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
}

.proposal-row__meta {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.proposal-row__chevron {
  flex-shrink: 0;
  color: var(--muted);
}

/* Vote progress legend */

.vote-legend {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.vote-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.vote-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Two-figure comparison row (e.g. yes-votes vs. threshold) */

.gauge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
  gap: 12px;
}

.gauge-row__block--right {
  text-align: right;
}

.gauge-row__label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}

.gauge-row__value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  margin: 0;
}

/* Vote choice buttons */

.vote-choices {
  display: flex;
  gap: 10px;
}

.vote-choice {
  flex: 1;
  padding: 13px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--secondary);
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-body);
}

.vote-choice:hover {
  border-color: var(--muted);
}
