/**
 * tv-ofertas/dist/style/main.css — v3.75.0
 * ============================================================
 * Admin do módulo TV Ofertas — rewrite completo.
 *
 * Estrutura:
 *  1. Ocultar legado + base
 *  2. Header + Toolbar + KPIs
 *  3. Estado vazio
 *  4. Workspace (TV tabs + preview main + thumbnails)
 *  5. Drawer lateral de configuração
 *  6. Modais (layouts, tvs, open-tv)
 *  7. Canvas view (fullscreen board)
 *  8. Preview interno de cada layout (mini-render)
 *  9. Responsive
 * ============================================================ */

/* ══════════ TOAST acima de tudo ══════════ */
.swal2-container.swal2-top-end,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-top-start,
.swal2-container.swal2-bottom-start {
    z-index: 999999 !important;
}
.tvo-toast-popup {
    z-index: 999999 !important;
}

/* ══════════ 1. OCULTAR LEGADO + BASE ══════════ */
body.toplevel_page_tv-ofertas > #wpwrap > #wpcontent > #wpbody > #wpbody-content .head__page,
body.marketing_page_tv-ofertas > #wpwrap > #wpcontent > #wpbody > #wpbody-content .head__page {
    display: none !important;
}

body.toplevel_page_tv-ofertas,
body.marketing_page_tv-ofertas {
    background: var(--bg-app) !important;
}
body.toplevel_page_tv-ofertas #wpbody-content,
body.marketing_page_tv-ofertas #wpbody-content {
    padding-bottom: 0 !important;
}

/* Libera o conteúdo principal pro drawer lateral */
@media (min-width: 1100px) {
    body.toplevel_page_tv-ofertas .tvo-header,
    body.toplevel_page_tv-ofertas .tvo-toolbar,
    body.toplevel_page_tv-ofertas .tvo-empty,
    body.toplevel_page_tv-ofertas .tvo-workspace,
    body.marketing_page_tv-ofertas .tvo-header,
    body.marketing_page_tv-ofertas .tvo-toolbar,
    body.marketing_page_tv-ofertas .tvo-empty,
    body.marketing_page_tv-ofertas .tvo-workspace {
        margin-right: 440px !important;
    }
}


/* ══════════ 2. HEADER + TOOLBAR + KPIS ══════════
 * COMPACTO — toda a UI cabe sem scroll na viewport.
 * Header (50px) + Toolbar (44px) + Workspace (resto) */
.tvo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 6px;
    min-height: 50px;
}
.tvo-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.tvo-header-title h2 {
    margin: 0 !important;
    color: var(--text-primary) !important;
    font-size: 18px !important;
    font-weight: var(--font-weight-bold) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    white-space: nowrap;
}
.tvo-header-title h2 i {
    color: var(--color-primary-hover);
    font-size: 16px;
}
.tvo-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Status badge (Online/Offline) */
.tvo-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 999px;
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
}
.tvo-status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.25);
    animation: tvoPulse 2s ease-in-out infinite;
}
.tvo-status-badge.offline {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.tvo-status-badge.offline::before {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.25);
    animation: none;
}
@keyframes tvoPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
    50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0.1);  }
}

/* Botões do header (padrão ecom-hbtn global já compatível) */
.tvo-header .ecom-hbtn,
.tvo-canvas-topbar .ecom-hbtn,
.tvo-thumbs-header .ecom-hbtn,
.tvo-modal-content .ecom-hbtn {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-md);
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all .15s ease;
    height: 38px;
    white-space: nowrap;
}
.tvo-header .ecom-hbtn:hover,
.tvo-canvas-topbar .ecom-hbtn:hover,
.tvo-thumbs-header .ecom-hbtn:hover {
    background: var(--border-color);
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-header .ecom-hbtn.ecom-hbtn-primary,
.tvo-canvas-topbar .ecom-hbtn.ecom-hbtn-primary,
.tvo-thumbs-header .ecom-hbtn.ecom-hbtn-primary {
    background: var(--color-primary-hover);
    color: #1a2035;
    border-color: var(--color-primary-hover);
}
.tvo-header .ecom-hbtn.ecom-hbtn-primary:hover,
.tvo-canvas-topbar .ecom-hbtn.ecom-hbtn-primary:hover,
.tvo-thumbs-header .ecom-hbtn.ecom-hbtn-primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
}
.ecom-hbtn-sm {
    height: 30px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
}

/* Toolbar + KPIs */
.tvo-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 6px;
    min-height: 44px;
}
.tvo-kpis {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}
.tvo-kpi {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}
.tvo-kpi:not(:last-child)::after {
    content: '';
    display: block;
    width: 1px;
    height: 18px;
    background: var(--border-color);
    margin-left: 10px;
}
.tvo-kpi-ico {
    color: var(--color-primary-hover);
    font-size: 13px;
    margin-right: 2px;
}
.tvo-kpi-value {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0;
}
.tvo-kpi-value.sm {
    font-size: 12px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tvo-kpi-wide .tvo-kpi-value.sm { max-width: 200px; }
.tvo-kpi-label {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: lowercase;
    margin: 0;
}


/* ══════════ 3. ESTADO VAZIO ══════════ */
.tvo-empty {
    background: var(--bg-white);
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 60px 30px;
    text-align: center;
    margin-bottom: 20px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.tvo-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(189, 160, 95, 0.12);
    color: var(--color-primary-hover);
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.tvo-empty h3 {
    color: var(--text-primary) !important;
    font-size: 20px !important;
    font-weight: var(--font-weight-bold) !important;
    margin: 0 0 8px !important;
}
.tvo-empty p {
    color: var(--text-secondary) !important;
    font-size: 14px !important;
    max-width: 420px;
    margin: 0 auto 20px !important;
}


/* ══════════ 4. WORKSPACE (tabs + preview + thumbnails) ══════════
 * COMPACTO — calcula altura disponível da viewport.
 * 60 admin bar + 50 header + 6 + 44 toolbar + 6 + body padding = ~180 */
.tvo-workspace {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: calc(100vh - 200px);
    min-height: 480px;
    overflow: hidden;
}

/* TVs bar (tabs horizontais) — compacta */
.tvo-tvs-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    scrollbar-width: thin;
    flex-shrink: 0;
    min-height: 40px;
}
.tvo-tv-tab {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius-md);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
    white-space: nowrap;
    flex-shrink: 0;
    height: 30px;
}
.tvo-tv-tab:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-tv-tab.active {
    background: rgba(189, 160, 95, 0.12);
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-tv-tab-count {
    background: rgba(189, 160, 95, 0.2);
    color: var(--color-primary-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
}
.tvo-tv-tab.active .tvo-tv-tab-count {
    background: var(--color-primary-hover);
    color: #1a2035;
}
.tvo-btn-add-tv {
    background: transparent !important;
    border: 1px dashed var(--border-color) !important;
    color: var(--text-secondary) !important;
    width: 30px;
    height: 30px;
    justify-content: center;
    padding: 0 !important;
    border-radius: 50% !important;
    font-size: 11px !important;
}
.tvo-btn-add-tv:hover {
    border-color: var(--color-primary-hover) !important;
    color: var(--color-primary-hover) !important;
}

/* Preview main (16:9) — flex pra ocupar resto do workspace */
.tvo-preview-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-height: 0;
}
.tvo-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
    min-height: 32px;
}
.tvo-preview-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-weight-bold);
}
.tvo-preview-label i {
    color: var(--color-primary-hover);
}
.tvo-preview-label strong {
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}
.tvo-preview-sep {
    color: var(--text-muted);
}
.tvo-preview-controls {
    display: flex;
    gap: 6px;
}
.tvo-preview-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
}
.tvo-preview-btn:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}

/* Preview frame: ocupa altura disponível e calcula width via aspect 16:9.
 * Quando workspace é apertado, o frame fica menor mas mantém proporção. */
.tvo-preview-frame {
    flex: 1;
    min-height: 0;
    width: 100%;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tvo-preview-frame::before {
    content: '';
    display: block;
    aspect-ratio: 16 / 9;
    height: 100%;
    max-width: 100%;
    background: #000;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 2px solid #000;
}
/* O preview-stage é absoluto sobreposto, dimensionado pelo tamanho real do frame */
.tvo-preview-stage {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    display: block;
}
/* Default pro preview stage — fundo branco pra nao ficar preto feio */
.tvo-preview-stage:empty::before {
    content: 'Selecione uma lâmina';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ── Cards do preview: clique pra trocar imagem + hold pra arrastar ── */
#tvoPreviewStage .tvo-card,
#tvoPreviewStage .tvo-table-row {
    cursor: grab;
}
#tvoPreviewStage .tvo-card:active,
#tvoPreviewStage .tvo-table-row:active {
    cursor: grabbing;
}
#tvoPreviewStage .tvo-card-dragging,
#tvoPreviewStage .tvo-row-dragging {
    opacity: 0.5;
    background: rgba(189, 160, 95, 0.15) !important;
    border: 2px dashed #bda05f !important;
}

/* ── Click na imagem do produto (apenas no admin preview) ── */
#tvoPreviewStage .tvo-card-image,
#tvoPreviewStage .tvo-table-img,
.tvo-canvas-tile-preview .tvo-card-image,
.tvo-canvas-tile-preview .tvo-table-img {
    cursor: pointer;
}
#tvoPreviewStage .tvo-card-image:hover {
    filter: brightness(0.94);
}
#tvoPreviewStage .tvo-card-image::after {
    content: '\f030 trocar foto';
    font-family: 'Font Awesome 6 Free', 'Inter', sans-serif;
    font-weight: 900;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity .2s, transform .2s;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}
#tvoPreviewStage .tvo-card-image:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Thumbnails das lâminas — compactos */
.tvo-thumbs-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.tvo-thumbs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
}
.tvo-thumbs-title {
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    gap: 6px;
}
.tvo-thumbs-title i { color: var(--color-primary-hover); }
.tvo-thumbs-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 8px 2px;
    scrollbar-width: thin;
}
.tvo-thumb {
    flex: 0 0 130px;
    height: 78px;
    background: #000;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .15s;
}
.tvo-thumb:hover {
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
}
.tvo-thumb.active {
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 0 3px rgba(189,160,95,0.25);
}
.tvo-thumb.dragging {
    opacity: 0.6;
    transform: scale(0.95);
}
.tvo-thumb-mini {
    position: absolute;
    inset: 0;
    transform-origin: top left;
    pointer-events: none;
    overflow: hidden;
}
.tvo-thumb-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
    padding: 4px 8px 3px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}
