/* Painel Master — complementos do app.css (o mesmo visual do Acesso). Sem CSS inline (CSP). */

/* Tema Vigex (2026-11-29): as cores do site vigex.com.br (Site Vigex\css\style.css):
   verde-escuro da marca #1E3D32 (botões), #142A22 (menu), destaque #3E9A6E / #7CC4A0.
   Botões e item ativo do menu: #1E3D32 com texto branco (como os botões do site). Links e abas: #2F7A57 (o #3E9A6E
   com fundo branco não chega ao contraste mínimo de 4,5:1). Fundo, textos e modo escuro continuam os do sistema. */
:root[data-theme="vigex"] {
    --primary: #1E3D32;
    --primary-600: #2A5444;
    --accent: #1E3D32;
    --accent-contrast: #ffffff;
    --accent-text: #2F7A57;
    --sidebar: #142A22;
    --sidebar-text: #C9DCD2;
    --sidebar-strong: #ffffff;
    --sidebar-muted: #86A596;
    --sidebar-hover: rgba(124, 196, 160, .10);
    --sidebar-line: rgba(255, 255, 255, .08);
}
@media (prefers-color-scheme: dark) {
    :root[data-theme="vigex"]:not([data-mode="claro"]) { --accent-text: #7CC4A0; }
}
:root[data-theme="vigex"][data-mode="escuro"] { --accent-text: #7CC4A0; }
/* fonte do site (IBM Plex Sans) quando estiver instalada no computador; senão, a do sistema */
:root[data-theme="vigex"] body { font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
:root[data-theme="vigex"] .brand-logo img { border-radius: 9px; }
:root[data-theme="vigex"] .nav-link.active { background: #2A5444; box-shadow: inset 3px 0 0 #7CC4A0; }
:root[data-theme="vigex"] .btn-primary:hover { background: #142A22; }

/* marca nas telas de entrar */
.master-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.master-brand strong { display: block; font-size: 1.15rem; }
.master-brand small { display: block; color: var(--muted); }
.auth .auth-card h1 { font-size: 1.4rem; margin: 0 0 6px; }
.auth .auth-card .lead { color: var(--muted); margin: 0 0 18px; }
.auth .btn-block { width: 100%; justify-content: center; }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }

/* contador de alertas no menu */
.nav-link .nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; }

/* QR Code do segundo fator */
.qr-box { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.qr-box .qr-code { background: #fff; padding: 6px; border-radius: 8px; border: 1px solid var(--border); max-width: 100%; height: auto; }
.secret-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .06em; word-break: break-all; }

/* chave mostrada uma vez */
.token-box { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.token-box input { flex: 1 1 280px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.env-box { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }

/* registro da configuração automática */
.log-box { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.5; max-height: 560px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* barras de uso (processador, memória, disco) */
.meter { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.meter-track { flex: 1 1 auto; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.meter-fill.is-warn { background: var(--warning); }
.meter-fill.is-danger { background: var(--danger); }
.meter small { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
/* larguras em passos de 5% (sem style inline) */
.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; }
.w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; }
.w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; }
.w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

/* marcadores de situação */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--muted); }
.dot.is-ok { background: var(--success); }
.dot.is-warn { background: var(--warning); }
.dot.is-danger { background: var(--danger); }

.stat.is-danger { border-left-color: var(--danger); }
.stat.is-warn { border-left-color: var(--warning); }
.stat.is-ok { border-left-color: var(--success); }
.stat a { color: inherit; text-decoration: none; }

.system-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.system-cards .card { margin-bottom: 0; }
.card-title { font-size: 1.05rem; margin: 0 0 10px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; }
.nowrap { white-space: nowrap; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }
.license-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; max-height: 420px; overflow: auto; padding: 4px; }
.license-checks label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.license-checks small { display: block; color: var(--muted); }
.section-gap { margin-top: 24px; }

/* ---------- Revendedores › Personalizar (2026-11-29; marca.js) ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand-scopes { margin-bottom: 14px; }
.brand-scopes .tab { text-decoration: none; }
.brand-form [data-brand-panel] { margin-bottom: 16px; }
.brand-telas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.brand-tela { position: relative; cursor: pointer; }
.brand-tela input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.brand-tela-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 10px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.brand-tela-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 6px; }
.brand-tela-vazia { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.brand-tela input:checked + .brand-tela-card { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.brand-tela input:focus-visible + .brand-tela-card { outline: 3px solid var(--accent); outline-offset: 2px; }
.brand-tela-imagens { margin-top: 18px; }
.brand-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.brand-slot { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.brand-slot.is-changed { border-color: var(--accent); }
.brand-slot.has-error { border-color: var(--danger); }
.brand-slot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.brand-slot .hint { margin: 0; }
.brand-atual { display: grid; place-items: center; width: 100%; max-width: 560px; border: 1px dashed var(--border); border-radius: 8px; overflow: hidden;
    background-color: #fff; background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%);
    background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.brand-atual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-atual .muted { background: rgba(255, 255, 255, .85); padding: 4px 8px; border-radius: 6px; color: #475569; }
.brand-crop canvas { display: block; width: 100%; max-width: 560px; height: auto; border: 1px solid var(--accent); border-radius: 8px; cursor: grab; touch-action: none; }
.brand-crop canvas:active { cursor: grabbing; }
.brand-crop canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.brand-crop-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.brand-slot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.brand-escolher { position: relative; cursor: pointer; }
.brand-cores.is-off { opacity: .5; }
.brand-modo { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 14px; margin: 0; }
.brand-modo legend { padding: 0 6px; font-weight: 700; }
.brand-cor { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 10px; margin: 8px 0; }
.brand-cor input[type="color"] { width: 52px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.brand-cor label { display: flex; flex-direction: column; font-size: .9rem; }
.brand-amostra { display: flex; height: 72px; margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.brand-amostra-menu { width: 64px; background: #142a22; }
.brand-amostra-corpo { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: #f3f5f9; }
.brand-amostra-escuro .brand-amostra-corpo { background: #0b1220; }
.brand-amostra-botao { padding: 6px 12px; border-radius: 8px; color: #fff; font-weight: 600; font-size: .85rem; background: #2f7a57; }
.brand-amostra-link { font-weight: 600; text-decoration: underline; }