/* ==========================================================================
   app.css — interface do app (não do currículo; o currículo está em
   templates.css e print.css)
   Mobile-first.
   ========================================================================== */

:root {
  --navy-900: #061427;
  --navy-800: #0b2545;
  --navy-700: #123a68;
  --navy-600: #1b4e85;
  --blue-500: #2f80ed;
  --blue-400: #5aa0f7;
  --blue-50: #eaf2fe;

  --green-600: #15803d;
  --green-500: #16a34a;
  --green-50: #e9f8ee;

  --amber-500: #f59e0b;
  --amber-50: #fff8e7;
  --red-500: #dc2626;
  --red-50: #fdeced;
  --violet-500: #7c3aed;

  --ink-900: #0f1b2d;
  --ink-700: #293b52;
  --ink-600: #475569;
  --ink-400: #7c8aa0;
  --ink-300: #a9b4c4;

  --bg: #f1f5fb;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --line: #e2e8f2;
  --line-strong: #cdd6e4;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --sh-1: 0 1px 2px rgba(6, 20, 39, .06), 0 2px 8px rgba(6, 20, 39, .05);
  --sh-2: 0 4px 10px rgba(6, 20, 39, .07), 0 12px 28px rgba(6, 20, 39, .08);
  --sh-3: 0 18px 50px rgba(6, 20, 39, .20);

  --appbar-h: 60px;
  --gut: 16px;
  --maxw: 1320px;

  --t-fast: 140ms cubic-bezier(.4, 0, .2, 1);
  --t-med: 240ms cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* O atributo hidden tem que vencer qualquer `display` declarado depois.
   Sem isto, .sheet/.drawer (display:flex) continuam ocupando a tela inteira
   mesmo com [hidden] e o backdrop invisível engole todos os cliques. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--appbar-h);
}

body.travado {
  overflow: hidden;
}

body.is-loading .view {
  opacity: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: -.02em;
  font-weight: 800;
}

p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Utilitário: tem que vencer regras de componente mais específicas
   (ex.: `.campo input { width: 100% }`), senão o elemento continua ocupando
   espaço no layout mesmo "escondido" e estoura a largura da página. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon-sprite {
  display: none;
}

.ic {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: var(--r-xs);
}

/* ==========================================================================
   BOTÕES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: none;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast),
    border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}

.btn:active {
  transform: scale(.97);
}

.btn:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

.btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--green-500);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, .3);
}

.btn-primary:hover:not([disabled]) {
  background: var(--green-600);
}

.btn-ghost {
  background: var(--surface);
  color: var(--navy-800);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--ink-300);
}

.btn-quiet {
  color: var(--ink-600);
}

.btn-quiet:hover {
  background: rgba(15, 27, 45, .06);
  color: var(--ink-900);
}

.btn-ghost-dark {
  color: rgba(255, 255, 255, .8);
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.btn-ia {
  background: linear-gradient(140deg, var(--violet-500), var(--blue-500));
  color: #fff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, .28);
}

.btn-ia:hover {
  box-shadow: 0 7px 20px rgba(124, 58, 237, .4);
}

.btn-ia.travado {
  background: var(--navy-800);
  box-shadow: var(--sh-1);
}

.btn-ia.travado::after {
  content: "Premium";
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--amber-500);
  color: #3d2800;
  padding: 2px 6px;
  border-radius: 999px;
}

.btn-danger {
  background: var(--red-50);
  color: var(--red-500);
  border-color: rgba(220, 38, 38, .25);
}

.btn-danger:hover {
  background: #fbdcde;
}

.btn-lg {
  font-size: 16px;
  padding: 15px 26px;
}

.btn-sm {
  font-size: 13.5px;
  padding: 8px 14px;
}

.btn-xs {
  padding: 5px;
}

.btn-icon {
  padding: 9px;
  border-radius: 50%;
}

.btn-icon .ic {
  width: 1.25em;
  height: 1.25em;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   BARRA SUPERIOR
   ========================================================================== */

.appbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--appbar-h);
  z-index: 50;
  background: var(--navy-800);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), var(--sh-1);
}

.appbar-inner {
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.appbar-right {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: none;
  color: #fff;
  font-weight: 900;
  letter-spacing: -.02em;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  min-width: 0;
}

.brand:hover {
  background: rgba(255, 255, 255, .08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  flex: 0 0 auto;
}

.brand-name {
  font-size: 15.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quota {
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 118px;
}

.quota-text {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .72);
  line-height: 1;
  white-space: nowrap;
}

.quota-text strong {
  color: #fff;
  font-size: 13px;
}

.quota-label {
  display: none;
}

.quota-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}

.quota-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue-400);
  transition: width var(--t-med);
}

.quota.cheia .quota-bar span {
  background: var(--amber-500);
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.plan-badge[data-plan="premium"] {
  background: linear-gradient(100deg, var(--amber-500), #ffcf5c);
  color: #3d2800;
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.view {
  transition: opacity var(--t-med);
}

.section-pad,
#view-dashboard {
  padding: 26px 0 60px;
}

.dash-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.h-page {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 900;
}

.sub {
  color: var(--ink-600);
  font-size: 14.5px;
  margin-top: 4px;
}

.cv-grid {
  display: grid;
  gap: 16px;
}

.cv-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform var(--t-med), box-shadow var(--t-med);
}

.cv-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
}

.cv-card-mini {
  position: relative;
  height: 168px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.mini-paper {
  width: 210mm;
  flex: 0 0 auto;
  transform: scale(.34);
  transform-origin: top center;
  background: #fff;
  box-shadow: var(--sh-1);
}

.cv-card-modelo {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--cor, var(--navy-800));
}

.cv-card-info {
  padding: 14px 16px 10px;
}

.cv-card-nome {
  font-size: 16px;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-card-meta {
  font-size: 12.5px;
  color: var(--ink-400);
  margin-bottom: 9px;
}

.ponto {
  opacity: .5;
  padding: 0 2px;
}

.cv-card-barra {
  height: 5px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.cv-card-barra span {
  display: block;
  height: 100%;
  background: var(--green-500);
  transition: width var(--t-med);
}

.cv-card-acoes {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
}

.cv-card-acoes .btn-primary {
  flex: 1 1 auto;
}

/* vazio */
.empty {
  text-align: center;
  padding: 40px 18px 54px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl);
}

.empty h2 {
  font-size: clamp(19px, 4vw, 24px);
  margin-bottom: 8px;
}

.empty p {
  color: var(--ink-600);
  max-width: 440px;
  margin: 0 auto 22px;
  font-size: 14.5px;
}

.empty-art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  height: 92px;
  margin-bottom: 22px;
}

.empty-page {
  width: 50px;
  height: 68px;
  background: var(--surface-2);
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  position: relative;
}

.empty-page::before {
  content: "";
  position: absolute;
  inset: 8px 8px auto 8px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  box-shadow: 0 9px 0 var(--line), 0 18px 0 var(--line);
}

.empty-page:nth-child(1) {
  transform: rotate(-8deg) translateY(6px);
}

.empty-page:nth-child(2) {
  height: 80px;
  border-color: var(--blue-400);
}

.empty-page:nth-child(2)::before {
  background: var(--blue-400);
}

.empty-page:nth-child(3) {
  transform: rotate(8deg) translateY(6px);
}

/* ==========================================================================
   EDITOR
   ========================================================================== */

.view-editor {
  padding-bottom: 92px;
}

.stepbar {
  position: sticky;
  top: var(--appbar-h);
  z-index: 30;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.stepbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.stepper {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  flex: 1 1 auto;
  /* sem isto o min-width:auto do flex impede o encolhimento e a trilha
     empurra a largura da página inteira no celular */
  min-width: 0;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.stepper::-webkit-scrollbar {
  display: none;
}

.step-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--ink-400);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast);
}

.step-dot:hover {
  background: var(--surface-2);
}

