/* Roboto (fontes do proprio engine Flutter) para casar com o que o app Flutter
   renderiza na Android TV. Pesos naturais: 300/400/500/700/900. O navegador
   resolve os pesos usados que nao tem face propria (600 -> 700, 800 -> 900),
   igual ao matching do Flutter com o Roboto. */
@font-face {
  font-family: "Hospitality Roboto";
  src: url("../assets/fonts/Roboto-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Hospitality Roboto";
  src: url("../assets/fonts/Roboto-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Hospitality Roboto";
  src: url("../assets/fonts/Roboto-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Hospitality Roboto";
  src: url("../assets/fonts/Roboto-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Hospitality Roboto";
  src: url("../assets/fonts/Roboto-Black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --background: #020617;
  --background-soft: #071126;
  --surface: #101827;
  --surface-soft: rgba(255, 255, 255, 0.065);
  --surface-strong: rgba(2, 6, 23, 0.92);
  --primary: #4254d2;
  --primary-bright: #5871ff;
  --primary-soft: rgba(66, 84, 210, 0.28);
  --accent: #85b4ff;
  --danger: #c11c36;
  --success: #31c48d;
  --warning: #ffd166;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.52);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --focus: #c11c36;
  --menu-collapsed: 98px;
  --menu-expanded: 200px;
  --safe-x: 40px;
  --safe-y: 34px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--background);
  color: var(--text);
  font-family: "Hospitality Roboto", Roboto, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
}

body {
  min-width: 960px;
  min-height: 540px;
}

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

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-root {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: var(--background);
}

.boot-screen {
  position: fixed;
  z-index: 5000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020617;
  transition: opacity 180ms linear;
}

.boot-screen.is-ready {
  opacity: 0;
  pointer-events: none;
}

.boot-logo {
  width: 220px;
  max-height: 220px;
  object-fit: contain;
}

.boot-spinner {
  width: 32px;
  height: 32px;
  margin-top: 48px;
  border: 2.5px solid rgba(74, 127, 191, 0.22);
  border-top-color: #4a7fbf;
  border-radius: 50%;
  animation: spinner 780ms linear infinite;
}

.global-overlay {
  position: fixed;
  z-index: 4500;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.78);
}

.global-overlay p {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 24px;
}

.spinner {
  width: 64px;
  height: 64px;
  border: 6px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--primary-bright);
  border-radius: 50%;
  animation: spinner 780ms linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Overlay dedicado de abertura de app externo (Netflix, YouTube, ...). Mostra a
   identidade do proprio app — logo oficial ou iniciais no mesmo tile 1.6:1 da
   grade — o nome e um status com spinner, no lugar do overlay generico. Fica
   acima do global-overlay e abaixo de toast/boot. Sem gap em flex (Chrome 84):
   o ritmo usa margin. */
.app-launch {
  position: fixed;
  z-index: 4600;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.86);
}

.app-launch.is-hidden {
  display: none;
}

.app-launch-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 54px 72px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(16, 24, 39, 0.96), rgba(12, 21, 41, 0.96));
  box-shadow: var(--shadow);
}

.app-launch-tile {
  position: relative;
  width: 264px;
  height: 165px;
  overflow: hidden;
  border-radius: 16px;
  background: #151515;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.app-launch-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-launch-initials {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 2px;
}

.app-launch-name {
  margin: 32px 0 0;
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 34px;
  font-weight: 700;
  text-align: center;
}

.app-launch-status {
  margin-top: 22px;
  display: flex;
  align-items: center;
}

.app-launch-spinner {
  width: 30px;
  height: 30px;
  margin-right: 16px;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--primary-bright);
  border-radius: 50%;
  animation: spinner 780ms linear infinite;
}

.app-launch-status-text {
  color: var(--text-muted);
  font-size: 22px;
}

/* Erro de abertura de app: modal padrao do app (mesma identidade do overlay de
   loading — tile 1.6:1 com logo/iniciais) no lugar de um toast efemero. Cabecalho
   com icone + titulo espacado por margin (sem gap em flex). */
.modal-card.app-error-modal {
  width: 760px;
}

