/* Identidade roxa do RealNet Vision em todo o painel (a mesma da tela de login).
   Só redefine cores; não mexe em tamanhos nem em posições. Carregado por último. */
:root {
  /* Tema claro: mesmo fundo branco de antes; só o azul virou roxo. */
  --bg: #f3f5f9; --panel: #ffffff; --panel-2: #f1edfa; --line: #dfd9ee;
  --fg: #182437; --muted: #5e6c80; --accent: #7c3aed; --accent-fg: #ffffff;
}
:root[data-theme=dark] {
  --bg: #0a0720; --panel: #140e2e; --panel-2: #1d1542; --line: #32266a;
  --fg: #f1edff; --muted: #a9a0cf; --accent: #a78bfa; --accent-fg: #14092e;
  --ok: #4ade80; --bad: #fb7185; --warn: #fbbf24;
}
body { background: var(--bg); }
:root[data-theme=dark] body { background: radial-gradient(1200px 600px at 85% -10%, #2a1466 0%, #0a0720 60%) fixed, #0a0720; }

/* Barra do topo e trilho lateral. */
.portal-top { background: linear-gradient(90deg, #160c38 0%, #32177e 52%, #6d28d9 100%); box-shadow: 0 1px 0 #a855f733, 0 8px 30px #0006; }
.portal-brand img { background: none; padding: 0; border-radius: 9px; box-shadow: 0 0 14px #a855f780; }
.portal-brand small { background: #ffffff1f; border-color: #c4b5fd66; }
.top-links a.selected, .top-links a:hover { background: #ffffff24; box-shadow: inset 0 0 0 1px #c4b5fd55; }
.global-search input { background: #1b1048b3; border-color: #c4b5fd55; color: #fff; }
.global-search input::placeholder { color: #d9cffb; }
.avatar { background: linear-gradient(135deg, #a855f7, #6366f1); color: #fff; box-shadow: 0 0 0 2px #ffffff40; }
.portal-rail { background: linear-gradient(180deg, #170d3a 0%, #0e0826 100%); box-shadow: 1px 0 0 #a855f726; }
.rail-link, .rail-group > summary { color: #cfc6f5; }
.rail-link.selected, .rail-link:hover, .rail-group[open] > summary { background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; box-shadow: 0 6px 18px #7c3aed66; }
.rail-link svg { inline-size: 23px; block-size: 23px; }

/* Botões e destaques. */
button.primary, .btn.primary { background: linear-gradient(135deg, #7c3aed, #a855f7); border-color: #a855f7; color: #fff; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.08); }
button.on, .btn.on { border-color: var(--accent); color: var(--accent); }
a { color: var(--accent); }
:root[data-theme=dark] .card, :root[data-theme=dark] .stat-card { box-shadow: 0 0 0 1px #a855f714, 0 10px 30px #0005; }

/* Central de monitoramento (painel escuro). */
.ops-dashboard { background: linear-gradient(160deg, #0e0926, #0a0720); border-color: #2c2160; box-shadow: 0 20px 60px #1a0f4a55; }
.ops-panel { background: #150f33; border-color: #2f2468; }
.ops-monitor { background: #070517; border-color: #2c2160; }
.ops-monitor-head, .ops-camera-strip { background: #150f33; }
.ops-camera-button { background: #1c1444; border-color: #3a2d7a; color: #e7e0ff; }
.ops-meter { background: #2a2058; }
.ops-meter > * { background: linear-gradient(90deg, #a855f7, #22d3ee) !important; }
.ops-panel .quick-links .btn { background: #1c1444; border-color: #3a2d7a; color: #e7e0ff; }
.ops-panel .quick-links .btn:hover { border-color: #a855f7; }

/* Linha do tempo e gráficos acompanham o tom. */
.playback-segment { background: linear-gradient(180deg, #8b5cf6, #6d28d9); }
.playback-zoom button.on { border-color: #a855f7; color: #a855f7; }
:root[data-theme=dark] .playback-track { background: #120c2c; border-color: #32266a; }

/* Barra inferior do celular. */
@media (max-width: 700px) {
  .portal-rail { background: linear-gradient(180deg, #1a0f40, #0e0826); box-shadow: 0 -1px 0 #a855f733; }
  .portal-rail.m-ready .rail-link.selected { background: linear-gradient(135deg, #7c3aed, #4f46e5); box-shadow: none; }
}

/* Toque: sem zoom da página por toque duplo (acontecia ao tocar seguido na lupa e nos botões). A pinça continua valendo. */
html { touch-action: manipulation; }
button, .btn, select, input, .rail-link { touch-action: manipulation; }
/* iPhone amplia a página ao focar campo com letra menor que 16 px. */
@media (max-width: 700px) { input, select, textarea { font-size: 16px; } }