.dot-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--line);
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.step-dot.atual {
  color: var(--navy-800);
  background: var(--blue-50);
}

.step-dot.atual .dot-num {
  background: var(--blue-500);
  color: #fff;
  transform: scale(1.08);
}

.step-dot.feito {
  color: var(--green-600);
}

.step-dot.feito .dot-num {
  background: var(--green-500);
  color: #fff;
}

/* Em telas estreitas a trilha é só de números: o rótulo não cabe e era
   cortado no meio da palavra. O título da etapa já diz onde você está. */
.dot-rot {
  display: none;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-600);
  flex: 0 0 auto;
}

.save-state.salvando {
  color: var(--ink-400);
}

/* o servidor não confirmou: avisa, em vez de fingir que salvou */
.save-state.com-erro {
  color: #b45309;
}

.save-state .ic {
  width: 14px;
  height: 14px;
}

.save-state span {
  display: none;
}

.save-state.salvando .ic {
  animation: girar 1s linear infinite;
}

.progress-track {
  height: 3px;
  background: var(--line);
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue-500), var(--green-500));
  transition: width var(--t-med);
}

.editor-grid {
  display: grid;
  gap: 22px;
  padding-top: 22px;
}

/* ---------- etapa ---------- */

.step-shell {
  position: relative;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 18px 24px;
  box-shadow: var(--sh-1);
}

.step-head {
  margin-bottom: 20px;
}

.step-contador {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue-500);
  margin-bottom: 8px;
}

.step-tit {
  font-size: clamp(21px, 4.4vw, 27px);
  font-weight: 900;
  margin-bottom: 7px;
}

.step-sub {
  color: var(--ink-600);
  font-size: 14.5px;
}

.step-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 16px;
}

.step-nav .btn-primary {
  flex: 1 1 auto;
  max-width: 260px;
}

/* ---------- cards de escolha ---------- */

.cards-escolha {
  display: grid;
  gap: 12px;
}

.card-escolha {
  position: relative;
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 18px 46px 18px 18px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}

.card-escolha:hover {
  border-color: var(--blue-400);
  transform: translateY(-2px);
}

.card-escolha.ativo {
  border-color: var(--green-500);
  background: var(--green-50);
}

.card-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--blue-50);
  color: var(--blue-500);
  margin-bottom: 4px;
}

.card-escolha.ativo .card-ic {
  background: #fff;
  color: var(--green-600);
}

.card-tit {
  font-weight: 800;
  font-size: 16.5px;
}

.card-txt {
  color: var(--ink-600);
  font-size: 13.8px;
  line-height: 1.5;
}

.card-mark {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all var(--t-fast);
}

.card-escolha.ativo .card-mark {
  background: var(--green-500);
  border-color: var(--green-500);
  color: #fff;
}

/* ---------- campos ---------- */

.grade-campos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.col-cheia {
  grid-column: span 4;
}

.col-metade {
  grid-column: span 4;
}

.col-quarto {
  grid-column: span 2;
}

.campo-rot {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.obrig {
  color: var(--red-500);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  font-size: 15px;
}

.campo textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: 0;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .16);
}

.campo input[disabled],
.campo select[disabled] {
  background: var(--surface-2);
  color: var(--ink-400);
  cursor: not-allowed;
}

.campo-dica {
  font-size: 12.3px;
  color: var(--ink-400);
  line-height: 1.45;
}

.campo-erro {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--red-500);
}

.campo.com-erro input,
.campo.com-erro select,
.campo.com-erro textarea {
  border-color: var(--red-500);
  background: var(--red-50);
}

.campo-check {
  justify-content: flex-end;
}

/* ---------- campo de foto ---------- */

.opcional {
  font-style: normal;
  font-weight: 700;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-400);
  margin-left: 4px;
}

.foto-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.foto-box.tem {
  border-style: solid;
  background: var(--surface);
}

.foto-previa {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--line);
  color: var(--ink-400);
  display: flex;
  align-items: center;
  justify-content: center;
}

