.live-config-page {
    min-height: 100vh;
    padding: 38px clamp(20px, 4vw, 58px) 72px;
    color: var(--text-primary, #17324A);
}

.live-config-page,
.live-config-page * { box-sizing: border-box; }

.live-config-hero,
.live-admin-tabs,
.live-admin-panel { width: min(1380px, 100%); margin-inline: auto; }

.live-config-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.live-config-eyebrow {
    color: var(--primary, #22B8EF);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.live-config-hero h1,
.live-dashboard-header h2 {
    margin: 6px 0 8px;
    color: var(--text-primary, #17324A);
    line-height: 1.05;
}

.live-config-hero h1 { font-size: clamp(2.1rem, 4vw, 3.25rem); }
.live-dashboard-header h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }

.live-config-hero p,
.live-dashboard-header p {
    max-width: 840px;
    margin: 0;
    color: var(--text-secondary, #79869F);
    line-height: 1.65;
}

.live-config-open,
.live-config-primary,
.live-config-secondary,
.live-config-ghost,
.live-admin-tab {
    min-height: 44px;
    border-radius: var(--radius-md, 12px);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.live-config-open,
.live-config-secondary,
.live-admin-tab {
    padding: 11px 16px;
    border: 1px solid var(--border-strong, rgba(23,50,74,.2));
    background: var(--bg-surface-elevated, #F4F8FB);
    color: var(--text-primary, #17324A);
    text-decoration: none;
}

.live-config-primary {
    padding: 11px 18px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #22B8EF 0%, #46C3F1 100%);
    color: #FEFEFE;
    box-shadow: 0 9px 22px rgba(34,184,239,.14);
}

.live-config-ghost {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-soft, rgba(23,50,74,.14));
    background: transparent;
    color: var(--text-secondary, #79869F);
}

.live-admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 5px;
    border: 1px solid var(--border-soft, rgba(23,50,74,.12));
    border-radius: 14px;
    background: var(--bg-section, #F4F7F9);
}

.live-admin-tab { flex: 0 0 auto; min-height: 40px; border-color: transparent; background: transparent; }
.live-admin-tab.ativo {
    background: var(--bg-surface, #FEFEFE);
    color: var(--primary, #22B8EF);
    border-color: var(--border-soft, rgba(23,50,74,.14));
    box-shadow: var(--shadow-sm, 0 6px 18px rgba(23,50,74,.07));
}

.live-admin-panel[hidden],
.live-provider-card[hidden],
.live-config-fallback[hidden],
.live-dashboard-alert[hidden],
.live-dashboard-card[hidden] { display: none !important; }

.live-config-status {
    margin-bottom: 18px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border: 1px solid var(--border-soft, rgba(23,50,74,.14));
    border-radius: var(--radius-lg, 16px);
    background: var(--bg-surface, #FEFEFE);
    box-shadow: var(--shadow-sm, 0 6px 18px rgba(23,50,74,.07));
}

.live-config-status span,
.live-config-status strong { display: block; }
.live-config-status > div:first-child > span {
    margin-bottom: 3px;
    color: var(--text-secondary, #79869F);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.live-config-status strong { font-size: 18px; }

.live-config-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.live-config-pill {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--primary-soft, rgba(34,184,239,.1));
    color: var(--primary, #22B8EF);
    font-size: 11px;
    font-weight: 800;
}

.live-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.live-config-card,
.live-dashboard-card,
.live-dashboard-kpi,
.live-dashboard-footnote {
    border: 1px solid var(--border-soft, rgba(23,50,74,.14));
    border-radius: var(--radius-lg, 16px);
    background: var(--bg-surface, #FEFEFE);
    box-shadow: var(--shadow-sm, 0 6px 18px rgba(23,50,74,.07));
}

.live-config-card { padding: 22px; }
.live-config-card-primary,
.live-provider-card,
.live-config-card-check { grid-column: span 2; }

.live-config-card > header {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.live-config-card > header > span {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft, rgba(34,184,239,.12));
    color: var(--primary, #22B8EF);
    font-size: 11px;
    font-weight: 900;
}

.live-config-card h2 { margin: 0 0 4px; color: var(--text-primary, #17324A); font-size: 20px; }
.live-config-card p { margin: 0; color: var(--text-secondary, #79869F); line-height: 1.5; }

.live-config-fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.live-config-field { display: grid; gap: 7px; margin-top: 14px; }
.live-config-field > span { color: var(--text-primary, #17324A); font-size: 12px; font-weight: 800; }
.live-config-field > span em { color: var(--text-muted, #8793A5); font-style: normal; font-weight: 600; }
.live-config-field small { color: var(--text-secondary, #79869F); line-height: 1.45; }
.live-config-field small b { color: inherit; }

.live-config-field :is(input, select) {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--border-soft, rgba(23,50,74,.14));
    border-radius: var(--radius-md, 12px);
    background: var(--bg-section, #F4F7F9);
    color: var(--text-primary, #17324A);
    font: inherit;
}

.live-config-input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.live-config-toggle,
.live-config-note,
.live-config-result,
.live-config-fallback,
.live-config-help {
    margin-top: 18px;
    border: 1px solid var(--border-soft, rgba(23,50,74,.14));
    border-radius: var(--radius-md, 12px);
    background: var(--bg-section, #F4F7F9);
}

.live-config-toggle { padding: 14px 15px; display: flex; align-items: flex-start; gap: 11px; }
.live-config-toggle input { margin-top: 3px; accent-color: var(--primary, #22B8EF); }
.live-config-toggle strong,
.live-config-toggle span { display: block; }
.live-config-toggle span { margin-top: 2px; color: var(--text-secondary, #79869F); line-height: 1.45; }

.live-config-fallback { padding: 0 15px 15px; }
.live-config-note { padding: 14px 15px; border-left: 3px solid var(--accent, #D7B07C); }
.live-config-note.compacta { margin-top: 12px; }
.live-config-note strong { color: var(--accent, #D7B07C); }
.live-config-note p { margin-top: 4px; }

.live-config-help { overflow: hidden; }
.live-config-help summary {
    padding: 13px 15px;
    cursor: pointer;
    color: var(--text-primary, #17324A);
    font-weight: 800;
}
.live-config-help > div { padding: 0 15px 15px; }
.live-config-help p + p { margin-top: 8px; }
.live-config-help code {
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(34,184,239,.09);
    color: var(--primary, #22B8EF);
}

.live-config-result { min-height: 74px; padding: 14px 15px; color: var(--text-secondary, #79869F); line-height: 1.55; }
.live-config-actions { margin-top: 14px; display: flex; justify-content: flex-end; gap: 9px; }

/* Dashboard */
.live-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 18px;
}
.live-dashboard-actions { display: flex; align-items: center; gap: 10px; }
.live-dashboard-actions > span { color: var(--text-secondary, #79869F); font-size: 12px; white-space: nowrap; }

.live-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.live-dashboard-kpi { padding: 18px; }
.live-dashboard-kpi-main { border-color: rgba(34,184,239,.28); }
.live-dashboard-kpi > span,
.live-dashboard-kpi > strong,
.live-dashboard-kpi > small { display: block; }
.live-dashboard-kpi > span {
    color: var(--text-secondary, #79869F);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.live-dashboard-kpi > strong {
    margin: 5px 0 3px;
    color: var(--text-primary, #17324A);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    line-height: 1;
}
.live-dashboard-kpi-main > strong { color: var(--primary, #22B8EF); }
.live-dashboard-kpi > small { color: var(--text-secondary, #79869F); line-height: 1.4; }

.live-dashboard-alert {
    margin-bottom: 16px;
    padding: 13px 16px;
    display: flex;
    gap: 9px;
    align-items: center;
    border: 1px solid rgba(245,166,35,.35);
    border-radius: 12px;
    background: rgba(245,166,35,.1);
    color: var(--text-primary, #17324A);
}
.live-dashboard-alert strong { color: #B87400; white-space: nowrap; }

.live-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.live-dashboard-card { padding: 19px; }
.live-dashboard-card > header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft, rgba(23,50,74,.12));
}
.live-dashboard-card header span:first-child {
    color: var(--text-secondary, #79869F);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.live-dashboard-card h3 { margin: 3px 0 0; color: var(--text-primary, #17324A); font-size: 18px; }

.live-dashboard-status {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(45,140,255,.1);
    color: var(--info, #2D8CFF);
    font-size: 11px;
    font-weight: 800;
}
.live-dashboard-status.live { background: rgba(47,191,113,.12); color: var(--success, #2FBF71); }
.live-dashboard-status.erro { background: rgba(229,72,77,.12); color: var(--danger, #E5484D); }
.live-dashboard-status.neutro { background: rgba(121,134,159,.12); color: var(--text-secondary, #79869F); }

.live-dashboard-details { margin: 0; }
.live-dashboard-details > div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-soft, rgba(23,50,74,.08));
}
.live-dashboard-details > div:last-child { border-bottom: 0; }
.live-dashboard-details dt { color: var(--text-secondary, #79869F); font-size: 12px; }
.live-dashboard-details dd { margin: 0; color: var(--text-primary, #17324A); overflow-wrap: anywhere; }

.live-dashboard-chart-card { grid-column: span 2; }
.live-dashboard-chart {
    height: 180px;
    margin-top: 18px;
    padding: 10px 8px 0;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    border-bottom: 1px solid var(--border-soft, rgba(23,50,74,.12));
}
.live-dashboard-chart-bar {
    flex: 1 1 0;
    min-width: 4px;
    height: var(--live-bar-height, 4%);
    max-width: 24px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, #38C7FA 0%, #22B8EF 100%);
    transition: height .2s ease;
}
.live-dashboard-chart-empty {
    align-self: center;
    width: 100%;
    color: var(--text-secondary, #79869F);
    text-align: center;
}
.live-dashboard-chart-legend { display: flex; justify-content: space-between; padding-top: 7px; color: var(--text-muted, #8793A5); font-size: 10px; }

.live-dashboard-footnote { margin-top: 16px; padding: 14px 16px; color: var(--text-secondary, #79869F); line-height: 1.55; }
.live-dashboard-footnote strong { color: var(--text-primary, #17324A); }

html[data-theme="dark"] .live-config-page :is(
    .live-config-status,
    .live-config-card,
    .live-dashboard-card,
    .live-dashboard-kpi,
    .live-dashboard-footnote
) {
    background: linear-gradient(145deg, #102536 0%, #17354A 100%);
    border-color: rgba(171,184,196,.14);
    color: #F8F6F0;
    box-shadow: none;
}

html[data-theme="dark"] .live-config-page .live-admin-tabs {
    background: #0D1C29;
    border-color: rgba(171,184,196,.12);
}

html[data-theme="dark"] .live-config-page .live-admin-tab { color: #ABB8C4; }
html[data-theme="dark"] .live-config-page .live-admin-tab.ativo {
    background: #17354A;
    color: #38C7FA;
    border-color: rgba(56,199,250,.25);
    box-shadow: none;
}

html[data-theme="dark"] .live-config-page :is(
    .live-config-field input,
    .live-config-field select,
    .live-config-toggle,
    .live-config-note,
    .live-config-result,
    .live-config-fallback,
    .live-config-help,
    .live-config-open,
    .live-config-secondary
) {
    background: #0D1C29;
    color: #F8F6F0;
    border-color: rgba(171,184,196,.16);
    color-scheme: dark;
}

html[data-theme="dark"] .live-config-page :is(
    .live-config-hero h1,
    .live-dashboard-header h2,
    .live-config-card h2,
    .live-config-field > span,
    .live-config-status strong,
    .live-config-toggle strong,
    .live-config-help summary,
    .live-dashboard-kpi > strong,
    .live-dashboard-card h3,
    .live-dashboard-details dd,
    .live-dashboard-footnote strong
) { color: #F8F6F0; }

html[data-theme="dark"] .live-config-page :is(
    .live-config-hero p,
    .live-dashboard-header p,
    .live-config-card p,
    .live-config-field small,
    .live-config-toggle span,
    .live-config-result,
    .live-dashboard-actions > span,
    .live-dashboard-kpi > span,
    .live-dashboard-kpi > small,
    .live-dashboard-details dt,
    .live-dashboard-footnote,
    .live-dashboard-chart-empty
) { color: #ABB8C4; }

html[data-theme="dark"] .live-config-page .live-config-ghost {
    border-color: rgba(171,184,196,.16);
    color: #ABB8C4;
}

html[data-theme="dark"] .live-config-page .live-dashboard-card > header,
html[data-theme="dark"] .live-config-page .live-dashboard-details > div,
html[data-theme="dark"] .live-config-page .live-dashboard-chart {
    border-color: rgba(171,184,196,.12);
}

html[data-theme="dark"] .live-config-page .live-dashboard-alert {
    background: rgba(245,166,35,.12);
    border-color: rgba(245,166,35,.28);
    color: #F8F6F0;
}
html[data-theme="dark"] .live-config-page .live-dashboard-alert strong { color: #FFD275; }
html[data-theme="dark"] .live-config-page .live-dashboard-status.neutro { color: #ABB8C4; }

@media (hover:hover) and (pointer:fine) {
    .live-config-open:hover,
    .live-config-primary:hover,
    .live-config-secondary:hover,
    .live-config-ghost:hover,
    .live-admin-tab:hover { transform: translateY(-1px); }
}

@media (max-width: 980px) {
    .live-dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .live-config-page { padding: 24px 16px 56px; }
    .live-config-hero,
    .live-dashboard-header { align-items: stretch; flex-direction: column; }
    .live-config-open { width: 100%; text-align: center; }
    .live-config-status { align-items: flex-start; flex-direction: column; }
    .live-config-pills { justify-content: flex-start; }
    .live-config-grid,
    .live-dashboard-grid { grid-template-columns: 1fr; }
    .live-config-card-primary,
    .live-provider-card,
    .live-config-card-check,
    .live-dashboard-chart-card { grid-column: auto; }
    .live-config-fields-2 { grid-template-columns: 1fr; }
    .live-config-input-action { grid-template-columns: 1fr; }
    .live-config-input-action > button,
    .live-config-actions > button { width: 100%; }
    .live-config-actions { display: grid; grid-template-columns: 1fr; }
    .live-dashboard-actions { align-items: stretch; flex-direction: column; }
    .live-dashboard-actions > span { white-space: normal; }
}

@media (max-width: 520px) {
    .live-admin-tabs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .live-admin-tab { width: 100%; }
    .live-dashboard-kpis { grid-template-columns: 1fr; }
    .live-dashboard-details > div { grid-template-columns: 1fr; gap: 4px; }
    .live-dashboard-alert { align-items: flex-start; flex-direction: column; }
    .live-dashboard-chart { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
    .live-config-page * { transition: none !important; }
}

/* =========================================================
   E7.4C8 — DASHBOARD MULTIPLATAFORMA / PRESENÇA IECJS
========================================================= */
.live-dashboard-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.live-dashboard-kpi-main {
    border-color: rgba(56,199,250,.30);
    background: linear-gradient(145deg, rgba(56,199,250,.08), var(--bg-surface, #FEFEFE));
}
html[data-theme="dark"] .live-dashboard-kpi-main {
    background: linear-gradient(145deg, rgba(56,199,250,.12), #102536);
}
@media(max-width:1100px){.live-dashboard-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:680px){.live-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:420px){.live-dashboard-kpis{grid-template-columns:1fr;}}


/* Cloudflare recordings & consumption — 20261003-cf2 */
.live-recordings-list { display:grid; gap:14px; }
.live-recording-card {
    display:grid; grid-template-columns:220px minmax(0,1fr); gap:18px; padding:16px;
    border:1px solid rgba(137,169,195,.24); border-radius:20px;
    background:var(--surface-1, #102536); overflow:hidden;
}
.live-recording-thumb { min-height:124px; border-radius:14px; overflow:hidden; background:rgba(255,255,255,.035); display:flex; align-items:center; justify-content:center; color:var(--text-secondary,#ABB8C4); }
.live-recording-thumb img { width:100%; height:100%; min-height:124px; object-fit:cover; display:block; }
.live-recording-main { min-width:0; }
.live-recording-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.live-recording-top > div > span { color:var(--text-secondary,#ABB8C4); font-size:.82rem; }
.live-recording-top h3 { margin:4px 0 0; font-size:1.15rem; }
.live-recording-meta { display:flex; flex-wrap:wrap; gap:10px 18px; margin:14px 0; color:var(--text-secondary,#ABB8C4); font-size:.9rem; }
.live-recording-meta strong { color:var(--text-primary,#F8F6F0); }
.live-recording-actions { display:flex; gap:10px; flex-wrap:wrap; }
.live-recording-warning { display:block; margin:-4px 0 12px; color:#ffbb72; font-size:.88rem; }
.live-recording-empty { padding:24px; text-align:center; color:var(--text-secondary,#ABB8C4); border:1px dashed rgba(137,169,195,.24); border-radius:16px; }
.live-recording-empty.erro { color:#ff8f8f; }
.live-consumption-actions { flex-wrap:wrap; }
.live-consumption-select { min-height:44px; padding:0 13px; border-radius:12px; border:1px solid rgba(137,169,195,.28); background:var(--surface-1,#102536); color:var(--text-primary,#F8F6F0); }
.live-consumption-grid { margin-top:16px; }
.live-consumption-bars, .live-consumption-top { display:grid; gap:10px; }
.live-consumption-row { display:grid; grid-template-columns:58px minmax(100px,1fr) 92px; gap:10px; align-items:center; font-size:.85rem; }
.live-consumption-row > div { height:9px; border-radius:999px; background:rgba(255,255,255,.07); overflow:hidden; }
.live-consumption-row i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--primary,#22B8EF), var(--accent,#D7B07C)); }
.live-consumption-row strong { text-align:right; }
.live-consumption-top-row { display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid rgba(137,169,195,.15); }
.live-consumption-top-row > span { font-weight:900; color:var(--accent,#D7B07C); }
.live-consumption-top-row strong, .live-consumption-top-row small { display:block; }
.live-consumption-top-row small { margin-top:3px; color:var(--text-secondary,#ABB8C4); font-size:.72rem; }
.live-consumption-top-row b { white-space:nowrap; }
@media (max-width: 760px) {
    .live-recording-card { grid-template-columns:1fr; padding:12px; }
    .live-recording-thumb, .live-recording-thumb img { min-height:180px; max-height:220px; }
    .live-recording-top { flex-direction:column; }
    .live-recording-actions > button { flex:1 1 140px; }
    .live-consumption-row { grid-template-columns:52px minmax(70px,1fr) 78px; gap:7px; }
}
body.tema-padrao .live-recording-card,
body.tema-padrao .live-consumption-select { background:var(--fundo-container, #fff); color:var(--texto, #17324A); }
body.tema-padrao .live-recording-meta strong { color:var(--texto, #17324A); }


/* CF3 — progresso de processamento/download das gravações */
.live-recording-download-progress {
    position:relative;
    height:10px;
    margin:-2px 0 14px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(255,255,255,.07);
    border:1px solid rgba(137,169,195,.12);
}
.live-recording-download-progress > span {
    display:block;
    height:100%;
    min-width:2px;
    border-radius:inherit;
    background:linear-gradient(90deg,#28a9e0,#67c8f3);
    transition:width .25s ease;
}
.live-recording-download-progress > small {
    position:absolute;
    right:7px;
    top:50%;
    transform:translateY(-50%);
    color:#f8f6f0;
    font-size:.62rem;
    font-weight:900;
    text-shadow:0 1px 3px rgba(0,0,0,.7);
}
body.tema-padrao .live-recording-download-progress { background:rgba(14,43,56,.08); }
