/* 3 API skin for the New API app (sign-in, sign-up, prices, dashboard, keys, wallet, logs).
   Injected by the front door (server/gateway.mjs) into every app page.
   v2: the landing page's look — pure black, Geist, white primary buttons, blue accent, hairline borders. */
@import url("/x/vendor/fonts/geist/geist.css");

html.dark,
html.dark [data-theme-preset] {
  --radius: 0.75rem !important;
  --font-ui-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;

  --background: #000000 !important;
  --foreground: #fafafa !important;
  --card: #0a0a0a !important;
  --card-foreground: #fafafa !important;
  --popover: #0a0a0a !important;
  --popover-foreground: #fafafa !important;
  --primary: #fafafa !important;
  --primary-foreground: #0a0a0a !important;
  --secondary: #171717 !important;
  --secondary-foreground: #fafafa !important;
  --muted: #111111 !important;
  --muted-foreground: #a3a3a3 !important;
  --accent: #171717 !important;
  --accent-foreground: #fafafa !important;
  --destructive: #ef4444 !important;
  --destructive-foreground: #ffffff !important;
  --success: #22c55e !important;
  --success-foreground: #03140a !important;
  --warning: #f59e0b !important;
  --warning-foreground: #1a1000 !important;
  --info: #3b82f6 !important;
  --info-foreground: #ffffff !important;
  --neutral: #1f1f1f !important;
  --neutral-foreground: #fafafa !important;
  --border: #1c1c1c !important;
  --input: #262626 !important;
  --ring: #3b82f6 !important;
  --chart-1: #3b82f6 !important;
  --chart-2: #22c55e !important;
  --chart-3: #f59e0b !important;
  --chart-4: #a78bfa !important;
  --chart-5: #2dd4bf !important;
  --sidebar: #050505 !important;
  --sidebar-foreground: #d4d4d4 !important;
  --sidebar-primary: #fafafa !important;
  --sidebar-primary-foreground: #0a0a0a !important;
  --sidebar-accent: #171717 !important;
  --sidebar-accent-foreground: #fafafa !important;
  --sidebar-border: #171717 !important;
  --sidebar-ring: #3b82f6 !important;
  --skeleton-base: #111111 !important;
  --skeleton-highlight: #1c1c1c !important;
}

html.dark { color-scheme: dark; }

/* Pure black with the landing page's soft top-left wash */
html.dark body {
  background:
    radial-gradient(1100px 640px at 0% -10%, rgba(200, 208, 220, 0.07), transparent 62%),
    radial-gradient(900px 520px at 100% -12%, rgba(59, 130, 246, 0.07), transparent 60%),
    #000 !important;
  background-attachment: fixed !important;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: rgba(59, 130, 246, 0.45); color: #fff; }

html.dark h1,
html.dark h2 {
  font-family: "Geist", system-ui, sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em;
}

/* Inputs: hairline border, blue focus */
html.dark input,
html.dark textarea {
  caret-color: #3b82f6;
}
html.dark input:focus-visible,
html.dark textarea:focus-visible,
html.dark button:focus-visible,
html.dark a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(59, 130, 246, 0.9) !important;
}

/* Primary buttons: white, like the landing page */
html.dark button[class*="bg-primary"]:not([disabled]),
html.dark a[class*="bg-primary"] {
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition: background-color 0.15s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.dark button[class*="bg-primary"]:not([disabled]):hover,
html.dark a[class*="bg-primary"]:hover {
  background-color: #e5e5e5 !important;
}

/* Cards: the landing page's glassy edge */
html.dark [class*="bg-card"] {
  border-color: rgba(255, 255, 255, 0.08) !important;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008) 65%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Links in running text */
html.dark main a:not([class*="bg-"]):not([role]) { text-underline-offset: 3px; }

/* Scrollbars */
html.dark ::-webkit-scrollbar { width: 10px; height: 10px; }
html.dark ::-webkit-scrollbar-track { background: #000; }
html.dark ::-webkit-scrollbar-thumb { background: #1f1f1f; border-radius: 6px; border: 2px solid #000; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #2e2e2e; }

/* Sign-in / sign-up / reset (the pages with a password field) */
html.dark body:has(input[type="password"]) {
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(59, 130, 246, 0.12), transparent 64%),
    radial-gradient(700px 420px at 0% 0%, rgba(200, 208, 220, 0.06), transparent 60%),
    #000 !important;
}
html.dark body:has(input[type="password"]) h2.text-2xl.tracking-tight {
  font-size: 2rem !important;
  line-height: 1.1 !important;
  letter-spacing: -0.04em !important;
}
html.dark body:has(input[type="password"]) h2.text-2xl.tracking-tight::before {
  content: "3 API · ACCOUNT";
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.9rem;
  font: 500 12px/1 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.12em;
  color: #a3a3a3;
}
