/* ==========================================================================
   Login Page — Split-panel layout
   campaigns.data-jam.com  v1.0.0
   ========================================================================== */

.login-page {
  display: flex;
  min-height: 100vh;
}

/* ---- Left Panel (branding) ---- */
.login-brand {
  flex: 1;
  background: var(--accent-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(233, 75, 82, 0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(230, 47, 110, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

.login-brand__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 400px;
}

.login-brand__logo {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-2xl);
  backdrop-filter: blur(8px);
}

.login-brand__logo img {
  width: 40px;
  height: 40px;
}

.login-brand__title {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: #fff;
  margin-bottom: var(--space-md);
  line-height: var(--leading-tight);
}

.login-brand__subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--leading-relaxed);
}

.login-brand__tagline {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--space-4xl);
}

/* Decorative shapes */
.login-brand__shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.login-brand__shape--1 {
  width: 300px;
  height: 300px;
  top: -80px;
  right: -60px;
}

.login-brand__shape--2 {
  width: 200px;
  height: 200px;
  bottom: -40px;
  left: -40px;
}

.login-brand__shape--3 {
  width: 120px;
  height: 120px;
  bottom: 20%;
  right: 10%;
}


/* ---- Right Panel (form) ---- */
.login-form-panel {
  flex: 1;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
}

.login-form-container {
  width: 100%;
  max-width: 360px;
}

.login-form__header {
  margin-bottom: var(--space-4xl);
}

.login-form__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.login-form__description {
  font-size: var(--text-md);
  color: var(--text-tertiary);
}

/* Form fields */
.login-form .form-group {
  margin-bottom: var(--space-xl);
}

.login-form .form-input {
  padding: 12px 16px;
  font-size: var(--text-md);
}

/* Password field with toggle */
.login-form__password-wrapper {
  position: relative;
}

.login-form__password-wrapper .form-input {
  padding-right: 44px;
}

.login-form__password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  transition: color var(--transition-fast);
}

.login-form__password-toggle:hover {
  color: var(--text-tertiary);
}

/* Remember / Forgot row */
.login-form__options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
}

.login-form__remember {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  cursor: pointer;
}

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

.login-form__forgot {
  font-size: var(--text-sm);
  color: var(--accent);
  transition: color var(--transition-fast);
}

.login-form__forgot:hover {
  color: var(--accent-hover);
}

/* Submit button */
.login-form__submit {
  width: 100%;
  padding: 12px;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.login-form__submit .spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}

/* Error banner */
.login-form__error {
  display: none;
  padding: var(--space-md) var(--space-lg);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: var(--status-error);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
  animation: slideIn 0.2s ease-out;
}

.login-form__error--visible {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Footer link */
.login-form__footer {
  text-align: center;
  margin-top: var(--space-2xl);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.login-form__footer a {
  color: var(--accent);
}

.login-form__footer a:hover {
  color: var(--accent-hover);
}


/* ---- Responsive ---- */
@media (max-width: 960px) {
  .login-page {
    flex-direction: column;
  }

  .login-brand {
    min-height: 240px;
    padding: var(--space-2xl);
  }

  .login-brand__title {
    font-size: var(--text-2xl);
  }

  .login-brand__subtitle {
    font-size: var(--text-md);
  }

  .login-brand__tagline {
    display: none;
  }

  .login-brand__shape {
    display: none;
  }

  .login-form-panel {
    padding: var(--space-2xl);
  }
}

@media (max-width: 480px) {
  .login-brand {
    min-height: 180px;
    padding: var(--space-xl);
  }

  .login-brand__logo {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-lg);
  }

  .login-brand__title {
    font-size: var(--text-xl);
  }

  .login-form-panel {
    padding: var(--space-lg);
  }

  .login-form-container {
    max-width: 100%;
  }
}
