/* CONNECTIO hotfix 2026-07-26 v52
   Capa transversal: contraste, limites de pantalla, tablas, paneles no montados, codificacion visual y login siempre visible. */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body .content,
body .workbench,
body .module-grid,
body .cx-dashboard-grid,
body .cx-module-header,
body .coverage-panel,
body .sales-panel,
body .catalog-panel,
body .tuu-panel,
body .admin-panel,
body .routes-panel,
body .profit-panel,
body .goals-panel,
body .connectio-home,
body .source-governed-panel {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body .workbench,
body .cx-module-header,
body .coverage-panel,
body .sales-card,
body .cx-card,
body .admin-editor,
body .module-card,
body .connectio-home-card,
body .commerce-toolbar,
body .analysis-filter-panel {
  border-radius: 3px !important;
}

body .cx-module-header,
body .workbench,
body .coverage-panel,
body .sales-card,
body .cx-card {
  border-width: 1px !important;
  box-shadow: none !important;
}

body .cx-tabs,
body .planes-entel-tabs,
body .cobros-tabs,
body [class*="-tabs"] {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 .75rem !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-gutter: stable !important;
}

body .sales-table,
body .routes-table,
body .commerce-table,
body .cap-table,
body .cx-table,
body .admin-checks,
body .tareas-table,
body .incidentes-table {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-gutter: stable both-edges !important;
}

body .sales-table table,
body .routes-table table,
body .commerce-table table,
body .cap-table table,
body .cx-table table,
body .tareas-table table,
body .incidentes-table table {
  min-width: 920px !important;
}

body .source-status,
body .cx-loading-state,
body .status-pill,
body .nav-item,
body .side-group-toggle,
body .topbar-actions button,
body .user-chip,
body input,
body select,
body textarea {
  border-radius: 3px !important;
}

body .eyebrow,
body small,
body label,
body .muted,
body .status-pill,
body .source-status {
  color: #334155 !important;
}

body h1,
body h2,
body h3,
body h4,
body strong,
body b,
body .section-head h3,
body .cx-module-header h3,
body .cx-module-header h2 {
  color: #091936 !important;
}

body .smart-topbar,
body .cx-header {
  background: #ffffff !important;
  color: #091936 !important;
}

body .smart-topbar *,
body .cx-header *,
body .topbar-actions button,
body .user-chip,
body .user-chip *,
body .connectia-btn,
body .theme-toggle-btn {
  color: #091936 !important;
  opacity: 1 !important;
}

body .user-chip,
body .connectia-btn,
body .theme-toggle-btn,
body .notification-btn {
  background: #eef8ff !important;
  border-color: #8bd3ff !important;
}

body.auth-locked .app-shell.sidebar-collapsed {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) !important;
}

body.auth-locked .app-shell.sidebar-collapsed .sidebar {
  width: auto !important;
}

body.auth-locked .app-shell.sidebar-collapsed .brand-copy,
body.auth-locked .app-shell.sidebar-collapsed .login-panel {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  display: grid !important;
}

