/* MedCof B2B — login split (light), index.html + recuperar-senha.html + admin.html */
body.login-page,
.login-overlay {
  --bg: #f4f6fa;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --border: #e2e8f0;
  --border-subtle: #eef2f6;
  --text: #0f172a;
  --text-soft: #64748b;
  --text-muted: #94a3b8;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --accent-soft: rgba(220, 38, 38, 0.08);
  --accent-glow: rgba(220, 38, 38, 0.18);
  --danger-text: #b91c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --login-panel-curve: 40px;
  --login-panel-overlap: 48px;
}

body.login-page,
.login-overlay {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.login-page {
  min-height: 100vh;
  min-height: 100dvh;
}

body.login-page *,
body.login-page *::before,
body.login-page *::after,
.login-overlay *,
.login-overlay *::before,
.login-overlay *::after {
  box-sizing: border-box;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.login-shell--alt-step .insights-panel {
  display: none;
}

.login-shell--alt-step .login-panel {
  margin-right: 0;
  margin-bottom: 0;
  border-radius: 0 28px 28px 0;
  box-shadow: none;
}

/* ── Left panel (sobreposição sobre o banner vermelho) ── */
.login-panel {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  margin-right: calc(-1 * var(--login-panel-overlap));
  background: var(--bg-card);
  border-right: none;
  border-radius: 0 var(--login-panel-curve) var(--login-panel-curve) 0;
  box-shadow: 10px 0 32px -8px rgba(15, 23, 42, 0.24);
}

.login-panel__inner {
  width: min(100%, 440px);
}

.landing-card {
  position: static;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  text-align: left;
}

.login-brand {
  margin-bottom: 18px;
}

.login-brand img,
.landing-logo:not(.landing-logo--favicon) {
  display: block;
  height: 38px;
  width: auto;
  max-width: 180px;
  margin: 0;
}

.login-brand .landing-logo--favicon,
.landing-logo--favicon {
  display: block;
  width: 48px;
  height: 48px;
  max-width: 48px;
  margin: 0;
  border-radius: 11px;
}

.login-heading,
.landing-title {
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 24px;
  text-align: left;
}

body.login-page .landing-title {
  white-space: nowrap;
}

.login-subheading,
.landing-subtitle {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 28px;
  text-align: left;
}

.landing-divider { display: none; }
.landing-badge { display: none !important; }

.bg-grid,
.bg-glow,
.bg-glow-bottom { display: none; }

.form-row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 20px;
  flex-wrap: wrap;
}

.form-row-options--end {
  justify-content: flex-end;
}

.login-trust-stat {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
  text-align: left;
}

.login-trust-stat strong {
  color: var(--accent);
  font-weight: 700;
}

.login-first-access-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
}

.login-first-access-banner__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  flex-shrink: 0;
}

.login-first-access-banner__icon svg {
  width: 15px;
  height: 15px;
}

.login-first-access-banner p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.login-first-access-banner strong {
  color: var(--text);
  font-weight: 600;
}

.login-role-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(220, 38, 38, 0.15);
}

.checkbox-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}

.checkbox-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.form-row-forgot { display: none; }

.form-forgot {
  display: inline-block;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  margin-top: 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.form-forgot:hover { color: var(--accent); }

/* ── Form fields ── */
.login-form { text-align: left; }

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 7px;
  text-transform: none;
  letter-spacing: 0;
}

.field-input-wrap,
.pre-cadastro-pass-wrap {
  position: relative;
}

.field-input-wrap .field-icon {
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  pointer-events: none;
  color: var(--text-muted);
  z-index: 1;
}

.field-input-wrap .field-icon svg,
.field-pass-toggle svg,
.pre-cadastro-pass-toggle svg,
.kpi-card__icon svg,
.insights-eyebrow svg,
.insights-list svg,
.recovery-success__icon svg {
  display: block;
  stroke: currentColor;
  fill: none;
}

.field-input-wrap--has-toggle .form-input {
  padding-right: 46px;
}

.pre-cadastro-pass-wrap:not(.field-input-wrap) .form-input {
  padding-left: 14px;
}

.field-input-wrap:not(.field-input-wrap--plain) .form-input {
  padding-left: 42px;
}

.field-pass-toggle,
.pre-cadastro-pass-toggle {
  position: absolute;
  right: 4px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: color 0.2s;
}

.field-pass-toggle:hover,
.pre-cadastro-pass-toggle:hover { color: var(--text); }

.field-input-wrap .field-icon svg {
  width: 18px;
  height: 18px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-input::placeholder { color: var(--text-muted); }

.btn-login {
  width: 100%;
  padding: 13px 18px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, opacity 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.btn-login:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-google {
  width: 100%;
  padding: 12px 18px;
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.btn-google:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: var(--bg-elevated);
}

.btn-google:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-google svg { flex-shrink: 0; }

.login-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.login-or::before,
.login-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-error {
  display: none;
  margin-top: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--danger-text);
  text-align: center;
}

.login-error.visible { display: block; }

.login-error.login-info {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.login-maintenance-notice {
  margin: 14px 0 4px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  color: #92400e;
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: left;
}

.login-maintenance-notice strong { color: #78350f; }

.login-pre-cad-cta { margin-top: 14px; text-align: center; }
.login-resend-cta { margin-top: 8px; text-align: center; }

.login-pre-cad-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 0;
}

.login-pre-cad-btn:hover:not(:disabled) { color: var(--accent-hover); }

.login-pre-cad-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: line-through;
  color: var(--text-muted);
}

.login-pre-cad-btn.email-outbound-stopped,
#preCadastroResendConfirmBtn.email-outbound-stopped {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none;
  text-decoration: none !important;
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  padding: 8px 12px !important;
}

