/* ===== Paleta Hapvida (extraída da logo) ===== */
:root {
  --azul: #043FA1;
  --azul-esc: #032C73;
  --azul-claro: color-mix(in srgb, var(--azul) 10%, #fff);
  --azul-tint: color-mix(in srgb, var(--azul) 5%, #fff);
  --azul-ring: color-mix(in srgb, var(--azul) 16%, transparent);
  --laranja-claro: color-mix(in srgb, var(--laranja) 12%, #fff);
  --laranja-tint: color-mix(in srgb, var(--laranja) 4%, #fff);
  --laranja-ring: color-mix(in srgb, var(--laranja) 16%, transparent);
  --laranja-txt: color-mix(in srgb, var(--laranja) 75%, #000);
  --petala2: #FF5A0A;
  --laranja: #FF5A0A;
  --laranja-2: #FF8A00;
  --vermelho: #FF2530;
  --amarelo: #FFCB25;

  --bg: #F3F5FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FD;
  --line: #E1E6F0;
  --text: #14213D;
  --muted: #5F6B85;
  --ok: #128A4B;
  --warn: #B26A00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10,30,80,.06), 0 8px 24px rgba(10,30,80,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
}
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.row-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
[hidden] { display: none !important; }
i[data-i] { display: inline-flex; width: 18px; height: 18px; }
i[data-i] svg { width: 100%; height: 100%; }

/* ===== Topo ===== */
.topbar { background: var(--surface); position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 var(--line); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 58px; width: auto; }
.brand-sep { width: 1px; height: 34px; background: var(--line); }
.brand-name { font-weight: 700; color: var(--azul); font-size: 18px; }
.petal-strip { display: flex; height: 4px; }
.petal-strip span { flex: 1; }
.petal-strip span:nth-child(1) { background: var(--vermelho); }
.petal-strip span:nth-child(2) { background: var(--petala2); }
.petal-strip span:nth-child(3) { background: var(--laranja-2); }
.petal-strip span:nth-child(4) { background: var(--amarelo); }

/* ===== Botões ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 14px; transition: filter .15s, background .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn-primary { background: var(--azul); color: #fff; }
.btn-orange { background: var(--laranja); color: #fff; }
.btn-light { background: var(--azul-claro); color: var(--azul); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.icon-btn { border: 0; background: rgba(255,255,255,.14); color: inherit; width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(255,255,255,.24); }

/* ===== Painel ===== */
.page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 20px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 26px; color: var(--azul-esc); }
.hero p { margin: 4px 0 0; color: var(--muted); }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--surface); border-radius: 12px; padding: 10px 16px; box-shadow: var(--shadow); min-width: 120px; }
.stat b { display: block; font-size: 22px; color: var(--azul); }
.stat span { font-size: 12px; color: var(--muted); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; }
.vazio { text-align: center; padding: 36px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 12px; }

.cot-list { display: grid; gap: 8px; }
.cot-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.cot-item:hover { border-color: #C6D3EE; background: var(--surface-2); }
.cot-item h3 { font-size: 15px; }
.cot-meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--azul-claro); color: var(--azul); text-transform: uppercase; letter-spacing: .03em; }
.tag-or { background: var(--laranja-claro); color: var(--laranja-txt); }

.tabelas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tab-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; border-left: 4px solid var(--azul); }
.tab-card.np { border-left-color: var(--laranja); }
.tab-card b { display: block; }
.tab-card small { color: var(--muted); }

/* ===== Overlay / Wizard ===== */
.overlay { position: fixed; inset: 0; background: rgba(8,20,50,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.overlay-top { z-index: 60; }
.wiz, .modal { background: var(--surface); width: min(1180px, 100%); max-height: calc(100vh - 32px); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal { width: min(900px, 100%); }
.modal-wide { width: min(1100px, 100%); }
.wiz-head { background: linear-gradient(110deg, var(--azul) 0%, var(--azul-esc) 100%); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; }
.wiz-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--vermelho), var(--petala2), var(--laranja-2), var(--amarelo)); }
.wiz-head h2 { font-size: 19px; }

