@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800;900&display=swap");

@font-face {
  font-family: "FidoPro";
  src: url("../assets/fonts/FidoPro.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --brand: #ff4e00;
  --brand-2: #ff7a00;
  --accent: #fece00;
  --ink: #fff6df;
  --muted: rgba(255, 246, 223, 0.62);
  --quiet: rgba(255, 246, 223, 0.42);
  --black: #040404;
  --coal: #090909;
  --panel: rgba(13, 13, 13, 0.72);
  --panel-2: rgba(22, 16, 11, 0.78);
  --line: rgba(255, 206, 0, 0.16);
  --line-strong: rgba(255, 206, 0, 0.36);
  --ok: #6dffad;
  --danger: #ff817a;
  --warn: #ffd86a;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  --glow: 0 0 38px rgba(255, 78, 0, 0.26);
  --title-font: "FidoPro", Montserrat, ui-sans-serif, system-ui, sans-serif;
  --body-font: Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--body-font);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 206, 0, 0.42), transparent 17rem),
    radial-gradient(circle at 24% 30%, rgba(255, 78, 0, 0.48), transparent 24rem),
    radial-gradient(circle at 100% 0%, rgba(255, 78, 0, 0.24), transparent 27rem),
    linear-gradient(125deg, #ff4e00 0%, #8d1e00 16%, #1b0704 38%, #050505 66%, #000 100%);
  background-attachment: fixed;
}

body:not(.is-player)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 206, 0, 0.09) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.58));
  background-size: 96px 96px, 96px 96px, auto;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 82%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

a {
  color: inherit;
}

body:not(.is-player) * {
  scrollbar-color: rgba(255, 206, 0, 0.48) rgba(0, 0, 0, 0.32);
  scrollbar-width: thin;
}

body:not(.is-player) *::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

body:not(.is-player) *::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.32);
}

body:not(.is-player) *::-webkit-scrollbar-thumb {
  border: 2px solid rgba(0, 0, 0, 0.32);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.admin-shell {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  min-height: 100vh;
  gap: 18px;
  padding: 18px;
  transition: grid-template-columns 220ms ease;
}

.admin-shell.is-sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 36px);
  min-width: 0;
  overflow: hidden;
  padding: 8px;
  border: 1px solid rgba(255, 206, 0, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%),
    rgba(0, 0, 0, 0.7);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
}

.sidebar-toggle {
  position: absolute;
  top: 16px;
  right: 12px;
  z-index: 5;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 206, 0, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 206, 0, 0.12), rgba(255, 78, 0, 0.1)),
    rgba(0, 0, 0, 0.72);
  color: var(--accent);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.sidebar-toggle:hover {
  transform: translateX(-2px);
  border-color: rgba(255, 206, 0, 0.64);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44), 0 0 0 4px rgba(255, 206, 0, 0.08);
}

.side-logo {
  display: grid;
  gap: 10px;
  width: calc(100% - 46px);
  min-height: 108px;
  padding: 10px 8px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  transform-origin: left center;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.side-logo:hover {
  transform: translateY(-1px) scale(1.015);
  filter: drop-shadow(0 0 18px rgba(255, 206, 0, 0.22));
}

.brand-logo {
  display: block;
  width: 162px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(255, 78, 0, 0.28));
}

.side-logo span {
  color: rgba(255, 246, 223, 0.8);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 5px;
  margin-top: 18px;
}

.sidebar-footer {
  margin-top: auto;
}

.side-nav-item,
.side-player-link {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 6px 10px 6px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 246, 223, 0.68);
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.side-nav-item::before,
.side-player-link::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.side-nav-item:hover,
.side-player-link:hover {
  transform: translateX(3px);
  border-color: rgba(255, 206, 0, 0.18);
  background: rgba(255, 206, 0, 0.055);
  color: #ffffff;
}

.side-nav-item.is-active {
  border-color: rgba(255, 206, 0, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 78, 0, 0.24), rgba(255, 206, 0, 0.08)),
    rgba(255, 255, 255, 0.04);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 34px rgba(0, 0, 0, 0.25);
}

.side-nav-item.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 206, 0, 0.7);
}

.nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 206, 0, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 206, 0, 0.12), rgba(255, 78, 0, 0.08)),
    rgba(255, 255, 255, 0.04);
  color: #ffdc46;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-shell.is-sidebar-collapsed .side-logo,
.admin-shell.is-sidebar-collapsed .side-nav,
.admin-shell.is-sidebar-collapsed .sidebar-footer {
  pointer-events: none;
  opacity: 0;
  transform: translateX(-24px);
}

.workspace {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.workspace-header,
.home-hero,
.detail-panel,
.manager-list-panel,
.preview-panel,
.overview-card,
.panel,
.stat {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 78, 0, 0.13), rgba(255, 206, 0, 0.035) 42%, rgba(0, 0, 0, 0.18)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
}

.workspace-header::after,
.home-hero::after,
.detail-panel::after,
.manager-list-panel::after,
.preview-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 206, 0, 0.26), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%);
  mask-image: linear-gradient(180deg, black, transparent 54%);
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  z-index: 10000;
  overflow: visible;
}

.workspace-actions {
  position: relative;
  z-index: 10001;
}

.status-menu {
  z-index: 10002;
}

.status-popover {
  z-index: 10003;
}
  min-height: 116px;
  margin-bottom: 18px;
  padding: 22px 24px;
}

.workspace-title span,
.eyebrow {
  display: inline-flex;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-title h1,
.home-hero h2,
.detail-header h2,
.manager-list-head h2,
.detail-header h3,
.page-heading h2 {
  margin: 4px 0 0;
  color: #fff8e6;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.workspace-title h1 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.94;
}

.workspace-title p,
.home-hero p,
.detail-lead,
.page-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 720;
}

.workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.status-menu {
  position: relative;
  z-index: 30;
}

.status-trigger,
.button,
.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 206, 0, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 206, 0, 0.11), rgba(255, 78, 0, 0.11)),
    rgba(0, 0, 0, 0.58);
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.status-trigger::after,
.button::after,
.icon-button::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 38%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 360ms ease;
}

.status-trigger:hover::after,
.button:hover::after,
.icon-button:hover::after {
  opacity: 1;
  transform: translateX(390%) skewX(-18deg);
}

.status-trigger:hover,
.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 206, 0, 0.5);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.36), 0 0 0 4px rgba(255, 206, 0, 0.08);
}

.button.primary,
.status-trigger {
  border-color: rgba(255, 206, 0, 0.52);
  background: linear-gradient(135deg, #ff4e00 0%, #ff7a00 45%, #ffce00 100%);
  color: #130802;
  text-shadow: none;
}

.button.ghost {
  color: #ffdf5d;
  background:
    linear-gradient(180deg, rgba(255, 206, 0, 0.075), rgba(255, 78, 0, 0.07)),
    rgba(255, 255, 255, 0.035);
}

.button.danger {
  border-color: rgba(255, 129, 122, 0.36);
  color: var(--danger);
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--accent);
  font-size: 18px;
  font-weight: 950;
}

.icon-button.small {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.icon-button svg,
.button.icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.icon {
  width: 38px;
  padding: 0;
}

.button:active:not(:disabled),
.icon-button:active:not(:disabled),
.manager-item:active,
.linked-item:active {
  transform: translateY(0);
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.32), inset 0 2px 10px rgba(0, 0, 0, 0.28);
}

.button:focus-visible,
.icon-button:focus-visible,
.manager-item:focus-visible,
.linked-item:focus-visible,
.side-nav-item:focus-visible,
.side-player-link:focus-visible,
.status-trigger:focus-visible,
.sidebar-toggle:focus-visible,
.side-logo:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 206, 0, 0.28);
  outline-offset: 2px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 129, 122, 0.18);
}

.status-dot.online {
  background: #31ff91;
  box-shadow: 0 0 0 4px rgba(49, 255, 145, 0.18);
}

.status-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: min(390px, calc(100vw - 38px));
  padding: 14px;
  border: 1px solid rgba(255, 206, 0, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 78, 0, 0.12), rgba(255, 206, 0, 0.035)),
    rgba(2, 2, 2, 0.96);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.status-menu:hover .status-popover,
.status-menu:focus-within .status-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.status-popover-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.status-popover-head strong,
.status-line strong {
  color: var(--ink);
}

.status-popover-head span,
.status-line span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 206, 0, 0.12);
}

.status-line strong {
  font-size: 12px;
  text-align: right;
}

.status-auth {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 206, 0, 0.12);
}

.status-auth .login-inline {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-clean,
.workspace-content {
  min-width: 0;
}

.dashboard-clean {
  display: grid;
  gap: 16px;
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 192px;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 206, 0, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 78, 0, 0.28), rgba(0, 0, 0, 0.42)),
    rgba(7, 7, 7, 0.78);
}

.home-hero h2 {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.93;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-card {
  min-height: 104px;
  padding: 16px;
}

.overview-card span {
  display: block;
  color: var(--accent);
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 14px 30px rgba(255, 78, 0, 0.24);
}

.overview-card strong {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.home-grid,
.manager-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.manager-list-panel,
.detail-panel,
.preview-panel {
  min-width: 0;
  padding: 16px;
}

.manager-list-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.manager-list-head,
.detail-header,
.panel-header,
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.manager-list-head h2,
.detail-header h2,
.detail-header h3,
.panel-header h3 {
  margin: 4px 0 0;
}

.manager-list {
  display: grid;
  gap: 9px;
}

.manager-item,
.linked-item,
.media-line,
.list-row,
.media-editor-item,
.detail-item,
.readonly-box,
.empty-state.compact {
  border: 1px solid rgba(255, 206, 0, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 206, 0, 0.05), rgba(255, 78, 0, 0.04)),
    rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.manager-item {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 70px;
  padding: 13px 14px 13px 16px;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.manager-item::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.manager-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 206, 0, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 206, 0, 0.09), rgba(255, 78, 0, 0.06)),
    rgba(255, 255, 255, 0.04);
}

.manager-item.is-active {
  border-color: rgba(255, 206, 0, 0.56);
  background:
    linear-gradient(90deg, rgba(255, 78, 0, 0.26), rgba(255, 206, 0, 0.08)),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.manager-item.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 206, 0, 0.58);
}

.manager-item strong,
.linked-item span,
.media-line strong,
.detail-item strong,
.list-title {
  color: var(--ink);
  font-weight: 900;
}

.manager-item span,
.linked-item strong,
.media-line span,
.detail-item span,
.list-meta,
.status-detail,
.readonly-box,
.muted {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.detail-item {
  min-height: 82px;
  padding: 13px;
}

.detail-item span {
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.detail-item strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.25;
  word-break: break-word;
}

.linked-list,
.list,
.media-editor-list {
  display: grid;
  gap: 9px;
}

.linked-list {
  margin-top: 18px;
}

.linked-item,
.media-line,
.list-row,
.media-editor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 11px 13px;
}

.linked-item {
  width: 100%;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.linked-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 206, 0, 0.34);
}

.linked-item strong.online {
  color: var(--ok);
}

.linked-item strong.offline {
  color: var(--danger);
}

.tv-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-preview-wrap {
  margin-top: 18px;
}

.compact-select {
  width: min(260px, 100%);
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 206, 0, 0.2);
  border-radius: 999px;
  background: rgba(255, 206, 0, 0.1);
  color: #ffdf66;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.online,
.tag.active {
  border-color: rgba(109, 255, 173, 0.28);
  background: rgba(109, 255, 173, 0.13);
  color: var(--ok);
}