.foto-previa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.foto-previa .ic {
  width: 32px;
  height: 32px;
}

.foto-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.foto-acoes label {
  cursor: pointer;
}

.foto-acoes input[data-foto]:focus-visible+label {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  padding: 10px 0;
}

.field-check input {
  width: 19px;
  height: 19px;
  accent-color: var(--green-500);
  flex: 0 0 auto;
}

/* ---------- sugestões / chips ---------- */

.sugestoes {
  margin-top: 16px;
  padding: 14px;
  background: var(--blue-50);
  border-radius: var(--r-md);
}

.sugestoes-rot {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy-700);
  margin-bottom: 9px;
}

.sugestoes-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast);
}

.chip:hover {
  border-color: var(--blue-500);
  color: var(--navy-800);
  transform: translateY(-1px);
}

.chip-sug {
  max-width: 100%;
}

.chip-ativo {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
  padding-right: 6px;
  cursor: default;
}

.chip-ativo:hover {
  transform: none;
  border-color: var(--navy-800);
  color: #fff;
}

.chip-ativo button {
  display: inline-flex;
  border: 0;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border-radius: 50%;
  padding: 3px;
  cursor: pointer;
}

.chip-ativo button:hover {
  background: rgba(255, 255, 255, .34);
}

.bloco-chips {
  display: grid;
  gap: 10px;
}

.contador-chips {
  font-weight: 800;
  color: var(--ink-400);
  font-size: 12px;
}

.chips-sel {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 42px;
  padding: 8px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  align-content: flex-start;
}

.chips-vazio {
  font-size: 13.5px;
  color: var(--ink-400);
  padding: 4px;
}

.chip-add {
  display: flex;
  gap: 8px;
}

.chip-add input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
}

.chip-add input:focus {
  outline: 0;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .16);
}

.dicas {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.dicas li {
  display: flex;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-600);
}

.dicas .ic {
  color: var(--green-500);
  margin-top: .25em;
}

