/* ─── Login / Setup page ─────────────────────────────────────── */

:root {
  --bg:         #F7F9FC;
  --accent:     #5BA4CF;
  --text:       #2D3748;
  --text-muted: #718096;
  --border:     #E2E8F0;
  --danger:     #FC8181;
  --danger-bg:  #FFF5F5;
  --card-bg:    #FFFFFF;
  --shadow:     0 8px 40px rgba(0,0,0,.12);
}

[data-theme="dark"] {
  --bg:         #141C28;
  --accent:     #63B3ED;
  --text:       #E2E8F0;
  --text-muted: #8A9BB0;
  --border:     #2D3D52;
  --danger:     #FC8181;
  --danger-bg:  #2D1515;
  --card-bg:    #1E2738;
  --shadow:     0 8px 40px rgba(0,0,0,.5);
}

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

html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
}

.login-wrap {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}

/* Brand */
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-brand svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.login-brand span {
  font-family: 'Nunito', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
}

/* Heading */
h1 {
  font-family: 'Nunito', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.2;
}

.login-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Error banner */
.login-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--danger);
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.login-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Fields */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: var(--card-bg);
}

/* Submit */
.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: background 140ms, transform 100ms;
}

.btn-submit:hover  { background: #4892bd; }
.btn-submit:active { transform: scale(.98); }