body.auth-locked .login-panel input,
body.auth-locked .login-panel button,
body.auth-locked .google-login-btn {
  width: 100% !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

.telco-recipient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.telco-recipient-item {
  align-items: flex-start;
  background: rgba(14, 165, 233, 0.11);
  border-left: 4px solid var(--accent, #0ea5e9);
  border-radius: 8px;
  padding: 10px 12px;
}

.telco-recipient-item span {
  display: grid;
  gap: 3px;
}

.telco-recipient-item small {
  color: var(--muted, #64748b);
  font-size: 0.78rem;
  line-height: 1.25;
}

.button-row.compact {
  gap: 8px;
  margin-top: 10px;
}

body.telco-module-active #workbench,
body.telco-module-active .workbench,
body.telco-module-active .telco-command-center,
body.telco-module-active .module-subpanel.active,
body.telco-module-active .source-list,
body.telco-module-active .source-card,
body.telco-module-active .source-status,
body.telco-module-active .telco-delivery-mode,
body.telco-module-active .telco-action-bar,
body.telco-module-active .telco-recipient-grid {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere;
}

body.telco-module-active .telco-command-center {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.35fr) !important;
}

body.telco-module-active .telco-step-grid,
body.telco-module-active .kpi-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
}

body.telco-module-active .module-heading-row,
body.telco-module-active .telco-heading-actions,
body.telco-module-active .button-row,
body.telco-module-active .telco-selection-actions {
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

body.telco-module-active .module-heading-row > *,
body.telco-module-active .telco-delivery-mode > *,
body.telco-module-active .telco-action-bar > * {
  min-width: 0 !important;
}

body.telco-module-active .telco-action-bar {
  grid-template-columns: minmax(220px, .85fr) minmax(260px, 1.1fr) minmax(220px, .85fr) !important;
}

body.telco-module-active .telco-recipient-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

body.telco-module-active .source-list {
  display: grid !important;
  gap: 12px !important;
}

body.telco-module-active .source-card .button-row {
  display: flex !important;
}

body.telco-module-active .source-card .button-row > *,
body.telco-module-active .telco-heading-actions > *,
body.telco-module-active .telco-selection-actions > * {
  flex: 1 1 190px !important;
}

body.telco-module-active .workbench .telco-step-panel:not(.is-active),
body.telco-module-active .workbench .telco-step-panel[aria-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

body.telco-module-active .workbench .telco-step-panel.is-active {
  display: block !important;
  max-height: calc(100vh - 260px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 18px !important;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.telco-module-active .telco-step-grid button.active,
body.telco-module-active .telco-step-grid button:focus-visible {
  background: #ffffff !important;
  color: #071326 !important;
  border-color: #2dd4bf !important;
  outline: 3px solid rgba(45, 212, 191, .35);
}

body.telco-module-active .telco-step-grid button.active b {
  background: #071326 !important;
  color: #2dd4bf !important;
}

body.telco-module-active .telco-step-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, .28);
  background: linear-gradient(180deg, rgba(255,255,255,.88), #fff 38%);
}

body.telco-module-active .telco-step-footer > * {
  flex: 0 1 260px;
}

body.telco-module-active .telco-command-center {
  position: sticky;
  top: 84px;
  z-index: 4;
}

body.telco-module-active .telco-step-panel.is-active::before {
  content: "Desplaza esta sección para ver todo";
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  width: fit-content;
  margin: -8px 0 12px auto;
  padding: 7px 11px;
  border-left: 4px solid #0ea5e9;
  background: #e0f2fe;
  color: #075985;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body.telco-module-active .telco-step-panel.is-active::-webkit-scrollbar,
body.telco-module-active .source-list::-webkit-scrollbar,
body.telco-module-active #telcoBulletinPreview::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

body.telco-module-active .telco-step-panel.is-active::-webkit-scrollbar-track,
body.telco-module-active .source-list::-webkit-scrollbar-track,
body.telco-module-active #telcoBulletinPreview::-webkit-scrollbar-track {
  background: #dbeafe;
  border-radius: 0;
}

body.telco-module-active .telco-step-panel.is-active::-webkit-scrollbar-thumb,
body.telco-module-active .source-list::-webkit-scrollbar-thumb,
body.telco-module-active #telcoBulletinPreview::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0ea5e9, #14b8a6);
  border: 3px solid #dbeafe;
  border-radius: 0;
}

@media (max-width: 1180px) {
  body.telco-module-active .telco-command-center,
  body.telco-module-active .telco-delivery-mode,
  body.telco-module-active .telco-action-bar {
    grid-template-columns: 1fr !important;
  }

  body.telco-module-active .telco-step-panel.is-active {
    max-height: calc(100vh - 220px) !important;
  }

  body.telco-module-active .telco-heading-actions {
    width: 100%;
    justify-content: stretch !important;
  }

  body.telco-module-active .telco-heading-actions > *,
  body.telco-module-active .telco-action-bar .cx-button,
  body.telco-module-active .telco-step-footer > * {
    width: 100%;
    flex-basis: 100%;
  }
}

body.telco-module-active[data-theme="dark"] .telco-command-center,
body.telco-module-active[data-theme="dark"] .module-subpanel.active,
body.telco-module-active[data-theme="dark"] .telco-delivery-mode,
body.telco-module-active[data-theme="dark"] .telco-action-bar,
body.telco-module-active[data-theme="dark"] #telcoBulletinPreview,
body.telco-module-active[data-theme="dark"] .source-status,
body.telco-module-active[data-theme="dark"] .source-card {
  color: #e5edf8 !important;
  background: #111c2f !important;
  border-color: rgba(45, 212, 191, .32) !important;
}

body.telco-module-active[data-theme="dark"] .telco-command-center {
  background: linear-gradient(135deg, #030712, #083344) !important;
}

body.telco-module-active[data-theme="dark"] .telco-instruction,
body.telco-module-active[data-theme="dark"] .telco-send-confirm,
body.telco-module-active[data-theme="dark"] .telco-recipient-item {
  color: #f8fafc !important;
  background: rgba(45, 212, 191, .10) !important;
}

body.telco-module-active[data-theme="dark"] .telco-manual-panel > summary strong,
body.telco-module-active[data-theme="dark"] .telco-manual-panel > summary small,
body.telco-module-active[data-theme="dark"] #telcoModeHelp {
  color: #e5edf8 !important;
}

body.telco-module-active[data-theme="dark"] .telco-step-footer {
  background: linear-gradient(180deg, rgba(17, 28, 47, .88), #111c2f 38%) !important;
}

body.telco-module-active[data-theme="dark"] .telco-step-panel.is-active::before {
  background: #083344 !important;
  color: #cffafe !important;
  border-left-color: #2dd4bf !important;
}

body.telco-module-active[data-theme="dark"] .telco-step-panel.is-active::-webkit-scrollbar-track,
body.telco-module-active[data-theme="dark"] .source-list::-webkit-scrollbar-track,
body.telco-module-active[data-theme="dark"] #telcoBulletinPreview::-webkit-scrollbar-track {
  background: #0f172a !important;
}

body.telco-module-active[data-theme="dark"] .telco-step-panel.is-active::-webkit-scrollbar-thumb,
body.telco-module-active[data-theme="dark"] .source-list::-webkit-scrollbar-thumb,
body.telco-module-active[data-theme="dark"] #telcoBulletinPreview::-webkit-scrollbar-thumb {
  border-color: #0f172a !important;
}

body[data-theme="dark"] {
  --ink: #f8fafc;
  --muted: #cbd5e1;
  --line: #334155;
  --soft: #0f172a;
  --card: #111c2f;
}

body[data-theme="dark"] .content,
body[data-theme="dark"] .workbench,
body[data-theme="dark"] .cx-module-header,
body[data-theme="dark"] .coverage-panel,
body[data-theme="dark"] .sales-card,
body[data-theme="dark"] .cx-card,
body[data-theme="dark"] .admin-editor,
body[data-theme="dark"] .module-card,
body[data-theme="dark"] .connectio-home-card {
  background: #111c2f !important;
  color: #e5edf8 !important;
  border-color: rgba(148, 163, 184, .34) !important;
}

body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] strong,
body[data-theme="dark"] b,
body[data-theme="dark"] .section-head h3,
body[data-theme="dark"] .cx-module-header h3,
body[data-theme="dark"] .cx-module-header h2 {
  color: #f8fafc !important;
}

body[data-theme="dark"] p,
body[data-theme="dark"] span,
body[data-theme="dark"] td,
body[data-theme="dark"] th,
body[data-theme="dark"] label,
body[data-theme="dark"] small,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .eyebrow {
  color: #cbd5e1 !important;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .topbar-search input {
  background: #07111f !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #94a3b8 !important;
}

body[data-theme="dark"] .source-status,
body[data-theme="dark"] .cx-loading-state {
  background: #0b1728 !important;
  color: #e0f2fe !important;
  border-color: rgba(45, 212, 191, .38) !important;
}

body[data-theme="dark"] .topbar-actions button,
body[data-theme="dark"] .user-chip,
body[data-theme="dark"] .profile-dropdown {
  background: #0f1d33 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body[data-theme="dark"] .smart-topbar,
body[data-theme="dark"] .cx-header {
  background: #0b1324 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

body[data-theme="dark"] .smart-topbar *,
body[data-theme="dark"] .cx-header *,
body[data-theme="dark"] .topbar-actions button,
body[data-theme="dark"] .user-chip,
body[data-theme="dark"] .user-chip *,
body[data-theme="dark"] .connectia-btn,
body[data-theme="dark"] .theme-toggle-btn {
  color: #f8fafc !important;
  opacity: 1 !important;
}

body[data-theme="dark"] .notification-btn span {
  background: #2563eb !important;
  color: #ffffff !important;
}

body[data-theme="dark"] .connectio-home,
body[data-theme="dark"] .executive-board,
body[data-theme="dark"] .connectio-home-panel {
  background: #0f172a !important;
  color: #f8fafc !important;
}

body[data-theme="dark"] .profile-dropdown button {
  color: #f8fafc !important;
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .cx-sidebar {
  background: #050914 !important;
}

body[data-theme="dark"] .sidebar .brand strong,
body[data-theme="dark"] .sidebar .brand small,
body[data-theme="dark"] .side-nav strong,
body[data-theme="dark"] .side-nav span,
body[data-theme="dark"] .side-subnav button {
  color: #f8fafc !important;
}

body[data-theme="dark"] .module-card small,
body[data-theme="dark"] .connectio-home-area small,
body[data-theme="dark"] .cx-kpi small {
  color: #cbd5e1 !important;
}

body .admin-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 1rem !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body .admin-panel > div:first-child,
body .admin-panel .admin-editor {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
}

body .admin-panel .admin-editor {
  margin-top: .75rem !important;
  padding: clamp(.85rem, 1.2vw, 1.1rem) !important;
  border: 0 !important;
  border-left: 5px solid #0ea5e9 !important;
  border-radius: 3px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  z-index: 1 !important;
}

body .admin-panel .admin-profile-summary {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: .7rem !important;
  width: 100% !important;
}

body .admin-panel .admin-checks {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: .65rem !important;
  width: 100% !important;
  max-height: 460px !important;
  overflow: auto !important;
  padding: .35rem .25rem .75rem !important;
  border: 1px solid rgba(14, 165, 233, .28) !important;
  border-radius: 3px !important;
  background: rgba(224, 242, 254, .34) !important;
  scrollbar-gutter: stable both-edges !important;
}

body .admin-panel .admin-users {
  max-height: 420px !important;
  overflow: auto !important;
}

body .admin-panel .admin-permission-card {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
}

body .admin-panel .admin-permission-card strong,
body .admin-panel .admin-permission-card small {
  overflow-wrap: anywhere !important;
}

body .admin-panel .admin-editor > button[data-admin-action="save"] {
  position: sticky !important;
  bottom: .75rem !important;
  z-index: 8 !important;
  justify-self: end !important;
  min-width: min(260px, 100%) !important;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .24) !important;
}

body[data-theme="dark"] .admin-panel .admin-editor {
  background: #0f172a !important;
}

body[data-theme="dark"] .admin-panel .admin-checks {
  background: rgba(15, 23, 42, .82) !important;
  border-color: rgba(45, 212, 191, .28) !important;
}

/* Dashboard TV publico interno: sin foco financiero, compacto para TV 55". */
body .tv-55-panel .tv-stage {
  min-height: min(82vh, 920px) !important;
  padding: clamp(14px, 1.5vw, 24px) !important;
  border-radius: 6px !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(45, 212, 191, .22), transparent 30%),
    linear-gradient(135deg, #06111f 0%, #0b1730 48%, #07111f 100%) !important;
}

body .tv-55-panel .tv-control-bar,
body .tv-55-panel .tv-broadcast-strip article,
body .tv-55-panel .tv-slide,
body .tv-55-panel .tv-metrics article,
body .tv-55-panel .tv-chart,
body .tv-55-panel .tv-list,
body .tv-55-panel .tv-alerts article,
body .tv-55-panel .tv-signal-strip article,
body .tv-55-panel .tv-area-context {
  border-radius: 4px !important;
}

body .tv-55-panel .tv-control-bar {
  padding: 10px 12px !important;
  margin-bottom: 8px !important;
}

body .tv-55-panel .tv-control-bar strong {
  font-size: clamp(18px, 1.5vw, 28px) !important;
}

body .tv-55-panel .tv-control-bar small,
body .tv-55-panel .tv-room-label {
  font-size: 11px !important;
}

body .tv-55-panel .tv-control-actions button {
  min-height: 30px !important;
  padding: 6px 10px !important;
  border-radius: 4px !important;
}

body .tv-55-panel .tv-broadcast-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 8px 0 !important;
}

body .tv-55-panel .tv-broadcast-strip article {
  padding: 8px 10px !important;
  min-height: 52px !important;
}

body .tv-55-panel .tv-tabs {
  opacity: .85 !important;
  margin: 4px 0 6px !important;
}

body .tv-55-panel .tv-tabs button {
  width: 42px !important;
  height: 8px !important;
  border-radius: 0 !important;
}

body .tv-55-panel .tv-slide {
  --tv-screen-a: rgba(14, 165, 233, .20);
  --tv-screen-b: rgba(45, 212, 191, .16);
  padding: clamp(14px, 1.4vw, 22px) !important;
  border: 1px solid rgba(125, 211, 252, .16) !important;
  background:
    linear-gradient(90deg, var(--tv-screen-a), transparent 28%, var(--tv-screen-b)),
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(8, 19, 38, .94)) !important;
}

body .tv-55-panel .tv-slide.green {
  --tv-screen-a: rgba(34, 197, 94, .22);
  --tv-screen-b: rgba(20, 184, 166, .18);
}

body .tv-55-panel .tv-slide.purple {
  --tv-screen-a: rgba(124, 58, 237, .24);
  --tv-screen-b: rgba(14, 165, 233, .14);
}

body .tv-55-panel .tv-slide.orange {
  --tv-screen-a: rgba(245, 158, 11, .24);
  --tv-screen-b: rgba(45, 212, 191, .12);
}

body .tv-55-panel .tv-slide.red {
  --tv-screen-a: rgba(239, 68, 68, .22);
  --tv-screen-b: rgba(245, 158, 11, .15);
}

body .tv-55-panel .tv-slide-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  max-width: none !important;
  margin-bottom: 6px !important;
}

