/* Shared shadcn/ui theme roles for the Flask dashboard and sign-in page. */
:root {
  color-scheme: light;
  --background: #f8fafc;
  --foreground: #0f172a;
  --card: #ffffff;
  --muted-surface: #eef2f7;
  --muted-foreground: #475569;
  --border: #d9e1eb;
  --input: #9aa9ba;
  --primary: #1d4ed8;
  --primary-foreground: #ffffff;
  --ring: #2563eb;
  --destructive: #b91c1c;
  --radius: .65rem;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "PT Serif", Georgia, "Times New Roman", serif;
  --page: var(--background);
  --ink: var(--foreground);
  --surface: var(--card);
  --surface-2: var(--muted-surface);
  --ink-2: var(--muted-foreground);
  --muted: var(--muted-foreground);
  --accent: var(--ring);
  --bad-text: var(--destructive);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0d1421;
  --foreground: #f1f5f9;
  --card: #151e2d;
  --muted-surface: #1e2a3d;
  --muted-foreground: #aebed2;
  --border: #324159;
  --input: #6b7e99;
  --primary: #9ac0ff;
  --primary-foreground: #101b30;
  --ring: #8ab6ff;
  --destructive: #fca5a5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #0d1421;
    --foreground: #f1f5f9;
    --card: #151e2d;
    --muted-surface: #1e2a3d;
    --muted-foreground: #aebed2;
    --border: #324159;
    --input: #6b7e99;
    --primary: #9ac0ff;
    --primary-foreground: #101b30;
    --ring: #8ab6ff;
    --destructive: #fca5a5;
  }
}

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.btn, .ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.btn[hidden] { display: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:not(:disabled):hover, .ui-button:hover { background: var(--muted-surface); }
.ui-primary, .ui-primary:not(:disabled):hover {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-foreground);
}
.ui-primary:not(:disabled):hover { filter: brightness(.92); }
.ui-input {
  min-height: 36px;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  padding: 6px 10px;
  font: inherit;
}
.ui-card { border: 1px solid var(--border); border-radius: calc(var(--radius) + 3px); background: var(--card); }
