/* FINN V1 — clean fintech front-end.
   One stylesheet, no build step. Light, calm, premium: near-white app bg,
   white cards, ink text, one restrained teal accent, hairline borders,
   tabular figures, generous whitespace, sentence case. */

:root {
  color-scheme: light;

  /* Ink + neutrals */
  --ink: #10221f;
  --ink-2: #33474a;
  --muted: #6a7b7e;
  --faint: #93a2a4;
  --line: #e5ebeb;
  --line-2: #eef2f2;

  /* Surfaces */
  --bg: #f7f9f8;
  --panel: #ffffff;
  --soft: #f0f4f3;
  --soft-2: #eaf0ef;

  /* One restrained accent — deep teal */
  --accent: #0d7a6f;
  --accent-ink: #0a5e55;
  --accent-soft: #e6f3f1;
  --accent-line: #c3e2dd;

  /* Semantic (good/bad, not just up/down) */
  --good: #157a54;
  --good-soft: #e2f4ec;
  --bad: #b23b3b;
  --bad-soft: #fbe7e5;
  --warn: #9a6510;
  --warn-soft: #fdf0da;
  --info: #2b5f97;
  --info-soft: #e7f0fa;

  --radius: 12px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(16, 34, 31, 0.04);
  --shadow-pop: 0 8px 30px rgba(16, 34, 31, 0.10);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;

  font-family: var(--font);
  font-feature-settings: "cv05" 1, "ss01" 1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Every figure aligns and uses lining/tabular numerals. */
.num,
.pulse-value,
.kpi-value,
td.num,
.figure,
.metric strong,
.focus-card strong,
.score-card strong,
.delta {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 680;
}

h2 {
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 14px;
  font-weight: 620;
}

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

a:hover {
  text-decoration: underline;
}

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

.faint {
  color: var(--faint);
}

.error {
  color: var(--bad);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                            */
/* ------------------------------------------------------------------ */

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 560;
  letter-spacing: -0.003em;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

button:hover {
  background: var(--accent-ink);
}

button:active {
  transform: translateY(0.5px);
}

button.secondary {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line);
}

button.secondary:hover {
  background: var(--soft);
  border-color: var(--line);
}

button.ghost {
  background: transparent;
  color: var(--accent-ink);
  border-color: transparent;
  padding: 0 8px;
  min-height: 34px;
}

button.ghost:hover {
  background: var(--accent-soft);
}

button.danger {
  background: var(--bad);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 6px;
}

label > span {
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Auth / login                                                       */
/* ------------------------------------------------------------------ */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 460px);
}

.login-hero {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  background:
    radial-gradient(1200px 480px at -10% -20%, rgba(13, 122, 111, 0.13), transparent 60%),
    radial-gradient(900px 500px at 120% 120%, rgba(43, 95, 151, 0.10), transparent 55%),
    #eef4f2;
  border-right: 1px solid var(--line);
}

.login-copy {
  max-width: 640px;
}

.login-copy h1 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
}

.login-copy p {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}

.login-trust {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 32px;
  background: #fff;
}

.form-box {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  display: grid;
  gap: 15px;
}

.form-box h2 {
  font-size: 22px;
}

.demo-creds {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  font-size: 12.5px;
  color: var(--muted);
}

.demo-creds strong {
  color: var(--ink-2);
}

.switch {
  margin-top: 2px;
  font-size: 13.5px;
}

/* ------------------------------------------------------------------ */
/* Brand mark                                                          */
/* ------------------------------------------------------------------ */

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-ink));
  color: #fff;
  font-weight: 780;
  font-size: 18px;
  letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand h2 {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand .muted {
  font-size: 12.5px;
  margin-top: 1px;
}

/* ------------------------------------------------------------------ */
/* App shell — slim left sidebar                                      */
/* ------------------------------------------------------------------ */

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.sidebar-brand {
  padding: 4px 8px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line-2);
}

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

.nav button {
  justify-content: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
  font-weight: 520;
  text-align: left;
}

.nav button:hover {
  background: var(--soft);
}

.nav button.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 620;
}

.nav .nav-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.85;
}

.nav button.active .nav-ico {
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--line-2);
  display: grid;
  gap: 3px;
}

