:root {
    --bg: #eef7ff;
    --panel: #ffffff;
    --panel-soft: #f7fbff;
    --primary: #39a3ff;
    --primary-dark: #1464c3;
    --primary-deep: #0d4e98;
    --primary-soft: #d8ecff;
    --text: #183b5b;
    --muted: #6b84a0;
    --border: #d5e6f7;
    --success: #1ea971;
    --warning: #f1a208;
    --danger: #e2574c;
    --shadow: 0 20px 45px rgba(20, 100, 195, 0.08);
    --shadow-soft: 0 12px 28px rgba(20, 100, 195, 0.06);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
    color: var(--text);
}

body {
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

canvas {
    max-width: 100%;
}

.app-shell {
    display: grid;
    grid-template-columns: 310px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #1f7ed7 0%, #0e5eb8 100%);
    color: #fff;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border-radius: 28px;
    min-height: 170px;
    padding: 26px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.brand-logo {
    width: min(100%, 240px);
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.nav-menu {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.nav-menu a {
    padding: 15px 18px;
    border-radius: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #fff;
    color: var(--primary-dark);
    transform: translateX(2px);
}

.sidebar-footer {
    display: grid;
    gap: 14px;
}

.user-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-card span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
}

.content {
    padding: 28px;
}

.topbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 247, 255, 0.96) 100%);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 24px 26px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.topbar h1,
.panel-header h2 {
    margin: 0 0 6px;
}

.topbar h1 {
    font-size: 1.7rem;
    font-weight: 800;
}

.topbar p,
.panel-header span,
.footer p {
    margin: 0;
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}

.panel.soft-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(12px, 1vw, 18px);
    flex-wrap: wrap;
}

.panel-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.2vw, 22px);
    margin-bottom: 22px;
}

.cards-grid.compact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-cards .stat-card {
    min-height: 148px;
}

.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: clamp(16px, 1.1vw, 22px);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.stat-card strong {
    font-size: 2.1rem;
    color: var(--primary-dark);
    line-height: 1;
}

.stat-card small {
    color: var(--muted);
    font-size: 0.84rem;
}

.stat-card.highlight {
    background: linear-gradient(180deg, #eaf5ff 0%, #d8ecff 100%);
}

.stat-card.success-card strong {
    color: var(--success);
}

.stat-card.warning-card strong {
    color: #b56d00;
}

.stat-card.danger-card strong {
    color: var(--danger);
}

.filters-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.filters-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: clamp(12px, 1vw, 18px);
}

.form-grid.single {
    grid-template-columns: 1fr;
}

.form-grid .full-width,
.filters-grid .full-width {
    grid-column: 1 / -1;
}

label {
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #f9fcff;
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(43, 143, 232, 0.12);
}

textarea {
    resize: vertical;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    padding: 0;
}

.checkbox-row label {
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 18px;
    border-radius: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: var(--primary-dark);
    border: 1px solid var(--border);
}

.btn-danger {
    background: #fff3f2;
    color: var(--danger);
    border: 1px solid #ffd4d0;
}

.btn-sm {
    padding: 9px 12px;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.filter-actions,
.form-actions,
.actions-cell {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.table-wrap {
    overflow: auto;
    border: 1px solid #e6eef7;
    border-radius: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
    background: #fff;
}

thead th {
    background: #e6f2ff;
    color: var(--primary-dark);
    font-size: 0.92rem;
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 14px;
    border-bottom: 1px solid #e8f0f7;
    vertical-align: top;
}

tbody tr:hover {
    background: #f8fbff;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge.success {
    background: #e8fbf3;
    color: var(--success);
}

.badge.warning {
    background: #fff5e3;
    color: #b56d00;
}

.badge.danger {
    background: #fff0ef;
    color: var(--danger);
}

.alert {
    padding: 14px 18px;
    border-radius: 18px;
    margin-bottom: clamp(12px, 1vw, 18px);
    font-weight: 700;
    border: 1px solid transparent;
}

.alert-success {
    background: #e9fbf1;
    color: var(--success);
    border-color: #c7f1db;
}

.alert-danger {
    background: #fff1ef;
    color: var(--danger);
    border-color: #ffd9d4;
}

.readonly-panel {
    border: 1px dashed var(--border);
    background: linear-gradient(180deg, #f8fbff 0%, #f4f9ff 100%);
}

.badge.neutral,
.badge-neutral {
    background: #eef7ff;
    color: var(--primary-dark);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1vw, 18px);
}

.chart-panel {
    overflow: hidden;
}

.chart-panel.wide {
    grid-column: 1 / -1;
}

.chart-box {
    position: relative;
    width: 100%;
    height: clamp(220px, 28vh, 320px);
}

.chart-box.chart-box-lg {
    height: 380px;
}

.chart-box canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.page-grid {
    display: grid;
    gap: clamp(10px, 1vw, 18px);
}

.page-grid.form-main-layout,
.page-grid.two-cols,
.page-grid.two-cols-fixed {
    grid-template-columns: 1fr;
}

.footer {
    margin-top: 8px;
    padding-bottom: 10px;
}

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3vw, 32px);
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(57, 163, 255, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(13, 78, 152, 0.12), transparent 28%),
        linear-gradient(135deg, #dceeff 0%, #f8fbff 55%, #dceeff 100%);
}

.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.login-page::before {
    width: 280px;
    height: 280px;
    top: -90px;
    right: -70px;
    background: rgba(57, 163, 255, 0.10);
}

.login-page::after {
    width: 220px;
    height: 220px;
    bottom: -70px;
    left: -60px;
    background: rgba(13, 78, 152, 0.08);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
}

.login-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
    gap: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(213, 230, 247, 0.9);
    box-shadow: 0 28px 70px rgba(20, 100, 195, 0.14);
    border-radius: 32px;
    padding: clamp(20px, 3vw, 32px);
    backdrop-filter: blur(10px);
}

.login-brand-panel {
    background: linear-gradient(180deg, #f9fcff 0%, #eaf4ff 100%);
    border: 1px solid #d6e7f8;
    border-radius: 28px;
    padding: clamp(24px, 3vw, 34px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}

.login-brand-copy h1,
.login-form-header h2 {
    margin: 0;
}

.login-brand-copy p,
.login-form-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.login-logo-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.login-logo {
    display: block;
    height: auto;
}

.login-logo-caca {
    width: min(100%, 290px);
}

.login-logo-ccbe {
    width: min(100%, 210px);
}

.login-logo-divider {
    width: 72px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #39a3ff 0%, #0d4e98 100%);
}

.auth-logo-stack {
    align-items: center;
    text-align: center;
    margin: 0 auto 12px;
}

.auth-logo-stack .login-logo-caca {
    width: min(100%, 230px);
}

.auth-logo-stack .login-logo-ccbe {
    width: min(100%, 185px);
}

.auth-logo-stack .login-logo-divider {
    margin-inline: auto;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: var(--shadow-soft);
}

.login-brand-copy {
    display: grid;
    gap: 14px;
}

.login-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.login-highlights li {
    position: relative;
    padding: 14px 16px 14px 42px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--primary-dark);
    font-weight: 700;
    border: 1px solid rgba(191, 220, 249, 0.8);
}

.login-highlights li::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 0 0 6px rgba(57, 163, 255, 0.12);
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: clamp(6px, 1vw, 12px);
}

.login-form-header {
    display: grid;
    gap: 8px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 92px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--primary-dark);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 12px;
}

.password-toggle:hover {
    background: rgba(57, 163, 255, 0.10);
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(20, 100, 195, 0.25);
    outline-offset: 2px;
}

.login-tip {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #eef7ff;
    color: var(--primary-dark);
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #d8e9fb;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 26, 49, 0.52);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1200;
}

.modal-overlay.is-open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 470px;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(10, 43, 84, 0.22);
    border: 1px solid #d8e8f7;
    padding: 26px;
}

.modal-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.modal-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

@media (max-width: 1440px) {
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .content {
        padding: 18px;
    }

    .login-card {
        grid-template-columns: 1fr;
    }

    .filters-grid,
    .filters-grid.compact,
    .form-grid,
    .cards-grid,
    .cards-grid.compact-cards,
    .charts-grid {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 760px;
    }
}

.panel-header-with-actions {
    align-items: flex-start;
}

.badge-neutral {
    background: #eef7ff;
    color: var(--primary-dark);
}

.compact-cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.compact-cards-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}


.import-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 16px;
    align-items: end;
}

.import-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.import-help {
    background: #eef7ff;
    border: 1px dashed #bfdcf9;
    border-radius: 18px;
    padding: 14px 16px;
    color: var(--primary-dark);
    line-height: 1.6;
}

.xlsx-preview {
    border: 1px solid #d9e8f8;
    border-radius: 20px;
    background: #fff;
    padding: 18px;
}

.xlsx-preview.is-empty {
    background: #f8fbff;
}

.preview-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.preview-pill {
    min-width: 140px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.preview-pill strong {
    display: block;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.preview-pill span {
    color: var(--muted);
    font-size: 0.86rem;
}

.preview-table {
    min-width: 780px;
}

.preview-note,
.table-subtext {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.records-table {
    min-width: 1260px;
}

.records-table td {
    vertical-align: top;
}

@media (max-width: 1024px) {
    .import-grid,
    .compact-cards-4,
    .compact-cards-5 {
        grid-template-columns: 1fr;
    }
}

.upload-counter {
    margin-top: 10px;
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 700;
}

.inline-gallery,
.registro-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.inline-gallery-thumb,
.registro-image-thumb {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 18px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.inline-gallery-thumb img,
.registro-image-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 14px;
}

.registro-image-thumb span {
    font-size: 0.78rem;
    color: var(--muted);
    word-break: break-word;
}

.modal-card-lg {
    max-width: 1100px;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.modal-card-image {
    max-width: 1080px;
    width: min(96vw, 1080px);
    padding: 18px;
    background: #0b1c33;
    border-color: rgba(255,255,255,0.12);
}

.modal-topbar,
.image-viewer-topbar,
.registro-imagens-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.modal-topbar {
    margin-bottom: clamp(12px, 1vw, 18px);
}

.modal-icon-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary-dark);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-icon-close-image {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    z-index: 2;
}

.registro-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: clamp(12px, 1vw, 18px);
}

.registro-detail-item,
.registro-detail-block {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #f9fcff;
    padding: 16px;
}

.registro-detail-item span,
.registro-detail-block h4 {
    display: block;
    color: var(--muted);
    font-size: 0.83rem;
    margin-bottom: 6px;
}

.registro-detail-item strong {
    font-size: 0.97rem;
    color: var(--text);
    line-height: 1.5;
}

.registro-detail-block {
    margin-bottom: 14px;
}

.registro-detail-block h4 {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 800;
}

.registro-detail-block p {
    margin: 0;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
}

.image-viewer-topbar {
    color: #fff;
    margin-bottom: 14px;
    padding-right: 54px;
}

.image-viewer-stage {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-stage img {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 18px;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.image-nav-prev { left: 16px; }
.image-nav-next { right: 16px; }

.empty-state-cell {
    text-align: center;
    color: var(--muted);
    padding: 22px;
}

.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

@media (max-width: 1024px) {
    .registro-detail-grid {
        grid-template-columns: 1fr;
    }

    .modal-card-lg,
    .modal-card-image {
        max-width: 100%;
    }

    .image-viewer-stage {
        min-height: 52vh;
    }

    .image-nav {
        width: 44px;
        height: 44px;
    }
}


/* v17 mobile hamburger without affecting desktop */
.topbar-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary-dark);
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 768px) {
    .topbar-main {
        gap: 12px;
        align-items: flex-start;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .app-shell {
        display: block;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(88vw, 300px);
        height: 100vh;
        z-index: 1400;
        transform: translateX(-104%);
        transition: transform 0.24s ease;
        overflow-y: auto;
        padding: 18px 16px;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(7, 23, 45, 0.45);
        backdrop-filter: blur(2px);
        z-index: 1350;
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .content {
        width: 100%;
        min-width: 0;
        padding: 14px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1100;
        padding: 18px;
        margin-bottom: 16px;
        border-radius: 20px;
    }

    .panel,
    .login-card,
    .modal-card,
    .modal-card-lg,
    .modal-card-image {
        border-radius: 20px;
    }

    .panel {
        padding: 16px;
        margin-bottom: 16px;
    }

    .brand-card,
    .user-card {
        border-radius: 18px;
    }

    .filters-grid,
    .filters-grid.compact,
    .form-grid,
    .import-grid,
    .cards-grid,
    .cards-grid.compact-cards,
    .compact-cards-4,
    .compact-cards-5,
    .charts-grid,
    .registro-detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions,
    .form-actions,
    .actions-cell,
    .modal-actions,
    .import-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    .btn-sm,
    .filter-actions .btn,
    .form-actions .btn,
    .actions-cell .btn,
    .modal-actions .btn,
    .pagination .btn,
    .import-actions-row .btn {
        width: 100%;
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 680px;
    }

    .records-table {
        min-width: 1080px;
    }

    .preview-table {
        min-width: 720px;
    }

    .modal-overlay {
        padding: 10px;
    }

    .modal-card,
    .modal-card-lg,
    .modal-card-image {
        padding: 16px;
    }

    .inline-gallery,
    .registro-image-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .image-viewer-stage {
        min-height: 34vh;
    }

    .login-page {
        padding: 14px;
    }

    .login-card {
        gap: 18px;
        padding: 20px 16px;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 18px;
    }

    .login-logo-stack {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: min(90vw, 280px);
        padding: 14px 12px;
    }

    .topbar h1 {
        font-size: 1.24rem;
    }

    .stat-card strong {
        font-size: 1.8rem;
    }

    .chart-box,
    .chart-box.chart-box-lg {
        height: 260px;
    }

    .inline-gallery,
    .registro-image-gallery {
        grid-template-columns: 1fr;
    }

    .image-viewer-stage {
        min-height: 28vh;
    }

    .login-brand-panel,
    .login-form-panel {
        padding: 16px;
    }

    .login-logo-caca {
        width: min(100%, 240px);
    }

    .login-logo-ccbe {
        width: min(100%, 180px);
    }

    .auth-logo-stack .login-logo-caca {
        width: min(100%, 190px);
    }

    .auth-logo-stack .login-logo-ccbe {
        width: min(100%, 160px);
    }
}


/* Painel TV */
.tv-body {
    background: radial-gradient(circle at top, #1e7fde 0%, #0e5eb8 32%, #08396f 100%);
    color: #fff;
    overflow: hidden;
}

html:has(.tv-body),
body.tv-body {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.tv-page {
    height: 100vh;
    padding: clamp(14px, 1.6vw, 28px);
    overflow: hidden;
    box-sizing: border-box;
}

.tv-page:fullscreen,
.tv-page:-webkit-full-screen,
.tv-page.is-fullscreen {
    width: 100%;
    height: 100vh;
    padding: clamp(14px, 1.6vw, 28px);
    overflow: hidden;
    background: radial-gradient(circle at top, #1e7fde 0%, #0e5eb8 32%, #08396f 100%);
    box-sizing: border-box;
}

.tv-page:fullscreen::backdrop,
.tv-page:-webkit-full-screen::backdrop {
    background: radial-gradient(circle at top, #1e7fde 0%, #0e5eb8 32%, #08396f 100%);
}

.tv-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: clamp(12px, 1.2vw, 22px);
    height: 100%;
    min-height: 0;
}

.tv-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(14px, 1.1vw, 22px);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 30px;
    padding: clamp(12px, 1vw, 18px) clamp(18px, 1.4vw, 28px);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 45px rgba(3, 22, 46, 0.28);
}

.tv-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tv-logo-wrap {
    width: clamp(250px, 20vw, 340px);
    height: clamp(90px, 9vh, 118px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.16);
    padding: 12px 24px;
}

.tv-logo-wrap img {
    max-height: clamp(64px, 7.4vh, 86px);
    width: auto;
}

.tv-title h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2.2rem);
    color: #fff;
}

.tv-title-center {
    text-align: center;
    justify-self: center;
}

.tv-title-center h1 {
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tv-corner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(170px, 16vw, 250px);
    min-height: clamp(68px, 7.2vh, 98px);
    background: rgba(255,255,255,0.96);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.92);
    padding: 10px 18px;
    box-shadow: 0 16px 36px rgba(3, 22, 46, 0.24);
    justify-self: end;
}

.tv-corner-logo img {
    width: 100%;
    max-height: clamp(46px, 6vh, 74px);
    object-fit: contain;
}

.tv-meta-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1vw, 18px);
    width: 100%;
}

.tv-digital-clock {
    min-width: clamp(170px, 13vw, 210px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08));
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 16px 34px rgba(3, 22, 46, 0.22);
    backdrop-filter: blur(10px);
}

