/**
 * Login Page - Split Screen Layout
 * Enterprise-grade authentication interface
 */

.login-page {
  min-height: 100vh;
  overflow: hidden;
}

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

/* Hero / Left Side */
.login-hero {
  flex: 1;
  min-width: 0;
  position: relative;
  background: linear-gradient(135deg, #2d3238 0%, #1a1d21 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.hero-tagline {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
  margin: 0 0 var(--space-xs);
}

.hero-subtitle {
  font-size: 28px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  letter-spacing: -0.5px;
}

/* Form Wrapper / Right Side */
.login-form-wrapper {
  flex: 0 0 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: var(--color-bg);
}

/* Auth Card */
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
}

.auth-card-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.logo-mark {
  width: auto;
  height: 48px;
  margin: 0 auto var(--space-md);
  border-radius: 6px;
  display: block;
  object-fit: contain;
}

.auth-company-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-charcoal);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.system-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-charcoal);
  margin: 0;
}

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

.form-group-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--color-slate);
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
}

.forgot-link {
  font-size: 13px;
  color: var(--color-accent);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.btn-login {
  margin-top: var(--space-sm);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 13px;
}

.alert-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.auth-description {
  font-size: 12px;
  color: var(--color-slate);
  text-align: center;
  margin: 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-gray-light);
}

.auth-description a {
  color: var(--color-charcoal);
  font-weight: 600;
  text-decoration: none;
}

.auth-description a:hover {
  text-decoration: underline;
}

.auth-kicker {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-charcoal);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

.auth-lead {
  font-size: 13px;
  color: var(--color-slate);
  margin: 0 0 var(--space-lg);
  line-height: 1.5;
}

.auth-optional {
  font-weight: 400;
  color: var(--color-slate-light);
}

.auth-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-hint {
  font-size: 12px;
  color: var(--color-slate-light);
  margin: 6px 0 0;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--color-slate);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.password-toggle:hover {
  color: var(--color-charcoal);
}

.checkbox-label a {
  color: var(--color-charcoal);
  font-weight: 600;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.alert-ok {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.btn-login:disabled,
.btn-primary:disabled {
  opacity: 0.72;
  cursor: wait;
}

.login-page-register {
  overflow: hidden;
  height: 100vh;
}

.login-page-register .login-container {
  height: 100vh;
  min-height: 100vh;
}

.login-page-register .login-form-wrapper {
  flex: 0 0 520px;
  align-items: flex-start;
  overflow-y: auto;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.login-page-register .auth-card {
  max-width: 400px;
  margin: auto 0;
}

.login-page-register .form-group {
  margin-bottom: 16px;
}

.login-page-register .auth-form {
  margin-bottom: 0;
}

.login-page-register .checkbox-label {
  align-items: flex-start;
}

.login-page-register .checkbox-label input {
  margin-top: 2px;
  flex-shrink: 0;
}

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

  .login-hero {
    min-height: 180px;
  }

  .hero-content {
    padding: var(--space-lg);
  }

  .hero-subtitle {
    font-size: 22px;
  }

  .login-form-wrapper {
    flex: 1;
    padding: var(--space-lg);
  }

  .login-page-register {
    overflow: auto;
    height: auto;
  }

  .login-page-register .login-container {
    height: auto;
    min-height: 100vh;
  }

  .login-page-register .login-form-wrapper {
    overflow: visible;
    padding-top: var(--space-lg);
    padding-bottom: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .login-hero {
    min-height: 140px;
  }
}
