/* ============================================
   Satellite Home Watch — Auth Page Styles
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--cream-100);
}

/* ── Auth Panel Left (Brand Side) ── */
.auth-brand-panel {
  background: var(--navy-900);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-10);
  min-height: 100vh;
}

.auth-brand-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 55%, rgba(30, 58, 110, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 15%, rgba(42, 79, 143, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 85%, rgba(10, 22, 40, 0.9) 0%, transparent 55%);
  pointer-events: none;
}

/* Soft ambient glow — upper-right bloom, mirrors hero radial */
.auth-brand-bg::after {
  content: '';
  position: absolute;
  top: -160px;
  right: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(42, 79, 143, 0.18) 0%, transparent 65%);
  pointer-events: none;
}

/* Minimal repeating geometric sun icon pattern — matches landing hero exactly.
   Opacity ~5%: barely perceptible at first glance, visible on close inspection.
   Large tile spacing (120px) keeps the pattern open, airy and premium. */
.auth-brand-grid {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg transform='translate(60,60)' fill='none' stroke='rgba(255,255,255,0.75)' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='0' cy='0' r='7' stroke-width='1.4'/%3E%3Cline x1='0' y1='-11' x2='0' y2='-16'/%3E%3Cline x1='7.78' y1='-7.78' x2='11.31' y2='-11.31'/%3E%3Cline x1='11' y1='0' x2='16' y2='0'/%3E%3Cline x1='7.78' y1='7.78' x2='11.31' y2='11.31'/%3E%3Cline x1='0' y1='11' x2='0' y2='16'/%3E%3Cline x1='-7.78' y1='7.78' x2='-11.31' y2='11.31'/%3E%3Cline x1='-11' y1='0' x2='-16' y2='0'/%3E%3Cline x1='-7.78' y1='-7.78' x2='-11.31' y2='-11.31'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  background-repeat: repeat;
  opacity: 0.05;
  pointer-events: none;
  /* Radial fade — fully visible in the centre/upper area, dissolves softly at edges */
  mask-image: radial-gradient(ellipse 90% 85% at 50% 40%, black 10%, rgba(0,0,0,0.55) 48%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 40%, black 10%, rgba(0,0,0,0.55) 48%, transparent 78%);
}

.auth-brand-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* No icon wrapper box — logo renders as a plain image */
.auth-brand-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(10,22,40,0.2));
}

.auth-brand-logo-text {
  display: flex;
  flex-direction: column;
}

.auth-brand-logo-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: white;
  letter-spacing: -0.02em;
}

.auth-brand-logo-sub {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  color: var(--navy-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-brand-center {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-10) 0;
}

.auth-brand-headline {
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: var(--weight-extrabold);
  color: white;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-5);
}

.auth-brand-headline span {
  color: var(--navy-200);
}

.auth-brand-desc {
  font-size: var(--text-base);
  color: var(--navy-200);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-10);
  max-width: 400px;
}

/* ── Auth Mini Dashboard Preview ── */
.auth-mini-preview {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  max-width: 420px;
}

.auth-preview-bar {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.auth-preview-dots {
  display: flex;
  gap: 5px;
}

.auth-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.auth-preview-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth-preview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.auth-preview-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.auth-preview-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-1);
}

.auth-preview-val {
  font-size: var(--text-xl);
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.04em;
}

.auth-preview-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.auth-preview-row:last-child { border-bottom: none; }

.auth-preview-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-preview-row-text {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  flex: 1;
}

.auth-preview-pill {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
}

.auth-brand-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth-brand-feature {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--navy-300);
}

.auth-brand-feature svg {
  width: 16px;
  height: 16px;
  color: #4ade80;
  flex-shrink: 0;
}

/* ── Auth Form Panel Right ── */
.auth-form-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-10);
  min-height: 100vh;
  overflow-y: auto;
}

.auth-form-container {
  width: 100%;
  max-width: 440px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  cursor: pointer;
  padding: var(--space-2) 0;
  transition: color var(--transition-fast);
  text-decoration: none;
  border: none;
  background: none;
}

.auth-back-link:hover {
  color: var(--navy-700);
}

