/* ==========================================================================
   Auth pages v2 (register, login, create-company)
   Loaded AFTER register.css: keeps its custom-select / logo-upload / toast
   pieces and restyles the shell, audience picker, fields and buttons.
   ========================================================================== */

.d-none { display: none !important; }

.au2.auth-page {
  align-items: flex-start;
  padding: 2rem 1.25rem 3rem;
  background:
    radial-gradient(900px 420px at 12% -5%, rgba(99, 102, 241, .10), transparent 60%),
    radial-gradient(800px 420px at 100% 100%, rgba(139, 92, 246, .09), transparent 60%),
    #f6f7fc;
}

.au2 .auth-shell {
  max-width: 1040px;
  border-radius: 26px;
  border: 1px solid #e8eaf6;
  box-shadow: 0 30px 80px -30px rgba(49, 46, 129, .28), 0 4px 14px rgba(17, 24, 39, .04);
}

/* ---------- Side panel ---------- */

.au2 .auth-brand {
  flex: 0 0 38%;
  padding: 2.6rem 2.2rem;
  background:
    radial-gradient(420px 300px at 100% 0%, rgba(167, 139, 250, .45), transparent 65%),
    linear-gradient(165deg, #3b37c4 0%, #4f46e5 45%, #6d4fe6 100%);
}
.au2 .auth-brand-logo { margin-bottom: 2.2rem; }
.au2 .auth-brand-title { font-size: 1.5rem; line-height: 1.5; margin-bottom: 1.1rem; }
.au2 .auth-brand-points { margin-top: 0; gap: 1rem; }
.au2 .auth-brand-points li { font-size: .92rem; line-height: 1.6; align-items: flex-start; }
.au2 .auth-brand-points .point-icon { margin-top: 2px; }

.au-panel { display: none; }
.au-panel.active { display: block; animation: auFade .35s ease; }
@keyframes auFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Form panel ---------- */

.au2 .auth-shell .auth-card {
  padding: 2.4rem 2.6rem 2rem;
  max-height: none;
  overflow: visible;
}

.au-head { margin-bottom: 1.4rem; text-align: start; }
.au-head h1 { font-size: 1.55rem; font-weight: 800; color: var(--auth-text); margin: 0 0 .3rem; letter-spacing: -.01em; }
.au-head p { margin: 0; color: var(--auth-text-muted); font-size: .92rem; }

/* Audience picker */
.au-aud { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1.4rem; }
.au-aud-card {
  position: relative;
  display: flex; align-items: center; gap: .75rem;
  padding: .8rem .9rem;
  border: 1.5px solid var(--auth-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, background .18s, transform .18s;
}
.au-aud-card:hover { border-color: var(--auth-border-hover); transform: translateY(-1px); }
.au-aud-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.au-aud-ic {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #f1f2fb; color: #6b7280; transition: background .18s, color .18s;
}
.au-aud-ic svg { width: 20px; height: 20px; }
.au-aud-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.au-aud-txt b { font-size: .92rem; font-weight: 700; color: var(--auth-text); }
.au-aud-txt small { font-size: .74rem; color: var(--auth-text-muted); margin-top: 2px; }
.au-aud-card:has(input:checked) {
  border-color: var(--auth-accent);
  background: linear-gradient(0deg, rgba(99, 102, 241, .06), rgba(99, 102, 241, .06)), #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .13);
}
.au-aud-card:has(input:checked) .au-aud-ic { background: var(--auth-accent); color: #fff; }

/* Google + notes */
.au2 .btn-google { height: 48px; border-radius: 12px; font-size: .95rem; }
.au-google { margin-bottom: .2rem; }
.au-note { margin: .55rem 0 0; font-size: .78rem; color: var(--auth-text-muted); text-align: center; line-height: 1.6; }
.au-note--block { margin: 0 0 1.1rem; padding: .6rem .8rem; background: #f6f7fd; border-radius: 10px; }
.au2 .auth-divider { margin: 1.1rem 0 1.2rem; }
.au2 .auth-divider span { font-size: .8rem; }

/* Fields */
.au2 .form-group { margin-bottom: 1rem; }
.au2 .form-group label { font-size: .82rem; font-weight: 700; color: #374151; margin-bottom: .4rem; }
.au2 .form-group input,
.au2 .form-group select,
.au2 .custom-select-trigger {
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--auth-border);
  background: #fbfbfe;
  font-size: .92rem;
}
.au2 .form-group input:focus,
.au2 .form-group select:focus { border-color: var(--auth-accent); background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .13); outline: none; }
.au2 .form-group input.error { border-color: var(--auth-danger); box-shadow: 0 0 0 4px rgba(239, 68, 68, .1); }
.au-hint { display: block; margin-top: .3rem; font-size: .74rem; color: var(--auth-text-faint); }
.au2 .form-row { gap: .9rem; }
.au2 .form-options { margin: .2rem 0 1.1rem; font-size: .84rem; }

/* Consultant type */
.au2 .consultant-specialization { margin-bottom: 1.1rem; }
.au2 .consultant-specialization label { font-size: .82rem; font-weight: 700; margin-bottom: .4rem; }
.au2 .consultant-specialization .form-group { margin: 0; }

/* Steps (company via email) */
.au2 .step-indicators { margin: 0 0 1.2rem; }

/* Buttons */
.au2 .btn-full {
  height: 50px; border-radius: 12px; font-size: .98rem; font-weight: 700;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .55);
  transition: transform .15s, box-shadow .15s;
}
.au2 .btn-full:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(79, 70, 229, .6); }
.au2 .btn-full:disabled { opacity: .7; transform: none; cursor: not-allowed; }
.au2 .btn-full.btn-secondary { background: #fff; color: #374151; border: 1.5px solid var(--auth-border); box-shadow: none; }
.au2 .btn-full.btn-secondary:hover { background: #f7f7fd; box-shadow: none; }

.au2 .auth-footer { margin-top: 1.4rem; text-align: center; }
.au2 .auth-footer p { margin: 0 0 .5rem; font-size: .9rem; }

/* ---------- Login ---------- */

.au-login .auth-brand { flex: 0 0 40%; }
.au-login .au-head { margin-bottom: 1.6rem; }
.au-login .form-options-row { margin: .1rem 0 1.2rem; }
.au-login .btn-google { margin-bottom: 0; }

/* ---------- Create company ---------- */

.au-cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.au-cc-section {
  display: flex; align-items: center; gap: .8rem;
  margin: 1.3rem 0 1rem; color: var(--auth-text-muted);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.au-cc-section::before, .au-cc-section::after { content: ""; flex: 1; height: 1px; background: var(--auth-border); }
.au2 .form-group .req { color: var(--auth-danger); }
.au2 textarea.au-textarea {
  width: 100%; min-height: 92px; padding: .75rem 1rem; resize: vertical;
  border: 1.5px solid var(--auth-border); border-radius: 12px; background: #fbfbfe;
  font: inherit; font-size: .92rem; color: var(--auth-text); line-height: 1.6;
}
.au2 textarea.au-textarea:focus { border-color: var(--auth-accent); background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .13); outline: none; }
.au-submit-spin { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: auSpin .7s linear infinite; }
.btn-full.loading .au-submit-spin { display: inline-block; }
.btn-full.loading .btn-text { display: none; }
@keyframes auSpin { to { transform: rotate(360deg); } }
.au-user-chip {
  display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem;
  padding: .6rem .8rem; border-radius: 12px; background: #f3f4fd; font-size: .84rem; color: #374151;
}
.au-user-chip b { color: var(--auth-text); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .au2.auth-page { padding: 1rem .85rem 2.5rem; }
  .au2 .auth-shell { flex-direction: column; border-radius: 20px; }
  .au2 .auth-brand { flex: none; padding: 1.2rem 1.3rem; }
  .au2 .auth-brand-logo { margin-bottom: 0; }
  .au2 .auth-brand-top .au-panel,
  .au2 .auth-brand-bottom,
  .au2 .auth-brand-title,
  .au2 .auth-brand-sub,
  .au2 .auth-brand-points { display: none !important; }
  .au2 .auth-brand::before, .au2 .auth-brand::after { display: none; }
  .au2 .auth-shell .auth-card { padding: 1.6rem 1.25rem 1.5rem; }
}

@media (max-width: 640px) {
  /* 16px inputs: iOS Safari zooms the page on focus below that */
  .au2 .form-group input, .au2 .form-group select, .au2 textarea.au-textarea,
  .au2 .custom-select-trigger, .au2 .custom-select-search input { font-size: 16px; }
  .au2 .auth-shell, .au2 .auth-card { min-width: 0; max-width: 100%; }
  .au2 .auth-shell .auth-card { padding: 1.4rem 1rem 1.3rem; }
  .au2 .custom-select-options { max-width: calc(100vw - 2.5rem); }
  .au2 .step-indicators { justify-content: center; }
  .au2 .form-row[style*="gap"] { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem !important; }
}

@media (max-width: 520px) {
  .au-aud { grid-template-columns: 1fr; }
  .au2 .form-row, .au-cc-grid { grid-template-columns: 1fr; display: grid; gap: 0; }
  .au-head h1 { font-size: 1.35rem; }
}

/* ---------- Sign-up wizard (type -> details -> firm details) ---------- */
.wz-pane { animation: wz-in .22s ease; }
@keyframes wz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.au2 .step-indicators { display: flex; align-items: center; gap: 8px; margin: 0 0 1.3rem; }
.au2 .step-indicators .step { white-space: nowrap; }
.au2 .step.done .step-number { background: var(--auth-accent); border-color: transparent; color: #fff; font-size: 0; }
.au2 .step.done .step-number::before { content: '✓'; font-size: .8rem; }
.au2 .step.done { color: var(--auth-text); }
.au2 .step-connector { min-width: 14px; }
#typeNextBtn { margin-top: .2rem; }

/* the type you picked, with a way back */
.wz-chosen {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; margin-bottom: 1.1rem;
    border: 1.5px solid var(--auth-border); border-radius: 14px; background: var(--auth-field-bg, #f8f8fd);
}
.wz-chosen-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--auth-accent); color: #fff; }
.wz-chosen-ic svg { width: 20px; height: 20px; }
.wz-chosen-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.wz-chosen-txt small { font-size: .72rem; color: var(--auth-text-muted); }
.wz-chosen-txt b { font-size: .95rem; font-weight: 800; color: var(--auth-text); }
.wz-change {
    flex: none; border: 0; background: transparent; color: var(--auth-accent-dark, var(--auth-accent)); font: inherit;
    font-size: .85rem; font-weight: 700; padding: .4rem .7rem; border-radius: 9px; cursor: pointer;
}
.wz-change:hover { background: rgba(79, 70, 229, .1); }

/* back + next on one row */
.wz-nav { display: flex; gap: .7rem; }
.wz-nav .btn-full { flex: 1; width: auto; }
.wz-nav .btn-secondary { flex: 0 0 34%; }
@media (max-width: 480px) {
    .au2 .step-indicators .step-label { font-size: .74rem; }
    .au2 .step-indicators { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .wz-pane { animation: none; } }
