/* Jano Operating Core — design system.
   Identical in dashboard.janobasson.com and dealership.janobasson.com.
   The only difference between the two dashboards is --accent, set at runtime
   from the workspace config. */

/* ---------------------------------------------------------------- tokens - */

:root {
  --bg: #0a0d13;
  --surface: #12161f;
  --surface-2: #171c27;
  --surface-3: #1d2430;
  --border: #232a37;
  --border-strong: #333d4f;

  --text: #eef1f6;
  --muted: #99a3b5;
  --faint: #6b7688;

  --accent: #3b82f6;
  --accent-2: #6d5bf7;
  --accent-soft: rgba(59, 130, 246, 0.14);
  --accent-text: #ffffff;
  --accent-glow: rgba(59, 130, 246, 0.35);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.13);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.13);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.13);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 28px -18px rgba(0, 0, 0, 0.55);
  --shadow-raised: 0 18px 40px -16px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 16px 40px -8px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 32px 80px -12px rgba(0, 0, 0, 0.65), 0 8px 24px rgba(0, 0, 0, 0.4);

  --z-sticky: 20;
  --z-dropdown: 40;
  --z-panel: 60;
  --z-modal: 80;
  --z-toast: 100;

  --sidebar-width: 252px;
  --topbar-height: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ----------------------------------------------------------------- base - */

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

/* Authentication state must always win over component layout declarations. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(109, 91, 247, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: 23px; letter-spacing: -0.02em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; }

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.numeric { font-variant-numeric: tabular-nums; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ----------------------------------------------------------------- auth - */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-5);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-raised);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.auth-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  flex: none;
}

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

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.shell[hidden] { display: none; }

/* --------------------------------------------------------------- sidebar - */

.sidebar {
  grid-row: 1 / -1;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 130%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-4);
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  flex: none;
}

.sidebar-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2)));
  box-shadow: 0 4px 14px -2px var(--accent-glow);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex: none;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-3) var(--space-5);
}

.nav-group + .nav-group { margin-top: var(--space-5); }

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 var(--space-3) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 8px var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item[aria-current="page"] {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--text);
  font-weight: 500;
  box-shadow: inset 2.5px 0 0 var(--accent);
}

.nav-item .icon { flex: none; width: 17px; height: 17px; }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-count {
  flex: none;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nav-item[aria-current="page"] .nav-count,
.nav-count.is-alert {
  background: var(--accent);
  color: var(--accent-text);
}

.sidebar-foot {
  flex: none;
  border-top: 1px solid var(--border);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--surface-3), var(--surface-2));
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  flex: none;
}

/* --------------------------------------------------------------- top bar - */

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-5);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}

.search {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search input {
  width: 100%;
  height: 34px;
  padding: 0 var(--space-3) 0 34px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.search input::placeholder { color: var(--faint); }
.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.search .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--faint);
  pointer-events: none;
}

.search kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.topbar-spacer { flex: 1; }

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

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

.page {
  padding: var(--space-5);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.page-head p { color: var(--muted); margin-top: var(--space-1); }
.page-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.section { margin-top: var(--space-6); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------------- cards - */

.card {
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 92%, black) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.card-body { padding: var(--space-4); }

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.daily-guide {
  padding: clamp(20px, 2.5vw, 30px);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface-2)), var(--surface) 64%);
  box-shadow: var(--shadow-card);
}
.daily-guide-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.daily-guide-head h2 { margin:7px 0 8px; font-size:clamp(24px,3vw,36px); letter-spacing:-.04em; }
.daily-guide-head p { max-width:760px; color:var(--muted); line-height:1.65; }
.daily-eyebrow { color:var(--accent); font-size:10px; font-weight:800; letter-spacing:.14em; }
.system-pill { flex:none; padding:7px 10px; border:1px solid rgba(52,211,153,.25); border-radius:999px; color:#8ce8c2; background:rgba(52,211,153,.07); font-size:11px; font-weight:700; }
.system-pill.is-alert { color:#ff9a9a; border-color:rgba(248,113,113,.28); background:rgba(248,113,113,.08); }
.daily-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:24px; }
.daily-step { min-width:0; display:grid; grid-template-columns:34px 1fr; gap:5px 12px; padding:17px; color:var(--text); text-align:left; background:rgba(255,255,255,.025); border:1px solid var(--border); border-radius:11px; cursor:pointer; }
.daily-step:hover { border-color:color-mix(in srgb, var(--accent) 45%, var(--border)); transform:translateY(-1px); }
.daily-step.needs-action { border-color:color-mix(in srgb, var(--accent) 34%, var(--border)); background:color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.daily-step-number { grid-row:1/3; width:30px; height:30px; display:grid; place-items:center; border-radius:8px; color:#080a0e; background:var(--accent); font-weight:850; }
.daily-step-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }
.daily-step-copy strong { font-size:14px; }
.daily-step-copy span { color:var(--muted); font-size:12px; line-height:1.45; }
.daily-step-action { grid-column:2; margin-top:8px; color:color-mix(in srgb, var(--accent) 74%, white); font-size:11px; font-weight:750; }
.system-details { border:1px solid var(--border); border-radius:var(--radius); background:rgba(255,255,255,.012); }
.system-details summary { padding:14px 16px; cursor:pointer; color:var(--muted); font-size:12px; font-weight:700; }
.system-details-body { padding:0 14px 14px; }

/* KPI card: one number, one comparison, one destination. */
.kpi {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: linear-gradient(165deg, var(--surface-2) 0%, var(--surface) 60%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  width: 100%;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
}

.kpi:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12.5px;
  color: var(--muted);
}

.kpi-value {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.kpi-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--faint);
}

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--faint); }

