/* ═══════════════════════════════════════════════════════════════
   BRITO TV — PAINEL
   Mesma identidade do Portal Brito (verde #2e8b57, Outfit + Plus Jakarta Sans)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --tv-verde: #2e8b57;
    --tv-verde-hover: #256f47;
    --tv-verde-escuro: #1e6b3e;
    --tv-verde-claro: #eef7f1;
    --tv-verde-borda: #d9efe2;
    --tv-fundo: #f6f8f7;
    --tv-superficie: #ffffff;
    --tv-borda: #e5e9e7;
    --tv-texto: #1f2a24;
    --tv-texto-suave: #6b7671;
    --tv-erro: #dc2626;
    --tv-sidebar: 252px;
    --tv-raio: 12px;
    --tv-sombra: 0 1px 2px rgba(16, 24, 20, .04), 0 6px 20px rgba(16, 24, 20, .05);
    --bs-primary: #2e8b57;
    --bs-primary-rgb: 46, 139, 87;
    --bs-link-color: #2e8b57;
    --bs-link-color-rgb: 46, 139, 87;
    --bs-link-hover-color: #1e6b3e;
    --bs-body-font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    --bs-body-font-size: .875rem;
    /* Escala mobile (usada nas regras até 767px) */
    --tv-fs-base: 14px;
    --tv-fs-secundario: 13px;
    --tv-fs-pequeno: 12px;
    --tv-fs-titulo: 21px;
    --tv-fs-titulo-card: 15px;
    --tv-btn-altura: 40px;
    --tv-btn-altura-sm: 32px;
    --tv-btn-fs: 14px;
    --tv-btn-px: 14px;
    --tv-btn-raio: 10px;
    --tv-campo-altura: 40px;
    --tv-ico: 16px;
    --tv-ico-sm: 14px;
    --tv-ico-destaque: 20px;
    --tv-gap-ico: 6px;
    --tv-esp-1: 4px;
    --tv-esp-2: 8px;
    --tv-esp-3: 12px;
    --tv-esp-4: 16px;
}

[data-bs-theme="dark"] {
    --tv-verde: #3aa36a;
    --tv-verde-hover: #4ab97b;
    --tv-verde-escuro: #6fd09a;
    --tv-verde-claro: rgba(58, 163, 106, .14);
    --tv-verde-borda: rgba(58, 163, 106, .3);
    --tv-fundo: #0f1115;
    --tv-superficie: #171a20;
    --tv-borda: #262b33;
    --tv-texto: #e6e8eb;
    --tv-texto-suave: #9aa1ab;
    --tv-sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
    --bs-body-bg: #0f1115;
    --bs-body-color: #e6e8eb;
    --bs-border-color: #262b33;
    --bs-secondary-bg: #1e222a;
    --bs-tertiary-bg: #171a20;
}