.divisor {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* ---------- repetidores ---------- */

.bloco-rep+.bloco-rep {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.bloco-rep-tit {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--navy-800);
}

.itens-rep {
  display: grid;
  gap: 14px;
  margin-bottom: 12px;
}

.item-rep {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 14px;
  animation: entraSuave var(--t-med) both;
}

.item-rep-topo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.item-rep-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.item-rep-resumo {
  flex: 1 1 auto;
  font-size: 14px;
  color: var(--ink-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-rep .grade-campos {
  background: var(--surface);
  padding: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.vazio-rep {
  font-size: 14px;
  color: var(--ink-400);
  padding: 16px;
  text-align: center;
  background: var(--surface-2);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}

.btn-add {
  width: 100%;
  border-style: dashed;
}

.btn-pular {
  margin-top: 14px;
  font-size: 13.5px;
  text-decoration: underline;
}

/* ---------- etapa final ---------- */

.final-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  margin-bottom: 24px;
}

.final-status.bom {
  background: var(--green-50);
  border: 1.5px solid rgba(22, 163, 74, .3);
}

.final-status.atencao {
  background: var(--amber-50);
  border: 1.5px solid rgba(245, 158, 11, .35);
}

.final-pct {
  text-align: center;
  flex: 0 0 auto;
  line-height: 1;
}

.final-pct strong {
  display: block;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.final-pct span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-600);
}

.final-status strong {
  font-size: 15.5px;
}

.final-status p {
  font-size: 13.8px;
  color: var(--ink-600);
  margin-top: 3px;
}

.final-acoes {
  margin-top: 24px;
}

.final-nota {
  font-size: 13px;
  color: var(--ink-600);
  text-align: center;
  margin-top: 12px;
}

/* ==========================================================================
   LATERAL / PRÉVIA
   ========================================================================== */

.editor-side {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.side-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.side-head-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

.side-head-text strong {
  display: block;
  font-size: 14px;
}

.side-head-text span {
  font-size: 12.3px;
  color: var(--ink-400);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meter {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.meter-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.meter-ring circle {
  fill: none;
  stroke-width: 3.4;
}

.meter-bg {
  stroke: var(--line);
}

.meter-fg {
  stroke: var(--green-500);
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray var(--t-med);
}

.meter-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--navy-800);
}

.preview-frame {
  background: var(--navy-900);
  border-radius: var(--r-md);
  padding: 14px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.paper {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  flex: 0 0 auto;
  transform-origin: top center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .34);
  transform: scale(.42);
  margin-bottom: -170mm;
}

.side-foot {
  display: grid;
  gap: 8px;
}

/* ==========================================================================
   GALERIA DE MODELOS
   ========================================================================== */

.tpl-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tpl-card {
  position: relative;
  display: grid;
  gap: 0;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}

.tpl-card:hover {
  border-color: var(--blue-400);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.tpl-card.ativo {
  border-color: var(--green-500);
}

.tpl-card.travado {
  background: var(--surface-2);
}

.tpl-thumb {
  display: block;
  height: 150px;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.tpl-paper {
  display: block;
  width: 210mm;
  position: absolute;
  top: 0;
  left: 50%;
  background: #fff;
  transform: translateX(-50%) scale(.26);
  transform-origin: top center;
}

.tpl-card.travado .tpl-paper {
  filter: grayscale(.7) opacity(.5);
}

.tpl-info {
  display: block;
  padding: 10px 12px 12px;
}

.tpl-nome {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.tpl-desc {
  display: block;
  font-size: 12.3px;
  color: var(--ink-400);
  line-height: 1.4;
}

.tag-premium {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 7px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--amber-500), #ffcf5c);
  color: #3d2800;
}

.tag-premium .ic {
  width: 11px;
  height: 11px;
}

.tpl-lock,
.tpl-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-1);
}

.tpl-lock {
  background: var(--surface);
  color: var(--ink-600);
}

.tpl-check {
  background: var(--green-500);
  color: #fff;
}

/* ==========================================================================
   MODAIS / GAVETA
   ========================================================================== */

.sheet,
.drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
}

.sheet {
  align-items: flex-end;
  justify-content: center;
}

.drawer {
  justify-content: flex-end;
}

.sheet-backdrop,
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 39, .55);
  opacity: 0;
  transition: opacity var(--t-med);
}

.sheet.aberto .sheet-backdrop,
.drawer.aberto .drawer-backdrop {
  opacity: 1;
}

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 20px 18px 24px;
  box-shadow: var(--sh-3);
  transform: translateY(100%);
  transition: transform var(--t-med);
}

.sheet.aberto .sheet-panel {
  transform: translateY(0);
}

.sheet-wide {
  max-width: 940px;
}

.sheet-full {
  max-width: 820px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.sheet-head h2 {
  font-size: 19px;
}

.sheet-sub {
  font-size: 13.8px;
  color: var(--ink-600);
  margin-bottom: 16px;
}

.sheet-foot {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.preview-frame-big {
  padding: 10px;
}

.preview-frame-big .paper {
  transform: scale(.52);
  margin-bottom: -150mm;
}

.upgrade-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 9px;
}

.upgrade-list li {
  display: flex;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
}

.upgrade-list .ic {
  color: var(--green-500);
  margin-top: .22em;
}

.upgrade-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}

.upgrade-price span {
  font-size: 13px;
  font-weight: 700;
  opacity: .8;
}

.upgrade-price strong {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.seg {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 14px;
}

.seg-btn {
  flex: 1 1 0;
  border: 0;
  background: none;
  padding: 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-600);
  cursor: pointer;
  transition: all var(--t-fast);
}

.seg-btn.ativo {
  background: var(--navy-800);
  color: #fff;
}

/* ---------- gaveta da IA ---------- */

.drawer-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-3);
  transform: translateX(100%);
  transition: transform var(--t-med);
}

.drawer.aberto .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.ai-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ai-title h2 {
  font-size: 16px;
}

.ai-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--violet-500), var(--blue-500));
  color: #fff;
  flex: 0 0 auto;
}