/* --------------------------------------------------------------- badges - */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge.neutral { background: var(--surface-3); color: var(--muted); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger  { background: var(--danger-soft);  color: var(--danger); }
.badge.info    { background: var(--info-soft);    color: var(--info); }
.badge.accent  { background: var(--accent-soft);  color: var(--accent); }

/* Tags never rely on colour alone — the text is always the label. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.tag.is-type { border-color: rgba(59, 130, 246, 0.35); color: #93c5fd; }
.tag.is-sellable { border-color: rgba(52, 211, 153, 0.35); color: var(--success); }
.tag button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0 0 0 2px;
  opacity: 0.6;
  line-height: 1;
}
.tag button:hover { opacity: 1; }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 34px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}

.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled,
.btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, var(--accent-2)));
  border-color: transparent;
  color: var(--accent-text);
  box-shadow: 0 6px 16px -4px var(--accent-glow);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 8px 22px -4px var(--accent-glow); }
.btn.primary:active:not(:disabled) { box-shadow: 0 3px 10px -3px var(--accent-glow); }

.btn.danger { background: transparent; border-color: rgba(248, 113, 113, 0.5); color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); }

.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn.icon-only { width: 34px; padding: 0; flex: none; }
.btn.small { min-height: 28px; padding: 0 var(--space-3); font-size: 12.5px; }
.btn.block { width: 100%; }

.btn .spinner {
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.icon-btn .dot {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--danger);
  color: #0b0f16;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

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

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }

.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.field .required { color: var(--danger); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); }

.field .hint { font-size: 12px; color: var(--faint); }
.field .error { font-size: 12px; color: var(--danger); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

.form-message {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: var(--space-4);
}
.form-message.error { background: var(--danger-soft); color: var(--danger); }
.form-message.success { background: var(--success-soft); color: var(--success); }
.form-message.info { background: var(--info-soft); color: var(--info); }
.form-message:empty { display: none; }

/* --------------------------------------------------------------- toolbar - */

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.toolbar input[type="search"],
.toolbar select {
  min-height: 34px;
  padding: 0 var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.toolbar input[type="search"] { flex: 1; min-width: 200px; }
.toolbar .result-count { color: var(--faint); font-size: 12.5px; margin-left: auto; }

/* --------------------------------------------------------------- tables - */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px var(--space-4);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 11px var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }

td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }

.cell-primary { font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--faint); }

/* --------------------------------------------------------------- states - */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-7) var(--space-5);
}

.empty .icon { width: 34px; height: 34px; color: var(--faint); }
.empty h3 { font-size: 15px; }
.empty p { color: var(--muted); max-width: 420px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-card { height: 96px; }

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  text-align: center;
}
.error-state .icon { width: 30px; height: 30px; color: var(--danger); }

/* ------------------------------------------------------------- attention - */

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

.attention-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: inherit;
}

.attention-item:last-child { border-bottom: 0; }
.attention-item:hover { background: var(--surface-2); }

.attention-rail {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  flex: none;
}
.attention-rail.critical { background: var(--danger); }
.attention-rail.action { background: var(--warning); }
.attention-rail.info { background: var(--info); }

