/*
 * Web cabinet styles — the visual language of the SquadWay prototype (W-* screens):
 * Onest for the interface, Unbounded for headings, warm neutral ground, clay accent.
 * Plain CSS with custom properties and nesting; no framework.
 */

:root {
  --ground: #F3F1EC;
  --surface: #FFFFFF;
  --surface-subtle: #F7F5F1;
  --segmented: #E9E5DD;
  --line: #E3DFD7;
  --line-strong: #D9D4CA;
  --line-soft: #EFEBE4;
  --ink: #15171A;
  --ink-2: #3F434A;
  --ink-3: #555B63;
  --muted: #6B7079;
  --accent: #C2410C;
  --accent-soft: #FBE7DC;
  --accent-text: #9A3412;
  --danger: #B42318;
  --danger-soft: #FBE4E1;
  --danger-text: #7F1D1D;
  --success-soft: #DDF0E4;
  --success-text: #1C6B3E;
  --info-soft: #E3E9FB;
  --info-text: #1E3A8A;
  --warning-soft: #FBEFD5;
  --warning-text: #92400E;
  --night: #15171A;
  --night-2: #23272C;
  --night-muted: #B7BBC2;
  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-pop: 0 12px 32px rgba(21, 23, 26, 0.18);
  --focus: 0 0 0 3px rgba(194, 65, 12, 0.35);
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-ui);
}

h1, h2, h3 { margin: 0; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--accent); }

:focus-visible { outline: none; box-shadow: var(--focus); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon { flex-shrink: 0; }

.muted { color: var(--muted); }
.prewrap { margin: 0; white-space: pre-line; }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--tight { gap: 4px; }
.stack--sm { gap: 8px; }
.stack--lg { gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--tight { gap: 8px; }
.row--top { align-items: flex-start; }
.spacer { margin-left: auto; }

/* ---------- buttons ---------- */

.btn {
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 600 14px var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);

  &:hover { background: var(--surface-subtle); }
  &[disabled], &[aria-disabled="true"] { opacity: 0.5; cursor: default; }
}

.btn--primary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; &:hover { background: #2B2E33; } }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; &:hover { background: #962018; } }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-3); &:hover { background: var(--segmented); } }
.btn--link { background: none; border: 0; height: auto; padding: 0; color: var(--accent); &:hover { background: none; text-decoration: underline; } }
.btn--lg { height: 44px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }

.button-to { display: inline; }
form.button_to { display: inline-flex; }

/* ---------- forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field__label { font-size: 13px; font-weight: 500; color: var(--ink-3); }

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

.field__error { font-size: 13px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 400 15px var(--font-ui);

  &:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
  &[aria-invalid="true"] { border-color: var(--danger); }
}

.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }

.input--code {
  height: 56px;
  font: 600 28px var(--font-ui);
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;

  & input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex-shrink: 0; }
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > .field--wide { grid-column: 1 / -1; }

.form-errors {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger-text);
  font-size: 14px;

  & ul { margin: 6px 0 0; padding-left: 18px; }
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);

  &::before, &::after { content: ""; flex: 1; height: 1px; background: var(--line); }
}

/* ---------- segmented control, chips, badges ---------- */

.segmented {
  display: inline-grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--segmented);

  & > * {
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: var(--ink-3);
    font: 600 14px var(--font-ui);
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    cursor: pointer;
  }

  & > [aria-current="page"], & > [aria-pressed="true"], & > :has(input:checked) {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(21, 23, 26, 0.08);
  }

  & input { position: absolute; opacity: 0; pointer-events: none; }
  & .count { color: var(--muted); }
}

.segmented--lg > * { height: 36px; }

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

.chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px var(--font-ui);
  text-decoration: none;
  cursor: pointer;

  &[aria-pressed="true"], &[aria-current="true"], &:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
  & input { position: absolute; opacity: 0; pointer-events: none; }
}

.badge {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--segmented);
  color: var(--ink-2);
}

.badge--success { background: var(--success-soft); color: var(--success-text); }
.badge--info { background: var(--info-soft); color: var(--info-text); }
.badge--warning { background: var(--warning-soft); color: var(--warning-text); }
.badge--danger { background: var(--danger-soft); color: var(--danger-text); }
.badge--accent { background: var(--accent-soft); color: var(--accent-text); }

.tag {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--ink);
  color: #FFFFFF;
  font: 600 14px var(--font-ui);

  & img { width: 100%; height: 100%; object-fit: cover; }
}

