/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: #111827; background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; height: 100%; }
a { text-decoration: none; color: inherit; }

/* ========== AUTH LAYOUT ========== */
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ========== LEFT BRAND PANEL ========== */
.auth-brand {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #0E4A6F 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.signup-brand { background: linear-gradient(135deg, #0F172A 0%, #065F46 50%, #0E4A6F 100%); }
.signup-brand::before { background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%); }

.brand-content { position: relative; z-index: 1; }
.brand-logo { display: inline-block; margin-bottom: 48px; }
.brand-logo svg, .brand-logo img { height: 44px; width: auto; display: block; }
.auth-logo-img { height: 44px; width: auto; object-fit: contain; }
.brand-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.brand-content > p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 400px;
}
.brand-features { display: flex; flex-direction: column; gap: 16px; }
.bf-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
}
.bf-item svg { width: 20px; height: 20px; flex-shrink: 0; color: #10B981; }
.brand-footer { position: relative; z-index: 1; }
.brand-footer p { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* ========== RIGHT FORM PANEL ========== */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #fff;
  overflow-y: auto;
}
.auth-form-container { width: 100%; max-width: 420px; }

.auth-mobile-logo { display: none; margin-bottom: 32px; text-align: center; }
.auth-mobile-logo svg, .auth-mobile-logo img { height: 40px; width: auto; margin: 0 auto; }
.auth-mobile-logo .auth-logo-img { height: 40px; }

.auth-header { margin-bottom: 36px; }
.auth-header h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-header p { font-size: 0.9rem; color: #6B7280; }

/* ========== FORM ELEMENTS ========== */
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: #374151; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { font-size: 0.8rem; color: #3B82F6; font-weight: 500; transition: color 0.2s; }
.forgot-link:hover { color: #2563EB; }

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #9CA3AF;
  pointer-events: none;
  z-index: 1;
}
.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #111827;
  background: #F9FAFB;
  transition: all 0.2s;
  outline: none;
}
.input-wrapper input:focus {
  border-color: #3B82F6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.input-wrapper input::placeholder { color: #9CA3AF; }

/* Toggle password */
.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #9CA3AF;
  transition: color 0.2s;
}
.toggle-password:hover { color: #6B7280; }
.toggle-password svg { width: 18px; height: 18px; }

/* Checkbox */
.checkbox-group { margin-top: -4px; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #4B5563;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid #D1D5DB;
  appearance: none;
  cursor: pointer;
  position: relative;
  background: #fff;
  transition: all 0.2s;
  flex-shrink: 0;
}
.checkbox-label input[type="checkbox"]:checked {
  background: #3B82F6;
  border-color: #3B82F6;
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.checkbox-label a { color: #3B82F6; font-weight: 500; }
.checkbox-label a:hover { text-decoration: underline; }

/* Password requirements */
.password-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
}
.req {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: #9CA3AF;
  transition: color 0.2s;
}
.req .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D1D5DB;
  transition: background 0.2s;
  flex-shrink: 0;
}
.req.met { color: #059669; }
.req.met .dot { background: #10B981; }
.req.unmet { color: #EF4444; }
.req.unmet .dot { background: #EF4444; }

/* Error & Success */
.form-error {
  padding: 12px 16px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 10px;
  color: #DC2626;
  font-size: 0.85rem;
  font-weight: 500;
}
.form-success {
  padding: 12px 16px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 10px;
  color: #16A34A;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(59,130,246,0.4); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Loader spinner */
.btn-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}
.auth-divider span { font-size: 0.8rem; color: #9CA3AF; font-weight: 500; }

/* Alt action */
.auth-alt { text-align: center; }
.auth-alt p { font-size: 0.9rem; color: #6B7280; }
.auth-alt a { color: #3B82F6; font-weight: 600; transition: color 0.2s; }
.auth-alt a:hover { color: #2563EB; }

/* Back to home */
.back-home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.8rem;
  color: #9CA3AF;
  transition: color 0.2s;
}
.back-home:hover { color: #3B82F6; }
.back-home svg { width: 16px; height: 16px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: block; }
  .auth-form-panel { padding: 32px 24px; align-items: flex-start; padding-top: 48px; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .auth-header h2 { font-size: 1.5rem; }
  .auth-form-panel { padding: 24px 16px; padding-top: 40px; }
}