.tv-digital-clock strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.5rem, 1.9vw, 2.1rem);
    line-height: 1;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.tv-digital-clock span {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,0.84);
    font-size: clamp(0.8rem, 0.9vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tv-digital-clock small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,0.72);
    font-size: clamp(0.72rem, 0.8vw, 0.86rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
}

.tv-title p,
.tv-meta span,
.tv-meta strong {
    color: rgba(255,255,255,0.82);
    margin: 0;
}

.tv-meta {
    display: grid;
    gap: 10px;
    justify-items: end;
    text-align: right;
    min-width: clamp(280px, 26vw, 430px);
}

.tv-meta-compact {
    align-items: center;
}

.tv-meta strong {
    color: #fff;
    font-size: 1rem;
}

.tv-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(14px, 1.2vw, 22px);
    width: 100%;
    align-items: stretch;
}

.tv-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    padding: clamp(18px, 1.3vw, 26px);
    min-height: clamp(122px, 14.5vh, 170px);
    box-shadow: 0 18px 40px rgba(3, 22, 46, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.tv-card span {
    color: rgba(255,255,255,0.82);
    font-weight: 700;
    font-size: 1rem;
}

.tv-card strong {
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1;
}

.tv-card small {
    color: rgba(255,255,255,0.76);
}

.tv-card.card-success strong { color: #8ef2bf; }
.tv-card.card-warning strong { color: #ffd36b; }
.tv-card.card-danger strong { color: #ff9c95; }
.tv-card.card-accent strong { color: #8fd2ff; }

.tv-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr;
    gap: 20px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}

.tv-panel {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 30px;
    padding: clamp(16px, 1.1vw, 22px);
    box-shadow: 0 18px 40px rgba(3, 22, 46, 0.22);
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tv-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tv-panel-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.15rem;
}

.tv-panel-header span {
    color: rgba(255,255,255,0.74);
    font-size: 0.9rem;
}

.tv-chart-box {
    position: relative;
    flex: 1 1 auto;
    min-height: clamp(220px, 28vh, 320px);
    height: auto;
    min-width: 0;
    overflow: hidden;
}

.tv-chart-box canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.tv-chart-box-units {
    min-height: clamp(260px, 34vh, 420px);
    padding: 6px 4px 2px;
}

.tv-company-chart-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.tv-chart-box-company {
    min-height: clamp(220px, 27vh, 320px);
    height: 100%;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.tv-chart-box-participation {
    min-height: clamp(168px, 22vh, 250px);
    max-height: clamp(168px, 22vh, 250px);
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0 auto;
}

.tv-participation-panel .tv-company-chart-layout--compact {
    justify-content: start;
}

.tv-chart-box-monthly {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 8px 4px 0;
}

.tv-chart-box-monthly canvas {
    filter: drop-shadow(0 16px 32px rgba(3, 22, 46, 0.14));
}

.tv-company-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    align-content: start;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    scrollbar-width: none;
}

.tv-company-legend::-webkit-scrollbar {
    display: none;
}

.tv-company-legend--compact::-webkit-scrollbar {
    width: 6px;
}

.tv-company-legend--compact::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

.tv-company-legend-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    min-height: 0;
    padding: 11px 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 24px rgba(2, 19, 40, 0.16);
    animation: tvLegendRise 0.55s ease both;
    animation-delay: var(--legend-delay, 0s);
}

.tv-company-legend-rank {
    min-width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 900;
    color: #fff;
    background: color-mix(in srgb, var(--legend-color) 26%, rgba(255,255,255,0.12));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.tv-company-legend-main {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.tv-company-legend-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tv-company-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--legend-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--legend-color) 24%, transparent);
    flex: 0 0 10px;
}

.tv-company-legend-main strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: #fff;
    font-size: clamp(0.9rem, 0.92vw, 1rem);
    line-height: 1.14;
    white-space: normal;
    word-break: break-word;
}

.tv-company-legend-main span {
    color: rgba(255,255,255,0.72);
    font-size: 0.8rem;
    font-weight: 600;
}

.tv-company-legend-percent {
    display: block;
    color: rgba(255,255,255,0.74);
    font-size: 0.76rem;
    line-height: 1.25;
}

.tv-company-legend-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 12px;
    flex-wrap: wrap;
}

.tv-company-legend-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    text-align: right;
}

.tv-company-legend-total strong {
    display: block;
    color: #fff;
    font-size: 1.12rem;
    line-height: 1;
}

.tv-company-legend-total span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,0.72);
    font-size: 0.72rem;
    line-height: 1.22;
}

.tv-company-legend--primary {
    gap: 10px;
}

.tv-company-legend--primary .tv-company-legend-item {
    padding: 10px 12px;
    border-radius: 16px;
}

.tv-company-legend--primary .tv-company-legend-rank {
    min-width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.tv-company-legend--primary .tv-company-legend-main strong {
    font-size: clamp(0.86rem, 0.86vw, 0.96rem);
}

.tv-company-legend--primary .tv-company-legend-percent {
    font-size: 0.72rem;
}

.tv-company-legend--primary .tv-company-legend-total strong {
    font-size: 1rem;
}

.tv-company-legend--primary .tv-company-legend-total span {
    font-size: 0.68rem;
}

.tv-company-chart-layout--compact {
    gap: 12px;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(160px, auto) auto;
    align-items: stretch;
}

.tv-company-legend--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    max-height: none;
    overflow: hidden;
    padding-right: 0;
    scrollbar-width: none;
    align-content: start;
}

.tv-company-legend--compact .tv-company-legend-item {
    min-height: 0;
    padding: 8px 10px;
    border-radius: 16px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
}

