/* Kobu coach dashboard. The same tokens as the marketing site (styles.css). */

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

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-elevated: #1e1e1e;
  --bg-input: #101010;
  --border: #262626;
  --border-light: #333333;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #1f7afe;
  --accent-hover: #1668e3;
  --danger: #f05252;
  --warn-bg: #2a2110;
  --warn-border: #5c4512;
  --good: #34d399;
  --radius: 12px;
  --radius-sm: 8px;
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 28px;
  font-weight: 700;
}
h2 {
  font-size: 19px;
  font-weight: 600;
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
[hidden] {
  display: none !important;
}

.muted {
  color: var(--text-secondary);
}
.small {
  font-size: 13px;
}
.fine {
  font-size: 12px;
  color: var(--text-muted);
}
.micro {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.loading {
  padding: 24px;
}
.noscript {
  padding: 24px;
}
.center {
  max-width: 560px;
  margin: 15vh auto;
  padding: 0 16px;
}
.stack > * + * {
  margin-top: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.row-wrap {
  align-items: flex-end;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover {
  text-decoration: none;
}
.button:disabled {
  opacity: 0.5;
  cursor: default;
}
.button-primary {
  background: var(--accent);
  color: #fff;
}
.button-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.button-quiet {
  background: var(--bg-elevated);
  border-color: var(--border-light);
  color: var(--text);
}
.button-quiet:hover:not(:disabled) {
  border-color: var(--text-muted);
}
.button-danger {
  background: var(--danger);
  color: #fff;
}
.button-danger-text {
  color: var(--danger);
}
.button-block {
  width: 100%;
}
.button-apple {
  width: 100%;
  min-height: 48px;
  background: #fff;
  color: #000;
  font-size: 16px;
  border-radius: var(--radius-sm);
}
.button-apple:hover {
  background: #e8e8e8;
}
.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}
.link:hover {
  text-decoration: underline;
}
.link-small {
  font-size: 12px;
}
.icon-button {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.icon-button:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
}
.icon-button:disabled {
  opacity: 0.3;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Inputs */

.input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  color: var(--text);
  font: inherit;
}
.input:focus {
  border-color: var(--accent);
  outline: none;
}
.input:disabled {
  opacity: 0.6;
}
textarea.input {
  resize: vertical;
  line-height: 1.45;
}
.input-small {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 14px;
  width: auto;
}
.input-number {
  min-height: 32px;
  padding: 4px 6px;
  width: 100%;
  max-width: 88px;
  font-variant-numeric: tabular-nums;
}
.input-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-grow {
  flex: 1 1 240px;
}
.with-unit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Notices, cards, tags */

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 14px;
}
.notice ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.notice-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card > * + * {
  margin-top: 12px;
}
.card.empty {
  text-align: left;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
}
.tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain-list li + li {
  margin-top: 4px;
}
.failure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 16px 0;
}

/* Sign in */

.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.signin-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
}
.signin-card > * + * {
  margin-top: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

/* Shell */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand:hover {
  text-decoration: none;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-name {
  color: var(--text-secondary);
  font-size: 14px;
}
.segmented {
  display: inline-flex;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}
.segmented button {
  background: none;
  border: 0;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
}
.segmented .segmented-on {
  background: var(--bg-elevated);
  color: var(--text);
}
.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 59px);
}
.sidebar {
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  position: sticky;
  top: 59px;
  height: calc(100vh - 59px);
  overflow-y: auto;
}
.sidebar-heading {
  margin: 22px 6px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.client-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name badge" "detail badge";
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.client-row:hover {
  background: var(--bg-card);
  text-decoration: none;
}
.client-row-on {
  background: var(--bg-elevated);
}
.client-row-name {
  grid-area: name;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-row-detail {
  grid-area: detail;
  font-size: 12px;
  color: var(--text-muted);
}
.client-row .badge {
  grid-area: badge;
}
.sidebar-link {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
}
.sidebar-link:hover {
  background: var(--bg-card);
  text-decoration: none;
}
.sidebar-link-on {
  background: var(--bg-elevated);
}
.content {
  padding: 28px 32px 64px;
  max-width: 1100px;
}

/* Overview */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

/* Client */

.client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.client-head p {
  margin-top: 4px;
}
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover {
  color: var(--text);
  text-decoration: none;
}
.tab-on {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tabs-small .tab {
  font-size: 14px;
  padding: 8px 12px;
}
.tab-add {
  color: var(--accent);
}
.tab-body {
  margin-top: 20px;
}

/* Sessions */

.session-head p {
  margin-top: 2px;
}
.session-note {
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.exercise-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.exercise-list li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.exercise-name {
  font-weight: 500;
}
.sets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.set {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
  font-variant-numeric: tabular-nums;
}
.set-special b {
  color: var(--accent);
}
.comments:empty {
  display: none;
}

/* Messages */

.thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.thread-small {
  max-height: none;
}
.thread-older {
  text-align: center;
}
.bubble {
  max-width: 78%;
  align-self: flex-start;
  background: var(--bg-elevated);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px;
}
.bubble-mine {
  align-self: flex-end;
  background: var(--accent);
  border-radius: 14px 14px 4px 14px;
}
.bubble-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble-meta {
  display: flex;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.7;
}
.bubble-mine .bubble-meta {
  justify-content: flex-end;
}
.composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* Body weight */

.chart {
  width: 100%;
  height: auto;
}
.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}
.chart-dot {
  fill: var(--accent);
}
.chart-goal {
  stroke: var(--good);
  stroke-dasharray: 4 4;
}
.chart-label {
  fill: var(--text-muted);
  font-size: 11px;
}

/* Plan */

.plan-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.plan-note p {
  margin-top: 4px;
  white-space: pre-wrap;
}
.week-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.week-day {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
}
.week-day-rest {
  background: transparent;
  border: 1px dashed var(--border-light);
  color: var(--text-muted);
}
.routine-summary > * + * {
  margin-top: 14px;
}
.day-summary h3 {
  margin-bottom: 4px;
}
.routine-more summary {
  cursor: pointer;
  color: var(--text-secondary);
}
.programme-summary p {
  margin-top: 2px;
}
.week-chips {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.week-chip {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
}
.week-deload {
  color: #fbbf24;
}
.week-rest {
  color: var(--text-muted);
}
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.choice:hover {
  border-color: var(--accent);
}

.editor > * + * {
  margin-top: 16px;
}
.editor-bar {
  position: sticky;
  top: 59px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.week-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.week-cell .input {
  width: 100%;
}
.rotation {
  margin: 6px 0;
  padding-left: 22px;
}
.rotation li {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.day {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.day > * + * {
  margin-top: 10px;
}
.day-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.day-locked {
  opacity: 0.85;
}
.exercise-table {
  display: flex;
  flex-direction: column;
}
.exercise-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 70px 100px 100px 70px 84px 132px;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.exercise-row-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 0;
}
.exercise-row-superset {
  border-left: 3px solid var(--accent);
  padding-left: 8px;
}
.exercise-cell-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.exercise-swap {
  color: var(--text);
  font-weight: 500;
}
.exercise-note {
  margin-top: 6px;
  font-size: 13px;
}
.exercise-actions {
  display: flex;
  gap: 4px;
}
.weeks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.week-row {
  display: grid;
  grid-template-columns: 72px 110px 130px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.week-number {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Picker */

.picker .row .input[type="search"] {
  flex: 1 1 240px;
}
.picker .row select {
  flex: 0 1 180px;
}
.picker-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 46vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.picker-results > li.muted {
  padding: 12px;
}
.picker-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.picker-item:hover,
.picker-item:focus-visible {
  background: var(--bg-elevated);
}
.picker-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.picker-custom:empty {
  display: none;
}

/* Dialog and toast */

.dialog {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text);
}
.dialog:has(.dialog-wide) {
  width: min(720px, calc(100vw - 32px));
}
.dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.dialog-body {
  padding: 22px;
}
.dialog-body > * + * {
  margin-top: 14px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 20;
}
.toast-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast-error {
  border-color: var(--danger);
}

/* Phones and small tablets */

@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .content {
    padding: 20px 16px 48px;
  }
  .topbar {
    padding: 10px 16px;
  }
  .topbar-name {
    display: none;
  }
  .exercise-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .exercise-row-head {
    display: none;
  }
  .exercise-cell-name {
    grid-column: 1 / -1;
  }
  .exercise-row [data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--text-muted);
  }
  .exercise-actions {
    grid-column: 1 / -1;
  }
  .week-grid,
  .week-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .week-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Templates */

.back-link {
  display: inline-block;
  font-size: 14px;
}
.template-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}
.template-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  color: var(--text);
}
.template-card > * + * {
  margin-top: 0;
}
.template-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.week-strip-small {
  gap: 4px;
  margin: 6px 0 2px;
}
.week-strip-small .week-day {
  padding: 4px;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.week-strip-small .micro {
  display: block;
  font-size: 9px;
}
.check-list {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.check-row + .check-row {
  border-top: 1px solid var(--border);
}
.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.check-row-all {
  background: var(--bg-elevated);
}

/* Progress */

.chart-bar {
  fill: var(--bg-elevated);
  stroke: var(--border-light);
}
.chart-bar-met {
  fill: var(--accent);
  stroke: none;
}
.table-compact td,
.table-compact th {
  padding: 6px 8px;
}
.best-list li + li {
  margin-top: 8px;
}
.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
}
.trend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  min-width: 0;
}
.trend-change {
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.trend-up {
  color: var(--good);
}
.trend-down {
  color: var(--danger);
}
.sparkline {
  width: 100%;
  height: 56px;
}

/* Notes */

.note-composer-actions {
  justify-content: space-between;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.check-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-pinned {
  border-color: var(--accent);
}
.note-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.note-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.link-danger {
  color: var(--danger);
}

/* Check-ins and forms */

.sidebar-link-tight {
  margin-top: 2px;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.question > * + * {
  margin-top: 10px;
}
.question-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form-preview li + li {
  margin-top: 6px;
}
.note-waiting {
  border-style: dashed;
}
.tag-good {
  color: var(--good);
  border-color: var(--good);
}
.answers {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 8px 16px;
}
.answers dt {
  color: var(--text-secondary);
  font-size: 14px;
}
.answers dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.table-scroll {
  overflow-x: auto;
}
@media (max-width: 600px) {
  .answers {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .answers dd {
    margin-bottom: 8px;
  }
}

/* Nutrition and habits */

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.food-on {
  color: var(--good);
}
.food-over,
.food-under {
  color: var(--text);
}
.food-over::after {
  content: " ↑";
  color: var(--text-muted);
}
.food-under::after {
  content: " ↓";
  color: var(--text-muted);
}
.food-empty td {
  color: var(--text-muted);
}
.habit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.habit {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.habit > * + * {
  margin-top: 8px;
}
.habit p {
  margin: 2px 0 0;
}
.habit-weeks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.habit-week {
  display: flex;
  align-items: center;
  gap: 6px;
}
.habit-dots {
  display: flex;
  gap: 3px;
}
.habit-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
}
.habit-dot-done {
  background: var(--accent);
  border-color: var(--accent);
}
.habit-dot-future {
  opacity: 0.35;
}
.habit-week-met .small {
  color: var(--good);
}
.food-table th,
.food-table td {
  white-space: nowrap;
}

/* Schedule (schedule.js) */
.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}
ul.field-error {
  padding-left: 18px;
}
.field-error:empty {
  display: none;
}
.booking-day + .booking-day {
  margin-top: 16px;
}
.booking-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.booking {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.booking-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-width: 0;
}
.booking-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.booking-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.booking-main .small {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}
.booking-main .muted.small {
  flex-basis: auto;
}
.booking-cancelled .booking-time,
.booking-cancelled .booking-name {
  text-decoration: line-through;
  color: var(--text-muted);
}
details.card > summary {
  cursor: pointer;
  font-weight: 600;
}
.hours-week {
  display: flex;
  flex-direction: column;
}
.hours-day {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.hours-day-name {
  font-weight: 600;
}
.hours-windows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hours-window {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-time {
  width: 150px;
}
@media (max-width: 600px) {
  .hours-day {
    grid-template-columns: 1fr auto;
  }
  .hours-windows {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .input-time {
    width: 100%;
    min-width: 0;
  }
  .booking {
    align-items: flex-start;
  }
}