.attention-body { flex: 1; min-width: 0; }
.attention-title { font-weight: 500; }
.attention-detail { font-size: 12.5px; color: var(--faint); }
.attention-time { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* -------------------------------------------------------------- pipeline - */

.board {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  align-items: flex-start;
}

.board-column {
  flex: 0 0 288px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 260px);
}

.board-column.is-drop-target {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.board-column-head {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  flex: none;
}

.board-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
}

.board-column-meta {
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.board-column-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  min-height: 80px;
}

.deal-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  width: 100%;
  color: inherit;
}

.deal-card:hover { border-color: var(--border-strong); background: var(--surface-3); }
.deal-card.is-dragging { opacity: 0.4; }
.deal-card:active { cursor: grabbing; }

.deal-title { font-weight: 500; font-size: 13.5px; }
.deal-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: 12px; color: var(--faint); }
.deal-value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }

.deal-move { display: flex; gap: 4px; margin-top: 2px; }
.deal-move button {
  flex: 1;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.deal-move button:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.deal-move button:disabled { opacity: 0.35; cursor: not-allowed; }

.board-empty {
  padding: var(--space-4);
  text-align: center;
  font-size: 12.5px;
  color: var(--faint);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ----------------------------------------------------------------- panel - */

.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.62);
  z-index: var(--z-panel);
  display: flex;
  justify-content: flex-end;
}

.panel {
  width: min(720px, 100%);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  animation: slide-in 0.16s ease-out;
}

@keyframes slide-in {
  from { transform: translateX(24px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.panel-head {
  flex: none;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.panel-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.panel-identity { display: flex; gap: var(--space-3); min-width: 0; }
.panel-identity .avatar { width: 42px; height: 42px; font-size: 15px; }
.panel-name { font-size: 17px; font-weight: 600; }
.panel-sub { font-size: 13px; color: var(--muted); }

.panel-quick-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.panel-tabs {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.panel-tab {
  padding: 10px var(--space-3);
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.panel-tab:hover { color: var(--text); }
.panel-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }

.panel-body { flex: 1; overflow-y: auto; padding: var(--space-5); }

.detail-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  font-size: 13.5px;
}
.detail-grid dt { color: var(--faint); }
.detail-grid dd { margin: 0; word-break: break-word; }

/* --------------------------------------------------------- conversation - */

.thread { display: flex; flex-direction: column; gap: var(--space-4); }

.message { display: flex; flex-direction: column; gap: 5px; max-width: 82%; }
.message.out { align-self: flex-end; align-items: flex-end; }
.message.note { align-self: center; max-width: 100%; width: 100%; }

.message-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11.5px;
  color: var(--faint);
}

.message-bubble {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.message.out .message-bubble { background: var(--accent-soft); border-color: rgba(59, 130, 246, 0.3); }
.message.note .message-bubble {
  background: var(--warning-soft);
  border-color: rgba(251, 191, 36, 0.28);
  border-left: 3px solid var(--warning);
}
.message.failed .message-bubble { border-color: rgba(248, 113, 113, 0.5); }

.message-subject { font-weight: 600; margin-bottom: 4px; }

.composer {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) calc(var(--space-5) * -1) calc(var(--space-5) * -1);
}

.composer-from {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: var(--space-2);
}
.composer-from strong { color: var(--muted); font-weight: 600; }

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 12, 0.62);
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--space-4);
}

.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.modal-body { padding: var(--space-5); overflow-y: auto; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
}

/* -------------------------------------------------------------- dropdown - */

.dropdown {
  position: absolute;
  right: var(--space-5);
  top: calc(var(--topbar-height) - 6px);
  width: min(400px, calc(100vw - 32px));
  max-height: 460px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  z-index: var(--z-dropdown);
}

.dropdown-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item:last-child { border-bottom: 0; }
.dropdown-item.unread { background: var(--accent-soft); }
.dropdown-item .title { font-size: 13.5px; font-weight: 500; }
.dropdown-item .body { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dropdown-item .time { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* --------------------------------------------------------------- toasts - */

.toasts {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(400px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.16s ease-out;
  font-size: 13.5px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------------------------------------------------------------- chart - */

.chart { width: 100%; height: 190px; display: block; }
.chart-bar { fill: var(--accent); opacity: 0.85; }
.chart-bar:hover { opacity: 1; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-label { fill: var(--faint); font-size: 10px; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.4fr) minmax(0, 3fr) 64px;
  gap: var(--space-3);
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
}

.bar-track { height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }

/* -------------------------------------------------------------- ops card - */

.ops-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s, transform 0.14s;
  color: inherit;
  text-decoration: none;
}

.ops-card:hover {
  border-color: var(--ops-accent, var(--accent));
  transform: translateY(-2px);
  text-decoration: none;
}

.ops-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--ops-accent, var(--accent));
  color: #0b0f16;
  font-weight: 700;
}

.ops-title { font-size: 16px; font-weight: 600; }
.ops-sub { font-size: 13px; color: var(--muted); }
.ops-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--faint);
}

