/* login.css — design tokens mirrored from the dashboard's
   demo-ui/frontend/src/index.css (shadcn-base-nova theme, dark by default,
   light via [data-theme="light"]). Hand-crafted minimal utility set; no
   Tailwind build step. Update both files in lockstep when tokens change. */

:root {
  --background: #0f0f0f;
  --foreground: #f5f5f5;
  --card: #1a1a1a;
  --card-foreground: #f5f5f5;
  --primary: #000000;
  --primary-foreground: #ffffff;
  --muted: #1e1e1e;
  --muted-foreground: #999590;
  --accent: #2a2824;
  --accent-foreground: #f5f2ef;
  --destructive: #f87171;
  --border: #333330;
  --input: #252523;
  --ring: rgb(147 197 253 / 0.5);
  --radius: 0.75rem;

  --r-comfortable: 10px;
  --r-card: 16px;
  --elevation-05: rgba(255, 255, 255, 0.06) 0 0 0 0.5px inset;
  --elevation-1: rgba(255, 255, 255, 0.06) 0 0 0 1px,
                 rgba(0, 0, 0, 0.2) 0 1px 2px,
                 rgba(0, 0, 0, 0.2) 0 2px 4px;
}

.light, [data-theme="light"] {
  --background: #ffffff;
  --foreground: #000000;
  --card: #ffffff;
  --card-foreground: #000000;
  --primary: #000000;
  --primary-foreground: #ffffff;
  --muted: #f5f5f5;
  --muted-foreground: #4e4e4e;
  --accent: #f5f2ef;
  --accent-foreground: #000000;
  --destructive: #ef4444;
  --border: #e5e5e5;
  --input: #f5f5f5;
  --ring: rgb(147 197 253 / 0.5);

  --elevation-05: rgba(0, 0, 0, 0.075) 0 0 0 0.5px inset;
  --elevation-1: rgba(0, 0, 0, 0.06) 0 0 0 1px,
                 rgba(0, 0, 0, 0.04) 0 1px 2px,
                 rgba(0, 0, 0, 0.04) 0 2px 4px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--elevation-1);
  padding: 2rem;
  width: min(400px, 100%);
}

.wordmark {
  display: block;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--foreground);
  text-decoration: none;
  margin-bottom: 1.75rem;
}
.wordmark span { color: var(--muted-foreground); }

.field { margin-bottom: 1rem; }

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.35rem;
}

.field-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--input);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--r-comfortable);
  box-shadow: var(--elevation-05);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input::placeholder { color: var(--muted-foreground); }
.field-input:focus {
  border-color: var(--foreground);
  box-shadow: var(--elevation-05), 0 0 0 2px var(--ring);
}

.field-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.field-remember input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--foreground);
  cursor: pointer;
}
.field-remember label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  cursor: pointer;
  user-select: none;
}

.btn-submit {
  width: 100%;
  padding: 0.65rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: 1px solid var(--primary);
  border-radius: var(--r-comfortable);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-submit:hover { opacity: 0.9; }
.btn-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

.error-msg {
  background: color-mix(in srgb, var(--destructive) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--destructive) 40%, transparent);
  border-radius: var(--r-comfortable);
  color: var(--destructive);
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.hint {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  text-align: center;
  margin-top: 1.25rem;
}

/* ── Cloud-only: social auth (Google / GitHub) ───────────────── */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}
.divider hr {
  flex: 1;
  border: none;
  border-top: 1px solid var(--border);
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.6rem;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--r-comfortable);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  margin-bottom: 0.5rem;
  transition: background 0.15s, border-color 0.15s;
}
.btn-social:hover {
  background: var(--muted);
  border-color: var(--muted-foreground);
}
.btn-social svg { flex-shrink: 0; }
