/**
 * DiaperGuys logged-out auth / landing — scoped to .dg-auth-page and .dg-auth-page-wrapper
 * Does not affect logged-in app routes.
 */
.dg-auth-page,
.dg-auth-page-wrapper {
  --dg-auth-bg-dark: #090c11;
  --dg-auth-bg-mid: #1f252c;
  --dg-auth-accent: #08e3ec;
  --dg-auth-accent-soft: #6ff1ff;
  --dg-auth-accent-strong: #08e3ec;
  --dg-auth-text-main: #f5f7ff;
  --dg-auth-text-muted: #a8bcc9;
  --dg-auth-border-soft: rgba(255, 255, 255, 0.08);
  --dg-auth-radius-xl: 28px;
}

body.dg-auth-page {
  background: radial-gradient(circle at top left, #1a2028 0, #0d1117 45%, #020408 100%);
  padding-top: 0 !important;
}

body.dg-auth-page .main-wrapper {
  min-height: 100dvh;
}

body.dg-auth-page .main-header,
body.dg-auth-page .footer-bottom-bar {
  display: none !important;
}

.dg-auth-page-wrapper {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(100px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at top left, #1a2028 0, #0d1117 50%, #020408 100%);
}

body.dg-auth-page--standalone {
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  color: var(--dg-auth-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dg-auth-shell,
.dg-landing-shell {
  width: 100%;
  max-width: 1220px;
  max-height: 780px;
  height: min(780px, calc(100vh - 160px));
  background: linear-gradient(145deg, #1e252c 0, #141a21 45%, #090c11 100%);
  border-radius: 32px;
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.dg-auth-shell::before,
.dg-auth-shell::after,
.dg-landing-shell::before,
.dg-landing-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(55px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.dg-auth-shell::before,
.dg-landing-shell::before {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(8, 227, 236, 0.55), transparent 70%);
  top: -80px;
  right: -30px;
}

.dg-auth-shell::after,
.dg-landing-shell::after {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(8, 227, 236, 0.18), transparent 70%);
  bottom: -90px;
  left: -30px;
}

/* ---- Rotating photo tile ---- */
.dg-auth-photo-tile,
.dg-hero-panel {
  flex: 1.05;
  position: relative;
  z-index: 1;
  border-radius: var(--dg-auth-radius-xl);
  overflow: hidden;
  height: 100%;
  min-height: 0;
  background: #000;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.dg-hero-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.dg-hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 35%, rgba(0, 0, 0, 0.75) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0%, transparent 55%);
  pointer-events: none;
}

.dg-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out, transform 14s ease-out;
  opacity: 0;
  transform: scale(1.03);
}

.dg-hero-image.dg-hero-image--active {
  opacity: 1;
  transform: scale(1.07);
}

.dg-hero-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(5, 7, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--dg-auth-text-muted);
  backdrop-filter: blur(14px);
}

.dg-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3bff7b;
  box-shadow: 0 0 8px rgba(59, 255, 123, 0.85);
  flex-shrink: 0;
}

.dg-hero-copy {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 4;
  max-width: 260px;
}

.dg-hero-copy__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.dg-hero-copy__sub {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

/* ---- Auth card panel ---- */
.dg-auth-card,
.dg-auth-panel {
  flex: 1;
  position: relative;
  z-index: 1;
  border-radius: var(--dg-auth-radius-xl);
  overflow: hidden;
  height: 100%;
  min-height: 0;
  background: radial-gradient(circle at top, #252c33 0, #1a2028 55%, #12171d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(8, 227, 236, 0.1);
  padding: 24px 24px 18px;
  display: flex;
  flex-direction: column;
}

.dg-auth-card::before,
.dg-auth-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 0 0, rgba(8, 227, 236, 0.22), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.dg-auth-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.dg-auth-intro {
  text-align: center;
}

.dg-logo-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow: 0 0 16px rgba(8, 227, 236, 0.55);
}

.dg-auth-headline {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--dg-auth-text-main);
}

.dg-auth-subhead {
  margin: 8px auto 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--dg-auth-text-muted);
}

.dg-auth-feature-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.dg-auth-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dg-auth-feature-chip i {
  font-size: 9px;
  color: var(--dg-auth-accent-soft);
}

/* Map preview — demo pins only, no real user data */
.dg-auth-map-preview {
  position: relative;
  margin-top: 12px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(8, 227, 236, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%),
    repeating-linear-gradient(0deg, transparent, transparent 18px, rgba(255, 255, 255, 0.03) 18px, rgba(255, 255, 255, 0.03) 19px),
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(255, 255, 255, 0.03) 18px, rgba(255, 255, 255, 0.03) 19px),
    #0d1218;
}