body { background: var(--tv-fundo); color: var(--tv-texto); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, .tv-titulo, .modal-title { font-family: "Outfit", sans-serif; }
a { text-decoration: none; }

/* ---------- Botões no verde da Brito ---------- */
.btn-primary, .btn-success { --bs-btn-bg: var(--tv-verde); --bs-btn-border-color: var(--tv-verde); --bs-btn-hover-bg: var(--tv-verde-hover); --bs-btn-hover-border-color: var(--tv-verde-hover); --bs-btn-active-bg: var(--tv-verde-escuro); --bs-btn-active-border-color: var(--tv-verde-escuro); --bs-btn-disabled-bg: var(--tv-verde); --bs-btn-disabled-border-color: var(--tv-verde); }
.btn-outline-primary { --bs-btn-color: var(--tv-verde); --bs-btn-border-color: var(--tv-verde); --bs-btn-hover-bg: var(--tv-verde); --bs-btn-hover-border-color: var(--tv-verde); --bs-btn-active-bg: var(--tv-verde-escuro); }
.btn { border-radius: 9px; font-weight: 500; }
.btn-icone { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.form-control, .form-select { border-radius: 9px; border-color: var(--tv-borda); }
.form-control:focus, .form-select:focus { border-color: var(--tv-verde); box-shadow: 0 0 0 .2rem rgba(46, 139, 87, .15); }
.ts-wrapper.focus .ts-control { box-shadow: 0 0 0 .2rem rgba(46, 139, 87, .15); }
.form-check-input:checked { background-color: var(--tv-verde); border-color: var(--tv-verde); }
.form-label { font-weight: 600; font-size: .8rem; color: var(--tv-texto); margin-bottom: .35rem; }
.nav-pills .nav-link.active { background: var(--tv-superficie); color: var(--tv-verde); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.nav-pills .nav-link { color: var(--tv-texto-suave); font-weight: 500; border-radius: 9px; }

/* ---------- Sidebar ---------- */
.tv-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--tv-sidebar); background: var(--tv-superficie); border-right: 1px solid var(--tv-borda); display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease; }
.tv-sidebar__topo { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--tv-borda); }
.tv-marca { display: flex; align-items: center; gap: 10px; color: var(--tv-texto); min-width: 0; }
.tv-marca__icone { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--tv-verde), #1a5c38); color: #fff; font-size: 20px; flex: 0 0 40px; }
.tv-marca__texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tv-marca__texto strong { font-family: "Outfit", sans-serif; font-size: 17px; }
.tv-marca__texto small { color: var(--tv-texto-suave); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.tv-sidebar__fechar { border: 0; background: none; font-size: 18px; color: var(--tv-texto-suave); }
.tv-menu { flex: 1; overflow-y: auto; padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.tv-menu__link { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 9px; color: var(--tv-texto); font-size: 13.5px; border: 0; background: none; width: 100%; text-align: left; position: relative; }
.tv-menu__link > i:first-child { font-size: 16px; width: 18px; color: var(--tv-texto-suave); }
.tv-menu__link:hover { background: var(--tv-verde-claro); color: var(--tv-verde); }
.tv-menu__link:hover > i:first-child, .tv-menu__link.active > i:first-child { color: var(--tv-verde); }
.tv-menu__link.active { background: var(--tv-verde-claro); color: var(--tv-verde); font-weight: 600; }
.tv-menu__link.active::before { content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; background: var(--tv-verde); border-radius: 0 3px 3px 0; }
.tv-menu__seta { margin-left: auto; font-size: 11px; transition: transform .2s; }
.tv-menu__grupo:not(.collapsed) .tv-menu__seta { transform: rotate(180deg); }
.tv-submenu { display: flex; flex-direction: column; margin: 2px 0 6px 21px; padding-left: 14px; border-left: 1px solid var(--tv-borda); }
.tv-submenu a { padding: 7px 10px; border-radius: 8px; color: var(--tv-texto-suave); font-size: 13px; }
.tv-submenu a:hover, .tv-submenu a.active { color: var(--tv-verde); background: var(--tv-verde-claro); }
.tv-submenu a.active { font-weight: 600; }
.tv-menu__titulo { margin: 16px 12px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--tv-texto-suave); }
.tv-menu__fav { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 8px; color: var(--tv-texto); font-size: 12.5px; }
.tv-menu__fav:hover { background: var(--tv-verde-claro); }
.tv-menu__fav span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-sidebar__rodape { border-top: 1px solid var(--tv-borda); padding: 12px; }
.tv-usuario { display: flex; align-items: center; gap: 10px; color: var(--tv-texto); padding: 4px; border-radius: 9px; }
.tv-usuario img, .tv-usuario__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 34px; }
.tv-usuario__avatar { display: grid; place-items: center; background: var(--tv-verde-claro); color: var(--tv-verde); font-weight: 700; }
.tv-usuario__dados { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tv-usuario__dados strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-usuario__dados small { font-size: 11px; color: var(--tv-texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.tv-sidebar__botoes { display: flex; gap: 6px; margin-top: 8px; }
.tv-sidebar__botoes a, .tv-sidebar__botoes button { flex: 1; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--tv-borda); background: none; color: var(--tv-texto-suave); }
.tv-sidebar__botoes a:hover, .tv-sidebar__botoes button:hover { background: var(--tv-verde-claro); color: var(--tv-verde); }
.tv-sidebar__fundo { display: none; }

/* ---------- Área principal ---------- */
.tv-main { margin-left: var(--tv-sidebar); min-height: 100vh; }
.tv-topo { display: flex; align-items: center; gap: 16px; padding: 18px 36px; background: var(--tv-superficie); border-bottom: 1px solid var(--tv-borda); }
.tv-topo__acoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tv-migalhas { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tv-texto-suave); }
.tv-migalhas a { color: var(--tv-texto); font-weight: 500; }
.tv-migalhas em { font-style: normal; }
.tv-migalhas__voltar { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--tv-borda); border-radius: 6px; font-size: 10px; }
.tv-titulo { font-size: 22px; font-weight: 600; margin: 2px 0 0; }
.tv-conteudo { padding: 28px 36px 60px; }
.tv-impersonar { background: #fff7e0; color: #7a5a00; padding: 8px 36px; font-size: 13px; border-bottom: 1px solid #f2e2a8; }
.tv-impersonar a { color: #7a5a00; font-weight: 700; text-decoration: underline; margin-left: 6px; }
[data-bs-theme="dark"] .tv-impersonar { background: #2b2410; color: #f5d77a; border-color: #4a3d14; }
[data-bs-theme="dark"] .tv-impersonar a { color: #f5d77a; }
.tv-impersonar__voltar { background: none; border: 0; padding: 0; margin-left: 6px; color: #7a5a00; font-weight: 700; text-decoration: underline; cursor: pointer; }
[data-bs-theme="dark"] .tv-impersonar__voltar { color: #f5d77a; }

/* ---------- Cartões ---------- */
.tv-card { background: var(--tv-superficie); border: 1px solid var(--tv-borda); border-radius: var(--tv-raio); box-shadow: var(--tv-sombra); }
.tv-card__corpo { padding: 20px; }
.tv-card__titulo { font-family: "Outfit", sans-serif; font-weight: 600; font-size: 15px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.tv-kpi { display: flex; flex-direction: column; gap: 4px; }
.tv-kpi strong { font-family: "Outfit", sans-serif; font-size: 28px; line-height: 1; }
.tv-kpi small { color: var(--tv-texto-suave); font-size: 12px; }
.tv-kpi__icone { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--tv-verde-claro); color: var(--tv-verde); }
.tv-barra { height: 8px; border-radius: 99px; background: var(--tv-borda); overflow: hidden; }
.tv-barra span { display: block; height: 100%; background: var(--tv-verde); border-radius: 99px; }

/* ---------- Tabelas ---------- */
.tv-tabela { margin: 0; --bs-table-bg: transparent; }
.tv-tabela thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--tv-texto-suave); font-weight: 600; background: var(--tv-fundo); border-bottom: 1px solid var(--tv-borda); padding: 12px 16px; white-space: nowrap; }
.tv-tabela td { padding: 12px 16px; vertical-align: middle; border-color: var(--tv-borda); }
.tv-tabela tbody tr:hover { background: var(--tv-verde-claro); }
.tv-thumb { width: 52px; height: 36px; border-radius: 7px; object-fit: cover; background: var(--tv-fundo); border: 1px solid var(--tv-borda); display: inline-grid; place-items: center; color: var(--tv-texto-suave); flex: 0 0 52px; overflow: hidden; }
.tv-thumb--redonda { width: 40px; height: 40px; border-radius: 50%; flex-basis: 40px; }
.tv-nome-celula { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tv-nome-celula strong { display: block; }
.tv-nome-celula small { color: var(--tv-texto-suave); }
.tv-vazio { text-align: center; padding: 56px 20px; color: var(--tv-texto-suave); }
.tv-vazio i { font-size: 40px; display: block; margin-bottom: 10px; opacity: .5; }

/* ---------- Status ---------- */
.tv-ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; }
.tv-ponto--on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.tv-ponto--off { background: #ef4444; }
.tv-badge-on { background: rgba(34, 197, 94, .12); color: #15803d; font-weight: 600; }
.tv-badge-off { background: rgba(239, 68, 68, .1); color: #b91c1c; font-weight: 600; }
.tv-filtros { display: flex; flex-wrap: wrap; gap: .5rem; }
.tv-filtros .btn { border-radius: 99px; }
.tv-filtros .btn.active { background: var(--tv-verde); color: #fff; border-color: var(--tv-verde); }

/* ---------- Modais ---------- */
.modal-content { border: 0; border-radius: 16px; }
.modal-header { border-bottom: 1px solid var(--tv-borda); }
.modal-footer { border-top: 1px solid var(--tv-borda); }
.tv-abas { background: var(--tv-fundo); padding: 4px; border-radius: 11px; margin-bottom: 18px; }
.tv-abas .nav-link { font-size: 13px; padding: 8px 10px; }
.tv-secao { font-family: "Outfit", sans-serif; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tv-escolha { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.tv-escolha__item { position: relative; border: 1.5px solid var(--tv-borda); border-radius: 12px; padding: 18px 10px; text-align: center; cursor: pointer; background: var(--tv-superficie); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tv-texto); font-weight: 500; transition: .15s; }
.tv-escolha__item i { font-size: 26px; color: var(--tv-texto-suave); }
.tv-escolha__item:hover, .tv-escolha input:checked + .tv-escolha__item, .tv-escolha__item.ativo { border-color: var(--tv-verde); background: var(--tv-verde-claro); color: var(--tv-verde); }
.tv-escolha input:checked + .tv-escolha__item i, .tv-escolha__item:hover i { color: var(--tv-verde); }
.tv-escolha input { position: absolute; opacity: 0; pointer-events: none; }
.tv-escolha__item small { color: var(--tv-texto-suave); font-weight: 400; font-size: 11px; }

/* ---------- Upload ---------- */
.tv-upload { display: inline-flex; width: 140px; height: 100px; border: 1.5px dashed #b9c3be; border-radius: 12px; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; background: var(--tv-fundo); position: relative; }
.tv-upload:hover { border-color: var(--tv-verde); }
.tv-upload img { width: 100%; height: 100%; object-fit: cover; }
.tv-upload__vazio { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--tv-texto-suave); }
.tv-upload__vazio i { font-size: 22px; }
.tv-arquivo { border: 1.5px dashed #b9c3be; border-radius: 12px; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 14px; cursor: pointer; background: var(--tv-fundo); color: var(--tv-texto-suave); font-size: 12px; position: relative; overflow: hidden; }
.tv-arquivo:hover, .tv-arquivo.arrastando { border-color: var(--tv-verde); background: var(--tv-verde-claro); }
.tv-arquivo i { font-size: 34px; }
.tv-arquivo video, .tv-arquivo img { max-width: 100%; max-height: 140px; border-radius: 8px; }
.tv-arquivo--vertical { min-height: 150px; }

/* ---------- Playlist ---------- */
.tv-playlist__item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--tv-borda); background: var(--tv-superficie); }
.tv-playlist__item:last-child { border-bottom: 0; }
.tv-playlist__alca { cursor: grab; color: var(--tv-texto-suave); font-size: 18px; }
.tv-playlist__ordem { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--tv-fundo); color: var(--tv-texto-suave); flex: 0 0 26px; }
.tv-playlist__item.inativo { opacity: .5; }
.tv-playlist__fantasma { opacity: .4; background: var(--tv-verde-claro); }
.tv-tipo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--tv-fundo); color: var(--tv-texto-suave); border: 1px solid var(--tv-borda); }
.tv-tipo--grupo { background: #f3e8ff; color: #7e22ce; border-color: #e9d5ff; }
.tv-tipo--dinamico { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
[data-bs-theme="dark"] .tv-tipo--grupo { background: rgba(126, 34, 206, .2); color: #d8b4fe; border-color: transparent; }
[data-bs-theme="dark"] .tv-tipo--dinamico { background: rgba(3, 105, 161, .25); color: #7dd3fc; border-color: transparent; }

/* ---------- Pré-visualização da tela ---------- */
.tv-moldura { background: #0b0f0d; border-radius: 16px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.tv-moldura iframe { width: 100%; border: 0; border-radius: 8px; display: block; background: #000; }
.tv-moldura--horizontal iframe { aspect-ratio: 16 / 9; }
.tv-moldura--vertical { max-width: 340px; margin: 0 auto; }
.tv-moldura--vertical iframe { aspect-ratio: 9 / 16; }
.tv-codigo-ativacao { font-family: "Outfit", monospace; font-size: 30px; letter-spacing: .3em; text-transform: uppercase; text-align: center; font-weight: 700; }

/* ---------- Conteúdos dinâmicos ---------- */
.tv-dinamico { overflow: hidden; }
.tv-dinamico__capa { aspect-ratio: 16 / 9; background: #111 center / cover no-repeat; position: relative; display: grid; place-items: center; }
.tv-dinamico__capa i { font-size: 42px; color: rgba(255,255,255,.85); }

/* ---------- Tom Select ---------- */
.ts-wrapper.multi .ts-control > div, .ts-wrapper.multi .ts-control > div.active, .ts-wrapper.multi.disabled .ts-control > div, .ts-wrapper.multi.disabled .ts-control > div.active { background: var(--tv-verde-claro); color: var(--tv-verde); border-radius: 6px; }
.ts-dropdown { border-radius: 10px; z-index: 2000; }
.ts-dropdown .active { background: var(--tv-verde-claro); color: var(--tv-verde); }
[data-bs-theme="dark"] .ts-wrapper .ts-control, [data-bs-theme="dark"] .ts-wrapper.single .ts-control, [data-bs-theme="dark"] .ts-dropdown, [data-bs-theme="dark"] .ts-control input { background: #171a20; color: #e6e8eb; }

.min-w-0 { min-width: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 991.98px) {
    .tv-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.2); }
    body.tv-menu-aberto .tv-sidebar { transform: none; }
    body.tv-menu-aberto .tv-sidebar__fundo { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1030; }
    .tv-main { margin-left: 0; }
    .tv-topo, .tv-conteudo { padding-left: 16px; padding-right: 16px; }
    .tv-topo { flex-wrap: wrap; }
}

@media print {
    body .tv-sidebar, body .tv-topo__acoes, body .tv-impersonar, body .no-print { display: none; }
    .tv-main { margin: 0; }
    .tv-card { box-shadow: none; }
}

/* ---------- Páginas de acesso (esqueci a senha) ---------- */
.tv-acesso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(circle at 20% 10%, #e3f2ea, var(--tv-fundo) 55%); }
.tv-acesso__caixa { width: 100%; max-width: 440px; }

/* ---------- Confirmação e progresso de envio ---------- */
.tv-confirmar__icone { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--tv-verde-claro); color: var(--tv-verde); }
.tv-confirmar__icone--perigo { background: rgba(220, 38, 38, .1); color: #dc2626; }
.tv-progresso { padding: 12px 16px; margin: 0 16px 12px; border: 1px solid var(--tv-borda); border-radius: 10px; background: var(--tv-fundo); }
.tv-progresso .progress { height: 10px; border-radius: 99px; }
form:not(.modal-content) > .tv-progresso { margin: 12px 0; }
.ts-dropdown .no-results { padding: 8px 12px; color: var(--tv-texto-suave); }

/* ---------- Primeiros passos ---------- */
.tv-passos { border-color: var(--tv-verde-borda); background: linear-gradient(180deg, var(--tv-verde-claro), var(--tv-superficie) 60%); }
.tv-passos__lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.tv-passo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--tv-borda); border-radius: 12px; background: var(--tv-superficie); }
.tv-passo strong { display: block; font-size: 13.5px; }
.tv-passo small { display: block; color: var(--tv-texto-suave); font-size: 12px; line-height: 1.35; }
.tv-passo__marca { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 30px; font-weight: 700; font-size: 13px; border: 2px solid var(--tv-borda); color: var(--tv-texto-suave); }
.tv-passo.feito { opacity: .7; }
.tv-passo.feito .tv-passo__marca { background: var(--tv-verde); border-color: var(--tv-verde); color: #fff; }
.tv-passo.feito strong { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }

/* ---------- Lista ordenável (grupos) ---------- */
.tv-ordem { list-style: none; padding: 0; margin: 0; border: 1px solid var(--tv-borda); border-radius: 10px; overflow: hidden; }
.tv-ordem li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--tv-borda); background: var(--tv-superficie); font-size: 13px; }
.tv-ordem li:last-child { border-bottom: 0; }
.tv-ordem .fa-grip-vertical { cursor: grab; color: var(--tv-texto-suave); }
.tv-ordem__n { width: 22px; height: 22px; border-radius: 50%; background: var(--tv-verde-claro); color: var(--tv-verde); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: 0 0 22px; }
.tv-lote [data-tv-lote-lista] { max-height: 180px; overflow: auto; }

/* ---------- Ajustes do tema escuro ---------- */
[data-bs-theme="dark"] .btn-light { --bs-btn-bg: #1e222a; --bs-btn-color: #e6e8eb; --bs-btn-border-color: #262b33; --bs-btn-hover-bg: #262b33; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #3a414d; --bs-btn-active-bg: #262b33; --bs-btn-active-color: #fff; }
[data-bs-theme="dark"] .alert-light { background: #171a20; color: #c3c8cf; --bs-alert-border-color: #262b33; }
[data-bs-theme="dark"] .alert-light.border { --bs-border-color: #262b33; }
[data-bs-theme="dark"] .tv-upload, [data-bs-theme="dark"] .tv-arquivo { border-color: #3a414d; }

/* ---------- Celular: botões de ação mais compactos ---------- */
@media (max-width: 575.98px) {
    .tv-tabela td, .tv-tabela th { padding: 10px 10px; }
    .tv-tabela .btn-icone { width: 30px; height: 30px; }
    .tv-thumb { width: 44px; height: 32px; flex-basis: 44px; }
}

/* ---------- v1.2: Preços e ofertas ---------- */
.tv-passo-precos { height: 100%; border: 1px solid var(--tv-borda); border-radius: 14px; padding: 18px 14px; background: var(--tv-superficie); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tv-passo-precos span { width: 34px; height: 34px; border-radius: 50%; background: var(--tv-verde); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 4px; }
.tv-passo-precos small { color: var(--tv-texto-suave); line-height: 1.35; }
.tv-preco-editavel { display: inline-block; border: 1px dashed transparent; border-radius: 8px; padding: 3px 8px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: text; white-space: nowrap; transition: background .2s, border-color .2s; }
.tv-preco-editavel:hover, .tv-preco-editavel:focus { border-color: var(--tv-verde); background: var(--tv-verde-claro); outline: 0; }
.tv-preco-editavel--oferta { color: #dc2626; }
.tv-preco-editavel.tv-preco-salvo, .tv-preco-editavel.tv-preco-salvo:hover, .tv-preco-editavel.tv-preco-salvo:focus { background: rgba(46, 139, 87, .25); }
.tv-tabela-precos tbody tr[hidden] { display: none; }
.tv-prev-preco { aspect-ratio: 16 / 9; border-radius: 8px; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; font-family: Outfit, sans-serif; }
.tv-prev-preco > strong { font-size: 18px; text-transform: uppercase; border-bottom: 2px solid currentColor; padding-bottom: 4px; }
.tv-prev-preco__corpo { flex: 1; display: flex; gap: 12px; min-height: 0; }
.tv-prev-preco__linhas { flex: 1; display: grid; grid-template-rows: repeat(4, 1fr); font-size: 14px; }
.tv-prev-preco__destaque { display: none; width: 34%; border-radius: 8px; background: rgba(255, 255, 255, .92); color: #111; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.tv-prev-preco--cartaz .tv-prev-preco__destaque { display: flex; }
.tv-prev-preco--cartaz .tv-prev-preco__linhas { font-size: 12px; }
.tv-prev-preco__destaque small { background: #dc2626; color: #fff; font-weight: 800; font-size: 10px; border-radius: 4px; padding: 1px 6px; }
.tv-prev-preco__destaque span { font-weight: 700; font-size: 13px; }
.tv-prev-preco__destaque b { font-size: 20px; font-weight: 900; line-height: 1; }
.tv-prev-preco--colunas .tv-prev-preco__linhas { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 1fr); column-gap: 14px; font-size: 12px; }
.tv-prev-preco__linhas div { display: flex; align-items: center; gap: 6px; }
.tv-prev-preco__linhas em { flex: 1; border-bottom: 2px dotted currentColor; opacity: .35; }
.tv-prev-preco__linhas b { font-weight: 800; }
.tv-prev-preco--oferta > strong { text-align: center; border: 0; font-size: 22px; font-weight: 900; }
.tv-prev-preco__cartazes { flex: 1; display: flex; gap: 8px; }
.tv-prev-preco__cartazes div { flex: 1; background: rgba(255, 255, 255, .9); color: #111; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; padding: 6px; }
.tv-prev-preco__cartazes span { font-weight: 700; font-size: 13px; }
.tv-prev-preco__cartazes s { font-size: 11px; opacity: .7; }
.tv-prev-preco__cartazes b { font-size: 22px; font-weight: 900; line-height: 1; }

/* ---------- v1.2: Chamada de senha ---------- */
.tv-senha-mini { min-width: 64px; height: 48px; padding: 0 10px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-family: Outfit, sans-serif; font-size: 18px; font-variant-numeric: tabular-nums; }
.tv-prev-chamada { aspect-ratio: 16 / 9; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: Outfit, sans-serif; text-align: center; }
.tv-prev-chamada small { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; opacity: .9; font-weight: 600; }
.tv-prev-chamada strong { font-size: 64px; font-weight: 900; line-height: 1; }
.tv-prev-chamada span { font-size: 24px; font-weight: 800; }
.tv-locais { display: flex; flex-wrap: wrap; gap: 6px; }
.tv-locais .btn { min-width: 44px; font-weight: 700; }
.tv-chamador__visor { border-radius: 16px; padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; font-family: Outfit, sans-serif; }
.tv-chamador__visor small { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; opacity: .85; }
.tv-chamador__visor strong { font-size: clamp(48px, 9vw, 96px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; word-break: break-word; }
.tv-chamador__visor strong.nome { font-size: clamp(32px, 5vw, 60px); line-height: 1.1; }
.tv-chamador__visor span { font-size: 22px; font-weight: 700; min-height: 1.3em; }
.tv-chamador__visor.pulsar { animation: tvPulsar .6s ease 2; }
@keyframes tvPulsar { 50% { transform: scale(1.02); filter: brightness(1.15); } }
.tv-chamador__botao { padding-top: 14px; padding-bottom: 14px; font-weight: 700; }
.tv-chamador__botao small { font-size: 12px; opacity: .85; }
.tv-chamador.chamando .tv-chamador__botao { opacity: .65; pointer-events: none; }
.tv-chamador__historico { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; }
.tv-chamador__item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--tv-borda); border-radius: 10px; font-size: 13px; }
.tv-chamador__item b { font-size: 16px; font-variant-numeric: tabular-nums; }
.tv-chamador__item span { color: var(--tv-texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-chamador__item small { color: var(--tv-texto-suave); }
kbd { background: var(--tv-fundo); color: inherit; border: 1px solid var(--tv-borda); box-shadow: 0 1px 0 var(--tv-borda); font-size: 11px; }

/* ---------- v1.2: Monitoramento ---------- */
.tv-saude { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tv-saude > div { border: 1px solid var(--tv-borda); border-radius: 12px; padding: 10px 12px; background: var(--tv-superficie); }
.tv-saude small { display: block; color: var(--tv-texto-suave); font-size: 12px; }
.tv-saude strong { font-size: 15px; }
.tv-eventos { list-style: none; padding: 0; margin: 0; max-height: 360px; overflow: auto; }
.tv-eventos li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--tv-borda); font-size: 13px; }
.tv-eventos li:last-child { border-bottom: 0; }
.tv-eventos time { color: var(--tv-texto-suave); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 88px; }
.tv-eventos i { width: 18px; text-align: center; margin-top: 2px; }
.tv-monitor { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tv-monitor__card { border: 1px solid var(--tv-borda); border-radius: 14px; background: var(--tv-superficie); padding: 14px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid #9ca3af; }
.tv-monitor__card.on { border-top-color: var(--tv-verde); }
.tv-monitor__card.off { border-top-color: #dc2626; }
.tv-monitor__card.nunca { border-top-color: #d1d5db; opacity: .8; }
.tv-monitor__linha { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.tv-monitor__linha span { color: var(--tv-texto-suave); }
.tv-monitor__linha b { font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; }
.tv-barra-uso { height: 6px; border-radius: 99px; background: var(--tv-borda); overflow: hidden; }
.tv-barra-uso i { display: block; height: 100%; background: var(--tv-verde); }
.tv-barra-uso i.alto { background: #f59e0b; }
.tv-barra-uso i.critico { background: #dc2626; }

/* ═══════════════════════════════════════════════════════════════
   v1.3 · ACABAMENTO
   Visual limpo e sóbrio: cores sólidas, bordas finas, sombras discretas,
   foco visível no teclado e ícones Font Awesome.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --tv-raio: 10px;
    --tv-fundo: #f5f6f5;
    --tv-borda: #e3e7e5;
    --tv-borda-forte: #cfd6d2;
    --tv-hover: #f2f4f3;
    --tv-sombra: 0 1px 2px rgba(16, 24, 20, .05);
    --tv-sombra-menu: 0 8px 24px rgba(16, 24, 20, .12);
    --tv-foco: 0 0 0 3px rgba(46, 139, 87, .2);
}
[data-bs-theme="dark"] {
    --tv-fundo: #0f1115;
    --tv-borda: #262b33;
    --tv-borda-forte: #323843;
    --tv-hover: #1e222a;
    --tv-sombra: 0 1px 2px rgba(0, 0, 0, .4);
    --tv-sombra-menu: 0 8px 24px rgba(0, 0, 0, .5);
}

/* Ícones (Font Awesome) */
.fa-solid, .fa-regular, .fa-brands { line-height: 1; }
.fa-solid.fa-brands { font-family: "Font Awesome 6 Brands"; font-weight: 400; }
.btn > i { font-size: .95em; }

/* Botões: sólidos, sem efeitos */
.btn { --bs-btn-padding-y: .45rem; --bs-btn-padding-x: .9rem; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: background-color .15s, border-color .15s, color .15s; }
.btn-sm { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .65rem; --bs-btn-font-size: .8rem; border-radius: 7px; gap: .35rem; }
.btn-lg { --bs-btn-padding-y: .65rem; --bs-btn-font-size: .95rem; border-radius: 9px; }
.btn:focus-visible { box-shadow: var(--tv-foco); }
.btn-light { --bs-btn-bg: var(--tv-superficie); --bs-btn-color: var(--tv-texto); --bs-btn-border-color: var(--tv-borda-forte); --bs-btn-hover-bg: var(--tv-hover); --bs-btn-hover-color: var(--tv-texto); --bs-btn-hover-border-color: var(--tv-borda-forte); --bs-btn-active-bg: var(--tv-hover); --bs-btn-active-border-color: var(--tv-borda-forte); }
.btn-light.border { --bs-border-color: var(--tv-borda-forte); }
.btn-light.text-danger:hover { background: rgba(220, 38, 38, .06); border-color: rgba(220, 38, 38, .35); --bs-border-color: rgba(220, 38, 38, .35); }
.btn-icone { width: 34px; height: 34px; padding: 0; gap: 0; flex: none; border-radius: 8px; }
.btn-sm.btn-icone { width: 32px; height: 32px; border-radius: 7px; }

/* Campos */
.form-control, .form-select { min-height: 40px; border-radius: 8px; border-color: var(--tv-borda-forte); background-color: var(--tv-superficie); }
.form-control:focus, .form-select:focus { border-color: var(--tv-verde); box-shadow: var(--tv-foco); }
.form-control-sm, .form-select-sm { min-height: 32px; border-radius: 7px; }
.form-control-lg { min-height: 46px; border-radius: 9px; }
.form-control-color { padding: 4px; }
.form-control::placeholder { color: #98a39d; }
.input-group-text { background: var(--tv-fundo); border-color: var(--tv-borda-forte); color: var(--tv-texto-suave); }
.form-check-input { border-color: #b7c1bc; }
.form-check-input:focus { box-shadow: var(--tv-foco); border-color: var(--tv-verde); }
.ts-wrapper .ts-control { border-radius: 8px; min-height: 40px; border-color: var(--tv-borda-forte); }
.ts-dropdown { border-radius: 8px; box-shadow: var(--tv-sombra-menu); }

/* Campo com ícone dentro (login) */
.tv-campo { position: relative; }
.tv-campo .form-control { padding-left: 40px; min-height: 46px; }
.tv-campo:has(.tv-campo__acao) .form-control { padding-right: 46px; }
.tv-campo__icone { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; color: #8a968f; pointer-events: none; }
.tv-campo:focus-within .tv-campo__icone { color: var(--tv-verde); }
.tv-campo__acao { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: #7f8b85; display: grid; place-items: center; }
.tv-campo__acao:hover { background: var(--tv-hover); color: var(--tv-texto); }
.tv-campo__acao:focus-visible { outline: 0; box-shadow: var(--tv-foco); }
.tv-campo__aviso { margin-top: 6px; font-size: 12px; color: #b45309; font-weight: 600; }

/* Menu lateral */
.tv-sidebar__topo { border-bottom: 1px solid var(--tv-borda); }
.tv-marca__icone { border-radius: 9px; background: var(--tv-verde); font-size: 18px; }
.tv-marca__texto strong { font-size: 17px; font-weight: 700; }
.tv-menu { padding: 12px 10px; gap: 2px; scrollbar-width: thin; }
.tv-menu__link { min-height: 40px; border-radius: 8px; color: #33403a; font-weight: 500; }
[data-bs-theme="dark"] .tv-menu__link { color: #cdd2d8; }
.tv-menu__link > i:first-child { width: 18px; text-align: center; font-size: 15px; color: #84908a; }
.tv-menu__link:hover { background: var(--tv-hover); color: var(--tv-texto); }
.tv-menu__link:hover > i:first-child { color: var(--tv-texto); }
.tv-menu__link.active { background: var(--tv-verde-claro); color: var(--tv-verde-escuro); font-weight: 600; }
.tv-menu__link.active > i:first-child { color: var(--tv-verde); }
.tv-menu__link:focus { outline: 0; }
.tv-menu__link:focus-visible { box-shadow: var(--tv-foco); }
/* Grupo "Conteúdos": hover igual aos outros itens; verde só quando uma página dele está aberta */
.tv-menu__grupo.tem-ativo { color: var(--tv-verde-escuro); font-weight: 600; }
.tv-menu__grupo.tem-ativo > i:first-child { color: var(--tv-verde); }
.tv-menu__seta { font-size: 11px; color: #94a09a; }
.tv-submenu { margin: 2px 0 6px 18px; padding-left: 12px; border-left: 1px solid var(--tv-borda); }
.tv-submenu a { padding: 7px 10px; border-radius: 7px; color: #5f6b65; }
[data-bs-theme="dark"] .tv-submenu a { color: #a3aab3; }
.tv-submenu a:hover { background: var(--tv-hover); color: var(--tv-texto); }
.tv-submenu a.active { background: var(--tv-verde-claro); color: var(--tv-verde-escuro); font-weight: 600; }
.tv-menu__titulo { font-weight: 700; letter-spacing: .07em; color: #8f9b95; }
.tv-usuario:hover { background: var(--tv-hover); }

/* Topo fixo */
.tv-topo { position: sticky; top: 0; z-index: 1020; }
.tv-titulo { font-size: 22px; font-weight: 700; }
.tv-migalhas__voltar { width: 24px; height: 24px; border-radius: 6px; color: var(--tv-texto); }
.tv-migalhas__voltar:hover { border-color: var(--tv-verde); color: var(--tv-verde); }

/* Cartões, tabelas e indicadores */
.tv-card { border-radius: var(--tv-raio); box-shadow: var(--tv-sombra); }
.tv-card__titulo > i:first-child { color: var(--tv-verde); font-size: 15px; width: 18px; text-align: center; }
.tv-kpi__icone { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 10px; font-size: 18px; }
.tv-tabela thead th { background: var(--tv-fundo); color: #7a8680; }
.tv-tabela tbody tr:last-child td { border-bottom: 0; }
span.tv-thumb > i { font-size: 15px; }
.tv-vazio i { font-size: 34px; opacity: .45; }
.badge { font-weight: 600; }
.badge.tv-selo-claro { background-color: var(--tv-fundo); color: #4b5852; }
[data-bs-theme="dark"] .badge.tv-selo-claro { color: #cdd2d8; }
.dropdown-menu { border-color: var(--tv-borda); border-radius: 10px; padding: 4px; box-shadow: var(--tv-sombra-menu); }
.dropdown-item { border-radius: 6px; padding: 7px 12px; }
.dropdown-item > i { width: 16px; text-align: center; }
.dropdown-item:active { background: var(--tv-verde); }
.modal-content { border-radius: 12px; }
.alert { border-radius: 10px; }

/* Dashboard: situação das telas */
.tv-status-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tv-status { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--tv-borda); border-radius: 10px; color: inherit; background: var(--tv-superficie); transition: border-color .15s, background-color .15s; }
.tv-status:hover { color: inherit; background: var(--tv-hover); border-color: var(--tv-borda-forte); }
.tv-status__rotulo { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--tv-texto-suave); white-space: nowrap; }
.tv-status__rotulo i { font-size: 9px; }
.tv-status--pendente .tv-status__rotulo i { font-size: 11px; }
.tv-status strong { font-family: "Outfit", sans-serif; font-size: 28px; font-weight: 700; line-height: 1.1; }
.tv-status--on .tv-status__rotulo i, .tv-status--on strong { color: #15803d; }
.tv-status--off .tv-status__rotulo i, .tv-status--off strong { color: #b91c1c; }
.tv-status--pendente .tv-status__rotulo i { color: #64748b; }
[data-bs-theme="dark"] .tv-status--on strong { color: #4ade80; }
[data-bs-theme="dark"] .tv-status--off strong { color: #f87171; }
.tv-mini-kpi { display: flex; align-items: flex-start; gap: 10px; }
.tv-mini-kpi > i { margin-top: 4px; width: 16px; text-align: center; color: var(--tv-texto-suave); }

/* ---------- Login ---------- */
.tv-login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--tv-superficie); }
.tv-login__lado { position: relative; isolation: isolate; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; background: #1e6b3e; }
/* Foto (opcional) com degradê verde por cima, para o texto ficar legível */
.tv-login__foto { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; }
.tv-login__lado::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, #2e8b57 0%, #1e6b3e 55%, #0f3a23 100%); }
.tv-login__lado.com-foto::before { background: linear-gradient(180deg, rgba(30, 107, 62, .55) 0%, rgba(20, 77, 45, .7) 55%, rgba(10, 38, 23, .92) 100%); }
.tv-login__logo { width: 180px; }
.tv-login__texto { max-width: 480px; }
.tv-login__lado h2 { font-size: 34px; font-weight: 700; line-height: 1.15; margin-bottom: 10px; }
.tv-login__lado p { font-size: 15.5px; opacity: .85; margin: 0; }
.tv-login__form { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.tv-login__caixa { width: 100%; max-width: 380px; }
.tv-login__cabecalho { margin-bottom: 24px; }
.tv-login__marca { max-width: 170px; max-height: 56px; margin-bottom: 24px; }
.tv-login__cabecalho h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.tv-login__cabecalho p { color: var(--tv-texto-suave); margin: 0; }
.tv-login__esqueci { font-size: 12.5px; font-weight: 600; margin-bottom: .35rem; }
.tv-login__rodape { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--tv-borda); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tv-login__rodape p { margin: 0; font-size: 12px; color: var(--tv-texto-suave); }
.tv-login--escuro { --tv-fundo: #0f1115; --tv-superficie: #171a20; --tv-texto: #e6e8eb; --tv-borda: #262b33; color: #e6e8eb; }
/* Celular e tablet: faixa verde curta com a logo + formulário em cartão que sobe sobre a faixa */
@media (max-width: 991.98px) {
    .tv-login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100vh; min-height: 100dvh; background: var(--tv-fundo); }
    .tv-login__lado { padding: 28px 20px 64px; min-height: 0; align-items: center; justify-content: center; }
    .tv-login__topo { display: flex; justify-content: center; }
    .tv-login__texto { display: none; }
    .tv-login__logo { width: 132px; }
    .tv-login__form { position: relative; z-index: 1; margin-top: -40px; padding: 0 16px 32px; align-items: flex-start; }
    .tv-login__caixa { max-width: 420px; padding: 24px 20px; background: var(--tv-superficie); border: 1px solid var(--tv-borda); border-radius: 16px; box-shadow: 0 10px 30px rgba(16, 24, 20, .1), 0 2px 6px rgba(16, 24, 20, .06); }
    .tv-login__cabecalho { text-align: center; margin-bottom: 20px; }
    .tv-login__cabecalho h1 { font-size: 22px; }
    .tv-login__cabecalho p { font-size: 13.5px; }
    .tv-login__marca { display: none; }
    .tv-login .form-label { font-size: 13px; }
    .tv-login .form-control, .tv-login .tv-campo .form-control { min-height: 44px; font-size: 16px; } /* 16px: o iPhone não dá zoom */
    .tv-login .btn-lg { --bs-btn-font-size: 15px; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; }
    .tv-login .form-check { display: flex; align-items: center; gap: 8px; padding-left: 0; }
    .tv-login .form-check .form-check-input { float: none; flex: none; margin: 0; }
    .tv-login .form-check-label { font-size: 13.5px; }
    .tv-login__rodape { margin-top: 20px; padding-top: 16px; }
    .tv-topo { padding: 14px 16px; }
}

/* Dark: cinza neutro (sem tom esverdeado) */
[data-bs-theme="dark"] { --tv-verde: #3fa36b; --tv-verde-hover: #4cb37a; --tv-verde-escuro: #7fd3a3; --tv-verde-claro: rgba(63, 163, 107, .15); --tv-superficie: #171a20; --bs-tertiary-bg: #171a20; --bs-secondary-bg: #1e222a; }
[data-bs-theme="dark"] .tv-sidebar, [data-bs-theme="dark"] .tv-topo { background: #171a20; }

/* Menu com mais respiro */
.tv-menu { gap: 4px; padding: 14px 12px; }
.tv-menu__link { padding: 0 14px; min-height: 42px; }
.tv-submenu { gap: 3px; margin: 4px 0 8px 20px; padding-left: 10px; }
.tv-submenu a { padding: 8px 12px; }
.tv-menu__titulo { margin-top: 22px; }

/* ---------- Central de ajuda (chat) ---------- */
.tv-ajuda-botao { position: fixed; right: 22px; bottom: 22px; z-index: 1050; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--tv-verde); color: #fff; font-size: 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); display: grid; place-items: center; }
.tv-ajuda-botao:hover { background: var(--tv-verde-hover); }
.tv-ajuda { position: fixed; right: 22px; bottom: 88px; z-index: 1051; width: 370px; max-width: calc(100vw - 24px); height: 540px; max-height: calc(100vh - 110px); background: var(--tv-superficie); border: 1px solid var(--tv-borda); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); display: flex; flex-direction: column; overflow: hidden; }
.tv-ajuda[hidden] { display: none; }
.tv-ajuda__topo { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--tv-verde); color: #fff; }
.tv-ajuda__avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.tv-ajuda__topo strong { display: block; font-size: 14px; }
.tv-ajuda__topo small { opacity: .85; font-size: 11.5px; }
.tv-ajuda__corpo { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--tv-fundo); }
.tv-ajuda__msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.tv-ajuda__msg--bot { align-self: flex-start; background: var(--tv-superficie); border: 1px solid var(--tv-borda); border-bottom-left-radius: 4px; }
.tv-ajuda__msg--eu { align-self: flex-end; background: var(--tv-verde); color: #fff; border-bottom-right-radius: 4px; }
.tv-ajuda__msg a { font-weight: 600; }
.tv-ajuda__opcoes { display: flex; flex-wrap: wrap; gap: 6px; }
.tv-ajuda__opcoes button { border: 1px solid var(--tv-borda-forte); background: var(--tv-superficie); color: var(--tv-texto); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; }
.tv-ajuda__opcoes button:hover { border-color: var(--tv-verde); color: var(--tv-verde); }
.tv-ajuda__form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--tv-borda); }
.tv-ajuda__form .form-control { min-height: 40px; }
@media print { body .tv-ajuda, body .tv-ajuda-botao { display: none; } }

/* ═══ v1.3 · Logo do cliente no menu ═══ */
.tv-marca-bloco { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 auto; }
.tv-marca--logo { display: flex; align-items: center; height: 48px; max-width: 190px; }
.tv-marca--logo img { max-height: 48px; max-width: 100%; width: auto; object-fit: contain; object-position: left center; display: block; }
[data-bs-theme=dark] .tv-marca--logo img { background: #fff; padding: 4px 8px; border-radius: 8px; }
.tv-marca-bloco { position: relative; flex-direction: row; align-items: center; }
/* Atalho discreto para enviar a logo: bolinha com "+" no canto do ícone (só aparece sem logo) */
.tv-marca__add { position: absolute; left: 28px; top: 50%; margin-top: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--tv-superficie); color: var(--tv-verde); border: 1px solid var(--tv-borda-forte); font-size: 10px; text-decoration: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .15s, background .15s, color .15s; }
.tv-marca__add:hover, .tv-marca__add:focus-visible { background: var(--tv-verde); color: #fff; transform: scale(1.12); }

/* ═══ v1.3 · Modelos de aviso, lixeira, vencimentos ═══ */
.tv-modelos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tv-modelo { border: 1px solid var(--tv-borda); border-radius: 8px; padding: 0; overflow: hidden; background: none; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.tv-modelo:hover, .tv-modelo:focus-visible { border-color: var(--tv-verde); transform: translateY(-1px); }
.tv-modelo__previa { height: 58px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 8px; font-size: 10px; line-height: 1.25; overflow: hidden; }
.tv-modelo__previa > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-modelo__previa b { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-modelo__nome { display: block; font-size: 12px; padding: 5px 8px; color: var(--tv-texto); border-top: 1px solid var(--tv-borda); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-vencer { list-style: none; margin: 0; padding: 0; }
.tv-vencer li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--tv-borda); }
.tv-vencer li:last-child { border-bottom: 0; }
.tv-vencer__dias { margin-left: auto; font-size: 12px; font-weight: 600; white-space: nowrap; padding: 2px 8px; border-radius: 20px; background: #fdf1dc; color: #9a6200; }
.tv-vencer__dias.hoje { background: #fde3e3; color: #b42323; }
[data-bs-theme=dark] .tv-vencer__dias { background: #3a2f1a; color: #f0b54a; }
[data-bs-theme=dark] .tv-vencer__dias.hoje { background: #3d1f1f; color: #f07a7a; }
.tv-menu__qtd { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--tv-borda); color: var(--tv-texto-suave); font-size: 11px; line-height: 18px; text-align: center; }

/* ═══ v1.3.1 · Central de ajuda: contatos, status, respostas ao vivo ═══ */
.tv-ajuda__titulo { min-width: 0; flex: 1; }
.tv-ajuda__titulo small { display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-ajuda__status { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); flex: 0 0 7px; }
.tv-ajuda__status.on { background: #a7f3c4; box-shadow: 0 0 0 2px rgba(167, 243, 196, .3); }
.tv-ajuda__acoes { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.tv-ajuda__acoes a, .tv-ajuda__acoes button { border: 0; background: none; color: #fff; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; text-decoration: none; }
.tv-ajuda__acoes a:hover, .tv-ajuda__acoes button:hover, .tv-ajuda__acoes a:focus-visible, .tv-ajuda__acoes button:focus-visible { background: rgba(255, 255, 255, .16); color: #fff; }
.tv-ajuda__acoes .fa-whatsapp { font-size: 18px; }
.tv-ajuda__acoes .tv-ajuda__config { opacity: .55; }
.tv-ajuda__rodape { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--tv-borda); font-size: 12.5px; color: var(--tv-texto-suave); }
.tv-ajuda__rodape > span { margin-right: auto; }
.tv-ajuda__rodape--aviso { align-items: flex-start; background: #fff8e6; color: #7a5600; }
.tv-ajuda__rodape--aviso > span { margin: 0; }
[data-bs-theme=dark] .tv-ajuda__rodape--aviso { background: #2e2716; color: #e8c370; }
.tv-ajuda__suporte { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: #25d366; color: #fff; font-weight: 600; font-size: 12.5px; text-decoration: none; }
.tv-ajuda__suporte:hover { color: #fff; filter: brightness(.94); }
.tv-ajuda__suporte--email { background: var(--tv-superficie); color: var(--tv-texto); border: 1px solid var(--tv-borda-forte); }
.tv-ajuda__suporte--email:hover { color: var(--tv-verde); border-color: var(--tv-verde); filter: none; }
.tv-ajuda__opcoes a, .tv-ajuda__opcoes button { border: 1px solid var(--tv-borda-forte); background: var(--tv-superficie); color: var(--tv-texto); border-radius: 99px; padding: 6px 12px; font-size: 12.5px; text-decoration: none; line-height: 1.3; text-align: left; }
.tv-ajuda__opcoes a:hover, .tv-ajuda__opcoes button:hover { border-color: var(--tv-verde); color: var(--tv-verde); }
.tv-ajuda__opcoes i { margin-right: 2px; font-size: 11.5px; }
.tv-ajuda__opcoes .vivo { border-color: rgba(46, 139, 87, .45); background: rgba(46, 139, 87, .07); }
.tv-ajuda__opcoes .vivo i { color: var(--tv-verde); }
.tv-ajuda__opcoes .mais { border-style: dashed; color: var(--tv-texto-suave); }
.tv-ajuda__opcoes .zap { background: #25d366; border-color: #25d366; color: #fff; font-weight: 600; }
.tv-ajuda__opcoes .zap:hover { color: #fff; filter: brightness(.94); }
.tv-ajuda__feedback { gap: 6px; }
.tv-ajuda__feedback button { padding: 4px 11px; font-size: 12px; color: var(--tv-texto-suave); }
.tv-ajuda__lista { margin: 6px 0; padding-left: 18px; }
.tv-ajuda__lista li { margin: 2px 0; }
.tv-ajuda__barra { height: 7px; border-radius: 99px; background: var(--tv-borda); overflow: hidden; margin: 7px 0; }
.tv-ajuda__barra span { display: block; height: 100%; background: var(--tv-verde); border-radius: 99px; }
.tv-ajuda__barra span.cheia { background: #dc3545; }
.tv-ajuda__digitando { display: inline-flex; gap: 4px; align-items: center; }
.tv-ajuda__msg.tv-ajuda__digitando { padding: 12px 14px; }
.tv-ajuda__digitando span { width: 6px; height: 6px; border-radius: 50%; background: var(--tv-texto-suave); opacity: .4; animation: tvDigitando 1s infinite; }
.tv-ajuda__digitando span:nth-child(2) { animation-delay: .15s; }
.tv-ajuda__digitando span:nth-child(3) { animation-delay: .3s; }
@keyframes tvDigitando { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .tv-ajuda__digitando span { animation: none; } }
@media (max-width: 575.98px) {
    .tv-ajuda { right: 8px; left: 8px; width: auto; max-width: none; bottom: 84px; height: calc(100vh - 100px); }
}
.tv-passos-app { padding-left: 20px; margin: 0; }
.tv-passos-app > li { margin-bottom: 10px; line-height: 1.5; }
.tv-passos-app > li::marker { font-weight: 700; color: var(--tv-verde); }

/* ── Pré-visualização do rodapé ─────────────────────────────── */
.tv-rodape-previa { display: flex; align-items: center; gap: 16px; padding: 10px 16px; min-height: 54px; border-radius: 10px; background: #111; color: #fff; font-weight: 600; overflow: hidden; }
.tv-rodape-previa__logo { height: 34px; max-width: 130px; object-fit: contain; }
.tv-rodape-previa__msg { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-rodape-previa__info { display: flex; gap: 18px; margin-left: auto; white-space: nowrap; }
.tv-rodape-previa__info i { opacity: .85; }

/* ───────── Rádio · Estúdio de locução ───────── */
.tv-loc-uso { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--tv-verde-claro); color: var(--tv-verde-escuro); font-weight: 600; }
.tv-loc-passo { width: 24px; height: 24px; border-radius: 50%; background: var(--tv-verde); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tv-loc-texto { font-size: 15px; line-height: 1.55; resize: vertical; }
.tv-loc-contador { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--tv-texto-suave); white-space: nowrap; }
.tv-loc-contador__barra { flex: 1; height: 4px; border-radius: 4px; background: var(--tv-borda); overflow: hidden; }
.tv-loc-contador__barra span { display: block; height: 100%; width: 0; background: var(--tv-verde); transition: width .15s; }
.tv-loc-contador__barra span.medio { background: #d9a400; }
.tv-loc-contador__barra span.longo { background: #e07b00; }
.tv-loc-voz-escolhida { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--tv-borda); border-radius: 12px; flex-wrap: wrap; }
.tv-loc-avatar { --cor: var(--tv-verde); width: 42px; height: 42px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-family: "Outfit", sans-serif; font-weight: 700; font-size: 18px; color: var(--cor); background: color-mix(in srgb, var(--cor) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cor) 30%, transparent); }
.tv-loc-estilos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tv-loc-estilo { position: relative; cursor: pointer; margin: 0; }
.tv-loc-estilo input { position: absolute; opacity: 0; pointer-events: none; }
.tv-loc-estilo span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 10px 12px; border: 1.5px solid var(--tv-borda); border-radius: 10px; transition: .15s; }
.tv-loc-estilo span i { color: var(--tv-texto-suave); margin-bottom: 4px; }
.tv-loc-estilo strong { font-size: 13px; font-weight: 600; }
.tv-loc-estilo small { font-size: 11.5px; color: var(--tv-texto-suave); line-height: 1.3; }
.tv-loc-estilo:hover span { border-color: var(--tv-borda-forte, #cfd6d2); }
.tv-loc-estilo input:checked + span { border-color: var(--tv-verde); background: var(--tv-verde-claro); }
.tv-loc-estilo input:checked + span i { color: var(--tv-verde); }
.tv-loc-estilo input:focus-visible + span { box-shadow: var(--tv-foco); }
.tv-loc-gerar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--tv-borda); }
.tv-loc-mixer { position: sticky; top: 16px; }
.tv-loc-atual { padding: 12px; border-radius: 10px; background: var(--tv-fundo); border: 1px solid var(--tv-borda); }
.tv-loc-atual audio, .tv-loc-mixer audio { height: 36px; }
.tv-loc-controles { display: grid; gap: 4px; margin-top: 14px; }
.tv-loc-controles label { display: block; font-size: 12.5px; font-weight: 600; margin: 0; }
.tv-loc-controles label.desligado { opacity: .4; }
.tv-loc-controles output { float: right; font-weight: 500; color: var(--tv-texto-suave); }
.tv-loc-vozes { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 10px; }
.tv-loc-vozcard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--tv-borda); border-radius: 12px; }
.tv-loc-vozcard.ativa { border-color: var(--tv-verde); background: var(--tv-verde-claro); }
.tv-loc-vozcard__info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.tv-loc-vozcard__info small { color: var(--tv-texto-suave); font-size: 12px; white-space: nowrap; }
.tv-loc-vozcard__acoes { display: flex; gap: 6px; flex: none; }
.tv-loc-selo { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--tv-verde-claro); color: var(--tv-verde-escuro); margin-top: 3px; }
.tv-loc-play.tocando, [data-amostra].tocando { background: var(--tv-verde); color: #fff; border-color: var(--tv-verde); --bs-border-color: var(--tv-verde); --bs-btn-active-border-color: var(--tv-verde); }
.tv-tabela .tv-loc-linha-ativa > td { background: var(--tv-verde-claro); }
.tv-loc-opcoes { display: grid; gap: 10px; }
.tv-loc-opcao { padding: 12px 14px; border: 1px solid var(--tv-borda); border-radius: 10px; }
.tv-loc-opcao__texto { font-size: 14.5px; line-height: 1.5; }
[data-bs-theme="dark"] .tv-loc-uso, [data-bs-theme="dark"] .tv-loc-selo { color: #8fe0b0; }
.tv-menu__novo { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 6px; background: var(--tv-verde-claro); color: var(--tv-verde-escuro); }

.tv-loc-controles .form-range::-webkit-slider-thumb { background: var(--tv-verde); }
.tv-loc-controles .form-range::-moz-range-thumb { background: var(--tv-verde); }
.tv-loc-controles .form-range:focus::-webkit-slider-thumb { box-shadow: var(--tv-foco); }
@media (max-width: 1199.98px) { .tv-loc-mixer { position: static; } }

/* ---------- Celular (até 767px): tabelas em cartões, cabeçalho e resumo ---------- */
/* Valores de desktop (antes vinham de classes utilitárias do Bootstrap) */
.tv-celula-acoes { white-space: nowrap; }
.tv-so-celular { display: none; }
.tv-tela-avatar { width: 64px; height: 64px; }
img.tv-tela-avatar { object-fit: cover; }
.tv-kpi__icone.tv-tela-avatar { font-size: 28px; }
.tv-celula-acoes > form { display: inline; }
.tv-topo > [data-tv-menu-abrir] { margin-right: .5rem; }
.tv-resumo { display: flex; gap: 1rem; align-items: center; }
@media (max-width: 767.98px) {
    /* Tabelas .tv-tabela-responsiva: cada linha vira um cartão */
    .table-responsive:has(> .tv-tabela-responsiva) { overflow: visible; }
    .tv-card:has(> .table-responsive > .tv-tabela-responsiva) { background: none; border: 0; box-shadow: none; }
    .tv-tabela-responsiva, .tv-tabela-responsiva tbody { display: block; width: 100%; }
    .tv-tabela-responsiva thead { display: none; }
    .tv-tabela-responsiva tr { display: flex; flex-direction: column; gap: 8px; padding: 16px; margin-bottom: 12px; background: var(--tv-superficie); border: 1px solid var(--tv-borda); border-radius: var(--tv-raio); box-shadow: var(--tv-sombra); }
    .tv-tabela-responsiva tr:last-child { margin-bottom: 0; }
    .tv-tabela-responsiva tbody tr:hover { background: var(--tv-superficie); }
    .tv-card__corpo .tv-tabela-responsiva tr { box-shadow: none; }
    .tv-tabela-responsiva td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0; border: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
    .tv-tabela-responsiva td::before { content: attr(data-label); flex: 0 0 auto; font-size: 12px; font-weight: 500; color: var(--tv-texto-suave); text-align: left; }
    /* 1ª célula: nome em destaque, sem rótulo */
    .tv-tabela-responsiva td:first-child { display: block; text-align: left; font-size: 15px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--tv-borda); }
    .tv-tabela-responsiva td:first-child::before { display: none; }
    /* Célula que ocupa a largura toda (rótulo em cima) */
    .tv-tabela-responsiva td.tv-celula-cheia { flex-direction: column; align-items: stretch; gap: 4px; text-align: left; }
    /* Ações no fim, botões ocupando a largura */
    .tv-tabela-responsiva td.tv-celula-acoes { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--tv-borda); white-space: normal; }
    .tv-tabela-responsiva td.tv-celula-acoes::before { display: none; }
    .tv-tabela-responsiva td.tv-celula-acoes > * { flex: 1 1 auto; }
    .tv-tabela-responsiva td.tv-celula-acoes > form { display: flex; }
    .tv-tabela-responsiva td.tv-celula-acoes > form > .btn { flex: 1 1 auto; }
    .tv-tabela-responsiva td.tv-celula-acoes .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
    .tv-tabela-responsiva td.tv-celula-acoes .btn-icone { width: auto; min-width: 40px; height: 40px; }

    /* Cabeçalho: [menu] [migalha] / título / ação */
    .tv-topo { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 12px 16px 16px; }
    .tv-topo > .flex-grow-1 { display: contents; }
    .tv-topo > [data-tv-menu-abrir] { margin: 0; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; }
    .tv-migalhas { display: block; min-width: 0; grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 40px; }
    .tv-migalhas > * { margin-right: 4px; }
    .tv-migalhas__voltar { display: inline-grid; vertical-align: middle; line-height: 1; }
    .tv-titulo { grid-column: 1 / -1; font-size: 1.35rem; line-height: 1.25; margin: 4px 0 0; }
    /* Ações do topo: secundárias em grade de 2 colunas; a principal (verde) por último, largura total */
    .tv-topo__acoes { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--tv-esp-2); margin-top: var(--tv-esp-1); }
    .tv-topo__acoes:empty { display: none; }
    .tv-topo__acoes > * { min-width: 0; }
    .tv-topo__acoes > :is(.btn-primary, :has(> .btn-primary)) { grid-column: 1 / -1; order: 1; }
    .tv-topo__acoes > :only-child,
    .tv-topo__acoes > :nth-child(odd):last-child,
    .tv-topo__acoes > :nth-child(odd):nth-last-child(2):has(+ :is(.btn-primary, :has(> .btn-primary))) { grid-column: 1 / -1; }
    .tv-topo__acoes .btn { width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tv-topo__acoes .btn:not(.btn-primary) { --bs-btn-font-size: var(--tv-fs-secundario); --bs-btn-padding-x: 10px; }
    .tv-topo__acoes .tv-loc-uso { justify-content: center; }

    /* Cartões de resumo (KPI) */
    .tv-resumo { padding: 16px; gap: 8px; flex-direction: column; align-items: flex-start; }
    .tv-resumo .tv-kpi { min-width: 0; max-width: 100%; }
    .tv-resumo .tv-kpi strong { font-size: clamp(1rem, 4.6vw, 1.5rem); white-space: nowrap; }
    .tv-resumo .tv-kpi__icone { width: 32px; height: 32px; border-radius: 8px; font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   CELULAR (até 767px) · escala de app
   Texto 14/13/12 · botão 40 (sm 32) · campo 40 · ícone 16 (selo 14, destaque 20) · espaço 4/8/12/16
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .tv-main { font-size: var(--tv-fs-base); }
    .tv-titulo { font-size: var(--tv-fs-titulo); }
    .tv-conteudo { padding-top: var(--tv-esp-4); padding-bottom: 48px; }
    .tv-card__corpo { padding: var(--tv-esp-4); }
    .tv-card__titulo { font-size: var(--tv-fs-titulo-card); margin-bottom: var(--tv-esp-3); gap: var(--tv-esp-2); }
    .tv-card__titulo > i:first-child { font-size: var(--tv-ico); }

    /* Botões */
    .tv-main .btn { --bs-btn-padding-y: 0; --bs-btn-padding-x: var(--tv-btn-px); --bs-btn-font-size: var(--tv-btn-fs); min-height: var(--tv-btn-altura); border-radius: var(--tv-btn-raio); gap: var(--tv-gap-ico); }
    .tv-main .btn > i { font-size: var(--tv-ico); }
    .tv-main .btn-sm { --bs-btn-padding-x: 10px; --bs-btn-font-size: var(--tv-fs-secundario); min-height: var(--tv-btn-altura-sm); border-radius: 8px; }
    .tv-main .btn-sm > i { font-size: var(--tv-ico-sm); }
    .tv-main .btn-lg { --bs-btn-font-size: var(--tv-btn-fs); min-height: var(--tv-btn-altura); }
    .tv-main .btn-icone { width: var(--tv-btn-altura); height: var(--tv-btn-altura); padding: 0; }
    .tv-main .btn-sm.btn-icone { width: var(--tv-btn-altura-sm); height: var(--tv-btn-altura-sm); min-height: var(--tv-btn-altura-sm); }

    /* Campos */
    .tv-main .form-control, .tv-main .form-select { min-height: var(--tv-campo-altura); font-size: var(--tv-fs-base); }
    .tv-main .form-control-sm, .tv-main .form-select-sm { min-height: var(--tv-btn-altura-sm); font-size: var(--tv-fs-secundario); }
    .tv-main .ts-wrapper .ts-control { min-height: var(--tv-campo-altura); font-size: var(--tv-fs-base); }
    .tv-main .form-label { font-size: var(--tv-fs-secundario); margin-bottom: var(--tv-esp-1); }
    .tv-main .form-text { font-size: var(--tv-fs-pequeno); }
    .tv-main .input-group-text { font-size: var(--tv-fs-secundario); }

    /* Selos, abas, menus e estados vazios */
    .tv-main .badge { display: inline-flex; align-items: center; gap: var(--tv-esp-1); font-size: 11.5px; }
    .tv-main .badge > i { font-size: min(var(--tv-ico-sm), 1.1em); }
    .tv-abas { margin-bottom: var(--tv-esp-4); }
    .tv-abas:not(.nav-fill) { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
    .tv-abas::-webkit-scrollbar { display: none; }
    .tv-abas .nav-link { display: flex; align-items: center; justify-content: center; gap: var(--tv-gap-ico); min-height: 36px; padding: 0 var(--tv-esp-3); font-size: var(--tv-fs-secundario); white-space: nowrap; }
    .dropdown-item { display: flex; align-items: center; gap: var(--tv-esp-2); min-height: var(--tv-btn-altura); }
    .dropdown-item > i { font-size: var(--tv-ico); }
    .dropdown-item > i.me-2 { margin-right: 0; }
    .tv-vazio { padding: 40px var(--tv-esp-4); }
    .tv-vazio i { font-size: var(--tv-ico-destaque); margin-bottom: var(--tv-esp-2); }

    /* Indicadores (dashboard e empresas) */
    .tv-kpi strong { font-size: 22px; }
    .tv-kpi__icone { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; font-size: var(--tv-ico); }
    .tv-status-grade { gap: var(--tv-esp-2); }
    .tv-status { padding: 10px var(--tv-esp-3); }
    .tv-status strong { font-size: 22px; }
    .tv-status__rotulo { font-size: 11.5px; }
    .tv-passo { padding: 10px var(--tv-esp-3); }
    .tv-vencer li { padding: var(--tv-esp-2) 0; }

    /* Filtros em pílulas: uma linha só, com rolagem horizontal */
    .tv-filtros { flex-wrap: nowrap; gap: var(--tv-esp-2); overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scroll-behavior: smooth; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .tv-filtros::-webkit-scrollbar { display: none; }
    .tv-filtros .btn { flex: none; min-height: var(--tv-btn-altura-sm); padding: 0 var(--tv-esp-3); font-size: var(--tv-fs-secundario); gap: var(--tv-gap-ico); scroll-snap-align: start; white-space: nowrap; }
    .tv-filtros .btn > i { font-size: var(--tv-ico-sm); }
    .tv-filtros .btn .badge { font-size: 10.5px; padding: 2px 6px; margin-left: 0; }

    /* Tabelas em cartão: 1ª célula com miniatura 40px e nome numa linha */
    .tv-tabela-responsiva td:first-child .tv-thumb { width: 40px; height: 40px; flex: 0 0 40px; }
    .tv-tabela-responsiva td:first-child .tv-nome-celula { gap: var(--tv-esp-3); }
    .tv-tabela-responsiva td:first-child .tv-nome-celula > :not(.tv-thumb) { flex: 1 1 auto; min-width: 0; }
    .tv-tabela-responsiva td:first-child .tv-nome-celula strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tv-tabela-responsiva td:first-child .tv-nome-celula small { display: block; font-size: var(--tv-fs-pequeno); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tv-tabela-responsiva td.tv-celula-selos { justify-content: flex-start; flex-wrap: wrap; gap: 6px; text-align: left; }
    .tv-tabela-responsiva td.tv-celula-selos::before { display: none; }
    .tv-tabela-responsiva td.tv-celula-selos > span { display: inline-flex; align-items: center; }
    /* Ações compactas (32px) em linha */
    .tv-tabela-responsiva td.tv-celula-acoes--compacta { flex-wrap: nowrap; gap: 6px; padding-top: 10px; }
    .tv-tabela-responsiva td.tv-celula-acoes--compacta > * { flex: 1 1 0; min-width: 0; }
    .tv-tabela-responsiva td.tv-celula-acoes--compacta > .dropdown { flex: none; }
    .tv-tabela-responsiva td.tv-celula-acoes--compacta .btn { min-height: var(--tv-btn-altura-sm); width: 100%; padding: 0 var(--tv-esp-2); }
    .tv-tabela-responsiva td.tv-celula-acoes--compacta .btn-icone { width: var(--tv-btn-altura-sm); height: var(--tv-btn-altura-sm); min-width: var(--tv-btn-altura-sm); padding: 0; }
    .tv-tabela-responsiva td.tv-celula-acoes--compacta .tv-so-celular { display: inline-flex; }

    /* Rodapé: mensagem em cima, clima/data/hora embaixo */
    .tv-rodape-previa { flex-wrap: wrap; gap: 6px var(--tv-esp-3); padding: 10px var(--tv-esp-3); min-height: 0; font-size: var(--tv-fs-secundario); }
    .tv-rodape-previa__logo { height: 26px; max-width: 96px; }
    .tv-rodape-previa__msg { flex: 1 1 0; min-width: 0; }
    .tv-rodape-previa__info { flex: 0 0 100%; margin-left: 0; gap: var(--tv-esp-3); align-items: center; font-size: var(--tv-fs-secundario); font-weight: 500; }
    .tv-rodape-previa__info span { display: inline-flex; align-items: center; gap: var(--tv-gap-ico); }
    .tv-rodape-previa__info i { font-size: var(--tv-ico-sm); }
    /* Campo de imagem (logo) e de arquivo: área de ~120px */
    .tv-upload { display: flex; width: 100%; height: 120px; }
    .tv-upload img { object-fit: contain; }
    .tv-upload__vazio { gap: var(--tv-gap-ico); font-size: var(--tv-fs-secundario); text-align: center; }
    .tv-upload__vazio i { font-size: var(--tv-ico-destaque); }
    .tv-arquivo { min-height: 120px; padding: var(--tv-esp-3); font-size: var(--tv-fs-secundario); }
    .tv-arquivo--vertical { min-height: 120px; }
    .tv-arquivo i { font-size: var(--tv-ico-destaque); }
    .tv-arquivo video, .tv-arquivo img { max-height: 110px; }

    /* Detalhes da tela */
    .tv-tela-avatar { width: 48px; height: 48px; }
    .tv-kpi__icone.tv-tela-avatar { flex: 0 0 48px; font-size: var(--tv-ico-destaque); border-radius: 10px; }

    /* Locução com IA */
    .tv-loc-uso { font-size: var(--tv-fs-pequeno); padding: 0 var(--tv-esp-3); min-height: var(--tv-btn-altura-sm); }
    .tv-loc-uso > i { font-size: var(--tv-ico-sm); }
    .tv-loc-vozes { grid-template-columns: 1fr; gap: var(--tv-esp-2); }
    .tv-loc-vozcard { gap: var(--tv-esp-2); padding: 10px var(--tv-esp-3); }
    .tv-loc-vozcard__info small { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .tv-loc-gerar { gap: var(--tv-esp-2); margin-top: var(--tv-esp-4); padding-top: var(--tv-esp-4); }
    .tv-loc-gerar .btn { width: 100%; }
    .tv-loc-opcao { padding: 10px var(--tv-esp-3); }

    /* Minha conta: botão de salvar no fim do formulário */
    .tv-conteudo form > .btn-lg:last-child { width: 100%; }
}

/* iOS dá zoom em campos com fonte menor que 16px */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 767.98px) {
        .tv-main .form-control, .tv-main .form-select, .tv-main .ts-wrapper .ts-control input { font-size: 16px; }
    }
}
