/* Northpeak, the pretend product. Its own look on purpose: it plays a customer's app, so it must
   not look like Kipt, and whatever Kipt draws on it should stand out the way it would on a real
   customer's site. */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --text: #101828;
  --muted: #667085;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-wash: #f0fdfa;
  --good: #067647;
  --good-wash: #ecfdf3;
  --wait: #b54708;
  --wait-wash: #fffaeb;
  --bad: #b42318;
  --bad-wash: #fef3f2;
  --side: #fcfcfd;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.2rem; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 0.85rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- the app shell ------------------------------------------------------------ */

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 20px 14px; background: var(--side); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); margin: 0 8px 22px; }
.brand:hover { text-decoration: none; }
.brand--light { color: #fff; margin: 0; }
.mark { width: 28px; height: 28px; flex-shrink: 0; }
.side__link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #344054; font-weight: 500; }
.side__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.side__link:hover { background: #f2f4f7; text-decoration: none; }
.side__link[aria-current="page"] { background: var(--brand-wash); color: var(--brand-dark); }
.side__link[aria-current="page"] svg { color: var(--brand); }
.side__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.side__who { display: flex; flex-direction: column; min-width: 0; font-size: 0.85rem; }
.side__who span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--brand); color: #fff; font-weight: 600; font-size: 0.9rem; }
.avatar--quiet { background: #eaecf0; color: #475467; }

.main { padding: 32px 40px 80px; max-width: 1120px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.back { display: inline-block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.actions { display: flex; gap: 8px; align-items: center; }

.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--good-wash); color: var(--good); border: 1px solid #abefc6; font-weight: 500; }
.notice svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; flex-shrink: 0; }
.problem { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--bad-wash); color: var(--bad); font-size: 0.9rem; }

/* --- building blocks ------------------------------------------------------------ */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__head h2 { margin: 0; }
.narrow { max-width: 560px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.faded { opacity: 0.55; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.9rem; line-height: 1;
  padding: 11px 16px; border-radius: 8px; border: 1px solid var(--brand); cursor: pointer;
  background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.button:hover { background: var(--brand-dark); text-decoration: none; }
.button--quiet { background: var(--surface); color: #344054; border-color: var(--line-strong); box-shadow: none; }
.button--quiet:hover { background: #f9fafb; }
.button--wide { width: 100%; padding: 13px 16px; }

label, .label { display: block; font-weight: 500; font-size: 0.9rem; margin: 14px 0 6px; color: #344054; }
input[type=text], input[type=email] {
  width: 100%; font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--text);
}
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12); }
form .button { margin-top: 18px; }
.actions form .button, .rows form .button, .invite__row .button { margin-top: 0; }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__label { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.stat__value { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.stat__change { font-size: 0.8rem; color: var(--good); font-weight: 500; }

.chart { display: block; width: 100%; height: 200px; }
.chart--tall { height: 260px; }
.chart__line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.chart__area { fill: rgba(15, 118, 110, 0.08); }
.chart__months { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; margin-top: 8px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows__main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.rows__main a { color: var(--text); }

.pill { font-size: 0.75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f2f4f7; color: #344054; white-space: nowrap; }
.pill--good { background: var(--good-wash); color: var(--good); }
.pill--wait { background: var(--wait-wash); color: var(--wait); }

.source-kind { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; color: #fff; background: #475467; }
.source-kind[data-kind="Stripe"] { background: #635bff; }
.source-kind[data-kind="Google Sheets"] { background: #16a34a; }
.source-kind[data-kind="PostgreSQL"] { background: #336791; }
.source-kind[data-kind="CSV file"] { background: #d97706; }

.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 400; }
.choice > span:last-child { display: flex; flex-direction: column; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); }
.choice input { accent-color: var(--brand); }

.empty { text-align: center; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h2 { margin: 6px 0 0; font-size: 1.15rem; }
.empty .button { margin-top: 12px; }
.empty__art { width: 120px; height: 80px; fill: var(--brand-wash); stroke: var(--brand); stroke-width: 1.5; }

.invite__row { display: flex; gap: 10px; }
.invite__row input { flex: 1 1 auto; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }

/* --- sign in ------------------------------------------------------------------ */

.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }
.auth__side { background: linear-gradient(160deg, #134e4a, #0f766e 60%, #14b8a6); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth__quote { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin: 0 0 18px; letter-spacing: -0.02em; max-width: 22rem; }
.auth__points { margin: 0; padding-left: 1.1rem; color: #ccfbf1; line-height: 1.9; }
.auth__main { display: grid; place-items: center; padding: 40px 20px; min-height: 100vh; }
.auth__card { width: 100%; max-width: 400px; }
.auth__card h1 { margin-bottom: 6px; }
.fine { margin: 22px 0 0; font-size: 0.8rem; color: var(--muted); }

/* --- small screens ---------------------------------------------------------- */

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 12px 0 0; }
  .side__foot { display: none; }
  .main { padding: 20px 16px 60px; }
  .grid-3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__side { display: none; }
}