.ai-status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--violet-500);
}

.ai-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
}

.ai-msg {
  max-width: 92%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 14.3px;
  line-height: 1.55;
  animation: entraSuave var(--t-med) both;
}

.ai-msg p+p,
.ai-msg ul,
.ai-msg blockquote {
  margin-top: 8px;
}

.ai-msg ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.ai-msg li {
  margin-bottom: 3px;
}

.ai-msg blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--blue-400);
  background: rgba(47, 128, 237, .07);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  font-style: italic;
}

.ai-msg hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 10px 0;
}

.ai-usuario {
  align-self: flex-end;
  background: var(--navy-800);
  color: #fff;
}

.ai-assistente {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
}

.ai-digitando {
  display: flex;
  gap: 5px;
  padding: 14px;
}

.ai-digitando .ponto {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-300);
  animation: pula 1s infinite;
}

.ai-digitando .ponto:nth-child(2) {
  animation-delay: .15s;
}

.ai-digitando .ponto:nth-child(3) {
  animation-delay: .3s;
}

.ai-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
  scrollbar-width: none;
}

.ai-chips::-webkit-scrollbar {
  display: none;
}

.ai-chips .chip {
  flex: 0 0 auto;
  font-size: 12.5px;
}

.ai-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
  align-items: flex-end;
}

.ai-form textarea {
  flex: 1 1 auto;
  min-width: 0;
  resize: none;
  padding: 11px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  max-height: 120px;
  line-height: 1.4;
}

.ai-form textarea:focus {
  outline: 0;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, .16);
}

/* botão flutuante */

.fab-ai {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--violet-500), var(--blue-500));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(124, 58, 237, .4);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.fab-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, .5);
}

.fab-ai.travado {
  background: var(--navy-800);
  box-shadow: var(--sh-2);
}

.fab-ai.travado::after {
  content: "Premium";
  font-size: 9.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--amber-500);
  color: #3d2800;
  padding: 2px 6px;
  border-radius: 999px;
}

/* ==========================================================================
   BARRA MOBILE
   ========================================================================== */

.mobile-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 44;
  display: flex;
  gap: 10px;
  padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.mobile-bar .btn {
  flex: 1 1 0;
}

body.no-editor .mobile-bar {
  display: none;
}

/* ==========================================================================
   AVISOS
   ========================================================================== */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--navy-900);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--sh-2);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--t-med), transform var(--t-med);
  pointer-events: auto;
}

.toast.entra {
  opacity: 1;
  transform: translateY(0);
}

.toast.sai {
  opacity: 0;
  transform: translateY(14px);
}

.toast-msg {
  flex: 1 1 auto;
}

.toast .ic {
  flex: 0 0 auto;
}

.toast-ok .ic {
  color: #6ee7a0;
}

.toast-erro .ic {
  color: #fca5a5;
}

.toast-aviso .ic {
  color: #fcd34d;
}

.toast-acao {
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
}

.toast-acao:hover {
  background: rgba(255, 255, 255, .3);
}

/* área só de impressão */
.print-area {
  display: none;
}

/* ==========================================================================
   ANIMAÇÕES
   ========================================================================== */

@keyframes entraSuave {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pula {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .5;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes saiEsq {
  to {
    opacity: 0;
    transform: translateX(-26px);
  }
}

@keyframes saiDir {
  to {
    opacity: 0;
    transform: translateX(26px);
  }
}

@keyframes entraDir {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
}

@keyframes entraEsq {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
}

@keyframes pulsaCampo {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, .45);
  }

  100% {
    box-shadow: 0 0 0 12px rgba(22, 163, 74, 0);
  }
}

.sai-esquerda {
  animation: saiEsq .18s both;
}

.sai-direita {
  animation: saiDir .18s both;
}

.entra-direita {
  animation: entraDir .24s both;
}

.entra-esquerda {
  animation: entraEsq .24s both;
}

.pulsa {
  animation: pulsaCampo .5s both;
}

/* ==========================================================================
   BREAKPOINTS
   ========================================================================== */

