/* ═══════════════════════════════════════════════════════════
   TrustID — Auth Pages (Login / Register)
═══════════════════════════════════════════════════════════ */

.auth-body {
  margin: 0;
  background: var(--c-dark);
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--c-text);
}

.auth-shell {
  display: grid;
  grid-template-columns: 460px 1fr;
  min-height: 100vh;
}

/* ── Left Branding Panel ─────────────────────────────────── */
.auth-panel {
  position: relative;
  background: linear-gradient(160deg, #071018 0%, #0A1622 50%, #071018 100%);
  border-right: 1px solid var(--c-border);
  overflow: hidden;
}
.auth-panel__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
}
.auth-panel__logo { margin-bottom: 64px; }

.auth-panel__hero { margin-bottom: 48px; }
.auth-panel__headline {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.auth-panel__sub { font-size: 15px; color: var(--c-muted); line-height: 1.7; max-width: 340px; }

.auth-panel__features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: auto;
}
.auth-panel__feature { display: flex; align-items: center; gap: 14px; }
.auth-panel__feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(0,212,168,0.1);
  color: var(--c-teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-panel__feature-icon--blue  { background: rgba(10,123,255,0.1); color: var(--c-blue); }
.auth-panel__feature-icon--amber { background: rgba(245,158,11,0.1); color: var(--c-amber); }
.auth-panel__feature strong { display: block; font-size: 14px; color: var(--c-text); font-weight: 600; }
.auth-panel__feature span { display: block; font-size: 12.5px; color: var(--c-muted); margin-top: 1px; }

.auth-panel__testimonial {
  margin-top: 48px;
  padding: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}
.auth-panel__quote { font-size: 13.5px; color: var(--c-text); line-height: 1.65; font-style: italic; margin-bottom: 16px; }
.auth-panel__cite { display: flex; align-items: center; gap: 12px; }
.auth-panel__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,212,168,0.15);
  color: var(--c-teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}
.auth-panel__cite strong { display: block; font-size: 12.5px; color: var(--c-text); }
.auth-panel__cite span { display: block; font-size: 11.5px; color: var(--c-muted); }

.auth-panel__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: 1;
}
.auth-panel__orb--1 { width: 300px; height: 300px; top: -80px; right: -100px; background: var(--c-teal); }
.auth-panel__orb--2 { width: 260px; height: 260px; bottom: -100px; left: -80px; background: var(--c-blue); }
.auth-panel__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  z-index: 1;
}

/* ── Right Form Panel ────────────────────────────────────── */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
}
.auth-main__inner { width: 100%; max-width: 420px; }

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 32px;
}
.auth-topbar__text { font-size: 13px; color: var(--c-muted); }
.tid-btn--sm { padding: 7px 14px; font-size: 12.5px; }

/* Flash message override (dark theme) */
.auth-main__inner > div[style*="background"] {
  background: rgba(239,68,68,0.08) !important;
  border: 1px solid rgba(239,68,68,0.25) !important;
  color: #FCA5A5 !important;
  border-radius: var(--r-md) !important;
  font-size: 13.5px !important;
  margin-bottom: 20px !important;
}

.auth-form-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.auth-form-head__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(10,123,255,0.1);
  color: var(--c-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.auth-form-head__icon--green { background: rgba(0,212,168,0.1); color: var(--c-teal); }
.auth-form-head__title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 3px; }
.auth-form-head__sub { font-size: 13.5px; color: var(--c-muted); }

