/* partner-portal v2 — enterprise design language: dark side navigation,
   flat/white/hairline surfaces, squared corners, indigo accent.
   Class names follow the console's settings idiom (team-card / setting-row /
   s-label / s-desc) so a future enterprise.css pass applies unchanged. */

:root {
  --bg-app: #f5f6f8;
  --surface: #ffffff;
  --ink: #171a21;
  --ink-2: #5d6373;
  --ink-3: #9096a5;
  --hairline: #e3e5ec;
  --primary: #4f46e5;
  --primary-ink: #3b34b8;
  --nav-bg: #14161d;
  --nav-bg-2: #1b1e28;
  --nav-ink: #b8bdc9;
  --ok: #1a7f37;      --ok-bg: #e7f4ec;
  --warn: #9a6700;    --warn-bg: #fbf3e2;
  --bad: #b42318;     --bad-bg: #fbe9e7;
  --chip-bg: #eef0fb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg-app); color: var(--ink);
  font: 14px/1.55 -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 16px; height: 16px; stroke-width: 2; vertical-align: -3px; }

/* ── Shell: fixed side nav + main ── */
.shell { display: flex; min-height: 100vh; }
.sidenav {
  width: 232px; flex-shrink: 0; background: var(--nav-bg); color: var(--nav-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidenav .brand {
  padding: 20px 20px 16px; border-bottom: 1px solid #262b3a;
}
.sidenav .brand .logo { font-weight: 800; letter-spacing: .1em; font-size: 17px; color: #fff; }
.sidenav .brand .sub { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.sidenav .org {
  padding: 14px 20px; border-bottom: 1px solid #262b3a; font-size: 12.5px;
}
.sidenav .org .name { color: #fff; font-weight: 600; }
.sidenav .org .tier { margin-top: 4px; }
.sidenav nav { padding: 10px 10px; flex: 1; }
.sidenav nav .sec {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: #6b7180; padding: 14px 12px 6px;
}
.sidenav nav a {
  display: flex; align-items: center; gap: 10px;
  color: var(--nav-ink); padding: 8px 12px; font-weight: 500; font-size: 13px;
}
.sidenav nav a svg.i { stroke: currentColor; fill: none; opacity: .8; }
.sidenav nav a:hover { color: #fff; text-decoration: none; background: var(--nav-bg-2); }
.sidenav nav a.on { color: #fff; background: var(--nav-bg-2); box-shadow: inset 2px 0 0 var(--primary); }
.sidenav .foot { padding: 14px 20px; border-top: 1px solid #262b3a; font-size: 12px; color: #6b7180; }
.sidenav .foot a { color: var(--nav-ink); }

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

/* ── Top bar ── */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 52px; gap: 16px;
}
.topbar .crumb { font-size: 13px; color: var(--ink-2); }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.topbar .who { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 14px; }

/* ── Staff-view banner ── */
.staff-banner {
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #e8d9ad;
  padding: 8px 28px; font-size: 13px; font-weight: 600;
}
.staff-banner a { color: var(--warn); text-decoration: underline; margin-left: 8px; }

/* ── Flash messages ── */
.flashes { padding: 16px 28px 0; }
.flash {
  padding: 10px 16px; font-size: 13.5px; border: 1px solid var(--hairline);
  border-left-width: 3px; background: var(--surface); margin-bottom: 8px;
}
.flash.ok  { border-left-color: var(--ok);  }
.flash.err { border-left-color: var(--bad); background: var(--bad-bg); color: var(--bad); }

/* ── Page ── */
.team-wrap { padding: 24px 28px 64px; max-width: 1080px; width: 100%; }
.team-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.team-header h1 { font-size: 21px; font-weight: 700; margin: 0 0 3px; letter-spacing: -.01em; }
.team-header .sub { color: var(--ink-2); font-size: 13px; margin: 0; max-width: 70ch; }

/* ── Cards & rows ── */
.team-card {
  background: var(--surface); border: 1px solid var(--hairline);
  padding: 20px 22px; margin-bottom: 16px;
}
.team-card > h2 {
  font-size: 13px; font-weight: 700; margin: 0 0 14px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
}
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--hairline);
}
.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
.setting-row:first-of-type { padding-top: 0; }
.setting-info .s-label { font-weight: 600; font-size: 13.5px; }
.setting-info .s-desc { color: var(--ink-2); font-size: 12.5px; max-width: 62ch; }

/* ── Stat tiles ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--hairline); padding: 16px 18px; }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.stat .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 2px; }

/* ── Tables ── */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafbfd; }
.num { font-variant-numeric: tabular-nums; }
.tr { text-align: right; }

/* ── Chips & status ── */
.chip {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; background: var(--chip-bg); color: var(--primary-ink); text-transform: uppercase;
  white-space: nowrap;
}
.chip.ok   { background: var(--ok-bg);   color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad  { background: var(--bad-bg);  color: var(--bad); }
.chip.mute { background: #eef0f3; color: var(--ink-2); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.mute { background: var(--ink-3); }

/* ── Forms & buttons ── */
label.f { display: block; font-size: 12px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=number], input[type=date],
input[type=password], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink); font: inherit; border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.btn {
  display: inline-block; border: 1px solid var(--hairline); background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; font-size: 13px;
  padding: 8px 18px; cursor: pointer; border-radius: 0;
}
.btn:hover { border-color: var(--ink-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-danger { color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 18px; }
.inline-form { display: inline; }

/* ── Progress / journey ── */
.progress { background: #edeef3; height: 6px; margin: 8px 0 4px; }
.progress > span { display: block; height: 100%; background: var(--primary); }
.journey { display: flex; flex-direction: column; gap: 0; }
.jstep { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.jstep:last-child { border-bottom: none; }
.jstep .mark {
  width: 22px; height: 22px; border: 1px solid var(--hairline); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
  font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--surface);
}
.jstep.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.jstep .jt { font-weight: 600; font-size: 13.5px; }
.jstep .jd { color: var(--ink-2); font-size: 12.5px; max-width: 66ch; }

/* ── Activity feed ── */
.feed { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.feed li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.feed li:last-child { border-bottom: none; }
.feed .when { color: var(--ink-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Empty states ── */
.empty {
  text-align: center; padding: 36px 20px; color: var(--ink-2);
}
.empty svg.i { width: 28px; height: 28px; stroke: var(--ink-3); margin-bottom: 8px; }
.empty .et { font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.empty p { margin: 0 auto 14px; max-width: 52ch; font-size: 13px; }

/* ── Quote result ── */
.quote-out { border-left: 3px solid var(--primary); background: var(--chip-bg); padding: 14px 18px; margin-top: 14px; font-size: 13px; }
.quote-out .big { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Utility ── */
.mute { color: var(--ink-2); }
.small { font-size: 12.5px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mb0 { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.two-col .team-card { margin-bottom: 0; }

@media (max-width: 860px) {
  .sidenav { display: none; }
  .team-wrap { padding: 20px 16px 48px; }
  .topbar { padding: 0 16px; }
}

/* ── Login ── */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--nav-bg); }
.login-box { width: 400px; max-width: 92vw; }
.login-box .brand-big { color: #fff; font-weight: 800; letter-spacing: .1em; font-size: 24px; }
.login-box .brand-sub { color: #6b7180; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin: 4px 0 20px; }
.login-box .team-card { margin-bottom: 12px; }
.login-box .legal { color: #6b7180; font-size: 11.5px; line-height: 1.6; }
