/* Approved FSNET management direction, 20 November 2026. */
:root {
  --sidebar-bg: #132438;
  --sidebar-text: #d5dfec;
  --primary: #2877ba;
  --primary-dark: #1d6099;
  --content-bg: #f5f7fa;
  --text-primary: #17263a;
  --text-secondary: #58677b;
  --border: #dfe5ed;
  --shadow: none;
  --radius: 12px;
  --shell-sidebar-width: 248px;
}
::selection { background: #d5e8fa; color: #132438; }
* { scrollbar-color: #a4b5c9 transparent; scrollbar-width: thin; }
body { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text-primary); background: var(--content-bg); line-height: 1.5; }
input, textarea { caret-color: var(--primary); }
.ui-icon { display: inline-block; flex: 0 0 auto; width: 21px; height: 21px; vertical-align: middle; }
.sidebar { width: var(--shell-sidebar-width); background: var(--sidebar-bg); box-shadow: none; }
.sidebar-header { padding: 28px 24px 32px; border: 0; }
.sidebar-brand { gap: 0; }
.sidebar-brand-mark { display: none; }
.sidebar-brand h2.fsnet-wordmark { display: flex; align-items: flex-start; font-size: 32px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.fsnet-wordmark i { display: block; width: 16px; height: 6px; background: #ef2d31; transform: skew(-25deg); margin: 1px 0 0 4px; }
.sidebar-brand span { display: block; font-size: 12px; color: #d5dfec; margin-top: 8px; }
.sidebar-nav { padding: 0 12px; }
.sidebar-nav li a { color: #d5dfec; gap: 14px; min-height: 48px; padding: 12px 14px; font-size: 14px; margin-bottom: 6px; }
.sidebar-nav li a:hover { transform: none; background: #203951; }
.sidebar-nav li a.active { background: #2877ba; box-shadow: none; border: 0; }
.sidebar-footer .btn { color: #d5dfec; background: transparent; border: 0; justify-content: flex-start; gap: 14px; }
.sidebar-footer .btn:hover { color: #fff; background: #203951; }
.main-content { margin-left: var(--shell-sidebar-width); min-width: 0; }
.top-bar { min-height: 68px; background: #fff; backdrop-filter: none; box-shadow: none; border-bottom: 1px solid var(--border); padding: 12px 28px; }
.topbar-context { flex-direction: row; align-items: center; gap: 10px; }
.topbar-eyebrow { color: var(--text-secondary); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.operator-avatar { background: var(--primary); color: #fff; }
.content-area { padding: 32px 28px; max-width: 1600px; }
.page-heading h2, .dashboard-heading h2 { margin-top: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; letter-spacing: -.025em; font-weight: 750; }
.page-heading .muted { margin-top: 8px; font-size: 14px; }
.eyebrow { display: none; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
.card { border: 1px solid var(--border); box-shadow: none; border-radius: 12px; }
.btn { min-height: 40px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: none; transition: background-color .16s, border-color .16s; }
.btn-primary { background: var(--primary); border: 1px solid var(--primary); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: none; }
.btn-ghost { background: #fff; color: #235f91; border: 1px solid #cbd8e6; }
.btn-ghost:hover { background: #eff6fc; border-color: #8baecf; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 34px; font-size: 12px; }
.text-action, .table-detail-link { color: #1e659f; font-weight: 600; text-decoration: none; text-underline-offset: 3px; }
.text-action:hover, .table-detail-link:hover { text-decoration: underline; }
.dashboard-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px 8px; }
.stat-card { min-height: 100px; padding: 8px 20px; border: 0; border-radius: 0; box-shadow: none; background: transparent; border-right: 1px solid var(--border); }
.stat-card:last-child { border-right: 0; }
.stat-card:hover { transform: none; box-shadow: none; }
.metric-icon { float: left; margin: 8px 12px 0 0; background: transparent; width: 24px; color: var(--primary); }
.stat-card .stat-value { font-size: 30px; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { display: block; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.dashboard-shortcuts { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.dashboard-shortcuts p { margin: 10px 0 18px; font-size: 14px; }
.dashboard-card .card-header { padding: 24px; }
.dashboard-card .card-title { font-size: 21px; }
.dashboard-card .muted { font-size: 13px; }
table { font-size: 13px; }
th { background: #f2f5f9; color: #526176; font-size: 11px; font-weight: 700; letter-spacing: .025em; }
td { padding-top: 18px; padding-bottom: 18px; }
.table-subtitle { color: #58677b; }
.provider-identity { display: flex; align-items: center; gap: 12px; min-width: 155px; }
.provider-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; background: #e1eefb; color: #1d6099; font-size: 14px; font-weight: 750; }
.provider-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.table-detail-link { font-size: 12px; }
.installation-search { max-width: 520px; border: 1px solid var(--border); background: #fff; box-shadow: none; }
.installation-list-card { padding: 10px; }
.badge { font-size: 11px; font-weight: 600; }
.product-pill { background: #edf2f7; color: #4a5b70; }
.form-group input:not([type=checkbox]):not([type=color]), .form-group select, .form-group textarea { min-height: 42px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--text-primary); }
.form-group label { color: #33445a; font-size: 13px; }
input::placeholder, textarea::placeholder { color: #63758b; }
.form-group input[type=color] { height: 44px; width: 100%; padding: 5px; border: 1px solid #cbd5e1; border-radius: 8px; }
.config-tabs { display: flex; flex-wrap: wrap; gap: 0 22px; border-bottom: 1px solid var(--border); margin: 0 0 24px; }
.config-tabs button { white-space: nowrap; background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 14px 4px; color: #536278; font: inherit; font-size: 14px; cursor: pointer; }
.config-tabs button[aria-selected=true] { color: #1e659f; border-bottom-color: var(--primary); font-weight: 700; }
.config-tabs button:hover { color: #1e659f; background: #eaf2fa; }
.runtime-heading { margin-bottom: 16px; }
.runtime-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.runtime-editor { min-width: 0; padding: 24px; }
.config-panel[hidden] { display: none !important; }
#runtime-config-form .config-panel fieldset { margin-bottom: 24px; }
#runtime-config-form .config-panel > fieldset + fieldset { padding-top: 24px; border-top: 1px solid var(--border); }
#runtime-config-form legend { font-size: 19px; font-weight: 700; color: var(--text-primary); }
#runtime-config-form p.muted { font-size: 13px; line-height: 1.65; }
#runtime-config-form > p.muted { font-size: 12px; margin-bottom: 20px; }
#runtime-config-form .form-check { padding: 14px 0; margin: 0; border-bottom: 1px solid #e8edf3; }
#runtime-config-form .form-check label { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 18px; width: 100%; font-size: 14px; font-weight: 600; line-height: 1.5; cursor: pointer; }
#runtime-config-form input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; width: 42px; height: 24px; flex: 0 0 42px; border-radius: 20px; border: 1px solid #8795a6; background: #8a97a8; margin: 0; cursor: pointer; transition: background-color .16s; }
#runtime-config-form input[type=checkbox]::after { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: transform .16s; }
#runtime-config-form input[type=checkbox]:checked { background: var(--primary); border-color: var(--primary); }
#runtime-config-form input[type=checkbox]:checked::after { transform: translateX(18px); }
#runtime-config-form input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
#runtime-config-form fieldset:disabled label { cursor: default; }
#config-panel-features .form-grid { display: block; }
#reactivation-terms { margin-top: 8px; }
#runtime-config-form .form-check + .form-group { margin-top: 22px; }
.runtime-publication { position: sticky; top: 92px; padding: 24px; font-size: 13px; }
.runtime-publication h3 { margin-bottom: 18px; font-size: 21px; }
.runtime-publication strong { display: block; color: #1d6099; font-size: 14px; line-height: 1.5; }
.runtime-publication p { margin-top: 12px; color: #58677b; overflow-wrap: anywhere; }
.runtime-publication .publication-help { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.runtime-actionbar { position: sticky; bottom: 0; background: #fff; padding: 18px 0 2px; border-top: 1px solid var(--border); margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 2; }
.runtime-save-hint { font-size: 12px; color: #58677b; }
.runtime-actionbar .form-actions { margin: 0; flex-wrap: wrap; justify-content: flex-end; }
#runtime-config-form .runtime-benefit { padding: 20px 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.sidebar.is-collapsed .sidebar-nav li a::before, .sidebar.is-collapsed .sidebar-footer .btn::before { content: none; }
@media (min-width: 769px) {
  .sidebar.is-collapsed .nav-label { display: none; }
  .sidebar.is-collapsed .sidebar-brand-mark { display: grid; place-items: center; color: #fff; background: transparent; font-size: 16px; }
  .sidebar.is-collapsed .sidebar-nav li a, .sidebar.is-collapsed .sidebar-footer .btn { justify-content: center; }
}
@media (max-width: 1200px) {
  .runtime-layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 18px; }
  .runtime-editor, .runtime-publication { padding: 20px; }
  .runtime-actionbar { align-items: flex-start; flex-direction: column; }
  .stat-card { padding: 8px 12px; }
  .metric-icon { display: none; }
}
@media (max-width: 1000px) {
  .runtime-layout { grid-template-columns: 1fr; }
  .runtime-publication { position: static; grid-row: 1; }
  .runtime-publication .publication-help { margin-top: 12px; padding-top: 12px; }
  .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
}
@media (max-width: 768px) {
  .sidebar { width: min(86vw, 300px); }
  .main-content { margin-left: 0; }
  .content-area { padding: 24px 16px; }
  .top-bar { padding: 12px 16px; }
  .topbar-eyebrow { display: none; }
  .dashboard-shortcuts { grid-template-columns: 1fr; gap: 0; }
  .config-tabs { gap: 20px; flex-wrap: nowrap; overflow-x: auto; }
  .runtime-editor { padding: 18px; }
  .runtime-actionbar .form-actions { width: 100%; justify-content: flex-start; }
  .runtime-layout { gap: 0; }
  .sidebar.is-collapsed .nav-label { display: inline; }
}
@media (max-width: 520px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { border: 0; }
  .topbar-operator .admin-name { display: none; }
  .runtime-actionbar .form-actions .btn { width: 100%; justify-content: center; }
  .config-tabs button { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  #runtime-config-form input[type=checkbox], #runtime-config-form input[type=checkbox]::after { transition: none; }
}
/* Final layout checks: preserve space for the publication panel and long tables. */
.runtime-editor { width: 100%; max-width: none; }
.btn { text-decoration: none; font-family: inherit; }
.form-group textarea, .form-group input, .form-group select { font-family: inherit; }
.installation-table table { min-width: 960px; }
.installation-table th, .product-pill, .status-badge { white-space: nowrap; overflow-wrap: normal; }
.installation-search { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; padding: 8px 12px; }
.installation-search input { min-width: 0; width: 100%; border: 0; padding: 4px 0; background: transparent; }
.installation-search .search-count { white-space: nowrap; margin-left: auto; }
.main-content { transition: none; }
.sidebar { transition: transform .2s ease; }
.brand-logo-upload { display: flex; align-items: flex-start; gap: 24px; margin: 12px 0 20px; }
.brand-logo-preview { display: grid; place-items: center; flex: 0 0 176px; min-height: 130px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #edf2f7; }
.brand-logo-preview img { max-width: 144px; max-height: 104px; object-fit: contain; }
.brand-logo-preview span { text-align: center; color: #58677b; font-size: 12px; }
.brand-logo-controls { flex: 1; min-width: 0; }
.brand-logo-controls input[type=file] { width: 100%; max-width: 100%; padding: 8px; font-size: 12px; }
.brand-logo-controls input[type=file]::file-selector-button { border: 0; border-radius: 6px; background: #e1eefb; color: #1d6099; font: inherit; font-weight: 600; padding: 8px 12px; margin-right: 10px; cursor: pointer; }
.brand-logo-controls .muted { margin-top: 10px; }
.brand-logo-preview [hidden] { display: none !important; }
@media (max-width: 520px) { .brand-logo-upload { flex-direction: column; gap: 16px; } .brand-logo-preview { flex-basis: auto; width: 100%; } .brand-logo-controls { width: 100%; } }
/* Provider-managed app content, using the existing management surface. */
.engagement-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid #d7e0e9; }
.engagement-section details { margin: 12px 0; padding: 12px 16px; border: 1px solid #d7e0e9; border-radius: 10px; }
.engagement-section summary { cursor: pointer; font-weight: 600; overflow-wrap: anywhere; }
.engagement-section details[open] summary { margin-bottom: 16px; }
.engagement-image-preview { display: block; width: auto; max-width: 100%; max-height: 180px; margin-top: 10px; object-fit: contain; }
.engagement-referral { padding: 16px 0; border-bottom: 1px solid #d7e0e9; overflow-wrap: anywhere; }
[data-engagement-status] { overflow-wrap: anywhere; }
.engagement-section input[type=file] { max-width: 100%; }

/* App adoption: provider totals and a searchable list of authenticated clients. */
.usage-toolbar { display:flex; align-items:center; gap:16px; padding:18px 22px; margin-bottom:18px; }
.usage-toolbar label { font-weight:700; }
.usage-toolbar select { max-width:360px; flex:1; }
.usage-toolbar button { margin-left:auto; }
.usage-note { padding:16px 20px; border-left:3px solid #2563eb; background:#eff6ff; color:#334155; line-height:1.65; margin-bottom:24px; border-radius:0 8px 8px 0; font-size:13px; }
.usage-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.usage-metric { display:flex; flex-direction:column; gap:12px; padding:22px; }
.usage-metric>span { color:#475569; font-size:13px; font-weight:600; }
.usage-metric>strong { font-size:36px; line-height:1.15; letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.usage-metric small,.usage-recent small { color:#64748b; line-height:1.5; font-size:12px; }
.usage-secondary { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
.usage-secondary .card { padding:22px; }
.usage-secondary h3 { font-size:14px; font-weight:700; margin:0 0 18px; }
.usage-platform-values { display:flex; gap:28px; align-items:center; }
.usage-platform-values strong { margin-left:10px; font-size:23px; }
.platform-dot { display:inline-block; width:9px; height:9px; border-radius:50%; }
.platform-dot.ios { background:#2563eb; }.platform-dot.android { background:#0d9488; }
.usage-platform-bar { height:7px; background:#0d9488; border-radius:10px; overflow:hidden; margin-top:18px; }
.usage-platform-bar span { display:block; height:100%; background:#2563eb; }
.usage-recent>div { display:flex; justify-content:space-between; gap:18px; margin-bottom:12px; }
.usage-recent>div span { font-size:12px; color:#475569; }
.usage-recent strong { display:block; color:#132438; font-size:24px; margin-top:6px; }
.usage-measured { font-size:11px; margin:16px 0 24px; }
.usage-filters { display:grid; grid-template-columns:minmax(180px,2fr) 1fr 1fr auto; gap:14px; align-items:end; padding:0 24px 22px; }
.usage-filters label { display:flex; flex-direction:column; gap:8px; font-size:12px; font-weight:600; }
.usage-table td { white-space:nowrap; font-size:12px; }
.usage-table td:first-child { white-space:normal; min-width:180px; }
.usage-table small { display:block; color:#64748b; margin-top:6px; }
.usage-table th { font-size:11px; }
.usage-customers .table-responsive { overflow-x:auto; }
.usage-empty { padding:40px 24px; text-align:center; }
.usage-empty h3 { font-size:18px; margin-bottom:12px; }
.usage-empty p { color:#64748b; line-height:1.7; max-width:610px; margin:auto; }
.usage-pagination { padding:18px 24px; display:flex; justify-content:space-between; gap:16px; align-items:center; font-size:12px; color:#64748b; }
.usage-pagination>div { display:flex; gap:8px; }
#usage-error:not([hidden]) { margin-bottom:20px; }
@media(max-width:1200px) { .usage-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .usage-filters { grid-template-columns:1fr 1fr; } }
@media(max-width:600px) { .usage-toolbar { flex-wrap:wrap; gap:12px; } .usage-toolbar label { width:100%; } .usage-toolbar select { min-width:0; } .usage-metrics { gap:12px; } .usage-metric { padding:16px; } .usage-metric>strong { font-size:30px; } .usage-secondary { grid-template-columns:1fr; } .usage-filters { padding:0 16px 18px; } .usage-filters label:first-child { grid-column:1/-1; } .usage-filters button { grid-column:1/-1; } .usage-pagination { flex-direction:column; } .usage-note { font-size:12px; } }

[data-engagement] .form-check { gap: 10px; }
[data-engagement] [data-playlist] { max-width: 100%; }

.usage-toolbar .form-control,.usage-filters .form-control { width:100%; min-height:44px; border:1px solid #d9e0e9; border-radius:8px; background:#fff; padding:10px 12px; font:inherit; color:#132438; }
.usage-toolbar .form-control:focus-visible,.usage-filters .form-control:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
.usage-platform-bar.empty { background:#e2e8f0; }
.tv-preview{margin-top:16px;padding:16px;border:1px solid var(--border,#dbe2ea);border-radius:12px;background:var(--card-bg,#fff)}.tv-preview-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.tv-preview video{display:block;width:100%;max-height:520px;aspect-ratio:16/9;background:#101820;border-radius:8px}.tv-preview [role=status]{margin:12px 0 0;color:var(--text,#182d40);line-height:1.5}@media(max-width:600px){.tv-preview{padding:12px}.tv-preview-heading{align-items:flex-start;flex-wrap:wrap}}
/* Usuários da gerência */
.operators-table input.operator-name { min-width: 160px; }
.operator-password { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.operator-password[hidden] { display: none; }
.operators-card { margin-bottom: 24px; }
.operators-card .table-responsive { overflow-x: auto; }
.operators-table { min-width: 820px; }
.operators-table th, .operators-table td:nth-child(2), .operators-table td:nth-child(5) { white-space: nowrap; }
