/* ============================================================================
   Auth Pages — Login / Register — Matching clean minimal theme
   ============================================================================ */

/* Keep full page in viewport; only .auth__left scrolls */
html.auth-page,
html.auth-page body {
  height: 100%;
  overflow: hidden;
}

.auth {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.auth__left {
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  overflow-y: auto;
  min-height: 0; /* allow grid child to shrink and show scrollbar */
  /* Theme-friendly scrollbar — subtle, not overpowering */
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) var(--gray-100);
}

.auth__left::-webkit-scrollbar {
  width: 8px;
}

.auth__left::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
  margin: 8px 0;
}

.auth__left::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

.auth__left::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

.auth__brand { margin-bottom: 48px; }

.auth__form-wrap {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth__title {
  font-family: var(--font-body);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth__subtitle { color: var(--gray-500); font-size: 0.95rem; margin-bottom: 32px; }

.auth__alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  font-weight: 500;
}
.auth__alert--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth__alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.auth__form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
}

.form-group input,
.form-group select {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
  color: var(--gray-900);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,99,200,0.08);
}

.form-group input::placeholder { color: var(--gray-400); }

.form-row { display: flex; justify-content: space-between; align-items: center; }
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--gray-600); cursor: pointer;
}
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

.auth__link { font-size: 0.85rem; font-weight: 600; color: var(--primary); }
.auth__footer-text { text-align: center; margin-top: 28px; font-size: 0.88rem; color: var(--gray-500); }

/* Right panel — fixed viewport height, no scroll */
.auth__right {
  height: 100vh;
  min-height: 0;
  background: linear-gradient(155deg, #1a3a6e, #2d63c8, #3b7dff);
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth__right::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(59,125,255,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(26,58,110,0.4) 0%, transparent 50%);
}

.auth__right-content {
  position: relative; z-index: 1;
  color: #fff;
  max-width: 360px;
  text-align: center;
}

.auth__right-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}

.auth__right-content p {
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 36px;
}

.auth__right-stats { display: flex; justify-content: center; gap: 48px; }
.auth__right-stats div { text-align: center; }
.auth__right-stats strong { display: block; font-size: 1.6rem; font-weight: 800; color: #fff; }
.auth__right-stats span { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.4); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__right { display: none; }
  .auth__left { padding: 24px; }
}

@media (max-width: 500px) {
  .form-row-2col { grid-template-columns: 1fr; }
}
