:root {
  --bg: #f3f5f9; --card: #fff; --text: #1b2433; --muted: #6b778a; --line: #e3e8ef;
  --brand: #0959ef; --brand-2: #0645c4; --brand-soft: #e8f0ff;
  --good: #1e8a4c; --good-soft: #e5f5ec; --bad: #c0392b; --bad-soft: #fcebea;
  --warn: #b7791f; --warn-soft: #fdf4e3; --info: #2563a8; --info-soft: #e8f0fb;
  --side: #0f1c2e; --side-text: #c7d2e0; --radius: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: 0; font-weight: 650; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 650; }
h3 { margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 250px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.brand { display: flex; gap: .7rem; align-items: center; padding: 1.25rem 1.2rem; }
.brand strong { display: block; color: #fff; font-size: 1rem; }
.brand small { display: block; font-size: .78rem; opacity: .75; }
.logo { height: 40px; width: auto; max-width: 40px; object-fit: contain; flex-shrink: 0; }
.brand.big .logo { height: 52px; max-width: 52px; }
/* logo próprio de revenda (horizontal): ocupa a largura e o nome fica embaixo */
.brand.logo-proprio { flex-direction: column; align-items: flex-start; gap: .4rem; }
.brand.logo-proprio .logo { max-width: 190px; height: auto; max-height: 56px; }
.brand.big.logo-proprio .logo { max-width: 260px; max-height: 80px; }
.pv-side { color: #fff; }
.side nav { display: flex; flex-direction: column; padding: .5rem .6rem; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a { display: flex; gap: .7rem; align-items: center; color: var(--side-text); padding: .6rem .75rem; border-radius: 8px; font-size: .94rem; }
.side nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.side nav a.on { background: var(--brand); color: #fff; }
.side nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.side .nav-g summary { display: flex; gap: .7rem; align-items: center; color: var(--side-text); padding: .6rem .75rem; border-radius: 8px; font-size: .94rem; cursor: pointer; list-style: none; user-select: none; }
.side .nav-g summary::-webkit-details-marker { display: none; }
.side .nav-g summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); opacity: .6; transition: transform .15s; }
.side .nav-g[open] summary::after { transform: rotate(45deg); }
.side .nav-g summary:hover { background: rgba(255,255,255,.06); color: #fff; }
.side .nav-g summary.has-on { color: #fff; }
.side nav a.sub { padding: .45rem .75rem .45rem 2.55rem; font-size: .9rem; }
.side .nav-g[open] { padding-bottom: .25rem; }
.side-foot { border-top: 1px solid rgba(255,255,255,.08); padding: 1rem 1.2rem; display: flex; align-items: center; gap: .6rem; }
.who { flex: 1; min-width: 0; }
.who strong, .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who strong { color: #fff; font-size: .9rem; }
.who small { font-size: .78rem; opacity: .7; }
.side-foot .btn.ghost { color: var(--side-text); border-color: rgba(255,255,255,.2); background: transparent; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.75rem; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.menu-btn { display: none; border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: var(--text); }
.content { padding: 1.5rem 1.75rem 3rem; width: 100%; }
.filters .own-only { flex-basis: 100%; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.card.inline { display: flex; gap: .6rem; align-items: baseline; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--text); display: flex; flex-direction: column; gap: .15rem; }
a.stat:hover { border-color: var(--brand); text-decoration: none; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat strong small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.stat strong.sm { font-size: 1rem; }
.stat em { font-style: normal; font-size: .85rem; color: var(--muted); }
.stat.warn { border-color: #f0c987; background: var(--warn-soft); }
.stat.warn em { color: var(--warn); font-weight: 600; }
.stat.sel { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -1.25rem; padding: 0 1.25rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: 0; }
td.rec { white-space: nowrap; }
td.rec audio { height: 34px; max-width: 260px; vertical-align: middle; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell .btn + .btn { margin-left: .3rem; }

/* tags */
.tag { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eef1f5; color: #4a5568; white-space: nowrap; }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.done { background: #1e8a4c; color: #fff; }
.tag.t0 { background: var(--brand-soft); color: var(--brand-2); }
.tag.t2, .tag.t3, .tag.t8 { background: var(--good-soft); color: var(--good); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #a0aec0; margin-right: .45rem; }
.dot.online { background: #22c55e; box-shadow: 0 0 0 3px #22c55e33; }
.dot.busy { background: #ef4444; }
.dot.ringing { background: #f59e0b; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem 1.05rem; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--brand); border-color: #c9d6e6; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.sm { padding: .3rem .65rem; font-size: .84rem; }
.btn.block { width: 100%; }
.form { display: flex; flex-direction: column; gap: .9rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 600; color: #374151; }
input, select, textarea { font: inherit; font-weight: 400; padding: .55rem .7rem; border: 1px solid #cfd8e3; border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
input[type=file] { padding: .4rem; font-size: .85rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; display: flex; flex-direction: column; gap: .8rem; }
legend { font-weight: 650; padding: 0 .4rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.form.grid2 { display: grid; }
.span2 { grid-column: 1 / -1; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card { margin-top: 1.25rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.filters { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filters label { flex: 1 1 170px; }
.filters .acc-select { flex: 2 1 320px; }
.filters .span-all { flex-basis: 100%; margin: 0; }
.filters .span-all .btn { margin: .15rem .2rem; }
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: var(--good-soft); color: var(--good); border: 1px solid #b7e2c8; }
.alert.err { background: var(--bad-soft); color: var(--bad); border-color: #f2c1bb; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: #c4d7f0; }
.alert ul { margin: 0; padding-left: 1.1rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.25rem 0 1rem; }
.tabs a { padding: .55rem 1rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; color: var(--muted); }

/* portabilidade */
.grid-addr { display: grid; grid-template-columns: 150px 1fr 120px; gap: 1rem; }
.grid-addr .a-comp { grid-column: span 1; }
.grid-addr .a-bai { grid-column: span 2; }
.grid-addr .a-cid { grid-column: span 2; }
.status-card { display: flex; flex-wrap: wrap; gap: 2rem; }
.status-card .big { font-size: 1.1rem; font-weight: 650; margin-top: .2rem; }
.status-card .big .tag { font-size: .95rem; padding: .25rem .8rem; }
.status-card .motivo { flex-basis: 100%; background: var(--bad-soft); border-radius: 8px; padding: .8rem 1rem; }
.status-card .motivo p { margin: .25rem 0 0; color: var(--bad); }
.admin-box { border-color: #c9d6e6; background: #fbfdff; }
.admin-box h2 { margin: 0; }
.danger-zone { margin: -.5rem 0 1.25rem; text-align: right; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2c1bb; }
.btn.danger:hover { background: var(--bad-soft); }
.nums { columns: 2; margin: 0 0 1rem; padding-left: 1.1rem; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; }
.kv dd { margin: 0; }
.files { list-style: none; padding: 0; margin: 0 0 1rem; }
.files li { padding: .5rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.files .muted { font-size: .82rem; }
.upload summary { list-style: none; display: inline-flex; }
.upload summary::-webkit-details-marker { display: none; }
.upload form { margin-top: 1rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.1rem 1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.43rem; top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline p { margin: .35rem 0; }

/* autoatendimento */
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f4f8; padding: .1rem .4rem; border-radius: 5px; font-size: .88rem; }
.kv dd .btn { margin-left: .3rem; }
.howto { margin-top: 1rem; }
.steps-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.steps-list li { margin-bottom: .35rem; }
.steps ol { margin: .5rem 0 0; padding-left: 1.2rem; }
label.check span { font-weight: 400; }
.howto summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.howto ol { margin: .6rem 0 0; padding-left: 1.2rem; }
.qr-box { display: grid; place-items: center; min-height: 240px; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
label.check input { width: auto; }
.inline-input { display: flex; gap: .5rem; }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { min-width: 220px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
h3 { font-size: .95rem; }

/* contratação de números */
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.num-opt { flex-direction: row; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.num-opt input { width: auto; }
.num-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.termos { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; max-height: 220px; overflow: auto; }
.cancel-did summary { list-style: none; display: inline-flex; }
.cancel-did summary::-webkit-details-marker { display: none; }
.cancel-did[open] form { margin-top: .5rem; text-align: left; min-width: 220px; }

/* URA */
.horario .iv { align-items: center; }
.horario .iv input { width: auto; }
.ura-opts th { width: 130px; text-transform: none; font-size: .88rem; letter-spacing: 0; color: var(--text); }
.ura-opts td { display: flex; gap: .5rem; }
.ura-opts select { max-width: 360px; }
.ura-num { max-width: 200px; }
.audio-box { border: 1px solid var(--line); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; gap: .8rem; }
.audio-box audio { width: 100%; }
.site-foot { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; text-align: center; }
.auth-foot { margin: 1.25rem 0 0; text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.5; }

/* seleção de números em lista */
.num-picker .filters { padding: 0; border: 0; margin-bottom: .75rem; }
.np-lista { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.np-lista table th { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
.np-lista td:first-child, .np-lista th:first-child { width: 36px; text-align: center; }
.np-lista input[type=checkbox] { width: auto; }
.np-lista tbody tr:has(input:checked) { background: var(--brand-soft); }
.np-vazio { padding: 1rem; margin: 0; }

/* URA: números */
.empty-hint { background: #f8fafc; border: 1px dashed #cfd8e3; border-radius: 8px; padding: .9rem 1rem; color: var(--muted); }
.num-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.num-chips li { display: flex; align-items: center; gap: .6rem; background: var(--good-soft); border: 1px solid #b7e2c8; border-radius: 999px; padding: .3rem .4rem .3rem .9rem; }
.num-chips .chip-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.num-chips form { margin: 0; }
.num-chips .btn { border-radius: 999px; }
h3.sub { margin: 1.5rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.np-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .75rem; padding: .75rem 0 0; background: var(--card); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* campo digitável para listas longas */
.combo { position: relative; flex: 1; min-width: 200px; }
.combo-native { display: none !important; }
.combo-input { width: 100%; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.combo-list { position: fixed; z-index: 50; max-height: 300px; overflow: auto; background: #fff; color: var(--text);
  border: 1px solid #cfd8e3; border-radius: 8px; box-shadow: 0 10px 25px rgba(15,28,46,.15); font-weight: 400; }
.combo-group { padding: .35rem .7rem .2rem; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: #f8fafc; position: sticky; top: 0; }
.combo-opt { padding: .45rem .7rem; cursor: pointer; font-size: .9rem; color: var(--text); }
.combo-opt:hover, .combo-opt.hl { background: var(--brand-soft); }
.combo-opt.sel { font-weight: 700; }
.combo-empty { padding: .6rem .7rem; color: var(--muted); font-size: .88rem; }
.inline-form .combo, .ura-opts .combo { max-width: 360px; }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: linear-gradient(160deg, #0f1c2e 0%, #0959ef 100%); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 14px; padding: 2rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.brand.big { padding: 0 0 1rem; }
.brand.big strong { color: var(--text); font-size: 1.15rem; }
.brand.big small { color: var(--muted); opacity: 1; }
.auth-card > .muted { margin: 0 0 1.25rem; }

/* PIX */
dialog { border: 0; border-radius: 14px; padding: 1.5rem; width: min(420px, 92vw); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(15,28,46,.55); }
#pix-qr { display: grid; place-items: center; margin: 1rem 0; min-height: 220px; }
#pix-code { font-family: ui-monospace, monospace; font-size: .78rem; margin-bottom: 1rem; resize: none; }

/* mobile */
@media (max-width: 900px) {
  .side { position: fixed; left: -260px; z-index: 20; transition: left .2s; }
  .side.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-btn { display: block; }
  .top { padding: .9rem 1rem; }
  .content { padding: 1rem; }
  .grid2, .grid3, .form.grid2, .grid-addr { grid-template-columns: 1fr; }
  .grid-addr > label { grid-column: auto !important; }
  .nums { columns: 1; }
  .table-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .card { padding: 1rem; }
}

/* administrador */
form.inline { display: inline; margin: 0; }
.filters .grow { flex: 3 1 320px; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.imp-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: #fff7e0; border: 1px solid #f0c987; color: #7a5200; border-radius: 8px; padding: .6rem 1rem; margin-bottom: 1rem; }

/* painéis (gráficos) */
.tabs-info { margin-left: auto; align-self: center; font-size: .85rem; padding-right: .25rem; }
.viz svg { display: block; overflow: visible; font-family: inherit; }
.viz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .84rem; color: var(--muted); margin-bottom: .4rem; }
.viz-legend i, .viz-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.viz-tip { position: fixed; z-index: 60; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; box-shadow: 0 8px 20px rgba(15,28,46,.15); font-size: .84rem; color: var(--text); max-width: 280px; }
.viz-tip strong { display: block; margin-bottom: .2rem; }
.viz-tip .muted { margin-top: .2rem; }
.viz-data { margin-top: .5rem; font-size: .84rem; }
.viz-data summary { cursor: pointer; color: var(--muted); }
.viz-data table { font-size: .82rem; }
.viz-ramp { display: flex; align-items: center; gap: 3px; font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.viz-ramp i { width: 22px; height: 10px; border-radius: 2px; }
.viz-ramp span { margin: 0 .4rem; }
.hbars { display: flex; flex-direction: column; gap: .45rem; }
.hb-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: .6rem; font-size: .88rem; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { background: #f1f4f8; border-radius: 4px; height: 12px; }
.hb-b { display: block; height: 12px; border-radius: 0 4px 4px 0; }
.hb-v { font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 4.5rem; text-align: right; }
.barcell { min-width: 160px; white-space: nowrap; }
.inbar { display: inline-block; height: 10px; border-radius: 0 4px 4px 0; background: #2a78d6; vertical-align: middle; max-width: 110px; min-width: 2px; }
.grid2 > .card { min-width: 0; }
.vrow { margin-bottom: 1.25rem; }
.grid2.vrow + .card { margin-top: 0; }
@media (max-width: 900px) { .tabs { flex-wrap: wrap; } .tabs-info { flex-basis: 100%; margin: .3rem 0 0; } }

/* condomínio */
.cond-busca { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.cond-busca input#cond-q { flex: 1 1 320px; font-size: 1.05rem; padding: .7rem .9rem; }
.cond-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.cond-un { display: flex; flex-direction: column; gap: .1rem; border: 1px solid var(--line); border-left: 4px solid #22c55e; border-radius: 8px; padding: .55rem .7rem; color: var(--text); background: #fff; }
.cond-un:hover { border-color: var(--brand); text-decoration: none; background: var(--brand-soft); }
.cond-un.off { border-left-color: #cbd5e1; background: #fafbfc; }
.cond-un .cu-ap { font-weight: 700; font-size: 1.05rem; }
.cond-un .cu-disc { font-variant-numeric: tabular-nums; color: var(--brand-2); font-weight: 600; font-size: .9rem; }
.cond-un .cu-st { font-size: .8rem; color: var(--muted); }
.cond-un .cu-st .dot { width: 7px; height: 7px; margin-right: .3rem; }
.cond-un .cu-mor { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cond-regs li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.big-num { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--brand-2); }
.ideias-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.ideias-grid > div { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; background: #fbfcfe; }
.ideias-grid h3 { font-size: 1rem; margin-bottom: .4rem; }
.ideias-grid p { margin: 0; color: #374151; font-size: .92rem; }
[hidden] { display: none !important; }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stat { padding: .75rem .85rem; }
  .stat strong { font-size: 1.4rem; }
  .cond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cond-un .cu-obs { font-size: .78rem; color: var(--warn); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .delta { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.stat .delta.good { color: var(--good); }
.stat .delta.bad { color: var(--bad); }

/* impressão (lista da portaria, relatórios) */
@media print {
  body { background: #fff; font-size: 11px; }
  .side, .top, .filters, .tabs, .site-foot, .imp-bar, .alert, .cond-busca, .stats, .btn, .viz-data, form { display: none !important; }
  .shell, .main { display: block; }
  .content { padding: 0; }
  .card { border: 0; padding: 0; margin: 0 0 .6rem; break-inside: avoid; }
  .cond-grid { grid-template-columns: repeat(6, 1fr); gap: .25rem; }
  .cond-un { padding: .25rem .4rem; border-left-width: 2px; }
  .cond-un .cu-st { display: none; }
  a { color: inherit; }
}
.print-only { display: none; }
@media print {
  .print-only { display: block; margin-bottom: .5rem; }
  .stats { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
  .stat { padding: .4rem .6rem; }
  .grid2 { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .card { border: 1px solid #ddd; padding: .5rem; }
  .viz-tip { display: none; }
}
.exemplo { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: .7rem 1rem; font-size: .88rem; overflow-x: auto; }
.code-input { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.big-key { font-size: 1.05rem; letter-spacing: .05em; word-break: break-all; }
tr.row-alert td { background: var(--bad-soft); }

/* Call center em tempo real */
.cc-live { border: 1px solid var(--line); border-radius: var(--radius); background: #fafcff; padding: 1rem 1rem .2rem; margin-bottom: 1.2rem; }
.cc-live.stale { opacity: .7; }
.live-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.live-head h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.live-head .btn { margin-left: auto; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(30,138,76,.5); animation: pulse 2s infinite; }
.cc-live.stale .pulse { background: var(--muted); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(30,138,76,0); } 100% { box-shadow: 0 0 0 0 rgba(30,138,76,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
b.late { color: var(--bad); }
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; }
.ag-grid .ag { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .65rem; display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; align-items: center; background: var(--card); }
.ag-grid .ag small { grid-column: 2; color: var(--muted); font-size: .8rem; }
.ag-grid .ag .dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa6b8; }
.ag-grid .ag.livre .dot { background: var(--good); }
.ag-grid .ag.ligacao .dot { background: var(--brand); }
.ag-grid .ag.tocando .dot { background: var(--warn); }
.ag-grid .ag.pausa .dot { background: var(--warn); }
.ag-grid .ag.offline { opacity: .6; }
.section-title { font-size: 1.05rem; margin: 1.4rem 0 .6rem; color: var(--muted); font-weight: 600; }
ul.fila-nums { margin: 0; }
ul.fila-nums li { padding: .1rem 0; }
@media print { .cc-live { display: none; } }

/* Início */
.section-title.first { margin-top: 0; }
ul.attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
ul.attn li { border-left: 3px solid var(--info); background: var(--info-soft); border-radius: 6px; padding: .5rem .7rem; }
ul.attn li.warn { border-left-color: var(--warn); background: var(--warn-soft); }
ul.attn li a { color: var(--text); display: block; }
ul.attn li.warn a::before { content: "⚠ "; color: var(--warn); }
.ok-line { color: var(--good); font-weight: 600; margin: .3rem 0; }
ul.shortcuts li { padding: .3rem 0; border-bottom: 1px solid var(--line); }
ul.shortcuts li:last-child { border-bottom: 0; }
@media (min-width: 1200px) { .cc-live .stats { grid-template-columns: repeat(6, 1fr); } }

.qr-center { display: flex; justify-content: center; padding: .5rem 0 1rem; min-height: 120px; }
.qr-center img, .qr-center canvas { background: #fff; padding: 10px; border-radius: 8px; }

/* Início por tipo de login */
.serv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.serv { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--text); display: flex; flex-direction: column; gap: .35rem; }
.serv:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(15,28,46,.08); }
.serv-pabx { border-top-color: #2a78d6; } .serv-linha { border-top-color: #1baf7a; } .serv-condominio { border-top-color: #eb6834; } .serv-0800 { border-top-color: #6b778a; }
.serv-h strong { display: block; font-size: 1.05rem; } .serv-h small { color: var(--muted); }
.serv-n { font-size: .95rem; } .serv-n b { font-size: 1.5rem; }
.serv-l { font-size: .9rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: .2rem .65rem; font-size: .85rem; background: var(--bad-soft); color: var(--text); }
.linhas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.linha { border-left: 4px solid var(--good); }
.linha.off { border-left-color: var(--bad); }
.linha-num { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.linha-st { display: flex; align-items: center; gap: .4rem; font-weight: 600; margin: .2rem 0 .4rem; }
fieldset.plain-fs { border: 0; padding: 0; margin: 0; min-width: 0; display: contents; }
.card.narrow { max-width: 520px; }

/* Menu: cliente escolhido pela revenda; botão de ajuda; linha de contexto no lugar das antigas abas */
.ctx-conta { display: grid; grid-template-columns: 1fr auto; align-items: center; background: rgba(255,255,255,.08); border-radius: 8px; padding: .45rem .7rem; margin-bottom: .4rem; color: #fff; }
.ctx-conta small { grid-column: 1; color: var(--side-text); font-size: .75rem; }
.ctx-conta strong { grid-column: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-conta a { grid-column: 2; grid-row: 1 / 3; color: var(--side-text); padding: .2rem .45rem; border-radius: 6px; }
.ctx-conta a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
header.top { display: flex; align-items: center; }
.help-btn { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--brand); background: var(--card); flex-shrink: 0; }
.help-btn:hover { background: var(--brand-soft); text-decoration: none; }
.ctx-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; color: var(--muted); margin: 0 0 1rem; }
.inline-filter { margin-bottom: .8rem; }
.inline-filter label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.inline-filter select { width: auto; }

/* Ajuda */
.ajuda { display: grid; grid-template-columns: 250px 1fr; gap: 1.2rem; align-items: start; }
.ajuda-idx { position: sticky; top: 1rem; padding: .8rem; }
.ajuda-idx input { width: 100%; margin-bottom: .6rem; }
.ajuda-idx nav { display: flex; flex-direction: column; }
.ajuda-idx nav a { padding: .3rem .4rem; border-radius: 6px; font-size: .92rem; color: var(--text); }
.ajuda-idx nav a:hover { background: var(--brand-soft); text-decoration: none; }
.aj-sec { scroll-margin-top: 1rem; }
.aj-sec.aj-alvo { box-shadow: 0 0 0 2px var(--brand); }
.aj-sec h2 { margin-top: 0; }
.aj-sec ul { padding-left: 1.2rem; } .aj-sec li { margin: .3rem 0; }
details.faq { border-top: 1px solid var(--line); padding: .5rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: .4rem 0 0; color: var(--muted); }
.suporte { border-left: 4px solid var(--brand); }
@media (max-width: 900px) { .ajuda { grid-template-columns: 1fr; } .ajuda-idx { position: static; } }

/* Marca própria: prévia */
.cor-row { display: flex; align-items: center; gap: .6rem; }
.cor-row input[type=color] { width: 56px; height: 38px; padding: 2px; }
.marca-prev { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-height: 220px; }
.pv-side { background: var(--side); padding: .8rem; display: flex; flex-direction: column; gap: .3rem; }
.pv-side .brand { padding: 0 0 .6rem; }
.pv-item { color: var(--side-text); padding: .4rem .6rem; border-radius: 6px; font-size: .9rem; }
.pv-item.on { background: var(--pv); color: #fff; }
.pv-main { padding: 1rem; }
.pv-main a { color: var(--pv); font-weight: 600; }
.pv-btn { background: var(--pv); color: #fff; border: 0; border-radius: 8px; padding: .55rem 1rem; font: inherit; font-weight: 700; }

/* Botões das lojas do app C3 Phone */
.app-lojas { display: flex; gap: .5rem; flex-wrap: wrap; margin: .4rem 0; }
.app-lojas a { display: inline-flex; align-items: center; gap: .45rem; background: #111; color: #fff; border-radius: 8px; padding: .35rem .7rem .35rem .55rem; line-height: 1.1; border: 1px solid #111; }
.app-lojas a:hover { text-decoration: none; background: #2a2a2a; }
.app-lojas svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.app-lojas span { display: flex; flex-direction: column; font-weight: 700; font-size: .9rem; }
.app-lojas small { font-size: .65rem; font-weight: 400; opacity: .85; }
.side-app { padding: .6rem .9rem .2rem; border-top: 1px solid rgba(255,255,255,.08); }
.side-app > small { color: var(--side-text); font-size: .75rem; }
.app-lojas.escuro { gap: .35rem; }
.app-lojas.escuro a { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); padding: .3rem .55rem; flex: 1; min-width: 0; }
.app-lojas.escuro a:hover { background: rgba(255,255,255,.16); }
.app-lojas.escuro span { font-size: .8rem; }
.auth-app { text-align: center; margin-top: 1rem; }
.auth-app > small { color: var(--muted); }
.auth-app .app-lojas { justify-content: center; }
.steps-list .app-lojas { margin-top: .4rem; }
.app-lojas.escuro small { display: none; } .app-lojas.escuro span { white-space: nowrap; }

/* QR Code de download do app */
.app-bloco { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.qr-app { margin: .3rem 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.qr-app > div { background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--line); line-height: 0; }
.qr-app img, .qr-app canvas { width: 132px; height: 132px; }
.qr-app figcaption { font-size: .75rem; color: var(--muted); text-align: center; }
.app-qr-btn { flex: 0 0 auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #fff; border-radius: 8px; padding: .3rem .45rem; cursor: pointer; display: grid; place-items: center; }
.app-qr-btn:hover { background: rgba(255,255,255,.16); }
.app-qr-btn svg { width: 20px; height: 20px; fill: currentColor; }
.app-qr-dlg .app-bloco { flex-direction: column; }
.auth-app .app-bloco, .app-pagina .app-bloco { justify-content: center; flex-direction: column; }
.app-pagina h1 { margin: .8rem 0 .2rem; font-size: 1.4rem; }
.app-pagina { text-align: center; }
.app-pagina .brand { justify-content: center; }
/* no celular não faz sentido apontar a câmera para a própria tela */
@media (max-width: 700px) { .qr-app { display: none; } }
/* botão "QR Code" na versão clara (login) */
.app-lojas.com-botao .app-qr-btn { background: var(--card); color: var(--text); border: 1px solid var(--line); gap: .4rem; display: inline-flex; align-items: center; padding: .35rem .7rem; font: inherit; font-weight: 700; font-size: .9rem; }
.app-lojas.com-botao .app-qr-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--card); }
.app-lojas.com-botao .app-qr-btn svg { width: 18px; height: 18px; }
@media (max-width: 700px) { .app-lojas.com-botao .app-qr-btn { display: none; } }
.app-qr-dlg .actions, #qr-dlg .actions { justify-content: center; }
.app-qr-dlg h2, #qr-dlg h2 { text-align: center; }
.tbl-filtro { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.tbl-filtro input[type=text], .tbl-filtro #ramais-q { flex: 1; min-width: 220px; }
.app-lojas.escuro a { justify-content: center; } .app-lojas.escuro span { text-align: center; }
.inline-ips { display: flex; gap: .4rem; } .inline-ips input { min-width: 160px; }
.chip.livre { background: var(--good-soft); }
.inline-ips input { width: 150px; min-width: 0; }
.grid-addr .combo, .grid2 .combo, .grid3 .combo { min-width: 0; }
.dom-st { border-left: 4px solid var(--info); background: var(--info-soft); padding: .5rem .7rem; border-radius: 6px; font-size: .9rem; }
.dom-st.ativo { border-color: var(--good); background: var(--good-soft); } .dom-st.erro { border-color: var(--bad); background: var(--bad-soft); }

/* Portal C3 Móvel (c3movel.com.br) */
.mv .auth-card .mv-brand strong { color: var(--text); }
.mv .auth-card .mv-brand { padding: 0 0 1rem; }
.mv-top { background: var(--side); color: var(--side-text); }
.mv-top-in { max-width: 760px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mv-top .mv-brand { padding: 1rem 0 .6rem; min-width: 0; }
.mv-top .mv-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-top .btn.ghost { color: var(--side-text); border-color: rgba(255,255,255,.25); background: transparent; }
.mv-tabs { justify-content: flex-start; gap: .25rem; }
.mv-tabs a { color: var(--side-text); padding: .6rem .9rem; border-bottom: 3px solid transparent; font-weight: 600; }
.mv-tabs a:hover { color: #fff; text-decoration: none; }
.mv-tabs a.on { color: #fff; border-bottom-color: var(--brand); }
.mv-main { max-width: 760px; margin: 0 auto; padding: 1.25rem 16px 2rem; }
.mv-linha .card-head h2 { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.mv-linha p { margin: 0 0 .5rem; }
.mv-franquia { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .75rem 0; }
.mv-franquia div { background: var(--brand-soft); border-radius: 8px; padding: .6rem .7rem; }
.mv-franquia span { display: block; font-size: .78rem; color: var(--muted); }
.mv-franquia strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.mv-rec summary, .mv-cancel summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: .25rem 0; }
.mv-rec ul, .mv-cancel ul { margin: .4rem 0; padding-left: 1.1rem; }
.mv-franquia .mv-saldo { background: var(--brand); }
.mv-franquia .mv-saldo span, .mv-franquia .mv-saldo strong { color: #fff; }
@media (max-width: 480px) { .mv-franquia { grid-template-columns: 1fr 1fr; } .mv-franquia .mv-saldo { grid-column: 1 / -1; } }
.mv .auth-card label small { font-weight: 400; display: block; margin-top: .2rem; }