/* --------------------------------------------------------------- mobile - */

.sidebar-toggle { display: none; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.18s ease-out;
    z-index: var(--z-panel);
  }

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

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 12, 0.6);
    z-index: calc(var(--z-panel) - 1);
  }

  .sidebar-toggle { display: grid; }
  .page { padding: var(--space-4); }
  .topbar { padding: 0 var(--space-4); }
  .search kbd { display: none; }
}

@media (max-width: 640px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions .btn { flex: 1; }
  .field-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 2px var(--space-4); }
  .detail-grid dt { margin-top: var(--space-2); }
  .message { max-width: 100%; }
  .board-column { flex-basis: 84vw; }
  .kpi-value { font-size: 23px; }
  .btn { min-height: 38px; }
  .icon-btn { width: 38px; height: 38px; }

  /* Tables become stacked cards so nothing is clipped on a phone. */
  .table-stack thead { display: none; }
  .table-stack tbody tr {
    display: block;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
  }
  .table-stack tbody td {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 3px 0;
    border: 0;
    text-align: right;
  }
  .table-stack tbody td::before {
    content: attr(data-label);
    color: var(--faint);
    font-size: 12px;
    text-align: left;
    flex: none;
  }
  .table-stack tbody td:first-child { text-align: left; }
  .table-stack tbody td:first-child::before { display: none; }
}


/* ================================================================
   Executive operating layer
   Dense, calm and intentionally utilitarian: a private command centre,
   not a template dashboard.
   ================================================================ */

:root {
  --bg: #07090d;
  --surface: #0e1117;
  --surface-2: #131720;
  --surface-3: #191e28;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f7fa;
  --muted: #9da7b8;
  --faint: #697486;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --sidebar-width: 238px;
  --topbar-height: 64px;
  --shadow-card: 0 1px 0 rgba(255,255,255,.025) inset, 0 16px 48px -36px rgba(0,0,0,.9);
}

body {
  background:
    radial-gradient(800px 520px at 75% -18%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 68%),
    linear-gradient(180deg, #090b10 0%, var(--bg) 42%);
}

.auth {
  padding: clamp(16px, 4vw, 52px);
  background:
    radial-gradient(900px 600px at 17% 18%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%),
    linear-gradient(145deg, #080a0e, #0b0f16 58%, #07090d);
}

.auth-layout {
  width: min(1040px, 100%);
  max-width: none;
  min-height: 590px;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
  background: rgba(12, 15, 21, .96);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  box-shadow: 0 42px 120px -38px rgba(0,0,0,.92), 0 1px 0 rgba(255,255,255,.06) inset;
}

.auth-story {
  position: relative;
  isolation: isolate;
  padding: clamp(42px, 6vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, #0a0d12), #0a0d12 58%);
}

.auth-story::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 430px;
  height: 430px;
  right: -190px;
  top: -190px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px color-mix(in srgb, var(--accent) 3%, transparent),
    0 0 0 112px color-mix(in srgb, var(--accent) 2%, transparent);
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: color-mix(in srgb, var(--accent) 72%, white);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(52,211,153,.1);
}

.auth-story h2 {
  max-width: 640px;
  color: #fff;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.01;
  letter-spacing: -.055em;
  font-weight: 720;
}

.auth-story h2 span {
  color: color-mix(in srgb, var(--accent) 75%, #fff);
}

.auth-story > p {
  max-width: 590px;
  margin-top: 25px;
  color: #aeb7c6;
  font-size: 15px;
  line-height: 1.75;
}

.auth-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.auth-proof span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: #cbd2dd;
  background: rgba(255,255,255,.035);
  font-size: 11.5px;
  font-weight: 600;
}

.auth-shield {
  margin-top: auto;
  padding-top: 42px;
  color: #838e9f;
  font-size: 11.5px;
  line-height: 1.6;
}

.auth-form-panel {
  padding: clamp(34px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,.018), transparent);
}

.auth-form-panel .auth-brand { margin-bottom: 34px; }
.auth-form-panel .auth-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 12px 30px -14px var(--accent-glow);
}

