/* ══════════════════════════════════════════════
   PROJECT AURORA — register.css
   Paleta: #080A1A · #3E4EAC · #9C69E1 · #6DA6F2 · #81EAD8
   Glassmorphism + Aurora Boreal
══════════════════════════════════════════════ */

:root {
  --bg:         #080A1A;
  --base:       #3E4EAC;
  --purple:     #9C69E1;
  --celeste:    #6DA6F2;
  --light:      #81EAD8;
  --teal:       #14B8A6;
  --green:      #10B981;
  --crisis:     #EF4444;
  --alert:      #F59E0B;

  --glass-bg:   rgba(255,255,255,0.05);
  --glass-bd:   rgba(255,255,255,0.10);
  --input-bg:   rgba(255,255,255,0.06);
  --input-bd:   rgba(255,255,255,0.12);
  --text:       #F8FAFC;
  --muted:      rgba(248,250,252,0.45);
}

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

body {
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

/* ── Aurora background ──────────────────────── */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: orbFloat 16s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation-duration: 18s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--base) 0%, transparent 70%);
  top: 20%; right: -80px;
  animation-duration: 14s;
  animation-delay: -4s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, var(--celeste) 0%, transparent 70%);
  bottom: -80px; left: 30%;
  animation-duration: 20s;
  animation-delay: -8s;
  opacity: 0.35;
}
.orb-4 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--light) 0%, transparent 70%);
  top: 60%; right: 10%;
  animation-duration: 22s;
  animation-delay: -2s;
  opacity: 0.25;
}

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -40px) scale(1.08); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(109,166,242,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109,166,242,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Page wrapper ───────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 20px 16px;
  animation: cardIn 0.75s cubic-bezier(0.16,1,0.3,1) forwards;
  opacity: 0;
  transition: max-width 0.35s cubic-bezier(0.16,1,0.3,1);
}

.page-wrapper.clinica-active {
  max-width: 520px;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Glass card ─────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-bd);
  border-radius: 24px;
  padding: 36px 32px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 8px 48px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── Card header ────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--celeste));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(156,105,225,0.4);
}

/* ── Titles ─────────────────────────────────── */
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  transition: all 0.25s ease;
}

.card-sub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 24px;
  transition: all 0.25s ease;
}

/* ── Profile toggle (3 Opções) ──────────────── */
.profile-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}

.toggle-btn {
  padding: 10px 4px;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--base));
  color: white;
  box-shadow: 0 4px 16px rgba(156,105,225,0.35);
}

.toggle-btn:not(.active):hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.05);
}

.toggle-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.toggle-label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Field groups ───────────────────────────── */
.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s;
}

.input-field {
  width: 100%;
  padding: 13px 42px;
  background: var(--input-bg);
  border: 1px solid var(--input-bd);
  border-radius: 12px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: all 0.25s ease;
}

.input-field::placeholder { color: rgba(255,255,255,0.20); }

.input-field:focus {
  border-color: rgba(109,166,242,0.55);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 3px rgba(109,166,242,0.12);
}

.input-wrap:focus-within .input-icon { color: var(--celeste); }

.input-field.error  { border-color: rgba(239,68,68,0.55) !important; }
.input-field.valid  { border-color: rgba(16,185,129,0.45) !important; }

.toggle-vis {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  padding: 4px;
  transition: color 0.2s;
}
.toggle-vis:hover { color: var(--text); }

/* ── Password strength ──────────────────────── */
.strength-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
  min-height: 14px;
  transition: color 0.3s;
}

/* ── Field error ────────────────────────────── */
.field-error {
  font-size: 11px;
  color: var(--crisis);
  display: block;
  margin-top: 5px;
  min-height: 14px;
}

/* ── Checkbox ───────────────────────────────── */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 6px;
  margin-top: 4px;
}

.checkbox-wrap input[type="checkbox"] { display: none; }

.checkbox-custom {
  width: 18px; height: 18px;
  border: 1.5px solid var(--input-bd);
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--input-bg);
  transition: all 0.2s;
}

.checkbox-wrap input:checked + .checkbox-custom {
  background: linear-gradient(135deg, var(--purple), var(--celeste));
  border-color: transparent;
}

.checkbox-wrap input:checked + .checkbox-custom::after {
  content: '✓';
  font-size: 11px;
  color: white;
  font-weight: 700;
}

.checkbox-label {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.link-inline {
  color: var(--celeste);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.link-inline:hover { color: var(--light); }

/* ── Submit button ──────────────────────────── */
.btn-submit {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--base), var(--purple));
  color: white;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 6px 28px rgba(62,78,172,0.45);
}

