:root {
  /* Solomiles design system: base palette (ported from ~/Desktop/solo-miles/app/globals.css) */
  --ink-900: #0e1113;
  --ink-800: #171b1f;
  --ink-700: #252b31;
  --ink-600: #39424a;
  --ink-500: #59636c;
  --ink-400: #7c868f;
  --ink-300: #9ba5ad;
  --ink-200: #c2c9ce;
  --ink-100: #dfe3e6;

  --paper-000: #fdfcf7;
  --paper-100: #f5f2e9;
  --paper-200: #eae5d8;
  --paper-300: #dcd5c3;
  --paper-400: #c4bca6;

  --hivis-600: #a8c222;
  --hivis-500: #c6e23c;
  --hivis-400: #d8f250;
  --hivis-200: #ecf8a8;
  --hivis-100: #f6fbd6;

  --clay-700: #a63a17;
  --clay-600: #c74a20;
  --clay-500: #e0552b;
  --clay-300: #f0a98c;
  --clay-100: #fae3d9;

  --steel-700: #2b4c63;
  --steel-500: #41708f;
  --steel-300: #9bbacc;
  --steel-100: #e2ebf1;

  --void: #020303;

  --font-display: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-card: 10px;
  --radius-control: 4px;

  --surface-page: var(--void);
  --surface-card: rgba(255, 255, 255, 0.02);
  --surface-raised: rgba(255, 255, 255, 0.05);

  --text-strong: var(--paper-000);
  --text-body: var(--ink-100);
  --text-muted: var(--ink-300);
  --text-faint: var(--ink-400);

  --line-hairline: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.42);

  --control-solid-bg: var(--paper-000);
  --control-solid-fg: var(--ink-900);
  --control-solid-hover: var(--paper-200);
  --control-ghost-hover: rgba(255, 255, 255, 0.08);
  --control-disabled-bg: var(--ink-700);

  --dur-fast: 120ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-control:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-mono);
  background: var(--surface-page);
  color: var(--text-body);
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.topbar {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topbar-logout {
  background: transparent;
  border: none;
  padding: 4px 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.topbar-logout:hover {
  color: var(--text-strong);
}

.content {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-card {
  display: flex;
  flex-direction: column;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-error {
  color: var(--clay-500);
  font-size: 12px;
  min-height: 16px;
  margin: -4px 0 12px 0;
}

.login-submit-btn {
  width: 100%;
}

.guest-banner {
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--hivis-400);
  border-radius: var(--radius-card);
  background: rgba(216, 242, 80, 0.08);
  color: var(--hivis-400);
  font-size: 12px;
  line-height: 1.6;
}

.loading {
  color: var(--text-muted);
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--surface-card);
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  padding: 32px;
}

.progress {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hivis-400);
  margin-bottom: 18px;
}

.persona {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.persona-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: var(--void);
  flex-shrink: 0;
}

.persona-avatar.coach {
  background: var(--steel-300);
}

.persona-avatar.nutritionist {
  background: var(--clay-300);
}

.persona-name {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.persona-name.coach {
  color: var(--steel-300);
}

.persona-name.nutritionist {
  color: var(--clay-300);
}

.bubble {
  border-radius: var(--radius-card);
  padding: 20px 22px;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  border: 1px solid var(--line-hairline);
}

.bubble.coach {
  background: rgba(65, 112, 143, 0.14);
}

.bubble.nutritionist {
  background: rgba(224, 85, 43, 0.1);
}

.prompt {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.4;
  color: var(--text-strong);
}

.field {
  margin-bottom: 16px;
}

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

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-control);
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-strong);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--hivis-400);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-hairline);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-control);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-body);
  transition: var(--transition-control);
}

.radio-option:hover {
  border-color: var(--line-strong);
}

.radio-option.selected {
  border-color: var(--hivis-400);
  background: var(--hivis-400);
  color: var(--void);
}

.radio-option input {
  margin: 0;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

button {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-control);
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-control);
}

button.primary {
  background: var(--hivis-400);
  border-color: var(--hivis-400);
  color: var(--void);
}

button.primary:hover:not(:disabled) {
  background: var(--hivis-500);
  border-color: var(--hivis-500);
}

button.primary:disabled {
  background: var(--control-disabled-bg);
  border-color: var(--control-disabled-bg);
  color: var(--text-faint);
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding: 12px 8px;
}

button.secondary:hover {
  color: var(--text-strong);
}

/* Message / intro / close screens */
.message-screen .bubble {
  font-size: 17px;
}

/* Dashboard */
.dashboard {
  width: 100%;
  max-width: 640px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.sync-btn {
  padding: 8px 16px;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard .subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--surface-card);
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}

.profile-grid .item .label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.profile-grid .item .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
}

.coming-soon {
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px dashed var(--line-hairline);
  border-radius: var(--radius-card);
  color: var(--text-muted);
  font-size: 13px;
}

.chart-card {
  margin-top: 20px;
  background: var(--surface-card);
  border: 1px solid var(--line-hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0 0 12px 0;
}

.chart-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
}

.chart-host svg {
  display: block;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-item::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-item.ctl::before {
  background: var(--steel-300);
}

.legend-item.atl::before {
  background: var(--clay-500);
}

.goal-countdown {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
