/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BERNAMEFIT — Gym Login  ·  auth.css
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Reset ── */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

/* ── Page ── */

body[data-page="auth"] {
  min-height: 100dvh;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: #f8fafc;
  background: #050506;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-main {
  min-height: 100dvh;
  display: flex;
}

/* ── Shell ── */

.auth-shell {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.2fr minmax(400px, 500px);
  overflow: hidden;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LEFT — Showcase Background Image
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.auth-showcase {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
}

/* Three.js canvas container removed */

/* Overlay content on top of background */

.showcase-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(5,5,6,0.6)  0%,
    rgba(5,5,6,0.15) 30%,
    rgba(5,5,6,0.15) 60%,
    rgba(5,5,6,0.7)  100%
  );
}

/* Logo */

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-logo {
  width: 44px;
  height: 44px;
  -o-object-fit: contain;
     object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(0, 148, 137,0.4));
}

.auth-logo-name {
  font-size: 15px;
  font-weight: 800;
  color: #e5e7eb;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Hero text */

.showcase-hero-text {
  max-width: 580px;
}

.showcase-hero-text h1 {
  margin: 18px 0 20px;
  font-size: clamp(56px, 8vw, 110px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 60px rgba(0, 148, 137,0.15);
}

.text-accent {
  color: var(--brand, #009489);
  text-shadow:
    0 0 30px rgba(0, 148, 137,0.5),
    0 0 80px rgba(0, 148, 137,0.2);
}

.showcase-hero-text p {
  margin: 0;
  max-width: 460px;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
}

/* Pill badge */

.auth-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(0, 148, 137,0.1);
  border: 1px solid rgba(0, 148, 137,0.22);
  color: #009489;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

/* Feature cards */

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 560px;
}

.auth-feature-card {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: border-color 0.3s, background 0.3s;
}

.auth-feature-card:hover {
  border-color: rgba(0, 148, 137,0.2);
  background: rgba(0, 148, 137,0.04);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 148, 137,0.12);
  color: #009489;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.auth-feature-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.auth-feature-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.45);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RIGHT — Login Panel
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.auth-panel {
  min-height: 100dvh;
  padding: 20px;
  display: flex;
  background: linear-gradient(160deg, #0a0a0b 0%, #0d0d0e 50%, #0a0a0b 100%);
  border-left: 1px solid rgba(255,255,255,0.06);
}

.auth-card {
  width: 100%;
  margin: auto;
  max-width: 420px;
  border-radius: 28px;
  padding: 36px 32px;
  background: linear-gradient(170deg, rgba(22,24,18,0.95) 0%, rgba(12,13,11,0.98) 100%);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    0 30px 70px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
}

/* Card header */

.auth-card-head {
  margin-bottom: 28px;
}

.auth-card-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #009489;
}

.auth-card-head h2 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #ffffff;
}

.auth-card-head p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

/* Alerts */

.auth-alert {
  padding: 13px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.18);
  color: #bbf7d0;
}

.auth-alert-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.18);
  color: #fecaca;
}

/* Form */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field { min-width: 0; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.field-icon-wrap { position: relative; }

.field-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  color: #4b5563;
  display: flex;
  pointer-events: none;
}

.field input {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #f8fafc;
  font-size: 15px;
  font-family: inherit;
  padding: 14px 16px 14px 44px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.field input::-moz-placeholder {
  color: #4b5563;
}

.field input::placeholder {
  color: #4b5563;
}

.field input:focus {
  border-color: rgba(0, 148, 137,0.5);
  box-shadow:
    0 0 0 3px rgba(0, 148, 137,0.1),
    0 0 20px rgba(0, 148, 137,0.06);
  background: rgba(0, 148, 137,0.02);
}

.field input.err {
  border-color: rgba(239,68,68,0.5);
}

.pw-wrap input {
  padding-inline-end: 48px;
}

.pw-eye {
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.pw-eye:hover {
  color: #009489;
}

.field-err {
  display: none;
  margin-top: 7px;
  font-size: 12px;
  color: #fca5a5;
}

.field-err.on {
  display: block;
}

/* Submit button */

.submit {
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  border: 0;
  border-radius: 16px;
  background: #009489;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow:
    0 12px 30px rgba(0, 148, 137,0.2),
    0 0 0 0 rgba(0, 148, 137,0);
  position: relative;
  overflow: hidden;
}

.submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(0, 148, 137,0.28),
    0 0 0 3px rgba(0, 148, 137,0.12);
}

.submit:hover::before {
  transform: translateX(100%);
}

.submit:active {
  transform: translateY(0);
}

.submit.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Footer */

.auth-card-foot {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.auth-foot-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.auth-foot-label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
}

.auth-foot-item strong {
  color: #d1d5db;
  font-size: 13px;
  font-weight: 600;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Animations
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.showcase-hero-text {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.auth-feature-grid {
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.auth-card {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.text-accent {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Responsive
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    min-height: 50dvh;
  }

  .auth-panel {
    min-height: auto;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
}

@media (max-width: 768px) {
  body[data-page="auth"] {
    overflow: auto;
  }

  .auth-shell {
    min-height: auto;
  }

  .auth-showcase {
    min-height: 55dvh;
  }

  .showcase-overlay {
    padding: 24px;
  }

  .showcase-hero-text h1 {
    font-size: 48px;
  }

  .showcase-hero-text p {
    font-size: 14px;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .auth-panel {
    padding: 16px;
  }

  .auth-card {
    border-radius: 22px;
    padding: 26px 22px;
  }

  .auth-card-head h2 {
    font-size: 26px;
  }

  .auth-card-foot {
    grid-template-columns: 1fr;
  }
}