.auth-back-link svg {
  width: 16px;
  height: 16px;
}

/* ── Auth Tabs ── */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--blue-gray-100);
  border-radius: var(--radius-xl);
  padding: 4px;
  margin-bottom: var(--space-8);
  gap: 2px;
}

.auth-tab {
  padding: 0.625rem var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  border: none;
  background: none;
}

.auth-tab.active {
  background: white;
  color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}

/* ── Auth Form ── */
.auth-form-state {
  display: none;
}

.auth-form-state.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.auth-form-header {
  margin-bottom: var(--space-8);
}

.auth-form-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--navy-900);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.auth-form-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  pointer-events: none;
}

.auth-input-icon-right {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.auth-input-icon-right:hover { color: var(--navy-600); }

.form-input.has-icon-left  { padding-left: 2.75rem; }
.form-input.has-icon-right { padding-right: 2.75rem; }

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy-700);
  cursor: pointer;
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.auth-link {
  font-size: var(--text-sm);
  color: var(--navy-500);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  border: none;
  background: none;
  padding: 0;
}

.auth-link:hover { color: var(--navy-700); }

.auth-submit-btn {
  width: 100%;
  padding: 0.875rem;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  background: var(--navy-800);
  color: white;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-md);
}

.auth-submit-btn:hover {
  background: var(--navy-900);
  box-shadow: var(--shadow-xl);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.auth-submit-btn svg {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-light);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--blue-gray-200);
}

.auth-form-footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.auth-form-footer .auth-link { margin-left: 4px; }

.auth-notice {
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.auth-notice-icon {
  width: 18px;
  height: 18px;
  color: var(--navy-500);
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-notice-text {
  font-size: var(--text-xs);
  color: var(--navy-600);
  line-height: var(--leading-relaxed);
}

.auth-notice-text strong {
  color: var(--navy-800);
  font-weight: var(--weight-semibold);
}

/* ── Success / Confirmation State ── */
.auth-success-state {
  text-align: center;
  padding: var(--space-8) 0;
}

.auth-success-icon {
  width: 72px;
  height: 72px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  border: 2px solid #bbf7d0;
}

.auth-success-icon svg {
  width: 36px;
  height: 36px;
  color: #16a34a;
}

.auth-success-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--navy-900);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.auth-success-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  max-width: 340px;
  margin: 0 auto var(--space-8);
}

/* ── Request Access Badge ── */
.request-access-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--cream-300);
  border: 1px solid var(--cream-600);
  border-radius: var(--radius-full);
  padding: 0.3rem var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--cream-900);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-5);
}

.request-access-badge svg {
  width: 12px;
  height: 12px;
}

/* ── Form hint ── */
.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: -var(--space-2);
  line-height: var(--leading-relaxed);
}

.form-error {
  font-size: var(--text-xs);
  color: #dc2626;
  margin-top: -var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ── Responsive Auth ── */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: auto;
    padding: var(--space-8) var(--space-6);
  }

  .auth-brand-center {
    padding: var(--space-8) 0;
  }

  .auth-mini-preview { display: none; }

  .auth-form-panel {
    padding: var(--space-8) var(--space-6);
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .auth-form-row { grid-template-columns: 1fr; }
  .auth-form-panel { padding: var(--space-6) var(--space-4); }
  .auth-back-link { margin-bottom: var(--space-5); }
}

/* ══════════════════════════════════════════════════════
   MOBILE-ONLY: Hide the brand/hero panel entirely.
   The auth form starts directly with the
   "INVITATION-ONLY PLATFORM" badge and Sign In form.
   Desktop/tablet (>768px) is completely unchanged.
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hide the entire left brand/marketing panel */
  .auth-brand-panel {
    display: none !important;
  }

  /* Form panel occupies the full viewport */
  .auth-page {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .auth-form-panel {
    min-height: 100vh;
    padding: var(--space-8) var(--space-5);
    justify-content: flex-start;
    padding-top: var(--space-10);
  }

  /* Ensure the back-to-website link stays visible at the top */
  .auth-back-link {
    margin-bottom: var(--space-6);
  }
}