.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 64px; height: 64px; font-size: 20px; }
.avatar--soft { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- switch ---------- */

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;

  & input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }

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

  & .switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(21, 23, 26, 0.2);
    transition: left 0.15s;
  }

  & input:checked + .switch__track { background: var(--ink); }
  & input:checked + .switch__track::after { left: 21px; }
  & input:focus-visible + .switch__track { box-shadow: var(--focus); }
  & input:disabled { cursor: default; }
  & input:disabled + .switch__track { opacity: 0.5; }
}

/* ---------- cards, lists ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.card--flush { padding: 0; gap: 0; overflow: hidden; }

.card__title { font-size: 17px; font-weight: 600; }
.stat { margin: 0; font: 600 40px/1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card__header { display: flex; align-items: center; gap: 12px; }

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.list { display: flex; flex-direction: column; }

.list__row {
  min-height: 60px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;

  &:last-child { border-bottom: 0; }
}

a.list__row:hover { background: var(--surface-subtle); }

.list__head {
  min-height: 44px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.clients-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 140px 120px; }

.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__meta { font-size: 13px; color: var(--muted); }

.empty {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--ink-3);

  & .icon { color: var(--muted); }
}

.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; white-space: pre-line; }

/* ---------- flash ---------- */

.flash {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 60;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(21, 23, 26, 0.24);
  animation: flash-in 0.22s ease both, flash-out 0.3s ease 5s forwards;
}

.flash--alert { background: var(--danger); }

@keyframes flash-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes flash-out { to { opacity: 0; visibility: hidden; } }

/* ---------- cabinet shell ---------- */

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

.sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #FFFFFF;
}

.brand__name { font: 700 17px var(--font-display); letter-spacing: -0.01em; }

.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-section__title { padding: 0 12px 6px; }

.nav-link {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font: 500 14px var(--font-ui);
  text-decoration: none;

  &:hover { background: var(--surface-subtle); }
  &[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
  & .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
}

.sidebar__footer { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

.account {
  border-top: 1px solid var(--line-soft);
  padding: 12px 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.account__name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

.topbar {
  min-height: 72px;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--ground);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar__title { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.topbar__title h1 { font-size: 22px; }

.content { padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 24px; }

.columns { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }

.hero {
  padding: 24px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--night);
  color: #FFFFFF;

  & .muted { color: var(--night-muted); }
}

.hero__title { font: 600 24px/1.3 var(--font-display); letter-spacing: -0.01em; }

.action-tile {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;

  &:hover { border-color: var(--line-strong); background: var(--surface-subtle); }
}

.action-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ---------- auth & onboarding ---------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 600px) minmax(0, 1fr); }

.auth__aside {
  padding: 48px;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: #FFFFFF;

  & .brand { color: #FFFFFF; padding: 0; }
}

.auth__pitch { margin: auto 0; display: flex; flex-direction: column; gap: 40px; }
.auth__headline { font: 600 36px/1.15 var(--font-display); letter-spacing: -0.01em; max-width: 460px; }

.features { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 24px; }

.feature { display: flex; align-items: flex-start; gap: 16px; }

.feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--night-2);
  color: #F9844A;
}

.feature__title { font-size: 16px; font-weight: 600; }
.feature__text { font-size: 14px; color: var(--night-muted); }