.status-pill.offline,
.tag.inactive {
  border-color: rgba(255, 129, 122, 0.28);
  background: rgba(255, 129, 122, 0.12);
  color: var(--danger);
}

.status-pill.pending,
.tag.draft {
  color: var(--warn);
}

.field,
.form-grid {
  min-width: 0;
}

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.checkbox-line {
  color: rgba(255, 246, 223, 0.82);
  font-size: 12px;
  font-weight: 850;
}

.field input,
.field select,
.field textarea,
.field-select,
.login-inline input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 206, 0, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.46);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 24px rgba(0, 0, 0, 0.14);
}

.field input::placeholder,
.field textarea::placeholder,
.login-inline input::placeholder {
  color: rgba(255, 246, 223, 0.34);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.layout-mixer {
  display: grid;
  gap: 13px;
  padding: 14px;
  border: 1px solid rgba(255, 206, 0, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 206, 0, 0.08), transparent 36%),
    rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.layout-mixer-head,
.layout-percent-grid,
.layout-ticks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.layout-mixer-head strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.layout-mixer-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.layout-mixer-head > div:last-child,
.layout-ticks span:last-child {
  text-align: right;
}

.layout-preview-bar {
  position: relative;
  display: flex;
  height: 74px;
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.layout-preview-bar::before,
.layout-preview-bar::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 0, 0, 0.86);
  font-size: 11px;
  font-weight: 950;
  pointer-events: none;
  text-transform: uppercase;
}

.layout-preview-bar::before {
  content: "Publicidade";
  left: 16px;
}

.layout-preview-bar::after {
  content: "Condominio";
  right: 16px;
  color: rgba(255, 246, 223, 0.84);
}

.layout-preview-main {
  width: var(--layout-main, 67%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, var(--accent), #ff9f00 52%, var(--brand));
  transition: width 140ms ease;
}

.layout-preview-secondary {
  flex: 1;
  background:
    linear-gradient(135deg, rgba(255, 206, 0, 0.14), transparent 38%),
    linear-gradient(135deg, #151515, #050505);
}

.layout-range {
  width: 100%;
  height: 28px;
  padding: 0;
  appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.layout-range::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.42);
}

.layout-range::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -8px;
  appearance: none;
  border: 3px solid #050505;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(254, 206, 0, 0.16), 0 12px 28px rgba(0, 0, 0, 0.4);
}

.layout-range::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.layout-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 3px solid #050505;
  border-radius: 50%;
  background: var(--accent);
}

.layout-ticks {
  grid-template-columns: 1fr 1fr 1fr;
  color: rgba(255, 246, 223, 0.48);
  font-size: 10px;
  font-weight: 900;
}

.layout-ticks span:nth-child(2) {
  text-align: center;
}

.mini-field {
  gap: 6px;
}

.percent-input {
  position: relative;
}

.percent-input input {
  padding-right: 38px;
  font-weight: 950;
}

.percent-input span {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  pointer-events: none;
}

.layout-parts-editor {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 206, 0, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 206, 0, 0.08), transparent 36%),
    rgba(0, 0, 0, 0.38);
}

.layout-parts-screen {
  position: relative;
  display: grid;
  grid-template-rows:
    minmax(0, var(--main-track, 18fr))
    minmax(0, var(--secondary-track, 8fr))
    minmax(0, var(--info-track, 4fr));
  height: 320px;
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.28);
  border-radius: 8px;
  background: #050505;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.24);
}

.layout-part-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  padding: 12px 14px;
  color: #fff;
  font-weight: 950;
}

.layout-parts-screen[data-main-enabled="false"] [data-zone="main"],
.layout-parts-screen[data-secondary-enabled="false"] [data-zone="secondary"],
.layout-parts-screen[data-info-enabled="false"] [data-zone="info"] {
  overflow: hidden;
  padding-block: 0;
  opacity: 0.34;
}

.layout-part-zone strong,
.layout-part-zone span {
  position: relative;
  z-index: 2;
}

.layout-part-zone span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.zone-heading {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.zone-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 38px;
  height: 22px;
}

.zone-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.zone-switch span {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.34);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.zone-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, background 180ms ease;
}

.zone-switch input:checked + span {
  border-color: rgba(254, 206, 0, 0.86);
  background: #fece00;
  box-shadow: 0 0 18px rgba(254, 206, 0, 0.34);
}

.zone-switch input:checked + span::after {
  transform: translateX(16px);
  background: #100800;
}

.main-part {
  background:
    radial-gradient(circle at 10% 10%, rgba(254, 206, 0, 0.28), transparent 42%),
    linear-gradient(135deg, rgba(255, 78, 0, 0.78), rgba(0, 0, 0, 0.82));
}

.secondary-part {
  background: linear-gradient(135deg, rgba(255, 206, 0, 0.11), rgba(0, 0, 0, 0.88));
}

.info-part {
  background: linear-gradient(135deg, rgba(254, 206, 0, 0.9), rgba(255, 78, 0, 0.7));
  color: #130802;
}

.info-part span {
  color: rgba(19, 8, 2, 0.72);
}

.layout-divider {
  position: absolute;
  left: 0;
  z-index: 4;
  width: 100%;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ns-resize;
  transform: translateY(-50%);
}

.layout-divider::before {
  content: "";
  position: absolute;
  inset: 7px 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(5, 5, 5, 0.72),
    0 0 18px rgba(254, 206, 0, 0.78);
}

.layout-divider[data-divider="main"] {
  top: var(--main-line, 60%);
}

.layout-divider[data-divider="secondary"] {
  top: var(--secondary-line, 86.666%);
}

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

.live-screen-card {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 206, 0, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 78, 0, 0.12), transparent 18rem),
    rgba(0, 0, 0, 0.32);
}

.live-screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.live-screen-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.live-screen-head > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.live-screen-image {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border: 1px solid rgba(255, 206, 0, 0.22);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.32);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(255, 206, 0, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.checkbox-line input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.subsection {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 206, 0, 0.12);
}

.subsection h4 {
  margin: 0 0 10px;
  color: var(--ink);
}

.import-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 206, 0, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.mini-media-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mini-media-list span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 206, 0, 0.14);
  border-radius: 999px;
  background: rgba(255, 206, 0, 0.08);
  color: #ffdf66;
  font-size: 12px;
  font-weight: 800;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.dashboard-tv-preview,
.frame-preview {
  position: relative;
  display: grid;
  width: min(100%, 310px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.28);
  border-radius: 8px;
  background: #030303;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 206, 0, 0.08);
}

.dashboard-tv-preview {
  border-width: 9px;
}

.dashboard-tv-preview.portrait {
  aspect-ratio: 9 / 16;
  grid-template-rows: minmax(0, var(--main-ratio, 18fr)) minmax(0, var(--secondary-ratio, 8fr)) minmax(0, var(--info-ratio, 4fr));
}

.dashboard-tv-preview.only-one {
  grid-template: 1fr / 1fr;
}

.dashboard-tv-preview.landscape {
  width: min(100%, 560px);
  aspect-ratio: 16 / 9;
  grid-template-columns: minmax(0, var(--main-ratio, 18fr)) minmax(0, var(--secondary-ratio, 8fr)) minmax(0, var(--info-ratio, 4fr));
}

.preview-main,
.preview-secondary,
.preview-info {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 22px;
  color: #ffffff;
}

.preview-main {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 206, 0, 0.5), transparent 10rem),
    linear-gradient(135deg, rgba(255, 78, 0, 0.92), rgba(0, 0, 0, 0.82)),
    #161616;
}

.preview-info {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.34), transparent 9rem),
    linear-gradient(135deg, rgba(254, 206, 0, 0.94), rgba(255, 78, 0, 0.78));
  color: #120801;
}

.preview-info span,
.preview-info small {
  color: rgba(18, 8, 1, 0.7);
}

.preview-secondary {
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.92), rgba(255, 78, 0, 0.34)),
    #080808;
}

.preview-main span,
.preview-secondary span {
  color: #ffdf66;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-main strong,
.preview-secondary strong {
  font-size: clamp(18px, 4vw, 34px);
  line-height: 1.02;
}

.preview-main small,
.preview-secondary small {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
}

.frame-image {
  position: absolute;
  inset: 0;
  z-index: 22;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.manifest-box {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(255, 206, 0, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffdf66;
  font-size: 12px;
  line-height: 1.55;
}

.editor-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 60vw);
  padding: 18px;
}

.editor-scrim {
  margin: -18px 0 -18px -18px;
  border: 0;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(12px);
}

.editor-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: min(60vw, 860px);
  max-width: calc(100vw - 36px);
  height: min(92vh, calc(100vh - 36px));
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 206, 0, 0.16), transparent 14rem),
    linear-gradient(145deg, rgba(255, 78, 0, 0.14), rgba(0, 0, 0, 0.86)),
    #070707;
  box-shadow: -32px 0 92px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: editorIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes editorIn {
  from {
    opacity: 0;
    transform: translateX(36px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255, 206, 0, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.editor-header span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-header h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
}

.editor-body {
  min-height: 0;
  overflow: auto;
  padding: 20px 22px;
}

.editor-body .form-actions {
  position: sticky;
  bottom: -20px;
  margin: 20px -22px -20px;
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 206, 0, 0.14);
  background: rgba(4, 4, 4, 0.94);
  backdrop-filter: blur(12px);
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.empty-detail {
  min-height: 260px;
}

.vertical-manager {
  display: grid;
  gap: 18px;
  width: 100%;
}

.vertical-list-panel {
  min-height: 0;
}

.vertical-list-head {
  align-items: center;
}

.tv-rows {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.tv-row-card {
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 206, 0, 0.045), transparent 38%),
    rgba(0, 0, 0, 0.28);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.tv-row-card:hover,
.tv-row-card.is-open {
  border-color: rgba(254, 206, 0, 0.34);
  background:
    radial-gradient(circle at 2% 0%, rgba(254, 206, 0, 0.12), transparent 18rem),
    rgba(0, 0, 0, 0.42);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.tv-row-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(130px, 0.9fr) minmax(90px, 0.45fr) minmax(132px, 0.58fr) 34px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 15px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tv-row-line:hover .row-chevron {
  color: var(--accent);
  transform: translateY(1px);
}

.tv-row-card.is-open .row-chevron {
  color: var(--accent);
  transform: rotate(180deg);
}

.tv-row-main,
.tv-row-meta,
.tv-row-code {
  min-width: 0;
}

.tv-row-main strong,
.tv-row-meta strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.tv-row-main small,
.tv-row-meta small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-row-code {
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-chevron {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 206, 0, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  transition: color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.row-chevron svg {
  width: 18px;
  height: 18px;
}

.tv-row-details {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  animation: rowOpen 180ms ease both;
}

@keyframes rowOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tv-detail-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 206, 0, 0.12);
}

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

.tv-inline-preview .live-screen-card {
  max-width: 520px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 206, 0, 0.1);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.9fr);
}

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

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

.stat {
  min-height: 94px;
  padding: 16px;
}

.stat-value {
  display: block;
  color: var(--accent);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.panel {
  overflow: hidden;
}

.panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 206, 0, 0.12);
}

.panel-body {
  padding: 16px;
}

/* Player */
.player-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 78, 0, 0.22), transparent 18rem),
    #030303;
  color: #ffffff;
}

.player-toolbar {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 206, 0, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
}

.player-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-toolbar-logo {
  width: 92px;
  height: auto;
}

.player-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 78px 16px 16px;
}

