/* Supabase Auth–inspired UI for login/signup (works with server-rendered pages) */

:root {
  --sb-auth-bg: #1c1c1c;
  --sb-auth-card: #242424;
  --sb-auth-border: #3a3a3a;
  --sb-auth-text: #ededed;
  --sb-auth-muted: #a1a1a1;
  --sb-auth-brand: #3ecf8e;
  --sb-auth-brand-hover: #2eb67a;
  --sb-auth-input: #2a2a2a;
  --sb-auth-danger-bg: #3f1d1d;
  --sb-auth-danger-text: #fecaca;
  --sb-auth-info-bg: #1e293b;
  --sb-auth-info-text: #bfdbfe;
}

.sb-auth-shell.sb-auth-page {
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #2d3a2f 0%, var(--sb-auth-bg) 55%);
  color: var(--sb-auth-text);
  font-family: Inter, "DM Sans", system-ui, -apple-system, sans-serif;
}

.sb-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sb-auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.sb-auth-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--sb-auth-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.sb-auth-top a.sb-auth-link {
  color: var(--sb-auth-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.sb-auth-top a.sb-auth-link:hover { color: var(--sb-auth-brand); }

.sb-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 3rem;
}

.sb-auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--sb-auth-card);
  border: 1px solid var(--sb-auth-border);
  border-radius: 12px;
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.sb-auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sb-auth-lead {
  margin: 0 0 1.35rem;
  color: var(--sb-auth-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.sb-auth-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--sb-auth-muted);
  margin-bottom: 0.35rem;
}

.sb-auth-card input[type="email"],
.sb-auth-card input[type="password"],
.sb-auth-card input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--sb-auth-border);
  background: var(--sb-auth-input);
  color: var(--sb-auth-text);
  font: inherit;
  font-size: 0.95rem;
}

.sb-auth-card input:focus {
  outline: none;
  border-color: var(--sb-auth-brand);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.15);
}

.sb-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.sb-auth-btn--primary {
  background: var(--sb-auth-brand);
  color: #0d1f17;
}

.sb-auth-btn--primary:hover { background: var(--sb-auth-brand-hover); }

.sb-auth-btn--google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
}

.sb-auth-btn--google:hover { background: #f8f9fa; }

.sb-auth-btn--ghost {
  background: transparent;
  color: var(--sb-auth-text);
  border: 1px solid var(--sb-auth-border);
}

.sb-auth-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sb-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--sb-auth-muted);
  font-size: 0.82rem;
  margin: 1.1rem 0;
}

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

.sb-auth-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--sb-auth-muted);
}

.sb-auth-foot a {
  color: var(--sb-auth-brand);
  text-decoration: none;
}

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

.sb-auth-alert {
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.sb-auth-alert--error {
  background: var(--sb-auth-danger-bg);
  color: var(--sb-auth-danger-text);
  border: 1px solid #7f1d1d;
}

.sb-auth-alert--info {
  background: var(--sb-auth-info-bg);
  color: var(--sb-auth-info-text);
  border: 1px solid #334155;
}

.sb-auth-alert--success {
  background: #14532d;
  color: #bbf7d0;
  border: 1px solid #166534;
}

.sb-auth-powered {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.72rem;
  color: #6b7280;
  letter-spacing: 0.02em;
}

.sb-auth-powered span { color: var(--sb-auth-brand); font-weight: 600; }

.sb-auth-slug-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.sb-auth-slug-prefix {
  color: var(--sb-auth-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.sb-auth-hint {
  color: var(--sb-auth-muted);
  font-size: 0.8rem;
  margin: -0.55rem 0 0.9rem;
  line-height: 1.4;
}

.sb-auth-forgot {
  margin: -0.35rem 0 0.9rem;
  text-align: right;
  font-size: 0.85rem;
}

.sb-auth-forgot a {
  color: var(--sb-auth-brand);
  text-decoration: none;
}

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

.sb-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Light theme — customer booking auth (uses same layout shell, matches public booking pages) */
.sb-auth-shell--light.sb-auth-page {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 60%);
  color: #0f172a;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

.sb-auth-shell--light {
  --sb-auth-bg: #f8fafc;
  --sb-auth-card: #ffffff;
  --sb-auth-border: #e2e8f0;
  --sb-auth-text: #0f172a;
  --sb-auth-muted: #64748b;
  --sb-auth-brand: #2563eb;
  --sb-auth-brand-hover: #1d4ed8;
  --sb-auth-input: #ffffff;
  --sb-auth-danger-bg: #fef2f2;
  --sb-auth-danger-text: #991b1b;
  --sb-auth-info-bg: #eff6ff;
  --sb-auth-info-text: #1e40af;
}

.sb-auth-shell--light .sb-auth-card {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.sb-auth-shell--light .sb-auth-btn--primary {
  color: #fff;
}

.sb-auth-shell--light .sb-auth-alert--error {
  border-color: #fecaca;
}

.sb-auth-shell--light .sb-auth-alert--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.sb-auth-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sb-auth-shell--light .nav-lang-form {
  margin: 0;
}

.sb-auth-shell--light .nav-lang-select {
  min-width: 5.5rem;
  font-size: 0.82rem;
  padding: 0.35rem 1.75rem 0.35rem 0.55rem;
  margin-bottom: 0;
}

.sb-auth-brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.sb-auth-card input[type="tel"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--sb-auth-border);
  background: var(--sb-auth-input);
  color: var(--sb-auth-text);
  font: inherit;
  font-size: 0.95rem;
}

.sb-auth-card input[type="tel"]:focus {
  outline: none;
  border-color: var(--sb-auth-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.sb-auth-back {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.88rem;
}

@media (max-width: 768px) {
  .sb-auth-top {
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.75rem max(1rem, env(safe-area-inset-right)) 0.75rem max(1rem, env(safe-area-inset-left));
    padding-top: max(0.75rem, env(safe-area-inset-top));
  }

  .sb-auth-brand {
    font-size: 0.95rem;
    flex: 1 1 auto;
    min-width: 0;
  }

  .sb-auth-top-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .sb-auth-main {
    align-items: flex-start;
    padding: 1rem max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }

  .sb-auth-card {
    padding: 1.5rem 1.15rem;
    border-radius: 10px;
  }

  .sb-auth-card input[type="email"],
  .sb-auth-card input[type="password"],
  .sb-auth-card input[type="text"],
  .sb-auth-card input[type="tel"] {
    font-size: 16px;
    min-height: 2.75rem;
  }

  .sb-auth-card .sb-auth-btn,
  .sb-auth-card button[type="submit"] {
    min-height: 2.75rem;
    font-size: 1rem;
  }
}
