/* ============================================================
   Analisys Connect — Gestão de Convênios e Cartão de Benefício | Estilos
   Identidade visual alinhada ao laboratorioanalisys.com.br: vermelho
   (#db0110) + branco + preto. Inter + Sora.
   ============================================================ */
:root {
  --red: #db0110;
  --red-2: #a8010c;
  --red-700: #7a0109;
  --red-soft: #fdeceb;
  --red-bright: #ff5252;
  --navy-900: #141414;
  --navy-800: #1e1e1e;
  --green: #2fa876;
  --gold: #d9a441;
  --violet: #8b5cf6;
  --blue: #0ea5e9;
  --bg: #f7f7f7;
  --card: #ffffff;
  --ink: #161616;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.2);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
h1, h2, h3, .num, .brand-txt { font-family: "Sora", "Inter", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===================== Layout app ===================== */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* ===================== Sidebar ===================== */
.sidebar {
  background: linear-gradient(180deg, var(--navy-900) 0%, #202020 60%, #0c0c0c 100%);
  color: #e2e2e2; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  grid-column: 1;
}
.main { grid-column: 2; }
.sidebar__brand { display: flex; align-items: center; padding: 20px 20px 6px; }
.sidebar__logo { width: 100%; max-width: 190px; height: auto; display: block; }
.brandmark { width: 40px; height: 40px; display: block; flex: none; box-shadow: 0 6px 16px rgba(219,1,16,.45); border-radius: 12px; }
.brandmark svg { width: 100%; height: 100%; display: block; border-radius: 12px; }
.brand-txt { font-size: 19px; color: #fff; letter-spacing: .2px; }
.brand-txt b { color: var(--red-bright); }
.ctx-tag { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #9a9a9a; margin: 8px 16px 0; font-weight: 700; }
.sidebar__nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #9a9a9a; margin: 16px 12px 6px; font-weight: 700; }
.navi {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 11px;
  font-size: 14px; font-weight: 500; color: #cfcfcf; transition: .15s; position: relative;
}
.navi__i { font-size: 16px; width: 22px; text-align: center; filter: saturate(.5) brightness(1.1); }
.navi:hover { background: rgba(255,255,255,.07); color: #fff; }
.navi.active { background: linear-gradient(90deg, rgba(219,1,16,.32), rgba(219,1,16,.06)); color: #fff; }
.navi.active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--red-bright); }
.navi.active .navi__i { filter: none; }
.navi__warn { margin-left: auto; font-size: 10px; font-weight: 800; background: #d97706; color: #fff; padding: 1px 7px; border-radius: 999px; }
.sidebar__foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.foot-card { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #e2e2e2; background: rgba(255,255,255,.05); padding: 9px 12px; border-radius: 10px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 1.6s infinite; flex: none; }
.proto { font-size: 10.5px; color: #8a8a8a; text-align: center; margin: 9px 0 2px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* ===================== Topbar ===================== */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 14px 26px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.topbar__burger { display: none; background: none; border: none; font-size: 22px; color: var(--navy-900); }
.topbar__title h1 { margin: 0; font-size: 20px; }
.topbar__title p { margin: 1px 0 0; font-size: 13px; color: var(--muted); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.live-pill { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; color: var(--ok); background: #e9f9ef; padding: 6px 11px; border-radius: 999px; border: 1px solid #c7eed6; }
.user { display: flex; align-items: center; gap: 10px; }
.user__av { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.user__meta { display: flex; flex-direction: column; line-height: 1.15; }
.user__meta b { font-size: 13.5px; } .user__meta small { font-size: 11.5px; color: var(--muted); }

/* ===================== View ===================== */
.view { padding: 24px 26px 60px; max-width: 1380px; width: 100%; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.view-head h2 { margin: 0; font-size: 19px; }
.view-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--red); font-weight: 600; }

/* ===================== Botões ===================== */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 15px; border-radius: 11px; font-size: 13.5px; font-weight: 600; transition: .15s; }
.btn:hover { border-color: #d4d4d4; box-shadow: var(--shadow); }
.btn--primary { background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; border-color: transparent; }
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 8px 20px rgba(219,1,16,.35); }
.btn--accent { background: linear-gradient(135deg, var(--green), #52c395); color: #052e1e; border-color: transparent; font-weight: 700; }
.btn--accent:hover { filter: brightness(1.05); box-shadow: 0 8px 20px rgba(47,168,118,.4); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn--danger { color: var(--bad); border-color: #f3c9c9; }
.btn--danger:hover { background: #fef2f2; }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ===================== Grid & Cards ===================== */
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, 1fr); }
.cols-2 { grid-template-columns: 1.6fr 1fr; }
.cols-2e { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mb { margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__pad { padding: 18px 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 0; }
.card__head h3 { margin: 0; font-size: 14.5px; }
.card__head small { color: var(--muted); font-size: 12px; }
.card__body { padding: 16px 20px 20px; }

/* KPI card */
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -20px; top: -20px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent, var(--red)); opacity: .08; }
.kpi__top { display: flex; align-items: center; gap: 9px; }
.kpi__ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: color-mix(in srgb, var(--accent, var(--red)) 13%, #fff); }
.kpi__label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi__val { font-size: 26px; font-weight: 800; font-family: "Sora"; margin: 9px 0 2px; letter-spacing: -.5px; line-height: 1; }
.kpi__sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ===================== Charts helpers ===================== */
.svg-chart, .svg-donut, .svg-ring, .svg-gauge { width: 100%; height: auto; display: block; overflow: visible; }
.svg-gauge { max-width: 260px; }
line.grid { stroke: #ececec; stroke-width: 1; }
.axis { fill: #9a9a9a; font-size: 11px; font-family: "Inter"; }
.goal { stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 5 4; }
.lbl-last { font-size: 13px; font-weight: 800; font-family: "Sora"; }
.chart-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 36px 0; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.svg-donut { flex: none; }
.donut-num { font-size: 24px; font-weight: 800; font-family: "Sora"; fill: var(--ink); }
.donut-lbl { font-size: 11px; fill: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 130px; }
.lg { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.lg b { color: var(--ink); margin-left: auto; }
.lg__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ring-num { font-size: 26px; font-weight: 800; font-family: "Sora"; fill: var(--ink); }
.ring-lbl { font-size: 11px; fill: var(--muted); }
.gauge-num { font-size: 25px; font-weight: 800; font-family: "Sora"; fill: var(--ink); }
.gauge-lbl { font-size: 11.5px; fill: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 72px; align-items: center; gap: 10px; }
.hbar__lbl { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar__track { background: #ececec; border-radius: 7px; height: 12px; overflow: hidden; }
.hbar__fill { height: 100%; border-radius: 7px; transition: width .8s ease; }
.hbar__val { font-size: 12.5px; font-weight: 700; text-align: right; color: var(--muted); }
.spark { width: 120px; height: 34px; }
.legend-inline { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend-inline span { display: flex; align-items: center; gap: 6px; }
.legend-inline i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ===================== Tabelas ===================== */
.tbl-wrap { overflow-x: auto; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid #efefef; vertical-align: middle; }
.tbl tbody tr:hover { background: #f7f7f7; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .mono { font-variant-numeric: tabular-nums; }
.tbl .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-strong { font-weight: 700; }
.t-sub { color: var(--muted); font-size: 12px; }
.row-click { cursor: pointer; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ativo, .b-ativa, .b-paga, .b-quitado { color: #15803d; background: #e8f8ee; }
.b-a_vencer { color: #b45309; background: #fef3df; }
.b-vencido, .b-inativo, .b-cancelado, .b-vencida, .b-bloqueado { color: #b91c1c; background: #fdeaea; }
.b-reemitido { color: #1d4ed8; background: #e7eeff; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 7px; background: #f0f0f0; color: var(--muted); }
.tag--ok { background: #e8f8ee; color: #15803d; }
.tag--low { background: #fef3df; color: #b45309; }
.tag--out { background: #fdeaea; color: #b91c1c; }
.tag--pub { background: #ecfdf5; color: #047857; }
.tag--gold { background: #fdf3df; color: #92600a; }

/* filtros */
.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.input, select.input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink); min-width: 0; }
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(219,1,16,.12); }
.search { position: relative; flex: 1; min-width: 180px; }
.search .input { width: 100%; padding-left: 34px; }
.search::before { content: "🔍"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .5; }
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.chip.active { background: var(--red-2); color: #fff; border-color: var(--red-2); }

/* ===================== dl ===================== */
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.dl div { display: flex; flex-direction: column; gap: 2px; }
.dl dt { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.dl dd { margin: 0; font-size: 14px; font-weight: 600; }

/* ===================== timeline (histórico) ===================== */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--line); margin-left: 5px; }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -6.5px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--red); }
.timeline .tl-title { font-size: 13.5px; font-weight: 700; }
.timeline .tl-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.timeline .tl-detail { font-size: 12.5px; color: var(--ink); margin-top: 3px; }

.boot-loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted, #9a9a9a); font-size: 14px;
  background: linear-gradient(180deg, var(--navy-900, #141414), #0a0a0a); }

/* ===================== Login ===================== */
.entry { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px;
  background: radial-gradient(1100px 600px at 80% -10%, rgba(219,1,16,.22), transparent 60%),
              radial-gradient(900px 500px at 0% 110%, rgba(168,1,12,.3), transparent 55%),
              linear-gradient(180deg, var(--navy-900), #0a0a0a); color: #e8e8e8; }
.entry__inner { width: min(920px, 100%); }
.entry__brand { display: flex; align-items: center; gap: 13px; justify-content: center; margin-bottom: 6px; }
.entry__brand .brandmark { width: 46px; height: 46px; }
.entry__brand b { font-size: 26px; font-family: "Sora"; color: #fff; }
.entry__brand b span { color: var(--red-bright); }
.entry__logo { height: 64px; width: auto; max-width: 90%; display: block; }
.entry h1 { text-align: center; font-size: 24px; margin: 14px 0 4px; }
.entry p.lead { text-align: center; color: #b8b8b8; max-width: 560px; margin: 0 auto 26px; font-size: 14px; }
.entry__box { background: #fff; border: 1px solid #e6e6e6; border-radius: 18px; padding: 26px; max-width: 400px; margin: 0 auto; box-shadow: var(--shadow-lg); }
.entry__box .field label { color: #4a4a4a; }
.entry__box .field .input { background: #fff; border-color: #d9d9d9; color: #161616; }
.entry__box .field .input::placeholder { color: #9a9a9a; }
.entry__foot { text-align: center; margin-top: 22px; color: #7a7a7a; font-size: 11.5px; }
.entry__lock { text-align: center; padding: 14px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; color: #b91c1c; font-size: 13px; margin-top: 14px; }

/* ===================== Live feed / toast / modal ===================== */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--navy-900); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .3s; z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal { position: fixed; inset: 0; z-index: 70; display: none; }
.modal.open { display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.55); backdrop-filter: blur(3px); }
.modal__box { position: relative; background: #fff; border-radius: 18px; width: min(680px, 96vw); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: popin .25s ease; }
.modal__box.wide { width: min(880px, 96vw); }
@keyframes popin { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; border-radius: 18px 18px 0 0; z-index: 2; }
.modal__head h3 { margin: 0; font-size: 17px; }
.modal__x { border: none; background: #efefef; width: 32px; height: 32px; border-radius: 9px; font-size: 17px; color: var(--muted); }
.modal__body { padding: 22px; }
.modal__foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; position: sticky; bottom: 0; background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.field .input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; font-family: inherit; }
.field textarea { resize: vertical; min-height: 64px; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field .err { font-size: 11.5px; color: var(--bad); font-weight: 600; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--red); }

/* ===================== permissões (grid) ===================== */
.perm-grid { display: grid; grid-template-columns: 1fr repeat(4, 90px); gap: 6px; align-items: center; font-size: 13px; }
.perm-grid .ph { font-weight: 700; font-size: 11.5px; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.perm-grid .pl { padding: 8px 0; border-top: 1px solid var(--line); }
.perm-grid .pc { text-align: center; padding: 8px 0; border-top: 1px solid var(--line); }
.perm-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

/* ===================== dropzone (importação XLSX) ===================== */
.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 34px 20px; text-align: center; background: #fbfdfd; transition: .15s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--red); background: var(--red-soft); }
.dropzone .dz-ico { font-size: 34px; margin-bottom: 8px; }
.dropzone b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.dropzone p { margin: 0; color: var(--muted); font-size: 12.5px; }
.import-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.import-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: center; }
.import-stat b { display: block; font-size: 22px; font-family: "Sora"; }
.import-stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.import-stat.ok b { color: var(--ok); } .import-stat.bad b { color: var(--bad); }

/* ===================== cartão visual ===================== */
/* modelo enviado pelo cliente (img/CARTÃO.png), medido pixel a pixel pra reproduzir
   com fidelidade: degradê CINZA VERTICAL (não diagonal — claro em cima, escuro embaixo,
   ~180deg), proporção 1.544 (não o padrão de cartão de crédito 1.586), logo real da
   Analisys no canto superior esquerdo, "Empresarial" em script logo abaixo, marca
   d'água da gota no canto inferior direito. Elementos posicionados em % calibrados a
   partir das coordenadas medidas na imagem original — ver convenia_producao.md. */
.cardvisual { width: 100%; max-width: 360px; aspect-ratio: 1.544; border-radius: 18px; position: relative; overflow: hidden;
  container-type: inline-size;
  background: linear-gradient(180deg, #bebebe 0%, #969696 22%, #646464 50%, #3c3c3c 78%, #303030 100%); color: #fff;
  box-shadow: var(--shadow-lg); }
.cardvisual.st-bloqueado, .cardvisual.st-cancelado { filter: grayscale(.5) brightness(.82); }
.cv-watermark { position: absolute; right: -10%; bottom: -6%; width: 72%; opacity: .17; z-index: 0; pointer-events: none; }
.cv-watermark img { width: 100%; height: auto; display: block; }
.cv-logo { position: absolute; left: 5%; top: 8%; height: 19%; width: auto; z-index: 1; }
/* 2026-08-31: .cv-tipo/.cv-name/.cv-sub/.cv-val estavam em px fixo, enquanto
   .cv-tag/.cv-number já usavam cqw (unidade relativa à largura real do card via
   container-type:inline-size em .cardvisual). Card não tem largura fixa — só um
   max-width de 360px, "width:100%" do que sobrar do container/tela — então em
   qualquer lugar mais estreito (tela menor, zoom do navegador, layout mais
   apertado) o texto fixo ficava desproporcionalmente grande e invadia por cima
   de outros elementos (nome sobre "Empresarial"/número), parecendo "cortado".
   Convertido pra cqw (proporção mantida em px calculado a 360px, a largura de
   referência usada no design original) + salvaguarda de truncamento (nome/
   empresa muito longos viram reticências em vez de quebrar linha e invadir o
   card) — nenhuma mudança visual na largura de referência (360px), só nas
   larguras menores que antes quebravam. */
.cv-tipo { position: absolute; right: 6%; top: 8%; font-size: 2.78cqw; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.55); color: #1a1a1a; padding: 0.83cqw 2.5cqw; border-radius: 999px; z-index: 1; white-space: nowrap; }
.cv-tag { position: absolute; left: 40%; top: 27%; font-family: "Alex Brush", cursive; font-size: 8cqw; line-height: 1; color: #1a1a1a; z-index: 1; white-space: nowrap; }
.cv-number { position: absolute; left: 5%; top: 47%; font-family: "Sora"; font-size: 4.2cqw; letter-spacing: 1.5px; font-weight: 700; color: #1a1a1a; z-index: 1; white-space: nowrap; }
.cv-bottom { position: absolute; left: 5%; right: 5%; bottom: 6%; display: flex; align-items: flex-end; justify-content: space-between; gap: 2.78cqw; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.cv-bottom > div:first-child { flex: 1; min-width: 0; }
.cv-name { font-size: 3.61cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-sub { font-size: 2.92cqw; opacity: .9; margin-top: 1px; text-transform: none; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-val { text-align: right; font-size: 2.64cqw; opacity: .9; flex: none; }
.cv-val b { display: block; font-size: 3.47cqw; font-family: "Sora"; white-space: nowrap; }
.cv-stamp { position: absolute; top: 44%; left: 0; right: 0; text-align: center; font-size: 6.11cqw; font-weight: 900; color: rgba(255,255,255,.75); letter-spacing: .83cqw; transform: rotate(-8deg); z-index: 2; text-shadow: 0 2px 6px rgba(0,0,0,.45); }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.cv-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cv-caption { font-size: 12px; color: var(--muted); text-align: center; }

/* misc */
.muted { color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty__ico { font-size: 38px; opacity: .5; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-size: 13px; }
.alert--warn { background: #fff7e8; color: #92600a; border: 1px solid #fde7bd; }
.alert--ok { background: #e9f9ef; color: #15803d; border: 1px solid #c7eed6; }
.alert--bad { background: #fdeaea; color: #b91c1c; border: 1px solid #f6caca; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 12px; }
.pill-count { font-size: 11px; font-weight: 800; background: var(--red-soft); color: var(--red-700); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tab { padding: 10px 15px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--red-700); border-color: var(--red); }
.step-list { display: flex; flex-direction: column; gap: 10px; }
.step-row { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.step-row .sn { width: 26px; height: 26px; border-radius: 8px; background: var(--red-soft); color: var(--red-700); font-weight: 800; font-size: 12.5px; display: grid; place-items: center; flex: none; font-family: "Sora"; }

/* ===================== Responsivo ===================== */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols-2, .cols-2e, .cols-3 { grid-template-columns: 1fr; }
  .perm-grid { grid-template-columns: 1fr repeat(4, 70px); font-size: 12px; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 90; width: 260px; transform: translateX(-100%); transition: transform .25s ease; grid-column: auto; }
  .sidebar.open { transform: none; }
  .main { grid-column: 1; }
  .topbar__burger { display: block; }
  .view { padding: 18px 16px 50px; }
  .form-grid, .dl { grid-template-columns: 1fr; }
  .import-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .live-pill { display: none; }
}
/* extrato de impressão (comprovante de status na Consulta Rápida) — layout de
   documento dedicado, só existe na folha impressa; a tela mostra o card colorido
   normal, escondido na hora de imprimir (ver .cq-onscreen abaixo). Pedido do Airton
   (2026-08-22): a impressão anterior era literalmente a tela, "desalinhada e feia". */
.extrato-print { display: none; }
@media print {
  .sidebar, .topbar, .head-actions, .filters, .btn, .toast, .breadcrumb, .no-print { display: none !important; }
  body { background: #fff; }
  .layout { grid-template-columns: 1fr; }
  .main { grid-column: 1; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .view { max-width: none; padding: 0; }
  .cardvisual { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cardgrid { gap: 14px; }
  /* recibo de ativação do cartão de desconto (página pública, sem sidebar/topbar) */
  .entry { background: #fff !important; color: #000; min-height: 0; padding: 0; }
  .entry__brand, .entry h1, .entry p.lead, .entry__foot, #formConsultar { display: none !important; }
  .entry__box { box-shadow: none; border: none; padding: 0; max-width: none; }
  #recibo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cq-onscreen { display: none !important; }
  .extrato-print { display: block; max-width: 620px; margin: 0 auto; color: #111; }
  .extrato-print__header { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid #222; padding-bottom: 14px; margin-bottom: 20px; }
  .extrato-print__logo { height: 40px; }
  .extrato-print__titulo { font-family: "Sora", sans-serif; font-weight: 800; font-size: 19px; }
  .extrato-print__sub { color: #555; font-size: 12.5px; margin-top: 2px; }
  .extrato-print__status { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .3px; padding: 6px 16px; border-radius: 6px; margin-bottom: 18px; border: 1.5px solid #333; }
  .extrato-print__tabela { width: 100%; border-collapse: collapse; }
  .extrato-print__tabela th, .extrato-print__tabela td { text-align: left; padding: 9px 6px; border-bottom: 1px solid #ddd; font-size: 13px; vertical-align: top; }
  .extrato-print__tabela th { width: 200px; color: #555; font-weight: 600; }
  .extrato-print__footer { margin-top: 30px; font-size: 11px; color: #888; border-top: 1px solid #ddd; padding-top: 10px; }
  @page { margin: 16mm 14mm; }
}
