/* Tiingo MCP Server — auth pages */

:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5b6577;
  --line: #d9dfe8;
  --accent: #1f6f4a;
  --accent-text: #ffffff;
  --error-bg: #fdecec;
  --error-text: #8f1f1f;
  --context-bg: #eef4f0;
  --focus: #2f7fd4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d;
    --card: #1b2230;
    --text: #e8ecf3;
    --muted: #9aa5b5;
    --line: #303a4c;
    --accent: #2e9e6b;
    --accent-text: #0c1310;
    --error-bg: #3a1d1f;
    --error-text: #f2b0b0;
    --context-bg: #1e2b26;
    --focus: #6fb1f0;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 1.5rem 1rem;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 560px;
  padding: 0.25rem 0 1rem;
}

.site-name { font-weight: 650; letter-spacing: 0.01em; }

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
}

h1 { font-size: 1.35rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0.5rem 0; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
}

a { color: var(--focus); }

.lede { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }
.help { color: var(--muted); font-size: 0.85rem; margin: 0.35rem 0 1rem; }

.endpoints dt { margin-top: 0.75rem; }
.endpoints dd { margin: 0.15rem 0 0 0; color: var(--muted); }

.context-box {
  background: var(--context-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.grant-details { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0.5rem 0 0; }
.grant-details dt { color: var(--muted); }
.grant-details dd { margin: 0; overflow-wrap: anywhere; }

.error-box {
  background: var(--error-bg);
  color: var(--error-text);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

label { display: block; font-weight: 600; margin-bottom: 0.4rem; }

input[type="password"], input[type="text"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.key-row { display: flex; gap: 0.5rem; }
.key-row input { flex: 1; }

button {
  font: inherit;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  border: 1px solid transparent;
}

button.primary {
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 650;
  margin-top: 0.5rem;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.consent-actions { display: flex; flex-direction: row-reverse; gap: 0.75rem; margin-top: 1.25rem; }
.consent-actions .primary { width: auto; flex: 1; margin-top: 0; }
.consent-actions .ghost { flex: 1; }

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

.site-footer {
  width: 100%;
  max-width: 560px;
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: no-preference) {
  button.primary { transition: filter 120ms ease; }
  button.primary:hover { filter: brightness(1.07); }
}
