/* Auth — login / password pages (aligned with cases studio theme) */

:root {
  --auth-bg: #eef3f9;
  --auth-bg-tint-a: rgba(0, 194, 168, 0.12);
  --auth-bg-tint-b: rgba(47, 124, 255, 0.10);
  --auth-surface: #ffffff;
  --auth-surface-2: #f6f9fd;
  --auth-border: #e2e9f2;
  --auth-border-strong: rgba(0, 194, 168, 0.45);
  --auth-text: #0f1b2d;
  --auth-text-soft: #3c4a60;
  --auth-text-muted: #7c8aa1;
  --auth-mint: #00c2a8;
  --auth-mint-strong: #02a890;
  --auth-blue: #2f7cff;
  --auth-radius: 20px;
  --auth-radius-sm: 10px;
  --auth-shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.05), 0 2px 8px rgba(15, 27, 45, 0.04);
  --auth-shadow: 0 8px 30px rgba(28, 55, 90, 0.10), 0 2px 8px rgba(28, 55, 90, 0.06);
  --auth-glow: 0 0 0 4px rgba(0, 194, 168, 0.14);
  --auth-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
}

body:has(.auth-page) {
  background: var(--auth-bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 15% -10%, var(--auth-bg-tint-a), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 0%, var(--auth-bg-tint-b), transparent 55%);
  background-attachment: fixed;
  color: var(--auth-text);
  font-family: var(--auth-font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body:has(.auth-page) > header,
body:has(.auth-page) > main {
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}

body:has(.auth-page) > main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem 3rem;
  box-sizing: border-box;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(0, 194, 168, 0.05), transparent 70%),
    linear-gradient(180deg, var(--auth-surface), var(--auth-surface-2));
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--auth-shadow), inset 0 1px 0 #ffffff;
}

.auth-brand {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  text-align: center;
  background: linear-gradient(120deg, var(--auth-text) 20%, var(--auth-mint-strong) 110%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  margin: 1.15rem 0 1.25rem;
  padding: 0.25rem;
  border-radius: 12px;
  background: rgba(15, 27, 45, 0.05);
  border: 1px solid var(--auth-border);
}

.auth-switcher__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 9px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--auth-text-muted);
  background: transparent;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.auth-switcher__tab:hover {
  color: var(--auth-text-soft);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.55);
}

.auth-switcher__tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-mint) 0%, var(--auth-mint-strong) 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 194, 168, 0.28);
}

.auth-switcher__tab.is-active:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-mint-strong) 0%, #028a75 100%);
}

.auth-switcher__tab:focus-visible {
  outline: none;
  box-shadow: var(--auth-glow);
}

.auth-subtitle {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-text-muted);
}

.auth-eyebrow {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-mint-strong);
}

.auth-hint {
  margin: 0;
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 500;
  color: var(--auth-text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.auth-field label {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--auth-text-muted);
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"],
.auth-field input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  padding: 0.7rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-text);
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow-sm);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.auth-field input::placeholder {
  color: #a8b4c4;
  font-weight: 400;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--auth-border-strong);
  background: #fff;
  box-shadow: var(--auth-glow);
}

.auth-field--checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.625rem;
}

.auth-field--checkbox input[type="checkbox"] {
  width: 1.0625rem;
  height: 1.0625rem;
  margin: 0;
  accent-color: var(--auth-mint);
  cursor: pointer;
}

.auth-field--checkbox label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--auth-text-soft);
  cursor: pointer;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.auth-btn {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--auth-radius-sm);
  padding: 0.75rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--auth-mint) 0%, var(--auth-mint-strong) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 194, 168, 0.28);
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.auth-btn:hover {
  background: linear-gradient(135deg, var(--auth-mint-strong) 0%, #028a75 100%);
  box-shadow: 0 6px 18px rgba(0, 194, 168, 0.34);
  transform: translateY(-1px);
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--auth-border);
}

.auth-links a {
  color: var(--auth-blue);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
}

.auth-links a:hover {
  text-decoration: underline;
  color: var(--auth-mint-strong);
}

.auth-errors {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  margin-bottom: 0.25rem;
}

.auth-errors h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 650;
}

.auth-errors ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem 1.25rem 1.35rem;
  }

  .auth-brand {
    font-size: 1.35rem;
  }
}