@media (min-width: 480px) {
  .col-metade {
    grid-column: span 2;
  }

  .quota {
    display: flex;
  }
}

@media (min-width: 620px) {
  :root {
    --gut: 24px;
  }

  .cv-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-escolha {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    padding: 28px 26px 30px;
  }

  .quota-label {
    display: inline;
  }

  .sheet-panel {
    border-radius: var(--r-xl);
    margin-bottom: 4vh;
  }

  .sheet {
    align-items: center;
  }

  .sheet-panel {
    transform: translateY(22px) scale(.98);
    opacity: 0;
    transition: transform var(--t-med), opacity var(--t-med);
  }

  .sheet.aberto .sheet-panel {
    transform: none;
    opacity: 1;
  }

  .tpl-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .step-dot.atual .dot-rot {
    display: inline;
  }

  .save-state span {
    display: inline;
  }
}

@media (min-width: 900px) {
  .dot-rot {
    display: inline;
  }

  .cv-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tpl-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1040px) {
  body {
    font-size: 16.5px;
  }

  .view-editor {
    padding-bottom: 40px;
  }

  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
    gap: 28px;
    padding-top: 26px;
  }

  .editor-side {
    display: flex;
    position: sticky;
    top: calc(var(--appbar-h) + 64px);
  }

  .mobile-bar {
    display: none;
  }

  /* no desktop o assistente vive na lateral (#btn-ai-side): o flutuante
     cobria o botão "Baixar PDF" no canto inferior direito */
  .fab-ai {
    display: none;
  }

  /* à esquerda: à direita ficam o botão do assistente e os botões da prévia */
  .toasts {
    bottom: 24px;
    left: 24px;
    right: auto;
    transform: none;
  }

  .preview-frame {
    padding: 16px;
  }

  .paper {
    transform: scale(.4);
    margin-bottom: -176mm;
  }
}

@media (min-width: 1240px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr) 440px;
  }

  .paper {
    transform: scale(.46);
    margin-bottom: -160mm;
  }
}

/* ==========================================================================
   SEM ANIMAÇÃO
   ========================================================================== */

body.sem-animacao *,
body.sem-animacao *::before,
body.sem-animacao *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

/* ==========================================================================
   ACESSO (login) — a única tela antes do app
   ========================================================================== */

/* enquanto não há sessão, o app inteiro fica fora da tela */
body.is-auth {
  padding-top: 0;
  overflow: hidden;
}

body.is-auth .appbar,
body.is-auth main,
body.is-auth .fab-ai {
  display: none;
}

.auth {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
  overflow-y: auto;
}

.auth-side {
  display: none;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px var(--gut);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 30px 26px 26px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.01em;
}

.auth-brand .brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
}

.auth-brand-mobile {
  color: var(--navy-800);
  margin-bottom: 22px;
}

.auth-brand-mobile .brand-mark {
  background: var(--navy-800);
  color: #fff;
}

.auth-step {
  display: grid;
  gap: 16px;
  animation: authEntra .28s ease-out;
}

.auth-step[hidden] {
  display: none;
}

@keyframes authEntra {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.auth-titulo {
  font-size: 26px;
  font-weight: 900;
  color: var(--navy-800);
}

.auth-sub {
  color: var(--ink-600);
  font-size: 15px;
  margin-top: -8px;
}

.auth-sub strong {
  color: var(--ink-900);
  overflow-wrap: anywhere;
}

.auth-center {
  text-align: center;
  margin-top: 0;
}

.auth-nota {
  font-size: 13px;
  color: var(--ink-400);
  text-align: center;
  line-height: 1.5;
}

.auth-nota-caixa {
  text-align: left;
  background: var(--amber-50);
  color: var(--ink-700);
  border: 1px solid #f6dfa4;
  border-radius: var(--r-sm);
  padding: 11px 13px;
}

.auth-erro {
  display: flex;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--red-500);
  background: var(--red-50);
  border: 1px solid rgba(220, 38, 38, .22);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

.auth-erro[hidden] {
  display: none;
}

.auth .campo input[aria-invalid="true"] {
  border-color: var(--red-500);
  background: var(--red-50);
}

.auth .campo input {
  padding: 13px 14px;
  font-size: 16px;
}

.auth .btn {
  white-space: normal;
}

.auth-icone {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 22px;
}

.auth-icone-aviso {
  background: var(--amber-50);
  color: #b45309;
}

.auth-icone-ok {
  background: var(--green-50);
  color: var(--green-600);
}

/* "Esqueci minha senha": link discreto, sem competir com o botão principal */
.auth-link {
  justify-self: center;
  border: 0;
  background: none;
  color: var(--blue-500);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  cursor: pointer;
}

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

.auth-link:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 1px;
}