.tv-company-legend--compact .tv-company-legend-rank {
    min-width: 28px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.tv-company-legend--compact .tv-company-legend-main {
    gap: 4px;
}

.tv-company-legend--compact .tv-company-legend-head {
    gap: 7px;
}

.tv-company-legend--compact .tv-company-legend-main strong {
    display: block;
    font-size: 0.78rem;
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

.tv-company-legend--compact .tv-company-legend-percent {
    font-size: 0.62rem;
}

.tv-company-legend--compact .tv-company-legend-total {
    min-width: 40px;
}

.tv-company-legend--compact .tv-company-legend-total strong {
    font-size: 0.86rem;
}

.tv-company-legend--compact .tv-company-legend-total span {
    font-size: 0.56rem;
    white-space: nowrap;
}

.tv-company-legend--compact .tv-company-legend-foot {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.tv-company-legend--compact .tv-company-legend-percent {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes tvLegendRise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tv-ranking-list,
.tv-status-list {
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
}

.tv-ranking-item,
.tv-status-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 14px 16px;
}

.tv-ranking-item em {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-weight: 800;
    color: #fff;
}

.tv-ranking-item strong,
.tv-status-item strong {
    color: #fff;
    font-size: 1rem;
}

.tv-ranking-item span,
.tv-status-item span,
.tv-footer-note {
    color: rgba(255,255,255,0.76);
}


.tv-ranking-item-podium {
    grid-template-columns: auto 1fr auto;
    gap: 16px;
}

.tv-ranking-badge {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-width: 82px;
}

.tv-ranking-icon {
    width: 52px;
    height: 52px;
    display: block;
    filter: drop-shadow(0 12px 18px rgba(0,0,0,0.22));
    animation: tvPodiumFloat 2.6s ease-in-out infinite;
}

.tv-ranking-place {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tv-ranking-gold .tv-ranking-place { color: #ffd76a; }
.tv-ranking-silver .tv-ranking-place { color: #dfe7f2; }
.tv-ranking-bronze .tv-ranking-place { color: #f2b085; }
.tv-ranking-gold .tv-ranking-icon { animation-delay: 0s; }
.tv-ranking-silver .tv-ranking-icon { animation-delay: .2s; }
.tv-ranking-bronze .tv-ranking-icon { animation-delay: .4s; }
.tv-ranking-content {
    min-width: 0;
}

.tv-ranking-item-podium .tv-ranking-content strong {
    display: block;
    font-size: 1.28rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.tv-ranking-item-podium .tv-ranking-content span {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.9rem;
}

.tv-ranking-gold {
    background: linear-gradient(135deg, rgba(255,215,106,0.16), rgba(255,255,255,0.05));
    border-color: rgba(255,215,106,0.25);
}

.tv-ranking-silver {
    background: linear-gradient(135deg, rgba(223,231,242,0.16), rgba(255,255,255,0.05));
    border-color: rgba(223,231,242,0.2);
}

.tv-ranking-bronze {
    background: linear-gradient(135deg, rgba(242,176,133,0.16), rgba(255,255,255,0.05));
    border-color: rgba(242,176,133,0.2);
}

@keyframes tvPodiumFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.06);
    }
}

.tv-chip {
    min-width: 64px;
    text-align: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.tv-chip.success { background: rgba(30,169,113,0.22); color: #98f2c5; }
.tv-chip.warning { background: rgba(241,162,8,0.22); color: #ffd36b; }
.tv-chip.danger { background: rgba(226,87,76,0.24); color: #ffaea8; }
.tv-chip.accent { background: rgba(57,163,255,0.22); color: #9cd6ff; }

.tv-bottom-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: clamp(14px, 1.1vw, 20px);
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

.tv-table {
    width: 100%;
    border-collapse: collapse;
}

.tv-table th,
.tv-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
    color: rgba(255,255,255,0.86);
}

.tv-table th {
    color: #fff;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tv-empty {
    color: rgba(255,255,255,0.72);
    text-align: center;
    padding: 26px 0;
}

.tv-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tv-toolbar .btn {
    border-color: rgba(255,255,255,0.18);
}

.tv-toolbar .btn-outline {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.tv-footer-note {
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 1620px) {
    .tv-company-chart-layout--compact {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(150px, auto) auto;
        gap: 10px;
    }

    .tv-company-legend--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tv-chart-box-participation {
        max-width: none;
        max-height: clamp(156px, 21vh, 226px);
    }
}

@media (max-width: 1280px) {
    .tv-company-chart-layout--compact {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, auto) auto;
    }

    .tv-company-legend--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        padding-right: 0;
        scrollbar-width: none;
        max-height: none;
    }

    .tv-chart-box-participation {
        max-width: none;
    }
}

@media (max-width: 1400px) {
    .tv-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tv-grid,
    .tv-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .tv-page { padding: 16px; height: auto; min-height: 100vh; overflow-x: hidden; overflow-y: auto; }
    .tv-header { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .tv-meta { width: 100%; min-width: 0; justify-items: center; text-align: center; }
    .tv-meta-top { flex-direction: column; justify-content: center; }
    .tv-digital-clock { min-width: 0; width: 100%; max-width: 240px; }
    .tv-brand { justify-content: center; }
    .tv-logo-wrap { width: 100%; max-width: 320px; }
    .tv-corner-logo { width: 100%; max-width: 240px; justify-self: center; }
    .tv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tv-chart-box-company { min-height: 220px; }
    .tv-company-legend { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .tv-cards { grid-template-columns: 1fr; }
    .tv-chart-box { height: 260px; }
    .tv-company-legend { grid-template-columns: 1fr; }
    .tv-company-legend-item { grid-template-columns: auto minmax(0, 1fr) auto; }
    .tv-company-legend-total { text-align: right; min-width: 72px; }
    .tv-company-legend--compact { grid-template-columns: 1fr; }
    .tv-table-wrap { overflow-x: auto; }
}



/* Painel TV v2 */
.tv-filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tv-view-controls {
    display: none !important;
}

.tv-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
}


.tv-view-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.tv-view-btn {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: #ffffff;
    min-width: 58px;
    height: 42px;
    border-radius: 14px;
    padding: 0 14px;
    font: 700 0.92rem/1 Inter, sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(3, 22, 46, 0.16);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tv-view-btn:hover,
.tv-view-btn:focus-visible {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.34);
    transform: translateY(-1px);
    outline: none;
}

.tv-view-btn-primary {
    min-width: 108px;
    background: rgba(255,255,255,0.18);
}

.tv-page.tv-fit-active .tv-shell {
    zoom: 1;
}

.tv-page.tv-compact .tv-header {
    border-radius: 24px;
    padding: 10px 18px;
}

.tv-page.tv-compact .tv-logo-wrap {
    width: clamp(210px, 18vw, 290px);
    height: clamp(78px, 8vh, 100px);
}

.tv-page.tv-compact .tv-logo-wrap img {
    max-height: clamp(56px, 6.4vh, 76px);
}

.tv-page.tv-compact .tv-corner-logo {
    width: clamp(150px, 14vw, 220px);
    min-height: clamp(60px, 6.4vh, 86px);
    padding: 8px 14px;
}

.tv-page.tv-compact .tv-corner-logo img {
    max-height: clamp(40px, 5.4vh, 62px);
}

.tv-page.tv-compact .tv-digital-clock {
    min-width: clamp(150px, 11vw, 188px);
    padding: 10px 14px;
}

.tv-page.tv-compact .tv-card {
    min-height: clamp(104px, 12.2vh, 142px);
    padding: 14px 18px;
    gap: 10px;
    border-radius: 24px;
}

.tv-page.tv-compact .tv-card strong {
    font-size: clamp(1.9rem, 3.2vw, 2.9rem);
}

.tv-page.tv-compact .tv-card span,
.tv-page.tv-compact .tv-card small,
.tv-page.tv-compact .tv-panel-header span,
.tv-page.tv-compact .tv-company-legend-main span,
.tv-page.tv-compact .tv-company-legend-total span,
.tv-page.tv-compact .tv-ranking-item span,
.tv-page.tv-compact .tv-status-item span,
.tv-page.tv-compact .tv-list-meta span,
.tv-page.tv-compact .tv-simple-item span {
    font-size: 0.84rem;
}

.tv-page.tv-compact .tv-panel {
    padding: 14px 16px;
    border-radius: 24px;
}

.tv-page.tv-compact .tv-panel-header {
    margin-bottom: 12px;
}

.tv-page.tv-compact .tv-panel-header h2 {
    font-size: 1.02rem;
}

.tv-page.tv-compact .tv-chart-box {
    min-height: clamp(196px, 24vh, 260px);
}

.tv-page.tv-compact .tv-chart-box-units {
    min-height: clamp(220px, 28vh, 300px);
}

.tv-page.tv-compact .tv-chart-box-participation,
.tv-page.tv-compact .tv-chart-box-company {
    min-height: clamp(190px, 22vh, 240px);
}

.tv-page.tv-compact .tv-chart-box-monthly {
    min-height: clamp(260px, 34vh, 360px);
}

.tv-page.tv-compact .tv-list-highlight {
    padding: 14px 16px;
    margin-bottom: 12px;
}

.tv-page.tv-compact .tv-list-number {
    min-width: 84px;
    min-height: 84px;
    font-size: 2rem;
}

.tv-page.tv-compact .tv-ranking-item,
.tv-page.tv-compact .tv-status-item,
.tv-page.tv-compact .tv-simple-item,
.tv-page.tv-compact .tv-company-legend-item {
    min-height: 0;
}

.tv-page.tv-tight {
    --tv-density-label: 'compacto';
}

.tv-page.tv-tight .tv-header {
    border-radius: 22px;
    padding: 10px 16px;
    gap: 12px;
}

.tv-page.tv-tight .tv-logo-wrap {
    width: clamp(190px, 16vw, 260px);
    height: clamp(74px, 7vh, 92px);
    padding: 10px 18px;
}

.tv-page.tv-tight .tv-logo-wrap img {
    max-height: clamp(48px, 5.6vh, 64px);
}

.tv-page.tv-tight .tv-corner-logo {
    width: clamp(138px, 12vw, 190px);
    min-height: clamp(54px, 5.4vh, 74px);
    padding: 8px 12px;
    border-radius: 18px;
}

.tv-page.tv-tight .tv-corner-logo img {
    max-height: clamp(34px, 4.2vh, 48px);
}

.tv-page.tv-tight .tv-digital-clock {
    min-width: clamp(148px, 10.5vw, 180px);
    padding: 10px 12px;
    border-radius: 18px;
}

.tv-page.tv-tight .tv-digital-clock strong {
    font-size: clamp(1.18rem, 1.6vw, 1.6rem);
}

.tv-page.tv-tight .tv-digital-clock span,
.tv-page.tv-tight .tv-digital-clock small,
.tv-page.tv-tight .tv-panel-header span,
.tv-page.tv-tight .tv-card small,
.tv-page.tv-tight .tv-company-legend-main span,
.tv-page.tv-tight .tv-company-legend-total span,
.tv-page.tv-tight .tv-company-legend-percent,
.tv-page.tv-tight .tv-ranking-item span,
.tv-page.tv-tight .tv-status-item span,
.tv-page.tv-tight .tv-list-meta span,
.tv-page.tv-tight .tv-simple-item span {
    font-size: 0.74rem;
}

.tv-page.tv-tight .tv-meta {
    min-width: clamp(270px, 25vw, 360px);
    gap: 8px;
}

.tv-page.tv-tight .tv-filter-bar,
.tv-page.tv-tight .tv-view-controls {
    gap: 8px;
}

.tv-page.tv-tight .tv-filter-chip,
.tv-page.tv-tight .tv-view-btn {
    height: 36px;
    min-width: 50px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 0.82rem;
}

.tv-page.tv-tight .tv-title-center h1 {
    font-size: clamp(1.2rem, 1.55vw, 1.6rem);
}

.tv-page.tv-tight .tv-cards {
    gap: 12px;
}

.tv-page.tv-tight .tv-card {
    min-height: 96px;
    padding: 12px 16px;
    border-radius: 22px;
    gap: 10px;
}

.tv-page.tv-tight .tv-card span {
    font-size: 0.86rem;
}

.tv-page.tv-tight .tv-card strong {
    font-size: clamp(1.7rem, 2.7vw, 2.4rem);
}

.tv-page.tv-tight .tv-grid,
.tv-page.tv-tight .tv-bottom-grid,
.tv-page.tv-tight .tv-participation-grid {
    gap: 14px;
}

.tv-page.tv-tight .tv-panel {
    padding: 12px 14px;
    border-radius: 22px;
}

.tv-page.tv-tight .tv-panel-header {
    margin-bottom: 10px;
}

.tv-page.tv-tight .tv-panel-header h2 {
    font-size: 0.98rem;
}

.tv-page.tv-tight .tv-chart-box {
    min-height: clamp(170px, 20vh, 220px);
}

.tv-page.tv-tight .tv-chart-box-units {
    min-height: clamp(190px, 23vh, 250px);
}

.tv-page.tv-tight .tv-chart-box-company,
.tv-page.tv-tight .tv-chart-box-participation {
    min-height: clamp(160px, 19vh, 210px);
    max-width: none;
}

.tv-page.tv-tight .tv-chart-box-monthly {
    min-height: 0;
    height: 100%;
}

.tv-page.tv-tight .tv-company-chart-layout {
    grid-template-rows: minmax(150px, 0.95fr) auto;
    gap: 10px;
}

.tv-page.tv-tight .tv-company-chart-layout--compact {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(136px, auto) auto;
}

.tv-page.tv-tight .tv-company-legend,
.tv-page.tv-tight .tv-company-legend--compact {
    gap: 8px;
}

.tv-page.tv-tight .tv-company-legend--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
}

.tv-page.tv-tight .tv-company-legend-item,
.tv-page.tv-tight .tv-company-legend--compact .tv-company-legend-item {
    padding: 8px 10px;
    border-radius: 14px;
    gap: 8px;
}

.tv-page.tv-tight .tv-company-legend-rank,
.tv-page.tv-tight .tv-company-legend--compact .tv-company-legend-rank {
    min-width: 28px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.tv-page.tv-tight .tv-company-legend-dot {
    width: 8px;
    height: 8px;
    flex-basis: 8px;
}

.tv-page.tv-tight .tv-company-legend-main {
    gap: 5px;
}

.tv-page.tv-tight .tv-company-legend-main strong,
.tv-page.tv-tight .tv-company-legend--compact .tv-company-legend-main strong,
.tv-page.tv-tight .tv-company-legend--primary .tv-company-legend-main strong {
    font-size: 0.74rem;
    line-height: 1.04;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-page.tv-tight .tv-company-legend-head {
    gap: 7px;
}

.tv-page.tv-tight .tv-company-legend-total strong,
.tv-page.tv-tight .tv-company-legend--compact .tv-company-legend-total strong,
.tv-page.tv-tight .tv-company-legend--primary .tv-company-legend-total strong {
    font-size: 0.86rem;
}

.tv-page.tv-tight .tv-company-legend-total span,
.tv-page.tv-tight .tv-company-legend--compact .tv-company-legend-total span,
.tv-page.tv-tight .tv-company-legend--primary .tv-company-legend-total span {
    font-size: 0.6rem;
    margin-top: 2px;
}

.tv-page.tv-tight .tv-company-legend-percent,
.tv-page.tv-tight .tv-company-legend--compact .tv-company-legend-percent,
.tv-page.tv-tight .tv-company-legend--primary .tv-company-legend-percent {
    font-size: 0.64rem;
}

.tv-page.tv-tight .tv-list-highlight {
    padding: 12px 14px;
    gap: 10px;
    margin-bottom: 10px;
}

.tv-page.tv-tight .tv-list-number {
    min-width: 76px;
    min-height: 76px;
    font-size: 1.8rem;
    border-radius: 22px;
}

.tv-page.tv-tight .tv-list-meta strong {
    font-size: 0.94rem;
}

.tv-page.tv-tight .tv-ranking-item,
.tv-page.tv-tight .tv-status-item,
.tv-page.tv-tight .tv-simple-item {
    padding: 10px 12px;
    border-radius: 16px;
    gap: 10px;
}

.tv-page.tv-tight .tv-ranking-item-podium .tv-ranking-content strong {
    font-size: 1rem;
}

.tv-page.tv-tight .tv-ranking-badge {
    min-width: 68px;
}

.tv-page.tv-tight .tv-ranking-icon {
    width: 40px;
    height: 40px;
}

.tv-page.tv-tight .tv-chip {
    min-width: 50px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.tv-page.tv-ultra .tv-header {
    padding: 8px 12px;
    border-radius: 18px;
}

.tv-page.tv-ultra .tv-title-center h1 {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.tv-page.tv-ultra .tv-logo-wrap {
    width: 168px;
    height: 64px;
}

.tv-page.tv-ultra .tv-corner-logo {
    width: 122px;
    min-height: 46px;
}

.tv-page.tv-ultra .tv-digital-clock {
    min-width: 132px;
    padding: 8px 10px;
}

.tv-page.tv-ultra .tv-digital-clock strong {
    font-size: 1.04rem;
}

.tv-page.tv-ultra .tv-card {
    min-height: 82px;
    padding: 10px 12px;
}

.tv-page.tv-ultra .tv-card span {
    font-size: 0.78rem;
}

.tv-page.tv-ultra .tv-card strong {
    font-size: 1.48rem;
}

.tv-page.tv-ultra .tv-panel {
    padding: 10px 12px;
    border-radius: 18px;
}

.tv-page.tv-ultra .tv-panel-header h2 {
    font-size: 0.9rem;
}

.tv-page.tv-ultra .tv-panel-header span,
.tv-page.tv-ultra .tv-card small,
.tv-page.tv-ultra .tv-company-legend-main span,
.tv-page.tv-ultra .tv-company-legend-total span,
.tv-page.tv-ultra .tv-company-legend-percent,
.tv-page.tv-ultra .tv-ranking-item span,
.tv-page.tv-ultra .tv-status-item span,
.tv-page.tv-ultra .tv-list-meta span,
.tv-page.tv-ultra .tv-simple-item span,
.tv-page.tv-ultra .tv-digital-clock span,
.tv-page.tv-ultra .tv-digital-clock small {
    font-size: 0.66rem;
}

.tv-page.tv-ultra .tv-grid,
.tv-page.tv-ultra .tv-bottom-grid,
.tv-page.tv-ultra .tv-participation-grid {
    gap: 10px;
}

.tv-page.tv-ultra .tv-chart-box {
    min-height: 150px;
}

.tv-page.tv-ultra .tv-chart-box-units {
    min-height: 170px;
}

.tv-page.tv-ultra .tv-chart-box-company,
.tv-page.tv-ultra .tv-chart-box-participation {
    min-height: 140px;
    max-width: none;
}

.tv-page.tv-ultra .tv-company-chart-layout,
.tv-page.tv-ultra .tv-company-chart-layout--compact {
    gap: 8px;
}

.tv-page.tv-ultra .tv-company-chart-layout--compact {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(118px, auto) auto;
}

.tv-page.tv-ultra .tv-company-legend,
.tv-page.tv-ultra .tv-company-legend--compact {
    gap: 6px;
}
.tv-page.tv-ultra .tv-company-legend--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
}

.tv-page.tv-ultra .tv-company-legend-item,
.tv-page.tv-ultra .tv-company-legend--compact .tv-company-legend-item {
    padding: 6px 7px;
    grid-template-columns: 22px minmax(0, 1fr);
}

.tv-page.tv-ultra .tv-company-legend-rank,
.tv-page.tv-ultra .tv-company-legend--compact .tv-company-legend-rank {
    min-width: 22px;
    width: 22px;
    height: 22px;
    font-size: 0.58rem;
}

.tv-page.tv-ultra .tv-company-legend-main strong,
.tv-page.tv-ultra .tv-company-legend--compact .tv-company-legend-main strong,
.tv-page.tv-ultra .tv-company-legend--primary .tv-company-legend-main strong {
    font-size: 0.66rem;
    line-height: 1.02;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-page.tv-ultra .tv-company-legend-total strong,
.tv-page.tv-ultra .tv-company-legend--compact .tv-company-legend-total strong,
.tv-page.tv-ultra .tv-company-legend--primary .tv-company-legend-total strong {
    font-size: 0.72rem;
}

.tv-page.tv-ultra .tv-list-highlight {
    padding: 8px 10px;
    margin-bottom: 8px;
}

.tv-page.tv-ultra .tv-list-number {
    min-width: 58px;
    min-height: 58px;
    font-size: 1.38rem;
}

.tv-page.tv-ultra .tv-ranking-item,
.tv-page.tv-ultra .tv-status-item,
.tv-page.tv-ultra .tv-simple-item {
    padding: 8px 10px;
}

.tv-page.tv-ultra .tv-ranking-badge {
    min-width: 58px;
}

.tv-page.tv-ultra .tv-ranking-icon {
    width: 34px;
    height: 34px;
}

.tv-page.tv-ultra .tv-chip {
    min-width: 46px;
    padding: 5px 8px;
    font-size: 0.72rem;
}

.tv-filter-chip.is-active {
    background: rgba(157, 214, 255, 0.2);
    color: #fff;
    border-color: rgba(157, 214, 255, 0.4);
}

.tv-card {
    min-height: clamp(122px, 14vh, 170px);
}

.tv-rotation-shell {
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.tv-rotation-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    width: 100%;
    transition: transform 0.8s ease;
    will-change: transform;
    height: 100%;
}

.tv-rotation-slide {
    width: 100%;
    min-height: 0;
}

.tv-rotation-slide > section {
    height: 100%;
    min-height: 0;
}

.tv-rotation-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.tv-rotation-dots span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
}

.tv-rotation-dots span.is-active {
    background: #8fd2ff;
    box-shadow: 0 0 0 6px rgba(143,210,255,0.16);
}

.tv-participation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    min-height: 0;
    height: 100%;
    align-items: stretch;
}

.tv-participation-panel {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tv-split-stack {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    min-height: 0;
}

.tv-metric-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.tv-list-highlight {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(10px, 1vw, 18px);
    align-items: center;
    margin-bottom: clamp(12px, 1vw, 18px);
    padding: 18px 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
}

.tv-list-number {
    min-width: 104px;
    min-height: 104px;
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,0.14);
}

.tv-list-number.danger {
    color: #ffb3ae;
    background: rgba(226,87,76,0.18);
}

.tv-list-number.warning {
    color: #ffd36b;
    background: rgba(241,162,8,0.18);
}

.tv-list-number.success {
    color: #7cf0c0;
    background: rgba(30,169,113,0.18);
}

.tv-list-meta strong {
    display: block;
    color: #fff;
    font-size: 1.02rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-list-meta span {
    color: rgba(255,255,255,0.78);
}

.tv-list-highlight--compact {
    margin-bottom: 18px;
}

.tv-status-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: auto;
}

.tv-status-breakdown-item {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 18px 14px;
    text-align: center;
}

.tv-status-breakdown-item strong {
    display: block;
    color: #fff;
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    margin-bottom: 8px;
}

.tv-status-breakdown-item span {
    color: rgba(255,255,255,0.76);
    font-size: 0.98rem;
}

.tv-simple-list {
    display: grid;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    padding-bottom: 14px;
    scrollbar-width: none;
    scroll-behavior: auto;
    align-content: start;
}

.tv-simple-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.tv-simple-list.is-scrolling {
    mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,1) 18px, rgba(0,0,0,1) calc(100% - 18px), transparent 100%);
}

.tv-simple-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 14px 16px;
    min-height: 76px;
}

.tv-simple-item > div {
    min-width: 0;
}

.tv-simple-item strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.2;
}

.tv-simple-item span {
    color: rgba(255,255,255,0.76);
    display: block;
    line-height: 1.35;
}


@media (min-width: 1800px) {
    .tv-chart-box {
        height: min(32vh, 360px);
    }
}

@media (max-width: 1400px) {
    .tv-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tv-grid,
    .tv-bottom-grid,
    .tv-participation-grid {
        grid-template-columns: 1fr;
    }

    .tv-split-stack {
        grid-template-rows: auto;
    }

    .tv-status-breakdown {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .tv-filter-bar {
        justify-content: flex-start;
    }

    .tv-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tv-list-highlight {
        grid-template-columns: 1fr;
    }

    .tv-status-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tv-cards {
        grid-template-columns: 1fr;
    }

}


.auth-inline-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.auth-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.password-strength {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid #d8e9fb;
    display: grid;
    gap: 10px;
}

.password-strength-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--primary-dark);
    font-size: 0.94rem;
    font-weight: 700;
}

.password-strength-header strong {
    font-size: 0.92rem;
}

.password-strength-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.password-strength-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 0.95rem;
    line-height: 1;
    background: #fdecec;
    color: #c0392b;
    box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.16);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.password-strength-status[data-strength-level='very-weak'] .password-strength-icon {
    background: #fdecec;
    color: #c0392b;
    box-shadow: inset 0 0 0 1px rgba(192, 57, 43, 0.16);
}

.password-strength-status[data-strength-level='weak'] .password-strength-icon {
    background: #fff1e4;
    color: #d97904;
    box-shadow: inset 0 0 0 1px rgba(217, 121, 4, 0.16);
}

.password-strength-status[data-strength-level='medium'] .password-strength-icon {
    background: #fff8d9;
    color: #b48a00;
    box-shadow: inset 0 0 0 1px rgba(180, 138, 0, 0.16);
}

.password-strength-status[data-strength-level='good'] .password-strength-icon {
    background: #e9f8ed;
    color: #2f8f42;
    box-shadow: inset 0 0 0 1px rgba(47, 143, 66, 0.16);
}

.password-strength-status[data-strength-level='strong'] .password-strength-icon {
    background: #dff7e7;
    color: #17753b;
    box-shadow: inset 0 0 0 1px rgba(23, 117, 59, 0.16);
    transform: scale(1.03);
}

.password-strength-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e5edf6;
}

.password-strength-fill {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: #d44f4f;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength-fill[data-strength-level='very-weak'] {
    background: #d44f4f;
}

.password-strength-fill[data-strength-level='weak'] {
    background: #e3892f;
}

.password-strength-fill[data-strength-level='medium'] {
    background: #d1aa1e;
}

.password-strength-fill[data-strength-level='good'] {
    background: #4ea95a;
}

.password-strength-fill[data-strength-level='strong'] {
    background: #1d8b47;
}

.password-rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.password-rules li {
    position: relative;
    padding-left: 22px;
    color: var(--muted);
    font-size: 0.9rem;
}

.password-rules li::before {
    content: '•';
    position: absolute;
    left: 8px;
    top: 0;
    color: #8da8c6;
    font-weight: 800;
}

.password-rules li.is-valid {
    color: #1d6f3b;
    font-weight: 600;
}

.password-rules li.is-valid::before {
    content: '✓';
    left: 4px;
    color: #1d8b47;
}

/* ===== refresh geral do layout ===== */
:root {
    --bg-deep: #07182b;
    --primary-2: #70bbff;
    --panel-border-strong: #c9ddf2;
    --success-soft: #e9fbf1;
    --warning-soft: #fff6df;
    --danger-soft: #fff1ef;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 16px;
}

body {
    background:
        radial-gradient(circle at top left, rgba(112, 187, 255, 0.14), transparent 24%),
        radial-gradient(circle at bottom right, rgba(13, 78, 152, 0.10), transparent 22%),
        linear-gradient(180deg, #f6fbff 0%, #eef6ff 100%);
}

.app-shell {
    gap: 0;
}

.sidebar {
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1);
}

.brand-card {
    min-height: auto;
    gap: 16px;
    padding: 22px 18px 18px;
}

.brand-card-stack {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.brand-card-divider {
    width: 82px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
}

.brand-card-copy {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.9rem;
    line-height: 1.6;
}

.brand-logo-caca-side {
    width: min(100%, 185px);
}

.brand-logo-ccbe-side {
    width: min(100%, 190px);
}

.nav-menu {
    gap: 10px;
}

.nav-menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-menu a::before {
    content: '';
    width: 18px;
    height: 18px;
    background: currentColor;
    opacity: 0.92;
    flex-shrink: 0;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.nav-menu a[data-icon="dashboard"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 13h8V3H3v10zm10 8h8V11h-8v10zM3 21h8v-6H3v6zm10-10h8V3h-8v8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 13h8V3H3v10zm10 8h8V11h-8v10zM3 21h8v-6H3v6zm10-10h8V3h-8v8z'/%3E%3C/svg%3E");
}

.nav-menu a[data-icon="users"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M16 11c1.66 0 2.99-1.57 2.99-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11zm-8 0c1.66 0 2.99-1.57 2.99-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11zm0 2c-2.33 0-7 1.17-7 3.5V20h14v-3.5C15 14.17 10.33 13 8 13zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.96 1.97 3.45V20h6v-3.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M16 11c1.66 0 2.99-1.57 2.99-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11zm-8 0c1.66 0 2.99-1.57 2.99-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11zm0 2c-2.33 0-7 1.17-7 3.5V20h14v-3.5C15 14.17 10.33 13 8 13zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.96 1.97 3.45V20h6v-3.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E");
}

.nav-menu a[data-icon="office"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M10 2L4 5v17h16V2H10zm2 2h6v16h-2v-4h-2v4h-2V4zM8 7h2v2H8V7zm0 4h2v2H8v-2zm0 4h2v2H8v-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M10 2L4 5v17h16V2H10zm2 2h6v16h-2v-4h-2v4h-2V4zM8 7h2v2H8V7zm0 4h2v2H8v-2zm0 4h2v2H8v-2z'/%3E%3C/svg%3E");
}

.nav-menu a[data-icon="shield"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2l7 3v6c0 5.25-3.67 10.17-7 11-3.33-.83-7-5.75-7-11V5l7-3zm-1 14l5-5-1.41-1.41L11 13.17l-1.59-1.59L8 13l3 3z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2l7 3v6c0 5.25-3.67 10.17-7 11-3.33-.83-7-5.75-7-11V5l7-3zm-1 14l5-5-1.41-1.41L11 13.17l-1.59-1.59L8 13l3 3z'/%3E%3C/svg%3E");
}

.nav-menu a[data-icon="report"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M4 3h12l4 4v14H4V3zm11 1.5V8h3.5L15 4.5zM8 12h8v2H8v-2zm0 4h8v2H8v-2zm0-8h5v2H8V8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M4 3h12l4 4v14H4V3zm11 1.5V8h3.5L15 4.5zM8 12h8v2H8v-2zm0 4h8v2H8v-2zm0-8h5v2H8V8z'/%3E%3C/svg%3E");
}

.nav-menu a[data-icon="monitor"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 4h18v12H3V4zm7 14h4v2h5v1H5v-1h5v-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M3 4h18v12H3V4zm7 14h4v2h5v1H5v-1h5v-2z'/%3E%3C/svg%3E");
}

.nav-menu a[data-icon="lock"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17 8h-1V6a4 4 0 10-8 0v2H7a2 2 0 00-2 2v9a2 2 0 002 2h10a2 2 0 002-2v-9a2 2 0 00-2-2zm-6 8v-3h2v3h-2zm3-8H10V6a2 2 0 114 0v2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17 8h-1V6a4 4 0 10-8 0v2H7a2 2 0 00-2 2v9a2 2 0 002 2h10a2 2 0 002-2v-9a2 2 0 00-2-2zm-6 8v-3h2v3h-2zm3-8H10V6a2 2 0 114 0v2z'/%3E%3C/svg%3E");
}

.user-card small {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.content {
    padding: 24px;
}

.topbar {
    padding: 22px 24px;
    margin-bottom: 20px;
}

.topbar-main {
    justify-content: space-between;
    gap: 20px;
}

.topbar-main-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-chip {
    min-width: 132px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 4px;
}

.topbar-chip span {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
}

.topbar-chip strong {
    font-size: 0.95rem;
    color: var(--primary-dark);
}

.topbar-chip-soft {
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.panel,
.stat-card,
.table-wrap,
.modal-card,
.topbar,
.xlsx-preview,
.preview-pill,
.registro-detail-item,
.registro-detail-block,
.inline-gallery-thumb,
.registro-image-thumb {
    border-color: var(--panel-border-strong);
}

.panel {
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 55%, var(--success) 100%);
    opacity: 0.88;
}

.panel.soft-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,251,255,0.98) 100%);
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 1.22rem;
}

.cards-grid {
    gap: 18px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 142px;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: auto -30px -30px auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(57, 163, 255, 0.08);
}

.stat-card strong {
    position: relative;
    z-index: 1;
}

.stat-card small,
.stat-card span {
    position: relative;
    z-index: 1;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 20px;
    align-items: stretch;
}

.hero-copy {
    display: grid;
    gap: 12px;
}

.hero-copy h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.1vw, 2.2rem);
    line-height: 1.1;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 70ch;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quick-link {
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-link:hover {
    transform: translateY(-2px);
    border-color: #b9d7f5;
    box-shadow: 0 16px 28px rgba(20, 100, 195, 0.08);
}

.quick-link strong {
    font-size: 1rem;
    color: var(--primary-dark);
}

.quick-link span {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.input-group,
.form-grid > div,
.filters-grid > div {
    min-width: 0;
}

label {
    color: var(--text);
}

.field-help,
.auth-note,
.auth-link,
.table-empty-note {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.field-help {
    display: inline-block;
    margin-top: 8px;
}

input,
select,
textarea {
    background: linear-gradient(180deg, #fbfdff 0%, #f5faff 100%);
}

input::placeholder,
textarea::placeholder {
    color: #8fa3b7;
}

.btn {
    min-height: 46px;
    box-shadow: 0 10px 18px rgba(20, 100, 195, 0.08);
}

.btn-outline {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.btn-danger {
    background: linear-gradient(180deg, #fff6f5 0%, #fff1ef 100%);
}

.table-wrap {
    background: #fff;
}

.table-wrap table {
    min-width: 860px;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #eff6ff 0%, #e4f0ff 100%);
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

tbody tr:nth-child(even) {
    background: rgba(243, 249, 255, 0.52);
}

tbody td {
    line-height: 1.55;
}

.table-empty-row td,
.empty-state-cell {
    padding: 28px 22px;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}

.badge {
    letter-spacing: 0.01em;
}

.badge.success {
    background: var(--success-soft);
}

.badge.warning {
    background: var(--warning-soft);
}

.badge.danger {
    background: var(--danger-soft);
}

.footer {
    margin-top: 20px;
    padding-bottom: 10px;
}

.footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.footer-card p,
.footer-card span {
    margin: 0;
    color: var(--muted);
}

.auth-inline-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-link {
    color: var(--primary-dark);
    font-weight: 700;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-note {
    margin: 0;
}

.list-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.info-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
    box-shadow: var(--shadow-soft);
    padding: 20px;
}

.info-card::after {
    content: '';
    position: absolute;
    right: -26px;
    bottom: -26px;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: rgba(20, 100, 195, 0.08);
}

.info-card span,
.info-card strong,
.info-card small {
    position: relative;
    z-index: 1;
    display: block;
}

.info-card span {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.info-card strong {
    margin: 12px 0 6px;
    font-size: 1.95rem;
    line-height: 1;
    color: var(--primary-dark);
}

.info-card small {
    color: var(--muted);
    line-height: 1.55;
}

.info-card.success strong { color: var(--success); }
.info-card.warning strong { color: #b56d00; }
.info-card.danger strong { color: var(--danger); }
.info-card.highlight {
    background: linear-gradient(180deg, #ebf6ff 0%, #dfefff 100%);
}

.table-section-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.table-section-title strong {
    color: var(--primary-dark);
}

.password-strength-bar {
    overflow: hidden;
}

.password-strength-fill {
    transition: width 0.22s ease, background 0.22s ease;
}

@media (max-width: 1280px) {
    .hero-panel,
    .list-summary-grid {
        grid-template-columns: 1fr;
    }

    .quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .content {
        padding: 14px;
    }

    .topbar {
        padding: 16px;
    }

    .topbar-main,
    .topbar-main-left,
    .topbar-actions,
    .footer-card {
        align-items: flex-start;
    }

    .topbar-main,
    .topbar-main-left {
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
    }

    .topbar-chip {
        min-width: 0;
        flex: 1 1 0;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }

    .panel,
    .stat-card,
    .info-card,
    .modal-card {
        border-radius: 22px;
    }

    .brand-card-copy {
        font-size: 0.86rem;
    }
}


/* Ajuste solicitado: remover o bloco de branding superior da sidebar após o login */
.nav-menu-top {
    margin-top: 0;
}

.sidebar {
    padding-top: 24px;
}


.sidebar-brand-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 6px 18px;
}

.sidebar-ccbe-logo {
    width: min(100%, 180px);
    height: auto;
    display: block;
}

.content-topbar {
    display: flex;
    align-items: center;
    min-height: 20px;
    margin-bottom: 16px;
}

.content-topbar .mobile-menu-btn {
    display: none;
}

@media (max-width: 980px) {
    .content-topbar .mobile-menu-btn {
        display: inline-flex;
    }

    .sidebar-brand-simple {
        padding-top: 4px;
    }
}


/* Premium SaaS refresh */
:root {
    --bg: #f3f8ff;
    --panel: rgba(255, 255, 255, 0.98);
    --panel-soft: #f8fbff;
    --text: #153859;
    --muted: #6b86a2;
    --border: #d7e6f5;
    --panel-border-strong: #c7dcf1;
    --shadow: 0 20px 50px rgba(10, 70, 130, 0.08);
    --shadow-soft: 0 12px 28px rgba(10, 70, 130, 0.07);
    --success-soft: #e9f8f1;
    --warning-soft: #fff6df;
    --danger-soft: #ffedeb;
}

body {
    background:
        radial-gradient(circle at top left, rgba(57,163,255,0.08) 0, rgba(57,163,255,0.08) 140px, transparent 141px),
        radial-gradient(circle at bottom right, rgba(30,169,113,0.08) 0, rgba(30,169,113,0.08) 160px, transparent 161px),
        linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
}

.sidebar {
    background: linear-gradient(180deg, #1674d0 0%, #0d5db4 55%, #0a4b93 100%);
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.08);
}

.sidebar-brand-frame {
    width: 100%;
    border-radius: 24px;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.06) 100%);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}

.nav-menu a:hover,
.nav-menu a.active {
    box-shadow: 0 14px 24px rgba(8, 53, 104, 0.14);
}

.user-card {
    position: relative;
    padding-left: 58px;
}

.user-card-icon {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
}

.user-card-icon::before {
    content: '';
    position: absolute;
    inset: 6px;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-3.31 0-6 1.79-6 4v2h12v-2c0-2.21-2.69-4-6-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-3.31 0-6 1.79-6 4v2h12v-2c0-2.21-2.69-4-6-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.executive-strip {
    padding: 24px 24px 20px;
}

.executive-strip-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    gap: 20px;
    align-items: center;
}

.executive-strip h2 {
    margin: 0 0 8px;
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.executive-strip p {
    margin: 0;
    color: var(--muted);
    max-width: 70ch;
    line-height: 1.65;
}

.executive-pills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.executive-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff 0%, #f4f9ff 100%);
    box-shadow: var(--shadow-soft);
    padding: 16px;
}

.executive-pill-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    background: linear-gradient(180deg, #eaf4ff 0%, #dbeeff 100%);
}

.executive-pill-icon svg,
.app-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.executive-pill span {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
    margin-bottom: 4px;
}

.executive-pill strong {
    display: block;
    font-size: 1rem;
    color: var(--text);
}


.executive-pill-media {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eaf4ff 0%, #dbeeff 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    padding: 12px;
}

.executive-pill-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.header-action-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.custom-file-control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,249,255,0.98) 100%);
    box-shadow: var(--shadow-soft);
    flex-wrap: wrap;
}

.file-input-native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.file-trigger-btn {
    min-width: 180px;
    justify-content: center;
}

.file-selected-name {
    flex: 1 1 220px;
    min-width: 0;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.96rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action-panel .panel-header {
    margin-bottom: 0;
}

.modal-card-xl {
    max-width: min(1100px, 96vw);
}

.modal-scrollable {
    max-height: min(88vh, 980px);
    overflow: auto;
}

.modal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-topbar h3 {
    margin-bottom: 6px;
}

.modal-icon-close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #f7fbff;
    color: var(--primary-dark);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.modal-icon-close:hover {
    background: #eef7ff;
}

.premium-filter-panel .panel-header,
.panel[data-icon="filter"] .panel-header {
    padding-right: 72px;
}

.panel[data-icon]::after,
.stat-card[data-icon]::before,
.info-card[data-icon]::before {
    content: '';
    position: absolute;
    right: 18px;
    top: 18px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background-color: rgba(57, 163, 255, 0.12);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 18px;
    mask-size: 18px;
}

.panel[data-icon]::after {
    position: absolute;
    right: 20px;
    top: 18px;
}

.stat-card[data-icon],
.info-card[data-icon] {
    padding-top: 58px;
}

.stat-card[data-icon]::before,
.info-card[data-icon]::before {
    background-color: rgba(20, 100, 195, 0.12);
    width: 44px;
    height: 44px;
}

.panel[data-icon="filter"]::after,
.stat-card[data-icon="layers"]::before,
.info-card[data-icon="chart"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16v2H4V7Zm3 4h10v2H7v-2Zm-2 4h14v2H5v-2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16v2H4V7Zm3 4h10v2H7v-2Zm-2 4h14v2H5v-2Z'/%3E%3C/svg%3E"); }
.panel[data-icon="table"]::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v14H4V5Zm0 4h16M9 5v14M15 5v14'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v14H4V5Zm0 4h16M9 5v14M15 5v14'/%3E%3C/svg%3E"); }
.panel[data-icon="edit"]::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='m4 16 9.5-9.5 3 3L7 19H4v-3Zm12.7-8.8 1.1-1.1a1.7 1.7 0 0 0-2.4-2.4l-1.1 1.1 2.4 2.4Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='m4 16 9.5-9.5 3 3L7 19H4v-3Zm12.7-8.8 1.1-1.1a1.7 1.7 0 0 0-2.4-2.4l-1.1 1.1 2.4 2.4Z'/%3E%3C/svg%3E"); }
.panel[data-icon="chart"]::after, .stat-card[data-icon="spark"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 18h16v2H4v-2Zm2-2 4-5 3 3 5-7 2 1.4L13.2 18l-3.1-3.1L7.6 18 6 16Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 18h16v2H4v-2Zm2-2 4-5 3 3 5-7 2 1.4L13.2 18l-3.1-3.1L7.6 18 6 16Z'/%3E%3C/svg%3E"); }
.stat-card[data-icon="alert"]::before, .info-card[data-icon="idle"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21Zm12-3h-2v-2h2v2Zm0-4h-2v-4h2v4Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21Zm12-3h-2v-2h2v2Zm0-4h-2v-4h2v4Z'/%3E%3C/svg%3E"); }
.stat-card[data-icon="clock"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.75A10.25 10.25 0 1 0 22.25 12 10.26 10.26 0 0 0 12 1.75Zm1 10.66 3.72 2.16-1 1.73L11 13.58V6h2v6.41Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.75A10.25 10.25 0 1 0 22.25 12 10.26 10.26 0 0 0 12 1.75Zm1 10.66 3.72 2.16-1 1.73L11 13.58V6h2v6.41Z'/%3E%3C/svg%3E"); }
.stat-card[data-icon="check"]::before, .info-card[data-icon="check"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='m9.55 18.55-6.3-6.3 1.41-1.4 4.89 4.88 9.79-9.79 1.41 1.41-11.2 11.2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='m9.55 18.55-6.3-6.3 1.41-1.4 4.89 4.88 9.79-9.79 1.41 1.41-11.2 11.2Z'/%3E%3C/svg%3E"); }
.stat-card[data-icon="users"]::before, .info-card[data-icon="users"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.57 2.99-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11Zm-8 0c1.66 0 2.99-1.57 2.99-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.33 0-7 1.17-7 3.5V20h14v-3.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.96 1.97 3.45V20h6v-3.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 2.99-1.57 2.99-3.5S17.66 4 16 4s-3 1.57-3 3.5S14.34 11 16 11Zm-8 0c1.66 0 2.99-1.57 2.99-3.5S9.66 4 8 4 5 5.57 5 7.5 6.34 11 8 11Zm0 2c-2.33 0-7 1.17-7 3.5V20h14v-3.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.96 1.97 3.45V20h6v-3.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E"); }
.info-card[data-icon="office"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M10 2 4 5v17h16V2h-10Zm8 18h-2v-4h-2v4h-2V4h6v16ZM8 7h2v2H8V7Zm0 4h2v2H8v-2Zm0 4h2v2H8v-2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M10 2 4 5v17h16V2h-10Zm8 18h-2v-4h-2v4h-2V4h6v16ZM8 7h2v2H8V7Zm0 4h2v2H8v-2Zm0 4h2v2H8v-2Z'/%3E%3C/svg%3E"); }
.info-card[data-icon="lock"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M17 8h-1V6a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2Zm-6 8v-3h2v3h-2Zm3-8H10V6a2 2 0 1 1 4 0v2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M17 8h-1V6a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2Zm-6 8v-3h2v3h-2Zm3-8H10V6a2 2 0 1 1 4 0v2Z'/%3E%3C/svg%3E"); }
.info-card[data-icon="calendar"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3v18H4V4h3V2Zm11 8H6v10h12V10ZM6 8h12V6H6v2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3v18H4V4h3V2Zm11 8H6v10h12V10ZM6 8h12V6H6v2Z'/%3E%3C/svg%3E"); }
.info-card[data-icon="view"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 5c5.5 0 9.5 4.5 10 7-.5 2.5-4.5 7-10 7S2.5 14.5 2 12c.5-2.5 4.5-7 10-7Zm0 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-2.2a1.8 1.8 0 1 1 0-3.6 1.8 1.8 0 0 1 0 3.6Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 5c5.5 0 9.5 4.5 10 7-.5 2.5-4.5 7-10 7S2.5 14.5 2 12c.5-2.5 4.5-7 10-7Zm0 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-2.2a1.8 1.8 0 1 1 0-3.6 1.8 1.8 0 0 1 0 3.6Z'/%3E%3C/svg%3E"); }

.filters-grid {
    gap: 14px;
}

.filters-grid > div:not(.filter-actions) {
    position: relative;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(244,249,255,0.95) 100%);
    box-shadow: var(--shadow-soft);
}

.filters-grid > div:not(.filter-actions) label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.filters-grid > div:not(.filter-actions) input,
.filters-grid > div:not(.filter-actions) select,
.filters-grid > div:not(.filter-actions) textarea {
    background: transparent;
    border: 0;
    padding: 0;
    min-height: auto;
    box-shadow: none;
    font-size: 1.02rem;
    color: var(--text);
}

.filters-grid > div:not(.filter-actions) input:focus,
.filters-grid > div:not(.filter-actions) select:focus,
.filters-grid > div:not(.filter-actions) textarea:focus {
    box-shadow: none;
}

.filter-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    align-self: stretch;
}

.filter-actions .btn {
    flex: 1 1 0;
    min-width: 0;
}

.form-grid > div,
.form-grid .checkbox-row {
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(247,251,255,0.92) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
}

.form-grid .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid > .form-actions,
.form-grid > .full-width.form-actions,
.form-grid > .full-width:not(.form-actions) {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.table-wrap {
    border-radius: 22px;
    overflow: auto;
    border: 1px solid var(--panel-border-strong);
}

.table-wrap table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-wrap thead th:first-child { border-top-left-radius: 18px; }
.table-wrap thead th:last-child { border-top-right-radius: 18px; }

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn {
    box-shadow: none;
}

.chart-panel .panel-header span {
    max-width: 44ch;
}

.chart-box {
    padding: 10px 4px 0;
}

@media (max-width: 1180px) {
    .executive-strip-main,
    .executive-pills {
        grid-template-columns: 1fr;
    }

    .header-action-group {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 980px) {
    .filters-grid > div:not(.filter-actions),
    .form-grid > div,
    .form-grid .checkbox-row {
        padding: 12px 14px;
    }

    .filter-actions {
        flex-direction: row;
    }

    .custom-file-control {
        align-items: stretch;
    }

    .file-trigger-btn,
    .file-selected-name {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .executive-strip,
    .panel,
    .topbar {
        padding: 18px;
    }

    .filters-grid > div:not(.filter-actions) {
        padding: 12px 14px;
    }

    .filter-actions {
        flex-direction: column;
    }

    .stat-card[data-icon],
    .info-card[data-icon] {
        padding-top: 54px;
    }
}


.panel[data-icon="pulse"]::after { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M3 12h4l2.3-5 3.4 10 2.6-6H21v2h-6.1l-2.2 5.2L9.3 8.2 8.3 14H3v-2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M3 12h4l2.3-5 3.4 10 2.6-6H21v2h-6.1l-2.2 5.2L9.3 8.2 8.3 14H3v-2Z'/%3E%3C/svg%3E"); }
.stat-card[data-icon="idle"]::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm1 5v6l4 2-.9 1.8L11 14V7h2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2Zm1 5v6l4 2-.9 1.8L11 14V7h2Z'/%3E%3C/svg%3E"); }


/* Painel TV - imagens rotativas */
.tv-image-slide {
    min-height: 0;
}

.tv-image-showcase {
    position: relative;
    height: 100%;
    min-height: clamp(520px, 58vh, 760px);
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    background:
        radial-gradient(circle at 20% 20%, rgba(94, 192, 255, 0.20), transparent 34%),
        radial-gradient(circle at 80% 80%, rgba(124, 240, 192, 0.16), transparent 34%),
        rgba(5, 27, 53, 0.76);
    box-shadow: 0 26px 80px rgba(0,0,0,0.26);
}

.tv-page.tv-image-mode {
    padding: 0;
}

.tv-page.tv-image-mode .tv-shell {
    display: block;
    height: 100%;
}

.tv-page.tv-image-mode .tv-header,
.tv-page.tv-image-mode .tv-cards,
.tv-page.tv-image-mode .tv-rotation-dots {
    display: none;
}

.tv-page.tv-image-mode .tv-rotation-shell,
.tv-page.tv-image-mode .tv-rotation-track,
.tv-page.tv-image-mode .tv-rotation-slide,
.tv-page.tv-image-mode .tv-rotation-slide > section {
    height: 100vh;
}

.tv-page.tv-image-mode .tv-image-showcase {
    min-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #02060d;
}

.tv-page.tv-image-mode .tv-image-showcase::before {
    display: none;
}

.tv-page.tv-image-mode .tv-image-showcase::after {
    inset: auto 0 0 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(2, 6, 13, 0) 0%, rgba(2, 6, 13, 0.12) 48%, rgba(2, 6, 13, 0.88) 100%);
}

.tv-page.tv-image-mode .tv-image-showcase-frame {
    width: 100vw;
    height: 100vh;
    max-width: none;
}

.tv-page.tv-image-mode .tv-image-showcase-frame img {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    object-fit: contain;
    background: #02060d;
    filter: none;
}

.tv-page.tv-image-mode .tv-image-showcase-caption {
    left: clamp(20px, 2vw, 34px);
    right: clamp(20px, 2vw, 34px);
    bottom: clamp(20px, 2vw, 34px);
    gap: 12px;
}

.tv-page.tv-image-mode .tv-image-showcase-caption span,
.tv-page.tv-image-mode .tv-image-showcase-caption small {
    background: rgba(5, 18, 38, 0.54);
    backdrop-filter: blur(10px);
}

.tv-page.tv-image-mode .tv-image-showcase-caption strong {
    flex-basis: 100%;
    font-size: clamp(1.5rem, 2.4vw, 2.6rem);
}

.tv-image-showcase::before,
.tv-image-showcase::after {
    content: '';
    position: absolute;
    inset: 24px;
    border-radius: 24px;
    pointer-events: none;
}

.tv-image-showcase::before {
    border: 1px solid rgba(255,255,255,0.10);
}

.tv-image-showcase::after {
    background: linear-gradient(180deg, transparent 56%, rgba(5, 18, 38, 0.74));
}

.tv-image-showcase-frame {
    width: min(96%, 1500px);
    height: min(100%, 720px);
    display: grid;
    place-items: center;
    z-index: 1;
    animation: tvImageFrameIn 1.2s ease both;
}

.tv-image-showcase-frame img {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 24px;
    filter: drop-shadow(0 24px 48px rgba(0,0,0,0.32));
    animation: tvImageKenBurns 30s ease-in-out both;
}

.tv-image-showcase-caption {
    position: absolute;
    left: 46px;
    right: 46px;
    bottom: 34px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    color: #fff;
}

.tv-image-showcase-caption span,
.tv-image-showcase-caption small {
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.tv-image-showcase-caption strong {
    font-size: clamp(1.4rem, 2vw, 2.4rem);
    font-weight: 900;
    text-shadow: 0 8px 26px rgba(0,0,0,0.35);
}

@keyframes tvImageFrameIn {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tvImageKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.035); }
}

.tv-page.tv-tight .tv-image-showcase,
.tv-page.tv-ultra .tv-image-showcase {
    min-height: clamp(430px, 52vh, 620px);
    border-radius: 22px;
}

.tv-page.tv-tight .tv-image-showcase-caption,
.tv-page.tv-ultra .tv-image-showcase-caption {
    left: 28px;
    right: 28px;
    bottom: 24px;
}



/* Correção: imagens do Painel TV ocupam a tela inteira, sem header/cards */
body.tv-body-image-mode {
    background: #000 !important;
}

.tv-page.tv-image-mode,
.tv-page.tv-image-mode:fullscreen,
.tv-page.tv-image-mode:-webkit-full-screen,
.tv-page.tv-image-mode.is-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
}

.tv-page.tv-image-mode .tv-shell {
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
}

.tv-page.tv-image-mode .tv-header,
.tv-page.tv-image-mode .tv-cards,
.tv-page.tv-image-mode .tv-rotation-dots {
    display: none !important;
}

.tv-page.tv-image-mode .tv-rotation-shell {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: #000 !important;
}

.tv-page.tv-image-mode .tv-rotation-track,
.tv-page.tv-image-mode .tv-rotation-slide,
.tv-page.tv-image-mode .tv-rotation-slide > section {
    height: 100vh !important;
    min-height: 100vh !important;
}

.tv-page.tv-image-mode .tv-rotation-slide:not(.tv-image-slide) {
    visibility: hidden !important;
}

.tv-page.tv-image-mode .tv-image-showcase {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
}

.tv-page.tv-image-mode .tv-image-showcase::before,
.tv-page.tv-image-mode .tv-image-showcase::after,
.tv-page.tv-image-mode .tv-image-showcase-caption {
    display: none !important;
}

.tv-page.tv-image-mode .tv-image-showcase-frame {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    z-index: 1;
}

.tv-page.tv-image-mode .tv-image-showcase-frame img {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    background: #000 !important;
    filter: none !important;
}

/* Administração das imagens do Painel TV */
.tv-images-upload-form input[type="file"] {
    padding: 14px;
    background: rgba(255,255,255,0.76);
    border: 1px dashed rgba(21, 74, 126, 0.28);
    border-radius: 16px;
}

.form-hint {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.tv-images-limit-box,
.tv-images-empty {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border-radius: 20px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(21, 74, 126, 0.10);
    color: var(--text);
}

.tv-images-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.tv-image-admin-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid rgba(21, 74, 126, 0.12);
    border-radius: 24px;
    padding: 14px;
    background: rgba(255,255,255,0.82);
    box-shadow: 0 18px 40px rgba(21, 74, 126, 0.08);
}

.tv-image-admin-card.is-inactive {
    opacity: 0.68;
}

.tv-image-admin-preview {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
    background: #e8eef5;
}

.tv-image-admin-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tv-image-admin-preview .badge {
    position: absolute;
    left: 12px;
    top: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.16);
}

.tv-image-admin-meta {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 12px;
    align-items: end;
}

.tv-image-admin-meta small,
.tv-image-admin-meta button {
    grid-column: 1 / -1;
}

.tv-image-admin-meta small {
    color: var(--muted);
    word-break: break-word;
}

.tv-image-admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tv-image-admin-actions form {
    margin: 0;
}

.nav-menu a[data-icon="image"]::before,
.info-card[data-icon="image"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm0 2v10h16V7H4Zm3 8 3-4 2.2 2.8 1.8-2.3L18 15H7Zm10-5.5A1.5 1.5 0 1 1 15.5 8 1.5 1.5 0 0 1 17 9.5Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm0 2v10h16V7H4Zm3 8 3-4 2.2 2.8 1.8-2.3L18 15H7Zm10-5.5A1.5 1.5 0 1 1 15.5 8 1.5 1.5 0 0 1 17 9.5Z'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    .tv-image-admin-meta {
        grid-template-columns: 1fr;
    }

    .tv-image-showcase-caption {
        left: 20px;
        right: 20px;
        bottom: 18px;
    }
}


/* Correção TV/APK - blocos internos sem quebra + slides de 30s */
.tv-page,
.tv-page * {
    box-sizing: border-box;
}

.tv-rotation-shell,
.tv-rotation-track,
.tv-rotation-slide,
.tv-rotation-slide > section,
.tv-panel,
.tv-company-chart-layout,
.tv-company-chart-layout--compact {
    min-width: 0;
    min-height: 0;
}

.tv-rotation-shell {
    height: 100%;
}

.tv-rotation-track {
    display: flex !important;
    flex-wrap: nowrap !important;
}

.tv-rotation-slide {
    flex: 0 0 100%;
    overflow: hidden;
}

.tv-card span,
.tv-card small,
.tv-panel-header h2,
.tv-panel-header span,
.tv-list-meta strong,
.tv-list-meta span,
.tv-company-legend-main strong,
.tv-company-legend-main span,
.tv-company-legend-percent,
.tv-ranking-content strong,
.tv-ranking-content span,
.tv-status-item strong,
.tv-status-item span {
    min-width: 0;
}

.tv-card span,
.tv-card small,
.tv-panel-header h2,
.tv-panel-header span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-participation-grid {
    gap: clamp(12px, 0.9vw, 18px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
}

.tv-participation-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0;
    overflow: hidden;
}

.tv-participation-panel .tv-panel-header {
    margin-bottom: clamp(8px, 0.7vw, 12px);
}

.tv-participation-panel .tv-list-highlight {
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(10px, 0.75vw, 14px);
    padding: clamp(10px, 0.8vw, 14px) clamp(12px, 0.95vw, 16px);
    margin-bottom: clamp(8px, 0.7vw, 12px);
    min-height: 0;
}

.tv-participation-panel .tv-list-number {
    min-width: clamp(72px, 5.4vw, 92px);
    min-height: clamp(72px, 5.4vw, 92px);
    border-radius: clamp(18px, 1.4vw, 24px);
    font-size: clamp(2.1rem, 3.4vw, 3.35rem);
    line-height: 1;
}

.tv-participation-panel .tv-list-meta {
    min-width: 0;
    overflow: hidden;
}

.tv-participation-panel .tv-list-meta strong {
    display: block;
    margin-bottom: 4px;
    font-size: clamp(0.82rem, 0.86vw, 0.98rem);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-participation-panel .tv-list-meta span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: clamp(0.72rem, 0.78vw, 0.88rem);
    line-height: 1.2;
}

.tv-participation-panel .tv-company-chart-layout--compact {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: clamp(6px, 0.55vw, 10px);
    flex: 1 1 auto;
    height: 100%;
    overflow: hidden;
}

.tv-participation-panel .tv-chart-box-participation {
    min-height: 0 !important;
    max-height: none !important;
    height: 100% !important;
    padding: 0 2px;
    overflow: hidden;
}

.tv-participation-panel .tv-company-legend--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    align-content: start;
    max-height: clamp(116px, 15vh, 156px);
    overflow: hidden !important;
    padding-right: 0;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    padding: 6px 8px;
    border-radius: 12px;
    min-height: 0;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-rank {
    min-width: 28px;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.68rem;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-main {
    min-width: 0;
    gap: 3px;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-head {
    gap: 6px;
    min-width: 0;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--legend-color) 22%, transparent);
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-main strong {
    display: block;
    font-size: clamp(0.68rem, 0.72vw, 0.78rem);
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 6px;
    flex-wrap: nowrap;
    min-width: 0;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-percent {
    display: block;
    min-width: 0;
    font-size: clamp(0.56rem, 0.62vw, 0.68rem);
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-total {
    flex: 0 0 auto;
    min-width: 34px;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-total strong {
    font-size: clamp(0.74rem, 0.8vw, 0.9rem);
    line-height: 1;
}

.tv-participation-panel .tv-company-legend--compact .tv-company-legend-total span {
    margin-top: 1px;
    font-size: clamp(0.48rem, 0.55vw, 0.6rem);
    line-height: 1;
    white-space: nowrap;
}

.tv-page.tv-compact .tv-participation-panel .tv-company-legend--compact,
.tv-page.tv-tight .tv-participation-panel .tv-company-legend--compact,
.tv-page.tv-ultra .tv-participation-panel .tv-company-legend--compact {
    max-height: clamp(102px, 14vh, 138px);
    gap: 5px 7px;
}

.tv-page.tv-compact .tv-participation-panel .tv-list-number,
.tv-page.tv-tight .tv-participation-panel .tv-list-number,
.tv-page.tv-ultra .tv-participation-panel .tv-list-number {
    min-width: 68px;
    min-height: 68px;
    font-size: 2rem;
}

.tv-page.tv-compact .tv-participation-panel .tv-list-highlight,
.tv-page.tv-tight .tv-participation-panel .tv-list-highlight,
.tv-page.tv-ultra .tv-participation-panel .tv-list-highlight {
    padding: 9px 10px;
    margin-bottom: 8px;
}

.tv-page.tv-tight .tv-participation-panel .tv-company-legend--compact .tv-company-legend-item,
.tv-page.tv-ultra .tv-participation-panel .tv-company-legend--compact .tv-company-legend-item {
    padding: 5px 7px;
}

/* Em telas baixas, compacta o slide 3 sem deixar conteúdo vazar do bloco. */
@media (max-height: 850px) {
    .tv-participation-panel .tv-list-number {
        min-width: 62px;
        min-height: 62px;
        font-size: 1.85rem;
    }
    .tv-participation-panel .tv-list-highlight {
        padding: 8px 10px;
    }
    .tv-participation-panel .tv-company-legend--compact {
        max-height: 112px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tv-participation-panel .tv-company-legend--compact .tv-company-legend-item {
        padding: 5px 7px;
    }
}


/* =========================================================
   Painel Público • Redesign 2026-08-03
   Mantém paleta atual e reorganiza blocos para reduzir quebra de textos
   ========================================================= */
.tv-public-redesign {
    --tv-surface-1: rgba(255,255,255,0.10);
    --tv-surface-2: rgba(255,255,255,0.06);
    --tv-border-1: rgba(255,255,255,0.16);
    --tv-shadow-1: 0 22px 48px rgba(3, 22, 46, 0.22);
    --tv-shadow-2: 0 14px 34px rgba(3, 22, 46, 0.16);
}

.tv-public-redesign .tv-page,
.tv-public-redesign .tv-page:fullscreen,
.tv-public-redesign .tv-page:-webkit-full-screen,
.tv-public-redesign .tv-page.is-fullscreen {
    padding: clamp(14px, 1.25vw, 24px);
}

.tv-public-redesign .tv-shell {
    gap: clamp(10px, 1vw, 18px);
}

.tv-public-redesign .tv-header {
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr) minmax(280px, 380px);
    gap: clamp(12px, 1vw, 18px);
    border-radius: 32px;
    padding: clamp(14px, 1vw, 18px) clamp(16px, 1.3vw, 24px);
    background: linear-gradient(135deg, rgba(255,255,255,0.11), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: var(--tv-shadow-1);
    position: relative;
    overflow: hidden;
}

.tv-public-redesign .tv-header::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(94,192,255,.95), rgba(124,240,192,.95), rgba(255,211,107,.95));
    opacity: .95;
}

.tv-public-redesign .tv-brand-stack {
    align-self: stretch;
}

.tv-public-redesign .tv-logo-wrap {
    width: 100%;
    max-width: 100%;
    min-height: 100px;
    height: clamp(100px, 9.5vh, 124px);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.1));
}

.tv-public-redesign .tv-logo-wrap img {
    max-width: 100%;
    object-fit: contain;
}

.tv-public-redesign .tv-title-center {
    display: grid;
    gap: 6px;
    align-content: center;
    justify-items: center;
    min-width: 0;
}

.tv-public-redesign .tv-title-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.84);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .72rem;
    font-weight: 800;
}

.tv-public-redesign .tv-title-center h1 {
    font-size: clamp(1.55rem, 2vw, 2.3rem);
    line-height: 1.04;
    letter-spacing: .14em;
}

.tv-public-redesign .tv-title-subtitle {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: clamp(.88rem, .95vw, 1rem);
    font-weight: 600;
    line-height: 1.3;
    text-wrap: balance;
}

.tv-public-redesign .tv-meta {
    min-width: 0;
    width: 100%;
}

.tv-public-redesign .tv-meta-top {
    align-items: stretch;
    gap: 10px;
}

.tv-public-redesign .tv-corner-logo {
    min-width: 128px;
    width: clamp(140px, 10vw, 178px);
    min-height: 88px;
    border-radius: 22px;
    flex: 0 0 auto;
}

.tv-public-redesign .tv-digital-clock {
    flex: 1 1 auto;
    min-width: 0;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 22px;
}

.tv-public-redesign .tv-digital-clock strong,
.tv-public-redesign .tv-digital-clock span,
.tv-public-redesign .tv-digital-clock small {
    width: 100%;
    text-align: left;
}

.tv-public-redesign .tv-filter-bar {
    justify-content: flex-start;
}

.tv-public-redesign .tv-filter-chip {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.14);
    color: #fff;
    font-size: .94rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.tv-public-redesign .tv-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(12px, 1vw, 18px);
}

.tv-public-redesign .tv-card {
    min-height: 0;
    padding: 18px 18px 16px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.07));
    border-color: rgba(255,255,255,.12);
    box-shadow: var(--tv-shadow-2);
    gap: 10px;
}

.tv-public-redesign .tv-card span {
    font-size: .94rem;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: normal;
    text-wrap: balance;
}

.tv-public-redesign .tv-card strong {
    font-size: clamp(2rem, 3vw, 3.15rem);
}

.tv-public-redesign .tv-card small {
    font-size: .8rem;
    line-height: 1.28;
    color: rgba(255,255,255,.72);
}

.tv-public-redesign .tv-rotation-shell {
    min-height: 0;
}

.tv-public-redesign .tv-grid-overview {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.3fr) minmax(300px, .95fr);
    gap: 16px;
}

.tv-public-redesign .tv-bottom-grid-performance {
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .95fr);
    gap: 16px;
}

.tv-public-redesign .tv-participation-grid-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tv-public-redesign .tv-panel {
    border-radius: 28px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.06));
    border-color: rgba(255,255,255,.13);
    box-shadow: var(--tv-shadow-2);
}

.tv-public-redesign .tv-panel-header {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.tv-public-redesign .tv-panel-header h2 {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.08rem;
    line-height: 1.15;
    letter-spacing: .01em;
    word-break: normal;
    overflow-wrap: normal;
}

.tv-public-redesign .tv-panel-header span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 210px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    color: rgba(255,255,255,.78);
    font-size: .74rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

.tv-public-redesign .tv-chart-box-units {
    min-height: clamp(248px, 31vh, 370px);
}

.tv-public-redesign .tv-chart-box-company {
    max-width: 340px;
}

.tv-public-redesign .tv-company-chart-layout {
    grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.1fr);
    grid-template-rows: 1fr;
    gap: 14px;
    align-items: start;
}

.tv-public-redesign .tv-company-chart-layout--compact {
    grid-template-columns: minmax(180px, 0.78fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 12px;
}

.tv-public-redesign .tv-company-legend,
.tv-public-redesign .tv-company-legend--compact {
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: none;
    overflow: hidden;
}

.tv-public-redesign .tv-company-legend-item,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-item {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
}

.tv-public-redesign .tv-company-legend-rank,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-rank {
    min-width: 34px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: .76rem;
}

.tv-public-redesign .tv-company-legend-main,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-main {
    gap: 5px;
}

.tv-public-redesign .tv-company-legend-head,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-head {
    min-width: 0;
}

.tv-public-redesign .tv-company-legend-main strong,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-main strong,
.tv-public-redesign .tv-company-legend--primary .tv-company-legend-main strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    line-height: 1.14;
    text-overflow: initial;
    font-size: .88rem;
}

.tv-public-redesign .tv-company-legend-main span,
.tv-public-redesign .tv-company-legend-percent,
.tv-public-redesign .tv-company-legend-total span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-public-redesign .tv-company-legend-foot,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-foot {
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

.tv-public-redesign .tv-company-legend-total,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-total {
    min-width: 58px;
}

.tv-public-redesign .tv-company-legend-total strong,
.tv-public-redesign .tv-company-legend--compact .tv-company-legend-total strong {
    font-size: .96rem;
}

.tv-public-redesign .tv-ranking-list,
.tv-public-redesign .tv-status-list {
    gap: 10px;
    overflow: hidden;
}

.tv-public-redesign .tv-status-item,
.tv-public-redesign .tv-ranking-item,
.tv-public-redesign .tv-simple-item {
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.10);
}

.tv-public-redesign .tv-status-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.tv-public-redesign .tv-status-item strong,
.tv-public-redesign .tv-ranking-content strong,
.tv-public-redesign .tv-simple-item strong {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: normal;
}

.tv-public-redesign .tv-status-item span:not(.tv-chip),
.tv-public-redesign .tv-ranking-item span:not(.tv-chip),
.tv-public-redesign .tv-simple-item span:not(.tv-chip) {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: normal;
}

.tv-public-redesign .tv-ranking-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.tv-public-redesign .tv-ranking-item-podium {
    gap: 12px;
}

.tv-public-redesign .tv-ranking-badge {
    min-width: 74px;
}

.tv-public-redesign .tv-ranking-icon {
    width: 44px;
    height: 44px;
}

.tv-public-redesign .tv-ranking-item-podium .tv-ranking-content strong {
    font-size: 1.1rem;
}

.tv-public-redesign .tv-chip {
    min-width: 54px;
    padding: 8px 10px;
    font-size: .88rem;
    line-height: 1;
    flex-shrink: 0;
}

.tv-public-redesign .tv-list-highlight {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
    border: 1px solid rgba(255,255,255,.10);
    margin-bottom: 12px;
}

.tv-public-redesign .tv-list-number {
    min-width: 92px;
    height: 92px;
    border-radius: 24px;
    font-size: clamp(2rem, 2.4vw, 2.6rem);
}

.tv-public-redesign .tv-list-meta {
    min-width: 0;
}

.tv-public-redesign .tv-list-meta strong {
    display: block;
    line-height: 1.18;
    margin-bottom: 6px;
}

.tv-public-redesign .tv-list-meta span {
    display: block;
    line-height: 1.3;
    color: rgba(255,255,255,.74);
}

.tv-public-redesign .tv-simple-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.tv-public-redesign .tv-simple-item > div {
    min-width: 0;
}

.tv-public-redesign .tv-rotation-dots {
    margin-top: 12px;
}

@media (max-width: 1680px) {
    .tv-public-redesign .tv-grid-overview {
        grid-template-columns: 1fr 1fr;
    }

    .tv-public-redesign .tv-grid-overview > .tv-panel:last-child {
        grid-column: 1 / -1;
    }

    .tv-public-redesign .tv-bottom-grid-performance {
        grid-template-columns: 1fr;
    }

    .tv-public-redesign .tv-participation-grid-insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1500px) {
    .tv-public-redesign .tv-header {
        grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(250px, 330px);
    }

    .tv-public-redesign .tv-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tv-public-redesign .tv-company-chart-layout,
    .tv-public-redesign .tv-company-chart-layout--compact {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(180px, auto) auto;
    }
}

@media (max-width: 1024px) {
    .tv-public-redesign .tv-header {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .tv-public-redesign .tv-brand,
    .tv-public-redesign .tv-title-center,
    .tv-public-redesign .tv-meta {
        justify-self: stretch;
    }

    .tv-public-redesign .tv-title-center {
        justify-items: start;
        text-align: left;
    }

    .tv-public-redesign .tv-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tv-public-redesign .tv-cards {
        grid-template-columns: 1fr;
    }

    .tv-public-redesign .tv-list-highlight {
        grid-template-columns: 1fr;
    }

    .tv-public-redesign .tv-list-number {
        width: 100%;
    }
}

/* =========================================================
   Painel Público • Versão Executiva Premium
   ========================================================= */
body.tv-executive {
    background:
        radial-gradient(circle at 12% 8%, rgba(94, 192, 255, 0.24), transparent 31%),
        radial-gradient(circle at 86% 12%, rgba(124, 240, 192, 0.13), transparent 28%),
        linear-gradient(145deg, #0d65bd 0%, #084b90 42%, #062f61 100%);
    position: relative;
}

body.tv-executive::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    background-image:
        linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

body.tv-executive::after {
    content: '';
    position: fixed;
    width: 420px;
    height: 420px;
    right: -190px;
    bottom: -220px;
    border-radius: 50%;
    border: 72px solid rgba(255,255,255,.035);
    pointer-events: none;
}

.tv-executive .tv-page {
    position: relative;
    z-index: 1;
}

.tv-executive .tv-shell {
    gap: clamp(10px, .85vw, 16px);
}

.tv-executive .tv-header {
    grid-template-columns: minmax(245px, 310px) minmax(420px, 1fr) minmax(305px, 390px);
    min-height: 132px;
    padding: 14px 18px;
    gap: 16px;
    border-radius: 28px;
    background:
        linear-gradient(125deg, rgba(255,255,255,.14), rgba(255,255,255,.055)),
        rgba(3, 32, 68, .18);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 22px 50px rgba(1, 25, 55, .28), inset 0 1px 0 rgba(255,255,255,.08);
}

.tv-executive .tv-header::before {
    height: 3px;
    background: linear-gradient(90deg, #5ec0ff 0 34%, #7cf0c0 34% 67%, #ffd36b 67% 100%);
}

.tv-executive .tv-logo-wrap {
    height: 102px;
    min-height: 102px;
    padding: 12px 20px;
    border-radius: 22px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.tv-executive .tv-title-center {
    gap: 5px;
}

.tv-executive .tv-title-kicker {
    min-height: 28px;
    padding: 5px 12px;
    font-size: .67rem;
    letter-spacing: .19em;
    color: #9cd6ff;
    background: rgba(94,192,255,.11);
    border-color: rgba(94,192,255,.2);
}

.tv-executive .tv-title-center h1 {
    font-size: clamp(1.7rem, 2.25vw, 2.65rem);
    letter-spacing: .105em;
    text-shadow: 0 10px 28px rgba(1, 22, 48, .34);
    white-space: nowrap;
}

.tv-executive .tv-title-subtitle {
    max-width: 720px;
    font-size: clamp(.82rem, .9vw, .98rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 27px;
    padding: 5px 11px;
    margin-top: 2px;
    border-radius: 999px;
    color: rgba(255,255,255,.78);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.09);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.tv-executive .tv-live-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7cf0c0;
    box-shadow: 0 0 0 5px rgba(124,240,192,.12), 0 0 15px rgba(124,240,192,.75);
    animation: tvExecutivePulse 2s ease-in-out infinite;
}

@keyframes tvExecutivePulse {
    0%, 100% { transform: scale(.86); opacity: .76; }
    50% { transform: scale(1.08); opacity: 1; }
}

.tv-executive .tv-meta {
    gap: 8px;
}

.tv-executive .tv-meta-top {
    gap: 8px;
}

.tv-executive .tv-corner-logo {
    width: 142px;
    min-width: 142px;
    min-height: 82px;
    padding: 9px 13px;
    border-radius: 19px;
    box-shadow: 0 14px 28px rgba(1, 24, 51, .22);
}

.tv-executive .tv-digital-clock {
    min-height: 82px;
    padding: 12px 14px;
    border-radius: 19px;
    background: rgba(255,255,255,.085);
    border-color: rgba(255,255,255,.13);
    box-shadow: none;
}

.tv-executive .tv-digital-clock strong {
    font-size: clamp(1.45rem, 1.65vw, 1.92rem);
}

.tv-executive .tv-digital-clock span,
.tv-executive .tv-digital-clock small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-filter-chip {
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 13px;
    font-size: .82rem;
    background: linear-gradient(90deg, rgba(94,192,255,.14), rgba(255,255,255,.065));
    border-color: rgba(94,192,255,.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.tv-executive .tv-card {
    position: relative;
    min-height: 118px;
    padding: 16px 17px 14px;
    gap: 7px;
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(150deg, rgba(255,255,255,.125), rgba(255,255,255,.052)),
        rgba(5, 47, 96, .2);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 16px 34px rgba(2, 24, 51, .18), inset 0 1px 0 rgba(255,255,255,.07);
}

.tv-executive .tv-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #9cd6ff;
    box-shadow: 0 0 18px rgba(156,214,255,.55);
}

.tv-executive .tv-card.card-accent::before { background: #5ec0ff; }
.tv-executive .tv-card.card-success::before { background: #7cf0c0; }
.tv-executive .tv-card.card-danger::before { background: #ff9c95; }
.tv-executive .tv-card.card-warning::before { background: #ffd36b; }

.tv-executive .tv-card::after {
    content: '';
    position: absolute;
    width: 76px;
    height: 76px;
    right: -30px;
    bottom: -34px;
    border-radius: 50%;
    background: rgba(255,255,255,.035);
    border: 14px solid rgba(255,255,255,.025);
}

.tv-executive .tv-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.tv-executive .tv-card-top > span {
    min-width: 0;
    color: rgba(255,255,255,.8);
    font-size: clamp(.78rem, .82vw, .92rem);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-kpi-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.88);
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.1);
    font-size: .62rem;
    letter-spacing: .04em;
    font-weight: 900;
}

.tv-executive .tv-card.card-accent .tv-kpi-icon { color: #9cd6ff; background: rgba(94,192,255,.11); }
.tv-executive .tv-card.card-success .tv-kpi-icon { color: #98f2c5; background: rgba(124,240,192,.1); }
.tv-executive .tv-card.card-danger .tv-kpi-icon { color: #ffaea8; background: rgba(255,156,149,.1); }
.tv-executive .tv-card.card-warning .tv-kpi-icon { color: #ffe29a; background: rgba(255,211,107,.1); }

.tv-executive .tv-card strong {
    font-size: clamp(2rem, 2.75vw, 3.05rem);
    letter-spacing: -.035em;
    font-variant-numeric: tabular-nums;
}

.tv-executive .tv-card small {
    display: block;
    max-width: 100%;
    font-size: clamp(.68rem, .7vw, .78rem);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-grid-overview {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(285px, .82fr);
    gap: 12px;
}

.tv-executive .tv-bottom-grid-performance {
    grid-template-columns: minmax(0, 1.48fr) minmax(340px, .82fr);
    gap: 12px;
}

.tv-executive .tv-participation-grid-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tv-executive .tv-panel {
    position: relative;
    padding: 16px;
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(255,255,255,.105), rgba(255,255,255,.045)),
        rgba(4, 42, 84, .18);
    border: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 18px 38px rgba(2, 24, 51, .18), inset 0 1px 0 rgba(255,255,255,.055);
}

.tv-executive .tv-panel::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, #5ec0ff, rgba(94,192,255,.12));
}

.tv-executive .tv-panel-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding-left: 4px;
    margin-bottom: 12px;
}

.tv-executive .tv-panel-header h2 {
    font-size: clamp(.98rem, 1.05vw, 1.15rem);
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-panel-header span {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,.62);
    font-size: clamp(.68rem, .72vw, .78rem);
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-chart-box-units {
    min-height: clamp(225px, 28vh, 340px);
}

.tv-executive .tv-chart-box-company {
    min-height: clamp(205px, 25vh, 298px);
    max-width: 315px;
}

.tv-executive .tv-company-chart-layout {
    grid-template-columns: minmax(200px, .82fr) minmax(250px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.tv-executive .tv-company-chart-layout--compact {
    grid-template-columns: minmax(170px, .68fr) minmax(250px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.tv-executive .tv-company-legend,
.tv-executive .tv-company-legend--compact {
    align-content: center;
    gap: 7px;
}

.tv-executive .tv-company-legend-item,
.tv-executive .tv-company-legend--compact .tv-company-legend-item,
.tv-executive .tv-company-legend--primary .tv-company-legend-item {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
}

.tv-executive .tv-company-legend-rank,
.tv-executive .tv-company-legend--compact .tv-company-legend-rank,
.tv-executive .tv-company-legend--primary .tv-company-legend-rank {
    min-width: 31px;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    font-size: .7rem;
}

.tv-executive .tv-company-legend-main strong,
.tv-executive .tv-company-legend--compact .tv-company-legend-main strong,
.tv-executive .tv-company-legend--primary .tv-company-legend-main strong {
    display: block;
    font-size: clamp(.75rem, .77vw, .84rem);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-company-legend-main span,
.tv-executive .tv-company-legend-percent,
.tv-executive .tv-company-legend-total span {
    font-size: .62rem;
}

.tv-executive .tv-company-legend-total strong,
.tv-executive .tv-company-legend--compact .tv-company-legend-total strong,
.tv-executive .tv-company-legend--primary .tv-company-legend-total strong {
    font-size: .86rem;
}

.tv-executive .tv-ranking-list,
.tv-executive .tv-status-list {
    gap: 8px;
}

.tv-executive .tv-status-item,
.tv-executive .tv-ranking-item,
.tv-executive .tv-simple-item {
    border-radius: 15px;
    padding: 10px 12px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.075);
}

.tv-executive .tv-status-item {
    grid-template-columns: minmax(105px, .8fr) minmax(0, 1fr) auto;
    gap: 9px;
}

.tv-executive .tv-status-item strong,
.tv-executive .tv-ranking-content strong,
.tv-executive .tv-simple-item strong {
    font-size: clamp(.78rem, .82vw, .9rem);
}

.tv-executive .tv-status-item span:not(.tv-chip),
.tv-executive .tv-ranking-item span:not(.tv-chip),
.tv-executive .tv-simple-item span:not(.tv-chip) {
    font-size: clamp(.66rem, .69vw, .75rem);
}

.tv-executive .tv-ranking-item-podium {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 10px;
}

.tv-executive .tv-ranking-badge {
    min-width: 56px;
    gap: 3px;
}

.tv-executive .tv-ranking-icon {
    width: 38px;
    height: 38px;
}

.tv-executive .tv-ranking-place {
    font-size: .58rem;
}

.tv-executive .tv-ranking-item-podium .tv-ranking-content strong {
    font-size: clamp(.88rem, .95vw, 1.04rem);
}

.tv-executive .tv-ranking-item-podium .tv-ranking-content span {
    margin-top: 2px;
    font-size: .7rem;
}

.tv-executive .tv-chip {
    min-width: 48px;
    padding: 7px 9px;
    font-size: .78rem;
}

.tv-executive .tv-list-highlight {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 13px;
    margin-bottom: 9px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
}

.tv-executive .tv-list-number {
    min-width: 76px;
    width: 76px;
    height: 76px;
    border-radius: 20px;
    font-size: clamp(1.75rem, 2vw, 2.2rem);
}

.tv-executive .tv-list-meta strong {
    font-size: clamp(.78rem, .84vw, .92rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-executive .tv-list-meta span {
    font-size: clamp(.66rem, .7vw, .75rem);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.tv-executive .tv-rotation-dots {
    gap: 8px;
    margin-top: 8px;
}

.tv-executive .tv-rotation-dots span {
    width: 7px;
    height: 7px;
    background: rgba(255,255,255,.28);
    border: 0;
    transition: width .28s ease, background .28s ease;
}

.tv-executive .tv-rotation-dots span.is-active {
    width: 30px;
    border-radius: 999px;
    background: #9cd6ff;
    box-shadow: 0 0 14px rgba(94,192,255,.5);
}

/* Mantém a grade executiva em TVs menores sem criar linhas extras */
@media (max-width: 1680px) and (min-width: 1101px) {
    .tv-executive .tv-header {
        grid-template-columns: minmax(215px, 270px) minmax(360px, 1fr) minmax(285px, 345px);
        min-height: 118px;
        padding: 12px 15px;
    }

    .tv-executive .tv-logo-wrap {
        height: 90px;
        min-height: 90px;
    }

    .tv-executive .tv-title-center h1 {
        font-size: clamp(1.48rem, 1.9vw, 2.1rem);
    }

    .tv-executive .tv-cards {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 9px;
    }

    .tv-executive .tv-card {
        min-height: 104px;
        padding: 13px 14px 12px;
    }

    .tv-executive .tv-card strong {
        font-size: clamp(1.75rem, 2.45vw, 2.55rem);
    }

    .tv-executive .tv-grid-overview {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(255px, .82fr);
    }

    .tv-executive .tv-bottom-grid-performance {
        grid-template-columns: minmax(0, 1.4fr) minmax(310px, .84fr);
    }

    .tv-executive .tv-participation-grid-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tv-executive .tv-company-chart-layout,
    .tv-executive .tv-company-chart-layout--compact {
        grid-template-columns: minmax(160px, .7fr) minmax(210px, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }
}

@media (max-width: 1100px) {
    .tv-executive .tv-header {
        grid-template-columns: 1fr;
    }

    .tv-executive .tv-title-center h1,
    .tv-executive .tv-title-subtitle {
        white-space: normal;
    }

    .tv-executive .tv-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tv-executive .tv-grid-overview,
    .tv-executive .tv-bottom-grid-performance,
    .tv-executive .tv-participation-grid-insights {
        grid-template-columns: 1fr;
    }

    .tv-executive .tv-company-chart-layout,
    .tv-executive .tv-company-chart-layout--compact {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(190px, auto) auto;
    }
}

@media (max-width: 640px) {
    .tv-executive .tv-cards {
        grid-template-columns: 1fr;
    }

    .tv-executive .tv-meta-top {
        flex-direction: column;
    }

    .tv-executive .tv-corner-logo {
        width: 100%;
    }

    .tv-executive .tv-list-highlight {
        grid-template-columns: 1fr;
    }

    .tv-executive .tv-list-number {
        width: 100%;
    }
}


/* =========================================================
   Correção v3 • Azul original + pódio sem corte
   ========================================================= */
body.tv-executive {
    background: radial-gradient(circle at top, #1e7fde 0%, #0e5eb8 32%, #08396f 100%) !important;
}

body.tv-executive::before {
    opacity: .08;
}

body.tv-executive::after {
    display: none;
}

.tv-executive .tv-page:fullscreen,
.tv-executive .tv-page:-webkit-full-screen,
.tv-executive .tv-page.is-fullscreen {
    background: radial-gradient(circle at top, #1e7fde 0%, #0e5eb8 32%, #08396f 100%) !important;
}

.tv-executive .tv-header::before {
    background: linear-gradient(90deg, #8fd2ff 0%, #5ec0ff 48%, #1e7fde 100%);
}

.tv-executive .tv-ranking-item-podium {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 10px;
}

.tv-executive .tv-ranking-badge {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    justify-self: start;
}

.tv-executive .tv-ranking-place {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 2px;
    font-size: .70rem !important;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
}

.tv-executive .tv-page.tv-compact .tv-ranking-item-podium,
.tv-executive .tv-page.tv-tight .tv-ranking-item-podium,
.tv-executive .tv-page.tv-ultra .tv-ranking-item-podium {
    grid-template-columns: 84px minmax(0, 1fr) auto;
}

.tv-executive .tv-page.tv-compact .tv-ranking-badge,
.tv-executive .tv-page.tv-tight .tv-ranking-badge,
.tv-executive .tv-page.tv-ultra .tv-ranking-badge {
    width: 84px;
    min-width: 84px;
    max-width: 84px;
}

.tv-executive .tv-page.tv-tight .tv-ranking-place,
.tv-executive .tv-page.tv-ultra .tv-ranking-place {
    font-size: .66rem !important;
}