.app-error-head {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

.app-error-icon {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  height: 82px;
  margin-right: 26px;
  overflow: hidden;
  border-radius: 14px;
  background: #151515;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.app-error-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-error-initials {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
}

.app-error-head h2 {
  margin: 0;
  font-size: 34px;
}

.screen {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
}

.screen-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.screen-background::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.68);
  content: "";
}

.shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

.side-menu {
  position: relative;
  z-index: 50;
  width: var(--menu-collapsed);
  height: 100%;
  flex: 0 0 var(--menu-collapsed);
  padding: 22px 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-right: 0;
  background: #000000;
  transition: width 140ms linear, flex-basis 140ms linear;
}

.side-menu.is-expanded,
.side-menu:focus-within {
  width: var(--menu-expanded);
  flex-basis: var(--menu-expanded);
}

.menu-brand {
  display: none;
}

.menu-list {
  width: 100%;
  max-height: 100%;
  margin: auto 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

/* Item ocupa toda a largura da coluna (igual ao app Flutter): a caixa
   selecionada tem sempre o mesmo tamanho e preenche a coluna, sem vao preto na
   lateral. O realce e o fundo preenchido (sem borda/anel), como no Flutter. */
.menu-item {
  width: 100%;
  min-height: 61px;
  margin: 5px 0;
  /* Padding lateral enxuto (12px) para o rotulo caber inteiro na coluna de
     200px; "Espelhamento" e o rotulo mais longo e estourava com 18px. */
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: default;
}

/* Trilho recolhido: centraliza o icone na coluna estreita (rotulo fora do fluxo). */
.side-menu:not(.is-expanded):not(:focus-within) .menu-item {
  justify-content: center;
  padding: 0;
}

.side-menu:not(.is-expanded):not(:focus-within) .menu-item-label {
  display: none;
}

.menu-item img,
.menu-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: contain;
}

.menu-item-label {
  margin-left: 10px;
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 100ms linear;
}

.side-menu.is-expanded .menu-item-label,
.side-menu:focus-within .menu-item-label {
  opacity: 1;
}

.shell-main {
  position: relative;
  min-width: 0;
  height: 100%;
  flex: 1 1 auto;
  overflow: hidden;
}

.content-header {
  position: absolute;
  z-index: 60;
  top: 0;
  right: 0;
  left: 0;
  height: 132px;
  overflow: visible;
  pointer-events: none;
}

.header-corner {
  position: absolute;
  top: 0;
  left: 0;
  /* Um pouco maior que a logo (fundo em ~118px) para sobrar um acabamento
     abaixo dela; media entre as duas versoes testadas. */
  width: 303px;
  height: 129px;
}

.header-corner img {
  width: 303px;
  height: 129px;
  max-width: none;
  object-fit: fill;
  /* Fade do canto igual ao Flutter: corpo bem escuro (quase preto, colado na
     barra lateral) e clareia so na pontinha da curva. contrast segura o meio no
     preto; brightness levanta apenas o fim mais claro do PNG. */
  filter: brightness(3.2) contrast(2);
}

/* Logo do hotel dimensionada pela barra lateral (igual pedido): borda esquerda
   no fim do menu recolhido, borda direita no fim do menu expandido. Assim a
   largura = menu expandido - menu recolhido e cresce junto com o menu. */
.header-logo-wrap {
  position: absolute;
  top: 16px;
  left: var(--menu-collapsed);
  width: calc(var(--menu-expanded) - var(--menu-collapsed));
  height: calc(var(--menu-expanded) - var(--menu-collapsed));
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.22);
}

.header-logo {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.header-hotel-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.header-room {
  display: flex;
  align-items: center;
  color: #ffffff;
}

.header-room-icon {
  width: 38px;
  height: 38px;
  margin-right: 13px;
  object-fit: contain;
}

#header-clock {
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
}

.content-header h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 700;
}

.header-meta {
  position: absolute;
  top: 22px;
  right: 32px;
  display: flex;
  align-items: center;
  color: #ffffff;
  font-size: 28px;
}

/* Espacamentos proporcionais ao header ampliado (mesma razao do BaseHeader do
   Flutter: quarto->data ~16px, data->hora ~13px). */
.header-meta > * + * {
  margin-left: 16px;
}

.header-meta #header-clock {
  margin-left: 13px;
}

/* Home: apenas a logo do hotel no header (quarto/data/relogio ficam no proprio
   conteudo da Home), como no BaseHeader do Flutter com hasRoom=false. */