.dg-auth-map-preview__label {
  position: absolute;
  top: 8px;
  left: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.dg-auth-map-preview__privacy {
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  z-index: 2;
  margin: 0;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
}

.dg-auth-map-preview__pin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(8, 227, 236, 0.9);
  background: radial-gradient(circle at 30% 30%, rgba(111, 241, 255, 0.5), rgba(20, 30, 40, 0.95));
  box-shadow: 0 0 10px rgba(8, 227, 236, 0.35);
  filter: blur(0.3px);
  animation: dg-auth-pin-pulse 3s ease-in-out infinite;
}

.dg-auth-map-preview__pin:nth-child(2) { animation-delay: 0.6s; }
.dg-auth-map-preview__pin:nth-child(3) { animation-delay: 1.2s; }
.dg-auth-map-preview__pin:nth-child(4) { animation-delay: 1.8s; }

@keyframes dg-auth-pin-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

.dg-welcome-sub {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--dg-auth-text-main);
}

.dg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(8, 227, 236, 0.12);
  border: 1px solid rgba(8, 227, 236, 0.45);
  color: var(--dg-auth-accent-soft);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 6px auto 0;
}

/* Tabs */
.dg-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dg-auth-text-muted);
}

.dg-tab-link {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.dg-tab-link.dg-tab-link--active {
  border-color: rgba(8, 227, 236, 0.7);
  color: var(--dg-auth-accent-soft);
  background: rgba(8, 227, 236, 0.08);
}

.fr_auth_form {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.fr_auth_form::-webkit-scrollbar { width: 6px; }
.fr_auth_form::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

/* Form fields */
.dg-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dg-input,
.fr_welcome_field input,
.fr_welcome_field select,
.dg-auth-card .form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dg-auth-text-main);
  font-size: 14px;
  outline: none;
}

.dg-input::placeholder,
.fr_welcome_field input::placeholder {
  color: rgba(168, 188, 201, 0.9);
}

.dg-input:focus,
.fr_welcome_field input:focus,
.fr_welcome_field select:focus,
.dg-auth-card .form-control:focus {
  border-color: rgba(8, 227, 236, 0.85);
  box-shadow: 0 0 0 1px rgba(8, 227, 236, 0.4), 0 0 14px rgba(8, 227, 236, 0.25);
}

.fr_welcome_field {
  position: relative;
  margin-bottom: 2px;
}

.dg-password-wrap {
  position: relative;
}

.dg-password-wrap .dg-input {
  padding-right: 48px;
}

.dg-toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(230, 238, 248, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dg-toggle-password:hover {
  border-color: rgba(8, 227, 236, 0.8);
  color: var(--dg-auth-accent-soft);
}

.dg-caps-warning {
  font-size: 11px;
  color: #ffd3d3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dg-login-button,
.fr_welcome_btn,
.dg-auth-card .btn-primary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, var(--dg-auth-accent-soft), var(--dg-auth-accent-strong));
  color: #00121b;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 12px 28px rgba(8, 227, 236, 0.45);
  transition: filter 0.15s, transform 0.15s;
}

.dg-login-button:hover,
.fr_welcome_btn:hover,
.dg-auth-card .btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.dg-login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.dg-auth-secondary {
  text-align: center;
  font-size: 13px;
  color: var(--dg-auth-text-muted);
}

.dg-auth-secondary a,
.dg-auth-card a.text-link {
  color: var(--dg-auth-accent-soft);
  text-decoration: none;
  font-weight: 500;
}

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

/* Social logins */
.dg-auth-socials {
  margin-top: 14px;
  text-align: center;
}

.dg-social-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(186, 202, 232, 0.85);
  margin-bottom: 10px;
}