.tvo-thumb-label i {
    opacity: 0.7;
}
.tvo-thumb.hidden-status::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 4;
}
.tvo-thumb-badge-hidden {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    z-index: 5;
    display: none;
}
.tvo-thumb.hidden-status .tvo-thumb-badge-hidden {
    display: block;
}
.tvo-thumb-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s;
    z-index: 6;
}
.tvo-thumb:hover .tvo-thumb-actions {
    opacity: 1;
}
.tvo-thumb-action {
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.7);
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tvo-thumb-action:hover {
    background: rgba(0,0,0,0.9);
    color: var(--color-primary-hover);
}
.tvo-thumb-action.delete:hover {
    color: #ef4444;
}

/* "Adicionar lâmina" dentro da scroll */
.tvo-thumb-new {
    flex: 0 0 130px;
    height: 78px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .15s;
}
.tvo-thumb-new:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-thumb-new i { font-size: 18px; }


/* ══════════ 5. DRAWER LATERAL ══════════ */
body.toplevel_page_tv-ofertas .tvo-drawer,
body.marketing_page_tv-ofertas .tvo-drawer {
    position: fixed !important;
    top: var(--adminbar-height) !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 420px !important;
    max-width: 420px !important;
    height: calc(100vh - var(--adminbar-height)) !important;
    background: var(--bg-white) !important;
    border-left: 1px solid var(--border-color) !important;
    box-shadow: -4px 0 20px rgba(0,0,0,.3);
    z-index: 50;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transform: none !important;
    border-radius: 0 !important;
}
.tvo-drawer .poster-drawer-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
    flex-shrink: 0;
}
.tvo-drawer .poster-drawer-head h2 {
    margin: 0 !important;
    color: var(--text-primary) !important;
    font-size: 16px !important;
    font-weight: var(--font-weight-bold) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.tvo-drawer .poster-drawer-head h2 i {
    color: var(--color-primary-hover);
    font-size: 14px;
}

/* Body scrollable */
.tvo-drawer .body__filter__page,
.tvo-drawer-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 18px !important;
    scrollbar-width: thin;
}
.tvo-drawer-body::-webkit-scrollbar {
    width: 6px;
}
.tvo-drawer-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Empty state dentro do drawer */
.tvo-drawer-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}
.tvo-drawer-empty i {
    font-size: 32px;
    color: var(--color-primary-hover);
    opacity: 0.4;
    margin-bottom: 12px;
    display: block;
}
.tvo-drawer-empty p {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    margin: 0 0 4px 0;
}
.tvo-drawer-empty small {
    color: var(--text-muted);
    font-size: 11px;
}

/* Sections dentro do drawer */
.tvo-section {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.tvo-section[hidden],
.tvo-field[hidden] { display: none !important; }
.tvo-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.tvo-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary-hover);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-weight-bold);
    margin-bottom: 12px;
}
.tvo-section-title i { font-size: 12px; }
.tvo-section-tv .tvo-section-title {
    color: #22c55e;
}

/* Fields */
.tvo-field {
    margin-bottom: 12px;
}
.tvo-field:last-child {
    margin-bottom: 0;
}
.tvo-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.tvo-label i {
    color: var(--color-primary-hover);
    font-size: 11px;
}
.tvo-badge-count {
    background: var(--color-primary-hover);
    color: #1a2035;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    margin-left: auto;
}

/* Inputs e selects */
.tvo-input,
.tvo-select,
.tvo-drawer input.form-control,
.tvo-drawer select.form-control:not(.selectpicker),
.tvo-drawer input[type="text"],
.tvo-drawer input[type="number"],
.tvo-drawer input[type="datetime-local"] {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    height: 38px !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    transition: border-color .15s, box-shadow .15s;
}

/* #308 item 14 — datetime-local em tema escuro: color-scheme dark força widget nativo em dark mode (ícone + popup legíveis) + picker-indicator clicável em toda área */
.tvo-drawer input[type="datetime-local"] {
    color-scheme: dark;
    cursor: pointer;
    position: relative;
}
.tvo-drawer input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(0.85) brightness(1.2);
    cursor: pointer;
    opacity: 0.85;
    padding: 6px;
    margin-right: -4px;
    transition: opacity .15s, filter .15s;
}
.tvo-drawer input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(0.7) sepia(0.5) saturate(3) hue-rotate(350deg) brightness(1.1);
}
.tvo-input:focus,
.tvo-select:focus,
.tvo-drawer input:focus,
.tvo-drawer select:focus {
    outline: none !important;
    border-color: var(--color-primary-hover) !important;
    box-shadow: 0 0 0 2px rgba(189, 160, 95, 0.2) !important;
}

/* Bootstrap-select (produtos multi) */
.tvo-drawer .bootstrap-select > select.selectpicker,
.tvo-drawer .bootstrap-select > select {
    pointer-events: none !important;
    z-index: -1 !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 100% !important;
    height: 38px !important;
}
.tvo-drawer .bootstrap-select {
    width: 100% !important;
}
.tvo-drawer .bootstrap-select > .dropdown-toggle {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    z-index: 2 !important;
    width: 100% !important;
    position: relative !important;
}
.tvo-drawer .bootstrap-select > .dropdown-toggle:focus,
.tvo-drawer .bootstrap-select.show > .dropdown-toggle {
    border-color: var(--color-primary-hover) !important;
}
.tvo-drawer .bootstrap-select .dropdown-toggle .filter-option {
    position: absolute !important;
    top: 0 !important;
    left: 12px !important;
    right: 32px !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
}
.tvo-drawer .bootstrap-select .dropdown-toggle .filter-option-inner,
.tvo-drawer .bootstrap-select .dropdown-toggle .filter-option-inner-inner {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1 !important;
    font-size: 12px;
    color: var(--text-primary);
}
.bootstrap-select .dropdown-menu {
    background: var(--bg-white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.5) !important;
    overflow: hidden !important;
    padding: 0 !important;
    min-width: 300px !important;
}
.bootstrap-select > .dropdown-menu > div.inner {
    max-height: 320px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
.bootstrap-select > .dropdown-menu > div.inner > ul.dropdown-menu.inner {
    position: static !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    display: block !important;
}
.bootstrap-select .dropdown-menu li > a,
.bootstrap-select .dropdown-menu .dropdown-item {
    color: var(--text-primary) !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    white-space: normal !important;
    word-break: break-word !important;
}
.bootstrap-select .dropdown-menu li > a:hover,
.bootstrap-select .dropdown-menu .dropdown-item:hover {
    background: var(--bg-hover) !important;
    color: var(--color-primary-hover) !important;
}
.bootstrap-select .dropdown-menu li.selected > a {
    background: rgba(189,160,95,0.18) !important;
    color: var(--color-primary-hover) !important;
}
.bootstrap-select .bs-searchbox input {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
}
.bootstrap-select .bs-actionsbox .btn-group button {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
}
.bootstrap-select .bs-actionsbox .btn-group button:hover {
    border-color: var(--color-primary-hover) !important;
    color: var(--color-primary-hover) !important;
}

/* Lista sortable de produtos selecionados */
.tvo-selected-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 6px;
    background: var(--bg-app);
}
.tvo-selected-list::-webkit-scrollbar { width: 6px; }
.tvo-selected-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.tvo-selected-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: default;
    transition: border-color .15s, background .15s;
}
.tvo-selected-item:hover {
    border-color: var(--color-primary-hover);
}
.tvo-selected-item.tvo-selected-dragging {
    opacity: 0.5;
    background: rgba(189, 160, 95, 0.15);
}
.tvo-selected-handle {
    color: var(--text-muted);
    cursor: grab;
    padding: 4px 2px;
    font-size: 11px;
}
.tvo-selected-handle:active { cursor: grabbing; }
.tvo-selected-pos {
    background: var(--color-primary-hover);
    color: #1a2035;
    font-size: 9px;
    font-weight: var(--font-weight-bold);
    padding: 2px 6px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
}
.tvo-selected-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
    flex-shrink: 0;
}
.tvo-selected-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tvo-selected-remove {
    width: 22px;
    height: 22px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all .15s;
    flex-shrink: 0;
}
.tvo-selected-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}
.tvo-field-hint {
    display: block;
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 6px;
    font-style: italic;
}

