/* Auth pages — forms & layout (header/footer from landing.css) */

html {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
  max-width: 100%;
  touch-action: pan-y pinch-zoom;
}

.login-section,
.register-section,
.forgot-section {
  background: linear-gradient(135deg, rgba(31, 110, 115, 0.85) 0%, rgba(20, 83, 89, 0.85) 50%, rgba(15, 58, 62, 0.85) 100%),
    url('../img/img2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 120px 20px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - var(--header-height, 80px));
  min-height: calc(100vh - var(--header-height, 80px));
}

.auth-container {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  padding: 48px 40px;
}

.auth-container .logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-container .logo img {
  height: 60px;
}

.auth-container h1 {
  color: var(--dark);
  font-size: 28px;
  margin-bottom: 8px;
  text-align: center;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-container .subtitle {
  color: var(--text-light);
  text-align: center;
  margin-bottom: 32px;
}

.auth-container .form-group {
  margin-bottom: 20px;
}

.auth-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.auth-container input,
.auth-container select {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-container input:focus,
.auth-container select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 110, 115, 0.1);
}

.auth-container .btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-900) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(31, 110, 115, 0.25);
}

.auth-container .btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 110, 115, 0.35);
}

.auth-container .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-container .alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.auth-container .alert.show {
  display: block;
}

.auth-container .alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.auth-container .alert-success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.auth-container .links {
  text-align: center;
  margin-top: 24px;
}

.auth-container .links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

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

.auth-container .divider {
  margin: 16px 0;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  position: relative;
}

.auth-container .divider::before,
.auth-container .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 28px);
  height: 1px;
  background: var(--border);
}

.auth-container .divider::before { left: 0; }
.auth-container .divider::after { right: 0; }

.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-google:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.btn-google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-google--disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-google-hint,
.auth-modal-google-hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-light);
  text-align: center;
}

.auth-google-hint[data-google-auth-hint],
.auth-modal-google-hint[data-google-auth-hint] {
  color: #B45309;
}

.auth-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-role-option strong {
  font-size: 15px;
  color: var(--text);
}

.auth-role-option small {
  font-size: 12px;
  color: var(--text-light);
}

.auth-role-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-role-option.is-selected {
  border-color: var(--primary);
  background: rgba(31, 110, 115, 0.06);
}

.auth-role-option.is-selected--tenant {
  border-color: var(--tenant);
  background: var(--tenant-soft, rgba(139, 92, 246, 0.1));
}

@media (max-width: 968px) {
  html {
    scroll-behavior: auto;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .auth-container {
    padding: 32px 20px;
  }

  .login-section,
  .register-section,
  .forgot-section {
    align-items: flex-start;
    padding-top: 32px;
    padding-bottom: 40px;
    min-height: auto;
  }
}
