/*
 * Compatibility layer for older Samsung/Tizen browsers.
 * Tailwind 4 uses CSS cascade layers, which these browsers can ignore.
 */

html.legacy-tv,
html.legacy-tv body,
html.legacy-tv #root {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

html.legacy-tv {
  background: #f8fafc;
  color: #0f172a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

html.legacy-tv * {
  box-sizing: border-box;
}

html.legacy-tv body {
  background: #f8fafc;
  color: #0f172a;
}

html.legacy-tv button,
html.legacy-tv input {
  font: inherit;
}

html.legacy-tv button {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
}

html.legacy-tv svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex: 0 0 auto;
}

html.legacy-tv .tv-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 16px;
  gap: 12px;
  overflow: hidden;
}

html.legacy-tv header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding-bottom: 12px;
  border-bottom: 1px solid #cbd5e1;
}

html.legacy-tv header > div,
html.legacy-tv header > div > div,
html.legacy-tv header [data-testid="status-dapic-source"],
html.legacy-tv header [data-testid="text-clock-date"] {
  display: flex;
  align-items: center;
  gap: 10px;
}

html.legacy-tv header > div:last-child > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

html.legacy-tv header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

html.legacy-tv header h1 + div {
  margin-top: 5px;
  color: #64748b;
  font-family: monospace;
  font-size: 13px;
}

html.legacy-tv [data-testid="text-clock-time"] {
  font-family: monospace;
  font-size: 24px;
  font-weight: 700;
  text-align: right;
}

html.legacy-tv [data-testid="text-clock-date"] {
  justify-content: flex-end;
  color: #64748b;
  font-family: monospace;
  font-size: 12px;
}

html.legacy-tv .tv-container > header + div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