/* Layout picker (botão que abre modal de templates) */
.tvo-layout-picker {
    width: 100%;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: all .15s;
    min-height: 60px;
}
.tvo-layout-picker:hover {
    border-color: var(--color-primary-hover);
    background: rgba(189, 160, 95, 0.08);
}
.tvo-layout-picker-thumb {
    width: 52px;
    height: 32px;
    background: linear-gradient(135deg, #111423, #1a2035);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.tvo-layout-picker-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tvo-layout-picker-info strong {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: var(--font-weight-bold);
}
.tvo-layout-picker-info small {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tvo-layout-picker > i:last-child {
    color: var(--color-primary-hover);
    font-size: 12px;
}

/* Themes carrossel — 3 visíveis com prev/next */
.tvo-themes-carousel {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tvo-themes-arrow {
    width: 28px;
    height: 64px;
    flex-shrink: 0;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
    padding: 0;
}
.tvo-themes-arrow:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-themes-viewport {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tvo-themes-viewport::-webkit-scrollbar { display: none; }
.tvo-themes-track {
    display: flex;
    gap: 6px;
    padding: 2px;
}
.tvo-theme-swatch {
    flex: 0 0 calc((100% - 12px) / 3);
    min-width: calc((100% - 12px) / 3);
    height: 64px;
    border-radius: var(--border-radius-md);
    border: 2px solid var(--border-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--bg-hover);
    scroll-snap-align: start;
}
.tvo-theme-swatch:hover {
    border-color: var(--color-primary-hover);
    transform: translateY(-1px);
}
.tvo-theme-swatch.active {
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 0 2px rgba(189,160,95,0.35);
}
.tvo-theme-swatch-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
/* Backgrounds dos previews — espelhos dos temas */
.tvo-theme-bg-acougue    { background: linear-gradient(135deg, #4a1206, #7c1d10); }
.tvo-theme-bg-padaria    { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.tvo-theme-bg-hortifruti { background: linear-gradient(135deg, #166534, #22c55e); }
.tvo-theme-bg-frios      { background: linear-gradient(135deg, #1e3a8a, #60a5fa); }
.tvo-theme-bg-bebidas    { background: linear-gradient(135deg, #450a0a, #991b1b); }
.tvo-theme-bg-limpeza    { background: linear-gradient(135deg, #0c4a6e, #06b6d4); }
.tvo-theme-bg-diversos   { background: linear-gradient(135deg, #0f172a, #334155); }
.tvo-theme-bg-promo      { background: linear-gradient(135deg, #facc15, #f97316); color: #1a2035; }
.tvo-theme-bg-minimal    { background: linear-gradient(135deg, #f8fafc, #e2e8f0); color: #1a2035; border: 1px solid #cbd5e1; }
.tvo-theme-bg-personalized { background: linear-gradient(135deg, #6b7280, #374151); }

.tvo-theme-swatch-name {
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 4px;
}
.tvo-theme-swatch.active .tvo-theme-swatch-name {
    color: var(--color-primary-hover);
}
/* ─── Preview da mídia selecionada no drawer ─── */
.tvo-media-preview {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-hover);
    margin-bottom: 8px;
    aspect-ratio: 16/9;
}
.tvo-media-preview img,
.tvo-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tvo-media-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(239,68,68,0.95);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform .15s;
}
.tvo-media-remove:hover { transform: scale(1.1); }
.tvo-media-change {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(8px);
    transition: background .15s;
}
.tvo-media-change:hover { background: rgba(0,0,0,0.9); }

/* ─── QR de senha remota na lâmina ─── */
/* ─── QR compacto ao lado da senha (no head e nos badges flutuantes) ─── */
/* Grupo head: senha + QR lado a lado no canto direito do renderHead */
.tvo-render-head-senha-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tvo-render-head-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.tvo-render-head-qr img {
    width: 100px;
    height: 100px;
    display: block;
    border-radius: 8px;
}
.tvo-render-head-qr small {
    font-size: 11px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
}

/* Grupo flutuante (full-single, table-hero): senha + QR empilhados no canto */
.tvo-layout-render .tvo-render-senha-group {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 30;
}
.tvo-layout-render .tvo-render-senha-group .tvo-render-senha-badge {
    position: static;
}
.tvo-layout-render .tvo-render-qr-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}
.tvo-layout-render .tvo-render-qr-badge img {
    width: 100px;
    height: 100px;
    display: block;
    border-radius: 8px;
}
.tvo-layout-render .tvo-render-qr-badge small {
    font-size: 11px;
    font-weight: 800;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
}

/* ─── Grid de presets de imagem de fundo (por categoria) ─── */
.tvo-bg-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}
.tvo-bg-preset {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
    transition: all .15s;
}
.tvo-bg-preset:hover { border-color: var(--color-primary-hover); transform: translateY(-1px); }
.tvo-bg-preset.active {
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 0 2px rgba(189,160,95,0.4);
}
.tvo-bg-preset img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Dropdown "Mais links da TV" ─── */
.tvo-open-group { position: relative; display: inline-flex; }
.tvo-open-group .ecom-hbtn-primary { border-radius: 8px 0 0 8px; }
.tvo-open-group .tvo-open-caret { border-radius: 0 8px 8px 0; padding: 0 10px; border-left: 1px solid rgba(0,0,0,0.15); }
.tvo-open-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #1a2035;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-width: 280px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    z-index: 1000;
    padding: 6px;
}
.tvo-open-menu a,
.tvo-open-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.tvo-open-menu a:hover,
.tvo-open-menu button:hover { background: rgba(189,160,95,0.15); color: var(--color-primary-hover); }
.tvo-open-menu i { width: 18px; color: var(--color-primary-hover); }

/* ─── Animações in-card (data-card-anim no .tvo-layout-render) ─── */
@keyframes tvoPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
@keyframes tvoShake {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-3deg); }
    75%      { transform: rotate(3deg); }
}
@keyframes tvoGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(189,160,95,0); }
    50%      { box-shadow: 0 0 0 8px rgba(189,160,95,0.4); }
}
@keyframes tvoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes tvoZoomIn {
    from { transform: scale(0.95); opacity: 0.85; }
    to   { transform: scale(1);    opacity: 1; }
}
.tvo-layout-render[data-card-anim="pulse"] .tvo-card-price-por,
.tvo-layout-render[data-card-anim="pulse"] .tvo-table-price-por {
    animation: tvoPulse 1.4s ease-in-out infinite;
    transform-origin: center;
    display: inline-block;
}
.tvo-layout-render[data-card-anim="shake"] .tvo-card-badge,
.tvo-layout-render[data-card-anim="shake"] .tvo-table-badge {
    animation: tvoShake 0.6s ease-in-out infinite;
    display: inline-block;
}
.tvo-layout-render[data-card-anim="glow"] .tvo-card,
.tvo-layout-render[data-card-anim="glow"] .tvo-table-row {
    animation: tvoGlow 2s ease-in-out infinite;
}
.tvo-layout-render[data-card-anim="float"] .tvo-card {
    animation: tvoFloat 3s ease-in-out infinite;
}
.tvo-layout-render[data-card-anim="zoom-in"] .tvo-card {
    animation: tvoZoomIn 1.6s ease-out infinite alternate;
}

.tvo-theme-hint {
    color: var(--text-muted);
    font-size: 11px;
    font-style: italic;
    margin: 6px 0 0 0;
    text-align: center;
    min-height: 16px;
}

/* Media picker */
.tvo-media-picker {
    width: 100%;
    background: var(--bg-hover);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    transition: all .15s;
}
.tvo-media-picker:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-media-picker i {
    font-size: 22px;
}
.tvo-media-picker span {
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
}

/* Toggle compacto e bem alinhado */
.tvo-toggle-group {
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    width: 100%;
}
.tvo-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    width: 100%;
    margin: 0;
    position: relative;
}
.tvo-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.tvo-toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--border-color);
    border-radius: 11px;
    transition: background .2s;
    flex-shrink: 0;
    display: inline-block;
}
.tvo-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s, background .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.tvo-toggle input:checked + .tvo-toggle-slider {
    background: #22c55e;
}
.tvo-toggle input:checked + .tvo-toggle-slider::before {
    transform: translateX(18px);
}
.tvo-toggle-label {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    line-height: 22px;
    flex: 1;
}

/* Footer drawer */
.tvo-drawer .foot__filter__page,
.tvo-drawer-foot {
    padding: 12px 16px !important;
    background: var(--bg-white) !important;
    border-top: 1px solid var(--border-color) !important;
    display: flex !important;
    gap: 8px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
}
.tvo-drawer .btn__default {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: var(--font-weight-semibold) !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1 !important;
    justify-content: center !important;
    margin: 0 !important;
    cursor: pointer;
    transition: all .15s;
}
.tvo-drawer .btn__default:hover {
    border-color: var(--color-primary-hover) !important;
    color: var(--color-primary-hover) !important;
}
.tvo-drawer .btn__default.full {
    background: var(--color-primary-hover) !important;
    color: #1a2035 !important;
    border-color: var(--color-primary-hover) !important;
    flex: 2 !important;
}
.tvo-drawer .btn__default.full:hover {
    background: var(--color-primary-light) !important;
    color: #1a2035 !important;
}


/* ══════════ 6. MODAIS ══════════ */
.tvo-modal-content {
    background: var(--bg-white) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
}
.tvo-modal-header {
    background: var(--bg-white) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px 20px !important;
}
.tvo-modal-header .modal-title {
    color: var(--text-primary) !important;
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    gap: 10px;
}
.tvo-modal-header .modal-title i {
    color: var(--color-primary-hover);
}
.tvo-modal-content .modal-body {
    padding: 20px;
    color: var(--text-primary);
}

/* Layout grid no modal */
.tvo-layout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.tvo-layout-card {
    background: var(--bg-hover);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
}
.tvo-layout-card:hover {
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
}
.tvo-layout-card.active {
    border-color: var(--color-primary-hover);
    background: rgba(189,160,95,0.1);
    box-shadow: 0 0 0 3px rgba(189,160,95,0.15);
}
.tvo-layout-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #111423, #1a2035);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.tvo-layout-card-name {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 4px 0;
}
.tvo-layout-card-desc {
    color: var(--text-secondary);
    font-size: 10px;
    margin: 0;
    line-height: 1.3;
}

/* ── Thumbs SVG-like de cada layout (desenhados em CSS puro) ── */
.tvo-layout-card-thumb[data-layout="classic"]::before {
    content: ''; position: absolute; left: 8px; right: 8px; top: 8px; height: 18%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="classic"]::after {
    content: ''; position: absolute; left: 8px; right: 8px; top: 32%; bottom: 8px;
    background:
        repeating-linear-gradient(to right,
            rgba(255,255,255,0.35) 0 22%,
            transparent 22% 25%,
            rgba(255,255,255,0.35) 25% 47%,
            transparent 47% 50%,
            rgba(255,255,255,0.35) 50% 72%,
            transparent 72% 75%,
            rgba(255,255,255,0.35) 75% 97%);
    border-radius: 2px;
}
.tvo-layout-card-thumb[data-layout="sidebar-grid"]::before {
    content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 20%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="sidebar-grid"]::after {
    content: ''; position: absolute; left: calc(20% + 14px); right: 8px; top: 8px; bottom: 8px;
    background:
        radial-gradient(circle, rgba(255,255,255,0.4) 40%, transparent 45%) top left / 32% 45% no-repeat,
        radial-gradient(circle, rgba(255,255,255,0.4) 40%, transparent 45%) top center / 32% 45% no-repeat,
        radial-gradient(circle, rgba(255,255,255,0.4) 40%, transparent 45%) top right / 32% 45% no-repeat,
        radial-gradient(circle, rgba(255,255,255,0.4) 40%, transparent 45%) bottom left / 32% 45% no-repeat,
        radial-gradient(circle, rgba(255,255,255,0.4) 40%, transparent 45%) bottom center / 32% 45% no-repeat,
        radial-gradient(circle, rgba(255,255,255,0.4) 40%, transparent 45%) bottom right / 32% 45% no-repeat;
}
.tvo-layout-card-thumb[data-layout="hero-satellites"]::before {
    content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 55%;
    background: rgba(255,255,255,0.35); border-radius: 3px;
}
.tvo-layout-card-thumb[data-layout="hero-satellites"]::after {
    content: ''; position: absolute; right: 8px; top: 8px; bottom: 8px; width: 38%;
    background:
        linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)) top / 100% 30% no-repeat,
        linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)) center / 100% 30% no-repeat,
        linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)) bottom / 100% 30% no-repeat;
    border-radius: 2px;
}
.tvo-layout-card-thumb[data-layout="kpi-split"]::before {
    content: ''; position: absolute; left: 8px; right: 8px; top: 8px; height: 14%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="kpi-split"]::after {
    content: ''; position: absolute; left: 8px; right: 8px; top: 26%; bottom: 8px;
    background:
        repeating-linear-gradient(to right, rgba(255,255,255,0.35) 0 30%, transparent 30% 33%) top / 100% 50% no-repeat,
        repeating-linear-gradient(0deg, rgba(255,255,255,0.35) 0 4px, transparent 4px 8px) bottom / 100% 46% no-repeat;
    border-radius: 2px;
}
.tvo-layout-card-thumb[data-layout="full-single"]::before {
    content: ''; position: absolute; inset: 15% 25%;
    background: rgba(255,255,255,0.4); border-radius: 4px;
}
.tvo-layout-card-thumb[data-layout="full-single"]::after {
    content: ''; position: absolute; left: 25%; right: 25%; bottom: 10%; height: 8%;
    background: var(--color-primary-hover); border-radius: 2px;
}
.tvo-layout-card-thumb[data-layout="media"]::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.4), transparent 60%),
        linear-gradient(45deg, rgba(189,160,95,0.3), rgba(34,197,94,0.3));
}
.tvo-layout-card-thumb[data-layout="media"]::after {
    content: '\f04b'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.9); font-size: 22px;
}

