/* ==========================================================================
   FAGLEAGUE AUTH - ELEGANT SOFT RED & DEEP OBSIDIAN DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Softened Balanced FAG Red Palette (Not Overwhelming / Softened Ruby Crimson) */
  --fag-red: #be123c;
  --fag-red-light: #e11d48;
  --fag-red-dark: #881337;
  --fag-red-glow: rgba(190, 18, 60, 0.18);

  /* Left Panel Deep Obsidian Theme (Subtle Warm Tint) */
  --dark-bg: #0b0f19;
  --dark-card: rgba(255, 255, 255, 0.04);
  --dark-border: rgba(255, 255, 255, 0.08);
  --dark-text: #f8fafc;
  --dark-sub: #94a3b8;

  /* Right Form Panel Clean Light Theme */
  --form-bg: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #64748b;
  --border-light: #e2e8f0;

  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--form-bg);
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
  border: none;
  outline: none;
  background: none;
}

/* MINIMALIST HEADER */
.auth-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  z-index: 100;
}

.auth-header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo-img {
  display: block;
  width: auto;
  height: 44px;
  max-width: 160px;
  object-fit: contain;
}

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

.auth-header-note {
  font-size: 0.88rem;
  color: var(--text-sub);
  white-space: nowrap;
}

.auth-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--fag-red) 0%, var(--fag-red-dark) 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--fag-red-glow);
  transition: var(--transition);
}

.auth-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(190, 18, 60, 0.28);
}

.auth-header-cta::after {
  content: '→';
  font-size: 0.95rem;
  line-height: 1;
}

.header-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-sub);
  transition: var(--transition);
}

.header-link:hover {
  color: var(--fag-red);
}

/* SPLIT SCREEN MAIN CONTAINER */
.split-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: calc(100vh - 70px);
}

/* LEFT PANEL: ELEGANT SHOWCASE & BALANCED RED TONE */
.showcase-panel {
  background: linear-gradient(135deg, #0b0f19 0%, #151926 40%, #1e1318 100%);
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: var(--dark-text);
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(190, 18, 60, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.showcase-content {
  position: relative;
  z-index: 10;
  max-width: 580px;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fb7185;
  margin-bottom: 2rem;
}

.showcase-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.showcase-title span {
  background: linear-gradient(135deg, #ffffff 30%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-desc {
  font-size: 1.05rem;
  color: var(--dark-sub);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* FEATURE BULLETS */
.feature-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.feature-mini-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--dark-border);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  transition: var(--transition);
}

.feature-mini-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(225, 29, 72, 0.3);
  transform: translateX(6px);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--fag-red), var(--fag-red-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px var(--fag-red-glow);
  flex-shrink: 0;
}

.showcase-footer {
  position: relative;
  z-index: 10;
  font-size: 0.85rem;
  color: var(--dark-sub);
  border-top: 1px solid var(--dark-border);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

/* RIGHT PANEL: CLEAN FORM CONTAINER */
.form-panel {
  background: var(--form-bg);
  padding: 4rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.form-box {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 2rem;
}

.form-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.form-subtitle {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-top: 0.4rem;
}

/* TAB SWITCHER */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.8rem;
  border: 1px solid var(--border-light);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.auth-tab-btn.active {
  background: var(--fag-red);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--fag-red-glow);
}

/* SSO GRID */
.sso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-light);
  background: #ffffff;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.sso-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.sso-btn-fb {
  background: #1877f2;
  color: #ffffff;
  border: none;
}

.sso-btn-fb:hover {
  background: #166fe5;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin: 1.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.divider span {
  padding: 0 0.8rem;
}

/* FORM INPUTS */
.form-group {
  margin-bottom: 1.3rem;
}

.input-addon-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 1.1rem;
  color: var(--fag-red);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.input-control {
  width: 100%;
  padding: 0.95rem 3rem 0.95rem 3rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-light);
  background: #f8fafc;
  color: var(--text-main);
  transition: var(--transition);
}

.input-control:focus {
  border-color: var(--fag-red);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--fag-red-glow);
}

.input-icon-right {
  position: absolute;
  right: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.input-icon-right:hover {
  color: var(--fag-red);
}

/* PASSWORD STRENGTH BAR */
.strength-bar-wrapper {
  margin-top: 0.5rem;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s, background-color 0.3s;
}

.strength-text {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.3rem;
  color: var(--text-muted);
}

/* SUBMIT BUTTON */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--fag-red) 0%, var(--fag-red-dark) 100%);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 18px var(--fag-red-glow);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(190, 18, 60, 0.35);
  background: linear-gradient(135deg, var(--fag-red-light) 0%, var(--fag-red) 100%);
}

/* QR CODE BOX */
.qr-container {
  text-align: center;
  padding: 0.5rem 0;
}

.qr-box {
  width: 210px;
  height: 210px;
  margin: 0 auto;
  position: relative;
  background: #ffffff;
  border: 3px solid var(--fag-red);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: 0 10px 25px rgba(190, 18, 60, 0.15);
  overflow: hidden;
}

.qr-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--fag-red-light), transparent);
  box-shadow: 0 0 15px var(--fag-red-light);
  animation: laserScan 2.2s infinite ease-in-out;
}

@keyframes laserScan {
  0% { top: 5%; opacity: 0.3; }
  50% { top: 90%; opacity: 1; }
  100% { top: 5%; opacity: 0.3; }
}

.qr-instruction {
  font-size: 0.9rem;
  color: var(--text-sub);
  margin-top: 1rem;
  font-weight: 600;
}

.app-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.app-badge-img {
  height: 38px;
  transition: transform var(--transition);
}

.app-badge-img:hover {
  transform: scale(1.05);
}

.auth-form-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #dc2626;
}

.auth-flash {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-flash--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-flash--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.auth-flash--info {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.auth-terms {
  margin-bottom: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-sub);
}

.auth-terms a {
  color: var(--fag-red);
  font-weight: 700;
}

.auth-header-link-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form-box .form-horizontal {
  margin: 0;
}

.form-box input[type="hidden"] {
  display: none;
}

#qrcode canvas,
#qrcode img,
#qrcode svg {
  width: 100% !important;
  height: 100% !important;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .split-container { grid-template-columns: 1fr; }
  .showcase-panel { display: none; }
  .form-panel { padding: 2rem 1.25rem 2.5rem; }
}

@media (max-width: 640px) {
  .auth-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    min-height: 0;
  }

  .brand-logo {
    justify-content: flex-start;
    padding-bottom: 0;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-logo-img {
    height: 36px;
    max-width: 100%;
  }

  .auth-header-actions {
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
  }

  .auth-header-note {
    display: none;
  }

  .auth-header-cta {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }

  .form-panel {
    padding: 1.5rem 1rem 2rem;
  }

  .form-title {
    font-size: 1.85rem;
  }

  .form-subtitle {
    font-size: 0.88rem;
  }

  .sso-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .auth-header-cta {
    padding: 0.45rem 0.7rem;
    font-size: 0.76rem;
  }
}