.auth-selo {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--green-600);
  background: var(--green-50);
  border-radius: 999px;
  padding: 5px 11px;
}

/* e-mail já digitado, com "Trocar" */
.auth-conta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: -6px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-700);
  font-size: 14.5px;
  font-weight: 600;
  min-width: 0;
}

.auth-conta [data-auth="email"] {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-trocar {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--blue-500);
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--r-xs);
}

.auth-trocar:hover {
  text-decoration: underline;
}

.auth-trocar:focus-visible,
.senha-ver:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 1px;
}

/* campo de senha com botão "mostrar" */
.senha-wrap {
  position: relative;
}

.auth .senha-wrap input {
  padding-right: 48px;
}

.senha-ver {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-400);
  cursor: pointer;
}

.senha-ver:hover {
  background: rgba(15, 27, 45, .06);
  color: var(--ink-700);
}

.senha-ver .ic-ocultar,
.senha-ver.ativo .ic-ver {
  display: none;
}

.senha-ver.ativo .ic-ocultar {
  display: block;
}

/* requisitos da senha: acendem conforme a pessoa digita */
.auth-req {
  list-style: none;
  margin: -4px 0 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.auth-req li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-400);
}

.auth-req .ic {
  opacity: .35;
}

.auth-req li.ok {
  color: var(--green-600);
  font-weight: 600;
}

.auth-req li.ok .ic {
  opacity: 1;
}

.auth-spinner {
  width: 34px;
  height: 34px;
  margin: 18px auto 0;
  border: 3px solid var(--line);
  border-top-color: var(--blue-500);
  border-radius: 50%;
  animation: authGira .8s linear infinite;
}

@keyframes authGira {
  to {
    transform: rotate(360deg);
  }
}

/* desktop: painel de marca à esquerda */
@media (min-width: 900px) {
  .auth {
    grid-template-columns: minmax(380px, 5fr) 6fr;
  }

  .auth-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 56px;
    color: #fff;
    background:
      radial-gradient(900px 500px at 10% 110%, rgba(47, 128, 237, .35), transparent 60%),
      linear-gradient(160deg, var(--navy-800), var(--navy-900));
  }

  .auth-brand-mobile {
    display: none;
  }

  .auth-brand {
    font-size: 19px;
  }

  .auth-pitch h2 {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 900;
    line-height: 1.12;
    max-width: 14em;
  }

  .auth-pitch ul {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    gap: 14px;
  }

  .auth-pitch li {
    display: flex;
    gap: 10px;
    font-size: 15.5px;
    color: rgba(255, 255, 255, .86);
  }

  .auth-pitch .ic {
    color: #4ade80;
    margin-top: .2em;
  }

  .auth-foot-side {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
  }

  .auth-main {
    padding: 48px;
  }

  .auth-card {
    padding: 38px 36px 32px;
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 24px 18px 20px;
    border-radius: var(--r-md);
  }

  .auth-titulo {
    font-size: 23px;
  }
}

/* ---------- resumo da conta (modal "Minha conta") ---------- */

.conta-resumo {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.conta-email {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.conta-plano {
  font-size: 13.5px;
  color: var(--ink-600);
}

#sheet-settings .btn-block,
#sheet-settings .field-check {
  margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