/* ── Thumbnails dos 5 layouts de TABELA ── */
/* table-classic: 1 tabela única — header dourado fino + 4 linhas horizontais */
.tvo-layout-card-thumb[data-layout="table-classic"]::before {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 8px; height: 18%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="table-classic"]::after {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 32%; bottom: 8px;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255,255,255,0.5) 0 14%,
            rgba(255,255,255,0.15) 14% 16%,
            rgba(255,255,255,0.5) 16% 30%,
            rgba(255,255,255,0.15) 30% 32%,
            rgba(255,255,255,0.5) 32% 46%,
            rgba(255,255,255,0.15) 46% 48%,
            rgba(255,255,255,0.5) 48% 62%
        );
    border-radius: 3px;
}

/* table-dual: 2 tabelas lado a lado com divider */
.tvo-layout-card-thumb[data-layout="table-dual"]::before {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 8px; height: 14%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="table-dual"]::after {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 28%; bottom: 8px;
    background:
        repeating-linear-gradient(to bottom, rgba(255,255,255,0.5) 0 22%, transparent 22% 28%) left / 47% 100% no-repeat,
        repeating-linear-gradient(to bottom, rgba(255,255,255,0.5) 0 22%, transparent 22% 28%) right / 47% 100% no-repeat;
    border-radius: 3px;
}

/* table-hero: hero gigante esquerda + tabela direita */
.tvo-layout-card-thumb[data-layout="table-hero"]::before {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 8px; height: 14%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="table-hero"]::after {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 28%; bottom: 8px;
    background:
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)) left / 42% 100% no-repeat,
        repeating-linear-gradient(to bottom, rgba(255,255,255,0.45) 0 18%, transparent 18% 22%) right / 53% 100% no-repeat;
    border-radius: 3px;
}

/* table-sidebar: sidebar dourada esquerda + tabela direita */
.tvo-layout-card-thumb[data-layout="table-sidebar"]::before {
    content: ''; position: absolute;
    left: 8px; top: 8px; bottom: 8px; width: 22%;
    background: var(--color-primary-hover); border-radius: 2px; opacity: 0.9;
}
.tvo-layout-card-thumb[data-layout="table-sidebar"]::after {
    content: ''; position: absolute;
    left: calc(22% + 14px); right: 8px; top: 8px; bottom: 8px;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.5) 0 16%, transparent 16% 20%);
    border-radius: 3px;
}

/* table-promo-strip: 3 cards topo + tabela embaixo */
.tvo-layout-card-thumb[data-layout="table-promo-strip"]::before {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 8px; height: 30%;
    background:
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)) left / 31% 100% no-repeat,
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)) center / 31% 100% no-repeat,
        linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)) right / 31% 100% no-repeat;
    border-radius: 3px;
}
.tvo-layout-card-thumb[data-layout="table-promo-strip"]::after {
    content: ''; position: absolute;
    left: 8px; right: 8px; top: 44%; bottom: 8px;
    background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.4) 0 20%, transparent 20% 25%);
    border-radius: 3px;
}


/* Modal TVs list */
.tvo-tvs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}
.tvo-tv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: border-color .15s;
}
.tvo-tv-item:hover {
    border-color: var(--color-primary-hover);
}
.tvo-tv-item-icon {
    width: 36px;
    height: 36px;
    background: rgba(189, 160, 95, 0.12);
    color: var(--color-primary-hover);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.tvo-tv-item-info {
    flex: 1;
    min-width: 0;
}
.tvo-tv-item-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    margin: 0;
}
.tvo-tv-item-meta {
    color: var(--text-secondary);
    font-size: 11px;
    margin: 2px 0 0 0;
}
.tvo-tv-item-actions {
    display: flex;
    gap: 4px;
}
.tvo-tv-item-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
}
.tvo-tv-item-btn:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-tv-item-btn.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}
.tvo-tvs-new {
    display: flex;
    gap: 8px;
    align-items: stretch;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.tvo-tvs-new input {
    flex: 1;
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    height: 38px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
    box-sizing: border-box !important;
}
.tvo-tvs-new input:focus {
    outline: none !important;
    border-color: var(--color-primary-hover) !important;
}
/* Botão "Criar TV" alinhado com o input (mesma altura, mesmo border-radius, mesma tipografia) */
.tvo-tvs-new .ecom-hbtn {
    height: 38px !important;
    border-radius: var(--border-radius-md) !important;
    padding: 0 14px !important;
    font-size: 12px !important;
    font-weight: var(--font-weight-semibold) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all .15s ease;
}
.tvo-tvs-new .ecom-hbtn.ecom-hbtn-primary {
    background: var(--color-primary-hover);
    color: #1a2035;
    border-color: var(--color-primary-hover);
}
.tvo-tvs-new .ecom-hbtn.ecom-hbtn-primary:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
}

/* Modal Open TV */
.tvo-open-tv-desc {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.tvo-open-tv-urls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tvo-open-tv-url label {
    display: block;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.tvo-open-tv-input-group {
    display: flex;
    gap: 6px;
}
.tvo-open-tv-input-group input {
    flex: 1;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    height: 38px;
    padding: 8px 12px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}
.tvo-open-tv-input-group .btn__default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    white-space: nowrap;
}
.tvo-open-tv-input-group .tvo-copy-btn.copied {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
.tvo-open-tv-input-group .tvo-copy-btn.copied i::before {
    content: "\f00c"; /* fa-check */
}


/* ══════════ 7. CANVAS VIEW ══════════ */
.tvo-canvas {
    position: fixed;
    inset: var(--adminbar-height) 0 0 var(--sidebar-width);
    background: #0a0e1a;
    z-index: 999;
    display: flex;
    flex-direction: column;
}
body.folded .tvo-canvas {
    inset: var(--adminbar-height) 0 0 36px;
}
.tvo-canvas-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    gap: 16px;
}
.tvo-canvas-topbar-left,
.tvo-canvas-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tvo-canvas-topbar-center {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px;
}
.tvo-canvas-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tvo-canvas-title i {
    color: var(--color-primary-hover);
}
.tvo-canvas-title span {
    color: var(--color-primary-hover);
}
.tvo-canvas-zoom-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all .15s;
}
.tvo-canvas-zoom-btn:hover {
    background: var(--color-primary-hover);
    color: #1a2035;
}
.tvo-canvas-zoom-value {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    padding: 0 10px;
    min-width: 46px;
    text-align: center;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}
.tvo-canvas-hint {
    background: rgba(189, 160, 95, 0.12);
    color: var(--color-primary-hover);
    border-bottom: 1px solid rgba(189, 160, 95, 0.25);
    padding: 8px 20px;
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.tvo-canvas-hint i {
    font-size: 12px;
}
.tvo-canvas-viewport {
    flex: 1;
    overflow: auto;
    background:
        radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 24px 24px;
    position: relative;
}
.tvo-canvas-board {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    align-content: start;
    transform-origin: top left;
    transition: transform .2s ease;
    min-height: 100%;
}
.tvo-canvas-tile {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    cursor: grab;
    transition: all .2s;
    position: relative;
    user-select: none;
}
.tvo-canvas-tile:hover {
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.tvo-canvas-tile.dragging {
    opacity: 0.5;
    cursor: grabbing;
}
.tvo-canvas-tile.drop-target {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.3);
}
.tvo-canvas-tile-head {
    padding: 8px 12px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.tvo-canvas-tile-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    flex: 1;
    min-width: 0;
}
.tvo-canvas-tile-title i {
    color: var(--color-primary-hover);
    font-size: 11px;
}
.tvo-canvas-tile-layout-badge {
    background: rgba(189, 160, 95, 0.15);
    color: var(--color-primary-hover);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}
.tvo-canvas-tile-actions {
    display: flex;
    gap: 4px;
}
.tvo-canvas-tile-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all .15s;
}
.tvo-canvas-tile-btn:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
}
.tvo-canvas-tile-btn.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}
.tvo-canvas-tile-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    overflow: hidden;
}
.tvo-canvas-tile-preview-inner {
    position: absolute;
    inset: 0;
    transform-origin: top left;
    pointer-events: none;
}
.tvo-canvas-tile-foot {
    padding: 8px 12px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}
.tvo-canvas-tile-foot span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tvo-canvas-tile-foot i {
    color: var(--color-primary-hover);
    font-size: 10px;
}

/* Botão "nova lâmina" no fim do canvas */
.tvo-canvas-tile-new {
    min-height: 260px;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all .2s;
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
}
.tvo-canvas-tile-new:hover {
    border-color: var(--color-primary-hover);
    color: var(--color-primary-hover);
    background: rgba(189,160,95,0.05);
}
.tvo-canvas-tile-new i {
    font-size: 32px;
}


/* ══════════ 8. PREVIEW INTERNO DE CADA LAYOUT (mini-render) ══════════
 * Os preview-stage (no workspace) e canvas-tile-preview-inner (no canvas)
 * usam MESMO HTML de render — escalado via transform.
 * ============================================================ */