.auth-form-panel .field { margin-bottom: 17px; }
.auth-form-panel label {
  display: block;
  margin-bottom: 7px;
  color: #c9d0db;
  font-size: 12px;
  font-weight: 650;
}
.auth-form-panel input {
  min-height: 48px;
  background: #0a0d12;
  border-color: rgba(255,255,255,.12);
}
.auth-form-panel .btn.primary {
  min-height: 48px;
  margin-top: 7px;
  font-weight: 720;
}

.auth-footnote {
  margin-top: 22px;
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
  letter-spacing: .02em;
}

.sidebar {
  background: rgba(9, 11, 16, .97);
  border-right-color: rgba(255,255,255,.07);
  box-shadow: 18px 0 50px -48px #000;
}

.sidebar-head {
  padding: 0 18px;
  border-bottom: 0;
}

.sidebar-title {
  color: #f7f8fa;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.sidebar-nav {
  padding: 10px;
}

.nav-group-label {
  padding: 18px 10px 7px;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-link {
  min-height: 38px;
  margin: 2px 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #8f99aa;
  font-size: 12.5px;
  font-weight: 560;
}

.nav-link:hover {
  background: rgba(255,255,255,.04);
  color: #eef1f5;
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 17%, transparent), rgba(255,255,255,.025));
  box-shadow: inset 2px 0 0 var(--accent);
}

.sidebar-foot {
  margin: 0 10px 10px;
  padding: 12px 9px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 10px;
  background: rgba(255,255,255,.022);
}

.topbar {
  border-bottom-color: rgba(255,255,255,.065);
  background: rgba(7,9,13,.82);
  backdrop-filter: blur(18px) saturate(135%);
}

.search {
  max-width: 480px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
}

.page {
  max-width: 1680px;
  padding: 28px clamp(18px, 2.8vw, 42px) 60px;
}

.page-head {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}

.page-head h1 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.035em;
}

.page-description {
  max-width: 760px;
  margin-top: 6px;
  font-size: 12.5px;
}

.card,
.kpi-card,
.table-wrap,
.board-column {
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.009)), var(--surface);
  border-color: rgba(255,255,255,.075);
  box-shadow: var(--shadow-card);
}

.card:hover,
.kpi-card:hover {
  border-color: rgba(255,255,255,.12);
}

.card-head {
  min-height: 50px;
  padding: 13px 16px;
  border-bottom-color: rgba(255,255,255,.065);
}

.card-head h2 {
  font-size: 13px;
  font-weight: 680;
}

.card-body { padding: 18px; }

.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.kpi-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 2px;
  top: 0;
  left: 18px;
  background: var(--accent);
  opacity: .72;
}

.kpi-label {
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kpi-value {
  margin-top: 7px;
  font-size: 27px;
  letter-spacing: -.045em;
}

.btn {
  min-height: 35px;
  padding: 7px 12px;
  border-radius: 8px;
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  font-size: 12px;
  font-weight: 630;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

.btn.primary {
  color: #080a0e;
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 75%, #fff);
  box-shadow: 0 10px 24px -14px var(--accent-glow);
}

table { font-size: 12.5px; }
thead th {
  height: 38px;
  color: #717c8e;
  background: rgba(255,255,255,.018);
  font-size: 9.5px;
  letter-spacing: .085em;
  text-transform: uppercase;
}
tbody td { padding-top: 11px; padding-bottom: 11px; }
tbody tr:hover { background: rgba(255,255,255,.022); }

.toolbar {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.015);
}

.badge,
.tag {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
}

.board {
  gap: 12px;
  padding-bottom: 20px;
}

.board-column {
  flex-basis: 286px;
  border-radius: 12px;
}

.deal-card {
  border-color: rgba(255,255,255,.08);
  background: #11151c;
  box-shadow: 0 8px 28px -24px #000;
}

.modal {
  border-color: rgba(255,255,255,.12);
  background: #0e1218;
  box-shadow: 0 36px 100px -25px #000;
}

@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; min-height: 0; }
  .auth-story { display: none; }
  .auth-form-panel { min-height: min(620px, calc(100vh - 32px)); }
  .daily-steps { grid-template-columns:1fr; }
  .daily-guide-head { flex-direction:column; }
}

@media (max-width: 640px) {
  .page { padding: 18px 14px 42px; }
  .page-head { padding-bottom: 16px; }
  .page-head h1 { font-size: 22px; }
  .topbar { padding: 0 12px; }
  .search { max-width: none; }
}