html.legacy-tv [data-testid="period-filter"],
html.legacy-tv [data-testid="category-filter"] {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

html.legacy-tv [data-testid="period-filter"] > div,
html.legacy-tv [data-testid="category-filter"] > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

html.legacy-tv [data-testid="category-filter"] {
  width: 340px;
}

html.legacy-tv [data-testid="category-select"] {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
}

html.legacy-tv [data-testid="tv-navigation"] {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 50%;
  display: flex;
  align-items: center;
  width: 490px;
  margin-left: -245px;
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

html.legacy-tv [data-testid="tv-navigation"] > * {
  margin: 0 3px;
}

html.legacy-tv [data-testid="tv-navigation"] > div {
  min-width: 160px;
  text-align: center;
}

html.legacy-tv [data-testid="fullscreen-message"] {
  position: fixed;
  z-index: 120;
  bottom: 12px;
  left: 50%;
  width: 520px;
  margin-left: -260px;
  padding: 9px 12px;
  border: 1px solid #d97706;
  border-radius: 7px;
  background: #fff;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

html.legacy-tv .dashboard-summary-grid,
html.legacy-tv .dashboard-results-grid {
  display: flex;
  width: 100%;
  gap: 14px;
}

html.legacy-tv .dashboard-summary-grid > * {
  flex: 1 1 0;
  min-width: 0;
}

html.legacy-tv .dashboard-results-grid {
  flex: 1 1 auto;
  min-height: 300px;
}

html.legacy-tv .dashboard-results-grid > [data-testid="card-daily-chart"] {
  flex: 3 1 0;
}

html.legacy-tv .dashboard-results-grid > div {
  flex: 1 1 0;
  min-width: 250px;
}

html.legacy-tv [data-testid^="card-"] {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

html.legacy-tv [data-testid^="card-"] > div:first-child {
  padding: 16px 18px 8px;
}

html.legacy-tv [data-testid^="card-"] > div:first-child > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

html.legacy-tv [data-testid^="card-"] > div:first-child > div > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

html.legacy-tv [data-testid^="card-"] > div:nth-child(2) {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 18px 16px;
}

html.legacy-tv [data-testid^="card-"] h3 {
  margin: 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

html.legacy-tv .flex {
  display: flex;
}

html.legacy-tv .flex-col {
  flex-direction: column;
}

html.legacy-tv .flex-1 {
  flex: 1 1 auto;
}

html.legacy-tv .flex-wrap {
  flex-wrap: wrap;
}

html.legacy-tv .items-center {
  align-items: center;
}

html.legacy-tv .items-end {
  align-items: flex-end;
}

html.legacy-tv .justify-center {
  justify-content: center;
}

html.legacy-tv .justify-between {
  justify-content: space-between;
}

html.legacy-tv .text-center {
  text-align: center;
}

html.legacy-tv .text-right {
  text-align: right;
}

html.legacy-tv .font-mono {
  font-family: monospace;
}

html.legacy-tv .font-bold,
html.legacy-tv .font-semibold,
html.legacy-tv .font-extrabold {
  font-weight: 700;
}

html.legacy-tv .text-muted-foreground {
  color: #64748b;
}

html.legacy-tv .text-primary {
  color: #ff5a00;
}

html.legacy-tv .text-secondary {
  color: #005bbb;
}

html.legacy-tv .text-success {
  color: #15803d;
}

html.legacy-tv .text-warning {
  color: #b45309;
}

html.legacy-tv .text-destructive {
  color: #dc2626;
}

html.legacy-tv .grid {
  display: flex;
  flex-wrap: wrap;
}

html.legacy-tv [class~="grid-cols-2"] > * {
  width: 50%;
}

html.legacy-tv [class~="grid-cols-3"] > * {
  width: 33.333%;
}

html.legacy-tv [class~="gap-1"] {
  gap: 4px;
}

html.legacy-tv [class~="gap-2"] {
  gap: 8px;
}

html.legacy-tv [class~="gap-3"] {
  gap: 12px;
}

html.legacy-tv [class~="gap-4"] {
  gap: 16px;
}

html.legacy-tv [class~="grid-cols-2"] > *,
html.legacy-tv [class~="grid-cols-3"] > * {
  min-width: 0;
}

html.legacy-tv [class~="grid-cols-2"][class~="gap-2"] > * {
  width: calc(50% - 4px);
}

html.legacy-tv [class~="grid-cols-2"][class~="gap-3"] > * {
  width: calc(50% - 6px);
}

html.legacy-tv [class~="grid-cols-3"][class~="gap-1"] > * {
  width: calc(33.333% - 3px);
}

html.legacy-tv [class~="grid-cols-3"][class~="gap-2"] > * {
  width: calc(33.333% - 6px);
}

html.legacy-tv [class~="rounded-lg"] {
  border-radius: 8px;
}

html.legacy-tv [class~="border"],
html.legacy-tv [class~="border-border"] {
  border: 1px solid #dbe3ec;
}

html.legacy-tv [class~="bg-background"] {
  background: #f8fafc;
}

html.legacy-tv [class~="p-2"] {
  padding: 8px;
}

html.legacy-tv [class~="p-3"] {
  padding: 12px;
}

html.legacy-tv [class~="mb-1"] {
  margin-bottom: 4px;
}

html.legacy-tv [class~="mb-2"] {
  margin-bottom: 8px;
}

html.legacy-tv [class~="mb-3"] {
  margin-bottom: 12px;
}

html.legacy-tv [class~="mt-auto"] {
  margin-top: auto;
}

html.legacy-tv [class~="block"] {
  display: block;
}

html.legacy-tv [class~="truncate"] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.legacy-tv [data-testid="text-orders-total"],
html.legacy-tv [data-testid="text-orders-progress"],
html.legacy-tv [data-testid="text-quality-loss-rate"] {
  font-size: 34px;
  line-height: 1.15;
}

html.legacy-tv [data-testid="text-deadlines-overdue"],
html.legacy-tv [data-testid="text-deadlines-risk"] {
  font-size: 28px;
}

html.legacy-tv [data-testid="card-daily-chart"] > div:nth-child(2) {
  min-height: 260px;
}

html.legacy-tv [data-testid="card-groups-ranking"] > div:nth-child(2) > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

html.legacy-tv [data-testid^="row-group-"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  background: #f8fafc;
}

html.legacy-tv [data-testid^="row-group-"] > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Operations: cell queues and alert cards used on page 2 of the TV rotation. */
html.legacy-tv .legacy-operation-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 12px;
  overflow: hidden;
}

html.legacy-tv .legacy-cell-flow {
  display: flex;
  flex: 0 0 170px;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 14px;
}

html.legacy-tv .legacy-cell-flow > div:first-child,
html.legacy-tv .legacy-alert-section > div:first-child {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 8px;
}

html.legacy-tv .legacy-cell-flow h2,
html.legacy-tv .legacy-alert-section h2 {
  margin: 0 8px;
  font-size: 22px;
  line-height: 1.1;
}

html.legacy-tv .legacy-cell-cards {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

html.legacy-tv .legacy-cell-cards > div {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  margin-right: 10px;
}

html.legacy-tv .legacy-cell-cards > div:last-child {
  margin-right: 0;
}

html.legacy-tv .legacy-cell-card,
html.legacy-tv .legacy-alert-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  background: #fff;
}

html.legacy-tv .legacy-cell-card > div {
  padding: 12px;
}

html.legacy-tv .legacy-alert-section {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

html.legacy-tv .legacy-alert-grid {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-height: 0;
  gap: 0;
  margin: -6px;
  overflow: hidden;
}

html.legacy-tv .legacy-alert-grid > .legacy-alert-card {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: calc(25% - 12px);
  height: calc(50% - 12px);
  margin: 6px;
}

html.legacy-tv .legacy-alert-card > div:nth-child(2) {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  border-bottom: 1px solid #fee2e2;
}

html.legacy-tv .legacy-alert-card > div:nth-child(3) {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: 1px;
  padding: 2px 8px;
}

html.legacy-tv .legacy-alert-card > div:nth-child(3) > div:first-child {
  display: flex;
  justify-content: space-between;
  min-height: 20px;
}

html.legacy-tv .legacy-alert-meta {
  display: flex;
  flex: 0 0 20px;
  justify-content: space-between;
  min-height: 20px;
}

html.legacy-tv .legacy-alert-deadline {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: auto;
  white-space: nowrap;
}

html.legacy-tv .legacy-alert-balance {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 1px 0;
  padding: 2px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  text-align: center;
}

html.legacy-tv .legacy-alert-balance > span {
  display: none;
}

html.legacy-tv .legacy-alert-balance > strong {
  color: #0f172a;
  font-family: monospace;
  font-size: 25px;
  line-height: 1;
}

html.legacy-tv .legacy-alert-stage {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 22px;
  padding: 2px 5px;
  border: 1px solid #dbe3ec;
  border-radius: 7px;
  text-align: center;
}

html.legacy-tv .legacy-alert-stage > svg {
  width: 11px;
  height: 11px;
}

html.legacy-tv .legacy-alert-stage > span:nth-child(2) {
  font-size: 7px;
  white-space: nowrap;
}

html.legacy-tv .legacy-alert-stage > span:last-child {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Cutting: two-column layout and ten KPI tiles used on page 3. */
html.legacy-tv .legacy-cutting-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  min-height: 0;
  margin-top: 12px;
  padding-bottom: 6px;
  overflow: hidden;
  width: 100%;
}

html.legacy-tv .legacy-cutting-left,
html.legacy-tv .legacy-cutting-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

html.legacy-tv .legacy-cutting-left {
  flex: 35 1 0;
  width: auto;
  margin-right: 16px;
}

html.legacy-tv .legacy-cutting-right {
  flex: 65 1 0;
  width: auto;
}

html.legacy-tv .legacy-cutting-left > div:first-child {
  flex: 5 1 0;
  min-height: 0;
  margin-bottom: 12px;
}

html.legacy-tv .legacy-cutting-left > div:last-child {
  flex: 2 1 0;
  min-height: 0;
}

html.legacy-tv .legacy-cutting-right > div:first-child {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

html.legacy-tv .legacy-cutting-right > div:last-child {
  flex: 1 1 auto;
  min-height: 0;
}

html.legacy-tv .legacy-cutting-left > div > div,
html.legacy-tv .legacy-cutting-right > div:last-child > div {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  background: #fff;
}

html.legacy-tv .legacy-cutting-kpis.legacy-cutting-kpis {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: -4px;
  gap: 0;
  overflow: hidden;
}

html.legacy-tv .legacy-cutting-kpis.legacy-cutting-kpis > div {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: space-between;
  width: calc(20% - 8px);
  min-height: 76px;
  margin: 4px;
  padding: 9px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

html.legacy-tv .legacy-cutting-kpis > div > div:last-child > div:first-child {
  font-size: 20px;
  line-height: 1.05;
}

html.legacy-tv .legacy-cutting-kpis > div > div:last-child > div:last-child {
  font-size: 10px;
}

html.legacy-tv .legacy-cutting-kpis > div > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html.legacy-tv.dark,
html.legacy-tv.dark body {
  background: #0f172a;
  color: #f8fafc;
}

html.legacy-tv.dark [data-testid^="card-"],
html.legacy-tv.dark [data-testid="period-filter"],
html.legacy-tv.dark [data-testid="category-filter"] {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}

html.legacy-tv.dark [class~="bg-background"],
html.legacy-tv.dark [data-testid^="row-group-"],
html.legacy-tv.dark .legacy-cell-card,
html.legacy-tv.dark .legacy-alert-card,
html.legacy-tv.dark .legacy-cutting-left > div > div,
html.legacy-tv.dark .legacy-cutting-right > div:last-child > div,
html.legacy-tv.dark .legacy-cutting-kpis > div {
  border-color: #334155;
  background: #0f172a;
}

@media (max-width: 899px) {
  html.legacy-tv header {
    align-items: flex-start;
    flex-direction: column;
  }

  html.legacy-tv .dashboard-summary-grid,
  html.legacy-tv .dashboard-results-grid,
  html.legacy-tv .legacy-cutting-main {
    flex-direction: column;
  }

  html.legacy-tv [data-testid="category-filter"] {
    width: 100%;
  }

  html.legacy-tv .legacy-cutting-left,
  html.legacy-tv .legacy-cutting-right {
    width: 100%;
  }
}
/* Reading size (legacy: self-sufficient, no var(), grid or layers) */
html.legacy-tv .absolute{position:absolute}
html.legacy-tv .relative{position:relative}
html.legacy-tv .min-w-0{min-width:0}
html.legacy-tv .tv-operation > header{
  flex:0 0 auto;
  flex-direction:row;
  justify-content:space-between;
  align-items:center;
}
html.legacy-tv .tv-operation > header > div:first-child{
  flex:0 1 auto;
  max-width:34%;
  min-width:0;
}
html.legacy-tv .tv-operation > header > div:first-child > div:last-child{
  flex-direction:column;
  align-items:flex-start;
}
html.legacy-tv .tv-operation > header > div:last-child{
  flex-direction:row;
  margin-left:auto;
}
html.legacy-tv [data-testid="tv-navigation"] > div > div:first-child{
  font-size:12px;
  line-height:1.2;
  font-weight:700;
}
html.legacy-tv [data-testid="tv-navigation"] > div > div:last-child{
  font-size:11px;
  line-height:1.2;
}
html.legacy-tv .tv-operation > header + div{flex:0 0 auto}
html.legacy-tv .legacy-cell-flow{flex:0 0 auto;margin-bottom:6px}
html.legacy-tv .legacy-cell-flow > div:first-child,html.legacy-tv .legacy-alert-section > div:first-child{flex:0 0 auto;min-height:26px;margin-bottom:4px}
html.legacy-tv .legacy-alert-section{flex:1 1 0}
html.legacy-tv .legacy-alert-grid{flex:1 1 0;align-content:flex-start;margin:-4px}
html.legacy-tv .legacy-alert-grid > .legacy-alert-card{width:calc(25% - 8px);height:calc(50% - 8px);margin:4px;position:relative}
html.legacy-tv .legacy-alert-card > div:first-child{position:absolute;top:0;left:0;width:4px;height:100%;background:#dc2626}
html.legacy-tv .legacy-alert-card > div.modern-alert-header:nth-child(2){flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding-left:12px}
html.legacy-tv .modern-alert-header > div{display:flex;flex:1 1 auto;align-items:center;min-width:0}
html.legacy-tv .modern-alert-header .tv-meta{flex:0 0 auto;margin-right:8px;padding:1px 6px;border:1px solid #fca5a5;border-radius:5px;color:#dc2626}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3){display:flex;flex:1 1 0;flex-direction:column;min-height:0;overflow:hidden}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3) > div{flex-shrink:0;margin-bottom:0}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3) > div:last-child{margin-bottom:0}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3) > div.legacy-alert-meta:first-child{display:flex;flex:0 0 auto;flex-direction:column;justify-content:flex-start;min-height:0}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3) > div.legacy-alert-balance{flex:1 1 0;min-height:0;overflow:hidden}
html.legacy-tv .legacy-alert-balance > strong{display:block;white-space:nowrap;font-weight:700}
html.legacy-tv .tv-reasons > *{padding:1px 6px;border:1px solid #cbd5e1;border-radius:5px}
html.legacy-tv .legacy-alert-deadline{flex-direction:row;align-items:flex-start;margin-left:0;white-space:normal}
html.legacy-tv .legacy-alert-stage{flex:0 0 auto;height:auto;padding:3px 6px}
html.legacy-tv .legacy-alert-stage > svg{margin-right:6px}
html.legacy-tv .legacy-alert-card .legacy-alert-stage .tv-stage-name{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;text-transform:uppercase}
html.legacy-tv .tv-count{margin-left:8px;padding:1px 8px;border-radius:5px;background:#dc2626;color:#fff}
html.legacy-tv .legacy-cell-card > div.tv-cell-body{display:flex;flex-direction:column}
html.legacy-tv .tv-cell-lab{color:#64748b;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
html.legacy-tv .tv-cell-head > .tv-cell-lab{padding:0 6px;border:1px solid #cbd5e1;border-radius:5px}
html.legacy-tv .tv-cell-val{font-family:monospace;color:#0f172a}
html.legacy-tv.dark .tv-cell-val,html.legacy-tv.dark .legacy-alert-balance > strong{color:#f8fafc}

html.legacy-tv .tv-fit-0{font-size:100%}
html.legacy-tv .tv-fit-0{font-size:100%}
html.legacy-tv .tv-fit-1{font-size:88%}
html.legacy-tv .tv-fit-2{font-size:72%}
html.legacy-tv .tv-fit-3{font-size:58%}
html.legacy-tv .tv-fit-4{font-size:46%}
html.legacy-tv .tv-alert-label,html.legacy-tv .tv-stage-label{display:none}
html.legacy-tv .tv-ref{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
html.legacy-tv .tv-meta{line-height:1.15}
html.legacy-tv .tv-reasons{display:flex;flex-wrap:nowrap;overflow:hidden;min-width:0}
html.legacy-tv .tv-reasons > *{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:6px}
html.legacy-tv .tv-reasons > .tv-reason-more{flex:0 0 auto}
html.legacy-tv .tv-deadline{display:flex;flex-wrap:wrap;margin-top:2px}
html.legacy-tv .tv-deadline > *{margin-right:6px;white-space:nowrap}
html.legacy-tv .tv-deadline > *:last-child{margin-right:0}
html.legacy-tv .legacy-cell-flow,html.legacy-tv .legacy-alert-section{gap:4px}
html.legacy-tv .tv-cell-head{display:flex;align-items:center;justify-content:space-between}
html.legacy-tv .tv-cell-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.legacy-tv .tv-cell-head > .tv-cell-lab{flex:0 0 auto;margin-left:6px}
html.legacy-tv .tv-cell-main,html.legacy-tv .tv-cell-metric{display:flex;flex-direction:column;min-width:0}
html.legacy-tv .tv-cell-sub{display:flex}
html.legacy-tv .tv-cell-metric{flex:1 1 0;margin-right:8px}
html.legacy-tv .tv-cell-metric:last-child{margin-right:0}
html.legacy-tv .tv-cell-lab{display:flex;align-items:center;white-space:nowrap}
html.legacy-tv .tv-cell-lab svg{width:1em;height:1em;margin-right:4px;flex:0 0 auto}
html.legacy-tv .tv-cell-val{display:block;white-space:nowrap;line-height:1.1}
html.legacy-tv .tv-cell-body > div{margin-bottom:4px}
html.legacy-tv .tv-cell-body > div:last-child{margin-bottom:0}
html.legacy-tv .tv-operation header{min-height:0}
html.legacy-tv .tv-operation [data-testid="category-filter"]{min-height:34px}

html.legacy-tv .tv-operation{padding:8px;gap:4px}
html.legacy-tv .tv-operation h2{font-size:20px;line-height:1.1}
html.legacy-tv .tv-op-content{margin-top:4px;gap:4px}
html.legacy-tv .legacy-alert-card > div.modern-alert-header:nth-child(2){padding:3px 10px}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3){padding:4px 8px;gap:4px}
html.legacy-tv .legacy-cell-card > div.tv-cell-body{padding:6px 10px;gap:4px}
html.legacy-tv .legacy-alert-stage{padding:3px 6px}
html.legacy-tv .tv-operation [data-testid="category-select"]{min-height:26px}
html.legacy-tv[data-reading-size="standard"] .tv-ref{font-size:20px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:40px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="standard"] .tv-meta{font-size:14px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:14px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-name{font-size:20px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-val{font-size:24px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-lab{font-size:12px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-stage > svg{width:16px;height:16px}
html.legacy-tv[data-reading-size="large"] .tv-ref{font-size:22px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:45px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="large"] .tv-meta{font-size:16px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:16px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .tv-cell-name{font-size:22px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .tv-cell-val{font-size:27px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="large"] .tv-cell-lab{font-size:13px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-stage > svg{width:18px;height:18px}
html.legacy-tv[data-reading-size="xlarge"] .tv-ref{font-size:25px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:50px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="xlarge"] .tv-meta{font-size:18px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:18px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-name{font-size:25px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-val{font-size:30px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-lab{font-size:15px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-stage > svg{width:20px;height:20px}
@media (min-height:1000px){
html.legacy-tv .tv-operation{padding:16px;gap:6px}
html.legacy-tv .tv-operation h2{font-size:28px;line-height:1.1}
html.legacy-tv .tv-op-content{margin-top:6px;gap:6px}
html.legacy-tv .legacy-alert-card > div.modern-alert-header:nth-child(2){padding:6px 14px}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3){padding:8px 12px;gap:6px}
html.legacy-tv .legacy-cell-card > div.tv-cell-body{padding:10px 14px;gap:6px}
html.legacy-tv .legacy-alert-stage{padding:3px 6px}
html.legacy-tv[data-reading-size="standard"] .tv-ref{font-size:26px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:60px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="standard"] .tv-meta{font-size:17px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:17px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-name{font-size:26px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-val{font-size:32px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-lab{font-size:15px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-stage > svg{width:20px;height:20px}
html.legacy-tv[data-reading-size="large"] .tv-ref{font-size:29px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:67px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="large"] .tv-meta{font-size:19px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:19px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .tv-cell-name{font-size:29px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .tv-cell-val{font-size:36px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="large"] .tv-cell-lab{font-size:17px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-stage > svg{width:22px;height:22px}
html.legacy-tv[data-reading-size="xlarge"] .tv-ref{font-size:33px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:75px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="xlarge"] .tv-meta{font-size:21px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:21px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-name{font-size:33px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-val{font-size:40px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-lab{font-size:19px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-stage > svg{width:25px;height:25px}
}
@media (min-height:1800px){
html.legacy-tv .tv-operation{padding:32px;gap:12px}
html.legacy-tv .tv-operation h2{font-size:52px;line-height:1.1}
html.legacy-tv .tv-op-content{margin-top:12px;gap:12px}
html.legacy-tv .legacy-alert-card > div.modern-alert-header:nth-child(2){padding:12px 28px}
html.legacy-tv .legacy-alert-card > div.modern-alert-body:nth-child(3){padding:16px 24px;gap:12px}
html.legacy-tv .legacy-cell-card > div.tv-cell-body{padding:20px 28px;gap:12px}
html.legacy-tv .legacy-alert-stage{padding:3px 6px}
html.legacy-tv[data-reading-size="standard"] .tv-ref{font-size:52px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:120px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="standard"] .tv-meta{font-size:34px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:34px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-name{font-size:52px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-val{font-size:64px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="standard"] .tv-cell-lab{font-size:30px;line-height:1.1;}
html.legacy-tv[data-reading-size="standard"] .legacy-alert-stage > svg{width:40px;height:40px}
html.legacy-tv[data-reading-size="large"] .tv-ref{font-size:58px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:134px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="large"] .tv-meta{font-size:38px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:38px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .tv-cell-name{font-size:58px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .tv-cell-val{font-size:72px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="large"] .tv-cell-lab{font-size:34px;line-height:1.1;}
html.legacy-tv[data-reading-size="large"] .legacy-alert-stage > svg{width:45px;height:45px}
html.legacy-tv[data-reading-size="xlarge"] .tv-ref{font-size:65px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-card .legacy-alert-balance > strong.tv-bal{font-size:150px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="xlarge"] .tv-meta{font-size:43px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-card .legacy-alert-stage .tv-stage-name{font-size:43px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-name{font-size:65px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-val{font-size:80px;line-height:1.1;font-weight:700;}
html.legacy-tv[data-reading-size="xlarge"] .tv-cell-lab{font-size:38px;line-height:1.1;}
html.legacy-tv[data-reading-size="xlarge"] .legacy-alert-stage > svg{width:50px;height:50px}
}
@media (max-height:999px){
html.legacy-tv .tv-operation header{padding-bottom:6px}
html.legacy-tv .tv-operation header h1{font-size:24px;line-height:1.1}
html.legacy-tv .tv-operation header > div:first-child > div:first-child{display:none}
html.legacy-tv .tv-operation [data-testid="category-filter"]{padding-top:2px;padding-bottom:2px}
}

/* Dialog without Tailwind layers */
html.legacy-tv [role="dialog"]{position:fixed;z-index:210;top:50%;left:50%;width:560px;max-width:92%;max-height:92%;overflow:auto;margin-left:-280px;transform:translateY(-50%);padding:20px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#0f172a;box-shadow:0 12px 40px rgba(15,23,42,.35)}
html.legacy-tv div[data-state="open"].fixed.inset-0{position:fixed;top:0;left:0;right:0;bottom:0;z-index:200;background:rgba(15,23,42,.6)}
html.legacy-tv [role="dialog"] h2{margin:0 0 4px;font-size:20px}
html.legacy-tv [role="dialog"] p{margin:0 0 12px;color:#64748b;font-size:14px}
html.legacy-tv [role="dialog"] input{border:1px solid #cbd5e1;border-radius:6px;padding:4px 8px}
html.legacy-tv [role="dialog"] [role="switch"]{width:44px;min-height:24px;padding:0}
html.legacy-tv [role="dialog"] .tv-reading-options{display:flex}
html.legacy-tv [role="dialog"] .tv-reading-options > button{flex:1 1 0;margin-right:8px}
html.legacy-tv [role="dialog"] .tv-reading-options > button[aria-pressed="true"]{border-color:#ff5a00;background:#fff7ed;color:#9a3412}
html.legacy-tv [role="dialog"] .tv-reading-options > button:disabled{opacity:.45}
