/* =========================================================
   Design tokens
   Monochrome-first control panel: black/white/gray carry the
   interface, one accent is reserved for primary actions and
   active/data states, one typeface throughout (weight does the
   hierarchy work, not a second display font).
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --border: #e9e9ec;
  --border-strong: #d6d6db;

  --ink: #0b0b0f;
  --ink-soft: #1c1c22;
  --text: #0b0b0f;
  --text-muted: #6b6b76;
  --text-faint: #9d9da6;

  --text-on-ink: #f3f3f5;
  --text-on-ink-muted: #97979f;

  --accent: #5b52e8;
  --accent-hover: #4a41d1;
  --accent-wash: #f1effe;
  --accent-border: #d9d6fb;

  --highlight: #f5a524;
  --highlight-wash: #fef6e7;
  --danger: #d1453a;
  --danger-wash: #fdefed;

  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  /* Marketing-page headings only — a distinct display face creates real
     typographic hierarchy against the body text, instead of one font doing
     every job. The dashboard keeps --font-body throughout; this token is
     only referenced from marketing.css. */
  --font-display: "Plus Jakarta Sans", var(--font-body);

  --radius-sm: 6px;
  --radius-md: 10px;
  --sidebar-w: 240px;

  --shadow-xs: 0 1px 2px rgba(11, 11, 15, 0.04);
  --shadow-sm: 0 1px 3px rgba(11, 11, 15, 0.06), 0 1px 2px rgba(11, 11, 15, 0.04);

  /* A back-out curve — overshoots slightly then settles, the "spring
     physics" feel Framer Motion gives dub.co, approximated in plain CSS. */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  overflow-x: hidden; /* safety net — nothing should ever need horizontal body scroll */
}

h1, h2, h3 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0;
}

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

button { font-family: var(--font-body); cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono { font-family: var(--font-mono); font-variant-ligatures: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  transition: background 140ms ease, border-color 140ms ease, transform 100ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary {
  background: var(--ink);
  color: var(--text-on-ink);
}
.btn-primary:hover { background: var(--ink-soft); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--text-faint); }

.btn-sm { padding: 5px 9px; font-size: 12px; }

/* ---- inputs ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="datetime-local"] {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
input::placeholder { color: var(--text-faint); }

/* ---- toast / inline messages ---- */
.msg {
  font-size: 12.5px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.msg-error { background: var(--danger-wash); color: var(--danger); border-color: #f6d9d5; }
.msg-success { background: var(--accent-wash); color: var(--accent-hover); border-color: var(--accent-border); }

/* ---- badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-hover);
}
