/* ═══ AIPA Auth Pages — Split Screen Layout ═══ */

/* Layout */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', sans-serif;
}

.auth-brand-panel {
  background: linear-gradient(160deg, #050d18 0%, #0f1f35 40%, #1e3a5f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 120, 212, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand-panel::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
}

.auth-brand-logo img {
  height: 36px;
}

.auth-brand-logo span {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.auth-brand-tagline {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 1rem;
  letter-spacing: -0.5px;
}

.auth-brand-desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 0 0 2.5rem;
  max-width: 380px;
}

/* Trust indicators */
.auth-trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
}

.auth-trust-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-trust-icon svg {
  width: 18px;
  height: 18px;
  stroke: #60a5fa;
}

/* Benefits list (for register page) */
.auth-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.auth-benefit-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.auth-benefit-check svg {
  width: 12px;
  height: 12px;
  stroke: #4ade80;
  stroke-width: 3;
}

/* Form panel */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #fff;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
  animation: authFadeIn 0.5s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-form-header {
  margin-bottom: 2rem;
}

.auth-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  letter-spacing: -0.3px;
}

.auth-form-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* Form elements */
.auth-field {
  margin-bottom: 1.25rem;
}

.auth-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.90rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.auth-label-link {
  font-size: 0.90rem;
  color: #0078D4;
  text-decoration: none;
  font-weight: 500;
}

.auth-label-link:hover {
  text-decoration: underline;
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: #0078D4;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.12);
}

.auth-input.is-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.auth-input-password-wrap {
  position: relative;
}

.auth-input-password-wrap .auth-input {
  padding-right: 44px;
}

.auth-pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px;
  display: flex;
  align-items: center;
}

.auth-pwd-toggle:hover {
  color: #475569;
}

.auth-field-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  min-height: 1em;
}

.auth-field-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Remember me / checkbox */
.auth-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.5rem;
}

.auth-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0078D4;
}

.auth-checkbox-row label {
  font-size: 0.90rem;
  color: #64748b;
  cursor: pointer;
}

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #0A1628, #1E3A5F);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 22, 40, 0.25);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Error message */
.auth-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.90rem;
  margin-bottom: 1.25rem;
  display: none;
}

.auth-error-msg.show {
  display: block;
}

/* Footer links */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.90rem;
  color: #64748b;
}

.auth-footer a {
  color: #0078D4;
  text-decoration: none;
  font-weight: 500;
}

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

/* Social proof at bottom */
.auth-social-proof {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
}

.auth-social-proof p {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
}

/* Form row (two columns) */
.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Password strength bar */
.auth-pwd-strength {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  margin-top: 8px;
  overflow: hidden;
}

.auth-pwd-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s, background-color 0.3s;
  width: 0;
}

.auth-pwd-strength-bar.weak { width: 25%; background: #ef4444; }
.auth-pwd-strength-bar.fair { width: 50%; background: #f59e0b; }
.auth-pwd-strength-bar.good { width: 75%; background: #22c55e; }
.auth-pwd-strength-bar.strong { width: 100%; background: #16a34a; }

.auth-pwd-strength-label {
  font-size: 0.6875rem;
  margin-top: 4px;
  color: #94a3b8;
}

/* Language selector on auth pages */
.auth-lang-wrap {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
}

/* Terms checkbox */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.auth-terms input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #0078D4;
  flex-shrink: 0;
}

.auth-terms label {
  font-size: 0.90rem;
  color: #64748b;
  line-height: 1.5;
}

.auth-terms a {
  color: #0078D4;
  text-decoration: none;
}

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

/* Account type toggle (business/personal) */
.auth-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
}

.auth-type-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  font-size: 0.90rem;
  font-weight: 500;
  font-family: inherit;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-type-btn.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Responsive */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-brand-panel {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .auth-brand-tagline {
    font-size: 1.25rem;
  }
  .auth-brand-desc {
    display: none;
  }
  .auth-trust-list,
  .auth-benefits-list {
    display: none;
  }
  .auth-form-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 540px) {
  .auth-form-row {
    grid-template-columns: 1fr;
  }
  .auth-brand-panel {
    padding: 1.25rem;
  }
  .auth-form-container {
    max-width: 100%;
  }
}

/* Focus visible for keyboard nav */
.auth-input:focus-visible {
  outline: 2px solid #0078D4;
  outline-offset: 2px;
}

.auth-submit:focus-visible {
  outline: 2px solid #0078D4;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-form-container {
    animation: none;
  }
  .auth-submit:hover {
    transform: none;
  }
}

