/* ============================================================
   LOGIN PAGE
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.auth-body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  height: 100vh;
  overflow: hidden;
}

/* ── Split layout ─────────────────────────────────────────── */
.auth-wrapper {
  display: flex;
  height: 100vh;
}

.auth-image {
  width: 50%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.auth-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  padding: 48px 40px;
  overflow-y: auto;
}

/* ── Form container ───────────────────────────────────────── */
.auth-form-container {
  width: 100%;
  max-width: 380px;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.auth-logo {
  height: 42px;
  display: block;
}

.auth-brand-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gray-400);
  text-transform: uppercase;
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: #1A1F3C;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Inputs ───────────────────────────────────────────────── */
.auth-form .form-group {
  margin-bottom: 14px;
}

.auth-form .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.auth-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(120, 196, 30, 0.12);
}

.auth-form .form-control::placeholder {
  color: var(--gray-400);
}

/* ── Options row ──────────────────────────────────────────── */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* ── Toggle switch ────────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-base);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.toggle-input:checked + .toggle-switch {
  background: var(--primary);
}

.toggle-input:checked + .toggle-switch::after {
  transform: translateX(16px);
}

.toggle-text {
  font-size: 14px;
  color: var(--gray-700);
}

/* ── Links ────────────────────────────────────────────────── */
.auth-link {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-link:hover {
  color: var(--primary-dark);
}

/* ── Sign in button ───────────────────────────────────────── */
.btn-signin {
  width: 100%;
  padding: 13px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
  margin-bottom: 28px;
}

.btn-signin:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(120, 196, 30, 0.35);
}

.btn-signin:active {
  transform: scale(0.99);
  box-shadow: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
}

/* ── Error alert ──────────────────────────────────────────── */
.auth-error {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  color: #B91C1C;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  body.auth-body { overflow: auto; }

  .auth-image { display: none; }

  .auth-wrapper {
    min-height: 100vh;
    height: auto;
    align-items: center;
    justify-content: center;
  }

  .auth-panel {
    padding: 48px 24px;
    align-items: flex-start;
  }

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

  .auth-form .form-control {
    font-size: 16px; /* prevents iOS auto-zoom */
    min-height: 44px;
  }

  .btn-signin { min-height: 44px; }
}