.stepper { list-style: none; margin: 0; padding: 14px 20px; display: flex; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 13px; color: var(--muted); }
.stepper li::before { content: ''; position: absolute; top: 17px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; background: var(--line); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.active::before { background: var(--azul); }
.stepper .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #E6EAF2; color: var(--muted); position: relative; z-index: 1; }
.stepper li.active { color: var(--azul); font-weight: 600; }
.stepper li.active .dot { background: var(--azul); color: #fff; box-shadow: 0 0 0 4px var(--azul-ring); }
.stepper li.done .dot { background: var(--azul); color: #fff; }
.stepper li.done { cursor: pointer; }

.wiz-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wiz-bar-r { display: flex; gap: 8px; flex-wrap: wrap; }
.falta { margin: 8px 0 0; font-size: 13px; color: var(--warn); display: flex; gap: 6px; align-items: center; min-height: 18px; }
.falta i { width: 15px; height: 15px; }
.wiz-body { padding: 22px 20px 28px; overflow: auto; flex: 1; }
.sec-title { font-size: 20px; margin-bottom: 4px; }
.sec-sub { color: var(--muted); margin: 0 0 18px; }

/* Cards de escolha */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.choice { border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; padding: 20px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.choice:hover { border-color: #AFC2E8; }
.choice.sel { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-ring); background: var(--azul-tint); }
.choice .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--azul-claro); color: var(--azul); display: grid; place-items: center; margin-bottom: 6px; }
.choice .ic i { width: 24px; height: 24px; }
.choice.sel .ic { background: var(--azul); color: #fff; }
.choice b { font-size: 16px; }
.choice small { color: var(--muted); }
.choice .vig { font-size: 12px; color: var(--muted); }
.choice-prod .ic { background: var(--laranja-claro); color: var(--laranja); }
.choice-prod.sel { border-color: var(--laranja); box-shadow: 0 0 0 3px var(--laranja-ring); background: var(--laranja-tint); }
.choice-prod.sel .ic { background: var(--laranja); color: #fff; }
.divider { height: 1px; background: var(--line); margin: 26px 0; }

/* Formulário */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; max-width: 820px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field label .req { color: var(--vermelho); }
.field label .opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); outline: none; }
.input:focus { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-ring); }
.input-sm { width: auto; min-width: 220px; padding: 7px 10px; }
.full { grid-column: 1 / -1; }

/* Idades */
.seg { display: inline-flex; background: #ECEFF6; border-radius: 10px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--azul); color: #fff; }
.conv { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; overflow: hidden; }
.conv summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface-2); }
.conv summary::-webkit-details-marker { display: none; }
.conv summary .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--laranja-claro); color: var(--laranja); display: grid; place-items: center; }
.conv summary small { display: block; color: var(--muted); }
.conv-body { padding: 14px; display: grid; gap: 10px; }
.conv-body textarea { min-height: 90px; resize: vertical; }
.faixas-head { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 600; }
.faixas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.faixa { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; background: var(--surface-2); }
.faixa.tem { border-color: var(--azul); background: var(--azul-tint); }
.faixa b { display: block; margin-bottom: 8px; font-size: 14px; }
.counter { display: inline-flex; gap: 6px; align-items: center; }
.counter button { width: 34px; height: 34px; border-radius: 8px; border: 0; font-size: 18px; font-weight: 700; }
.counter .menos { background: #E6EAF2; color: var(--muted); }
.counter .mais { background: var(--azul); color: #fff; }
.counter input { width: 48px; height: 34px; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 700; }
.pessoas { display: grid; gap: 8px; max-width: 760px; }
.pessoa { display: grid; grid-template-columns: 1fr 160px 90px 120px 36px; gap: 8px; align-items: center; }
.pessoa .fx { font-size: 13px; color: var(--azul); font-weight: 600; }
.del { border: 0; background: #FDECEC; color: var(--vermelho); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.aviso { background: #FFF6E5; border: 1px solid #FFE0A3; color: #8A5300; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-top: 14px; display: flex; gap: 8px; }

/* Comparativo */
.comp-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table.comp { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 13px; }
.comp th, .comp td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid #EEF1F7; }
.comp th.lbl, .comp td.lbl { position: sticky; left: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600; color: var(--muted); min-width: 150px; white-space: nowrap; }
.comp td.lbl .q { float: right; color: var(--text); margin-left: 12px; }
.comp .col { min-width: 160px; max-width: 190px; }
.comp .logo-cell { position: relative; padding: 10px; }
.comp .logo-cell img { height: 30px; }
.comp .rm { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #FDECEC; color: var(--vermelho); display: grid; place-items: center; padding: 0; }
.comp .rm i { width: 13px; height: 13px; }
.comp tr.r-tab td:not(.lbl) { background: var(--azul); color: #fff; font-weight: 700; }
.comp tr.r-plano td:not(.lbl) { background: var(--laranja); color: #fff; font-weight: 700; }
.comp tr.r-sec td { background: var(--azul-esc) !important; color: #fff !important; font-weight: 700; }
.comp tr.r-preco td:not(.lbl) { font-weight: 700; font-variant-numeric: tabular-nums; }
.comp tr.r-preco.zero td:not(.lbl) { color: #A3ACBF; font-weight: 500; }
.comp tr.r-total td { background: var(--azul) !important; color: #fff !important; font-size: 16px; font-weight: 800; }
.comp tr.r-total td.lbl { font-size: 13px; }
.comp tr.r-grande td:not(.lbl) { font-size: 15px; font-weight: 800; color: var(--azul); background: var(--azul-tint); }
.comp .acom-apt { color: var(--laranja); font-weight: 700; }
.comp .acom-enf { color: var(--azul); font-weight: 700; }
.comp .melhor { display: inline-block; margin-top: 4px; font-size: 10px; background: var(--amarelo); color: #4A3500; border-radius: 99px; padding: 1px 8px; font-weight: 800; text-transform: uppercase; }
.comp small { display: block; font-size: 11px; opacity: .75; font-weight: 500; }

/* Modal planos */
.modal-filtros { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.modal-filtros select { width: auto; padding: 7px 10px; }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.grupo-tab { margin-bottom: 18px; }
.grupo-tab h3 { font-size: 14px; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grupo-tab h3 .lnk { margin-left: auto; font-size: 12px; color: var(--azul); background: none; border: 0; font-weight: 600; }
.plano-opt { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.plano-opt:hover { border-color: #AFC2E8; }
.plano-opt.on { border-color: var(--azul); background: var(--azul-tint); }
.plano-opt input { width: 18px; height: 18px; accent-color: var(--azul); }
.plano-opt .nm { font-weight: 700; }
.plano-opt .dt { font-size: 12px; color: var(--muted); }
.plano-opt .vl { text-align: right; font-weight: 800; color: var(--azul); }
.plano-opt .vl small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.plano-opt.ja { opacity: .5; cursor: default; }

/* Resumo */
.resumo-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.box h3 { font-size: 15px; margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.switch { display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 600; }
.switch input { width: 18px; height: 18px; accent-color: var(--azul); }
.radio-row { display: flex; gap: 14px; margin: 10px 0 0 28px; font-size: 14px; flex-wrap: wrap; }
.radio-row label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.radio-row input { accent-color: var(--azul); }

/* ===== Proposta ===== */
.proposta-wrap { background: #E9EDF5; }
.prop { background: #fff; max-width: 980px; margin: 0 auto; padding: 28px 32px; color: #111c36; font-size: 12.5px; }
.prop-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 14px; border-bottom: 3px solid var(--azul); }
.prop-head img { height: 46px; }
.prop-head .tit { text-align: right; }
.prop-head .tit h1 { font-size: 20px; color: var(--azul); }
.prop-head .tit p { margin: 2px 0 0; color: #5F6B85; }
.prop-strip { display: flex; height: 4px; margin-top: -3px; margin-bottom: 18px; }
.prop-strip span { flex: 1; }
.prop-strip span:nth-child(1) { background: var(--vermelho); }
.prop-strip span:nth-child(2) { background: var(--petala2); }
.prop-strip span:nth-child(3) { background: var(--laranja-2); }
.prop-strip span:nth-child(4) { background: var(--amarelo); }
.prop-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.prop-info div { background: #F3F6FC; border-radius: 8px; padding: 8px 10px; }
.prop-info span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #5F6B85; font-weight: 700; }
.prop-info b { font-size: 13px; }
.prop h2 { font-size: 14px; color: var(--azul-esc); margin: 18px 0 8px; }
.prop table.comp { width: 100%; font-size: 11.5px; }
.prop .comp th, .prop .comp td { padding: 5px 6px; }
.prop .comp .col { min-width: 0; }
.prop .comp th.lbl, .prop .comp td.lbl { position: static; min-width: 110px; }
.prop .comp tr.r-total td { font-size: 13px; }
.prop .copart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mini { width: 100%; border-collapse: collapse; font-size: 11px; }
.mini th { background: var(--azul); color: #fff; text-align: left; padding: 4px 6px; }
.mini td { padding: 4px 6px; border-bottom: 1px solid #E1E6F0; }
.prop-obs { background: #FFF8EC; border-left: 3px solid var(--laranja-2); padding: 8px 10px; border-radius: 4px; margin-top: 12px; white-space: pre-wrap; }
.prop-foot { margin-top: 20px; padding-top: 10px; border-top: 1px solid #E1E6F0; font-size: 10px; color: #6B7488; display: flex; justify-content: space-between; gap: 10px; }

/* Toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--azul-esc); color: #fff; padding: 10px 18px; border-radius: 10px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%); }

.print-only { display: none; }


/* ===== Impressão ===== */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .prop { padding: 0; max-width: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .comp-wrap { overflow: visible; border: 0; }
  .prop table.comp { table-layout: fixed; width: 100%; min-width: 0; font-size: 10px; }
  .prop .comp th.lbl, .prop .comp td.lbl { width: 105px; min-width: 0; white-space: normal; }
  .prop .comp .logo-cell img { height: 20px; max-width: 100%; }
  tr, .box, .mini { break-inside: avoid; }
}

/* ===== Logo parceiro no topo ===== */
.brand-logo-2 { height: 50px; }

/* ===== Rodapé ===== */
.rodape { background: var(--surface); margin-top: 20px; }
.rodape-in { max-width: 1200px; margin: 0 auto; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dev { display: flex; align-items: center; gap: 14px; }
.dev-logo { height: 46px; width: auto; }
.dev small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.dev b { display: block; font-size: 15px; color: var(--azul-esc); line-height: 1.3; }
.btn-gear { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 10px; padding: 7px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.btn-gear:hover { color: var(--azul); border-color: var(--azul); }
.btn-gear i { width: 15px; height: 15px; }

/* ===== Proposta: logos ===== */
.prop-logos { display: flex; align-items: center; gap: 14px; }
.prop-logos .sep { width: 1px; height: 34px; background: #E1E6F0; }
.prop-head img.parc { height: 36px; }

/* ===== PIN ===== */
.modal-pin { width: min(400px, 100%); }
.pin-erro { color: var(--vermelho); font-size: 13px; min-height: 18px; margin: 10px 0; }

/* ===== Personalização ===== */
.tabs { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--azul); border-bottom-color: var(--azul); }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cor-item { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cor-item input[type=color] { width: 46px; height: 46px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 10px; }
.cor-item b { display: block; font-size: 14px; }
.cor-item small { color: var(--muted); font-size: 12px; }
.cor-item .hex { width: 90px; margin-top: 4px; padding: 4px 8px; font-size: 13px; font-family: ui-monospace, monospace; }
.logo-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.logo-item .prev { height: 90px; border-radius: 8px; background: repeating-conic-gradient(#F1F3F8 0% 25%, #fff 0% 50%) 50% / 16px 16px; display: grid; place-items: center; padding: 8px; }
.logo-item .prev img { max-height: 74px; max-width: 100%; }
.logo-item b { font-size: 14px; }
.logo-item small { color: var(--muted); font-size: 12px; display: block; }
.preview-box { margin-top: 20px; border: 1px dashed var(--line); border-radius: 12px; padding: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cfg-textos { display: grid; gap: 14px; max-width: 760px; }
.cfg-textos textarea { min-height: 80px; resize: vertical; }
.backup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.backup-grid .box p { color: var(--muted); font-size: 13px; margin: 0 0 12px; }


/* ===== Confirmação ===== */
.overlay-confirm { z-index: 80; }
.confirm-body { display: flex; gap: 14px; align-items: flex-start; padding: 22px 20px 6px; }
.confirm-body p { margin: 4px 0 0; font-weight: 600; }
.confirm-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--laranja-claro); color: var(--laranja); display: grid; place-items: center; }

/* ===== Cidades ===== */
.cidade-grupo + .cidade-grupo { margin-top: 18px; }
.cidade-grupo h3 { font-size: 14px; color: var(--azul-esc); display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.cidade-grupo h3 i { width: 16px; height: 16px; color: var(--laranja); }
.choice-cid .ic { background: var(--azul-claro); }
.cid-fixa { display: flex; align-items: center; gap: 8px; background: var(--azul-tint); border: 1px solid var(--azul-claro); color: var(--azul-esc); padding: 10px 12px; border-radius: 10px; margin-bottom: 18px; max-width: 820px; font-size: 14px; flex-wrap: wrap; }
.cid-fixa i { width: 16px; height: 16px; color: var(--azul); }
.cid-fixa span { flex: 1; }
.lnk { background: none; border: 0; color: var(--azul); font-weight: 700; font-size: 13px; padding: 0; text-decoration: underline; }

/* ===== Cards do comparativo (usados no celular) ===== */
.comp-cards { display: none; }
.pcard { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); margin-bottom: 12px; box-shadow: var(--shadow); }
.pcard.melhor-card { border-color: var(--amarelo); box-shadow: 0 0 0 2px var(--amarelo); }
.pcard-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pcard-head img { height: 22px; }
.pcard-head .tab { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.3; }
.pcard-head .rm2 { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #FDECEC; color: var(--vermelho); display: grid; place-items: center; flex: none; }
.pcard-head .rm2 i { width: 16px; height: 16px; }
.pcard-plano { background: var(--laranja); color: #fff; font-weight: 800; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard-plano .melhor { display: inline-block; font-size: 10px; background: var(--amarelo); color: #4A3500; border-radius: 99px; padding: 2px 8px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.pcard-attrs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 4px; }
.pcard-attrs span { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; font-weight: 600; }
.pcard-attrs .apt { color: var(--laranja); border-color: var(--laranja-claro); background: var(--laranja-tint); }
.pcard-attrs .enf { color: var(--azul); border-color: var(--azul-claro); background: var(--azul-tint); }
.pcard-precos { padding: 6px 12px 10px; font-size: 13px; }
.pcard-precos .lin { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.pcard-precos .lin:last-child { border-bottom: 0; }
.pcard-precos .lin.zero { color: #A3ACBF; }
.pcard-precos .lin b { font-weight: 700; }
.pcard-precos details summary { cursor: pointer; color: var(--azul); font-weight: 700; font-size: 12px; padding: 6px 0; }
.pcard-total { background: var(--azul); color: #fff; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; }
.pcard-total b { font-size: 22px; font-weight: 800; }
.pcard-total small { display: block; font-size: 11px; opacity: .8; }
.pcard-extra { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 12px; color: var(--muted); background: var(--azul-tint); }
.pcard-extra b { color: var(--azul-esc); }
.pcard-ans { padding: 0 12px 8px; font-size: 11px; color: var(--muted); }

.fab { display: none; }

/* ===== CELULAR ===== */
@media (max-width: 760px) {
  .input, select.input, textarea.input { font-size: 16px; } /* evita zoom automático no iPhone */

  /* Topo */
  .topbar-in { padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .brand { gap: 10px; }
  .brand-logo { height: 46px; }
  .brand-logo-2 { height: 38px; }
  .brand-sep { height: 26px; }
  .brand-name, .brand-sep-2 { display: none; }
  #btnNova { display: none; }

  /* Botão flutuante "Nova cotação" */
  .fab { display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
         background: var(--laranja); color: #fff; border: 0; border-radius: 99px; padding: 15px 20px; font-weight: 800; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .fab i { width: 20px; height: 20px; }

  /* Painel */
  .page { padding: 16px 12px 24px; gap: 14px; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 14px; }
  .hero-stats { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { min-width: 0; padding: 10px 12px; }
  .stat b { font-size: 20px; }
  .stat span { font-size: 11px; }
  .card { padding: 14px; border-radius: 12px; }
  .input-sm { min-width: 0; width: 100%; }
  .cot-item { grid-template-columns: 1fr; padding: 12px; }
  .cot-item .row-gap { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; }
  .cot-item .btn-sm { justify-content: center; padding: 10px; }
  .tabelas-grid { grid-template-columns: 1fr; }
  .rodape-in { padding: 14px 14px calc(88px + env(safe-area-inset-bottom)); }

  /* Janelas em tela cheia */
  .overlay { padding: 0; place-items: stretch; }
  .wiz, .modal, .modal-wide { width: 100%; max-height: none; height: 100vh; height: 100dvh; border-radius: 0; }
  .modal-pin { height: auto; margin: auto 16px; border-radius: 16px; align-self: center; width: calc(100% - 32px); }
  .wiz-head { padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); flex-wrap: wrap; }
  .wiz-head h2 { font-size: 17px; }

  /* Etapas compactas */
  .stepper { padding: 10px 8px 8px; }
  .stepper li { font-size: 0; gap: 4px; }
  .stepper li.active { font-size: 11px; }
  .stepper .dot { width: 28px; height: 28px; font-size: 13px; }
  .stepper li::before { top: 14px; left: calc(-50% + 18px); right: calc(50% + 18px); }

  /* Barra de ações embaixo (alcance do polegar) */
  .wiz-body { order: 2; padding: 16px 14px 24px; }
  .wiz-bar { order: 3; border-bottom: 0; border-top: 1px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
             display: grid; grid-template-columns: auto 1fr; gap: 8px; background: var(--surface); box-shadow: 0 -6px 16px rgba(10,30,80,.06); }
  .wiz-bar > div:first-child { display: contents; }
  .falta { grid-column: 1 / -1; grid-row: 1; margin: 0; font-size: 12px; min-height: 0; }
  .falta:empty { display: none; }
  #btnVoltar { grid-row: 2; padding: 12px 14px; }
  #btnVoltar .t { display: none; }
  .wiz-bar-r { grid-row: 2; grid-column: 2; flex-wrap: nowrap; }
  .wiz-bar:has(#btnVoltar[hidden]) .wiz-bar-r { grid-column: 1 / -1; }
  .wiz-bar-r .btn { flex: 1; justify-content: center; padding: 12px 8px; font-size: 14px; }

  .sec-title { font-size: 18px; }
  .sec-sub { font-size: 14px; margin-bottom: 14px; }

  /* Escolhas em lista */
  .choice-grid { grid-template-columns: 1fr; gap: 8px; }
  .choice { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; row-gap: 0; text-align: left; padding: 12px 14px; align-items: center; }
  .choice .ic { width: 42px; height: 42px; margin: 0; grid-row: span 3; }
  .choice b { font-size: 15px; }
  .choice small, .choice .vig { grid-column: 2; }
  .divider { margin: 18px 0; }

  /* Formulário */
  .form-grid, .resumo-grid { grid-template-columns: 1fr; gap: 14px; }
  .input { padding: 12px; }

  /* Idades */
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; padding: 10px; }
  .faixas { grid-template-columns: 1fr 1fr; gap: 8px; }
  .faixa { padding: 10px 6px; }
  .counter { gap: 4px; }
  .counter button { width: 40px; height: 40px; }
  .counter input { width: 44px; height: 40px; font-size: 16px; }
  .pessoa { grid-template-columns: 1fr auto 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
  .pessoa > input[data-pn] { grid-column: 1 / -1; }
  .pessoa > input[data-pd] { grid-column: 1 / 3; }
  .pessoa .del { grid-column: 3; grid-row: 2; }
  .pessoa [data-pi] { grid-column: 1; font-size: 12px; }
  .pessoa .fx { grid-column: 2 / -1; font-size: 12px; text-align: right; }
  .del { width: 40px; height: 40px; }

  /* Comparativo vira cards */
  .wiz-body .comp-wrap { display: none; }
  .wiz-body .comp-cards { display: block; }

  /* Modal de planos */
  .modal-filtros { flex-wrap: nowrap; overflow-x: auto; padding: 10px 12px; gap: 8px; }
  .modal-filtros select { flex: none; }
  .modal-body { padding: 12px; }
  .modal-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .modal-foot .row-gap { flex: 1; flex-wrap: nowrap; }
  .modal-foot .row-gap .btn { flex: 1; justify-content: center; padding: 12px; }
  #contSel { width: 100%; font-size: 13px; }
  .plano-opt { grid-template-columns: 24px 1fr; gap: 6px 10px; padding: 12px; }
  .plano-opt input { width: 22px; height: 22px; }
  .plano-opt .vl { grid-column: 2; text-align: left; }
  .plano-opt .vl small { display: inline; margin-left: 6px; }
  .grupo-tab h3 .lnk { padding: 6px 0; }

  /* Proposta */
  #modalProposta .wiz-head .row-gap { width: 100%; display: flex; flex-wrap: nowrap; gap: 6px; }
  #modalProposta .wiz-head .row-gap .btn { flex: 1; justify-content: center; padding: 11px 6px; font-size: 13px; gap: 5px; }
  #modalProposta .wiz-head .row-gap .icon-btn { flex: none; }
  #modalImagem .modal-foot .row-gap { width: 100%; }
  .proposta-wrap { padding: 8px; }
  .prop { padding: 14px; font-size: 12px; }
  .prop-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .prop-head .tit { text-align: left; }
  .prop-head img { height: 36px; }
  .prop-head img.parc { height: 30px; }
  .prop-info { grid-template-columns: 1fr 1fr; }
  .prop .copart-grid { grid-template-columns: 1fr; }
  .prop-foot { flex-direction: column; }

  /* Personalização */
  .tabs { padding: 6px 8px 0; }
  .cfg-grid { grid-template-columns: 1fr; }
  #modalConfig .modal-foot > .btn { width: 100%; justify-content: center; }

  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); text-align: center; }
}

/* ===== Imagem da cotação ===== */
.img-wrap { background: #E9EDF5; display: grid; place-items: center; }
.img-wrap img { width: 100%; max-width: 540px; height: auto; border-radius: 10px; box-shadow: 0 6px 24px rgba(10,30,80,.18); background: #fff; -webkit-touch-callout: default; user-select: auto; }
.img-dica { margin: 24px 0; }
.img-hint { font-size: 12px; flex: 1; min-width: 200px; }

/* ===== Desconto família (DE / POR) ===== */
.de { display: block; font-size: 11px; font-weight: 500; color: #8A94A8; text-decoration: line-through; }
.por { display: block; font-weight: 800; color: #128A4B; }
.comp tr.r-total td .de { color: rgba(255,255,255,.75); font-size: 12px; }
.de-inline { color: #8A94A8; text-decoration: line-through; font-weight: 500; margin-right: 4px; }
.tag-desc { display: inline-block; background: #E7F6EE; color: #128A4B; border: 1px solid #BFE6CF; border-radius: 99px; padding: 2px 9px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.pcard-attrs .tag-desc { border-radius: 99px; }
.pcard-total .dp { text-align: right; }
.pcard-total .dp .de-total { display: block; font-size: 12px; opacity: .8; text-decoration: line-through; }
.pcard-total .dp b { font-size: 22px; font-weight: 800; }
.aviso-ok { background: #EAF7F0; border-color: #BFE6CF; color: #0E6B3A; align-items: center; }
.aviso-ok i { width: 18px; height: 18px; flex: none; }
.prop-desc { margin: -2px 0 10px; font-size: 12px; color: #0E6B3A; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== Cidades disponíveis (tela inicial) ===== */
.cid-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); }
.cid-card:hover { border-color: var(--azul); background: var(--azul-tint); }
.cid-card .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--azul-claro); color: var(--azul); display: grid; place-items: center; flex: none; }
.cid-card .ic i { width: 20px; height: 20px; }
.cid-card > span:nth-child(2) { flex: 1; min-width: 0; }
.cid-card b { display: block; font-size: 15px; }
.cid-card small { color: var(--muted); font-size: 12px; }
.cid-card > i { color: var(--muted); width: 18px; height: 18px; }

/* ===== Comparativo: colunas De / Por (modelo de referência) ===== */
.comp tr.r-desc td:not(.lbl) { background: var(--laranja); color: #fff; font-weight: 600; }
.comp tr.r-desc td.lbl { background: var(--laranja); color: #fff; }
.comp tr.r-desc b { font-size: 16px; margin-right: 4px; }
.comp td.dp-de { color: #C9D2E6; font-weight: 600; }
.comp td.dp-por { background: var(--azul) !important; color: #fff !important; font-weight: 800; }
.comp td.col-de { color: #8A94A8; font-weight: 500 !important; min-width: 84px; }
.comp td.col-por { font-weight: 800; min-width: 84px; }
.comp tr.r-total td.tot-de { background: var(--azul-esc) !important; color: rgba(255,255,255,.75) !important; font-weight: 600; }
.comp tr.r-total td.tot-por { background: var(--azul) !important; }
.prop .comp td.col-de, .prop .comp td.col-por { min-width: 0; }
.pcard-dphead { display: flex; justify-content: space-between; padding: 8px 12px 0; font-size: 12px; color: var(--muted); }
.pcard-dphead b { color: var(--azul); }
.pcard-extra b { color: var(--azul-esc); }

/* ===== Botão liga/desliga do desconto (tela de planos) ===== */
.desc-toggle { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 640px; text-align: left; border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; color: var(--text); }
.desc-toggle.on { border-color: #9FD9B8; background: #EAF7F0; }
.desc-toggle .sw { width: 46px; height: 26px; border-radius: 99px; background: #C7CEDD; position: relative; flex: none; transition: background .15s; }
.desc-toggle .sw span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.desc-toggle.on .sw { background: #128A4B; }
.desc-toggle.on .sw span { left: 23px; }
.desc-toggle .txt { min-width: 0; }
.desc-toggle b { display: block; font-size: 15px; }
.desc-toggle.on b { color: #0E6B3A; }
.desc-toggle small { display: block; font-size: 12px; color: var(--muted); }

/* ===== Busca de cidade (área de vendas) ===== */
.busca-cid { position: relative; max-width: 560px; margin-bottom: 12px; }
.busca-cid > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--azul); pointer-events: none; }
.busca-cid .input { padding-left: 38px; font-size: 16px; }
.choice .cid-obs { color: var(--laranja-txt); font-weight: 600; }
.choice small b { color: var(--azul); }
.cid-escolhida { margin-top: 14px; background: #EAF7F0; border-color: #BFE6CF; color: #0E6B3A; }
.cid-escolhida i { color: #128A4B; }
#listaTabelas .choice { text-align: left; }
.lista-cidades { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 761px) {
  .lista-cidades .choice, #cidLista .choice { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; text-align: left; align-items: center; padding: 12px 14px; }
  .lista-cidades .choice .ic, #cidLista .choice .ic { width: 42px; height: 42px; margin: 0; grid-row: span 3; }
  .lista-cidades .choice small, #cidLista .choice small { grid-column: 2; }
}
.dica-busca { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.dica-busca i { width: 16px; height: 16px; color: var(--azul); flex: none; }
#buscaCidPainel { min-width: 280px; font-size: 16px; }

/* =================== LOGIN / CONTA / USUÁRIOS =================== */
body.carregando > :not(.login-tela):not(.toast):not(script),
body.deslogado > :not(.login-tela):not(.toast):not(script) { display: none !important; }
.login-tela { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--azul-claro), #fff 60%); }
.login-tela[hidden] { display: none; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 28px 24px; box-shadow: 0 12px 40px rgba(0, 40, 90, .12); display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { margin: 6px 0 0; font-size: 22px; color: var(--azul); text-align: center; }
.login-card > p.muted { text-align: center; margin: 0 0 6px; font-size: 14px; }
.login-logos { display: flex; justify-content: center; align-items: center; gap: 18px; }
.login-logos img { max-height: 44px; max-width: 45%; object-fit: contain; }
.btn-login { width: 100%; justify-content: center; padding: 14px; font-size: 16px; margin-top: 4px; }
.login-ajuda { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.login-carregando { align-items: center; text-align: center; color: var(--muted); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--azul-claro); border-top-color: var(--azul); border-radius: 50%; animation: girar .8s linear infinite; }
.spinner[hidden] { display: none; }
@keyframes girar { to { transform: rotate(360deg); } }
.topo-dir { display: flex; align-items: center; gap: 8px; }
.btn-conta { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--azul); border-radius: 99px; padding: 8px 12px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; max-width: 140px; }
.btn-conta i, .btn-conta svg { width: 18px; height: 18px; flex: none; }
.btn-conta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .btn-conta span { display: none; } .btn-conta { padding: 8px; } }
.usu-novo { margin-bottom: 18px; }
.usu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.usu-senha-linha { display: flex; gap: 6px; }
.usu-senha-linha .input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; }
.usu-titulo { font-size: 15px; margin: 0 0 10px; }
.usu-lista { display: flex; flex-direction: column; gap: 10px; }
.usu-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.usu-item.bloqueado { background: #FAFAFA; opacity: .8; }
.usu-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.usu-info small { color: var(--muted); overflow-wrap: anywhere; }
.usu-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.tag-ok { background: #E7F6EE; color: #128A4B; }
.tag-bloq { background: #FDECEC; color: #B42318; }
.usu-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-perigo { color: #B42318; }
.usu-senha { flex-basis: 100%; display: flex; gap: 6px; }
.usu-senha[hidden] { display: none; }
.usu-senha .input { flex: 1; min-width: 0; }
