* {
  box-sizing: border-box;
}

.state-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.state-choice {
  position: relative;
  display: flex;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
}

.state-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.state-choice span {
  display: grid;
  gap: 3px;
}

.state-choice strong {
  font-size: 1.05rem;
}

.state-choice small {
  color: var(--muted);
}

.state-choice:has(input:checked) {
  border-color: var(--red);
  background: rgba(229, 9, 20, .13);
  box-shadow: inset 0 0 0 1px rgba(229, 9, 20, .25);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f3f4f6;
  color: #111827;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 218px;
  background: #111827;
  color: #fff;
  padding: 24px 18px;
}

.sidebar h1 {
  margin: 0 0 28px;
  font-size: 22px;
}

.sidebar nav {
  display: grid;
  gap: 10px;
}

.sidebar a {
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
}

.sidebar a:hover {
  background: #1f2937;
}

.content {
  margin-left: 218px;
  width: calc(100vw - 218px);
  min-height: 100vh;
  padding: 42px 28px;
  overflow-x: hidden;
}

.top,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

h3 {
  margin: 0 0 10px;
}

.muted {
  color: #6b7280;
  margin: 0;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  max-width: 100%;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

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

.dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.metric span {
  display: block;
  color: #6b7280;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 28px;
}

.metric small {
  display: block;
  margin-top: 8px;
}

.code-strong {
  font-size: 17px !important;
}

.form-card {
  max-width: 860px;
}

label {
  display: block;
  font-weight: 700;
  margin: 14px 0 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
}

textarea {
  resize: vertical;
}

small {
  color: #6b7280;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.check input {
  width: auto;
}

.row-check {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.row-check span {
  display: grid;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: #334155;
}

.btn.ghost {
  background: #e5e7eb;
  color: #111827;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.mt {
  margin-top: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.actions {
  white-space: nowrap;
}

.actions a,
.inline-form button {
  margin-right: 10px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  min-width: max-content;
}

/* Central de Operação: estilos isolados do player e das telas existentes. */
.operation-top { align-items: center; }
.operation-clock { min-width: 210px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: right; }
.operation-clock span, .operation-clock small { display: block; color: var(--muted); font-size: 11px; }
.operation-clock strong { display: block; margin: 2px 0; color: #fff; font-size: 26px; font-variant-numeric: tabular-nums; }
.operation-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.operation-metric { min-height: 128px; border-top: 3px solid #555; }
.operation-metric > span, .operation-metric small { display: block; color: var(--muted); font-size: 11px; }
.operation-metric strong { display: block; margin: 12px 0 8px; color: #fff; font-size: 18px; }
.operation-metric.is-live { border-top-color: #2ecc71; }
.operation-metric.has-alert { border-top-color: #ffb020; }
.operation-guide-card { padding: 0; overflow: hidden; }
.operation-guide-head { padding: 22px 22px 0; }
.operation-actions { display: flex; gap: 8px; }
.operation-days { display: flex; gap: 6px; padding: 18px 22px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.operation-days a { min-width: 90px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); text-align: center; text-decoration: none; }
.operation-days a span, .operation-days a strong { display: block; text-transform: capitalize; }
.operation-days a.active { border-color: var(--red); background: rgba(229, 9, 20, .15); color: #fff; }
.operation-scroll { overflow-x: auto; padding-bottom: 8px; }
.operation-timeline { position: relative; min-width: 1680px; padding-top: 42px; }
.operation-hours { position: absolute; inset: 0 0 auto 150px; height: 42px; background: #0c0c0c; }
.operation-hours span { position: absolute; top: 14px; padding-left: 5px; border-left: 1px solid #3b3b3b; color: #999; font-size: 10px; }
.operation-lane { display: grid; grid-template-columns: 150px 1fr; min-height: 116px; border-top: 1px solid var(--line); }
.operation-lane-label { position: sticky; left: 0; z-index: 8; display: flex; flex-direction: column; justify-content: center; padding: 18px; border-right: 1px solid var(--line); background: #121212; }
.operation-lane-label small { margin-top: 5px; color: var(--muted); }
.operation-track { position: relative; background-image: linear-gradient(to right, rgba(255,255,255,.075) 1px, transparent 1px); background-size: calc(100% / 24) 100%; }
.operation-block { position: absolute; inset-block: 10px; z-index: 3; min-width: 12px; padding: 10px 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; color: #fff; }
.operation-block span, .operation-block strong, .operation-block small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operation-block span, .operation-block small { color: rgba(255,255,255,.7); font-size: 10px; }
.operation-block strong { margin: 6px 0; font-size: 12px; }
.global-block { background: linear-gradient(135deg, #263b52, #172636); }
.ad-block { min-width: 16px; padding-inline: 6px; background: linear-gradient(135deg, #a8262e, #64151a); }
.operation-empty { padding: 45px 20px; color: var(--muted); }
.operation-now-wrap { position: absolute; inset: 30px 0 0 150px; z-index: 7; pointer-events: none; }
.operation-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #ffb020; pointer-events: none; }
.operation-now b { position: absolute; top: 0; left: 50%; padding: 3px 6px; border-radius: 4px; background: #ffb020; color: #111; font-size: 9px; transform: translate(-50%, -100%); }
.operation-alerts { margin-top: 20px; }
@media (max-width: 1100px) { .operation-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .operation-metrics { grid-template-columns: 1fr; } .operation-top { align-items: stretch; } .operation-clock { text-align: left; } .operation-actions { flex-direction: column; } }

/* Células de tabela precisam preservar o algoritmo nativo de linhas.
   Aplicar flex diretamente no <th>/<td> separa a coluna Ações da altura da linha. */
th.actions,
td.actions {
  display: table-cell;
  vertical-align: top;
}

td.actions .inline-form {
  display: inline-block;
  margin-left: 8px;
}

.table-btn {
  width: auto;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  margin: 0 !important;
  text-decoration: none;
}

.table-btn.danger {
  background: #dc2626;
  color: #fff;
}

.table-btn.success {
  background: #16a34a;
  color: #fff;
}

.table-btn.campaign {
  background: #15803d;
  color: #fff;
}

.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 30px;
  margin: 0 !important;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e5e7eb;
  color: #111827;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

.actions .inline-form button:not(.table-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 30px;
  margin: 0 !important;
  padding: 6px 10px;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}

a {
  color: #1d4ed8;
}

.tag,
code {
  background: #eef2ff;
  color: #3730a3;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.filters {
  display: flex;
  align-items: end;
  gap: 12px;
}

.filters > div {
  min-width: 220px;
}

.inline-form {
  display: inline;
}

.inline-form button:not(.table-btn),
.link-danger {
  background: transparent;
  color: #b91c1c;
  padding: 0;
  text-decoration: underline;
}

.link-action {
  background: transparent;
  color: #1d4ed8;
  padding: 0;
  text-decoration: underline;
}

.row-action {
  margin-left: auto;
}

.inline-add {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inline-add select {
  flex: 1;
}

.flash-area {
  margin-bottom: 18px;
}

.flash {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
}

.flash-danger {
  background: #fee2e2;
  color: #991b1b;
}

.flash-warning {
  background: #fef3c7;
  color: #92400e;
}

.flash-info {
  background: #dbeafe;
  color: #1e40af;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
  }

  .content {
    margin-left: 0;
    padding: 24px 14px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .top,
  .section-head,
  .inline-add,
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
}


/* Login */
.login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 35%),
    linear-gradient(135deg, #111827, #1f2937);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 34px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.login-brand h1 {
  margin: 0;
  font-size: 27px;
  color: #111827;
}

.login-brand p {
  margin: 8px 0 0;
  color: #6b7280;
}

.login-form label {
  margin-top: 16px;
}

.login-btn {
  width: 100%;
  margin-top: 22px;
  padding: 13px 18px;
  font-size: 16px;
}

.login-help {
  margin: 18px 0 0;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}


.youtube-options {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
}

.youtube-options h3 {
  margin: 0 0 12px;
}

.option-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.option-card {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}

.option-card span {
  display: grid;
  gap: 4px;
}


/* Hotfix responsivo — evita que tabelas e cards fiquem por baixo do menu lateral */
.content > .card,
.content > section.card {
  overflow-x: auto;
}

.content img,
.content video,
.content iframe {
  max-width: 100%;
}

td,
th {
  max-width: 360px;
}

td small {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  min-width: 150px;
}

.form-card {
  width: min(860px, 100%);
}

.top {
  min-width: 0;
}

.top > div {
  min-width: 0;
}

.top h2 {
  overflow-wrap: anywhere;
}

.filters {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  td,
  th {
    max-width: 280px;
  }

  td small {
    max-width: 260px;
  }
}

@media (max-width: 900px) {
  body {
    overflow-x: hidden;
  }

  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
  }

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

  .content {
    margin-left: 0;
    width: 100%;
    padding: 24px 14px;
    overflow-x: hidden;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .top,
  .section-head,
  .inline-add,
  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .button-row {
    width: 100%;
  }

  .button-row .btn {
    flex: 1;
  }

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

  table {
    min-width: 760px;
  }
}

@media (max-width: 520px) {
  .sidebar nav {
    grid-template-columns: 1fr 1fr;
  }

  .login-page {
    padding: 18px;
  }

  .login-card {
    padding: 24px;
  }

  h2 {
    font-size: 23px;
  }

  .btn,
  button {
    width: 100%;
  }

  table {
    min-width: 700px;
  }
}

.logout-link {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

/* Identidade oficial BaffiFlix */
.brand {
  display: block;
}

.brand-logo {
  display: block;
  width: 154px;
  height: auto;
  object-fit: contain;
}

.mobile-brand-logo {
  display: block;
  width: 128px;
  height: auto;
  object-fit: contain;
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 26px;
  text-align: center;
}

.login-brand-logo {
  display: block;
  width: min(280px, 82%);
  height: auto;
  object-fit: contain;
}

.login-brand p {
  margin: 0;
}

@media (max-width: 900px) {
  .mobile-brand-logo {
    width: 120px;
  }
}

/* Coleções operacionais */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entity-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}

.entity-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.entity-main {
  display: block;
  color: inherit;
  text-decoration: none;
}

.entity-cover {
  position: relative;
  display: grid;
  place-items: center;
  height: 112px;
  overflow: hidden;
}

.client-cover {
  background:
    radial-gradient(circle at 70% 20%, rgba(229, 9, 20, .34), transparent 38%),
    linear-gradient(135deg, #252525, #101010);
}

.client-cover > span:first-child {
  color: rgba(255, 255, 255, .12);
  font-size: 70px;
  font-weight: 900;
  line-height: 1;
}

.advertiser-cover {
  justify-content: start;
  padding-left: 22px;
  background:
    radial-gradient(circle at 20% 100%, rgba(229, 9, 20, .28), transparent 42%),
    linear-gradient(145deg, #2a2a2a, #101010);
}

.advertiser-cover > span:first-child {
  color: rgba(255, 255, 255, .15);
  font-size: 64px;
  font-weight: 900;
}

.entity-count {
  position: absolute;
  right: 18px;
  display: grid;
  color: #fff;
  text-align: center;
}

.entity-count strong {
  font-size: 23px;
}

.entity-count small {
  color: #777;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 2px solid #323232;
  border-radius: 50%;
  background: #666;
}

.entity-cover .status-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
}

.status-dot.online {
  border-color: #163a27;
  background: var(--green);
  box-shadow: 0 0 12px rgba(45, 213, 115, .45);
}

.entity-body {
  padding: 17px 18px;
}

.entity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.entity-heading h3 {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-body p {
  margin: 7px 0 2px;
  color: #aaa;
  font-size: 13px;
}

.entity-body small {
  font-size: 11px;
}

.entity-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 9px 18px;
  border-top: 1px solid var(--line);
}

.icon-action {
  color: #777;
  font-size: 11px;
  text-decoration: none;
}

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

.screen-preview {
  position: relative;
  display: grid;
  place-items: center;
  height: 160px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, .48)),
    radial-gradient(circle at 70% 30%, #7d0910, transparent 32%),
    linear-gradient(145deg, #282828, #0c0c0c);
  color: #fff;
  text-decoration: none;
}

.screen-preview::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 5px;
}

.play-symbol {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding-left: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #090909;
  font-size: 14px;
  transition: transform .2s ease;
}

.screen-preview:hover .play-symbol {
  transform: scale(1.12);
}

.screen-format {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 16px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .66);
  color: #bbb;
  font-size: 9px;
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, .018);
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: rgba(229, 9, 20, .12);
  color: var(--red);
}

.empty-state h3 {
  margin-bottom: 4px;
}

.empty-state p {
  max-width: 420px;
  margin: 0 0 20px;
  color: var(--muted);
}

/* Formulários guiados */
.form-card {
  max-width: 980px;
  padding: 0;
}

.form-section {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(300px, 1.5fr);
  gap: 36px;
  padding: 30px;
  border-bottom: 1px solid var(--line);
}

.form-section-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.form-section-copy > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: rgba(229, 9, 20, .14);
  color: #ff6970;
  font-size: 11px;
  font-weight: 900;
}

.form-section-copy h3 {
  margin: 1px 0 4px;
  font-size: 15px;
}

.form-section-copy p {
  margin: 0;
  color: #777;
  font-size: 11px;
}

.form-fields > label:first-child,
.form-fields > .grid-2:first-child label {
  margin-top: 0;
}

label em {
  color: #777;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 42px;
  height: 23px;
  flex: 0 0 42px;
  border-radius: 99px;
  background: #404040;
  transition: background .2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ddd;
  transition: transform .2s ease;
}

.switch-row input:checked + .switch {
  background: var(--red);
}

.switch-row input:checked + .switch::after {
  transform: translateX(19px);
  background: #fff;
}

.switch-row > span:last-child {
  display: grid;
}

.switch-row small {
  font-weight: 400;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 30px;
  border-radius: 0 0 12px 12px;
  background: rgba(20, 20, 20, .94);
  backdrop-filter: blur(14px);
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.visual-choice {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 145px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
}

.visual-choice input {
  position: absolute;
  opacity: 0;
}

.visual-choice:has(input:checked) {
  border-color: var(--red);
  background: rgba(229, 9, 20, .07);
  box-shadow: inset 0 0 0 1px rgba(229, 9, 20, .2);
}

.visual-choice strong {
  margin-top: 10px;
  font-size: 13px;
}

.visual-choice small {
  font-size: 10px;
  font-weight: 400;
}

.format-icon {
  display: block;
  border: 2px solid #777;
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px #151515;
}

.format-icon.horizontal {
  width: 55px;
  height: 32px;
}

.format-icon.vertical {
  width: 28px;
  height: 50px;
}

.visual-choice:has(input:checked) .format-icon {
  border-color: #fff;
}

.form-advanced {
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
}

.form-advanced summary {
  color: #aaa;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.form-advanced[open] summary {
  margin-bottom: 20px;
  color: #fff;
}

.footer-weather-config {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-weather-config > label:not(.switch-row) {
  margin: 8px 0 0;
}

.inline-advanced {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.inline-advanced summary {
  color: #888;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

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

.type-choice {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 122px;
  margin: 0;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
}

.type-choice input {
  position: absolute;
  opacity: 0;
}

.type-choice > span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  margin-bottom: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: #aaa;
  font-size: 15px;
}

.type-choice strong {
  font-size: 12px;
}

.type-choice small {
  color: #777;
  font-size: 9px;
  font-weight: 400;
}

.type-choice:has(input:checked) {
  border-color: var(--red);
  background: rgba(229, 9, 20, .08);
}

.type-choice:has(input:checked) > span {
  background: var(--red);
  color: #fff;
}

.media-input-section[hidden],
.audio-setting[hidden],
.duration-setting[hidden],
.live-limit-setting[hidden] {
  display: none !important;
}

.upload-drop {
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, .018);
  text-align: center;
}

.upload-drop label {
  margin-top: 8px;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(229, 9, 20, .12);
  color: var(--red);
  font-size: 20px;
}

.compact-notice {
  margin-top: 12px;
  border-color: rgba(245, 185, 66, .22);
  background: rgba(245, 185, 66, .06);
  color: #c9ae77;
  font-size: 11px;
}

.youtube-options {
  margin: 0;
  border-width: 0 0 1px;
  border-color: var(--line);
  border-radius: 0;
  background: transparent;
}

.option-card {
  background: rgba(255, 255, 255, .025);
}

.audio-setting {
  margin: 22px 0 15px;
}

.live-overview {
  border-top: 2px solid var(--red);
}

.disclosure-card {
  padding: 0;
}

.disclosure-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  list-style: none;
  cursor: pointer;
}

.disclosure-card > summary::-webkit-details-marker {
  display: none;
}

.disclosure-card > summary > span {
  display: grid;
}

.disclosure-card > summary strong {
  margin: 4px 0 2px;
  color: #eee;
  font-size: 15px;
}

.disclosure-card > summary small {
  font-size: 10px;
}

.disclosure-card > summary > b {
  color: #888;
  font-size: 10px;
  text-transform: uppercase;
}

.disclosure-card[open] > summary > b {
  color: var(--red);
}

.disclosure-card[open] > summary {
  border-bottom: 1px solid var(--line);
}

.disclosure-content {
  padding: 8px 22px 22px;
  overflow-x: auto;
}

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

.media-card {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.media-card.has-media-alert {
  border-color: rgba(255, 69, 78, .72);
  box-shadow: 0 0 0 1px rgba(229, 9, 20, .14), 0 14px 34px rgba(0, 0, 0, .2);
}

.media-alert-icon {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: #e50914;
  box-shadow: 0 6px 18px rgba(229, 9, 20, .42);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.media-health-alert {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 69, 78, .34);
  border-radius: 8px;
  background: rgba(229, 9, 20, .08);
}

.media-health-alert strong {
  color: #ff626a;
  font-size: 12px;
}

.media-health-alert span,
.media-health-alert small {
  color: #aaa;
  font-size: 10px;
  line-height: 1.4;
}

.media-health-alert > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 3px;
}

.media-health-alert a {
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .35);
  text-underline-offset: 3px;
}

.content-health-banner {
  display: grid;
  gap: 5px;
  margin: 18px 20px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 69, 78, .45);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(229, 9, 20, .14), rgba(229, 9, 20, .04));
}

.content-health-banner strong { color: #ff626a; }
.content-health-banner span,
.content-health-banner small { color: #bbb; }
.content-health-banner a {
  width: max-content;
  color: #fff;
  font-weight: 750;
}

.content-library-tabs {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111;
}

.content-library-tabs a {
  flex: 1;
  padding: 13px 16px;
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.content-library-tabs a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(122, 48, 255, .28), rgba(236, 33, 160, .2));
  box-shadow: inset 0 0 0 1px rgba(236, 33, 160, .55);
}

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

.homologation-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.homologation-status {
  display: grid;
  gap: 8px;
}

.homologation-status > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.homologation-status strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.homologation-status small { color: var(--muted); }
.device-online { color: #53db7b; }
.device-offline { color: #ff626a; }

.activation-list { display: grid; gap: 18px; }
.activation-card { position: relative; overflow: hidden; }
.activation-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--red);
}
.activation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.activation-heading h3 { margin: 5px 0; }
.pairing-code {
  padding: 12px 16px;
  border: 1px solid rgba(229, 9, 20, .55);
  border-radius: 10px;
  background: rgba(229, 9, 20, .10);
  color: #fff;
  font-size: 1.35rem;
  letter-spacing: .14em;
  white-space: nowrap;
}
.activation-facts { margin-bottom: 20px; }
.activation-actions {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.activation-actions label { margin: 0; }
.activation-reject { margin-top: 10px; }
@media (max-width: 760px) {
  .activation-heading, .activation-actions { display: grid; grid-template-columns: 1fr; }
  .pairing-code { justify-self: start; }
}

.homologation-access {
  border-color: rgba(229, 9, 20, .32);
  background:
    radial-gradient(circle at 85% 0, rgba(229, 9, 20, .12), transparent 35%),
    var(--surface);
}

.tv-test-url {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
}

.tv-test-url code,
.homologation-detail code {
  display: block;
  min-width: 0;
  padding: 13px 15px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090909;
  color: #fff;
  font-size: 14px;
}

.tv-test-url code { flex: 1; }
.homologation-detail { margin-top: 16px; color: var(--muted); }
.homologation-detail code { margin-top: 10px; }

.device-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.device-facts > div {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.device-facts dt { color: var(--muted); font-weight: 750; }
.device-facts dd { margin: 0; overflow-wrap: anywhere; }

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

.tv-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
  cursor: pointer;
}

.tv-check-item:has(input:checked) {
  border-color: rgba(83, 219, 123, .35);
  background: rgba(83, 219, 123, .06);
}

.tv-check-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #e50914;
}

.tv-check-item span { display: grid; gap: 4px; }
.tv-check-item strong { color: #eee; font-size: 13px; }
.tv-check-item small { color: var(--muted); line-height: 1.4; }

@media (max-width: 1100px) {
  .homologation-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .homologation-status-grid,
  .tv-checklist { grid-template-columns: 1fr; }
  .tv-test-url { align-items: stretch; flex-direction: column; }
  .device-facts > div { grid-template-columns: 1fr; gap: 5px; }
}

.media-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(229, 9, 20, .38), transparent 34%),
    linear-gradient(145deg, #2a2a2a, #0b0b0b);
  color: #fff;
  text-decoration: none;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview > small {
  position: absolute;
  top: calc(50% + 30px);
  color: rgba(255, 255, 255, .62);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.media-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding-left: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #111;
}

.media-text {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 22px;
  background: linear-gradient(145deg, #262626, #111);
}

.media-text p {
  position: relative;
  z-index: 2;
  max-width: 90%;
  margin: 18px 0 0;
  color: #ddd;
  font-size: 12px;
  line-height: 1.45;
}

.media-quote {
  position: absolute;
  top: -8px;
  left: 14px;
  color: rgba(229, 9, 20, .35);
  font-size: 75px;
  font-weight: 900;
}

.media-duration,
.media-state {
  position: absolute;
  z-index: 3;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .72);
  color: #ddd;
  font-size: 9px;
  font-weight: 800;
}

.media-duration {
  right: 9px;
  bottom: 9px;
}

.media-state {
  top: 9px;
  left: 9px;
  color: #999;
}

.media-state.is-active {
  background: rgba(21, 95, 52, .88);
  color: #a7f3c5;
}

.media-body {
  padding: 14px 15px 12px;
}

.media-kind {
  color: var(--red);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}

.media-body h3 {
  margin: 4px 0 3px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-body p {
  margin: 0 0 5px;
  overflow: hidden;
  color: #888;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-body small {
  font-size: 9px;
}

.media-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 15px;
  border-top: 1px solid var(--line);
}

.card-menu {
  position: relative;
}

.card-menu summary {
  padding: 3px 6px;
  color: #888;
  font-size: 13px;
  list-style: none;
  cursor: pointer;
}

.card-menu summary::-webkit-details-marker {
  display: none;
}

.card-menu > div {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 28px;
  display: grid;
  width: 170px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #252525;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .5);
}

.card-menu a,
.card-menu button {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border-radius: 5px;
  background: transparent;
  color: #ddd;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}

.card-menu a:hover,
.card-menu button:hover {
  transform: none;
  background: rgba(255, 255, 255, .07);
}

.card-menu button.menu-danger {
  color: #ff7b82;
}

.inline-form .link-danger,
.link-danger {
  width: auto;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(229, 9, 20, .14);
  color: #ff7b82;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.inline-form .link-danger:hover,
.link-danger:hover {
  background: rgba(229, 9, 20, .24);
}

.inline-form .btn.danger {
  min-height: 40px;
  padding: 10px 17px;
  border-radius: 7px;
  background: #751016;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.inline-form .btn.danger:hover {
  background: #94141c;
}

@media (max-width: 1200px) {
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 520px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
}

/* Manual interativo */
.manual-page {
  max-width: 1180px;
  margin: 0 auto;
}

.manual-top {
  min-height: 150px;
}

.manual-progress-card {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.5fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(20, 20, 20, .92);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  backdrop-filter: blur(16px);
}

.manual-progress-card > div:first-child {
  display: grid;
}

.manual-progress-card strong {
  margin-top: 4px;
  font-size: 13px;
}

.manual-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.manual-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a90008, var(--red));
  transition: width .3s ease;
}

.reset-manual {
  width: auto;
  min-height: auto;
  padding: 5px;
  background: transparent;
  color: #777;
  font-size: 10px;
}

.reset-manual:hover {
  transform: none;
  background: transparent;
  color: #fff;
}

.manual-shortcuts {
  display: grid;
  grid-template-columns: repeat(10, minmax(65px, 1fr));
  gap: 6px;
  margin-bottom: 28px;
}

.manual-shortcuts a {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 67px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
  color: #888;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.manual-shortcuts a:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.manual-shortcuts span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(229, 9, 20, .13);
  color: #ff6c73;
  font-size: 9px;
}

.manual-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 20px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 80% 30%, rgba(229, 9, 20, .13), transparent 30%),
    var(--surface);
}

.manual-intro h3 {
  margin: 5px 0 3px;
}

.manual-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.manual-flow {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.manual-flow span {
  padding: 8px 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  color: #ddd;
  font-size: 10px;
  font-weight: 800;
}

.manual-flow b {
  color: var(--red);
  font-size: 11px;
}

.manual-step {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  margin-bottom: 18px;
  scroll-margin-top: 100px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  transition: border-color .2s ease, opacity .2s ease;
}

.manual-step.completed {
  border-color: rgba(45, 213, 115, .22);
}

.manual-step > aside {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 28px 15px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .018);
}

.manual-step > aside > span {
  color: rgba(255, 255, 255, .13);
  font-size: 31px;
  font-weight: 900;
}

.manual-check {
  width: 19px;
  height: 19px;
  margin-top: 20px;
  accent-color: var(--green);
}

.manual-step > aside label {
  margin: 7px 0 0;
  color: #777;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.manual-step.completed > aside > span {
  color: rgba(45, 213, 115, .32);
}

.manual-step-body {
  padding: clamp(24px, 4vw, 42px);
}

.manual-step-body > h3 {
  margin: 6px 0 8px;
  font-size: 23px;
}

.manual-step-body > p {
  max-width: 760px;
  margin: 0 0 20px;
  color: #aaa;
  font-size: 13px;
}

.manual-step-body ol {
  display: grid;
  gap: 9px;
  margin: 0 0 20px;
  padding-left: 22px;
  color: #d2d2d2;
  font-size: 12px;
}

.manual-step-body ol li::marker {
  color: var(--red);
  font-weight: 900;
}

.manual-actions {
  display: flex;
  gap: 9px;
  margin: 20px 0;
}

.manual-tip {
  margin: 18px 0;
  padding: 12px 14px;
  border-left: 2px solid var(--green);
  border-radius: 0 7px 7px 0;
  background: rgba(45, 213, 115, .06);
  color: #a8cbb7;
  font-size: 11px;
}

.manual-tip.warning {
  border-left-color: var(--amber);
  background: rgba(245, 185, 66, .06);
  color: #c9ae77;
}

.manual-image {
  position: relative;
  display: block;
  width: 100%;
  max-height: 460px;
  margin-top: 25px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #070707;
}

.manual-image:hover {
  transform: none;
  border-color: rgba(255, 255, 255, .30);
  background: #070707;
}

.manual-image img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  object-position: top;
}

.manual-image > span {
  position: absolute;
  right: 11px;
  bottom: 11px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .76);
  color: #bbb;
  font-size: 9px;
}

.optional-step {
  background: linear-gradient(145deg, rgba(23, 23, 23, .9), rgba(16, 16, 16, .9));
}

.final-step {
  border-color: rgba(229, 9, 20, .22);
}

.final-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 22px;
  padding: 0;
  list-style: none;
}

.final-checklist li {
  position: relative;
  padding-left: 23px;
  color: #ccc;
  font-size: 12px;
}

.final-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 900;
}

.manual-done {
  display: none;
  align-items: center;
  gap: 18px;
  margin: 25px 0;
  padding: 24px;
  border: 1px solid rgba(45, 213, 115, .28);
  border-radius: 12px;
  background: rgba(45, 213, 115, .07);
}

.manual-done.visible {
  display: flex;
}

.manual-done > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #071a0f;
  font-weight: 900;
}

.manual-done h3,
.manual-done p {
  margin: 0;
}

.manual-done p {
  color: #88b89b;
  font-size: 11px;
}

.manual-dialog {
  width: min(94vw, 1500px);
  max-width: none;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0c0c0c;
  color: #fff;
}

.manual-dialog::backdrop {
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(5px);
}

.manual-dialog img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.manual-dialog p {
  margin: 12px 42px 0 0;
  color: #aaa;
  font-size: 11px;
}

.manual-dialog button {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 22px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .8);
  font-size: 21px;
}

@media (max-width: 1000px) {
  .manual-shortcuts {
    grid-template-columns: repeat(5, 1fr);
  }

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

@media (max-width: 700px) {
  .manual-progress-card {
    top: 5px;
    grid-template-columns: 1fr auto;
  }

  .manual-progress-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .manual-shortcuts {
    grid-template-columns: repeat(2, 1fr);
  }

  .manual-shortcuts a {
    display: flex;
    justify-content: flex-start;
    min-height: 48px;
    padding: 8px 12px;
  }

  .manual-flow {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    text-align: center;
  }

  .manual-flow b {
    transform: rotate(90deg);
  }

  .manual-step {
    grid-template-columns: 1fr;
  }

  .manual-step > aside {
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 12px;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .manual-step > aside > span {
    font-size: 18px;
  }

  .manual-check {
    margin: 0 0 0 auto;
  }

  .manual-step > aside label {
    margin: 0;
  }

  .manual-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .final-checklist {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .collection-grid,
  .screen-grid {
    grid-template-columns: 1fr;
  }

  .form-section {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 18px;
  }

  .form-section .grid-2 {
    grid-template-columns: 1fr;
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .type-choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sticky-actions {
    padding: 14px 18px;
  }

  .sticky-actions .btn {
    width: auto;
    flex: 1;
  }
}

.notice-box {
  margin-top: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #7c2d12;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}

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

.check-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.campaign-weekdays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 7px;
}

.campaign-weekdays label {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.campaign-weekdays label:hover {
  border-color: rgba(229, 9, 20, .55);
  background: rgba(229, 9, 20, .06);
}

.campaign-weekdays input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 9px 0 0;
  flex: 0 0 16px;
  accent-color: var(--red);
}

@media (max-width: 700px) {
  .campaign-weekdays {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.coverage-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.coverage-item strong {
  display: block;
  font-size: 24px;
}

.coverage-item span {
  color: #475569;
  font-size: 14px;
}

.alert-list,
.bar-list {
  display: grid;
  gap: 12px;
}

.alert-row,
.bar-label,
.mini-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-row {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.alert-row strong {
  font-size: 22px;
}

.mini-metrics {
  margin-bottom: 16px;
}

.dashboard-panels .mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-metrics div {
  flex: 1;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.mini-metrics span,
.bar-label span {
  color: #475569;
}

.mini-metrics strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.bar-track {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 4px;
  background: #2563eb;
  border-radius: inherit;
}

.bar-fill.green {
  background: #16a34a;
}

.bar-fill.amber {
  background: #d97706;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-live {
  background: #dcfce7;
  color: #166534;
}

.status-open {
  background: #dbeafe;
  color: #1e40af;
}

.status-future {
  background: #fef3c7;
  color: #92400e;
}

.status-expired,
.status-paused {
  background: #fee2e2;
  color: #991b1b;
}

.status-waiting {
  background: #f1f5f9;
  color: #475569;
}

/* Interface 2026 — experiência dark inspirada em plataformas de streaming */
:root {
  --bg: #080808;
  --surface: #141414;
  --surface-raised: #1c1c1c;
  --surface-soft: #242424;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --red: #e50914;
  --red-hover: #f6121d;
  --green: #2dd573;
  --amber: #f5b942;
  --sidebar-width: 256px;
}

html {
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 76% -10%, rgba(229, 9, 20, .10), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

.nav-toggle,
.mobile-header,
.nav-backdrop {
  display: none;
}

.sidebar {
  width: var(--sidebar-width);
  padding: 28px 18px 20px;
  background: rgba(9, 9, 9, .97);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.brand,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  padding: 0 10px 28px;
}

.main-nav {
  display: block !important;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.nav-group {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
}

.nav-label {
  padding: 0 12px 7px;
  color: #666;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sidebar .main-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #aaa;
  font-size: 14px;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.sidebar .main-nav a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transform: translateX(2px);
}

.sidebar .main-nav a.active {
  background: linear-gradient(90deg, rgba(229, 9, 20, .22), rgba(229, 9, 20, .05));
  color: #fff;
}

.sidebar .main-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: #777;
  font-size: 14px;
}

.active .nav-icon {
  color: var(--red);
}

.sidebar-footer {
  padding: 18px 8px 0;
  border-top: 1px solid var(--line);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip > span:last-child {
  display: grid;
  line-height: 1.25;
}

.user-chip strong {
  font-size: 12px;
}

.user-chip small {
  margin-top: 2px;
  color: #666;
  font-size: 10px;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

.sidebar .logout-link {
  display: inline-block;
  margin: 13px 0 0 42px;
  padding: 0;
  color: #777;
  font-size: 11px;
}

.sidebar .logout-link:hover {
  background: transparent;
  color: #fff;
}

.content {
  width: calc(100% - var(--sidebar-width));
  max-width: 1720px;
  margin-left: var(--sidebar-width);
  padding: 48px clamp(24px, 4vw, 64px) 64px;
}

.top {
  align-items: flex-end;
  margin-bottom: 30px;
}

h2 {
  margin: 4px 0 7px;
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

h3 {
  color: #f5f5f5;
  font-size: 18px;
  letter-spacing: -.02em;
}

.muted,
small {
  color: var(--muted);
}

.eyebrow,
.hero-kicker {
  display: block;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .17em;
}

.card {
  background: linear-gradient(145deg, rgba(30, 30, 30, .96), rgba(19, 19, 19, .96));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
}

a.card {
  color: inherit;
  text-decoration: none;
}

.hero-card {
  position: relative;
  min-height: 260px;
  margin-bottom: 38px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, .97) 0%, rgba(8, 8, 8, .78) 54%, rgba(8, 8, 8, .16) 100%),
    radial-gradient(circle at 86% 40%, rgba(229, 9, 20, .9), transparent 25%),
    linear-gradient(135deg, #3b0306, #151515 70%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 0, 0, .26), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 610px;
}

.hero-content h3 {
  max-width: 520px;
  margin: 10px 0 12px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
}

.hero-content p {
  max-width: 550px;
  margin: 0;
  color: #c6c6c6;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.journey {
  position: absolute;
  z-index: 2;
  right: clamp(24px, 4vw, 56px);
  bottom: 34px;
  display: flex;
  align-items: flex-start;
}

.journey-step {
  display: grid;
  place-items: center;
  gap: 6px;
}

.journey-step span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  font-size: 11px;
  font-weight: 800;
}

.journey-step.done span {
  border-color: var(--red);
  background: var(--red);
}

.journey-step small {
  color: #ccc;
  font-size: 9px;
}

.journey-line {
  width: clamp(22px, 3vw, 52px);
  height: 1px;
  margin-top: 16px;
  background: rgba(255, 255, 255, .22);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 0 14px;
}

.section-title h3 {
  margin: 4px 0 0;
  font-size: 21px;
}

.cards-grid {
  gap: 12px;
}

.dashboard-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin-bottom: 36px;
}

.metric {
  position: relative;
  min-height: 150px;
  margin: 0;
  padding: 20px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.metric:hover {
  z-index: 2;
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(255, 255, 255, .20);
  background: var(--surface-raised);
}

.metric .metric-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  margin: 0;
  color: var(--red);
  font-size: 14px;
}

.metric > span:not(.metric-icon) {
  color: #a7a7a7;
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 17px;
  color: #fff;
  font-size: 35px;
  letter-spacing: -.04em;
}

.metric small {
  margin-top: 4px;
  font-size: 11px;
}

.dashboard-panels {
  gap: 14px;
}

.section-head.compact {
  align-items: end;
}

.section-head.compact h3 {
  margin: 4px 0 0;
}

.text-link {
  color: #ddd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: #fff;
}

.alert-row {
  color: #ddd;
  background: rgba(255, 255, 255, .025);
  border-color: var(--line);
  text-decoration: none;
  transition: background .18s ease;
}

.alert-row:hover {
  background: rgba(255, 255, 255, .06);
}

.alert-row span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(229, 9, 20, .12);
}

.alert-dot.neutral {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 185, 66, .10);
}

.alert-dot.live {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(45, 213, 115, .10);
}

.mini-metrics div,
.coverage-item {
  border-color: var(--line);
  background: rgba(255, 255, 255, .025);
}

.panel-note {
  margin-bottom: 18px;
  font-size: 12px;
}

.danger-zone {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #777;
  font-size: 11px;
}

.danger-zone summary {
  cursor: pointer;
}

.danger-zone form {
  margin-top: 12px;
}

.btn,
button {
  min-height: 40px;
  padding: 10px 17px;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-weight: 750;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}

.btn:hover,
button:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}

.btn.secondary,
.btn.ghost,
.btn.soft {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.btn.secondary:hover,
.btn.ghost:hover,
.btn.soft:hover {
  background: rgba(255, 255, 255, .20);
}

.btn.danger {
  background: #751016;
}

input,
select,
textarea {
  border-color: var(--line-strong);
  background: #101010;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(229, 9, 20, .32);
  border-color: var(--red);
}

th {
  color: #777;
}

td,
th {
  border-bottom-color: var(--line);
}

tbody tr {
  transition: background .16s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

.filters,
.row-check,
.youtube-options,
.option-card,
.notice-box {
  border-color: var(--line);
  background: var(--surface);
}

.tag,
code {
  background: rgba(229, 9, 20, .12);
  color: #ff7b82;
}

.bar-track {
  background: rgba(255, 255, 255, .08);
}

.bar-fill,
.bar-fill.green,
.bar-fill.amber {
  background: var(--red);
}

.flash {
  border: 1px solid var(--line);
}

.login-body {
  background:
    radial-gradient(circle at 20% 20%, rgba(229, 9, 20, .22), transparent 24rem),
    linear-gradient(145deg, #070707, #171717);
}

.login-card {
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, .96);
  color: var(--text);
}

.login-brand h1 {
  color: #fff;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .journey {
    display: none;
  }
}

@media (max-width: 900px) {
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    margin: -24px -14px 28px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 8, 8, .94);
    backdrop-filter: blur(16px);
  }

  .mobile-brand {
    font-size: 13px;
  }

  .menu-button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 86vw);
    transform: translateX(-102%);
    transition: transform .22s ease;
  }

  .nav-toggle:checked ~ .sidebar {
    transform: translateX(0);
  }

  .nav-toggle:checked ~ .content .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: block;
    background: rgba(0, 0, 0, .72);
  }

  .content {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding: 24px 14px 48px;
  }

  .sidebar .main-nav {
    grid-template-columns: 1fr;
  }

  .top {
    align-items: stretch;
  }

  .hero-card {
    min-height: 300px;
  }

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

@media (max-width: 520px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    min-height: 135px;
    padding: 16px;
  }

  .metric strong {
    font-size: 30px;
  }

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

  .hero-actions .btn,
  .top .button-row .btn {
    width: 100%;
  }
}