.tvo-layout-render {
    width: 1920px;
    height: 1080px;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    font-family: 'Archivo Black', 'Inter', sans-serif;
    color: #111;
    box-sizing: border-box;
}
/* Garante que NENHUM filho estoure pra fora do 1920×1080 */
.tvo-layout-render *,
.tvo-layout-render *::before,
.tvo-layout-render *::after {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
}
/* Background por tema — gradientes ricos com patterns sugestivos via radial overlays */
.tvo-layout-render[data-tvo-theme="acougue"] {
    background:
        radial-gradient(ellipse at top left, rgba(220, 38, 38, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(0, 0, 0, 0.4), transparent 60%),
        linear-gradient(135deg, #4a1206 0%, #7c1d10 50%, #4a1206 100%);
}
.tvo-layout-render[data-tvo-theme="padaria"] {
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.5), transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.25), transparent 50%),
        linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
}
.tvo-layout-render[data-tvo-theme="diversos"] {
    background:
        radial-gradient(ellipse at top, rgba(189, 160, 95, 0.12), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(0, 0, 0, 0.5), transparent 60%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
.tvo-layout-render[data-tvo-theme="hortifruti"] {
    background:
        radial-gradient(circle at 70% 30%, rgba(132, 204, 22, 0.4), transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(34, 197, 94, 0.3), transparent 50%),
        linear-gradient(135deg, #14532d 0%, #166534 50%, #14532d 100%);
}
.tvo-layout-render[data-tvo-theme="frios"] {
    background:
        radial-gradient(ellipse at top right, rgba(255, 255, 255, 0.25), transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(96, 165, 250, 0.4), transparent 60%),
        linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #1e3a8a 100%);
}
.tvo-layout-render[data-tvo-theme="bebidas"] {
    background:
        radial-gradient(ellipse at top, rgba(220, 38, 38, 0.3), transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(0, 0, 0, 0.5), transparent 50%),
        linear-gradient(135deg, #450a0a 0%, #7f1d1d 50%, #450a0a 100%);
}
.tvo-layout-render[data-tvo-theme="limpeza"] {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.4), transparent 50%),
        linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #0c4a6e 100%);
}
.tvo-layout-render[data-tvo-theme="promo"] {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.4), transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(249, 115, 22, 0.5), transparent 60%),
        linear-gradient(135deg, #facc15 0%, #fb923c 50%, #f97316 100%);
}
.tvo-layout-render[data-tvo-theme="minimal"] {
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.04), transparent 50%),
        #f8fafc;
}
.tvo-layout-render[data-tvo-theme="personalized"] {
    background: #0f172a;
}
/* Background image funciona em QUALQUER tema. Sem overlay escuro — fundo limpo.
   (No front-view o slot fica transparente e o body-bg mostra a imagem; esta regra
   é usada no admin preview que não tem body-bg.) */