body .tv-55-panel .tv-slide-head .eyebrow {
  font-size: 11px !important;
  letter-spacing: .12em !important;
  color: #67e8f9 !important;
}

body .tv-55-panel .tv-slide-head h2 {
  margin: 2px 0 0 !important;
  font-size: clamp(24px, 2.2vw, 42px) !important;
  line-height: 1.02 !important;
}

body .tv-55-panel .tv-slide-head p {
  display: none !important;
}

body .tv-55-panel .tv-slide-head > strong {
  min-width: 54px !important;
  padding: 7px 10px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
}

body .tv-55-panel .tv-signal-strip,
body .tv-55-panel .tv-area-context {
  display: none !important;
}

body .tv-55-panel .tv-metrics {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 10px !important;
  margin: 12px 0 !important;
}

body .tv-55-panel .tv-metrics article {
  min-height: 96px !important;
  padding: 12px 14px !important;
  background: rgba(226, 232, 240, .08) !important;
  border-left: 5px solid #2dd4bf !important;
}

body .tv-55-panel .tv-metrics strong {
  font-size: clamp(28px, 2.9vw, 48px) !important;
}

body .tv-55-panel .tv-metrics span {
  color: #e0f2fe !important;
  font-size: 11px !important;
}

body .tv-55-panel .tv-content-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  gap: 10px !important;
}

