/* Review Partners — identidade visual ReviewGrowth (Brand Book v1.0) */
:root {
  --blue: #2563EB;        /* Electric Blue — destaque (10%) */
  --blue-dk: #1D4ED8;
  --navy: #0F172A;        /* Deep Navy — texto e estrutura */
  --sky: #DBEAFE;         /* Sky Tint — fundos suaves e seleção */
  --slate: #64748B;       /* Slate Gray — texto secundário */
  --white: #FFFFFF;       /* Pure White — respiro (60%) */
  --green: #10B981;       /* Success Green — só estados positivos */
  --danger: #DC2626;
  --line: rgba(100, 116, 139, .22);
  --line-2: rgba(100, 116, 139, .12);
  --soft: rgba(219, 234, 254, .45);
  --radius: 10px;
  --tr: 150ms ease;
  --side: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--navy);
  background: var(--white);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--blue); }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.pre { white-space: pre-line; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background var(--tr), border-color var(--tr), color var(--tr);
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dk); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-link { background: none; border: none; color: var(--blue); padding: 0; height: auto; font-weight: 600; }
.btn-del:hover { border-color: var(--danger); color: var(--danger); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-trash { background: var(--white); color: var(--danger); border-color: rgba(220,38,38,.35); padding: 0 9px; margin-left: auto; }
.btn-trash:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }

label.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field > span em { color: var(--slate); font-style: normal; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--navy); background: var(--white);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 42px;
  transition: border-color var(--tr), box-shadow var(--tr);
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }
.money-input { position: relative; }
.money-input::before { content: "R$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate); font-size: 14px; }
.money-input input { padding-left: 38px; font-variant-numeric: tabular-nums; }
.hint { font-size: 12.5px; color: var(--slate); margin-top: 6px; }
.error-msg { color: var(--danger); font-size: 13.5px; margin-top: 8px; min-height: 0; }

.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color var(--tr), background var(--tr); }
.check:hover { border-color: var(--blue); }
.check input { margin-top: 3px; accent-color: var(--blue); width: 16px; height: 16px; flex: none; }
.check.on { border-color: var(--blue); background: var(--soft); }
.check.disabled { opacity: .55; cursor: not-allowed; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.switch input { accent-color: var(--green); width: 18px; height: 18px; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--white); }
.auth-card { width: 100%; max-width: 400px; border: 1px solid var(--line); border-radius: 14px; padding: 36px 32px; background: var(--white); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; text-align: center; }
.auth-brand img { width: 72px; height: 72px; }
.auth-brand h1 { font-size: 24px; }
.auth-brand p { color: var(--slate); font-size: 14px; }
.otp-input { text-align: center; font-size: 26px !important; letter-spacing: .5em; font-weight: 600; font-variant-numeric: tabular-nums; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--slate); }

/* ---------- Layout do app ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side); flex: none; background: var(--navy); color: var(--white);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30;
  transition: transform var(--tr);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 26px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand strong { font-size: 16px; font-weight: 700; display: block; line-height: 1.2; }
.brand span { font-size: 12px; color: rgba(255,255,255,.6); }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px;
  color: rgba(255,255,255,.75); text-decoration: none; font-weight: 500; font-size: 14.5px;
  border-left: 3px solid transparent; transition: background var(--tr), color var(--tr);
}
.nav a:hover { background: rgba(255,255,255,.06); color: var(--white); }
.nav a.active { background: rgba(37,99,235,.18); color: var(--white); border-left-color: var(--blue); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 10px; }
.who .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.who small { display: block; color: rgba(255,255,255,.55); font-size: 12px; }
.side-foot .btn { width: 100%; background: transparent; color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.18); }
.side-foot .btn:hover { color: var(--white); border-color: rgba(255,255,255,.4); }

.main { flex: 1; margin-left: var(--side); min-width: 0; }
.topbar { display: none; }
.content { max-width: 1200px; margin: 0 auto; padding: 36px 40px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head p { color: var(--slate); margin-top: 4px; max-width: 640px; }

/* ---------- Cards e listas ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 20px; }
.card + .card { margin-top: 12px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.section-title:first-child { margin-top: 0; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.grid .card + .card { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 .card + .card { margin-top: 0; }
.svc-card { display: flex; flex-direction: column; gap: 12px; }
.svc-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.svc-desc { color: var(--slate); font-size: 14px; white-space: pre-line; }
.svc-details { font-size: 13.5px; background: var(--soft); border-radius: 8px; padding: 12px 14px; white-space: pre-line; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-blue { background: var(--sky); color: var(--blue-dk); }
.badge-navy { background: rgba(15,23,42,.06); color: var(--navy); }
.badge-green { background: rgba(16,185,129,.12); color: #047857; }
.badge-off { background: rgba(100,116,139,.12); color: var(--slate); }
.badge-warn { background: rgba(220,38,38,.08); color: var(--danger); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

/* Valores: implantação (navy) e mensalidade (azul) sempre distintos */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.price { border-radius: 8px; padding: 10px 12px; border: 1px solid var(--line-2); }
.price small { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); }
.price b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price.setup b { color: var(--navy); }
.price.monthly { background: var(--soft); border-color: transparent; }
.price.monthly b { color: var(--blue); }
.price.monthly b::after { content: "/mês"; font-size: 13px; font-weight: 500; margin-left: 2px; }
.price.none { border-style: dashed; }
.price.none b { font-size: 14px; color: var(--danger); font-weight: 600; }