.login-loading {
  display: none;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.login-loading.visible { display: block; }

.landing-footer {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 28px;
  text-align: center;
}

[hidden] { display: none !important; }

.landing-stats,
.landing-guia-card { display: none !important; }

/* ── Alternate steps (campus, pré-cadastro) ── */
#campusPickerShell { display: none; text-align: left; }
#campusPickerShell.is-visible { display: block; }

.campus-picker-title,
.pre-cadastro-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.campus-picker-desc,
.pre-cadastro-desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  line-height: 1.55;
}

.campus-picker-btns { display: flex; flex-direction: column; gap: 10px; }

.btn-campus {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.btn-campus:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

#preCadastroShell { display: none; text-align: left; }
#preCadastroShell.is-visible { display: block; }

#preCadastroEmailShell { display: none; text-align: left; }
#preCadastroEmailShell.is-visible { display: block; }

.pre-cadastro-error {
  display: none;
  margin-bottom: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--danger-text);
}

.pre-cadastro-error.visible { display: block; }

.form-input-pre { min-height: 88px; resize: vertical; }

.pre-cadastro-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pre-cadastro-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.pre-cadastro-check input {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.35;
}

#preCadastroEmailDone { text-align: left; }

#preCadastroEmailDone h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

#preCadastroEmailDone p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 18px;
}

/* ── Right: banner institucional (vermelho MedCof) ── */
.insights-panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px 52px;
  background: linear-gradient(152deg, #dc2626 0%, #c81e1e 32%, #b91c1c 58%, #991b1b 82%, #7f1d1d 100%);
  color: #fff;
}

.insights-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.07) 0%, transparent 32%),
    radial-gradient(circle at 12% 92%, rgba(45, 7, 7, 0.35) 0%, transparent 42%);
  pointer-events: none;
}

.insights-panel__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  isolation: isolate;
}

/* Marca d'água: fundo do bloco de conteúdo, direita — não compete com título/cards */
.insights-panel__mark {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  user-select: none;
  right: -14%;
  top: 54%;
  width: min(64%, 340px);
  aspect-ratio: 472 / 577;
  transform: translateY(-50%);
}

.insights-panel__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.09;
  mask-image: radial-gradient(ellipse 78% 74% at 42% 48%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 78% 74% at 42% 48%, #000 0%, transparent 78%);
}

.insights-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
}

.insights-eyebrow svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.insights-title {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 20px;
  max-width: 100%;
  text-wrap: balance;
  color: #fff;
}

.insights-title--banner {
  margin-bottom: 16px;
}

.insights-features {
  display: grid;
  gap: 10px;
}

.insights-feature-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.insights-feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  flex-shrink: 0;
}

.insights-feature-card__icon svg {
  width: 20px;
  height: 20px;
}

.insights-feature-card__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.insights-feature-card__text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.insights-feature-card__text span {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.35;
}

.insights-list--banner {
  margin-top: 0;
  margin-bottom: 0;
}

/* ── Ticker de prova social (base do banner) ── */
.insights-ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: rgba(45, 7, 7, 0.58);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.insights-ticker__viewport {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.insights-ticker__track {
  display: flex;
  width: max-content;
  animation: insights-ticker-scroll 38s linear infinite;
}

.insights-ticker__group {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 11px 14px;
  white-space: nowrap;
}

.insights-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
}

.insights-ticker__item::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.insights-ticker__group .insights-ticker__item:first-child::before {
  display: none;
}

.insights-ticker__trophy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.insights-ticker__trophy svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.25;
}

.insights-ticker__trophy--gold {
  color: #fde68a;
  background: rgba(253, 230, 138, 0.18);
  box-shadow: 0 0 0 1px rgba(253, 230, 138, 0.35);
}

.insights-ticker__trophy--silver {
  color: #f1f5f9;
  background: rgba(241, 245, 249, 0.14);
  box-shadow: 0 0 0 1px rgba(241, 245, 249, 0.28);
}

.insights-ticker__trophy--bronze {
  color: #fdba74;
  background: rgba(253, 186, 116, 0.16);
  box-shadow: 0 0 0 1px rgba(253, 186, 116, 0.32);
}

@keyframes insights-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .insights-ticker__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  .insights-ticker__group:last-child {
    display: none;
  }

  .insights-ticker__viewport {
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  align-items: stretch;
}

.kpi-card {
  padding: 16px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 108px;
  display: flex;
  flex-direction: column;
}

.kpi-card__head {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.kpi-card__icon svg {
  width: 17px;
  height: 17px;
}

.kpi-card__value {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
  color: #fff;
  white-space: nowrap;
}

.kpi-card__label {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.35;
  margin-top: auto;
}

.insights-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.insights-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.insights-list svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.85);
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.2s;
}

.login-back-link:hover { color: var(--accent); }

.recovery-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f0fdf4;
  color: #15803d;
  margin-bottom: 20px;
}

.recovery-success__icon svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }

  .login-panel {
    margin-right: 0;
    margin-bottom: calc(-1 * var(--login-panel-overlap));
    border-bottom: none;
    border-radius: 0 0 var(--login-panel-curve) var(--login-panel-curve);
    box-shadow: 0 10px 32px -8px rgba(15, 23, 42, 0.22);
    padding: 32px 24px calc(40px + var(--login-panel-overlap));
  }

  .insights-panel { padding: 40px 24px 48px; }

  .insights-panel__mark {
    display: none;
  }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}