.auth__footnote { margin: 0; font-size: 13px; color: #9097A1; }

.auth__main { padding: 48px; display: flex; align-items: center; justify-content: center; }
.auth__form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.auth__title { font: 600 28px/1.2 var(--font-display); letter-spacing: -0.01em; }

.onboarding { min-height: 100vh; display: flex; flex-direction: column; }

.onboarding__header {
  height: 72px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.onboarding__header > :last-child { justify-self: end; }
.onboarding__main { flex: 1; padding: 40px 32px 64px; display: flex; justify-content: center; }
.onboarding__body { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 24px; }
.onboarding__body--narrow { max-width: 480px; }
.onboarding__title { font: 600 28px/1.2 var(--font-display); letter-spacing: -0.01em; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.choice {
  position: relative;
  padding: 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  cursor: pointer;

  &:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
  & input { position: absolute; opacity: 0; pointer-events: none; }
  & .choice__title { font-weight: 600; font-size: 16px; }
  & .choice__text { font-size: 14px; color: var(--ink-3); }
}

/* ---------- settings ---------- */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }

.tabs > a {
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;

  &[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
}

.module-row {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;

  &:last-child { border-bottom: 0; }
}

.module-row__name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.module-row__text { font-size: 14px; color: var(--ink-3); }
.module-row__deps { font-size: 13px; color: var(--muted); }

.notice {
  padding: 14px 16px;
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--warning-soft);
  color: var(--warning-text);
  font-size: 14px;
}

.notice--info { background: var(--info-soft); color: var(--info-text); }

/* ---------- invitation ---------- */

.invite-code {
  font: 600 24px var(--font-ui);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.qr { width: 176px; height: 176px; padding: 8px; border-radius: var(--radius); background: #FFFFFF; border: 1px solid var(--line); flex-shrink: 0; }

.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-size: 13px; color: var(--ink-3); }

/* ---------- modal ---------- */

.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);

  &::backdrop { background: rgba(21, 23, 26, 0.45); }
}

.modal__header { padding: 20px 24px 0; display: flex; align-items: center; gap: 12px; }
.modal__heading { margin-right: auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.modal__title { font: 600 20px var(--font-display); letter-spacing: -0.01em; }

/* A side panel: the log of a workout (W-Client-Log). */
.modal--drawer {
  width: min(600px, 100vw);
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  border-radius: 0;
}
/* A panel under the bell: the notification centre (W-Notifications). */
.modal--panel {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 96px);
  margin: 72px 32px auto auto;

  @media (max-width: 640px) { margin: 72px auto auto; }
}
.modal__body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal__footer { padding: 0 24px 24px; display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- placeholder pages ---------- */

.placeholder {
  max-width: 560px;
  margin: 48px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ---------- smaller screens (NFR-12: the cabinet works from 1024 px; nothing breaks below) ---------- */

@media (max-width: 1100px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .clients-grid { grid-template-columns: minmax(0, 1fr) 120px; }
  .clients-grid > :nth-child(2), .clients-grid > :nth-child(3) { display: none; }
}

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { position: static; width: auto; height: auto; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__aside { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dl { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Charts drawn on the server (ChartsHelper). */
.chart { width: 100%; height: auto; display: block; }
.chart__grid { stroke: var(--line); stroke-dasharray: 4 4; }
.chart__axis { fill: var(--muted); font: 12px var(--font-ui); }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart__dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.chart__dot--last { fill: var(--accent); }

/* ---------- notifications (W-Notifications, W-Settings-Notifications) ---------- */

.bell { position: relative; }
.bell--unread::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid var(--ground);
  background: var(--accent);
}

.notifications__filter { display: grid; }
.notifications__day { display: flex; flex-direction: column; gap: 4px; }
.notifications__settings { align-self: center; display: inline-flex; align-items: center; gap: 8px; }

.notification {
  margin: 0 -8px;
  padding: 8px;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  color: var(--ink-3);
  text-decoration: none;

  &:hover { background: var(--surface-subtle); }
  &:focus-visible { box-shadow: var(--focus); outline: none; }
}
.notification--unread { color: var(--ink); }
.notification__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.notification__title { font-weight: 500; }
.notification--unread .notification__title { font-weight: 600; }
.notification__body { color: var(--muted); font-size: 13px; }
.notification__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.notification__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); }

.notification-settings__intro { padding: 20px 20px 12px; display: flex; flex-direction: column; gap: 4px; & p { margin: 0; } }

.notification-setting {
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, 112px);
  gap: 12px;
  align-items: center;

  @media (max-width: 640px) { grid-template-columns: minmax(0, 1fr) repeat(2, 88px); }
}
.notification-setting--head {
  padding-block: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);

  & > span:not(:first-child) { text-align: center; }
}
.notification-setting__title { font-weight: 500; }
.notification-setting__time { margin-top: 4px; & .select { width: auto; height: 36px; padding: 0 10px; font-size: 14px; } }
.notification-setting__channel {
  justify-content: center;
  min-height: 44px;

  & .icon { display: none; }
  &:has(input:checked) { font-weight: 600; & .icon { display: inline; } }
  &:has(input:focus-visible) { box-shadow: var(--focus); }
}

.quiet-hours__title { flex: 1; & p { margin: 0; } }
.quiet-hours { align-items: flex-end; }
.quiet-hours__dash { padding-bottom: 12px; color: var(--muted); }
.quiet-hours__note { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 12px; }