.content-header.is-logo-only .header-meta {
  display: none;
}

.content-scroll {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* padding-top livra a logo ampliada do header (fundo em ~118px). */
  padding: 138px 52px 56px;
  overflow: hidden;
}

.content-scroll.is-full-bleed,
.shell-main.is-full-bleed .content-scroll {
  padding: 0;
}

.content-scroll.is-scrollable {
  overflow-y: auto;
}

.hero-title {
  margin: 0;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.08;
}

.hero-subtitle {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 26px;
  line-height: 1.4;
}

.section-title {
  margin: 0 0 22px;
  font-size: 30px;
  font-weight: 700;
}

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

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

.content-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.content-card-image {
  width: 100%;
  height: 165px;
  object-fit: cover;
  background: #101827;
}

.content-card-copy {
  padding: 18px 20px 20px;
}

.content-card-title {
  margin: 0;
  overflow: hidden;
  font-size: 23px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-card-subtitle {
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-row {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.chip-row > * + * {
  margin-left: 14px;
}

.chip {
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 19px;
  font-weight: 600;
  white-space: nowrap;
}

.chip.is-selected {
  background: var(--primary);
  color: #ffffff;
}

[data-focusable="true"] {
  outline: none;
}

[data-focusable="true"].is-focused,
[data-focusable="true"]:focus {
  z-index: 10;
  border-color: var(--focus) !important;
  box-shadow: 0 0 0 4px rgba(193, 28, 54, 0.62), 0 18px 46px rgba(0, 0, 0, 0.46);
  transform: scale(1.035);
}

/* Realce do menu = fundo preenchido, sem borda vermelha nem anel (igual foto do
   Flutter). Sobrepoe a regra global de foco que desenha borda + box-shadow. */
.menu-item.is-selected,
.menu-item.is-focused,
.menu-item:focus {
  background: rgba(193, 28, 54, 0.2);
  border-color: transparent !important;
  box-shadow: none !important;
  color: #ffffff;
  transform: none;
}

.empty-state,
.error-state {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.fatal-screen {
  background: #020617;
}

.fatal-wallpaper,
.fatal-shade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.fatal-wallpaper {
  background: #020617 url("../assets/images/hospitality-wallpaper.png") center/cover no-repeat;
}

.fatal-shade {
  background: rgba(0, 0, 0, 0.85);
}

.fatal-screen .error-state {
  position: relative;
  z-index: 2;
  width: 760px;
  margin: 0 auto;
  align-items: flex-start;
  text-align: left;
}

.fatal-footer {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 0;
  font-size: 38px;
}

.empty-state p,
.error-state p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1.45;
}

.primary-button,
.secondary-button {
  min-height: 64px;
  padding: 0 30px;
  border: 3px solid transparent;
  border-radius: 14px;
  font-size: 21px;
  font-weight: 700;
}

.primary-button {
  background: var(--primary);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.1);
}

.modal-root {
  position: fixed;
  z-index: 3000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.modal-root.has-modal {
  pointer-events: auto;
}

.modal-backdrop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
}

.modal-card {
  width: 880px;
  max-height: 82vh;
  padding: 40px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background: #0c1529;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0 0 18px;
  font-size: 36px;
}

.notification-popup-root {
  position: fixed;
  z-index: 2900;
  top: 6vh;
  right: 24px;
  width: 40vw;
  max-width: 600px;
  min-width: 280px;
  pointer-events: none;
}

.notification-popup {
  max-height: 25vh;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  border: 2px solid rgba(193, 28, 54, 0.6);
  border-radius: 12px;
  background: #212121;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-110%);
  transition: opacity 500ms ease-out, transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.notification-popup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.notification-popup.is-leaving {
  opacity: 0;
  transform: translateY(-110%);
  transition-duration: 400ms;
}

.notification-popup-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  object-fit: cover;
}

.notification-popup-copy {
  min-width: 0;
  margin-left: 12px;
}

.notification-popup-copy strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-popup-copy p {
  margin: 6px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: #d6d6d6;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.network-gate {
  position: fixed;
  z-index: 5500;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: #000;
}

.network-gate-wallpaper,
.network-gate-shade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.network-gate-wallpaper {
  /* Arte Infinity Media (mesma da tela de ativacao) como fundo, espelhando a
     ErrorScreenScaffold do Flutter. Segunda url e fallback: se o arquivo novo
     faltar, a camada 404 fica transparente e revela o wallpaper antigo; a cor
     #020617 e a base quando nenhuma imagem carrega (ex.: TV offline). */
  background:
    url("../assets/images/background_activation.jpg") center/cover no-repeat,
    url("../assets/images/hospitality-wallpaper.png") center/cover no-repeat,
    #020617;
}

.network-gate-shade {
  /* Escurece a arte o bastante para o texto/wordmark dela recuar a um fundo de
     marca sutil, sem competir com o conteudo branco centralizado da tela. Entre
     o 0.85 da ErrorScreenScaffold do Flutter e a arte cheia da ativacao. */
  background: rgba(2, 6, 23, 0.72);
}

.network-gate-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 760px;
  max-height: calc(100% - 130px);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.network-gate-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
}

.network-gate-content h1 {
  margin: 28px 0 14px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.15;
}

.network-gate-content > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 24px;
  line-height: 1.3;
}