/* Totais */
.totals { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 12px; }
.total { border-radius: 10px; padding: 14px 16px; border: 1px solid var(--line); }
.total small { display: block; font-size: 12px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .05em; }
.total b { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.total span { display: block; font-size: 12px; color: var(--slate); margin-top: 2px; }
.total.monthly { background: var(--soft); border-color: transparent; }
.total.monthly b { color: var(--blue); }
.total.first { background: var(--navy); color: var(--white); border-color: var(--navy); }
.total.first small, .total.first span { color: rgba(255,255,255,.65); }

/* Tabela */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--white); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr.link { cursor: pointer; transition: background var(--tr); }
tbody tr.link:hover { background: var(--soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num.monthly { color: var(--blue); font-weight: 600; }

.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--slate); }
.empty h3 { color: var(--navy); margin-bottom: 6px; }

/* ---------- Fluxo da consulta ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.step-pill { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--slate); padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); }
.step-pill i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(100,116,139,.12); }
.step-pill.on { color: var(--navy); border-color: var(--blue); }
.step-pill.on i { background: var(--blue); color: var(--white); }
.step-pill.done i { background: var(--green); color: var(--white); }
.q { margin-bottom: 22px; }
.q h3 { margin-bottom: 10px; font-weight: 600; font-size: 15.5px; }
.q-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.q-opts .check { padding: 9px 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.scenario { cursor: pointer; transition: border-color var(--tr), background var(--tr); }
.scenario:hover { border-color: var(--blue); }
.scenario.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.scenario-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.scenario.on .radio-dot { border-color: var(--blue); }
.scenario.on .radio-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.svc-lines { margin: 0 0 14px; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.svc-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.svc-lines .vals { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc-lines .vals .m { color: var(--blue); font-weight: 600; }
.svc-lines .vals div { line-height: 1.4; }
.svc-lines .cat { font-size: 12px; color: var(--slate); }
details.more summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600; margin-top: 4px; }
details.more > div { margin-top: 8px; }

.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--slate); }
.kv dd { margin: 0; }
.qa { list-style: none; padding: 0; margin: 0; }
.qa li { padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; display: flex; justify-content: space-between; gap: 16px; }
.qa li:last-child { border-bottom: none; }
.qa b { font-weight: 600; text-align: right; }

/* Condições do cenário */
.cond { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.cond:last-child { border-bottom: none; }
.cond p { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.cond-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cond-head .btn-link { font-size: 12.5px; white-space: nowrap; }
.cond .q-opts .check { padding: 7px 12px; font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Proposta */
.prop-list { margin-bottom: 14px; }
.prop-list .prop-item { align-items: center; }
.prop-item > div:first-child { flex: 1; min-width: 0; }
.prop-item .btn { flex: none; }
.prop-item.is-blocked { opacity: .6; }
.prop-item.is-blocked .cat { color: var(--danger); }
.rule-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--slate); }
.rule-list b { color: var(--navy); }

/* Subtotais por empresa */
.company-split { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.company-split p { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); margin-bottom: 6px; }
.company-split div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; flex-wrap: wrap; }
.company-split span { font-variant-numeric: tabular-nums; }

