/* Saviorways panel — login / public auth (no Tailwind CDN) */
:root {
  --forest: #154f2e;
  --forest-deep: #0f3820;
  --sky: #268ff9;
  --sky-hover: #1e7ad4;
  --font-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: #0f172a;
  background: #f8fafc;
}

.dark body.auth-page {
  color: #f1f5f9;
  background: #0c1222;
}

.auth-bg-a {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 10% -15%, rgba(38, 143, 249, 0.14), transparent 52%);
}

.dark .auth-bg-a {
  background: radial-gradient(ellipse 90% 60% at 10% -15%, rgba(38, 143, 249, 0.18), transparent 52%);
}

.auth-bg-b {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 70% 45% at 92% 8%, rgba(21, 79, 46, 0.11), transparent 48%);
}

.dark .auth-bg-b {
  background: radial-gradient(ellipse 70% 45% at 92% 8%, rgba(21, 79, 46, 0.28), transparent 48%);
}

.auth-shell {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  flex-direction: column-reverse;
}

@media (min-width: 1024px) {
  .auth-shell { flex-direction: row; }
}

.auth-brand {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 2.5rem 2rem;
  color: #fff;
  background: linear-gradient(to bottom right, var(--forest), var(--forest-deep), #0f172a);
}

@media (min-width: 1024px) {
  .auth-brand {
    max-width: 46%;
    padding: 4rem 2.5rem 4rem 3rem;
  }
}

.auth-brand-glow-a {
  pointer-events: none;
  position: absolute;
  top: -6rem;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  background: rgba(38, 143, 249, 0.25);
  filter: blur(48px);
}

.auth-brand-glow-b {
  pointer-events: none;
  position: absolute;
  bottom: -4rem;
  left: 25%;
  width: 14rem;
  height: 14rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(32px);
}

.auth-brand-inner { position: relative; z-index: 1; }

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.auth-logo-box {
  display: flex;
  height: 3.5rem;
  width: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--sky), #2563eb);
  box-shadow: 0 10px 25px rgba(38, 143, 249, 0.3);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-brand-sub { font-size: 0.875rem; color: rgba(209, 250, 229, 0.9); }

.auth-headline {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
}

.auth-lead {
  margin-top: 1.25rem;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.625;
  color: rgba(209, 250, 229, 0.85);
}

.auth-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 3rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.8);
}

.auth-tag {
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
}

.auth-form-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

@media (min-width: 640px) {
  .auth-form-col { padding: 3rem 2rem; }
}

.auth-card {
  width: 100%;
  max-width: 28rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  box-shadow: 0 25px 60px -12px rgba(21, 79, 46, 0.12), 0 8px 20px rgba(38, 143, 249, 0.06);
  backdrop-filter: blur(16px);
}

.dark .auth-card {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.75);
}

@media (min-width: 640px) {
  .auth-card { padding: 2.5rem; }
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

.dark .auth-card h2 { color: #fff; }

.auth-card-intro {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
}

.dark .auth-card-intro { color: #94a3b8; }

.auth-alert {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #7f1d1d;
}

.dark .auth-alert {
  border-color: rgba(127, 29, 29, 0.5);
  background: rgba(69, 10, 10, 0.5);
  color: #fecaca;
}

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

.auth-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.dark .auth-label { color: #cbd5e1; }

.auth-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(38, 143, 249, 0.2);
}

.dark .auth-input {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
}

.auth-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(to right, var(--sky), var(--sky-hover));
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(38, 143, 249, 0.25);
  transition: transform 0.1s, box-shadow 0.15s;
}

.auth-btn:hover {
  box-shadow: 0 12px 28px rgba(38, 143, 249, 0.35);
}

.auth-btn:active { transform: scale(0.99); }

.auth-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}

.dark .auth-footer {
  border-color: #334155;
  color: #64748b;
}

.auth-footer a {
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

.auth-theme-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  display: flex;
  height: 2.75rem;
  width: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dark .auth-theme-btn {
  border-color: #475569;
  background: rgba(30, 41, 59, 0.9);
  color: #fde68a;
}

.dark .auth-theme-icon-light { display: none; }
:not(.dark) .auth-theme-icon-dark { display: none; }

.auth-spinner {
  display: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 9999px;
  animation: auth-spin 0.7s linear infinite;
}

.auth-form.is-submitting .auth-spinner { display: inline-block; }
.auth-form.is-submitting .auth-btn { pointer-events: none; opacity: 0.9; }

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}