.network-gate-content .network-gate-countdown {
  margin-top: 16px;
  color: #fff;
  font-weight: 500;
}

.network-gate-content .network-gate-code {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.7);
}

.network-gate-help {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 22px;
}

.network-gate-help p,
.network-gate-help ul {
  margin: 0;
}

.network-gate-help ul {
  margin-top: 10px;
  padding-left: 26px;
}

.network-gate-help li {
  margin-top: 8px;
}

.network-gate-retry {
  min-width: 250px;
  height: 58px;
  margin-top: 24px;
  padding: 0 28px;
  border: 3px solid transparent;
  border-radius: 14px;
  background: #fff;
  color: #000;
  font-size: 20px;
  font-weight: 700;
}

.network-gate-retry:focus {
  border-color: #85b4ff;
  outline: 0;
  box-shadow: 0 0 0 7px rgba(133, 180, 255, 0.24);
}

.network-gate-content .network-gate-hint {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 17px;
}

.network-gate-footer {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  text-align: center;
}

.toast-root {
  position: fixed;
  z-index: 5200;
  right: 44px;
  bottom: 44px;
  width: 520px;
}

.toast {
  margin-top: 14px;
  padding: 20px 24px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(12, 21, 41, 0.97);
  box-shadow: var(--shadow);
  font-size: 18px;
}

.diagnostic-badge {
  position: fixed;
  z-index: 6000;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.78);
  color: #9de7c6;
  font: 14px monospace;
  pointer-events: none;
}

/* A TV e sempre 16:9, mas a viewport CSS varia por firmware: a LG
   43US660H0SD entrega 1600x900 e o headless roda 1920x1080. Por isso o ritmo
   vertical e a tipografia desta tela ficam em vh e as larguras em vw/fr: tudo
   escala junto e o layout cabe igual nos dois tamanhos, sem breakpoint.
   vh/vw sao seguros no Chrome 68; clamp(), aspect-ratio e gap em flex nao sao. */
.activation-screen {
  padding: 3.4vh 2.1vw;
  background:
    radial-gradient(circle at 55% 42%, rgba(25, 52, 100, 0.34), transparent 35%),
    #020617;
}

/* O rodape e a segunda linha do grid, nao um absolute sobre o conteudo: assim
   ele reserva a propria altura em vez de o painel adivinhar 112px e ainda
   cobrir o conteudo. A linha de conteudo usa minmax(0, 1fr) — com 1fr o
   conteudo empurraria o rodape para fora do painel. */
.activation-panel {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 3.8vh 2.3vw;
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 0.9fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-gap: 2.4vh 2.4vw;
  gap: 2.4vh 2.4vw;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 4.6vh;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.24), rgba(10, 29, 44, 0.2));
}

/* O PCBR/PBRM do modo Pro:Centric HTML recebe uma primeira tela de uma coluna,
   sem SVG/QR e sem depender do grid de duas colunas. */
.activation-screen.runtime-pcbr .activation-panel {
  display: block;
}

.activation-screen.runtime-pcbr .activation-copy {
  width: 68%;
  height: 100%;
}

.activation-screen.runtime-pcbr .activation-code-card {
  width: 100%;
}