/* Verificação dos cenários */
.coverage { border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size: 14px; border: 1px solid; }
.coverage.ok { background: rgba(16,185,129,.07); border-color: rgba(16,185,129,.35); }
.coverage.ok b { color: #047857; }
.coverage.warn { background: rgba(220,38,38,.04); border-color: rgba(220,38,38,.3); }
.coverage.warn > b { color: var(--danger); }
.coverage p { margin-top: 4px; }
.coverage .cov-title { margin-top: 10px; }
.coverage ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.coverage li { display: flex; flex-wrap: wrap; gap: 4px; }

/* Níveis Básico / Avançado */
.level-tag { font-size: 12.5px; font-weight: 600; margin: 2px 0 -4px; }
.adv-box { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin: 4px 0 16px; }
.adv-box .hint { margin: 6px 0 10px; }
.adv-preview { font-size: 13px; color: var(--slate); background: var(--soft); border-radius: 8px; padding: 10px 12px; margin-top: 12px; }
.adv-preview b { color: var(--blue-dk); }

/* Avisos de regra de negócio */
.notice { border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 14px; border: 1px solid; }
.notice b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.notice.warn { background: rgba(220,38,38,.05); border-color: rgba(220,38,38,.3); }
.notice.warn b { color: var(--danger); }
.notice.info { background: var(--soft); border-color: rgba(37,99,235,.3); }
.notice.info b { color: var(--blue-dk); }
.steps + .notice { margin-top: 0; margin-bottom: 16px; }
.notice.ok { background: rgba(16,185,129,.07); border-color: rgba(16,185,129,.4); }
.notice.ok b { color: #047857; }

/* Ganho do parceiro (fechado por padrão: a tela pode estar sendo mostrada ao cliente) */
details.earn { margin-top: 16px; border: 1px dashed rgba(16,185,129,.55); border-radius: 12px; background: rgba(16,185,129,.04); padding: 12px 16px; }
details.earn summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; list-style: none; }
details.earn summary::-webkit-details-marker { display: none; }
details.earn summary::before { content: "▸"; color: #047857; }
details.earn[open] summary::before { content: "▾"; }
details.earn summary span { font-weight: 700; color: #047857; font-size: 14px; }
details.earn summary em { font-style: normal; font-size: 12px; color: var(--slate); }
details.earn .svc-lines { margin-top: 10px; }
details.earn .total.first { background: #047857; border-color: #047857; }
.total b .per { font-style: normal; font-size: 13px; font-weight: 500; }

/* Meus ganhos */
.only-sm { display: none; }

/* Comissionamento */
.payday { display: flex; align-items: flex-end; gap: 8px; }
.payday label { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; color: var(--slate); gap: 4px; }
.payday input { width: 90px; }
.amount-due { color: var(--blue); }
.ledger td.chk, .ledger th.chk { width: 36px; }
.ledger input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.pay-bar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.section-fold { margin-top: 18px; }
.section-fold > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 10px; }
.pay-list { display: grid; gap: 8px; }
.pay { border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.pay > summary { display: grid; grid-template-columns: 110px minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
.pay > summary::-webkit-details-marker { display: none; }
.pay-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-method { color: var(--slate); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-amount { font-variant-numeric: tabular-nums; }
.pay.reversed .pay-amount { text-decoration: line-through; color: var(--slate); }
.pay-body { padding: 0 16px 14px; }
.pay-body .btn { margin-top: 8px; }
.contract-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.contract-card.ativo { border-color: rgba(16,185,129,.45); background: rgba(16,185,129,.03); }
.contract-card h3 { font-size: 16px; }
.contract-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; font-size: 13.5px; }
.nowrap { white-space: nowrap; }
td.biz { min-width: 190px; }

/* Card largo de produto (Regras de Negócio e Serviços) */
.prod-list { display: grid; gap: 14px; }
.prod-list .card + .card { margin-top: 0; }
.prod { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); gap: 32px; padding: 24px; }
.prod-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.prod-main header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.prod-main h3 { font-size: 17px; }
.prod-side { display: flex; flex-direction: column; gap: 14px; }
.prod-side .rule-list { margin: 0; }
.prod-side .card-actions { margin-top: auto; padding-top: 0; }
.ptable { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ptable .ph, .ptable .pr { display: grid; grid-template-columns: var(--cols, 1fr auto); align-items: center; column-gap: 20px; padding: 10px 14px; }
.ptable .ph { background: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); padding-top: 8px; padding-bottom: 8px; }
.ptable .ph span:not(:first-child) { text-align: right; }
.ptable .pr + .pr { border-top: 1px solid var(--line-2); }
.ptable .pl b { display: block; font-size: 14px; font-weight: 600; }
.ptable .pl small { display: block; font-size: 12px; color: var(--slate); }
.ptable .v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 700; color: var(--navy); }
.ptable .v.m { color: var(--blue); }
.ptable .v i { font-style: normal; font-size: 12px; font-weight: 500; margin-left: 1px; }
.ptable .none-v { color: var(--danger); font-size: 14px; font-weight: 600; }
.ptable.none { border-style: dashed; padding: 14px; color: var(--danger); font-weight: 600; font-size: 14px; }
.q-block { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); margin: 28px 0 -4px; padding-top: 18px; border-top: 1px solid var(--line); }
.q-block.first { margin-top: 0; padding-top: 0; border-top: 0; }
.reasons { background: var(--soft); border-radius: 10px; padding: 12px 16px; margin: 14px 0 6px; }
.reasons b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--blue-dk); margin-bottom: 6px; }
.reasons ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; color: var(--navy); }
.row-actions { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.row-actions .btn-trash { margin-left: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-3 .card + .card { margin-top: 0; }
.earn-rules .card b { font-size: 14px; }
.earn-rules .card p { font-size: 13.5px; color: var(--slate); margin-top: 6px; }
.earn-table tr.group td { background: var(--soft); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--blue-dk); padding-top: 8px; padding-bottom: 8px; }
.earn-table td.num { white-space: nowrap; }
.sim input[type=range] { width: 100%; accent-color: var(--blue); margin-top: 12px; }
.sim .totals { margin-top: 8px; }

/* ---------- Modal e toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal { background: var(--white); border-radius: 14px; width: 100%; max-width: 620px; padding: 24px; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); cursor: pointer; display: grid; place-items: center; color: var(--slate); flex: none; }
.icon-btn:hover { color: var(--navy); border-color: var(--navy); }
.toast-box { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { background: var(--navy); color: var(--white); padding: 12px 16px; border-radius: 10px; font-size: 14px; display: flex; align-items: center; gap: 10px; border-left: 4px solid var(--blue); }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--danger); }
.loading { color: var(--slate); padding: 40px 0; text-align: center; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 25; }
  .main { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--white); z-index: 20; }
  .topbar img { width: 32px; height: 32px; border-radius: 8px; }
  .topbar strong { font-size: 15px; }
  .content { padding: 24px 16px 48px; }
  .totals { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .prod { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  h1 { font-size: 22px; }
}
@media (max-width: 560px) {
  .prop-item { display: grid !important; grid-template-columns: 1fr auto; gap: 8px 12px; }
  .prop-item > div:first-child { grid-column: 1 / -1; }
  .prop-item .vals { text-align: left; }
  .auth-card { padding: 28px 20px; border: none; }
  .modal { padding: 20px 16px; }
  .modal-bg { padding: 16px 8px; }
  .page-head .btn { width: 100%; }
  .actions .btn { flex: 1; }
  .hide-sm { display: none; }
  .only-sm { display: block; }
  .pay > summary { grid-template-columns: 1fr auto; }
  .pay-method { grid-column: 1 / -1; grid-row: 2; }
  .payday { width: 100%; }
  td.biz { min-width: 0; }
  .ptable .ph, .ptable .pr { column-gap: 12px; padding: 10px 12px; }
  .ptable .v { font-size: 15px; }
  .ptable .pl small { font-size: 11.5px; }
}