body .tv-55-panel .tv-chart,
body .tv-55-panel .tv-list,
body .tv-55-panel .tv-alerts article {
  min-height: 190px !important;
  padding: 13px !important;
  background: rgba(15, 23, 42, .72) !important;
  border-left: 5px solid #0ea5e9 !important;
}

body .tv-55-panel .tv-chart h4 {
  margin-bottom: 10px !important;
  font-size: clamp(17px, 1.25vw, 24px) !important;
  color: #f8fafc !important;
}

body .tv-55-panel .tv-bar {
  grid-template-columns: minmax(130px, 12vw) 1fr minmax(64px, 5vw) !important;
  gap: 8px !important;
}

body .tv-55-panel .tv-bar div {
  height: 12px !important;
}

body .tv-55-panel .tv-pie-orbit::before,
body .tv-55-panel .tv-pie-orbit::after {
  display: none !important;
}

body .tv-55-panel .tv-pie {
  transform: none !important;
  box-shadow: none !important;
  width: 170px !important;
  min-height: 170px !important;
}

body .tv-55-panel .tv-pie strong,
body .tv-55-panel .tv-pie span {
  transform: none !important;
}

body .tv-55-panel .tv-ticker {
  margin-top: 8px !important;
  padding: 8px 10px !important;
  border-radius: 4px !important;
}