.player-stage.is-tv-app {
  padding: 0;
}

.player-stage.is-tv-app .tv-screen {
  width: 100vw;
  max-width: none;
  height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pairing-player {
  background:
    radial-gradient(circle at 18% 12%, rgba(254, 206, 0, 0.24), transparent 20rem),
    linear-gradient(145deg, #111, #030303);
}

.pairing-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.pairing-logo {
  width: min(360px, 70vw);
  margin-bottom: 34px;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
}

.pairing-card {
  width: min(720px, 90vw);
  padding: 34px;
  border: 1px solid rgba(254, 206, 0, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.pairing-card span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pairing-card h1 {
  margin: 14px 0 10px;
  color: #ffffff;
  font-family: var(--title-font);
  font-size: clamp(52px, 10vw, 118px);
  line-height: 0.9;
}

.pairing-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 700;
}

.tv-screen {
  position: relative;
  display: grid;
  width: min(calc((100vh - 108px) * 9 / 16), calc(100vw - 32px));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.2);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
}

.tv-screen.portrait {
  grid-template-rows: minmax(0, var(--main-ratio, 18fr)) minmax(0, var(--secondary-ratio, 8fr)) minmax(0, var(--info-ratio, 4fr));
}

.tv-screen.landscape {
  width: min(calc(100vw - 32px), calc((100vh - 108px) * 16 / 9));
  aspect-ratio: 16 / 9;
  grid-template-columns: minmax(0, var(--main-ratio, 18fr)) minmax(0, var(--secondary-ratio, 8fr)) minmax(0, var(--info-ratio, 4fr));
}

.tv-screen.only-one {
  grid-template: 1fr / 1fr;
}

.player-zone {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.main-zone {
  background: #0c0704;
}

.secondary-zone {
  border-top: 1px solid rgba(255, 206, 0, 0.12);
  background: #090909;
}

.info-zone {
  border-top: 1px solid rgba(255, 206, 0, 0.14);
  background:
    radial-gradient(circle at 12% 18%, rgba(254, 206, 0, 0.18), transparent 12rem),
    linear-gradient(135deg, #0a0a0a, #1b0f02);
}

.tv-screen.landscape .secondary-zone {
  border-top: 0;
  border-left: 1px solid rgba(255, 206, 0, 0.12);
}

.tv-screen.landscape .info-zone {
  border-top: 0;
  border-left: 1px solid rgba(255, 206, 0, 0.12);
}

.media-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 52px);
  color: #ffffff;
  isolation: isolate;
}

.media-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 206, 0, 0.55), transparent 18rem),
    linear-gradient(135deg, rgba(255, 78, 0, 0.94), rgba(0, 0, 0, 0.76)),
    #111111;
}

.media-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.55)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: auto, 72px 72px;
}

.media-copy {
  width: 100%;
}

.media-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(12px, 1.8vw, 16px);
  font-weight: 900;
  text-transform: uppercase;
}

.media-title {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(34px, 7vh, 82px);
  line-height: 0.98;
  font-weight: 950;
}

.media-caption {
  max-width: 26ch;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(15px, 2.5vh, 22px);
  line-height: 1.25;
  font-weight: 760;
}

.rendered-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notice-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  overflow: hidden;
  padding: clamp(12px, 1.8vh, 18px) 28px 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.92), rgba(255, 78, 0, 0.28)),
    #080808;
}

.notice-text {
  align-self: center;
  min-height: 0;
  overflow: hidden;
  padding-top: 18px;
}

.notice-title {
  margin: 0 0 4px;
  color: #ffdf66;
  font-size: clamp(11px, 1.45vh, 16px);
  font-weight: 900;
  text-transform: uppercase;
}

.notice-content {
  margin: 0;
  font-size: clamp(14px, 1.95vh, 24px);
  line-height: 1.08;
  font-weight: 900;
}

.weather-bar {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(78px, 0.72fr) minmax(0, 1.45fr) minmax(120px, 0.9fr);
  align-items: center;
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: clamp(3px, 0.5vh, 7px) clamp(8px, 1.6vw, 18px);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, #050505 0%, #160801 42%, #050505 100%),
    linear-gradient(90deg, rgba(255, 78, 0, 0.55), rgba(254, 206, 0, 0.25));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(254, 206, 0, 0.42);
}

