/* ======================================
   LOGIN / AUTH SURFACES
====================================== */

.auth-layout .root-content {
  width: 100%;
}

.login-content {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid var(--color-border-strong);
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / 86%),
    rgb(243 246 251 / 94%)
  );
  box-shadow: var(--shadow-xl);
}

.auth-panel {
  position: relative;
  min-height: 100%;
}

.auth-panel-brand {
  padding: 2.1rem;
  background:
    linear-gradient(160deg, rgb(8 17 29 / 98%), rgb(23 57 94 / 94%)),
    var(--gradient-mesh);
  color: #f3f8ff;
}

.auth-panel-brand-secondary {
  background:
    linear-gradient(160deg, rgb(16 36 63 / 98%), rgb(45 95 143 / 92%)),
    var(--gradient-mesh);
}

.auth-panel-brand-danger {
  background:
    linear-gradient(160deg, rgb(67 17 17 / 98%), rgb(152 37 37 / 92%)),
    radial-gradient(
      circle at top left,
      rgb(255 255 255 / 8%),
      transparent 35%
    );
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(243 248 255 / 72%);
}

.auth-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.03;
  color: #fff;
  -webkit-text-fill-color: initial;
  background: none;
}

.auth-description {
  margin: 0 0 1.35rem;
  color: rgb(243 248 255 / 82%);
  font-size: 1rem;
  line-height: 1.75;
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.auth-highlight {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  border: 1px solid rgb(255 255 255 / 15%);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.login-card-content {
  padding: 2rem;
}

.login-header {
  margin-bottom: 1.5rem;
  text-align: left;
}

.login-header h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 2.4vw, 2.3rem);
  line-height: 1.05;
}

.login-subtitle {
  margin: 0;
  color: var(--text-muted);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0 1.35rem;
}

.auth-center-link {
  justify-content: center;
}

.remember-me-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.remember-me-label,
.forgot-password-link {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.forgot-password-link:hover {
  color: var(--text-strong);
}

.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0.95rem 1.1rem;
  border: none;
  border-radius: 16px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  transition: var(--transition-base);
}

.login-button:hover {
  transform: translateY(-1px);
  color: #fff;
}

.login-button[disabled] {
  opacity: var(--opacity-disabled);
  cursor: not-allowed;
  transform: none;
}

.auth-button-link {
  text-decoration: none;
}

.security-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
  color: var(--text-subtle);
  font-size: 0.8rem;
}

.security-icon {
  width: 16px;
  height: 16px;
  color: var(--color-secondary);
}

.session-expired-notice,
.auth-message,
.auth-contact-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--color-border-strong);
}

.session-expired-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  background: rgb(210 140 86 / 12%);
}

.auth-message-success {
  background: rgb(93 165 138 / 14%);
}

.auth-message-error {
  background: rgb(212 111 77 / 14%);
}

.auth-contact-card {
  background: rgb(16 36 63 / 5%);
}

.auth-contact-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.auth-contact-card p {
  margin: 0.45rem 0;
  color: var(--text-muted);
}

.auth-danger-title {
  color: #b53030;
  -webkit-text-fill-color: initial;
  background: none;
}

[data-theme="dark"] .login-card {
  background: linear-gradient(
    180deg,
    rgb(12 20 33 / 92%),
    rgb(15 25 39 / 96%)
  );
}

[data-theme="dark"] .auth-contact-card,
[data-theme="dark"] .session-expired-notice,
[data-theme="dark"] .auth-message {
  background: rgb(19 30 49 / 85%);
}

[data-theme="contrast"] .login-card,
[data-theme="contrast"] .session-expired-notice,
[data-theme="contrast"] .auth-message,
[data-theme="contrast"] .auth-contact-card {
  background: #fff;
  border: 2px solid #000;
  box-shadow: none;
}

[data-theme="contrast"] .login-button {
  background: #000;
  box-shadow: none;
}

@media (width <= 860px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .auth-panel-brand {
    min-height: 280px;
  }
}

@media (width <= 600px) {
  .login-card-content,
  .auth-panel-brand {
    padding: 1.35rem;
  }

  .login-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-field {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-button,
  .forgot-password-link,
  .auth-highlight {
    transition: none;
  }

  .login-button:hover {
    transform: none;
  }
}