.sidebar-foot .who {
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot .who-sub {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  padding: 26px 30px 56px;
  width: min(1200px, 100%);
}

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

.topbar .title-wrap {
  min-width: 0;
}

.topbar h1 {
  overflow-wrap: anywhere;
}

.topbar .sub {
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* Layout primitives                                                  */
/* ------------------------------------------------------------------ */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 26px 0 12px;
}

.section-head h2 {
  color: var(--ink);
}

.section-head .hint {
  font-size: 12.5px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.panel {
  padding: 18px 20px;
}

.card {
  padding: 16px 18px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.card-head h3 {
  font-size: 14.5px;
}

.card-head .hint {
  font-size: 12px;
  color: var(--faint);
}

.stack {
  display: grid;
  gap: 14px;
}

/* ------------------------------------------------------------------ */
/* KPI pulse cards                                                    */
/* ------------------------------------------------------------------ */

.pulse-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 128px;
  box-shadow: var(--shadow-card);
}

.pulse-card .pulse-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 540;
  line-height: 1.3;
}

.pulse-value {
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}

.pulse-card .pulse-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

/* Delta chip — colored by good/bad, not just direction. */
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 620;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--ink-2);
  white-space: nowrap;
}

.delta.good {
  background: var(--good-soft);
  color: var(--good);
}

.delta.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.delta .arrow {
  font-size: 11px;
  line-height: 1;
}

.delta-text {
  color: var(--muted);
  font-size: 12.5px;
}

/* ------------------------------------------------------------------ */
/* What-changed band                                                 */
/* ------------------------------------------------------------------ */

.changed {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--accent-soft), #fff 70%);
}

.changed .changed-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  flex: 0 0 auto;
}

.changed .changed-body {
  min-width: 0;
  flex: 1 1 320px;
}

.changed .changed-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 680;
  color: var(--accent-ink);
}

.changed .changed-line {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
}

.changed .changed-line strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid var(--accent-line);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 540;
}

/* ------------------------------------------------------------------ */
/* Revenue-by-product mini bars                                       */
/* ------------------------------------------------------------------ */

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}

.bar-row:last-child {
  border-bottom: 0;
}

.bar-row .bar-name {
  font-size: 13.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row .bar-val {
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--soft-2);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  min-width: 3px;
}

