:root {
  --navy: #071821; --navy-2: #041016; --navy-3: #0c2230;
  --gold: #D4A63C; --gold-l: #E3BC61;
  --off: #F5F3ED; --silver: #C8CDD0; --graphite: #252A2D;
  --line-d: rgba(200, 205, 208, .16); --line-l: rgba(7, 24, 33, .12);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gut: clamp(20px, 5vw, 56px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 Roboto, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--navy-2); color: var(--off); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gut); }

/* marca */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-weight: 500; letter-spacing: .32em; font-size: 14px; }
.brand-name i { font-style: normal; font-weight: 400; letter-spacing: .55em; font-size: 8.5px; color: var(--gold); margin-top: 5px; }
.eyebrow { margin: 0 0 14px; font-size: 11px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
h1, h2 { font-weight: 300; text-transform: uppercase; letter-spacing: .04em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(32px, 6vw, 56px); }
.lead { color: var(--silver); max-width: 46ch; margin: 18px 0 0; font-weight: 300; }
.muted { color: #7d878c; }

.watermark { position: fixed; right: -12vmin; bottom: -14vmin; width: 78vmin; height: 78vmin; background: url(/assets/atlas-a.png) center/contain no-repeat; opacity: .045; filter: grayscale(1) brightness(1.6); pointer-events: none; z-index: 0; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: 2px; cursor: pointer; font-size: 12.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; transition: background .25s var(--ease), color .25s, border-color .25s; }
.btn-gold { background: var(--gold); color: var(--navy-2); }
.btn-gold:hover { background: var(--gold-l); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: progress; }
.arr { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arr, .link-arrow:hover .arr { transform: translateX(4px); }
.link-arrow { text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.linklike { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.linklike:hover { color: var(--gold); }
.btn:focus-visible, .linklike:focus-visible, .link-arrow:focus-visible, a:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

/* campos */
.field { display: block; margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { display: block; font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--silver); margin-bottom: 8px; padding: 0; }
.field .req { color: var(--gold); margin-left: 4px; }
.field input:not([type=radio]), .field select {
  width: 100%; height: 52px; padding: 0 14px; background: rgba(255,255,255,.035); color: var(--off);
  border: 1px solid var(--line-d); border-bottom-color: rgba(200,205,208,.38); border-radius: 2px; outline: 0; font-size: 17px;
  transition: border-color .25s var(--ease), background .25s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 23px, calc(100% - 15px) 23px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { color: #111; }
.field input::placeholder { color: rgba(200,205,208,.35); }
.field input:focus, .field select:focus { border-color: var(--gold); background: rgba(212,166,60,.05); }
.field.bad input, .field.bad select { border-color: #c77a5a; }
.field .err { display: block; font-size: 12.5px; color: #e0a184; margin-top: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; align-items: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--line-d); border-radius: 2px; font-size: 15px; transition: border-color .2s, color .2s, background .2s; }
.choice span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(200,205,208,.5); margin-right: 12px; transition: all .2s; }
.choice input:checked + span { border-color: var(--gold); color: var(--gold-l); background: rgba(212,166,60,.06); }
.choice input:checked + span::before { background: var(--gold); border-color: var(--gold); }
.choice input:focus-visible + span { outline: 1px solid var(--gold); outline-offset: 2px; }
.choice.is-disabled { opacity: .4; cursor: not-allowed; }
.form-error { color: #e0a184; font-size: 14px; margin: 0 0 18px; }

/* intro / reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.is-in .reveal { opacity: 1; transform: none; }
.is-in .r1 { transition-delay: .12s; } .is-in .r2 { transition-delay: .22s; } .is-in .r3 { transition-delay: .34s; } .is-in .r4 { transition-delay: .46s; }
.intro-mark img { width: 64px; height: 64px; object-fit: contain; }
.reveal.r0 { transform: scale(.86); clip-path: inset(100% 0 0 0); transition: opacity .5s var(--ease), transform .7s var(--ease), clip-path .7s var(--ease); }
.is-in .reveal.r0 { clip-path: inset(0 0 0 0); }
html:not(.js) .reveal { opacity: 1; transform: none; clip-path: none; }

/* ============ FICHA ============ */
.ficha { background: radial-gradient(120% 70% at 85% 0%, #0b2432 0%, var(--navy) 42%, var(--navy-2) 100%) fixed; min-height: 100vh; }
.ficha-app, .done-wrap { position: relative; z-index: 1; }
.f-top { display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gut); max-width: 880px; margin: 0 auto; }
.f-top .tipo { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--silver); border: 1px solid var(--line-d); padding: 7px 12px; }
.f-main { max-width: 880px; margin: 0 auto; padding: 18px var(--gut) 140px; }
.f-hero h1 span { display: block; }
.f-hero h1 span:last-child { color: var(--gold-l); }
.progress { margin: 40px 0 34px; }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--silver); margin-bottom: 12px; }
.progress-meta b { color: var(--off); font-weight: 500; }
.progress-track { height: 2px; background: var(--line-d); position: relative; overflow: hidden; }
.progress-bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold), var(--gold-l)); width: 0; transition: width .5s var(--ease); }
.progress-dots { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10.5px; letter-spacing: .08em; color: rgba(200,205,208,.4); font-variant-numeric: tabular-nums; }
.progress-dots span.on { color: var(--gold); }
.progress-dots span.cur { color: var(--off); font-weight: 500; }
.step { transition: opacity .28s var(--ease), transform .32s var(--ease); }
.step.out { opacity: 0; transform: translateY(-8px); }
.step.pre { opacity: 0; transform: translateY(12px); }
.step-title { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 28px; display: flex; align-items: baseline; gap: 14px; }
.step-title small { font-size: 12px; color: var(--gold); letter-spacing: .2em; font-weight: 500; }
.grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.grid .w2, .grid .sub { grid-column: 1 / -1; }
.sub { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 8px 0 18px; padding-top: 18px; border-top: 1px solid var(--line-d); }
.grid .sub:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.f-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; padding-top: 26px; border-top: 1px solid var(--line-d); }
.f-actions .btn-gold { min-width: 220px; }
.btn-back { background: none; border: 0; color: var(--silver); cursor: pointer; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; padding: 14px 0; }
.btn-back:hover { color: var(--off); }
.btn-back[hidden] { display: inline-block; visibility: hidden; }
.save-note { font-size: 12px; color: rgba(200,205,208,.55); margin-top: 14px; min-height: 18px; }

/* revisão */
.rev-block { border-top: 1px solid var(--line-d); padding: 22px 0 8px; }
.rev-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.rev-head h3 { margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.rev-edit { background: none; border: 0; color: var(--silver); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; padding: 6px 0; }
.rev-edit:hover { color: var(--gold-l); }
.rev-dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px; margin: 0 0 14px; }
.rev-dl dt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(200,205,208,.6); }
.rev-dl dd { margin: 3px 0 0; font-size: 15px; word-break: break-word; }
.rev-empty { color: rgba(200,205,208,.5); font-size: 14px; margin: 0 0 14px; }
.consent { display: flex; gap: 14px; align-items: flex-start; margin: 26px 0 6px; padding: 18px; border: 1px solid var(--line-d); cursor: pointer; font-size: 14px; color: var(--silver); line-height: 1.55; }
.consent input { width: 20px; height: 20px; accent-color: var(--gold); margin: 2px 0 0; flex: none; }

/* conclusão */
.done-wrap { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 40px var(--gut); text-align: center; }
.done .intro-mark { display: flex; justify-content: center; margin-bottom: 28px; }
.done .intro-mark img { width: 72px; height: 72px; }
.done .lead { margin: 20px auto 40px; }
.done .brand { opacity: .8; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .rev-dl { grid-template-columns: 1fr 1fr; }
  .f-main { padding-bottom: 150px; }
  .f-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; margin: 0; padding: 12px var(--gut) calc(12px + env(safe-area-inset-bottom)); background: rgba(4,16,22,.94); border-top: 1px solid var(--line-d); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .f-actions .btn-gold { flex: 1; min-width: 0; min-height: 56px; }
  .btn-back { padding: 14px 6px 14px 0; }
  .btn-back[hidden] { display: none; }
  .progress { margin: 30px 0 28px; }
  .progress-dots { font-size: 9.5px; }
}

/* ============ CRM ============ */
.crm { background: var(--off); color: var(--graphite); }
.crm-top { background: var(--navy); color: var(--off); }
.crm-top-in { display: flex; justify-content: space-between; align-items: center; min-height: 72px; }
.crm-top nav { display: flex; align-items: center; gap: 30px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.crm-top nav a { text-decoration: none; padding: 8px 0; border-bottom: 1px solid transparent; }
.crm-top nav a.on { border-bottom-color: var(--gold); }
.crm-top form { margin: 0; }
.crm-main { padding-top: 56px; padding-bottom: 80px; }
.crm .eyebrow { color: #a5801f; }
.crm h1 { color: var(--navy); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--navy); margin-bottom: 8px; }
.fichas { width: 100%; border-collapse: collapse; }
.fichas th { text-align: left; font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #6b7479; padding: 16px 12px 12px 0; border-bottom: 1px solid var(--line-l); }
.fichas td { padding: 20px 12px 20px 0; border-bottom: 1px solid var(--line-l); font-size: 15px; vertical-align: middle; }
.fichas td strong { font-weight: 500; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
.fichas tr:hover td { background: rgba(212,166,60,.045); }
.fichas .act { text-align: right; }
.crm .link-arrow { color: #8a6a18; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.s-ok { color: var(--navy); } .s-ok::before { background: var(--gold); }
.s-wait { color: #7d878c; } .s-wait::before { border: 1px solid #9aa3a7; }
.empty { padding: 48px 0; color: #6b7479; }
.crm .btn-ghost { color: var(--navy); }

.crm-login { background: var(--navy-2); color: var(--off); }
.login-wrap { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 40px var(--gut); position: relative; }
.login { width: 100%; max-width: 380px; position: relative; z-index: 1; }
.login .intro-mark { margin-bottom: 30px; }
.login h1 { font-size: clamp(30px, 7vw, 40px); margin-bottom: 38px; }
.crm-login .eyebrow { color: var(--gold); }
.crm-login h1 { color: var(--off); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(4,16,22,.72); animation: fade .25s var(--ease); }
.modal-panel { position: relative; width: 100%; max-width: 520px; background: var(--navy); color: var(--off); padding: 40px clamp(22px, 5vw, 44px) 36px; border-top: 2px solid var(--gold); animation: rise .35s var(--ease); }
.modal-panel h2 { font-size: 26px; margin-bottom: 28px; }
.modal-panel .eyebrow { color: var(--gold); }
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--silver); font-size: 28px; line-height: 1; cursor: pointer; padding: 8px; }
.copy-row { display: flex; gap: 0; margin-bottom: 22px; }
.copy-row input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line-d); border-right: 0; color: var(--off); font-size: 14px; outline: 0; }
.copy-row .btn { border-radius: 0; }
.m-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 28px; }
.modal .link-arrow { color: var(--gold); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* visualizar */
.back { display: inline-block; margin-bottom: 28px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: #6b7479; }
.back:hover { color: var(--navy); }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--navy); flex-wrap: wrap; }
.view-status { margin: 16px 0 0; font-size: 13px; }
.copy-row.small { margin: 0; min-width: min(460px, 100%); }
.copy-row.small input { background: #fff; color: var(--graphite); border-color: var(--line-l); }
.vblock { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 30px 0; border-bottom: 1px solid var(--line-l); }
.vblock h2 { font-size: 12px; font-weight: 500; letter-spacing: .22em; color: var(--navy); padding-top: 3px; }
.dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 28px; margin: 0; }
.dl-i.w2 { grid-column: span 2; }
.dl dt { font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: #7d878c; }
.dl dd { margin: 4px 0 0; font-size: 15.5px; color: var(--navy); word-break: break-word; }
.dl .nd { color: #b3b9bc; }
.dl-sub { grid-column: 1 / -1; margin: 6px 0 -6px; font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #a5801f; }
.print-head, .print-foot { display: none; }

@media (max-width: 760px) {
  .crm-main { padding-top: 36px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .fichas thead { display: none; }
  .fichas, .fichas tbody, .fichas tr, .fichas td { display: block; width: 100%; }
  .fichas tr { padding: 18px 0; border-bottom: 1px solid var(--line-l); }
  .fichas td { border: 0; padding: 3px 0; font-size: 14px; }
  .fichas td[data-l="Tipo"], .fichas td[data-l="Criada em"] { color: #6b7479; display: inline; width: auto; }
  .fichas td[data-l="Tipo"]::after { content: " · "; }
  .fichas td[data-l="Status"] { margin-top: 8px; }
  .fichas .act { text-align: left; margin-top: 10px; }
  .vblock { grid-template-columns: 1fr; gap: 16px; }
  .dl { grid-template-columns: 1fr 1fr; }
  .crm-top .brand-name { display: none; }
  .crm-top nav { gap: 22px; }
}

@media print {
  @page { margin: 14mm 14mm 16mm; }
  body, .crm { background: #fff !important; color: #000; font-size: 10.5pt; }
  .crm-top, .back, .view-actions, .watermark, .eyebrow { display: none !important; }
  .crm-main { padding: 0; max-width: none; }
  .wrap { padding: 0; }
  .print-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1.5px solid #071821; margin-bottom: 14px; }
  .print-head img { width: 36px; height: 36px; }
  .print-head div { display: flex; flex-direction: column; font-size: 8.5pt; color: #333; }
  .print-head b { letter-spacing: .25em; font-size: 10pt; color: #071821; }
  .ph-title { margin-left: auto; font-size: 9pt; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: #071821; }
  .view-head { padding-bottom: 10px; border-bottom: 1px solid #999; }
  .view-head h1 { font-size: 20pt; color: #071821; }
  .view-status { margin-top: 4px; }
  .status::before { display: none; }
  .vblock { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid #ccc; break-inside: avoid; }
  .vblock h2 { font-size: 8.5pt; }
  .dl { grid-template-columns: repeat(4, 1fr); gap: 7px 14px; }
  .dl-i.w2 { grid-column: span 2; }
  .dl dt { font-size: 6.8pt; color: #555; }
  .dl dd { font-size: 9.5pt; color: #000; margin-top: 1px; }
  .dl-sub { color: #071821; margin: 2px 0 -4px; font-size: 7.5pt; }
  .print-foot { display: block; margin-top: 16px; font-size: 7.5pt; color: #555; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal, .step.pre, .step.out { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
