/* ============================================================
   GENERATED — do not edit. Source: @metrifi/brand + resources/css/auth-overrides.css
   Regenerate with: npm run sync:brand
   ============================================================ */

/* ============================================================
   MetriFi Brand — typefaces
   Loads Space Grotesk (display) + Inter (body) from Google Fonts.
   The monospace face is the system stack (no web font needed).

   Import this once near the top of your app. If you self-host
   fonts, skip this file and provide your own @font-face rules
   that resolve "Space Grotesk" and "Inter".
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap");

/* ============================================================
   MetriFi Brand — "Instrument" design tokens
   The single source of truth. Dark-only. Import this anywhere
   you need MetriFi colors, type, radii, motion, or rails.

   This file is PURE tokens — no element styles, no font loading.
   Pair with fonts.css (to load the typefaces) and base.css /
   components.css (for element + component styles), or just use
   index.css for the whole system at once.
   ============================================================ */

:root {
  /* ---- Surfaces (dark-only) ---- */
  --canvas:   #0F0A1A; /* page background */
  --surface:  #1A1230; /* cards, panels */
  --elevated: #241845; /* raised surfaces, hovers */

  /* ---- Accents ----
     Violet is a CANVAS-ONLY accent (emphasis on the page background).
     On a surface/card, the accent flips to green. See DESIGN.md. */
  --violet:        #A074FF;
  --violet-hover:  #B088FF;
  --green:         #7DD4AA;
  --green-hover:   #93E0BB;

  /* ---- Status ---- */
  --gold: #D4B84A;
  --red:  #E85D56;

  /* ---- Text ---- */
  --text:      #E8E4F0; /* primary */
  --muted:     #A89FC0; /* secondary / labels */
  --dark-text: #0F0A1A; /* text on green/violet fills */

  /* ---- Hairlines ---- */
  --line-faint:  rgba(255, 255, 255, 0.06);
  --line:        rgba(255, 255, 255, 0.08);
  --line-soft:   rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* ---- Tinted washes ---- */
  --violet-08: rgba(160, 116, 255, 0.08);
  --violet-12: rgba(160, 116, 255, 0.12);
  --violet-20: rgba(160, 116, 255, 0.20);
  --green-08:  rgba(125, 212, 170, 0.08);
  --green-12:  rgba(125, 212, 170, 0.12);
  --green-20:  rgba(125, 212, 170, 0.20);

  /* ---- Semantic aliases ---- */
  --bg-page:    var(--canvas);
  --cta:        var(--green);  /* primary action fill */
  --cta-text:   var(--canvas); /* text on the CTA */
  --cta-hover:  var(--violet); /* CTA hover flips to violet */
  --focus-ring: var(--violet);

  /* ---- Typography ---- */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  /* ---- Radii ----
     Buttons are nearly square (2px) — a signature of the system. */
  --radius-button: 2px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* ---- Motion ---- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Elevation ---- */
  --inset-hi:  inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.65);

  /* ---- Page rails ----
     The 1240px frame uses hairline vertical rails + <hr> rules. */
  --rail:   rgba(255, 255, 255, 0.06);
  --rail-2: rgba(255, 255, 255, 0.10);
}

/* ============================================================
   MetriFi Brand — base element styles
   Opinionated resets + element defaults that express the
   Instrument voice. Depends on tokens.css (import it first,
   or use index.css which bundles everything).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

/* Emphasis: violet on the canvas, green on a surface/card.
   Add .mf-surface to a card/panel to flip the accent. */
h1 em, h2 em, h3 em { color: var(--violet); font-style: normal; }
.mf-surface h2 em, .mf-surface h3 em { color: var(--green); }

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--violet-20); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Utilities */
.mono { font-family: var(--font-mono); }
.tab  { font-variant-numeric: tabular-nums lining-nums; }

/* ============================================================
   MetriFi Brand — shared components
   Plain-CSS building blocks used across MetriFi surfaces
   (auth pages, simple forms, consent screens). Depends on
   tokens.css. For React/Tailwind apps you'll often style with
   the tokens directly instead — these are here for server-
   rendered views (Blade, plain HTML) that want ready classes.
   ============================================================ */

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: 400px; }
.row  { display: flex; gap: 10px; }
.row .btn, .row .btn-ghost { margin-top: 0; }

/* ---- Brand mark ---- */
.logo { display: block; height: 26px; margin: 0 auto 26px; }

/* ---- Headings on the canvas ---- */
.title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0 0 6px;
  color: var(--text);
}
.title em { color: var(--violet); font-style: normal; } /* canvas accent = violet */
.sub { color: var(--muted); text-align: center; margin: 0 0 24px; font-size: 14px; }

/* ---- Card / panel ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--inset-hi);
}

/* ---- Monospace field labels — the Instrument voice ---- */
label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 7px;
}
label:first-of-type { margin-top: 0; }

/* ---- Inputs ---- */
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
input::placeholder { color: var(--muted); opacity: 0.7; }
input:focus { outline: none; border-color: var(--violet); }

/* ---- Primary CTA: green fill, canvas text, hover flips to violet ---- */
.btn {
  width: 100%;
  margin-top: 24px;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-button);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  background: var(--green);
  color: var(--canvas);
  transition: background 140ms var(--ease-standard);
}
.btn:hover  { background: var(--violet); }
.btn:active { transform: translateY(1px); }

/* ---- Secondary / ghost: violet text + border ---- */
.btn-ghost {
  background: transparent;
  color: var(--violet);
  border: 1.5px solid var(--violet);
}
.btn-ghost:hover {
  background: transparent;
  color: var(--violet-hover);
  border-color: var(--violet-hover);
}

/* ---- Error block ---- */
.err {
  background: rgba(232, 93, 86, 0.10);
  border: 1px solid rgba(232, 93, 86, 0.35);
  color: #F2A6A1;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.5;
}

/* ---- On-card accent = green (violet is canvas-only) ---- */
.foot { color: var(--muted); text-align: center; font-size: 13px; margin-top: 20px; line-height: 1.5; }
.foot a, .link { color: var(--green); font-weight: 500; }

/* ---- Consent / scope list ---- */
.scopes { list-style: none; padding: 0; margin: 0 0 20px; }
.scopes li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.scopes li:last-child { border-bottom: 0; }
.scopes li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
}
.who { color: var(--muted); text-align: center; font-size: 12px; margin-top: 18px; font-family: var(--font-mono); }

/* ============================================================
   IdP auth-page layout — APP-LEVEL, not part of the design system.
   The shared @metrifi/brand package owns tokens + components; how
   THIS app lays out its single-card auth pages is its own concern.
   This file is appended to the generated public/metrifi.css by
   scripts/sync-brand.mjs. Edit here, then run `npm run sync:brand`.
   ============================================================ */

/* Center the auth card in the viewport. */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