body .tv-55-panel .tv-ticker span {
  font-size: clamp(14px, 1.25vw, 22px) !important;
}

/* Dashboard TV: modo sala real, aprovechando el viewport antes y durante fullscreen. */
body.dashboard-tv-active .sidebar,
body.dashboard-tv-active .workbench-head,
body.dashboard-tv-active #moduleDescription,
body.dashboard-tv-active #moduleActions,
body.dashboard-tv-active .module-grid,
body.dashboard-tv-active .hero,
body.dashboard-tv-active .kpis {
  display: none !important;
}

body.dashboard-tv-active .app-shell,
body.dashboard-tv-active .app-shell.sidebar-collapsed {
  grid-template-columns: 1fr !important;
}

body.dashboard-tv-active .content,
body.dashboard-tv-active .workbench {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.dashboard-tv-active .content {
  padding: 8px !important;
}

body.dashboard-tv-active .smart-topbar {
  min-height: 42px !important;
  margin: 0 0 8px !important;
  padding: 6px 10px !important;
  border-radius: 0 !important;
}

body.dashboard-tv-active .topbar-left,
body.dashboard-tv-active .topbar-search,
body.dashboard-tv-active .topbar-actions > button:not(.user-chip),
body.dashboard-tv-active .topbar-actions .notification-button {
  display: none !important;
}

body.dashboard-tv-active .topbar-actions {
  margin-left: auto !important;
}

body.dashboard-tv-active .tv-panel {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  gap: 0 !important;
}

body.dashboard-tv-active .tv-55-panel .tv-stage {
  min-height: calc(100vh - 50px) !important;
  height: calc(100vh - 50px) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: clamp(8px, .85vw, 14px) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.dashboard-tv-active .tv-55-panel .tv-control-bar {
  flex: 0 0 auto !important;
  min-height: 30px !important;
  padding: 4px 7px !important;
  background: rgba(2, 6, 23, .55) !important;
  border: 1px solid rgba(45, 212, 191, .28) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-control-bar > div:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

body.dashboard-tv-active .tv-55-panel .tv-control-bar .tv-room-label {
  font-size: clamp(9px, .62vw, 12px) !important;
  letter-spacing: .14em !important;
}

body.dashboard-tv-active .tv-55-panel #tvClock {
  font-size: clamp(12px, .9vw, 18px) !important;
}

body.dashboard-tv-active .tv-55-panel #tvStatus {
  max-width: 26vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: clamp(9px, .62vw, 12px) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-control-actions {
  opacity: .72 !important;
  display: flex !important;
  gap: 5px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-control-actions button {
  min-height: 26px !important;
  padding: 4px 8px !important;
  font-size: clamp(9px, .62vw, 12px) !important;
  border-radius: 4px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-fullscreen-primary {
  color: #02111f !important;
  background: linear-gradient(135deg, #2dd4bf, #38bdf8) !important;
  border-color: rgba(45, 212, 191, .85) !important;
  box-shadow: 0 0 18px rgba(45, 212, 191, .28) !important;
}

body.dashboard-tv-active .tv-fullscreen-hint {
  display: block !important;
  margin: 3px 0 4px !important;
  padding: 4px 8px !important;
  color: #dffcff !important;
  background: rgba(14, 165, 233, .10) !important;
  border-left: 3px solid #2dd4bf !important;
  font-size: clamp(9px, .65vw, 12px) !important;
  font-weight: 800 !important;
}

body.dashboard-tv-active .tv-55-panel .tv-broadcast-strip {
  flex: 0 0 auto !important;
  grid-template-columns: minmax(70px, .55fr) minmax(120px, 1.35fr) minmax(70px, .55fr) !important;
  gap: 5px !important;
  margin: 4px 0 !important;
  max-width: min(520px, 52vw) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-broadcast-strip article {
  min-height: 28px !important;
  padding: 4px 7px !important;
  border-radius: 4px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-broadcast-strip strong {
  font-size: clamp(11px, .85vw, 16px) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-broadcast-strip span {
  font-size: clamp(8px, .55vw, 10px) !important;
}

body.dashboard-tv-active .tv-persistent-alerts {
  display: none !important;
}

body.dashboard-tv-active .tv-persistent-alerts.active {
  position: absolute !important;
  z-index: 8 !important;
  right: clamp(10px, 1vw, 18px) !important;
  top: clamp(74px, 6.5vw, 112px) !important;
  width: min(520px, 35vw) !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) minmax(145px, .82fr) !important;
  align-items: center !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border-left: 6px solid #f59e0b !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(88, 28, 135, .82)) !important;
  color: #fff7ed !important;
  box-shadow: 0 18px 42px rgba(2, 6, 23, .42), 0 0 28px rgba(245, 158, 11, .28) !important;
  pointer-events: none !important;
  animation: tvAlertPulse 1.8s ease-in-out infinite !important;
}

body.dashboard-tv-active .tv-persistent-alerts.active.danger {
  border-left-color: #ef4444 !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, .97), rgba(127, 29, 29, .86)) !important;
  box-shadow: 0 18px 42px rgba(2, 6, 23, .45), 0 0 32px rgba(239, 68, 68, .36) !important;
}

body.dashboard-tv-active .tv-alert-pop-icon {
  display: grid !important;
  place-items: center !important;
  width: clamp(32px, 2.45vw, 44px) !important;
  height: clamp(32px, 2.45vw, 44px) !important;
  background: #f59e0b !important;
  color: #111827 !important;
  font-size: clamp(18px, 1.45vw, 26px) !important;
  font-weight: 1000 !important;
}

body.dashboard-tv-active .tv-persistent-alerts.danger .tv-alert-pop-icon {
  background: #ef4444 !important;
  color: #fff !important;
}

body.dashboard-tv-active .tv-alert-pop-body,
body.dashboard-tv-active .tv-alert-pop-owner {
  min-width: 0 !important;
}

body.dashboard-tv-active .tv-alert-pop-body span,
body.dashboard-tv-active .tv-alert-pop-owner span {
  display: block !important;
  font-size: clamp(9px, .65vw, 12px) !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .12em !important;
  color: #fde68a !important;
}

body.dashboard-tv-active .tv-alert-pop-body strong,
body.dashboard-tv-active .tv-alert-pop-owner strong {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: clamp(12px, .95vw, 18px) !important;
  color: #ffffff !important;
}

body.dashboard-tv-active .tv-alert-pop-body p,
body.dashboard-tv-active .tv-alert-pop-owner small {
  display: -webkit-box !important;
  margin: 2px 0 0 !important;
  overflow: hidden !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  color: #e0f2fe !important;
  font-size: clamp(10px, .72vw, 13px) !important;
  line-height: 1.25 !important;
}

@keyframes tvAlertPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

body.dashboard-tv-active .tv-55-panel .tv-tabs {
  flex: 0 0 auto !important;
  margin: 2px 0 3px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-slide {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  padding: clamp(8px, .9vw, 14px) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-slide-head h2 {
  font-size: clamp(24px, 3.15vw, 54px) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-slide-head {
  flex: 0 0 auto !important;
}

body.dashboard-tv-active .tv-55-panel .tv-metrics {
  flex: 0 0 auto !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  margin: 6px 0 !important;
}

body.dashboard-tv-active .tv-55-panel .tv-metrics article {
  min-height: 72px !important;
  padding: 9px 11px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-metrics strong {
  font-size: clamp(24px, 3vw, 44px) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-content-grid {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-chart,
body.dashboard-tv-active .tv-55-panel .tv-list,
body.dashboard-tv-active .tv-55-panel .tv-alerts {
  min-height: 0 !important;
  height: 100% !important;
}

body.dashboard-tv-active .tv-55-panel .tv-chart,
body.dashboard-tv-active .tv-55-panel .tv-list,
body.dashboard-tv-active .tv-55-panel .tv-alerts article {
  padding: 10px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-line-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: linear-gradient(135deg, rgba(7, 11, 22, 0.96), rgba(10, 38, 59, 0.9)) !important;
  border-color: rgba(45, 212, 191, 0.55) !important;
}

body.dashboard-tv-active .tv-55-panel .tv-line-card header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

body.dashboard-tv-active .tv-55-panel .tv-line-card header strong {
  color: #d7fff7 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em !important;
  white-space: nowrap !important;
}

body.dashboard-tv-active .tv-55-panel .tv-line-card svg {
  width: 100% !important;
  min-height: 112px !important;
  flex: 1 1 auto !important;
  overflow: visible !important;
}

body.dashboard-tv-active .tv-55-panel .tv-line-card circle {
  fill: #eafffb !important;
  stroke: #2dd4bf !important;
  stroke-width: 1.5 !important;
}

body.dashboard-tv-active .tv-55-panel .tv-line-footer {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  color: rgba(234, 255, 251, 0.82) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

body.dashboard-tv-active .tv-55-panel .tv-ticker {
  flex: 0 0 auto !important;
  margin-top: 6px !important;
  white-space: nowrap !important;
}

body.dashboard-tv-active .tv-stage:fullscreen,
body.dashboard-tv-active .tv-55-panel .tv-stage:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: clamp(8px, .85vw, 14px) !important;
}

body.dashboard-tv-active .tv-stage:fullscreen .tv-fullscreen-hint {
  display: none !important;
}

body.dashboard-tv-active .tv-stage:fullscreen .tv-control-actions {
  opacity: .18 !important;
}

body.dashboard-tv-active .tv-stage:fullscreen .tv-control-actions:hover {
  opacity: 1 !important;
}
.session-idle-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10050;
  display: grid;
  gap: 6px;
  width: min(360px, calc(100vw - 36px));
  padding: 14px;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  background: #fff7ed;
  color: #422006;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .24);
}

.session-idle-notice[hidden] {
  display: none;
}

.session-idle-notice b {
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.session-idle-notice button {
  min-height: 40px;
  font-weight: 800;
}