.tvo-layout-render[data-bg] {
    background-image: var(--tvo-bg-image) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* ✅ v4.10.2 — Tema NÃO altera cor global, apenas backgrounds.
 * Cor branca foi removida do .tvo-layout-render — agora tudo herda
 * #111 (definido na regra base) e cada elemento com fundo escuro
 * (sidebar.senha, head, etc.) define sua cor explicitamente. */

/* ── Header comum (logo + senha) ──
 * Tem fundo escuro (gradient) — sempre texto branco. */
.tvo-render-head {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 130px;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    z-index: 10;
    background: transparent;
    color: #fff;
}
.tvo-render-head * { color: #fff; }
.tvo-render-head-logo-placeholder {
    width: 1px;
    height: 1px;
}
.tvo-render-head-logo {
    display: flex;
    align-items: center;
    gap: 18px;
}
.tvo-render-head-logo img {
    max-height: 90px;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.tvo-render-head-storename {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: inherit;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.tvo-render-head-senha {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1a1a1a;
    padding: 18px 36px;
    border-radius: 20px;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.tvo-render-head-senha small {
    font-size: 22px;
    opacity: 0.85;
    font-weight: 900;
}
.tvo-render-head-senha strong {
    font-size: 72px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* ── Grid de produtos moderno (reutilizado por vários layouts) ── */
.tvo-render-grid {
    position: absolute;
    top: 150px;
    bottom: 40px;
    left: 40px;
    right: 40px;
    display: grid;
    gap: 18px;
    align-content: stretch;
}
.tvo-render-grid[data-cols="1"] { grid-template-columns: 1fr; }
.tvo-render-grid[data-cols="2"] { grid-template-columns: 1fr 1fr; }
.tvo-render-grid[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.tvo-render-grid[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }

.tvo-render-grid[data-rows="1"] { grid-template-rows: 1fr; }
.tvo-render-grid[data-rows="2"] { grid-template-rows: 1fr 1fr; }
.tvo-render-grid[data-rows="3"] { grid-template-rows: repeat(3, 1fr); }

/* ── CARD MODERNO (o coração do redesign) ──
 * IMPORTANTE: cores forçadas com !important porque o tema do .tvo-layout-render
 * (que aplica color:#fff em fundos escuros como acougue/diversos/bebidas) tem
 * especificidade maior que .tvo-card e fazia o texto sumir no fundo branco do card.
 */
.tvo-card {
    background: #fff;
    border-radius: 28px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* Depth layering em 3 camadas: sombra longa, sombra média e highlight interno branco.
       Técnica premium de menu boards Starbucks/McDonald's digital — cria sensação de
       moldura flutuante em vez de retângulo chapado. */
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.28),
        0 8px 16px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 0 1px rgba(0, 0, 0, 0.04);
    border: none;
    position: relative;
    overflow: hidden;
    color: #111 !important;
    min-height: 0;
    min-width: 0;
}
.tvo-layout-render .tvo-card,
.tvo-layout-render .tvo-card * {
    color: #111;
}
/* Stripe horizontal no topo (era um simples gradient) */
.tvo-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, transparent, var(--tvo-accent, #bda05f), transparent);
}

/* ── ENTRADA com stagger — cards/linhas surgem com leve atraso entre cada um ── */
@keyframes tvoCardStaggerIn {
    0%   { opacity: 0; transform: translateY(24px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tvoRowStaggerIn {
    0%   { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}
.tvo-stage-slot.active .tvo-card,
#tvoPreviewStage .tvo-card,
#tvoPreviewStage.tvo-anim-replay .tvo-card {
    animation: tvoCardStaggerIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
/* nth-child funciona pq os cards são filhos diretos de .tvo-render-grid (que é o pai natural) */
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(1),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(1)  { animation-delay: 0.05s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(2),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(2)  { animation-delay: 0.12s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(3),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(3)  { animation-delay: 0.19s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(4),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(4)  { animation-delay: 0.26s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(5),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(5)  { animation-delay: 0.33s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(6),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(6)  { animation-delay: 0.40s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(7),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(7)  { animation-delay: 0.47s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(8),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(8)  { animation-delay: 0.54s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(9),  #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(9)  { animation-delay: 0.61s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(10), #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(10) { animation-delay: 0.68s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(11), #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(11) { animation-delay: 0.75s; }
.tvo-stage-slot.active .tvo-render-grid > .tvo-card:nth-child(12), #tvoPreviewStage .tvo-render-grid > .tvo-card:nth-child(12) { animation-delay: 0.82s; }

.tvo-stage-slot.active .tvo-table-row,
#tvoPreviewStage .tvo-table-row,
#tvoPreviewStage.tvo-anim-replay .tvo-table-row {
    animation: tvoRowStaggerIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
/* nth-child no tbody filho funciona pq cada tbody só contém .tvo-table-row */
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(1),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(1)  { animation-delay: 0.04s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(2),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(2)  { animation-delay: 0.08s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(3),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(3)  { animation-delay: 0.12s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(4),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(4)  { animation-delay: 0.16s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(5),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(5)  { animation-delay: 0.20s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(6),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(6)  { animation-delay: 0.24s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(7),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(7)  { animation-delay: 0.28s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(8),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(8)  { animation-delay: 0.32s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(9),  #tvoPreviewStage tbody > .tvo-table-row:nth-child(9)  { animation-delay: 0.36s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(10), #tvoPreviewStage tbody > .tvo-table-row:nth-child(10) { animation-delay: 0.40s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(11), #tvoPreviewStage tbody > .tvo-table-row:nth-child(11) { animation-delay: 0.44s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(12), #tvoPreviewStage tbody > .tvo-table-row:nth-child(12) { animation-delay: 0.48s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(13), #tvoPreviewStage tbody > .tvo-table-row:nth-child(13) { animation-delay: 0.52s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(14), #tvoPreviewStage tbody > .tvo-table-row:nth-child(14) { animation-delay: 0.56s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(15), #tvoPreviewStage tbody > .tvo-table-row:nth-child(15) { animation-delay: 0.60s; }
.tvo-stage-slot.active tbody > .tvo-table-row:nth-child(16), #tvoPreviewStage tbody > .tvo-table-row:nth-child(16) { animation-delay: 0.64s; }
/* NOVO: Stripe vertical accent na borda esquerda — identidade premium */
.tvo-card::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 0;
    bottom: 0;
    width: 6px;
    background: var(--tvo-accent, #bda05f);
    opacity: 0.85;
}
.tvo-layout-render[data-tvo-theme="acougue"]    .tvo-card { --tvo-accent: #dc2626; }
.tvo-layout-render[data-tvo-theme="padaria"]    .tvo-card { --tvo-accent: #f59e0b; }
.tvo-layout-render[data-tvo-theme="diversos"]   .tvo-card { --tvo-accent: #bda05f; }
.tvo-layout-render[data-tvo-theme="hortifruti"] .tvo-card { --tvo-accent: #22c55e; }
.tvo-layout-render[data-tvo-theme="frios"]      { }
.tvo-layout-render[data-tvo-theme="frios"]      .tvo-card { --tvo-accent: #3b82f6; }
.tvo-layout-render[data-tvo-theme="bebidas"]    .tvo-card { --tvo-accent: #991b1b; }
.tvo-layout-render[data-tvo-theme="limpeza"]    .tvo-card { --tvo-accent: #06b6d4; }
.tvo-layout-render[data-tvo-theme="promo"]      .tvo-card { --tvo-accent: #f97316; }
.tvo-layout-render[data-tvo-theme="minimal"]    .tvo-card { --tvo-accent: #111827; }
/* Tema personalized usa --color-brand do tema do cliente (injetado globalmente) */
.tvo-layout-render[data-tvo-theme="personalized"] .tvo-card,
.tvo-layout-render[data-tvo-theme="personalized"] .tvo-table-wrap,
.tvo-layout-render[data-tvo-theme="personalized"] .tvo-sidebar,
.tvo-layout-render[data-tvo-theme="personalized"] {
    --tvo-accent: var(--color-brand, #bda05f);
}

.tvo-card-image {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 16px;
    overflow: hidden;
    padding: 12px;
    position: relative;
}
.tvo-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.tvo-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc2626;
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
    z-index: 3;
    overflow: hidden;
}
/* Shimmer animado nos badges — efeito premium */
.tvo-card-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: badgeShimmer 2.6s infinite;
}
@keyframes badgeShimmer {
    0%   { left: -100%; }
    50%  { left: 100%; }
    100% { left: 100%; }
}
.tvo-card-badge.clube {
    background: #facc15;
    color: #1a1a1a;
    box-shadow: 0 4px 14px rgba(250, 204, 21, 0.45);
}
.tvo-layout-render .tvo-card .tvo-card-name {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
    color: #111 !important;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tvo-card-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 20px 18px;
    background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
    border: 2px solid rgba(0, 0, 0, 0.04);
    border-radius: 18px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
}
.tvo-layout-render .tvo-card .tvo-card-price-de {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #6b7280 !important;
}
.tvo-layout-render .tvo-card .tvo-card-price-de .label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: #6b7280 !important;
}
.tvo-layout-render .tvo-card .tvo-card-price-de .value {
    font-size: 24px;
    font-weight: 900;
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    text-decoration-thickness: 2px;
    color: #6b7280 !important;
}
.tvo-layout-render .tvo-card .tvo-card-price-por {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--tvo-accent, #bda05f) !important;
}
.tvo-layout-render .tvo-card .tvo-card-price-por .label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--tvo-accent, #bda05f) !important;
}
.tvo-layout-render .tvo-card .tvo-card-price-por .value {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    /* Glow do preço — emana a cor do accent por trás do número.
       Técnica de menu boards premium pra destacar o valor como "hero" do card. */
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.12),
        0 0 24px color-mix(in srgb, var(--tvo-accent, #bda05f) 35%, transparent);
    color: var(--tvo-accent, #bda05f) !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
}
.tvo-layout-render .tvo-card .tvo-card-price-por .value small {
    font-size: 22px;
    opacity: 0.9;
    color: inherit !important;
}
.tvo-card-only .tvo-card-price-por .value { font-size: 56px; }

/* Tamanhos de card por quantidade de produtos */
.tvo-render-grid[data-count="1"] .tvo-card-name { font-size: 56px; }
.tvo-render-grid[data-count="1"] .tvo-card-price-por .value { font-size: 72px; }
.tvo-render-grid[data-count="2"] .tvo-card-name { font-size: 44px; }
.tvo-render-grid[data-count="2"] .tvo-card-price-por .value { font-size: 60px; }
.tvo-render-grid[data-count="3"] .tvo-card-name { font-size: 36px; }
.tvo-render-grid[data-count="3"] .tvo-card-price-por .value { font-size: 52px; }
.tvo-render-grid[data-count="4"] .tvo-card-name { font-size: 32px; }
.tvo-render-grid[data-count="4"] .tvo-card-price-por .value { font-size: 48px; }
.tvo-render-grid[data-count="5"] .tvo-card-name,
.tvo-render-grid[data-count="6"] .tvo-card-name { font-size: 34px; }
.tvo-render-grid[data-count="5"] .tvo-card-price-por .value,
.tvo-render-grid[data-count="6"] .tvo-card-price-por .value { font-size: 56px; }
.tvo-render-grid[data-count="7"] .tvo-card-name,
.tvo-render-grid[data-count="8"] .tvo-card-name,
.tvo-render-grid[data-count="9"] .tvo-card-name { font-size: 30px; }
.tvo-render-grid[data-count="7"] .tvo-card-price-por .value,
.tvo-render-grid[data-count="8"] .tvo-card-price-por .value,
.tvo-render-grid[data-count="9"] .tvo-card-price-por .value { font-size: 48px; }
.tvo-render-grid[data-count="10"] .tvo-card-name,
.tvo-render-grid[data-count="11"] .tvo-card-name,
.tvo-render-grid[data-count="12"] .tvo-card-name { font-size: 26px; }
.tvo-render-grid[data-count="10"] .tvo-card-price-por .value,
.tvo-render-grid[data-count="11"] .tvo-card-price-por .value,
.tvo-render-grid[data-count="12"] .tvo-card-price-por .value { font-size: 40px; }


/* ── LAYOUT: SIDEBAR-GRID ── */
.tvo-render-sidebar-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    padding: 32px;
    width: 100%;
    height: 100%;
}
.tvo-layout-render .tvo-sidebar {
    background: #fff !important;
    border-radius: 24px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: #111 !important;
    border: 1px solid #e5e7eb;
    border-left: 6px solid var(--tvo-accent, #bda05f);
    overflow: hidden;
    position: relative;
}
/* Camada sutil de tinta accent atrás da sidebar — identidade do tema */
.tvo-layout-render .tvo-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--tvo-accent, #bda05f);
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}
.tvo-layout-render .tvo-sidebar > * { position: relative; z-index: 1; }
.tvo-layout-render .tvo-sidebar * { color: #111; }
.tvo-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
    min-height: 140px;
    border: 1px solid #e5e7eb;
}
.tvo-sidebar-logo img {
    max-width: 100%;
    max-height: 110px;
    object-fit: contain;
}
.tvo-sidebar-storename {
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #111;
    margin: 0;
}
.tvo-sidebar-sep {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
}
.tvo-layout-render .tvo-sidebar-widget {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}
.tvo-layout-render .tvo-sidebar-widget .label {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: #6b7280 !important;
    margin: 0 0 4px 0;
}
.tvo-layout-render .tvo-sidebar-widget .value {
    font-size: 52px;
    font-weight: 900;
    color: #111 !important;
    margin: 0;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.tvo-layout-render .tvo-sidebar-widget.senha {
    background: linear-gradient(135deg, #facc15, #eab308) !important;
    border-color: #facc15;
    box-shadow: 0 6px 20px rgba(250, 204, 21, 0.3);
}
.tvo-layout-render .tvo-sidebar-widget.senha .label,
.tvo-layout-render .tvo-sidebar-widget.senha .value {
    color: #1a1a1a !important;
}
.tvo-layout-render .tvo-sidebar-widget.senha .value {
    font-size: 72px;
}
.tvo-sidebar-qr {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.tvo-sidebar-qr img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    object-fit: contain;
}
.tvo-sidebar-qr small {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    font-weight: 700;
    line-height: 1.3;
}
.tvo-render-sidebar-grid .tvo-main {
    min-width: 0;
}
.tvo-render-sidebar-grid .tvo-render-grid {
    position: static;
    height: 100%;
}


/* ── LAYOUT: HERO + SATELLITES ── */
.tvo-render-hero-satellites {
    position: absolute;
    top: 150px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    display: grid;
    grid-template-columns: 58% 1fr;
    gap: 24px;
}
.tvo-hero-main {
    background: #fff;
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    position: relative;
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    color: #111;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}
.tvo-hero-main::before {
    content: 'DESTAQUE';
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--tvo-accent, #bda05f);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.tvo-hero-main .tvo-card {
    flex: 1;
    width: 100%;
    min-height: 0;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    gap: 14px;
}
.tvo-hero-main .tvo-card::before { display: none !important; }
.tvo-hero-main .tvo-card-image {
    background: transparent !important;
    padding: 0 !important;
    width: 100%;
    flex: 1;
    min-height: 0;
    max-width: none;
    border: none !important;
}
.tvo-hero-main .tvo-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.tvo-hero-main .tvo-card-name {
    /* #308 item 13 — clamp 3 linhas impede empurrar preço (96px) em textos longos */
    font-size: 44px;
    line-height: 1.05;
    flex-shrink: 0;
    color: #111 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}
.tvo-hero-main .tvo-card-price {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    gap: 24px;
    flex-shrink: 0;
}
.tvo-hero-main .tvo-card-price-por .value {
    font-size: 96px;
    color: var(--tvo-accent, #bda05f) !important;
}
.tvo-hero-main .tvo-card-price-de .value {
    font-size: 32px;
    color: #6b7280 !important;
}
.tvo-hero-satellites {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 0;
}
.tvo-hero-satellites .tvo-card {
    flex: 1 1 0;
    padding: 14px;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
}
.tvo-hero-satellites .tvo-card-image {
    flex: 1;
    min-height: 0;
}
.tvo-hero-satellites .tvo-card-name {
    font-size: 28px;
    color: #111 !important;
}
.tvo-hero-satellites .tvo-card-price {
    padding: 10px 12px;
    flex-shrink: 0;
}
.tvo-hero-satellites .tvo-card-price-por .value {
    font-size: 42px;
    color: var(--tvo-accent, #bda05f) !important;
}
.tvo-hero-satellites .tvo-card-price-por .label {
    font-size: 12px;
}


/* ── LAYOUT: KPI SPLIT ── */
.tvo-render-kpi-split {
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tvo-layout-render .tvo-kpi-banner {
    background: #fff !important;
    border-radius: 20px;
    padding: 24px 36px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    color: #111 !important;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}
.tvo-layout-render .tvo-kpi-banner * { color: #111; }
.tvo-layout-render .tvo-kpi-item {
    flex: 1;
    text-align: center;
    padding: 0 24px;
    border-right: 2px solid #e5e7eb;
}
.tvo-layout-render .tvo-kpi-item:last-child { border-right: none; }
.tvo-layout-render .tvo-kpi-item .label {
    font-size: 14px;
    color: #6b7280 !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin: 0;
}
.tvo-layout-render .tvo-kpi-item .value {
    font-size: 36px;
    font-weight: 900;
    color: #111 !important;
    margin: 4px 0 0 0;
    line-height: 1;
}
.tvo-layout-render .tvo-kpi-item.tvo-kpi-logo {
    flex: 0 0 auto;
    padding: 0 24px;
}
.tvo-layout-render .tvo-kpi-item.tvo-kpi-logo img {
    max-height: 70px;
    max-width: 200px;
    object-fit: contain;
}
.tvo-layout-render .tvo-kpi-item.tvo-kpi-senha .value {
    color: #b8860b !important;
    font-size: 48px;
    text-shadow: 0 2px 4px rgba(184, 134, 11, 0.15);
}
.tvo-render-kpi-split .tvo-render-grid {
    position: static;
    flex: 1;
    min-height: 0;
}


/* ── LAYOUT: FULL-SINGLE ── */
.tvo-render-full-single {
    position: absolute;
    top: 130px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
}
.tvo-layout-render .tvo-full-card {
    background: #fff !important;
    border-radius: 36px;
    padding: 60px;
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    gap: 60px;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    color: #111 !important;
    position: relative;
    overflow: hidden;
    min-height: 0;
}
.tvo-layout-render .tvo-full-card * { color: #111; }
.tvo-layout-render .tvo-full-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 8px;
    background: linear-gradient(90deg, transparent, var(--tvo-accent, #bda05f), transparent);
    z-index: 2;
}
/* Spotlight radial sutil emanando do accent — hero vira "palco iluminado" */
.tvo-layout-render .tvo-full-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, color-mix(in srgb, var(--tvo-accent, #bda05f) 12%, transparent) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
.tvo-layout-render .tvo-full-image {
    flex: 0 0 52%;
    max-width: 52%;
    height: 100%;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    min-height: 0;
}
.tvo-layout-render .tvo-full-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.tvo-layout-render .tvo-full-info {
    /* #308 item 13 — flex clampado + largura fixa protege preço gigante (180px) de ser empurrado por nome longo */
    flex: 0 1 48%;
    max-width: 48%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.tvo-layout-render .tvo-full-badge {
    background: #dc2626 !important;
    color: #fff !important;
    padding: 16px 32px;
    border-radius: 999px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    align-self: flex-start;
    box-shadow: 0 8px 24px rgba(220,38,38,0.4);
}
.tvo-layout-render .tvo-full-name {
    /* #308 item 13 — line-clamp 3 + hyphenation evita que nome longo empurre preço pra fora do card */
    font-size: 78px;
    font-weight: 900;
    line-height: 1.0;
    margin: 0;
    text-transform: uppercase;
    color: #111 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    max-width: 100%;
}
.tvo-layout-render .tvo-full-price {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.tvo-layout-render .tvo-full-price-de {
    font-size: 44px;
    color: #6b7280 !important;
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    text-decoration-thickness: 4px;
    font-weight: 700;
}
.tvo-layout-render .tvo-full-price-por {
    font-size: 180px;
    color: var(--tvo-accent, #bda05f) !important;
    font-weight: 900;
    line-height: 1;
    text-shadow:
        0 4px 16px rgba(0, 0, 0, 0.18),
        0 0 60px color-mix(in srgb, var(--tvo-accent, #bda05f) 40%, transparent);
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}
.tvo-layout-render .tvo-full-price-por small {
    font-size: 64px;
    opacity: 0.9;
    color: var(--tvo-accent, #bda05f) !important;
}


/* ── LAYOUT: MEDIA (fullscreen vídeo/imagem) ── */
.tvo-render-media {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.tvo-render-media .tvo-media-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Qualidade máxima — evita blur quando o slot escala via transform */
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.tvo-render-media .tvo-media-overlay {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 24px 32px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    z-index: 5;
}
/* Qualquer img dentro do overlay tem tamanho limitado (evita logo renderizar no natural) */
.tvo-render-media .tvo-media-overlay img {
    max-height: 56px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* Variante minimal: apenas relógio discreto no canto superior direito */
.tvo-render-media .tvo-media-overlay--minimal {
    bottom: auto;
    left: auto;
    top: 32px;
    right: 32px;
    background: rgba(0,0,0,0.55);
    padding: 10px 18px;
    border-radius: 999px;
    display: inline-flex;
    width: auto;
    gap: 0;
}
.tvo-render-media .tvo-media-overlay--minimal .clock {
    font-size: 22px;
    color: #fff;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
}
.tvo-render-media .tvo-media-overlay .storename {
    font-size: 32px;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.tvo-render-media .tvo-media-overlay .clock {
    font-size: 28px;
    font-weight: 900;
    color: #facc15;
    margin: 0;
}
.tvo-render-media-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    gap: 14px;
}
.tvo-render-media-empty i { font-size: 80px; }
.tvo-render-media-empty p { font-size: 24px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }


/* ══════════ 8.5. TABELA MODERNA + LAYOUTS DE TABELA ══════════
 * Tabelas de alta densidade com tipografia grande, alternating rows,
 * imagens à esquerda, badges e preços destacados.
 * ─────────────────────────────────────────────────────────── */

/* Container raíz das tabelas (1 ou 2 colunas) */
.tvo-render-tables {
    display: grid;
    gap: 24px;
    width: 100%;
    height: 100%;
}
.tvo-render-tables[data-cols="1"] { grid-template-columns: 1fr; }
.tvo-render-tables[data-cols="2"] { grid-template-columns: 1fr 1fr; }

.tvo-table-wrap {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    min-height: 0;
    color: #111 !important;
}
/* Força cor escura em todos os textos da tabela mesmo em temas dark.
   !important necessário pra vencer regras de tema (.tvo-layout-render[data-tvo-theme="..."] *)
   que têm specificity igual ou maior. Exceções abaixo restauram cores especiais. */
.tvo-layout-render .tvo-table-wrap,
.tvo-layout-render .tvo-table-wrap *,
.tvo-layout-render .tvo-table-wrap .tvo-table-name,
.tvo-layout-render .tvo-table-wrap .tvo-table-name .name-text,
.tvo-layout-render .tvo-table-wrap .tvo-table-row td {
    color: rgb(17, 17, 17) !important;
}
/* Exceções: elementos que DEVEM manter sua cor própria */
.tvo-layout-render .tvo-table-wrap .tvo-table-title { color: #fff !important; }
.tvo-layout-render .tvo-table-wrap .tvo-table-badge { color: #fff !important; }
.tvo-layout-render .tvo-table-wrap .tvo-table-badge.clube { color: #1a1a1a !important; }
.tvo-layout-render .tvo-table-wrap .tvo-table-price-de { color: #6b7280 !important; }
.tvo-layout-render .tvo-table-wrap .tvo-table-price-por { color: var(--tvo-accent, #bda05f) !important; }
.tvo-layout-render .tvo-table-wrap .tvo-table-price-por.oferta { color: #dc2626 !important; }
.tvo-layout-render .tvo-table-wrap .tvo-table-price-por.clube { color: var(--tvo-accent, #bda05f) !important; }

.tvo-table-title {
    padding: 18px 28px;
    background: linear-gradient(135deg, var(--tvo-accent, #bda05f), color-mix(in srgb, var(--tvo-accent, #bda05f) 70%, black));
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tvo-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    flex: 1;
}

.tvo-table-row {
    transition: background .3s;
}
/* Quando data-show-images="0" no wrapper, esconde qualquer td.tvo-table-img
   (defensivo — o renderTable já deixa de gerar o td, mas essa regra garante
   que tabelas renderizadas por outros caminhos também respeitem a config). */
.tvo-render-tables[data-show-images="0"] .tvo-table-img { display: none; }

/* ── HEADER de coluna nas tabelas — sutil, sem gradient pesado ── */
.tvo-layout-render .tvo-table-head th {
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280 !important;
    text-align: left;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}
.tvo-layout-render .tvo-table-head .tvo-table-th-img { width: 110px; }
.tvo-layout-render .tvo-table-head .tvo-table-th-price {
    width: 280px;
    text-align: right;
    padding-right: 28px;
}
.tvo-layout-render .tvo-render-tables[data-dense="1"] .tvo-table-head th {
    font-size: 11px;
    padding: 8px 14px;
    letter-spacing: 1.2px;
}
.tvo-layout-render .tvo-render-tables[data-dense="1"] .tvo-table-head .tvo-table-th-img { width: 90px; }
.tvo-layout-render .tvo-render-tables[data-dense="1"] .tvo-table-head .tvo-table-th-price { width: 200px; padding-right: 20px; }

/* Alternância de cor mais contrastada (era #fafbfc → muito sutil) */
.tvo-table-row.odd  { background: #f1f5f9; }
.tvo-table-row.even { background: #fff; }
.tvo-table-row.odd  { background: #fafbfc; }
.tvo-table-row.even { background: #fff; }

.tvo-table-row td {
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f1f3;
}
.tvo-table-row:last-child td { border-bottom: none; }

/* Coluna IMG (esquerda) */
.tvo-table-img {
    width: 110px;
    text-align: center;
}
.tvo-table-img img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 6px;
}

/* Coluna NOME (centro, expansiva) */
.tvo-table-name {
    color: #111;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    padding-left: 8px !important;
}
.tvo-table-name .name-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tvo-table-name .tvo-table-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.2px;
    border-radius: 999px;
    color: #fff;
}
.tvo-table-name .tvo-table-badge.oferta { background: #dc2626; box-shadow: 0 3px 8px rgba(220,38,38,0.3); }
.tvo-table-name .tvo-table-badge.clube  { background: #facc15; color: #1a1a1a; box-shadow: 0 3px 8px rgba(250,204,21,0.3); }

/* Coluna PREÇO (direita) */
.tvo-table-price {
    width: 280px;
    text-align: right;
    padding-right: 28px !important;
    white-space: nowrap;
}
.tvo-table-price-de {
    display: block;
    font-size: 22px;
    color: #6b7280;
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    text-decoration-thickness: 2px;
    font-weight: 700;
    line-height: 1;
}
.tvo-table-price-por {
    display: block;
    font-size: 50px;
    color: var(--tvo-accent, #bda05f);
    font-weight: 900;
    line-height: 1;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 20px color-mix(in srgb, var(--tvo-accent, #bda05f) 30%, transparent);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.tvo-table-price-por.oferta { color: #dc2626; }
.tvo-table-price-por.clube  { color: var(--tvo-accent, #bda05f); }
.tvo-table-price-por small {
    font-size: 24px;
    margin-right: 2px;
    opacity: 0.85;
}

/* Modo dense — AINDA legível de longe (TV indoor em 50" típica). v4.27: padding reduzido. */
.tvo-render-tables[data-dense="1"] .tvo-table-row td { padding: 11px 14px; }
.tvo-render-tables[data-dense="1"] .tvo-table-img { width: 90px; }
.tvo-render-tables[data-dense="1"] .tvo-table-img img { width: 75px; height: 75px; }
.tvo-render-tables[data-dense="1"] .tvo-table-name { font-size: 24px; }
.tvo-render-tables[data-dense="1"] .tvo-table-name .tvo-table-badge { font-size: 12px; padding: 4px 10px; }
.tvo-render-tables[data-dense="1"] .tvo-table-price { width: 200px; padding-right: 20px !important; }
.tvo-render-tables[data-dense="1"] .tvo-table-price-de { font-size: 16px; }
.tvo-render-tables[data-dense="1"] .tvo-table-price-por { font-size: 36px; }
.tvo-render-tables[data-dense="1"] .tvo-table-price-por small { font-size: 18px; }

/* ── BADGES de tabela com shimmer (mesma vibe dos cards) ── */
.tvo-table-name .tvo-table-badge {
    position: relative;
    overflow: hidden;
}
.tvo-table-name .tvo-table-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: badgeShimmer 2.6s infinite;
}

/* Tema dark sobrescreve cores das tabelas pra contraste */
.tvo-layout-render[data-tvo-theme="acougue"]    .tvo-table-row.odd { background: #fef2f2; }
.tvo-layout-render[data-tvo-theme="diversos"]   .tvo-table-row.odd { background: #f8fafc; }
.tvo-layout-render[data-tvo-theme="hortifruti"] .tvo-table-row.odd { background: #f0fdf4; }
.tvo-layout-render[data-tvo-theme="frios"]      .tvo-table-row.odd { background: #eff6ff; }
.tvo-layout-render[data-tvo-theme="bebidas"]    .tvo-table-row.odd { background: #fef2f2; }
.tvo-layout-render[data-tvo-theme="limpeza"]    .tvo-table-row.odd { background: #ecfeff; }
.tvo-layout-render[data-tvo-theme="promo"]      .tvo-table-row.odd { background: #fefce8; }
.tvo-layout-render[data-tvo-theme="padaria"]    .tvo-table-row.odd { background: #fffbeb; }


/* ── LAYOUT: TABLE-CLASSIC ── */
.tvo-render-table-classic {
    position: absolute;
    top: 150px;
    bottom: 40px;
    left: 40px;
    right: 40px;
}

/* ── LAYOUT: TABLE-DUAL ── */
.tvo-render-table-dual {
    position: absolute;
    top: 150px;
    bottom: 40px;
    left: 40px;
    right: 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}
.tvo-render-table-dual .tvo-table-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.tvo-render-table-dual .tvo-table-side .tvo-render-tables {
    height: 100%;
}
.tvo-render-table-dual .tvo-table-divider {
    width: 4px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4), transparent);
    border-radius: 2px;
}

/* ── LAYOUT: TABLE-HERO ── */
.tvo-render-table-hero {
    position: absolute;
    top: 130px;
    bottom: 40px;
    left: 40px;
    right: 40px;
    display: grid;
    grid-template-columns: 45% 1fr;
    gap: 28px;
    align-items: stretch;
}
/* Quando só tem 1 produto, hero ocupa toda a área */
.tvo-render-table-hero.tvo-solo {
    grid-template-columns: 1fr;
}

/* Badge flutuante de logo (canto superior esquerdo) — usado em layouts sem renderHead */
.tvo-layout-render .tvo-render-logo-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 30;
    backdrop-filter: blur(8px);
}
.tvo-layout-render .tvo-render-logo-badge img {
    max-height: 60px;
    max-width: 200px;
    display: block;
    object-fit: contain;
}

/* Badge flutuante de senha (usado em layouts que não tem renderHead) */
.tvo-layout-render .tvo-render-senha-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1a1a1a;
    padding: 14px 28px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 30;
    line-height: 1;
}
.tvo-layout-render .tvo-render-senha-badge small {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    opacity: 0.85;
    text-transform: uppercase;
}
.tvo-layout-render .tvo-render-senha-badge strong {
    font-size: 72px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.tvo-render-table-hero .tvo-hero-main {
    background: #fff;
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    position: relative;
    /* Hero domina o layout — sombra mais dramática que a da tabela ao lado */
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color: #111;
    overflow: hidden;
    min-width: 0;
    border-top: 6px solid var(--tvo-accent, #bda05f);
}
/* Primeira linha da tabela ao lado do hero ganha border-top accent — ancora visualmente */
.tvo-render-table-hero .tvo-table-wrap {
    border-top: 6px solid var(--tvo-accent, #bda05f);
}
.tvo-render-table-hero .tvo-hero-main::before {
    content: 'DESTAQUE';
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--tvo-accent, #bda05f);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.tvo-render-table-hero .tvo-hero-main .tvo-card {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    width: 100%;
}
.tvo-render-table-hero .tvo-hero-main .tvo-card::before { display: none; }
.tvo-render-table-hero .tvo-hero-main .tvo-card-image {
    background: transparent;
    padding: 0;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1;
    margin: 0 auto;
}
.tvo-render-table-hero .tvo-hero-main .tvo-card-name {
    /* #308 item 13 — clamp 3 linhas impede empurrar preço de destaque (80px) */
    font-size: 44px;
    line-height: 1.05;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}
.tvo-render-table-hero .tvo-hero-main .tvo-card-price {
    background: transparent;
    border: none;
    padding: 0;
    gap: 22px;
}
.tvo-render-table-hero .tvo-hero-main .tvo-card-price-por .value { font-size: 80px; }
.tvo-render-table-hero .tvo-table-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.tvo-render-table-hero .tvo-table-side .tvo-render-tables { height: 100%; }


/* ── LAYOUT: TABLE-SIDEBAR ── */
.tvo-render-table-sidebar {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    padding: 32px;
    width: 100%;
    height: 100%;
}
.tvo-render-table-sidebar .tvo-sidebar {
    /* reusa os estilos de .tvo-sidebar do sidebar-grid */
}
.tvo-render-table-sidebar .tvo-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.tvo-render-table-sidebar .tvo-main .tvo-render-tables {
    height: 100%;
}


/* ── LAYOUT: TABLE-PROMO-STRIP ── */
.tvo-render-table-promo {
    position: absolute;
    top: 150px;
    bottom: 40px;
    left: 40px;
    right: 40px;
    display: grid;
    grid-template-rows: 32% 1fr;
    gap: 24px;
}
.tvo-render-table-promo .tvo-promo-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    min-height: 0;
}
.tvo-render-table-promo .tvo-promo-strip .tvo-card {
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
}
.tvo-render-table-promo .tvo-promo-strip .tvo-card-image {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    flex: none;
}
.tvo-render-table-promo .tvo-promo-strip .tvo-card-name {
    font-size: 26px;
    text-align: left;
    min-height: auto;
}
.tvo-render-table-promo .tvo-promo-strip .tvo-card-price {
    padding: 10px 14px;
    margin-top: 0;
}
.tvo-render-table-promo .tvo-promo-strip .tvo-card-price-por .value { font-size: 42px; }
.tvo-render-table-promo .tvo-promo-strip .tvo-card .tvo-card-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.tvo-render-table-promo .tvo-promo-table-wrap {
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.tvo-render-table-promo .tvo-promo-table-wrap .tvo-render-tables {
    height: 100%;
}

/* ══════════ 9. RESPONSIVE ══════════ */
@media (max-width: 1099px) {
    body.toplevel_page_tv-ofertas .tvo-header,
    body.toplevel_page_tv-ofertas .tvo-toolbar,
    body.toplevel_page_tv-ofertas .tvo-empty,
    body.toplevel_page_tv-ofertas .tvo-workspace,
    body.marketing_page_tv-ofertas .tvo-header,
    body.marketing_page_tv-ofertas .tvo-toolbar,
    body.marketing_page_tv-ofertas .tvo-empty,
    body.marketing_page_tv-ofertas .tvo-workspace {
        margin-right: 0 !important;
    }
    body.toplevel_page_tv-ofertas .tvo-drawer,
    body.marketing_page_tv-ofertas .tvo-drawer {
        position: relative !important;
        top: 0 !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-top: 20px !important;
        border-left: none !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--border-radius-lg) !important;
    }
    .tvo-layout-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Zoom do select na listagem ao clicar em "layouts" via modal */
#tvoModalLayouts .modal-dialog {
    max-width: 1100px;
}

/* ═══════════════════════════════════════════════════════════════
   SKELETON de carregamento (task #208)
   Aparece imediatamente no page load, escondido quando renderAll() roda.
   ═══════════════════════════════════════════════════════════════ */
.tvo-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
    animation: tvoSkelFadeIn .2s ease-out;
}
.tvo-skeleton[hidden] { display: none; }
.tvo-skeleton-fadeout { opacity: 0; transition: opacity .2s ease-out; }

.tvo-skeleton-tvs-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}
.tvo-skel-pill {
    display: inline-block;
    height: 32px;
    width: 140px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: tvoSkelShimmer 1.4s linear infinite;
}
.tvo-skel-pill.short { width: 90px; }

.tvo-skeleton-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 58vh;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: tvoSkelShimmer 1.6s linear infinite;
    border: 2px solid rgba(255,255,255,0.04);
}

.tvo-skeleton-thumbs {
    display: flex;
    gap: 10px;
    padding: 4px 2px;
}
.tvo-skel-thumb {
    flex: 0 0 130px;
    height: 78px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
    background-size: 200% 100%;
    animation: tvoSkelShimmer 1.4s linear infinite;
    border: 2px solid rgba(255,255,255,0.04);
}

@keyframes tvoSkelShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes tvoSkelFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Placeholder estático que substitui <video> nos thumbs/canvas tiles.
   Render de 20 <video autoplay> simultâneos trava o admin — aqui o usuário
   só vê o ícone de play. O vídeo real só roda no preview principal + TV. */
.tvo-media-video-placeholder {
    width: 100%;
    height: 100%;
    background: #0a0f1e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.35);
}
.tvo-media-video-icon {
    font-size: 56px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* will-change estratégico: o .tvo-layout-render vive dentro de thumbs/canvas
   com transform: scale(...) aplicado. Dica pro compositor evitar reflow. */
.tvo-thumb-mini .tvo-layout-render,
.tvo-canvas-tile-preview-inner .tvo-layout-render {
    will-change: transform;
    backface-visibility: hidden;
}

/* ==========================================================================
   v5.10.19 — Skeleton de preco enquanto check-prices nao retornou aquele
   produto. Evita mostrar preco velho do JSON congelado no boot da TV.
   Aparece no card grid, na linha de tabela e no full-card.
   ========================================================================== */
.tvo-price-skeleton {
    display: inline-block;
    background: linear-gradient(90deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.06) 100%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: tvo-price-shimmer 1.4s ease-in-out infinite;
}
.tvo-price-skeleton-wrap {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.tvo-price-skeleton--label {
    width: 50px;
    height: 16px;
    border-radius: 4px;
}
.tvo-price-skeleton--value {
    width: 140px;
    height: 36px;
    border-radius: 6px;
}
/* Inline (linha de tabela) — preco menor */
.tvo-price-skeleton--inline {
    width: 110px;
    height: 28px;
    border-radius: 6px;
}
/* Full card — destaque grande */
.tvo-price-skeleton--full {
    width: 60%;
    height: 90px;
    border-radius: 12px;
    margin: 0 auto;
}
@keyframes tvo-price-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
