/* ==========================================================
   Contare HUB · Simulador de orçamento — identidade Itrid
   ========================================================== */
:root {
  --navy: #0c1e4f;
  --navy-2: #1a2d63;
  --blue: #1660ff;
  --blue-50: #eef3ff;
  --cyan: #00b8ff;
  --ink: #0c1e4f;
  --muted: #5b6785;
  --line: #e3e8f3;
  --bg: #f5f7fc;
  --card: #ffffff;
  --success: #0e9f6e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(12, 30, 79, .04), 0 8px 24px rgba(12, 30, 79, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ---------- Topbar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { height: 34px; display: block; }
.topbar__product { font-weight: 600; color: var(--muted); font-size: 15px; }
.topbar__product strong { color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 300px at 85% -10%, rgba(0, 184, 255, .35), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #12307a 100%);
  color: #fff;
  padding: 56px 0 96px;
}
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: 12px; font-weight: 700; color: var(--cyan); margin-bottom: 14px; }
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.12; max-width: 720px; font-weight: 800; }
.hero h1 span { color: var(--cyan); }
.hero__lead { margin-top: 16px; max-width: 620px; color: #c8d3f0; font-size: 17px; line-height: 1.55; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; margin-top: -56px; padding-bottom: 64px; align-items: start; }
.builder { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- Module card ---------- */
.module__head {
  display: grid; grid-template-columns: 48px 1fr auto 40px; gap: 16px; align-items: center;
  width: 100%; padding: 20px 22px; background: none; border: 0; text-align: left;
}
label.module__head { cursor: pointer; }
label.module__head:hover { background: #fafbfe; }
.module__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue);
}
.module__icon svg { width: 24px; height: 24px; }
.has-selection .module__icon { background: var(--blue); color: #fff; }
.has-selection { border-color: #c6d3f5; }
.module__title h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.module__title p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.module__price { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.module__price b { color: var(--ink); font-size: 17px; }
.module__price small { display: block; font-size: 12px; margin-top: 2px; }
.module__price small:first-child { margin: 0 0 2px; }
.module__body { border-top: 1px solid var(--line); padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 18px; }

.badge { font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-50); border-radius: 999px; padding: 3px 9px; letter-spacing: 0; }

/* ---------- Planos ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tier {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; background: #fff;
  border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s;
}
.tier:hover { border-color: #c6d3f5; }
.tier.is-active { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(22, 96, 255, .12); }
.tier:focus-visible { outline: 3px solid rgba(22, 96, 255, .35); outline-offset: 2px; }
.tier__name { font-weight: 800; font-size: 15px; }
.tier__price { font-size: 13px; color: var(--muted); }
.tier__price b { font-size: 20px; color: var(--ink); }
.tier.is-active .tier__price b { color: var(--blue); }
.tier__count { font-size: 12px; font-weight: 700; color: var(--navy-2); }
.tier__desc { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ---------- Pontos extras ---------- */
.points {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #fafbfe; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.points p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Equipamentos e etiquetas ---------- */
.badge--partner { color: #fff; background: var(--navy); }
.badge--est { color: #8a5a00; background: #fff4d6; }
.hw-card .module__head { grid-template-columns: 48px 1fr auto; }
.hw-card .module__icon { background: var(--navy); color: #fff; }
.hw__title { font-size: 15px; margin-bottom: 8px; }
.hw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hw {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, background .15s;
}
.hw.is-on { border-color: var(--blue); background: var(--blue-50); }
.hw__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 280px; min-width: 0; }
.hw__text > b { font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hw__text > span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.hw__text em { font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hw__text em b { color: var(--blue); }
.hw__text > .hw__obs { font-size: 12.5px; color: var(--ink); }
.hw__obs b { font-weight: 600; }
.hw__fx { font-size: 12.5px; color: var(--muted); background: var(--blue-50); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.hw__fx b { color: var(--blue); }
.hw__fx.is-warn { background: #fff7e6; color: #7a5300; }
.hw__note { font-size: 12px; color: var(--muted); background: #fafbfe; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.stepper.stepper--wide input { width: 96px; }

.hw-summary { margin-top: 8px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); }
.hw-summary__title { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8ea0d1; font-weight: 700; margin-bottom: 6px; }
.hw-summary .row { font-size: 13.5px; }
.hw-summary p { font-size: 12px; color: #9fb0dc; margin-top: 4px; }

/* ---------- Funcionalidades ---------- */
.features__head { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 8px; }
.features__head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.features__head h3 span { font-size: 12px; background: var(--blue); color: #fff; border-radius: 999px; padding: 2px 8px; }
.features__tools { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; padding: 6px 4px; }
.check input { accent-color: var(--blue); width: 15px; height: 15px; margin: 0; }

.cats { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cat + .cat { border-top: 1px solid var(--line); }
.cat__head {
  width: 100%; display: grid; grid-template-columns: 1fr auto 22px; gap: 12px; align-items: center;
  padding: 12px 14px; background: none; border: 0; text-align: left; font-weight: 700; font-size: 14px;
}
.cat__head:hover { background: #fafbfe; }
.cat__head small { color: var(--muted); font-weight: 600; font-size: 12px; }
.cat__chevron { color: var(--muted); transition: transform .2s; }
.cat__chevron svg { width: 18px; height: 18px; display: block; }
.cat.is-open .cat__chevron { transform: rotate(180deg); }
.feats { list-style: none; margin: 0; padding: 0 14px 12px; display: none; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.cat.is-open .feats { display: grid; }
.feat { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; font-size: 13px; padding: 6px 0; }
.feat b { display: block; font-weight: 700; }
.feat span span { display: block; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.feat__icon svg { width: 16px; height: 16px; display: block; margin-top: 1px; }
.feat.is-on .feat__icon { color: var(--success); }
.feat.is-off { opacity: .55; }
.feat.is-off .feat__icon { color: var(--muted); }
.feat__tier { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--navy-2); background: var(--blue-50); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }

/* Switch */
.toggle {
  appearance: none; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 999px; background: #cfd7ea;
  position: relative; margin: 1px 0 0; cursor: pointer; transition: background .2s;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.toggle:checked { background: var(--blue); }
.toggle:checked::after { transform: translateX(16px); }
.toggle:focus-visible { outline: 3px solid rgba(22, 96, 255, .35); outline-offset: 2px; }

/* Stepper */
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 17px; line-height: 1;
}
.stepper button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper input {
  width: 54px; height: 30px; text-align: center; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-weight: 700; color: var(--ink);
  -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper span { font-size: 13px; color: var(--muted); }

/* ---------- Summary ---------- */
.summary { position: sticky; top: 88px; }
.summary__inner { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 20px 40px rgba(12, 30, 79, .25); }
.summary h2 { font-size: 20px; margin-bottom: 18px; }
.field label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #9fb0dc; margin-bottom: 8px; font-weight: 700; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: rgba(255,255,255,.08); padding: 4px; border-radius: 12px; }
.segmented button { border: 0; background: none; color: #c8d3f0; padding: 8px 4px; border-radius: 9px; font-size: 13px; font-weight: 700; line-height: 1.2; }
.segmented button small { display: block; font-size: 11px; color: var(--cyan); font-weight: 700; }
.segmented button.is-active { background: #fff; color: var(--navy); }
.segmented button.is-active small { color: var(--blue); }

.summary__list { list-style: none; margin: 18px 0 0; padding: 0; max-height: 300px; overflow: auto; border-top: 1px solid rgba(255,255,255,.12); }
.summary__group { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.summary__group span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8ea0d1; font-weight: 700; }
.summary__line { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; padding: 6px 0; color: #e3e9fb; }
.summary__empty { color: #8ea0d1; font-size: 14px; padding: 16px 0 4px; }
.summary__line span:nth-child(2) { color: #fff; font-weight: 600; white-space: nowrap; }
.remove { border: 0; background: none; color: #8ea0d1; font-size: 18px; line-height: 1; padding: 0; }
.remove:hover { color: #fff; }

.summary__totals { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 8px; }
.summary__totals .row { display: flex; justify-content: space-between; font-size: 14px; color: #c8d3f0; }
.summary__totals .row strong { color: #fff; }
.summary__totals .discount, .summary__totals .discount strong { color: #5ee0b0; }
.summary__totals .highlight { font-size: 16px; color: #fff; }
.summary__totals .highlight strong { font-size: 22px; color: var(--cyan); }
.summary__totals .total { margin-top: 6px; padding: 12px 14px; background: rgba(255,255,255,.08); border-radius: 10px; color: #fff; }
.impl { margin-top: 4px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.18); }
.impl p { font-size: 12px; color: #9fb0dc; margin-top: 4px; line-height: 1.45; }
.impl b { color: #fff; }

.summary__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.disclaimer { font-size: 12px; color: #8ea0d1; margin-top: 12px; text-align: center; }

/* ---------- Buttons ---------- */
.btn { border: 0; border-radius: 10px; padding: 12px 16px; font-weight: 700; font-size: 15px; text-decoration: none; text-align: center; transition: transform .1s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(90deg, var(--blue), var(--cyan)); color: #fff; }
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost { background: rgba(255,255,255,.1); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.18); }
.btn--whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #25d366; color: #fff; }
.btn--whatsapp:hover { background: #1ebe5a; }
.btn--whatsapp svg { width: 20px; height: 20px; flex: none; }
.btn--link { background: none; color: var(--blue); padding: 6px 8px; font-size: 13px; }
.summary .btn--link { color: #9fb0dc; }

/* ---------- Mobile bar ---------- */
.mobilebar { display: none; }

/* ---------- Modal ---------- */
.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(440px, 92vw); box-shadow: 0 30px 80px rgba(12,30,79,.35); }
.modal::backdrop { background: rgba(12, 30, 79, .55); }
.modal__form { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.modal__form h3 { font-size: 20px; }
.modal__form p { color: var(--muted); font-size: 14px; }
.modal__form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.modal__form input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.modal__form input:focus { outline: 2px solid var(--blue); border-color: transparent; }
.modal__form input[readonly] { background: #f3f6fb; color: var(--navy); cursor: default; }
.modal__hint { margin-top: -6px; font-size: 12px; color: var(--muted); }
.modal__hint.is-ok { color: var(--success); }
.modal__hint.is-err { color: #c23b46; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.modal--wide { width: min(900px, 94vw); max-height: 88vh; }
.modal--wide[open] { display: flex; flex-direction: column; }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal__head h3 { font-size: 18px; }
.modal__scroll { overflow: auto; }

/* Tabela de comparação */
.cmp { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp th { position: sticky; top: 0; background: var(--navy); color: #fff; padding: 10px 12px; text-align: center; font-weight: 700; }
.cmp th:first-child { text-align: left; }
.cmp th small { display: block; font-weight: 600; color: var(--cyan); font-size: 11.5px; }
.cmp th.is-cur { background: var(--blue); }
.cmp th.is-cur small { color: #fff; opacity: .85; }
.cmp td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp td:not(:first-child) { text-align: center; width: 110px; vertical-align: middle; }
.cmp td.is-cur { background: var(--blue-50); }
.cmp td b { display: block; }
.cmp td span:not(.yes):not(.no) { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cmp__cat td { background: #f0f3fa; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--navy-2); }
.cmp .yes { color: var(--success); display: inline-block; }
.cmp .yes svg { width: 18px; height: 18px; display: block; }
.cmp .no { color: #b6bfd6; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: all .25s; z-index: 50; box-shadow: var(--shadow);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: 13px; background: #fff; }
.print-only { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .mobilebar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-between; align-items: center;
    padding: 12px 20px; background: var(--navy); color: #fff; box-shadow: 0 -8px 24px rgba(12,30,79,.2);
  }
  .mobilebar small { display: block; color: #9fb0dc; font-size: 12px; }
  .mobilebar strong { font-size: 20px; color: var(--cyan); }
  .footer { padding-bottom: 90px; }
}
@media (max-width: 760px) {
  .tiers { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .module__head { grid-template-columns: 40px 1fr 40px; padding: 16px; }
  .module__icon { width: 40px; height: 40px; }
  .module__price { grid-column: 2 / 3; text-align: left; }
  .module__head .toggle { grid-row: 1; grid-column: 3; }
  .module__body { padding: 16px; }
  .brand img { height: 28px; }
}

/* ---------- Impressão da proposta ---------- */
@media print {
  @page { margin: 16mm; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; color: #0c1e4f; font-size: 12px; }
  .pp-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--blue); padding-bottom: 14px; }
  .pp-head img { height: 40px; }
  .pp-head div { text-align: right; }
  .pp-head h1 { font-size: 22px; }
  .pp-head p { color: var(--muted); }
  .pp-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin: 18px 0; }
  .pp-meta small { display: block; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-size: 9px; }
  .pp-meta strong { display: block; font-size: 14px; }
  .pp-meta span { display: block; color: var(--muted); }
  .pp-table { width: 100%; border-collapse: collapse; }
  .pp-table th { text-align: left; background: var(--navy); color: #fff; padding: 8px 10px; font-size: 11px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
  .pp-table th:not(:first-child), .pp-table td:not(:first-child) { text-align: right; white-space: nowrap; }
  .pp-table td small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
  .pp-table tfoot td { font-weight: 700; }
  .pp-table tfoot .disc td { color: var(--success); }
  .pp-table tfoot .grand td { font-size: 14px; border-bottom: 0; }
  .pp-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 14px 16px; background: var(--blue-50); border-radius: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-total strong { font-size: 20px; color: var(--blue); }
  .pp-total--alt { margin-top: 8px; background: #f0f3fa; }
  .pp-total--alt strong { font-size: 16px; color: var(--navy); }
  .pp-terms { margin-top: 10px; font-size: 11px; }
  .pp-terms p { margin: 2px 0; }
  .pp-callout { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--blue); background: var(--blue-50); border-radius: 6px; font-size: 11px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pp-contact { margin-top: 20px; padding-top: 12px; border-top: 2px solid var(--blue); break-inside: avoid; page-break-inside: avoid; }
  .pp-contact small { display: block; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-size: 9px; }
  .pp-contact strong { display: block; font-size: 14px; color: var(--navy); }
  .pp-contact span { color: var(--muted); font-size: 11px; }
  .pp-note { margin-top: 10px; color: var(--muted); font-size: 10px; }
  .pp-section { font-size: 14px; margin: 20px 0 8px; color: var(--navy); }
  /* Quebras de página: título junto da tabela, tabela inteira numa página, totais sem repetir */
  .pp-section { break-after: avoid; page-break-after: avoid; }
  .pp-section--newpage { break-before: page; page-break-before: always; margin-top: 0; }
  .pp-table { break-inside: avoid; page-break-inside: avoid; }
  .pp-table tr { break-inside: avoid; page-break-inside: avoid; }
  .pp-table tfoot { display: table-row-group; }
  .pp-terms, .pp-callout { break-inside: avoid; page-break-inside: avoid; }
  .pp-section small { font-weight: 600; color: var(--muted); font-size: 11px; }
  .pp-scope { margin-bottom: 12px; break-inside: avoid; }
  .pp-scope h3 { font-size: 12.5px; color: var(--blue); margin-bottom: 4px; }
  .pp-scope h3 small { color: var(--muted); font-weight: 600; }
  .pp-scope p { font-size: 10.5px; line-height: 1.5; margin: 2px 0; }
}