.bar-row .bar-pct {
  grid-column: 2;
  font-size: 12px;
  color: var(--faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ */
/* Momentum lists                                                    */
/* ------------------------------------------------------------------ */

.momentum-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.momentum-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 680;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.momentum-col.growing h4 {
  color: var(--good);
}

.momentum-col.slipping h4 {
  color: var(--bad);
}

.momentum-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
}

.momentum-item:last-child {
  border-bottom: 0;
}

.momentum-item .m-name {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.momentum-item .m-delta {
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.momentum-col.growing .m-delta {
  color: var(--good);
}

.momentum-col.slipping .m-delta {
  color: var(--bad);
}

/* ------------------------------------------------------------------ */
/* Tables                                                             */
/* ------------------------------------------------------------------ */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

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

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

thead th {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 620;
  border-bottom: 1px solid var(--line);
}

tbody tr:last-child td {
  border-bottom: 0;
}

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

td.strong {
  font-weight: 600;
  color: var(--ink);
}

td.danger {
  color: var(--bad);
  font-weight: 620;
}

/* ------------------------------------------------------------------ */
/* Alerts / pills                                                    */
/* ------------------------------------------------------------------ */

.alert-list {
  display: grid;
  gap: 9px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

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

.alert.danger {
  border-color: var(--bad-soft);
  background: linear-gradient(0deg, var(--bad-soft), #fff 65%);
}
.alert.danger .dot {
  background: var(--bad);
}

.alert.warning {
  border-color: var(--warn-soft);
  background: linear-gradient(0deg, var(--warn-soft), #fff 70%);
}
.alert.warning .dot {
  background: var(--warn);
}

.alert.info {
  border-color: var(--info-soft);
  background: linear-gradient(0deg, var(--info-soft), #fff 70%);
}
.alert.info .dot {
  background: var(--info);
}

.alert .a-body {
  min-width: 0;
}

.alert .a-kind {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 680;
  color: var(--muted);
}

.alert.danger .a-kind {
  color: var(--bad);
}
.alert.warning .a-kind {
  color: var(--warn);
}
.alert.info .a-kind {
  color: var(--info);
}

.alert .a-msg {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 540;
  white-space: nowrap;
}

.pill.good {
  background: var(--good-soft);
  color: var(--good);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill.bad {
  background: var(--bad-soft);
  color: var(--bad);
}

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

.pill.accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ------------------------------------------------------------------ */
/* Ask-FINN entry                                                    */
/* ------------------------------------------------------------------ */

.ask-finn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 100% 0%, var(--accent-soft), transparent 70%),
    #fff;
  box-shadow: var(--shadow-card);
}

.ask-finn .af-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ask-finn h3 {
  font-size: 15px;
}

.ask-finn p {
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.ask-finn .af-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-ink));
  color: #fff;
  font-weight: 780;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------ */
/* Empty / loading states                                            */
/* ------------------------------------------------------------------ */

.empty {
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

.empty h3 {
  color: var(--ink-2);
  margin-bottom: 6px;
}

.skeleton {
  color: var(--muted);
  font-size: 14px;
  padding: 8px 0;
}

.coach-note {
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.advice {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Tenant picker                                                     */
/* ------------------------------------------------------------------ */

.picker-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 400px at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}

.picker {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 26px;
}

.picker h2 {
  font-size: 20px;
}

.picker > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.tenant-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.tenant-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  min-height: 60px;
}

.tenant-choice:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.tenant-choice .tc-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tenant-choice .tc-name {
  font-weight: 640;
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-choice .tc-role {
  font-size: 12.5px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* Chat                                                              */
/* ------------------------------------------------------------------ */

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 4px 0 16px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 82%;
}

.chat-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg .who {
  font-size: 11.5px;
  font-weight: 620;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.chat-msg .bubble {
  white-space: pre-wrap;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1.55;
  font-size: 14px;
  color: var(--ink-2);
}

.chat-msg.user .bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chat-msg .sources,
.chat-msg .created {
  font-size: 12.5px;
}

.chat-msg .sources summary {
  cursor: pointer;
  color: var(--accent-ink);
}

.chat-msg .sources ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.chat-msg .created {
  color: var(--good);
  font-weight: 560;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.composer button {
  min-height: 44px;
}

/* ------------------------------------------------------------------ */
/* Uploads & review                                                  */
/* ------------------------------------------------------------------ */

.upload-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.upload-form input[type="file"] {
  flex: 1 1 240px;
  padding: 8px 12px;
}

.review-item {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}

.review-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.review-item p {
  color: var(--ink-2);
  line-height: 1.5;
  font-size: 14px;
}

.review-item .status-row {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Metric mini cards (uploads/automations/portfolio)                 */
/* ------------------------------------------------------------------ */

.metric {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.metric .m-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.metric h3 {
  overflow-wrap: anywhere;
}

.metric strong {
  display: block;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.metric small {
  color: var(--muted);
  line-height: 1.45;
  font-size: 12.5px;
}

/* Billing plan cards */
.plan-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 160px;
  box-shadow: var(--shadow-card);
}

.plan-card .p-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 560;
}

.plan-card .p-price {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.plan-card button {
  margin-top: auto;
}

/* Profile */
.profile-grid {
  display: grid;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
}

.profile-row .k {
  color: var(--muted);
  font-size: 13.5px;
}

.profile-row .v {
  color: var(--ink);
  font-size: 14px;
  font-weight: 540;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 1080px) {
  .grid.cols-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login {
    grid-template-columns: 1fr;
  }
  .login-hero {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-brand {
    border-bottom: 0;
    padding: 0 8px 0 0;
    margin: 0;
    flex: 0 0 auto;
  }
  .sidebar-brand .brand h2,
  .sidebar-brand .brand .muted {
    display: none;
  }
  .nav {
    flex-direction: row;
    flex: 1 1 auto;
  }
  .nav button {
    white-space: nowrap;
  }
  .nav .nav-ico {
    display: none;
  }
  .sidebar-foot {
    display: none;
  }
  .main {
    padding: 20px 16px 44px;
  }
}

@media (max-width: 720px) {
  .grid.cols-5,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .row-2,
  .momentum-cols {
    grid-template-columns: 1fr;
  }
  .chat-msg {
    max-width: 92%;
  }
  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ------------------------------------------------------------------ */
/* Subscription & seats                                               */
/* ------------------------------------------------------------------ */

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

.sub-fact {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sub-fact .k {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 620;
}

.sub-fact .v {
  font-size: 15px;
  font-weight: 560;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cycle-toggle {
  display: inline-flex;
  gap: 6px;
  margin: 4px 0 18px;
}

.cycle-toggle button {
  min-height: 36px;
}

.seat-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}

.seat-stepper .k {
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink-2);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  background: #fff;
}

.stepper button {
  min-height: 30px;
  width: 34px;
  padding: 0;
  border-radius: var(--radius-pill);
  font-size: 18px;
  line-height: 1;
}

.stepper .seat-count {
  min-width: 34px;
  text-align: center;
  font-size: 15px;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.seat-hint {
  font-size: 12.5px;
}

.price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
}

.price-usd {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.price-per {
  font-size: 15px;
  font-weight: 540;
  color: var(--muted);
  letter-spacing: 0;
}

.price-zar {
  font-size: 13.5px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .sub-summary {
    grid-template-columns: 1fr 1fr;
  }
}