/* ── Form Fields ─────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--c-muted);
}
.auth-label svg { opacity: 0.6; flex-shrink: 0; }

.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-size: 14.5px;
  font-family: 'DM Sans', sans-serif;
  color: var(--c-text);
  transition: border-color 0.2s, background 0.2s;
}
.auth-input::placeholder { color: var(--c-dim); }
.auth-input:focus {
  outline: none;
  border-color: var(--c-teal);
  background: rgba(0,212,168,0.03);
}
.auth-input.is-valid { border-color: rgba(0,212,168,0.4); }
.auth-input.is-invalid { border-color: rgba(239,68,68,0.5); }

.auth-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238A96A8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.auth-select option { background: var(--c-dark2); color: var(--c-text); }

.auth-eye {
  position: absolute; right: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--c-dim); padding: 4px;
  display: flex; align-items: center;
}
.auth-eye:hover { color: var(--c-muted); }

.auth-input-status {
  position: absolute; right: 14px;
  width: 16px; height: 16px;
  pointer-events: none;
}
.auth-input-status.show-icon { display: flex; align-items: center; justify-content: center; }
.auth-input-status.valid::after {
  content: '✓'; color: var(--c-teal); font-size: 13px; font-weight: 700;
}
#field-password .auth-input-status,
#field-email .auth-input-status { right: 44px; }
#field-name .auth-input-status,
#field-business_type .auth-input-status { right: 14px; }

.auth-field__error {
  font-size: 12px;
  color: #F87171;
  min-height: 0;
  display: block;
}
.auth-field__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-forgot { font-size: 12.5px; color: var(--c-teal); text-decoration: none; white-space: nowrap; }
.auth-forgot:hover { text-decoration: underline; }

/* Password strength meter */
.auth-strength { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.auth-strength__bars { display: flex; gap: 4px; flex: 1; max-width: 140px; }
.auth-strength__bar {
  height: 4px; flex: 1;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  transition: background 0.25s;
}
.auth-strength__bar.active-weak   { background: #EF4444; }
.auth-strength__bar.active-fair   { background: #F59E0B; }
.auth-strength__bar.active-good   { background: #0A7BFF; }
.auth-strength__bar.active-strong { background: #00D4A8; }
.auth-strength__label { font-size: 11.5px; color: var(--c-dim); white-space: nowrap; }

/* Checkbox */
.auth-field--checkbox { margin-top: -4px; }
.auth-check-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--c-muted);
  cursor: pointer; line-height: 1.5;
}
.auth-check-label a { color: var(--c-teal); text-decoration: none; }
.auth-check-label a:hover { text-decoration: underline; }
.auth-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.auth-check-box {
  width: 18px; height: 18px;
  border: 1.5px solid var(--c-border2);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.auth-checkbox:checked + .auth-check-box {
  background: var(--grad-brand);
  border-color: transparent;
}
.auth-checkbox:checked + .auth-check-box::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-checkbox:focus-visible + .auth-check-box { outline: 2px solid var(--c-teal); outline-offset: 2px; }

/* Submit button */
.tid-btn--auth { position: relative; padding: 14px 22px; font-size: 14.5px; margin-top: 4px; }
.tid-btn--auth .btn-loader {
  display: flex; align-items: center; gap: 8px;
}
.tid-spinner--btn {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.tid-btn--auth:disabled { opacity: 0.75; cursor: not-allowed; }

/* Divider */
.auth-divider {
  display: flex; align-items: center;
  gap: 14px;
  margin: 26px 0;
  font-size: 12px; color: var(--c-dim);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--c-border);
}

/* Social buttons */
.auth-social { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  padding: 11px;
  font-size: 13.5px; font-weight: 500;
  color: var(--c-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.auth-social-btn:hover { background: rgba(255,255,255,0.06); border-color: var(--c-border2); }

.auth-switch { text-align: center; font-size: 13.5px; color: var(--c-muted); margin-top: 28px; }
.auth-switch a { color: var(--c-teal); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-trust-row {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 18px; margin-top: 24px;
}
.auth-trust-row span {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--c-dim);
}
.auth-trust-row svg { color: var(--c-teal); opacity: 0.7; }

.auth-footer-links {
  display: flex; justify-content: center; gap: 10px;
  margin-top: 40px;
  font-size: 12px; color: var(--c-dim);
}
.auth-footer-links a { color: var(--c-dim); text-decoration: none; }
.auth-footer-links a:hover { color: var(--c-muted); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-main { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .auth-social { grid-template-columns: 1fr; }
  .auth-trust-row { gap: 12px; }
}