.dg-social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dg-social-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.dg-social-btn:hover {
  border-color: rgba(8, 227, 236, 0.85);
  color: var(--dg-auth-accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(8, 227, 236, 0.35);
}

.dg-auth-footer,
.dg-legal {
  margin-top: 14px;
  font-size: 11px;
  color: var(--dg-auth-text-muted);
  text-align: center;
  line-height: 1.55;
}

.dg-auth-footer a,
.dg-legal a,
.dg-footer-links a {
  color: var(--dg-auth-accent-soft);
  text-decoration: none;
}

.dg-footer-links {
  margin-top: 8px;
  font-size: 10px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
}

.dg-footer-links a {
  color: var(--dg-auth-text-muted);
}

.dg-footer-links a:hover {
  color: var(--dg-auth-accent-soft);
}

.dg-copy {
  margin-top: 6px;
  font-size: 10px;
  text-align: center;
  color: rgba(155, 171, 205, 0.75);
}

/* Reset card inside auth shell */
.dg-auth-reset-card .card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dg-auth-reset-card .card-header,
.dg-auth-reset-card .card-body {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--dg-auth-text-main);
}

.dg-auth-reset-card .card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.dg-auth-reset-card .card-subtitle {
  font-size: 13px;
  color: var(--dg-auth-text-muted);
  margin-top: 6px;
}

.dg-auth-reset-card .input-group-text {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--dg-auth-text-muted);
}

/* Alerts */
.dg-auth-page .alert-danger {
  border-radius: 14px;
  border: 1px solid rgba(255, 81, 81, 0.7);
  background: rgba(60, 8, 8, 0.5);
  color: #ffd3d3;
  font-size: 12px;
}

.dg-auth-page .alert-success {
  border-radius: 14px;
  border: 1px solid rgba(59, 255, 123, 0.6);
  background: rgba(8, 60, 20, 0.45);
  color: #d3ffd9;
}

.dg-auth-page .alert-warning {
  border-radius: 14px;
  background: rgba(255, 193, 7, 0.12);
  border-color: rgba(255, 193, 7, 0.35);
  color: #ffe9a8;
}

.dg-auth-page .x-hidden,
.x-hidden {
  display: none !important;
}

.dg-auth-page .form-check-label,
.dg-auth-page-wrapper .form-check-label {
  color: var(--dg-auth-text-muted);
  font-size: 13px;
}

.dg-auth-page .form-check-input:checked {
  background-color: var(--dg-auth-accent);
  border-color: var(--dg-auth-accent);
}

body.dg-auth-page.visitor {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Cookie banner */
.dg-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 520px;
  width: calc(100% - 24px);
  background: rgba(12, 16, 22, 0.96);
  border-radius: 16px;
  padding: 12px 14px;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--dg-auth-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  z-index: 10000;
}

.dg-cookie-banner-show { display: flex; }

.dg-cookie-btn--primary {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  background: linear-gradient(90deg, var(--dg-auth-accent-soft), var(--dg-auth-accent-strong));
  color: #00121b;
  cursor: pointer;
}

.dg-cookie-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(220, 230, 245, 0.88);
  cursor: pointer;
}

.dg-powder-poof {
  position: fixed;
  width: 160px;
  height: 160px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0, transparent 60%);
  filter: blur(2px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  animation: dg-poof 0.85s ease-out forwards;
  z-index: 9999;
}

@keyframes dg-poof {
  0% { opacity: 0.85; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(4); }
}

/* Mobile */
@media (max-width: 960px) {
  .dg-auth-page-wrapper,
  body.dg-auth-page--standalone {
    padding: 12px 8px calc(110px + env(safe-area-inset-bottom));
    align-items: flex-start;
  }

  .dg-auth-shell,
  .dg-landing-shell {
    flex-direction: column;
    height: auto;
    max-height: none;
    padding: 12px;
    border-radius: 22px;
  }

  .dg-auth-photo-tile,
  .dg-hero-panel {
    flex: none;
    height: 200px;
    min-height: 200px;
  }

  .dg-auth-card,
  .dg-auth-panel {
    flex: none;
    height: auto;
    min-height: 0;
    padding: 18px 16px 14px;
  }

  .dg-auth-headline { font-size: 18px; }
  .dg-auth-map-preview { height: 64px; }
  .fr_auth_form { overflow: visible; }
}

@media (max-width: 640px) {
  .dg-auth-photo-tile,
  .dg-hero-panel {
    height: 170px;
    min-height: 170px;
  }

  .dg-auth-feature-chip {
    font-size: 9px;
    padding: 4px 8px;
  }
}
