/* Auth design tokens (matching the Flutter auth screens) */
:root {
  --auth-bg: #f8fdfe;
  --auth-fg: #1b2328;
  --auth-primary: #008687;
  --auth-accent: #00aec8;
  --auth-muted: #616a71;
  --auth-border: #dee6e9;
  --auth-desktop-bp: 1024px;
}

/* ── Full-page layout ───────────────────────────────────── */

.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--auth-bg);
}

.auth-layout {
  flex: 1;
  display: flex;
}

@media (max-width: 1023px) {
  .auth-layout {
    flex-direction: column;
  }
}

/* ── Form panel ─────────────────────────────────────────── */

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 31.25rem;
}

@media (min-width: 1024px) {
  .auth-form-panel {
    padding: 2.5rem 2.5rem;
  }

  .auth-form-wrap {
    max-width: 35rem;
  }
}

/* ── Hero panel ─────────────────────────────────────────── */

.auth-hero-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent), rgba(0, 134, 135, 0.8));
  display: none;
}

@media (min-width: 1024px) {
  .auth-hero-panel {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.auth-hero-circles {
  position: absolute;
  inset: 0;
  opacity: 0.10;
  pointer-events: none;
}

.auth-hero-circles::before,
.auth-hero-circles::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(248, 253, 254, 0.2);
  filter: blur(64px);
}

.auth-hero-circles::before {
  width: 16rem;
  height: 16rem;
  top: 5rem;
  left: 5rem;
}

.auth-hero-circles::after {
  width: 24rem;
  height: 24rem;
  right: 5rem;
  bottom: 5rem;
}

.auth-hero-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 3rem;
  max-width: 37.5rem;
  color: #fff;
}

.auth-hero-heading {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
}

.auth-hero-heading h2 {
  margin: 0;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.2px;
  color: #fff;
  white-space: pre-line;
}

.auth-hero-heading img {
  height: 4rem;
  flex-shrink: 0;
}

.auth-hero-lead {
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: rgba(255, 255, 255, 0.9);
}

/* Stats row */
.auth-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.auth-hero-stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.auth-hero-stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.25rem;
}

/* Trust chips */
.auth-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.auth-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.auth-hero-chip-icon {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-hero-chip-icon svg {
  width: 0.875rem;
  height: 0.875rem;
  stroke: var(--auth-primary);
  stroke-width: 2.5;
  fill: none;
}

/* Support features */
.auth-hero-features-heading {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: -0.1px;
}

.auth-hero-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-top: 0.75rem;
}

@media (max-width: 1279px) and (min-width: 1024px) {
  .auth-hero-features {
    grid-template-columns: 1fr;
  }
}

.auth-hero-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: 1.125rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.auth-hero-feature-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-hero-feature-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: var(--auth-primary);
  stroke-width: 2;
  fill: none;
}

/* ── Mobile logo (shown below 1024px) ───────────────────── */

.auth-mobile-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 4.25rem;
}

@media (min-width: 1024px) {
  .auth-mobile-logo {
    display: none;
  }
}

/* ── Form elements ──────────────────────────────────────── */

.auth-title {
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--auth-fg);
  text-align: center;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--auth-muted);
  text-align: center;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

/* Social buttons */
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 2.75rem;
  border: 1px solid var(--auth-border);
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--auth-fg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.auth-social-btn:hover {
  border-color: var(--auth-primary);
  background: rgba(0, 134, 135, 0.03);
}

.auth-social-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-social-btn + .auth-social-btn {
  margin-top: 0.75rem;
}

.auth-social-btn svg,
.auth-social-btn img {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-divider span {
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--auth-muted);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Fields */
.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-fg);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.auth-field input {
  display: block;
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--auth-border);
  border-radius: 0.625rem;
  background: var(--auth-bg);
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--auth-fg);
  outline: none;
  transition: border-color 0.15s ease;
}

.auth-field input::placeholder {
  color: var(--auth-muted);
  opacity: 0.7;
}

.auth-field input:focus {
  border-color: var(--auth-primary);
  border-width: 1.8px;
}

.auth-field input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: rgba(222, 230, 233, 0.6);
}

.auth-name-row {
  display: flex;
  gap: 0.75rem;
}
.auth-name-row .auth-field {
  flex: 1;
  min-width: 0;
}

/* Remember me / Forgot password row */
.auth-options-row {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.auth-remember span {
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--auth-muted);
}

.auth-forgot {
  margin-left: auto;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--auth-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.auth-forgot:hover {
  text-decoration: underline;
}

/* Primary action button */
.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.75rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--auth-primary);
  color: #fff;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.auth-submit:hover {
  background: #007272;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Secondary action button (Sign up on login page) */
.auth-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.75rem;
  border: 1px solid var(--auth-border);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--auth-primary);
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.auth-secondary:hover {
  border-color: var(--auth-primary);
  color: var(--auth-primary);
}

/* Toggle link */
.auth-toggle {
  text-align: center;
  margin-top: 1.5rem;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  color: var(--auth-muted);
}

.auth-toggle a {
  color: var(--auth-primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-toggle a:hover {
  text-decoration: underline;
  color: var(--auth-primary);
}

/* Error banner */
.auth-error {
  text-align: center;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #c0392b;
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

.auth-error:empty {
  display: none;
}

/* Loading overlay */
.auth-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--auth-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-loading-overlay[hidden] {
  display: none;
}

.auth-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid var(--auth-border);
  border-top-color: var(--auth-primary);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
}

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

/* ── Hide site header on auth pages ─────────────────────── */
[data-site-header] {
  display: none;
}
