/* Blackbird Scout: shared brand layer for the partner site and the admin panel.
   Palette from the Blackbird Laboratories artwork: logo ink, slate field with a teal glow, aqua-to-mint gradient. */
:root {
  --canvas: #f4f5f6; --surface: #ffffff; --surface-2: #f7f8f9; --hover: #f1f3f4;
  --ink: #353a41; --ink-2: #5b616a; --muted: #8b9199; --line: #e4e7ea; --line-2: #d2d7dc;
  --slate: #353a41; --on-slate: #ffffff; --on-slate-2: rgba(255, 255, 255, .64);
  --aqua: #2ef0dc; --teal: #0b7a73; --teal-soft: #e0f6f2;
  --brand-grad: linear-gradient(112deg, #c3f6de 0%, #63f0cf 34%, #2ef2e0 64%, #0cf2ff 100%);
  --good: #1c7c55; --good-soft: #e2f3ea; --warn: #9a5f08; --warn-soft: #fbf0db; --bad: #b2433b; --bad-soft: #fae6e4;
  --shadow: 0 1px 2px rgba(25, 30, 36, .05), 0 10px 28px rgba(25, 30, 36, .06);
  --radius: 14px; --radius-sm: 9px;
  --font: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --canvas: #1e2227; --surface: #272b31; --surface-2: #2d3238; --hover: #31373e;
  --ink: #eceef0; --ink-2: #b9bfc6; --muted: #8b939c; --line: #353b42; --line-2: #444b53;
  --teal: #4fe0d0; --teal-soft: #17332f;
  --good: #63d39c; --good-soft: #173226; --warn: #e7b65b; --warn-soft: #382d17; --bad: #f1897f; --bad-soft: #3c2220;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2); color-scheme: dark; } }
:root[data-theme="dark"] {
  --canvas: #1e2227; --surface: #272b31; --surface-2: #2d3238; --hover: #31373e;
  --ink: #eceef0; --ink-2: #b9bfc6; --muted: #8b939c; --line: #353b42; --line-2: #444b53;
  --teal: #4fe0d0; --teal-soft: #17332f;
  --good: #63d39c; --good-soft: #173226; --warn: #e7b65b; --warn-soft: #382d17; --bad: #f1897f; --bad-soft: #3c2220;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--ink); font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--teal); text-decoration: none; } a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); } .ink-2 { color: var(--ink-2); }

/* ---- brand header ---------------------------------------------------------------------------------------- */
.bb-header { background: var(--slate) url(/assets/scout-dark.jpg) 82% 18% / cover no-repeat; color: var(--on-slate);
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.bb-header-in { max-width: 1240px; margin: 0 auto; height: 68px; display: flex; align-items: center; gap: 28px; }
.lockup { display: flex; align-items: center; gap: 12px; color: var(--on-slate); text-decoration: none !important; flex: none; }
.lockup .mark { height: 24px; width: auto; display: block; }
.lockup .word { height: 25px; width: auto; display: block; }
.lockup .rule { width: 1px; height: 26px; background: rgba(255, 255, 255, .28); margin: 0 4px; }
.lockup .product { font-weight: 700; font-size: 17px; letter-spacing: .01em; }
.lockup .product small { font-weight: 600; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-slate-2); margin-left: 8px; vertical-align: 2px; }
.bb-nav { display: flex; gap: 4px; align-items: center; }
.bb-nav a, .bb-nav button { color: var(--on-slate-2); font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 8px; background: none; border: none; cursor: pointer; text-decoration: none; position: relative; }
.bb-nav a:hover, .bb-nav button:hover { color: var(--on-slate); background: rgba(255, 255, 255, .06); text-decoration: none; }
.bb-nav .on { color: var(--on-slate); }
.bb-nav .on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-grad); }
.bb-sp { flex: 1; }
.bb-user { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--on-slate-2); }
.bb-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad); color: var(--slate); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.bb-user button { background: none; border: 1px solid rgba(255, 255, 255, .22); color: var(--on-slate); border-radius: 8px; padding: 5px 11px; cursor: pointer; font-size: 13px; font-weight: 600; }
.bb-user button:hover { border-color: rgba(255, 255, 255, .5); }

/* ---- page scaffolding ------------------------------------------------------------------------------------ */
.bb-page { max-width: 1240px; margin: 0 auto; padding-block: 32px 72px;
  padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
.bb-page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.015em; margin: 0; line-height: 1.15; }
.page-head .sub { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.page-head .controls { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel + .panel { margin-top: 14px; }
.panel h3 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }

/* ---- controls ------------------------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.brand { background: var(--brand-grad); border-color: transparent; color: #24292f; }
.btn.brand:hover { filter: brightness(1.03) saturate(1.05); }
.btn.dark { background: var(--slate); border-color: var(--slate); color: #fff; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); padding-inline: 10px; }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 14px 22px; font-size: 15.5px; border-radius: 12px; }
select, input[type=text], input[type=search], input[type=number], input[type=date], input[type=email], input[type=password], textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
select:focus, input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
label.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }

.seg { display: inline-flex; padding: 3px; background: var(--hover); border-radius: 10px; gap: 2px; }
.seg button { border: none; background: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 18px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button .n { font-weight: 600; color: var(--muted); margin-left: 6px; font-size: 12.5px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--teal); }

/* ---- small parts --------------------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.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); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.teal { background: var(--teal); } .dot.good { background: var(--good); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 18px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.metric .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.metric .l { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.metric.accent { background: var(--slate); border-color: var(--slate); color: #fff; }
.metric.accent .l { color: var(--on-slate-2); }

.table-wrap { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: none; }
table.t td.num { text-align: right; font-weight: 700; } table.t th.num { text-align: right; }

details.more > summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 13.5px; color: var(--ink-2); padding: 4px 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-block; width: 16px; color: var(--teal); }
details.more[open] > summary::before { content: "–"; }

.progress { height: 6px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand-grad); border-radius: 999px; transition: width .3s ease; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.err { color: var(--bad); }
.loading { color: var(--muted); padding: 32px 0; text-align: center; font-size: 14px; }

.bb-user a, .bb-user button { white-space: nowrap; }
@media (max-width: 1120px) { .lockup .word, .lockup .rule { display: none; } .bb-header-in { gap: 18px; } }
@media (max-width: 920px) { .bb-user .link, .bb-user .name { display: none; } .bb-nav a, .bb-nav button { padding: 8px 8px; font-size: 13.5px; } .bb-nav .on::after { left: 8px; right: 8px; } }
@media (max-width: 760px) {
  .bb-header-in { gap: 14px; height: 60px; }
  .lockup .word, .lockup .rule { display: none; }
  .bb-nav .on::after { bottom: -10px; }
  .bb-user .name { display: none; }
  .page-head h1 { font-size: 22px; }
  .bb-page { padding-block: 22px 56px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