.btn-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(62,78,172,0.6);
}
.btn-submit:hover::after { transform: translateX(100%); }
.btn-submit:active { transform: translateY(0); }

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-arrow { font-size: 18px; transition: transform 0.2s; }
.btn-submit:hover .btn-arrow { transform: translateX(4px); }

/* ── Card footer ────────────────────────────── */
.card-footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Toast ──────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 999;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}

.toast-wrap.show { transform: translateX(-50%) translateY(0); }

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(8,10,26,0.95);
  border: 1px solid var(--glass-bd);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }

.toast-icon { font-size: 18px; }

/* ── Institutional Clinic Accreditation Banner ────────── */
.clinica-banner {
  animation: bannerFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  margin-bottom: 8px;
}

@keyframes bannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.clinica-hero-card {
  background: linear-gradient(180deg, rgba(30, 41, 89, 0.55) 0%, rgba(13, 18, 38, 0.75) 100%);
  border: 1px solid rgba(109, 166, 242, 0.28);
  border-radius: 20px;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.clinica-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--celeste), var(--light));
}

.clinica-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(109, 166, 242, 0.14);
  border: 1px solid rgba(109, 166, 242, 0.35);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--light);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.badge-pulse {
  width: 7px;
  height: 7px;
  background-color: var(--light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--light);
  display: inline-block;
  animation: badgeBlink 2s infinite ease-in-out;
}

@keyframes badgeBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.clinica-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.clinica-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(248, 250, 252, 0.8);
  margin-bottom: 20px;
}

.clinica-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.clinica-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.clinica-feature-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(109, 166, 242, 0.3);
  transform: translateX(2px);
}

.feature-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-icon-box.cyan {
  background: rgba(109, 166, 242, 0.16);
  color: var(--celeste);
  border: 1px solid rgba(109, 166, 242, 0.3);
}

.feature-icon-box.red {
  background: rgba(239, 68, 68, 0.16);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.feature-icon-box.purple {
  background: rgba(156, 105, 225, 0.16);
  color: #C084FC;
  border: 1px solid rgba(156, 105, 225, 0.3);
}

.feature-icon-box.green {
  background: rgba(16, 185, 129, 0.16);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.feature-content {
  flex: 1;
}

.feature-title {
  font-size: 13px;
  font-weight: 600;
  color: #F8FAFC;
  margin-bottom: 2px;
}

.feature-sub {
  font-size: 11.5px;
  color: rgba(248, 250, 252, 0.6);
  line-height: 1.35;
  margin: 0;
}

.clinica-action-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-clinica-cta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 50%, #06B6D4 100%);
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-clinica-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.22) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-clinica-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(37, 99, 235, 0.6);
  color: #FFFFFF;
}

.btn-clinica-cta:hover::after {
  transform: translateX(100%);
}

.btn-cta-text {
  position: relative;
  z-index: 1;
}

.clinica-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(248, 250, 252, 0.55);
  text-align: center;
}

/* ── Acessibilidade / Preferências do usuário ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .page-wrapper {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .badge-pulse {
    animation: none !important;
  }
}

@media (max-width: 440px) {
  .page-wrapper {
    padding: 14px 10px;
  }
  .glass-card {
    padding: 24px 16px;
    border-radius: 20px;
  }
  .card-title {
    font-size: 22px;
  }
  .profile-toggle {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  #btnClinica {
    grid-column: span 2;
  }
  .toggle-btn {
    font-size: 12px;
    padding: 9px 4px;
    gap: 5px;
  }
  .toggle-emoji {
    font-size: 14px;
  }
  .btn-clinica-cta {
    font-size: 13px;
    padding: 12px 10px;
  }
  .clinica-title {
    font-size: 18px;
  }
  .clinica-hero-card {
    padding: 18px 14px;
  }
  .clinica-desc {
    font-size: 12.5px;
  }
}

@media (max-width: 340px) {
  .profile-toggle {
    grid-template-columns: 1fr;
  }
  #btnClinica {
    grid-column: span 1;
  }
}

/* ── Escalonamento Padronizado de Logos ─────────────────── */
.logo-sm { max-width: 90px; height: auto; }
.logo-md { max-width: 140px; height: auto; }
.logo-lg { max-width: 200px; height: auto; }
.logo-splash { 
    max-width: 250px; /* Bem maior para a tela de abertura */
    height: auto; 
    filter: drop-shadow(0px 4px 12px rgba(0,0,0,0.5));
}

/* Ajuste responsivo para telas menores */
@media (max-width: 768px) {
    .logo-splash { max-width: 180px; }
    .logo-lg { max-width: 160px; }
}