.weather-main,
.weather-now,
.market-card {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-logo {
  display: block;
  width: clamp(58px, 7vw, 92px);
  max-height: clamp(16px, 2.4vh, 26px);
  object-fit: contain;
}

.weather-clock {
  padding-left: 10px;
  border-left: 1px solid rgba(254, 206, 0, 0.32);
  color: #fece00;
  font-size: clamp(10px, 1.55vh, 18px);
  font-weight: 950;
  line-height: 1;
}

.weather-now {
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.weather-bar strong,
.weather-bar span {
  min-width: 0;
  margin: 0;
}

.weather-bar strong {
  display: block;
  overflow: hidden;
  color: #fece00;
  font-size: clamp(9px, 1.35vh, 15px);
  line-height: 1;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.weather-bar span {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(8px, 1.18vh, 13px);
  font-weight: 800;
  white-space: nowrap;
}

.weather-symbol {
  position: relative;
  width: clamp(12px, 1.8vh, 20px);
  height: clamp(12px, 1.8vh, 20px);
  border-radius: 50%;
  background: #fece00;
  box-shadow: 0 0 18px rgba(254, 206, 0, 0.45);
}

.market-card {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  align-content: center;
  gap: 8px;
}

.market-card b {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(8px, 1.1vh, 12px);
  font-weight: 950;
  text-transform: uppercase;
}

.market-card em {
  color: var(--accent);
  font-size: clamp(9px, 1.3vh, 15px);
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.player-hud {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.player-stage.is-tv-app .player-hud {
  display: none;
}

@media (max-width: 1100px) {
  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    position: relative;
    top: 0;
    flex-direction: row;
    align-items: center;
    gap: 9px;
    height: auto;
    min-height: 70px;
    overflow-x: auto;
  }

  .sidebar-toggle {
    position: static;
    flex: 0 0 38px;
  }

  .side-logo {
    flex: 0 0 154px;
    width: 154px;
    min-height: 50px;
    padding: 4px;
  }

  .side-logo .brand-logo {
    width: 116px;
  }

  .side-logo span {
    font-size: 10px;
  }

  .side-nav {
    display: flex;
    flex: 1 0 auto;
    gap: 7px;
    margin-top: 0;
  }

  .side-nav-item,
  .side-player-link {
    min-width: max-content;
  }

  .sidebar-footer {
    margin: 0 0 0 auto;
  }

  .workspace-header,
  .home-hero,
  .manager-list-head,
  .detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .home-grid,
  .manager-layout,
  .overview-strip,
  .grid-2,
  .grid-3,
  .stats {
    grid-template-columns: 1fr;
  }

  .manager-list-panel {
    position: static;
    max-height: none;
  }

  .editor-layer {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .editor-scrim {
    position: absolute;
    inset: 0;
    margin: 0;
  }

  .editor-panel {
    position: relative;
    height: calc(100vh - 20px);
  }
}

@media (max-width: 680px) {
  .workspace-header,
  .home-hero,
  .detail-panel,
  .manager-list-panel,
  .preview-panel {
    padding: 16px;
  }

  .workspace-title h1 {
    font-size: 34px;
  }

  .overview-card span {
    font-size: 32px;
  }

  .detail-grid,
  .form-grid,
  .checkbox-grid,
  .status-auth .login-inline {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .linked-item,
  .media-line,
  .media-editor-item,
  .list-row,
  .tv-status-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-actions,
  .form-actions,
  .hero-actions,
  .detail-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .editor-panel {
    min-width: 0;
  }

  .player-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .player-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

/* Verão Premium System v3 */
:root {
  --accent: #fece00;
  --surface-a: rgba(10, 10, 10, 0.82);
  --surface-b: rgba(18, 18, 18, 0.78);
  --hairline: rgba(254, 206, 0, 0.14);
  --hairline-strong: rgba(254, 206, 0, 0.34);
  --premium-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

body {
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 18% -6%, rgba(254, 206, 0, 0.28), transparent 20rem),
    radial-gradient(circle at 70% 8%, rgba(255, 78, 0, 0.2), transparent 24rem),
    linear-gradient(145deg, #111 0%, #080808 38%, #020202 100%);
}

body:not(.is-player)::before {
  background:
    linear-gradient(90deg, rgba(254, 206, 0, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(130deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

.admin-shell {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.admin-shell.is-sidebar-collapsed {
  grid-template-columns: 68px minmax(0, 1fr);
}

.sidebar {
  top: 22px;
  height: calc(100vh - 44px);
  padding: 14px;
  border-color: rgba(254, 206, 0, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 18%),
    rgba(5, 5, 5, 0.74);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.side-logo {
  width: calc(100% - 48px);
  min-height: 116px;
  padding: 8px 2px 18px;
}

.side-logo span {
  display: none;
}

.brand-logo {
  width: 176px;
  filter:
    drop-shadow(0 22px 30px rgba(0, 0, 0, 0.4))
    drop-shadow(0 0 18px rgba(254, 206, 0, 0.18));
}

.sidebar-toggle {
  border-color: rgba(254, 206, 0, 0.18);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
}

.side-nav {
  gap: 8px;
  margin-top: 8px;
}

.side-nav-item,
.side-player-link {
  min-height: 48px;
  padding: 6px 9px 6px 6px;
  border-color: transparent;
  color: rgba(255, 246, 223, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.side-nav-item:hover,
.side-player-link:hover {
  border-color: rgba(254, 206, 0, 0.16);
  background: rgba(254, 206, 0, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.side-nav-item.is-active {
  border-color: rgba(254, 206, 0, 0.28);
  background:
    linear-gradient(90deg, rgba(254, 206, 0, 0.13), rgba(255, 78, 0, 0.06)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 38px rgba(0, 0, 0, 0.26);
}

.nav-icon {
  border-color: rgba(254, 206, 0, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
}

.workspace-header,
.home-hero,
.detail-panel,
.manager-list-panel,
.preview-panel,
.overview-card,
.panel,
.stat {
  border-color: var(--hairline);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface-a);
  box-shadow:
    var(--premium-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.workspace-header {
  min-height: 132px;
  margin-bottom: 22px;
  padding: 28px 30px;
}

.workspace-title h1,
.home-hero h2,
.detail-header h2,
.manager-list-head h2,
.detail-header h3,
.page-heading h2,
.editor-header h2,
.media-title {
  font-family: var(--title-font);
  font-weight: 900;
  letter-spacing: 0;
}

.workspace-title h1 {
  max-width: 820px;
  font-size: clamp(42px, 5.8vw, 76px);
  line-height: 0.88;
}

.workspace-title p,
.home-hero p,
.detail-lead,
.page-heading p,
.manager-item span,
.detail-item span,
.status-line span,
.status-popover-head span,
.list-meta,
.muted {
  font-family: var(--body-font);
  font-weight: 600;
}

.eyebrow,
.workspace-title span {
  color: var(--accent);
  font-family: var(--body-font);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.button.primary,
.status-trigger {
  border-color: rgba(254, 206, 0, 0.72);
  background: var(--accent);
  color: #090909;
  font-weight: 900;
  box-shadow:
    0 18px 44px rgba(254, 206, 0, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.button.primary:hover:not(:disabled),
.status-trigger:hover {
  border-color: #ffe36b;
  background: #ffda30;
  color: #050505;
  box-shadow:
    0 22px 54px rgba(254, 206, 0, 0.28),
    0 0 0 4px rgba(254, 206, 0, 0.11),
    inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.button,
.button.ghost,
.icon-button {
  border-color: rgba(254, 206, 0, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-weight: 800;
}

.button.ghost {
  color: var(--accent);
}

.button.danger,
.button.ghost.danger {
  border-color: rgba(255, 129, 122, 0.28);
  color: var(--danger);
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: rgba(254, 206, 0, 0.38);
  background: rgba(254, 206, 0, 0.075);
}

.button.danger:hover:not(:disabled),
.button.ghost.danger:hover:not(:disabled) {
  border-color: rgba(255, 129, 122, 0.56);
  background: rgba(255, 129, 122, 0.1);
}

.home-hero {
  min-height: 220px;
  padding: 30px;
  background:
    radial-gradient(circle at 12% 16%, rgba(254, 206, 0, 0.16), transparent 20rem),
    linear-gradient(135deg, rgba(255, 78, 0, 0.14), rgba(255, 255, 255, 0.018)),
    rgba(7, 7, 7, 0.84);
}

.home-hero h2 {
  font-size: clamp(44px, 6vw, 86px);
}

.overview-strip {
  gap: 14px;
}

.overview-card {
  min-height: 124px;
  padding: 20px;
}

.overview-card span {
  color: var(--accent);
  font-family: var(--title-font);
  font-size: 50px;
  font-weight: 900;
}

.overview-card strong {
  color: rgba(255, 246, 223, 0.68);
  font-size: 13px;
  font-weight: 800;
}

.home-grid,
.manager-layout {
  gap: 18px;
}

.manager-list-panel,
.detail-panel,
.preview-panel {
  padding: 20px;
}

.manager-item,
.linked-item,
.media-line,
.list-row,
.media-editor-item,
.detail-item,
.readonly-box,
.empty-state.compact {
  border-color: rgba(254, 206, 0, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.016)),
    rgba(255, 255, 255, 0.018);
}

.manager-item {
  min-height: 78px;
  padding: 16px 16px 16px 18px;
}

.manager-item strong,
.linked-item span,
.media-line strong,
.detail-item strong,
.list-title {
  font-family: var(--body-font);
  font-weight: 900;
}

.manager-item.is-active {
  border-color: rgba(254, 206, 0, 0.48);
  background:
    linear-gradient(90deg, rgba(254, 206, 0, 0.12), rgba(255, 78, 0, 0.045)),
    rgba(255, 255, 255, 0.035);
}

.manager-item.is-active::before,
.side-nav-item.is-active::before {
  background: var(--accent);
}

.detail-grid {
  gap: 12px;
}

.detail-item {
  min-height: 92px;
  padding: 16px;
}

.field input,
.field select,
.field textarea,
.field-select,
.login-inline input {
  min-height: 46px;
  border-color: rgba(254, 206, 0, 0.12);
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--body-font);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.field-select:focus {
  border-color: rgba(254, 206, 0, 0.58);
  outline: 4px solid rgba(254, 206, 0, 0.1);
}

.dashboard-tv-preview {
  width: min(100%, 340px);
  border-color: rgba(254, 206, 0, 0.32);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(254, 206, 0, 0.08);
}

.preview-main {
  background:
    radial-gradient(circle at 20% 18%, rgba(254, 206, 0, 0.55), transparent 12rem),
    linear-gradient(145deg, rgba(255, 78, 0, 0.86), rgba(0, 0, 0, 0.82));
}

.preview-secondary {
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.96), rgba(255, 78, 0, 0.28)),
    #070707;
}

.editor-panel {
  border-color: rgba(254, 206, 0, 0.28);
  background:
    radial-gradient(circle at 16% 0%, rgba(254, 206, 0, 0.12), transparent 16rem),
    linear-gradient(145deg, rgba(255, 78, 0, 0.08), rgba(0, 0, 0, 0.92)),
    #070707;
}

.editor-header {
  padding: 24px 26px;
}

.editor-body {
  padding: 24px 26px;
}

.editor-body .form-actions {
  margin: 24px -26px -24px;
  padding: 18px 26px;
}

.status-popover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(4, 4, 4, 0.96);
}

.status-dot.online {
  background: #19f59a;
}

.reports-page {
  display: grid;
  gap: 18px;
}

.reports-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 180px;
  padding: 30px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 18%, rgba(254, 206, 0, 0.18), transparent 18rem),
    linear-gradient(135deg, rgba(255, 78, 0, 0.16), rgba(255, 255, 255, 0.018)),
    var(--surface-a);
  box-shadow:
    var(--premium-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.reports-hero h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--title-font);
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 0.9;
}

.reports-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.report-period {
  display: grid;
  min-width: 136px;
  min-height: 96px;
  place-items: center;
  padding: 16px;
  border: 1px solid rgba(254, 206, 0, 0.2);
  border-radius: 8px;
  background: rgba(254, 206, 0, 0.08);
  text-align: center;
}

.report-period span,
.report-kpi span,
.report-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-period strong {
  color: var(--accent);
  font-family: var(--title-font);
  font-size: 34px;
  line-height: 1;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.report-kpi {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface-a);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.report-kpi strong {
  display: block;
  margin-top: 12px;
  color: var(--accent);
  font-family: var(--title-font);
  font-size: clamp(32px, 4vw, 50px);
  line-height: 0.92;
}

.report-kpi small {
  display: block;
  margin-top: 10px;
  color: var(--quiet);
  font-weight: 700;
}

.reports-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.report-table {
  display: grid;
  gap: 10px;
}

.report-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) repeat(4, minmax(110px, 0.65fr));
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(254, 206, 0, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.016)),
    rgba(255, 255, 255, 0.018);
}

.report-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-row strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-report-row {
  grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(100px, 0.6fr));
}

.weather-icon {
  background: var(--accent);
  color: #050505;
}

@media (max-width: 1100px) {
  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    padding: 12px;
    gap: 12px;
  }

  .sidebar {
    top: 0;
    height: auto;
  }

  .workspace-title h1 {
    font-size: clamp(36px, 10vw, 56px);
  }

  .reports-hero {
    align-items: stretch;
    flex-direction: column;
  }

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

  .report-row,
  .campaign-report-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .report-kpis,
  .report-row,
  .campaign-report-row {
    grid-template-columns: 1fr;
  }
}

/* Vertical TV management */
.vertical-manager {
  display: grid;
  gap: 18px;
  width: 100%;
}

.vertical-list-panel {
  min-height: 0;
}

.tv-rows {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.tv-row-card {
  overflow: hidden;
  border: 1px solid rgba(255, 206, 0, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 206, 0, 0.045), transparent 38%),
    rgba(0, 0, 0, 0.28);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.tv-row-card:hover,
.tv-row-card.is-open {
  border-color: rgba(254, 206, 0, 0.34);
  background:
    radial-gradient(circle at 2% 0%, rgba(254, 206, 0, 0.12), transparent 18rem),
    rgba(0, 0, 0, 0.42);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.tv-row-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(130px, 0.9fr) minmax(90px, 0.45fr) minmax(132px, 0.58fr) 34px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 15px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tv-row-main,
.tv-row-meta,
.tv-row-code {
  min-width: 0;
}

.tv-row-main strong,
.tv-row-meta strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.tv-row-main small,
.tv-row-meta small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-row-code {
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-chevron {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 206, 0, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  transition: color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.row-chevron svg {
  width: 18px;
  height: 18px;
}

.tv-row-line:hover .row-chevron {
  color: var(--accent);
  transform: translateY(1px);
}

.tv-row-card.is-open .row-chevron {
  color: var(--accent);
  transform: rotate(180deg);
}

.tv-row-details {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  animation: rowOpen 180ms ease both;
}

@keyframes rowOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tv-detail-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 206, 0, 0.12);
}

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

.tv-inline-preview .live-screen-card {
  max-width: 520px;
}

.tv-inline-preview {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 520px);
  gap: 14px;
  align-items: start;
}

.delivery-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(254, 206, 0, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(254, 206, 0, 0.12), transparent 18rem),
    rgba(0, 0, 0, 0.34);
}

.delivery-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.delivery-head strong,
.delivery-item strong {
  display: block;
  color: var(--ink);
  font-weight: 950;
}

.delivery-head small,
.delivery-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.delivery-score {
  align-self: start;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(39, 214, 127, 0.12);
  color: #6cffac;
  font-size: 12px;
  font-weight: 950;
}

.delivery-score.pending {
  background: rgba(254, 206, 0, 0.12);
  color: var(--accent);
}

.delivery-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.delivery-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(254, 206, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: #6cffac;
  box-shadow: 0 0 18px rgba(108, 255, 172, 0.35);
}

.status-dot.pending {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(254, 206, 0, 0.35);
}

.editor-layer {
  grid-template-columns: minmax(0, 1fr) minmax(520px, 60vw);
}

.editor-panel {
  width: min(60vw, 860px);
  max-width: calc(100vw - 36px);
  height: min(92vh, calc(100vh - 36px));
  align-self: center;
}

@media (max-width: 1100px) {
  .tv-row-line,
  .tv-detail-strip,
  .tv-inline-preview {
    grid-template-columns: 1fr 1fr;
  }

  .row-chevron {
    justify-self: end;
  }

  .editor-layer {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    width: min(720px, calc(100vw - 20px));
    height: min(92vh, calc(100vh - 20px));
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .tv-row-line,
  .tv-detail-strip,
  .tv-inline-preview {
    grid-template-columns: 1fr;
  }

  .tv-row-code,
  .row-chevron {
    justify-self: start;
  }
}

/* Comunicados com editor rico e preview de TV mais fiel */
.rich-editor {
  overflow: hidden;
  border: 1px solid rgba(254, 206, 0, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(254, 206, 0, 0.12), transparent 22rem),
    rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 54px rgba(0, 0, 0, 0.26);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid rgba(254, 206, 0, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(0, 0, 0, 0.34);
}

.rich-toolbar .icon-button.small {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 246, 223, 0.9);
  font-size: 12px;
}

.rich-toolbar .icon-button.small:hover {
  border-color: rgba(254, 206, 0, 0.5);
  background: #fece00;
  color: #090909;
  transform: translateY(-1px);
}

.rich-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px 6px 11px;
  border: 1px solid rgba(254, 206, 0, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 246, 223, 0.76);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.rich-control input[type="color"] {
  width: 28px;
  height: 24px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.rich-control select,
.rich-control input[type="number"] {
  width: auto;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.rich-control.wide select {
  min-width: 124px;
}

.rich-control.narrow input {
  width: 68px;
}

.rich-surface {
  min-height: 240px;
  padding: clamp(22px, 4vw, 38px);
  border: 12px solid #050505;
  border-radius: 0 0 18px 18px;
  outline: 0;
  line-height: 1.18;
  box-shadow: inset 0 0 0 1px rgba(254, 206, 0, 0.1);
}

.rich-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(254, 206, 0, 0.46), 0 0 0 4px rgba(254, 206, 0, 0.08);
}

.rich-surface p,
.rich-output p {
  margin: 0 0 0.55em;
}

.rich-surface span,
.rich-output span {
  line-height: inherit;
}

.notice-slide.styled-notice {
  padding: clamp(14px, 3.4vh, 34px) clamp(20px, 5vw, 54px);
}

.notice-slide.styled-notice .notice-text {
  width: 100%;
  max-width: 100%;
  padding: 0;
}

.notice-slide.styled-notice .notice-title {
  margin-bottom: 0.55em;
  letter-spacing: 0;
}

.notice-slide.styled-notice .notice-content {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 850;
  line-height: 1.18;
}

.preview-panel {
  overflow: visible;
}

.dashboard-tv-preview,
.frame-preview {
  border: 14px solid #020202;
  border-radius: 22px;
  background: #000;
  box-shadow:
    0 38px 110px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(254, 206, 0, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dashboard-tv-preview::before,
.frame-preview::before {
  content: "";
  position: absolute;
  z-index: 30;
  inset: -10px;
  border: 2px solid rgba(255, 255, 255, 0.045);
  border-radius: 24px;
  pointer-events: none;
}

.dashboard-tv-preview::after,
.frame-preview::after {
  content: "";
  position: absolute;
  z-index: 31;
  top: -9px;
  left: 50%;
  width: 54px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.dashboard-tv-preview.portrait,
.frame-preview {
  width: min(100%, 280px);
  aspect-ratio: 9 / 16;
}

.dashboard-tv-preview.landscape {
  width: min(100%, 640px);
  aspect-ratio: 16 / 9;
}

.preview-main,
.preview-secondary,
.preview-info {
  padding: clamp(10px, 4vw, 24px);
}

body.is-login {
  min-height: 100vh;
  overflow: auto;
}

.login-landing {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(24px, 4vw, 54px);
  padding: clamp(22px, 4vw, 58px);
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(254, 206, 0, 0.26), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(255, 78, 0, 0.3), transparent 32%),
    linear-gradient(135deg, #120503 0%, #1a0801 34%, #050505 100%);
}

.login-hero-panel,
.login-card,
.portal-panel,
.portal-intro {
  border: 1px solid rgba(254, 206, 0, 0.14);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(8, 8, 8, 0.72);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.login-hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border-radius: 34px;
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -18% -26% 12%;
  height: 42%;
  background: linear-gradient(90deg, rgba(255, 78, 0, 0.55), rgba(254, 206, 0, 0.42));
  filter: blur(70px);
  pointer-events: none;
}

.login-brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.login-brand-lockup img {
  width: min(260px, 44vw);
  height: auto;
  filter: drop-shadow(0 18px 38px rgba(255, 78, 0, 0.28));
}

.login-brand-lockup span {
  padding: 9px 13px;
  border-radius: 999px;
  color: #050505;
  background: #fece00;
  font-weight: 900;
  letter-spacing: 0;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 740px;
}

.login-copy h1 {
  margin: 18px 0;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.94;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.55;
}

.login-signal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  opacity: 0.76;
}

.login-signal-grid span {
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(254, 206, 0, 0.56), rgba(255, 78, 0, 0.12));
  box-shadow: 0 0 34px rgba(254, 206, 0, 0.12);
}

.login-signal-grid span:nth-child(2n) {
  transform: translateY(18px);
  background: linear-gradient(180deg, rgba(255, 78, 0, 0.5), rgba(254, 206, 0, 0.1));
}

.login-cards {
  display: grid;
  align-content: center;
  gap: 20px;
}

.login-card {
  border-radius: 28px;
  padding: clamp(22px, 4vw, 34px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.login-card:hover {
  transform: translateY(-4px);
  border-color: rgba(254, 206, 0, 0.36);
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(254, 206, 0, 0.08),
    0 0 44px rgba(255, 78, 0, 0.12);
}

.login-card h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: 0;
}

.login-card p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.48;
}

.login-mode-form {
  display: grid;
  gap: 14px;
}

.login-mode-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-mode-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 0 16px;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-mode-form input:focus {
  border-color: rgba(254, 206, 0, 0.7);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(254, 206, 0, 0.1);
}

.login-mode-form .button {
  min-height: 54px;
  border-radius: 18px;
  justify-content: center;
}

.syndic-portal {
  display: grid;
  gap: 20px;
}

.portal-intro {
  border-radius: 28px;
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-intro h2,
.portal-panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.portal-intro p {
  max-width: 760px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.65);
}

.portal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.portal-panel {
  border-radius: 26px;
  padding: 22px;
}

.portal-tv-list,
.portal-notice-list,
.portal-dimensions {
  display: grid;
  gap: 12px;
}

.portal-tv-card,
.portal-dimensions div,
.portal-notice-card {
  border: 1px solid rgba(254, 206, 0, 0.12);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
}

.portal-tv-card,
.portal-dimensions div {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.portal-tv-card strong,
.portal-dimensions strong,
.portal-notice-card strong {
  color: #fff;
}

.portal-tv-card span,
.portal-tv-card small,
.portal-dimensions span,
.portal-notice-card small {
  color: rgba(255, 255, 255, 0.6);
}

.portal-notice-card {
  overflow: hidden;
}

.portal-notice-line {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.portal-notice-line:hover {
  background: rgba(254, 206, 0, 0.06);
}

.portal-notice-line > span:first-child {
  display: grid;
  gap: 4px;
}

.portal-notice-detail {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

.portal-notice-detail p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.portal-form-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(254, 206, 0, 0.08);
  border: 1px solid rgba(254, 206, 0, 0.14);
}

.portal-form-note strong {
  color: #fece00;
}

.empty-state.small {
  min-height: auto;
  padding: 18px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 980px) {
  .login-landing,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .login-hero-panel {
    min-height: 460px;
  }

  .portal-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background:
      radial-gradient(circle at 18% 0%, rgba(254, 206, 0, 0.22), transparent 28rem),
      radial-gradient(circle at 100% 8%, rgba(255, 78, 0, 0.22), transparent 24rem),
      #050505;
  }

  .login-landing {
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .login-hero-panel {
    min-height: auto;
    border-radius: 24px;
    padding: 22px;
    gap: 36px;
  }

  .login-brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .login-brand-lockup img {
    width: min(220px, 72vw);
  }

  .login-copy h1 {
    margin: 12px 0;
    font-size: 40px;
    line-height: 0.98;
  }

  .login-copy p {
    font-size: 15px;
  }

  .login-signal-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .login-signal-grid span {
    height: 42px;
    border-radius: 14px;
  }

  .login-card {
    border-radius: 22px;
    padding: 20px;
  }

  .login-card h2 {
    font-size: 28px;
  }

  .login-mode-form input,
  .login-mode-form .button {
    min-height: 50px;
    border-radius: 16px;
  }

  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    display: block;
    min-height: 100svh;
    padding: 10px;
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 22px;
    overflow: visible;
  }

  .sidebar-toggle {
    display: none;
  }

  .side-logo,
  .admin-shell.is-sidebar-collapsed .side-logo {
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px 10px;
    pointer-events: auto;
    opacity: 1;
    transform: none;
  }

  .side-logo .brand-logo,
  .brand-logo {
    width: 132px;
  }

  .side-logo span {
    font-size: 10px;
  }

  .side-nav,
  .admin-shell.is-sidebar-collapsed .side-nav {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 4px;
    overflow-x: auto;
    pointer-events: auto;
    opacity: 1;
    transform: none;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .side-nav-item,
  .side-player-link {
    flex: 0 0 auto;
    grid-template-columns: 30px auto;
    min-height: 42px;
    padding: 5px 12px 5px 6px;
    border-radius: 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 11px;
  }

  .nav-icon svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-footer,
  .admin-shell.is-sidebar-collapsed .sidebar-footer {
    margin-top: 8px;
    pointer-events: auto;
    opacity: 1;
    transform: none;
  }

  .workspace {
    width: 100%;
  }

  .workspace-header {
    min-height: auto;
    margin-bottom: 10px;
    padding: 16px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }

  .workspace-title h1 {
    font-size: 30px;
    line-height: 1;
  }

  .workspace-title p {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.4;
  }

  .workspace-actions {
    width: 100%;
    display: flex;
    justify-content: stretch;
    gap: 8px;
  }

  .status-menu {
    width: 100%;
  }

  .status-trigger {
    width: 100%;
    justify-content: center;
  }

  .status-popover {
    position: fixed;
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(74svh, 560px);
    overflow: auto;
    border-radius: 22px;
  }

  .workspace-content,
  .dashboard-clean,
  .vertical-manager,
  .grid,
  .grid-2,
  .grid-3,
  .stats-grid,
  .overview-grid,
  .portal-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .home-hero,
  .detail-panel,
  .manager-list-panel,
  .preview-panel,
  .overview-card,
  .panel,
  .stat,
  .portal-panel,
  .portal-intro {
    border-radius: 22px;
  }

  .manager-list-panel,
  .vertical-list-panel,
  .detail-panel,
  .panel,
  .portal-panel {
    padding: 14px;
  }

  .manager-list-head,
  .vertical-list-head,
  .panel-header,
  .portal-intro {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }

  .manager-list-head .button,
  .vertical-list-head .button,
  .portal-intro .button,
  .panel-header .button {
    width: 100%;
    justify-content: center;
  }

  .tv-rows,
  .portal-notice-list {
    gap: 10px;
  }

  .tv-row-card,
  .portal-notice-card {
    border-radius: 18px;
    overflow: hidden;
  }

  .tv-row-line,
  .entity-row-line,
  .portal-notice-line {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 14px;
  }

  .tv-row-meta,
  .tv-row-meta.compact,
  .tv-row-code {
    grid-column: 1 / -1;
    align-items: start;
    justify-content: start;
    text-align: left;
  }

  .row-chevron {
    grid-row: 1;
    grid-column: 2;
  }

  .tv-row-main strong,
  .portal-notice-line strong {
    font-size: 15px;
  }

  .tv-row-details,
  .portal-notice-detail {
    padding: 0 14px 14px;
  }

  .tv-detail-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tv-row-actions,
  .form-actions,
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .button,
  .icon-button {
    min-height: 42px;
  }

  .form-grid,
  .layout-parts-grid,
  .checkbox-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .form-grid .span-2,
  .form-grid .span-3 {
    grid-column: auto;
  }

  .field input,
  .field select,
  .field textarea,
  .readonly-box {
    min-height: 48px;
    font-size: 16px;
  }

  .rich-toolbar {
    display: flex;
    flex-wrap: wrap;
  }

  .rich-control,
  .rich-control.wide,
  .rich-control.narrow {
    width: 100%;
  }

  .rich-surface {
    min-height: 160px;
    font-size: 18px !important;
  }

  .layout-parts-screen {
    height: 260px;
  }

  .layout-part-zone {
    padding: 10px;
    font-size: 13px;
  }

  .zone-heading {
    gap: 6px;
  }

  .dashboard-tv-preview,
  .dashboard-tv-preview.portrait,
  .dashboard-tv-preview.landscape,
  .frame-preview {
    width: min(100%, 280px);
    margin-inline: auto;
  }

  .editor-layer {
    align-items: stretch;
    justify-content: stretch;
    padding: 8px;
  }

  .editor-panel {
    width: 100%;
    max-width: none;
    height: calc(100svh - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 24px;
  }

  .editor-header {
    padding: 16px;
  }

  .editor-body {
    padding: 16px;
  }

  .portal-intro {
    padding: 18px;
  }

  .portal-intro h2,
  .manager-list-head h2,
  .vertical-list-head h2 {
    font-size: 24px;
    line-height: 1.05;
  }

  .portal-notice-line {
    grid-template-columns: 1fr auto;
  }

  .portal-notice-line .status-pill {
    grid-column: 1;
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .login-copy h1 {
    font-size: 34px;
  }

  .workspace-title h1 {
    font-size: 26px;
  }

  .side-nav-item,
  .side-player-link {
    font-size: 12px;
  }

  .manager-list-panel,
  .vertical-list-panel,
  .detail-panel,
  .panel,
  .portal-panel {
    padding: 12px;
  }

  .tv-row-line,
  .entity-row-line,
  .portal-notice-line {
    padding: 12px;
  }

  .dashboard-tv-preview,
  .dashboard-tv-preview.portrait,
  .dashboard-tv-preview.landscape,
  .frame-preview {
    width: min(100%, 230px);
  }
}

/* Minimal Verão interface pass: calmer, denser and consistent across desktop/mobile. */
body:not(.is-player) {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 78, 0, 0.18), transparent 360px),
    radial-gradient(circle at 100% 0%, rgba(254, 206, 0, 0.1), transparent 320px),
    #070707;
}

body:not(.is-player)::before {
  opacity: 0.18;
  background:
    linear-gradient(90deg, rgba(254, 206, 0, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: none;
}

.admin-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.admin-shell.is-sidebar-collapsed {
  grid-template-columns: 62px minmax(0, 1fr);
}

.sidebar,
.workspace-header,
.home-hero,
.detail-panel,
.manager-list-panel,
.preview-panel,
.overview-card,
.panel,
.stat,
.portal-panel,
.portal-intro,
.login-card,
.login-hero-panel {
  border-color: rgba(254, 206, 0, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(10, 10, 10, 0.86);
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.sidebar {
  top: 12px;
  height: calc(100vh - 24px);
  padding: 10px;
}

.side-logo {
  min-height: 82px;
  gap: 6px;
  padding: 6px 4px 10px;
}

.brand-logo {
  width: 140px;
}

.side-logo span,
.workspace-title span,
.eyebrow {
  letter-spacing: 0.04em;
}

.side-nav {
  gap: 4px;
  margin-top: 8px;
}

.side-nav-item,
.side-player-link {
  min-height: 42px;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.side-nav-item:hover,
.side-player-link:hover {
  transform: none;
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(254, 206, 0, 0.08);
}

.nav-icon svg {
  width: 16px;
  height: 16px;
}

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

.workspace-header {
  min-height: auto;
  margin-bottom: 12px;
  padding: 16px 18px;
}

.workspace-title h1 {
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1;
}

.workspace-title p {
  max-width: 640px;
  font-size: 13px;
  line-height: 1.45;
}

.workspace-content {
  gap: 12px;
}

.dashboard-clean,
.vertical-manager,
.grid,
.grid-2,
.grid-3,
.overview-grid,
.stats-grid {
  gap: 12px;
}

.detail-panel,
.manager-list-panel,
.preview-panel,
.panel,
.portal-panel {
  padding: 16px;
}

.manager-list-head,
.vertical-list-head,
.panel-header,
.detail-header {
  margin-bottom: 12px;
}

.manager-list-head h2,
.vertical-list-head h2,
.detail-header h2,
.panel-header h3,
.portal-intro h2 {
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.05;
}

.button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 13px;
}

.button.primary {
  background: #fece00;
  color: #0b0700;
  box-shadow: 0 8px 22px rgba(254, 206, 0, 0.16);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.status-trigger {
  min-height: 38px;
  border-radius: 12px;
}

.status-popover {
  border-radius: 16px;
}

.tv-row-card,
.portal-notice-card,
.portal-tv-card,
.portal-dimensions div,
.readonly-box,
.field input,
.field select,
.field textarea,
.rich-editor,
.layout-parts-editor,
.layout-parts-screen {
  border-radius: 14px;
}

.tv-row-line,
.entity-row-line,
.portal-notice-line {
  min-height: 62px;
  padding: 12px;
}

.tv-row-main strong,
.portal-notice-line strong {
  font-size: 14px;
}

.tv-row-main small,
.tv-row-meta small,
.tv-row-code,
.portal-notice-line small {
  font-size: 11px;
}

.tv-row-details,
.portal-notice-detail {
  padding: 0 12px 12px;
}

.tv-detail-strip {
  gap: 8px;
}

.field {
  gap: 6px;
}

.field label {
  font-size: 11px;
}

.field input,
.field select,
.field textarea,
.readonly-box {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 14px;
}

.form-grid,
.layout-parts-grid,
.checkbox-grid {
  gap: 10px;
}

.layout-parts-screen {
  height: 250px;
}

.dashboard-tv-preview.portrait,
.frame-preview {
  width: min(100%, 210px);
}

.dashboard-tv-preview.landscape {
  width: min(100%, 390px);
}

.dashboard-tv-preview,
.frame-preview {
  border-width: 9px;
  border-radius: 18px;
}

.preview-main,
.preview-secondary,
.preview-info {
  padding: 14px;
}

.editor-panel {
  width: min(60vw, 760px);
  border-radius: 22px;
}

.editor-header,
.editor-body {
  padding: 18px;
}

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

.login-hero-panel {
  min-height: 520px;
}

.login-copy h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.login-signal-grid span {
  height: 50px;
}

@media (min-width: 821px) {
  .vertical-manager {
    grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  }

  .workspace {
    max-width: 1480px;
  }

  .portal-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 820px) {
  body:not(.is-player) {
    background:
      radial-gradient(circle at 0% 0%, rgba(255, 78, 0, 0.16), transparent 230px),
      #070707;
  }

  body:not(.is-player)::before {
    display: none;
  }

  .login-landing {
    gap: 10px;
    padding: 10px;
  }

  .login-hero-panel {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
    gap: 20px;
  }

  .login-brand-lockup img {
    width: min(165px, 58vw);
  }

  .login-brand-lockup span {
    padding: 7px 10px;
    font-size: 11px;
  }

  .login-copy h1 {
    font-size: 30px;
    line-height: 1.02;
  }

  .login-copy p {
    font-size: 13px;
    line-height: 1.42;
  }

  .login-signal-grid {
    display: none;
  }

  .login-card {
    padding: 16px;
    border-radius: 18px;
  }

  .login-card h2 {
    font-size: 22px;
  }

  .login-card p {
    margin-bottom: 14px;
    font-size: 13px;
  }

  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    padding: 8px;
  }

  .sidebar {
    border-radius: 18px;
    padding: 8px;
    overflow: hidden;
  }

  .side-logo,
  .admin-shell.is-sidebar-collapsed .side-logo {
    padding: 2px 2px 8px;
  }

  .side-logo .brand-logo,
  .brand-logo {
    width: 116px;
  }

  .side-logo span {
    font-size: 9px;
  }

  .side-nav,
  .sidebar-footer,
  .admin-shell.is-sidebar-collapsed .side-nav,
  .admin-shell.is-sidebar-collapsed .sidebar-footer {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    pointer-events: auto;
    opacity: 1;
    transform: none;
  }

  .side-nav {
    margin-top: 4px;
    padding-bottom: 8px;
  }

  .sidebar-footer {
    margin-top: 4px;
    padding-top: 2px;
    padding-bottom: 4px;
  }

  .side-nav-item,
  .side-player-link {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 36px;
    grid-template-columns: 26px auto;
    gap: 6px;
    padding: 4px 10px 4px 5px;
    border-radius: 999px;
    font-size: 12px;
    scroll-snap-align: start;
  }

  .nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
  }

  .nav-icon svg {
    width: 14px;
    height: 14px;
  }

  .workspace-header {
    padding: 12px;
    border-radius: 18px;
    gap: 10px;
  }

  .workspace-title h1 {
    font-size: 23px;
  }

  .workspace-title p {
    display: none;
  }

  .workspace-actions {
    gap: 6px;
  }

  .status-trigger {
    min-height: 34px;
    font-size: 12px;
  }

  .status-popover {
    right: 8px;
    bottom: 8px;
    left: 8px;
    border-radius: 18px;
  }

  .workspace-content,
  .dashboard-clean,
  .vertical-manager,
  .grid,
  .grid-2,
  .grid-3,
  .overview-grid,
  .stats-grid,
  .portal-grid {
    gap: 8px;
  }

  .detail-panel,
  .manager-list-panel,
  .preview-panel,
  .panel,
  .portal-panel,
  .portal-intro {
    padding: 10px;
    border-radius: 16px;
  }

  .manager-list-head,
  .vertical-list-head,
  .panel-header,
  .detail-header,
  .portal-intro {
    gap: 8px;
    margin-bottom: 8px;
  }

  .manager-list-head h2,
  .vertical-list-head h2,
  .detail-header h2,
  .panel-header h3,
  .portal-intro h2 {
    font-size: 19px;
  }

  .button,
  .icon-button {
    min-height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }

  .tv-row-card,
  .portal-notice-card {
    border-radius: 14px;
  }

  .tv-row-line,
  .entity-row-line,
  .portal-notice-line {
    padding: 10px;
    gap: 6px;
  }

  .tv-row-main strong,
  .portal-notice-line strong {
    font-size: 13px;
  }

  .tv-row-details,
  .portal-notice-detail {
    padding: 0 10px 10px;
  }

  .detail-lead,
  .portal-notice-detail p {
    font-size: 12px;
    line-height: 1.35;
  }

  .field input,
  .field select,
  .field textarea,
  .readonly-box {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 14px;
  }

  .checkbox-line {
    min-height: 38px;
    padding: 8px 10px;
  }

  .layout-parts-screen {
    height: 210px;
  }

  .dashboard-tv-preview,
  .dashboard-tv-preview.portrait,
  .dashboard-tv-preview.landscape,
  .frame-preview {
    width: min(100%, 190px);
    border-width: 7px;
  }

  .preview-main,
  .preview-secondary,
  .preview-info {
    padding: 10px;
  }

  .editor-layer {
    padding: 6px;
  }

  .editor-panel {
    width: 100%;
    height: calc(100svh - 12px);
    max-height: calc(100svh - 12px);
    border-radius: 18px;
  }

  .editor-header,
  .editor-body {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  .login-copy h1 {
    font-size: 28px;
  }

  .side-nav-item,
  .side-player-link {
    font-size: 11px;
  }

  .workspace-title h1 {
    font-size: 21px;
  }

  .dashboard-tv-preview,
  .dashboard-tv-preview.portrait,
  .dashboard-tv-preview.landscape,
  .frame-preview {
    width: min(100%, 166px);
  }
}

/* Layout repair for wide management screens */
.workspace {
  width: 100%;
  max-width: none;
}

.workspace-content {
  width: 100%;
  min-width: 0;
}

.vertical-manager {
  width: 100%;
  min-width: 0;
}

@media (min-width: 1100px) {
  .vertical-manager {
    grid-template-columns: minmax(420px, 0.95fr) minmax(560px, 1.35fr);
    align-items: start;
  }

  .vertical-manager > .manager-list-panel:only-child,
  .vertical-manager > .vertical-list-panel:only-child {
    grid-column: 1 / -1;
  }

  .tvs-page-wide,
  .vertical-manager:has(.tv-inline-preview) {
    grid-template-columns: minmax(620px, 1fr);
  }
}

.manager-list-panel,
.vertical-list-panel,
.detail-panel,
.preview-panel,
.panel {
  min-width: 0;
  overflow: hidden;
}

.tv-rows {
  min-width: 0;
  padding: 10px;
}

.tv-row-card {
  min-width: 0;
}

.tv-row-line,
.entity-row-line {
  min-width: 0;
  grid-template-columns:
    minmax(190px, 1.55fr)
    minmax(150px, 1fr)
    minmax(120px, 0.7fr)
    minmax(140px, 0.75fr)
    30px;
  gap: 10px;
  padding: 12px;
}

.tv-row-main,
.tv-row-meta,
.tv-row-code,
.detail-item,
.delivery-item,
.live-screen-card {
  min-width: 0;
}

.tv-row-main strong,
.tv-row-main small,
.tv-row-meta strong,
.tv-row-meta small,
.tv-row-code,
.detail-item strong,
.detail-item span {
  overflow-wrap: anywhere;
  white-space: normal;
}

.tv-detail-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.detail-item {
  padding: 10px;
}

.detail-item span {
  font-size: 10px;
}

.detail-item strong {
  font-size: 12px;
  line-height: 1.25;
}

.tv-inline-preview {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(240px, 0.7fr);
  align-items: start;
  gap: 12px;
}

.tv-inline-preview .live-screen-card {
  max-width: none;
}

.delivery-panel,
.live-screen-card {
  width: 100%;
  border-radius: 16px;
}

.delivery-list {
  max-height: 280px;
  overflow: auto;
}

.delivery-item {
  grid-template-columns: 14px minmax(0, 1fr);
}

.delivery-item strong,
.delivery-item small {
  overflow-wrap: anywhere;
  white-space: normal;
}

.live-screen-image {
  width: min(100%, 260px);
  max-height: 460px;
  object-fit: contain;
  margin-inline: auto;
  border-radius: 12px;
}

.live-screen-card .button {
  width: 100%;
  justify-content: center;
}

@media (min-width: 1500px) {
  .tv-inline-preview {
    grid-template-columns: minmax(360px, 0.8fr) minmax(300px, 0.6fr);
  }

  .live-screen-image {
    width: min(100%, 300px);
  }
}

@media (max-width: 1180px) {
  .tv-row-line,
  .entity-row-line {
    grid-template-columns: 1fr auto;
  }

  .tv-row-meta,
  .tv-row-meta.compact,
  .tv-row-code {
    grid-column: 1 / -1;
  }

  .row-chevron {
    grid-column: 2;
    grid-row: 1;
  }

  .tv-inline-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .vertical-manager,
  .vertical-manager:has(.tv-inline-preview) {
    grid-template-columns: 1fr;
  }

  .tv-rows {
    padding: 6px;
  }

  .tv-row-line,
  .entity-row-line {
    grid-template-columns: minmax(0, 1fr) 26px;
    gap: 6px;
    padding: 9px;
  }

  .tv-row-main strong,
  .tv-row-meta strong {
    font-size: 12px;
  }

  .tv-row-main small,
  .tv-row-meta small,
  .tv-row-code {
    font-size: 10px;
  }

  .tv-row-details {
    gap: 8px;
    padding: 0 9px 9px;
  }

  .tv-detail-strip {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .detail-item {
    padding: 8px;
  }

  .detail-item strong {
    font-size: 11px;
  }

  .tv-row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .tv-row-actions .button,
  .tv-row-actions .icon-button {
    flex: 0 0 auto;
  }

  .delivery-list {
    max-height: 210px;
  }

  .live-screen-image {
    width: min(100%, 190px);
    max-height: 340px;
  }
}

@media (max-width: 430px) {
  .tv-detail-strip {
    grid-template-columns: 1fr;
  }

  .live-screen-image {
    width: min(100%, 160px);
  }
}

/* Compact client/building portal */
.admin-shell.is-building-portal {
  grid-template-columns: 210px minmax(0, 1fr);
}

.admin-shell.is-building-portal .sidebar {
  padding: 8px;
}

.admin-shell.is-building-portal .brand-logo {
  width: 120px;
}

.admin-shell.is-building-portal .side-logo {
  min-height: 70px;
}

.admin-shell.is-building-portal .side-nav-item,
.admin-shell.is-building-portal .side-player-link {
  min-height: 38px;
}

.admin-shell.is-building-portal .workspace-header {
  padding: 12px 16px;
  margin-bottom: 10px;
}

.admin-shell.is-building-portal .workspace-title h1 {
  font-size: clamp(26px, 2.7vw, 38px);
}

.admin-shell.is-building-portal .workspace-title p {
  margin-top: 4px;
  font-size: 12px;
}

.syndic-portal {
  gap: 10px;
}

.syndic-portal .portal-intro {
  min-height: 0;
  padding: 10px 14px;
  border-radius: 16px;
}

.syndic-portal .portal-intro h2 {
  font-size: clamp(18px, 1.7vw, 24px);
}

.syndic-portal .portal-intro p {
  max-width: 760px;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
}

.syndic-portal .portal-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 10px;
}

.syndic-portal .portal-panel {
  min-height: 0;
  padding: 12px;
  border-radius: 16px;
}

.syndic-portal .panel-header {
  min-height: 0;
  margin-bottom: 10px;
}

.syndic-portal .panel-header h3 {
  font-size: clamp(18px, 1.8vw, 24px);
}

.syndic-portal .portal-tv-list {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.syndic-portal .portal-tv-card,
.syndic-portal .portal-dimensions div,
.syndic-portal .portal-notice-card {
  border-radius: 12px;
}

.syndic-portal .portal-tv-card,
.syndic-portal .portal-dimensions div {
  gap: 2px;
  padding: 10px 12px;
}

.syndic-portal .portal-tv-card strong,
.syndic-portal .portal-dimensions strong {
  font-size: 14px;
}

.syndic-portal .portal-tv-card span,
.syndic-portal .portal-tv-card small,
.syndic-portal .portal-dimensions span {
  font-size: 11px;
  line-height: 1.25;
}

.syndic-portal .portal-dimensions {
  gap: 8px;
}

.syndic-portal .portal-notice-line {
  min-height: 52px;
  padding: 10px 12px;
}

.syndic-portal .empty-state.small {
  padding: 12px;
  font-size: 13px;
}

.portal-tv-checkboxes {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 8px;
}

.portal-tv-checkboxes .checkbox-line {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
}

@media (min-width: 1200px) {
  .syndic-portal {
    grid-template-columns: 1fr;
  }

  .syndic-portal .portal-panel:last-child {
    min-height: 150px;
  }
}

@media (max-width: 820px) {
  .syndic-portal {
    gap: 8px;
  }

  .syndic-portal .portal-intro {
    padding: 10px;
  }

  .syndic-portal .portal-intro h2 {
    font-size: 19px;
  }

  .syndic-portal .portal-intro p {
    display: none;
  }

  .syndic-portal .portal-grid,
  .syndic-portal .portal-tv-list,
  .portal-tv-checkboxes {
    grid-template-columns: 1fr !important;
  }

  .syndic-portal .portal-panel {
    padding: 10px;
  }

  .syndic-portal .panel-header h3 {
    font-size: 18px;
  }

  .syndic-portal .portal-tv-card,
  .syndic-portal .portal-dimensions div {
    padding: 8px 10px;
  }
}

/* Final mobile rescue: app-like, compact and no horizontal burst */
.admin-shell.is-building-portal .workspace-title p,
.admin-shell.is-building-portal .syndic-portal .portal-intro p {
  display: none;
}

.admin-shell.is-building-portal .syndic-portal .portal-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-shell.is-building-portal .syndic-portal .portal-intro .button {
  flex: 0 0 auto;
}

@media (min-width: 821px) {
  .admin-shell.is-building-portal .syndic-portal {
    gap: 8px;
  }

  .admin-shell.is-building-portal .portal-grid {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .admin-shell.is-building-portal .portal-panel {
    padding: 10px 12px;
  }

  .admin-shell.is-building-portal .portal-tv-card,
  .admin-shell.is-building-portal .portal-dimensions div {
    padding: 8px 10px;
  }

  .admin-shell.is-building-portal .portal-panel:last-child {
    min-height: 110px;
  }
}

@media (max-width: 767px) {
  html,
  body,
  #app {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  body:not(.is-player) {
    background: #070707 !important;
  }

  body:not(.is-player)::before {
    display: none !important;
  }

  body:not(.is-player) *,
  body:not(.is-player) *::before,
  body:not(.is-player) *::after {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .admin-shell,
  .admin-shell.is-sidebar-collapsed,
  .admin-shell.is-building-portal {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: 100svh !important;
    gap: 6px !important;
    padding: 6px !important;
  }

  .sidebar,
  .admin-shell.is-building-portal .sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 6px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .sidebar-toggle {
    display: none !important;
  }

  .side-logo,
  .admin-shell.is-sidebar-collapsed .side-logo,
  .admin-shell.is-building-portal .side-logo {
    display: flex !important;
    width: 100% !important;
    min-height: 34px !important;
    height: 34px !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 2px 4px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .side-logo .brand-logo,
  .brand-logo,
  .admin-shell.is-building-portal .brand-logo {
    width: 96px !important;
    max-height: 30px !important;
    object-fit: contain !important;
  }

  .side-logo span {
    display: none !important;
  }

  .side-nav,
  .sidebar-footer,
  .admin-shell.is-sidebar-collapsed .side-nav,
  .admin-shell.is-sidebar-collapsed .sidebar-footer {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 2px 0 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .side-nav::-webkit-scrollbar,
  .sidebar-footer::-webkit-scrollbar {
    display: none !important;
  }

  .side-nav-item,
  .side-player-link,
  .admin-shell.is-building-portal .side-nav-item,
  .admin-shell.is-building-portal .side-player-link {
    flex: 0 0 auto !important;
    display: inline-grid !important;
    grid-template-columns: 22px auto !important;
    min-width: max-content !important;
    width: auto !important;
    min-height: 30px !important;
    height: 30px !important;
    gap: 5px !important;
    padding: 3px 9px 3px 4px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .nav-icon {
    width: 22px !important;
    height: 22px !important;
    border-radius: 999px !important;
  }

  .nav-icon svg {
    width: 12px !important;
    height: 12px !important;
  }

  .workspace,
  .workspace-content {
    width: 100% !important;
  }

  .workspace-header,
  .admin-shell.is-building-portal .workspace-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: 100% !important;
    min-height: 0 !important;
    gap: 8px !important;
    margin: 0 0 6px !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .workspace-title span {
    display: none !important;
  }

  .workspace-title h1,
  .admin-shell.is-building-portal .workspace-title h1 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }

  .workspace-title p {
    display: none !important;
  }

  .workspace-actions {
    width: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  .status-menu {
    width: auto !important;
  }

  .status-trigger {
    width: auto !important;
    min-height: 30px !important;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
  }

  .status-popover {
    position: fixed !important;
    inset: auto 6px 6px 6px !important;
    width: auto !important;
    max-height: 70svh !important;
    overflow: auto !important;
    border-radius: 16px !important;
  }

  .workspace-content,
  .dashboard-clean,
  .vertical-manager,
  .manager-layout,
  .grid,
  .grid-2,
  .grid-3,
  .overview-grid,
  .stats-grid,
  .portal-grid,
  .syndic-portal,
  .syndic-portal .portal-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .home-hero,
  .detail-panel,
  .manager-list-panel,
  .vertical-list-panel,
  .preview-panel,
  .overview-card,
  .panel,
  .stat,
  .portal-panel,
  .portal-intro,
  .login-card,
  .login-hero-panel,
  .admin-shell.is-building-portal .portal-panel,
  .admin-shell.is-building-portal .syndic-portal .portal-intro {
    width: 100% !important;
    min-height: 0 !important;
    padding: 8px !important;
    border-radius: 14px !important;
  }

  .portal-intro,
  .admin-shell.is-building-portal .syndic-portal .portal-intro {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .portal-intro .eyebrow,
  .portal-intro p {
    display: none !important;
  }

  .portal-intro h2,
  .manager-list-head h2,
  .vertical-list-head h2,
  .panel-header h3,
  .detail-header h2,
  .admin-shell.is-building-portal .syndic-portal .portal-intro h2,
  .admin-shell.is-building-portal .panel-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  .manager-list-head,
  .vertical-list-head,
  .panel-header,
  .detail-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
  }

  .button,
  .icon-button,
  .portal-intro .button {
    min-height: 30px !important;
    height: auto !important;
    padding: 5px 9px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  .tv-rows,
  .portal-tv-list,
  .portal-notice-list,
  .portal-dimensions,
  .delivery-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px !important;
    padding: 0 !important;
  }

  .portal-dimensions div:nth-child(n + 2) {
    display: none !important;
  }

  .portal-tv-card,
  .portal-dimensions div,
  .portal-notice-card,
  .tv-row-card,
  .readonly-box,
  .detail-item,
  .delivery-item {
    padding: 7px 8px !important;
    border-radius: 10px !important;
  }

  .portal-tv-card strong,
  .portal-dimensions strong,
  .portal-notice-card strong,
  .tv-row-main strong,
  .tv-row-meta strong {
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  .portal-tv-card span,
  .portal-tv-card small,
  .portal-dimensions span,
  .portal-notice-card small,
  .tv-row-main small,
  .tv-row-meta small,
  .tv-row-code {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .portal-notice-line,
  .tv-row-line,
  .entity-row-line {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 24px !important;
    min-height: 0 !important;
    gap: 5px !important;
    padding: 7px 8px !important;
  }

  .status-pill,
  .tag {
    padding: 4px 7px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
  }

  .row-chevron {
    width: 24px !important;
    height: 24px !important;
  }

  .tv-row-meta,
  .tv-row-meta.compact,
  .tv-row-code {
    grid-column: 1 / -1 !important;
  }

  .tv-row-details,
  .portal-notice-detail {
    gap: 6px !important;
    padding: 0 8px 8px !important;
  }

  .tv-detail-strip,
  .detail-grid,
  .form-grid,
  .checkbox-grid,
  .portal-tv-checkboxes,
  .layout-parts-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .tv-row-actions,
  .form-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 3px !important;
  }

  .tv-row-actions > *,
  .form-actions > * {
    flex: 0 0 auto !important;
  }

  .field,
  .login-mode-form label {
    gap: 4px !important;
  }

  .field label,
  .login-mode-form label,
  .field-hint {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .field input,
  .field select,
  .field textarea,
  .login-mode-form input,
  .readonly-box {
    min-height: 34px !important;
    padding: 7px 8px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  textarea {
    min-height: 78px !important;
  }

  .editor-layer {
    padding: 4px !important;
  }

  .editor-panel {
    width: 100% !important;
    height: calc(100svh - 8px) !important;
    max-height: calc(100svh - 8px) !important;
    border-radius: 14px !important;
  }

  .editor-header,
  .editor-body {
    padding: 10px !important;
  }

  .editor-header h2 {
    font-size: 18px !important;
  }

  .dashboard-tv-preview,
  .dashboard-tv-preview.portrait,
  .dashboard-tv-preview.landscape,
  .frame-preview,
  .live-screen-image {
    width: min(100%, 150px) !important;
    max-height: 260px !important;
    border-width: 6px !important;
  }

  .layout-parts-screen {
    height: 160px !important;
  }

  .login-landing {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    padding: 6px !important;
  }

  .login-hero-panel {
    gap: 10px !important;
  }

  .login-brand-lockup img {
    width: 120px !important;
  }

  .login-copy h1,
  .login-card h2 {
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .login-copy p,
  .login-card p,
  .login-signal-grid {
    display: none !important;
  }
}

/* Mobile compact v2: operational screens, not desktop cards squeezed down */
@media (max-width: 767px) {
  body:not(.is-player),
  body:not(.is-player) button,
  body:not(.is-player) input,
  body:not(.is-player) select,
  body:not(.is-player) textarea {
    font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif !important;
    letter-spacing: 0 !important;
  }

  .admin-shell,
  .admin-shell.is-building-portal,
  .admin-shell.is-sidebar-collapsed {
    gap: 4px !important;
    padding: 5px !important;
  }

  .sidebar,
  .admin-shell.is-building-portal .sidebar {
    padding: 5px !important;
    border-radius: 12px !important;
  }

  .side-logo,
  .admin-shell.is-building-portal .side-logo {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
  }

  .side-logo .brand-logo,
  .brand-logo,
  .admin-shell.is-building-portal .brand-logo {
    width: 86px !important;
    max-height: 25px !important;
  }

  .side-nav,
  .sidebar-footer {
    gap: 4px !important;
    padding: 1px 0 4px !important;
  }

  .side-nav-item,
  .side-player-link,
  .admin-shell.is-building-portal .side-nav-item,
  .admin-shell.is-building-portal .side-player-link {
    min-height: 26px !important;
    height: 26px !important;
    grid-template-columns: 18px auto !important;
    gap: 4px !important;
    padding: 2px 7px 2px 3px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
  }

  .nav-icon {
    width: 18px !important;
    height: 18px !important;
  }

  .nav-icon svg {
    width: 10px !important;
    height: 10px !important;
  }

  .workspace-header,
  .admin-shell.is-building-portal .workspace-header {
    min-height: 32px !important;
    padding: 7px 8px !important;
    border-radius: 12px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .workspace-title h1,
  .admin-shell.is-building-portal .workspace-title h1 {
    font-family: Montserrat, system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  .status-trigger {
    min-height: 26px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
  }

  .status-dot {
    width: 7px !important;
    height: 7px !important;
  }

  .home-hero,
  .detail-panel,
  .manager-list-panel,
  .vertical-list-panel,
  .preview-panel,
  .overview-card,
  .panel,
  .stat,
  .portal-panel,
  .portal-intro,
  .login-card,
  .login-hero-panel,
  .admin-shell.is-building-portal .portal-panel,
  .admin-shell.is-building-portal .syndic-portal .portal-intro {
    padding: 7px !important;
    border-radius: 11px !important;
  }

  .workspace-content,
  .dashboard-clean,
  .vertical-manager,
  .manager-layout,
  .syndic-portal,
  .grid,
  .grid-2,
  .grid-3,
  .overview-grid,
  .stats-grid,
  .portal-grid {
    gap: 5px !important;
  }

  .manager-list-head,
  .vertical-list-head,
  .panel-header,
  .detail-header {
    min-height: 24px !important;
    gap: 6px !important;
    margin-bottom: 5px !important;
    padding: 0 !important;
  }

  .manager-list-head .eyebrow,
  .vertical-list-head .eyebrow,
  .detail-header .eyebrow,
  .panel-header .eyebrow {
    display: none !important;
  }

  .portal-intro h2,
  .manager-list-head h2,
  .vertical-list-head h2,
  .panel-header h3,
  .detail-header h2,
  .admin-shell.is-building-portal .syndic-portal .portal-intro h2,
  .admin-shell.is-building-portal .panel-header h3 {
    font-family: Montserrat, system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
  }

  .button,
  .icon-button,
  .portal-intro .button {
    min-height: 26px !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    font-weight: 900 !important;
  }

  .icon-button {
    width: 28px !important;
  }

  .portal-help-panel,
  .syndic-portal .portal-grid .portal-panel:nth-child(2) {
    display: none !important;
  }

  .portal-tv-list,
  .portal-notice-list,
  .portal-dimensions,
  .tv-rows,
  .linked-list {
    gap: 4px !important;
  }

  .portal-tv-card,
  .portal-notice-card,
  .tv-row-card,
  .linked-item {
    padding: 6px 7px !important;
    border-radius: 9px !important;
  }

  .portal-tv-card strong,
  .portal-notice-card strong,
  .tv-row-main strong,
  .tv-row-meta strong,
  .linked-item span,
  .linked-item strong {
    font-size: 11px !important;
    line-height: 1.12 !important;
  }

  .portal-tv-card span,
  .portal-tv-card small,
  .portal-notice-card small,
  .tv-row-main small,
  .tv-row-meta small,
  .tv-row-code,
  .linked-item strong {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }

  .portal-notice-line,
  .tv-row-line,
  .entity-row-line {
    padding: 6px !important;
    grid-template-columns: minmax(0, 1fr) 20px !important;
  }

  .row-chevron {
    width: 20px !important;
    height: 20px !important;
  }

  .row-chevron svg {
    width: 12px !important;
    height: 12px !important;
  }

  .status-pill,
  .tag {
    padding: 3px 6px !important;
    font-size: 9px !important;
  }

  .empty-state,
  .empty-state.small {
    min-height: 0 !important;
    padding: 8px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .detail-lead {
    margin: 0 0 6px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .detail-grid,
  .tv-detail-strip {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    border-top: 1px solid rgba(254, 206, 0, 0.12) !important;
  }

  .detail-item {
    display: grid !important;
    grid-template-columns: 112px minmax(0, 1fr) !important;
    align-items: baseline !important;
    gap: 8px !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .detail-item span,
  .detail-item strong {
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .detail-item span {
    color: rgba(255, 246, 223, 0.58) !important;
    font-weight: 800 !important;
  }

  .detail-item strong {
    color: #fff6df !important;
    font-weight: 900 !important;
    text-align: right !important;
  }

  .tv-row-actions,
  .detail-actions,
  .form-actions {
    display: flex !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
  }

  .tv-row-actions > *,
  .detail-actions > *,
  .form-actions > * {
    flex: 0 0 auto !important;
  }

  .editor-layer {
    padding: 3px !important;
  }

  .editor-panel {
    height: calc(100svh - 6px) !important;
    max-height: calc(100svh - 6px) !important;
    border-radius: 12px !important;
  }

  .editor-header {
    min-height: 42px !important;
    padding: 8px !important;
  }

  .editor-header span {
    font-size: 9px !important;
  }

  .editor-header h2 {
    font-family: Montserrat, system-ui, sans-serif !important;
    font-size: 15px !important;
    line-height: 1 !important;
  }

  .editor-body {
    padding: 8px !important;
  }

  .portal-form-note {
    display: none !important;
  }

  .syndic-notice-form .form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
  }

  .syndic-notice-form .span-2,
  .syndic-notice-form .field:has(textarea),
  .syndic-notice-form .field:has(.portal-tv-checkboxes) {
    grid-column: 1 / -1 !important;
  }

  .syndic-notice-form .field:has(.readonly-box) {
    display: none !important;
  }

  .field label,
  .login-mode-form label,
  .field-hint {
    margin: 0 !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
  }

  .field input,
  .field select,
  .field textarea,
  .login-mode-form input,
  .readonly-box {
    min-height: 30px !important;
    padding: 5px 7px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  .field textarea,
  textarea {
    min-height: 58px !important;
  }

  .portal-tv-checkboxes,
  .checkbox-grid {
    gap: 4px !important;
  }

  .portal-tv-checkboxes .checkbox-line,
  .checkbox-line {
    min-height: 28px !important;
    padding: 5px 7px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .checkbox-line input {
    width: 14px !important;
    height: 14px !important;
  }

  .login-landing {
    padding: 5px !important;
  }

  .login-hero-panel,
  .login-card {
    padding: 8px !important;
  }

  .login-brand-lockup img {
    width: 92px !important;
  }

  .login-copy h1,
  .login-card h2 {
    font-family: Montserrat, system-ui, sans-serif !important;
    font-size: 18px !important;
  }
}