.activation-screen.runtime-pcbr .activation-footer {
  position: absolute;
  right: 2.3vw;
  bottom: 2vh;
  left: 2.3vw;
}

/* QR opt-in no PCBR/PBRM (config pcbrQr): card compacto à direita, no espaço
   livre ao lado da coluna de 68%, fora do header fixo e do rodapé. Só aparece
   quando o QR é habilitado; por padrão a coluna única segue sem QR. */
.activation-screen.runtime-pcbr .activation-qr-card {
  position: absolute;
  top: 21vh;
  right: 3vw;
  width: 30%;
  max-width: 34vh;
  padding: 2vh 1.1vw;
  border-radius: 2.4vh;
}

.activation-screen.runtime-pcbr .activation-qr,
.activation-screen.runtime-pcbr .activation-qr-placeholder {
  width: 26vh;
  height: 26vh;
}

.activation-screen.runtime-pcbr .activation-qr-card h2 {
  margin: 1.6vh 0 0.8vh;
  font-size: 2.2vh;
}

.activation-screen.runtime-pcbr .activation-qr-card p {
  font-size: 1.7vh;
}

.activation-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.activation-badge {
  display: inline-flex;
  min-height: 5.2vh;
  padding: 0 1.5vw;
  align-items: center;
  border: 2px solid rgba(133, 180, 255, 0.55);
  border-radius: 999px;
  background: rgba(47, 125, 250, 0.22);
  font-size: 2vh;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.activation-title {
  margin: 2.4vh 0 2vh;
  font-size: 6vh;
  font-weight: 700;
  line-height: 1.08;
}

.activation-message {
  margin: 0 0 2.8vh;
  color: var(--text-muted);
  font-size: 2.6vh;
  line-height: 1.35;
}

.activation-code-card {
  width: 82%;
  /* Empurra o cartao para baixo do wordmark "Infinity Media" da arte de fundo,
     que fica centralizado na faixa vertical do conteudo. Fundo mais opaco para
     o codigo permanecer legivel sobre a arte. */
  margin-top: 22vh;
  padding: 2.4vh 1.6vw;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 2.8vh;
  background: rgba(2, 6, 23, 0.5);
}

.activation-code-label {
  color: var(--text-muted);
  font-size: 2.1vh;
}

.activation-code {
  margin-top: 1.1vh;
  font-size: 5.5vh;
  font-weight: 800;
  letter-spacing: 0.7vh;
}

/* Dois tiles (MODELO, FABRICANTE) com icone a esquerda, igual ao Flutter
   (device_activation_screen): Row(Icon + Column[label, value]) em duas colunas. */
.activation-metadata {
  width: 100%;
  margin-top: 1.4vh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 1vw;
  gap: 1vw;
}

.activation-meta {
  min-height: 7vh;
  padding: 1vh 1.1vw;
  display: flex;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 2vh;
  background: rgba(255, 255, 255, 0.06);
}

/* gap em flex so existe do Chrome 84; a TV roda Chrome 68 -> margin no icone. */
.activation-meta-icon {
  flex: 0 0 auto;
  width: 3vh;
  height: 3vh;
  margin-right: 0.8vw;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.72);
}

.activation-meta-glyph {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activation-meta-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.activation-meta-label {
  color: var(--text-muted);
  font-size: 1.8vh;
  font-weight: 700;
}

.activation-meta-value {
  margin-top: 0.6vh;
  overflow: hidden;
  font-size: 2.3vh;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activation-qr-card {
  align-self: center;
  padding: 3vh 1.6vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 3.8vh;
  background: #ffffff;
  color: #1b1b1b;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.activation-qr {
  width: 40vh;
  height: 40vh;
  object-fit: contain;
  image-rendering: pixelated;
}

.activation-qr-placeholder {
  width: 40vh;
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.8vh solid #111111;
  background: repeating-linear-gradient(45deg, #111 0, #111 18px, #fff 18px, #fff 36px);
  color: transparent;
}

.activation-qr-card h2 {
  margin: 2.6vh 0 1.2vh;
  font-size: 2.9vh;
}

.activation-qr-card p {
  margin: 0;
  color: #747474;
  font-size: 2vh;
  line-height: 1.45;
}

.activation-footer {
  grid-column: 1 / -1;
  min-height: 5.2vh;
  padding-top: 1.4vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 1.9vh;
}
