/* ==========================================================================
   Lanka News Hub — Modern Auth Styling (Login & Registration)
   ========================================================================== */

:root {
  --auth-crimson: #c4161c;
  --auth-crimson-hover: #b91c1c;
  --auth-crimson-dark: #880e12;
  --auth-slate-900: #0f172a;
  --auth-slate-800: #1e293b;
  --auth-slate-700: #334155;
  --auth-slate-500: #64748b;
  --auth-slate-400: #94a3b8;
  --auth-slate-200: #e2e8f0;
  --auth-slate-100: #f1f5f9;
  --auth-slate-50: #f8fafc;
}

/* Hide sticky ad on auth screen to prevent form occlusion */
.sticky-ad {
  display: none !important;
}

.auth-page-space {
  padding-top: 36px;
  padding-bottom: 60px;
}

/* Outer layout wrapper */
.modern-auth-container {
  max-width: 1040px;
  margin: 0 auto;
}

.modern-auth-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  min-height: 600px;
}

/* ==========================================================================
   Left Column: Editorial Hero & Branding Showcase
   ========================================================================== */
.auth-hero-pane {
  background: linear-gradient(145deg, #0b1120 0%, #152238 50%, #2b0e14 100%);
  color: #ffffff;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-hero-pane::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(196, 22, 28, 0.35) 0%, rgba(196, 22, 28, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-hero-pane::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-hero-content {
  position: relative;
  z-index: 2;
}

/* Brand badge */
.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #c4161c 0%, #991b1b 100%);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(196, 22, 28, 0.4);
}

.auth-brand-logo .logo-main {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.auth-brand-logo .logo-si {
  font-family: 'Noto Sans Sinhala', 'Iskoola Pota', sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

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

.auth-brand-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.auth-brand-tagline {
  font-size: 10px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Hero Typography */
.auth-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #f87171;
  margin-bottom: 12px;
}

.auth-hero-eyebrow .pulse-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
  animation: authPulse 2s infinite;
}

@keyframes authPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.auth-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0 0 14px 0;
}

.auth-hero-description {
  font-size: 13.5px;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 28px;
  max-width: 420px;
}

/* Feature bullets */
.auth-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.auth-feature-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}

.auth-feature-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.3;
}

.auth-feature-text strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.auth-feature-text span {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
  display: block;
}

/* Quick Fill Demo Card */
.auth-demo-card {
  position: relative;
  z-index: 2;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.auth-demo-title {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fca5a5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-demo-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-demo-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.auth-demo-chip:hover {
  background: rgba(196, 22, 28, 0.35);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.auth-demo-chip:active {
  transform: translateY(0);
}

.auth-demo-hint {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
  margin-top: 6px;
}

.auth-demo-hint code {
  color: #fecaca;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* Hero Footer */
.auth-hero-footer {
  margin-top: 24px;
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Right Column: Interactive Authentication Form
   ========================================================================== */
.auth-form-pane {
  background: #ffffff;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Mode Switcher Tabs */
.auth-nav-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 26px;
}

.auth-tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  border-radius: 9px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-tab-btn:hover {
  color: #0f172a;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: #c4161c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Form Header */
.auth-form-header {
  margin-bottom: 22px;
}

.auth-form-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #c4161c;
  display: block;
  margin-bottom: 6px;
}

.auth-form-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  line-height: 1.2;
}

.auth-form-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* Error Alert */
.auth-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 10px;
  padding: 12px 16px;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-alert-error .alert-icon {
  flex-shrink: 0;
  font-size: 16px;
  color: #ef4444;
  margin-top: 1px;
}

/* Inputs & Form Fields */
.auth-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 15px;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 10px 42px 10px 42px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  background: #ffffff;
  border-color: #c4161c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 22, 28, 0.12);
}

.auth-input-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 6px 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.auth-input-toggle:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Password Helper / Requirements */
.auth-password-helper {
  margin-top: 4px;
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-password-strength {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  height: 4px;
}

.auth-strength-bar {
  flex: 1;
  height: 100%;
  background: #e2e8f0;
  border-radius: 2px;
  transition: background 0.3s ease;
}

/* Submit Action Button */
.auth-submit-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #c4161c 0%, #991b1b 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(196, 22, 28, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin-top: 6px !important;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #a81c1c 100%) !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 8px 22px rgba(196, 22, 28, 0.45) !important;
}

.auth-submit-btn:active {
  transform: translateY(0) !important;
}

/* Staff Info Pill */
.auth-staff-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  line-height: 1.45;
}

.auth-staff-note strong {
  color: #0f172a;
}

/* Bottom switch prompt */
.auth-switch-prompt {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: #64748b;
}

.auth-switch-link {
  color: #c4161c;
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}

.auth-switch-link:hover {
  text-decoration: underline;
  color: #991b1b;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 920px) {
  .modern-auth-card {
    grid-template-columns: 1fr;
    max-width: 580px;
    margin: 0 auto;
  }

  .auth-hero-pane {
    padding: 34px 28px;
  }

  .auth-hero-title {
    font-size: 26px;
  }

  .auth-form-pane {
    padding: 34px 28px;
  }
}

@media (max-width: 540px) {
  .auth-page-space {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .modern-auth-card {
    border-radius: 14px;
  }

  .auth-hero-pane {
    padding: 26px 20px;
  }

  .auth-form-pane {
    padding: 26px 20px;
  }

  .auth-hero-title {
    font-size: 22px;
  }

  .auth-form-title {
    font-size: 22px;
  }

  .auth-demo-chips {
    flex-direction: column;
  }
}
