/* NP design system. Shared by the website and the dashboard.
   Principles: one accent colour, 1px borders over shadows, small radii, tabular numbers, a strict type scale. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/InterDisplay-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #07090d;
  --bg-raised: #0a0d13;
  --surface: #0d1118;
  --surface-2: #121722;
  --surface-3: #171e2b;
  --line: #1b2230;
  --line-2: #252e3f;
  --line-3: #313c51;
  --text: #e5e9f0;
  --text-2: #b9c1cf;
  --muted: #8892a4;
  --dim: #5c6577;
  --accent: #3d7eff;
  --accent-hi: #6b9cff;
  --accent-lo: #2a5fd1;
  --accent-wash: rgba(61, 126, 255, 0.10);
  --accent-ring: rgba(61, 126, 255, 0.35);
  --ok: #2fb47c;  --ok-wash: rgba(47, 180, 124, 0.12);
  --warn: #d99a2b; --warn-wash: rgba(217, 154, 43, 0.12);
  --bad: #e05252;  --bad-wash: rgba(224, 82, 82, 0.12);
  --sev1: #5c6577; --sev2: #3d7eff; --sev3: #d99a2b; --sev4: #e05252;
  --r-sm: 3px; --r: 5px; --r-lg: 7px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --display: "Inter Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "calt"; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
p { margin: 0; }
a { color: var(--accent-hi); text-decoration: none; }
a:hover { color: #9dbcff; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
code, kbd, pre, .mono { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: var(--r-sm); color: var(--text-2); }
pre { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow: auto; color: var(--text-2); line-height: 1.6; margin: 0; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-sm); padding: 0 5px; font-size: 11px; color: var(--muted); background: var(--surface); }
::selection { background: rgba(61, 126, 255, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .text-2 { color: var(--text-2); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: 500 13px/1 var(--font); cursor: pointer;
  white-space: nowrap; transition: background .12s, border-color .12s, color .12s; text-decoration: none; }
.btn:hover { background: var(--surface-3); border-color: var(--line-3); color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ico { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #4f8bff; border-color: #4f8bff; }
.btn.danger { background: transparent; border-color: rgba(224, 82, 82, .45); color: #f08a8a; }
.btn.danger:hover { background: var(--bad-wash); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { height: 27px; padding: 0 9px; font-size: 12.5px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.icon { width: 32px; padding: 0; }
.btn.sm.icon { width: 27px; }

/* forms */
input, select, textarea { width: 100%; height: 32px; padding: 0 10px; background: var(--bg-raised); color: var(--text); border: 1px solid var(--line-2);
  border-radius: var(--r); font: 13.5px var(--font); transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 78px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
input[type="checkbox"], input[type="radio"] { width: 15px; height: 15px; accent-color: var(--accent); }
input[type="range"] { height: 20px; padding: 0; background: transparent; border: 0; accent-color: var(--accent); }
input[type="file"] { height: auto; padding: 6px; }
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 13px, calc(100% - 10px) 13px; background-size: 4px 4px; background-repeat: no-repeat; }
.field { display: grid; gap: 5px; }
.field > span, .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field small, .help { font-size: 12px; color: var(--dim); }

/* badges / chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font: 500 11.5px/1 var(--font);
  border: 1px solid var(--line-2); color: var(--muted); background: transparent; white-space: nowrap; vertical-align: middle; }
.badge.ok { color: #5fd3a2; border-color: rgba(47, 180, 124, .35); background: var(--ok-wash); }
.badge.warn { color: #f0bd61; border-color: rgba(217, 154, 43, .35); background: var(--warn-wash); }
.badge.bad { color: #f08a8a; border-color: rgba(224, 82, 82, .4); background: var(--bad-wash); }
.badge.accent { color: var(--accent-hi); border-color: var(--accent-ring); background: var(--accent-wash); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; display: inline-block; }
.dot.live { box-shadow: 0 0 0 0 currentColor; animation: live 2.4s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(47, 180, 124, .5); } 70% { box-shadow: 0 0 0 5px rgba(47, 180, 124, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 180, 124, 0); } }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 26px; height: 26px; }
.brand b { font: 700 15px/1 var(--display); letter-spacing: .02em; }
.brand small { display: block; font: 600 9.5px/1 var(--font); letter-spacing: .2em; color: var(--dim); margin-top: 3px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
