/* ==========================================================================
   Device Control: tema "command center"
   Sem dependências externas (compatível com a CSP: default-src 'self').
   ========================================================================== */

:root {
  --bg: #1a0f2e;
  --bg-2: #21133a;
  --surface: rgba(46, 26, 71, 0.62);
  --surface-2: rgba(58, 36, 88, 0.7);
  --surface-solid: #2a1942;
  --border: rgba(196, 180, 222, 0.12);
  --border-strong: rgba(196, 180, 222, 0.22);
  --text: #f4efe6;
  --text-2: #d8cfe4;
  --muted: #a494bd;

  --accent: #bfe46a;
  --accent-2: #a98bd6;
  --accent-soft: rgba(191, 228, 106, 0.12);
  --grad: linear-gradient(135deg, #bfe46a 0%, #9ccb45 100%);

  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --violet: #a78bfa;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --glow: 0 0 0 1px rgba(191, 228, 106, 0.35), 0 0 24px -4px rgba(191, 228, 106, 0.45);

  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #67e8f9; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.92em; }
.small { font-size: 0.82rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(191, 228, 106, 0.3); }

/* ---------- ícones ---------- */
.icon { width: 18px; height: 18px; flex: none; }
.icon.sm { width: 14px; height: 14px; }
.icon.xl { width: 34px; height: 34px; }

/* ---------- fundo: grade + brilho ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(196, 180, 222, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 180, 222, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 100%);
  animation: grid-pan 40s linear infinite;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 400px at 12% -5%, rgba(191, 228, 106, 0.14), transparent 70%),
    radial-gradient(700px 500px at 100% 0%, rgba(169, 139, 214, 0.14), transparent 70%),
    radial-gradient(600px 500px at 50% 110%, rgba(191, 228, 106, 0.06), transparent 70%);
}
@keyframes grid-pan { to { background-position: 44px 44px, 44px 44px; } }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14px var(--font); cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary {
  color: #2e1a47; background: var(--grad);
  box-shadow: 0 8px 24px -8px rgba(191, 228, 106, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { color: #2e1a47; transform: translateY(-1px); box-shadow: 0 12px 30px -8px rgba(191, 228, 106, 0.7), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { color: var(--text-2); background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: rgba(191, 228, 106, 0.45); background: var(--surface-2); }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  color: var(--text-2); background: transparent; border: 1px solid var(--border); cursor: pointer; transition: all .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

.spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(46, 26, 71, 0.25); border-top-color: #2e1a47; animation: spin .7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
.is-loading .btn-label + .icon { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
}
.chip-accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(191, 228, 106, 0.25); }
.chip-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, 0.25); }

.env-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font: 700 10.5px var(--mono); letter-spacing: .08em;
}
.env-development { color: var(--warn); background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, 0.3); }
.env-production { color: var(--ok); background: var(--ok-soft); border: 1px solid rgba(52, 211, 153, 0.3); }
.env-testing { color: var(--violet); background: rgba(167, 139, 250, .12); border: 1px solid rgba(167, 139, 250, .3); }

.soon {
  margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); padding: 2px 7px; border: 1px dashed var(--border-strong); border-radius: 999px;
}

.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.pulse-dot.is-ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.pulse-dot.is-ok::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok);
  animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.status-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px 0 8px;
  border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 10%, transparent);
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.st-active { color: var(--ok); }
.st-pending { color: var(--warn); }
.st-revoked, .st-rejected { color: var(--danger); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.seg-active { background: var(--ok); }
.dot.seg-pending { background: var(--warn); }
.dot.seg-revoked { background: var(--danger); }
.dot.seg-rejected { background: var(--violet); }

.tone-accent { color: var(--accent); }
.tone-ok { color: var(--ok); }
.tone-warn { color: var(--warn); }
.tone-danger { color: var(--danger); }
.tone-muted { color: var(--muted); }

/* ---------- alertas ---------- */
.alert {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 16px;
  border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 13.5px;
}
.alert-error { color: #fecaca; border-color: rgba(248, 113, 113, 0.35); background: var(--danger-soft); }
.alert-error .icon { color: var(--danger); }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }

.auth-hero {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 44px 56px; border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.4), rgba(26, 15, 46, 0.2));
  overflow: hidden;
}
.hero-top { display: flex; align-items: center; gap: 14px; }
.hero-name { display: block; font: 700 18px var(--font-display); }
.hero-sub { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.hero-title { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.15; font-weight: 700; max-width: 520px; }

.hero-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 460px; }
.hero-features li {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); backdrop-filter: blur(8px);
}
.hero-features .icon { color: var(--accent); margin-top: 2px; }
.hero-features strong { display: block; font-size: 14px; }
.hero-features span { color: var(--muted); font-size: 13px; }

/* radar animado */
.radar { position: relative; width: min(340px, 70%); aspect-ratio: 1; margin: 0 auto; }
.radar-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(191, 228, 106, 0.18); }
.radar-ring.r2 { inset: 17%; border-color: rgba(191, 228, 106, 0.22); }
.radar-ring.r3 { inset: 34%; border-color: rgba(169, 139, 214, 0.3); }
.radar::before, .radar::after {
  content: ""; position: absolute; background: rgba(191, 228, 106, 0.12);
}
.radar::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.radar::after { top: 50%; left: 0; right: 0; height: 1px; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(191, 228, 106, 0.35), rgba(191, 228, 106, 0) 70deg, transparent 360deg);
  animation: sweep 4.5s linear infinite;
  mask-image: radial-gradient(circle, #000 69%, transparent 70%);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-core {
  position: absolute; inset: 40%; display: grid; place-items: center; border-radius: 50%;
  color: #e6faff; background: radial-gradient(circle, rgba(191, 228, 106, 0.35), rgba(169, 139, 214, 0.15) 70%);
  box-shadow: 0 0 40px rgba(191, 228, 106, 0.35);
}
.blip {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent); animation: blip 4.5s ease-in-out infinite;
}
.blip.b1 { top: 20%; left: 62%; animation-delay: .5s; }
.blip.b2 { top: 64%; left: 76%; animation-delay: 1.6s; background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.blip.b3 { top: 72%; left: 26%; animation-delay: 2.7s; }
.blip.b4 { top: 30%; left: 18%; animation-delay: 3.6s; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
@keyframes blip { 0%, 100% { opacity: .15; transform: scale(.7); } 12% { opacity: 1; transform: scale(1.15); } 40% { opacity: .5; transform: scale(1); } }

.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 18px; }
.auth-card {
  position: relative; width: 100%; max-width: 420px; padding: 32px;
  border-radius: 18px; border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(17, 25, 45, 0.85), rgba(28, 16, 48, 0.85));
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.auth-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 19px; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(191, 228, 106, 0.55), transparent 35%, transparent 65%, rgba(169, 139, 214, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.auth-card-head { margin-bottom: 22px; }
.auth-card-head h1 { font-size: 26px; margin: 14px 0 4px; }
.auth-form { display: grid; gap: 16px; }
.auth-form .btn { margin-top: 6px; height: 46px; font-size: 15px; }

.field { display: grid; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.input-wrap {
  position: relative; display: flex; align-items: center;
  border-radius: 11px; border: 1px solid var(--border-strong); background: rgba(26, 15, 46, 0.7);
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap > .icon { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.input-wrap:focus-within { border-color: rgba(191, 228, 106, 0.6); box-shadow: 0 0 0 4px rgba(191, 228, 106, 0.12); }
.input-wrap:focus-within > .icon { color: var(--accent); }
.input-wrap input {
  flex: 1; min-width: 0; height: 46px; padding: 0 44px 0 42px; border: 0; outline: 0;
  background: transparent; color: var(--text); font: 15px var(--font);
}
.input-wrap input::placeholder { color: #4b5873; }
.input-wrap input:-webkit-autofill { -webkit-text-fill-color: var(--text); transition: background-color 9999s; }
.input-action {
  position: absolute; right: 6px; display: grid; place-items: center; width: 34px; height: 34px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.input-action:hover, .input-action.is-on { color: var(--accent); background: var(--accent-soft); }
.caps-warning { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); }
.caps-warning[hidden] { display: none; }

.auth-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted);
}
.auth-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.legal { font-size: 12px; color: var(--muted); margin: 0; }

/* ==========================================================================
   LAYOUT DO CONSOLE
   ========================================================================== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-w);
  display: flex; flex-direction: column; gap: 8px; padding: 18px 14px;
  background: linear-gradient(180deg, rgba(10, 15, 28, 0.92), rgba(22, 12, 38, 0.95));
  border-right: 1px solid var(--border); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.brand:hover { color: var(--text); }
.brand-text strong { display: block; font: 700 15px var(--font-display); }
.brand-text small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { display: grid; gap: 3px; }
.nav-label { padding: 10px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #56637c; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px;
  border-radius: 10px; color: var(--text-2); font-weight: 500; transition: all .15s;
}
.nav-item:hover { color: var(--text); background: rgba(196, 180, 222, 0.07); }
.nav-item.is-active {
  color: var(--text); background: linear-gradient(90deg, rgba(191, 228, 106, 0.16), rgba(191, 228, 106, 0.02));
  box-shadow: inset 0 0 0 1px rgba(191, 228, 106, 0.18);
}
.nav-item.is-active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--grad); box-shadow: 0 0 12px var(--accent);
}
.nav-item.is-active .icon { color: var(--accent); }
.nav-item.is-disabled { color: #56637c; cursor: not-allowed; }

.sidebar-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sys-status {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 12.5px; color: var(--text-2); background: var(--ok-soft); border: 1px solid rgba(52, 211, 153, 0.18);
}
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.user-card form { margin: 0; }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none;
  font-weight: 700; color: #2e1a47; background: var(--grad);
}
.user-meta { min-width: 0; flex: 1; }
.user-meta strong { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); font-size: 11px; }

.shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 0 28px; border-bottom: 1px solid var(--border);
  background: rgba(26, 15, 46, 0.72); backdrop-filter: blur(12px);
}
.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.crumbs .sep { color: #3b475e; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.content { width: 100%; max-width: 1320px; margin: 0 auto; padding: 28px; }

/* ---------- cabeçalho de página ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; font-weight: 700; margin: 2px 0 4px; }
.page-head p { margin: 0; }
.eyebrow { font: 700 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin-bottom: 18px;
  border-radius: 12px; color: var(--text); font-size: 13.5px;
}
.banner span { flex: 1; }
.banner-warn { background: var(--warn-soft); border: 1px solid rgba(251, 191, 36, 0.3); }
.banner-warn > .icon { color: var(--warn); }
.banner-warn:hover { color: var(--text); border-color: rgba(251, 191, 36, 0.55); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 18px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); color: var(--text); overflow: hidden; transition: transform .18s, border-color .18s;
}
.kpi::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, currentColor, transparent 70%); opacity: .0; transition: opacity .2s;
}
.kpi:hover { color: var(--text); transform: translateY(-2px); border-color: var(--border-strong); }
.kpi-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, currentColor 12%, transparent); border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}
.kpi-icon .icon { width: 21px; height: 21px; }
.kpi-body { display: grid; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-value { font: 700 30px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-attn { border-color: rgba(251, 191, 36, 0.4); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15), 0 0 30px -8px rgba(251, 191, 36, 0.4); }

/* ---------- painéis ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid-wide-left { grid-template-columns: 1.4fr 1fr; }
.panel {
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); padding: 18px 20px; backdrop-filter: blur(10px);
}
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; }
.panel-head h2 .icon { color: var(--accent); }
.link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut { width: 190px; height: 190px; flex: none; transform: rotate(0deg); }
.donut circle { fill: none; stroke-width: 4.2; }
.donut-track { stroke: rgba(196, 180, 222, 0.1); }
.donut-seg { stroke-linecap: butt; transition: stroke-width .2s; filter: drop-shadow(0 0 2px currentColor); }
.donut-seg:hover { stroke-width: 5.4; }
.donut-seg.seg-active { stroke: var(--ok); color: var(--ok); }
.donut-seg.seg-pending { stroke: var(--warn); color: var(--warn); }
.donut-seg.seg-revoked { stroke: var(--danger); color: var(--danger); }
.donut-seg.seg-rejected { stroke: var(--violet); color: var(--violet); }
.donut-num { font: 700 8.5px var(--font-display); fill: var(--text); text-anchor: middle; }
.donut-cap { font: 500 2.9px var(--font); fill: var(--muted); text-anchor: middle; letter-spacing: .1px; text-transform: uppercase; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; min-width: 200px; }
.legend li {
  display: grid; grid-template-columns: 10px 1fr auto 44px; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px; background: rgba(196, 180, 222, 0.04); border: 1px solid var(--border);
}
.legend-val { font-weight: 700; }
.legend-pct { text-align: right; }
.empty-hint { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 11px 13px; border-radius: 10px; font-size: 13px; color: var(--text-2); background: var(--accent-soft); border: 1px dashed rgba(191, 228, 106, 0.3); }
.empty-hint .icon { color: var(--accent); }

/* saúde */
.health { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.health li {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border); background: rgba(196, 180, 222, 0.03);
}
.health li strong { display: block; font-size: 13.5px; font-weight: 600; }
.health li small { color: var(--muted); font-size: 12px; }
.health-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-item {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.tl-item:last-child { border-bottom: 0; }
.tl-body { display: flex; flex-direction: column; min-width: 0; }
.tl-actor { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-time { font-size: 12px; color: var(--muted); white-space: nowrap; font-family: var(--mono); }

.action-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px;
  font-size: 12px; white-space: nowrap;
  background: color-mix(in srgb, currentColor 10%, transparent); border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}
.action-chip .mono { color: var(--text); font-size: 11.5px; }

/* módulos */
.modules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.modules li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(196, 180, 222, 0.03); color: var(--muted);
}
.modules li strong { display: block; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.modules li small { font-size: 12px; }
.modules li.mod-done { border-color: rgba(52, 211, 153, 0.3); background: var(--ok-soft); }
.modules li.mod-done .icon { color: var(--ok); }
.modules li.mod-done strong { color: var(--text); }

/* ---------- toolbar / filtros ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.segmented {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.segmented a {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px;
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.segmented a:hover { color: var(--text); background: rgba(196, 180, 222, 0.07); }
.segmented a.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(191, 228, 106, 0.3); }
.count { font: 600 11px var(--mono); padding: 1px 6px; border-radius: 6px; background: rgba(196, 180, 222, 0.1); color: var(--text-2); }

.search {
  position: relative; display: flex; align-items: center; min-width: 280px; flex: 0 1 360px;
  height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
}
.search:focus-within { border-color: rgba(191, 228, 106, 0.55); box-shadow: 0 0 0 4px rgba(191, 228, 106, 0.1); }
.search .icon { position: absolute; left: 12px; color: var(--muted); }
.search input { width: 100%; height: 100%; padding: 0 12px 0 38px; border: 0; outline: 0; background: transparent; color: var(--text); font: 13.5px var(--font); }
.search input::placeholder { color: #56637c; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  position: sticky; top: 0; text-align: left; padding: 12px 16px; white-space: nowrap;
  font: 700 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  background: rgba(28, 16, 48, 0.9); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: rgba(191, 228, 106, 0.04); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td small { font-size: 11.5px; }
.cell-device { display: flex; align-items: center; gap: 12px; }
.cell-device strong { display: block; color: var(--text); font-weight: 600; }
.cell-device small { display: block; font-size: 11px; }
.device-ico {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: none;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(191, 228, 106, 0.2);
}
.actor-type {
  display: inline-block; padding: 1px 7px; border-radius: 6px; margin-right: 4px;
  font: 600 11px var(--mono); color: var(--accent-2); background: rgba(169, 139, 214, 0.12);
}
details.json summary { cursor: pointer; color: var(--accent); font-size: 12.5px; font-weight: 600; list-style: none; }
details.json summary::-webkit-details-marker { display: none; }
details.json summary::before { content: "▸ "; }
details.json[open] summary::before { content: "▾ "; }
details.json pre {
  margin: 8px 0 0; padding: 10px 12px; max-width: 360px; overflow: auto; border-radius: 8px;
  font: 12px/1.5 var(--mono); color: #e3f5b8; background: rgba(16, 9, 28, 0.8); border: 1px solid var(--border);
}

.empty-row td { padding: 0; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; text-align: center; }
.empty-art {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; margin-bottom: 6px;
  color: var(--accent); background: radial-gradient(circle, rgba(191, 228, 106, 0.18), transparent 70%);
  border: 1px solid rgba(191, 228, 106, 0.22); box-shadow: 0 0 40px -10px rgba(191, 228, 106, 0.5);
}
.empty strong { font-size: 15px; color: var(--text); }
.empty span { max-width: 420px; font-size: 13px; }
.row-hidden { display: none; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; }

/* ---------- erro ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.error-card { display: grid; justify-items: center; gap: 10px; text-align: center; }
.error-code { font-size: 72px; font-weight: 800; line-height: 1; margin: 10px 0 0; }
.error-msg { color: var(--text-2); margin: 0 0 12px; }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, 0.5); display: none; }
  .sidebar-open .sidebar-backdrop { display: block; }
  .shell { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .search { min-width: 0; flex: 1 1 100%; }
  .auth-card { padding: 24px 20px; }
  .donut { width: 160px; height: 160px; margin: 0 auto; }
  .topbar .chip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   ETAPA 2: enrollment, detalhe do dispositivo, formulários
   ========================================================================== */
.btn-success { color: #03140d; background: linear-gradient(135deg, #34d399, #bfe46a); box-shadow: 0 8px 24px -8px rgba(52, 211, 153, 0.55); }
.btn-success:hover { color: #03140d; transform: translateY(-1px); }
.btn-danger { color: #fecaca; background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.4); }
.btn-danger:hover { color: #fff; background: rgba(248, 113, 113, 0.25); border-color: rgba(248, 113, 113, 0.7); }

.alert-success { color: #bbf7d0; border-color: rgba(52, 211, 153, 0.35); background: var(--ok-soft); }
.alert-success .icon { color: var(--ok); }
.banner-danger { background: var(--danger-soft); border: 1px solid rgba(248, 113, 113, 0.35); }
.banner-danger > .icon { color: var(--danger); }
.banner a { font-weight: 600; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.grid-form { grid-template-columns: 1.2fr 1fr; }
.panel + .panel, .grid-3 + .panel { margin-bottom: 14px; }
.content > .panel { margin-bottom: 14px; }

.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-wrap.plain input, .input-wrap.plain select, .input-wrap.plain textarea {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 0; outline: 0; background: transparent;
  color: var(--text); font: 14px var(--font);
}
.input-wrap.plain textarea { height: auto; min-height: 42px; padding: 11px 12px; resize: vertical; }
.input-wrap.plain select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.input-wrap.plain select option { background: var(--surface-solid); color: var(--text); }
.field-error { font-size: 12px; color: var(--danger); }
.hint { position: relative; display: block; margin: 0; padding-left: 22px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
/* Texto corre normal (negrito e links no meio da frase); o ícone fica fixo à esquerda da 1ª linha. */
.hint > .icon:first-child { position: absolute; left: 0; top: 2px; }
.hint .icon { color: var(--ok); }
.hint.callout { padding: 11px 14px 11px 40px; border: 1px solid var(--border); border-radius: 12px; background: rgba(196, 180, 222, 0.05); }
.hint.callout > .icon:first-child { left: 14px; top: 13px; }
.hint.warn.callout { border-color: rgba(251, 191, 36, 0.35); background: var(--warn-soft); }
.hint.warn, .hint.warn .icon { color: var(--warn); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.step-n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; flex: none;
  font: 700 12px var(--mono); color: #2e1a47; background: var(--grad);
}

.tk-active { color: var(--ok); }
.tk-expired, .tk-exhausted { color: var(--muted); }
.tk-revoked { color: var(--danger); }
.device-link { display: inline-flex; align-items: center; gap: 5px; margin: 0 8px 4px 0; font-size: 12.5px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { margin: 0; }
.data-table strong.text { color: var(--text); }

.secret {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px;
  background: rgba(16, 9, 28, 0.85); border: 1px solid rgba(191, 228, 106, 0.28);
  box-shadow: inset 0 0 30px -12px rgba(191, 228, 106, 0.35);
}
.secret code { flex: 1; min-width: 0; word-break: break-all; font-size: 14px; color: #e3f5b8; }
.secret-panel { border-color: rgba(191, 228, 106, 0.35); }
.btn.is-copied { background: linear-gradient(135deg, #34d399, #bfe46a); color: #03140d; }

.device-head { display: flex; align-items: center; gap: 16px; }
.device-ico.lg { width: 56px; height: 56px; border-radius: 16px; }
.device-ico.lg .icon { width: 26px; height: 26px; }
.head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.decision { border-color: rgba(251, 191, 36, 0.3); }
.decision-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.decision-actions > form { margin: 0; }
.reject-form { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; min-width: 280px; margin: 0; }
.reject-form .input-wrap { flex: 1; min-width: 220px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); min-width: 0; }
.kv-wide { grid-template-columns: 220px 1fr; }
.break { word-break: break-all; }
.tag {
  display: inline-block; padding: 1px 7px; margin-left: 4px; border-radius: 6px; font: 700 10.5px var(--mono);
  letter-spacing: .04em; color: var(--text-2); background: rgba(196, 180, 222, 0.12); border: 1px solid var(--border-strong);
}
.tag-ok { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, 0.3); }
.tag-warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.3); }
a.cell-device { color: inherit; }
a.cell-device:hover strong { color: var(--accent); }

@media (max-width: 1100px) {
  .grid-3, .grid-form { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-row, .kv, .kv-wide { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
}

/* ==========================================================================
   Políticas (wallpaper)
   ========================================================================== */
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.policy-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); transition: transform .18s, border-color .18s;
}
.policy-card:hover { color: var(--text); transform: translateY(-2px); border-color: rgba(191, 228, 106, 0.4); }
.policy-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #24153a, #2e1a47); }
.policy-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.policy-type {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: rgba(26, 15, 46, 0.8);
  border: 1px solid rgba(191, 228, 106, 0.3);
}
.policy-body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.policy-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.wall-preview { margin-bottom: 14px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 9; background: #24153a; }
.wall-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.file-input input[type=file] { padding: 9px 12px; height: auto; color: var(--text-2); }
.file-input input[type=file]::file-selector-button {
  margin-right: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: 600 12.5px var(--font); cursor: pointer;
}
.assign-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.assign-form .input-wrap { flex: 1; min-width: 220px; max-width: 420px; }
.tone-warn { color: var(--warn); }

/* Restrições do Windows */
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.optgroup { display: grid; gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(196, 180, 222, 0.03); }
.optgroup legend { padding: 0 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.check-grid ul, .check-grid li { list-style: none; margin: 0; padding: 0; }
.restriction-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.restriction-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; background: rgba(196, 180, 222, 0.05); border: 1px solid var(--border); }
.restriction-list .icon { color: var(--accent); }
.policy-thumb-restrictions { display: flex; align-items: flex-end; padding: 44px 14px 12px; background: radial-gradient(circle at 80% 20%, rgba(169, 139, 214, 0.25), transparent 60%), linear-gradient(135deg, #24153a, #2e1a47); }
.policy-thumb-restrictions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 12px; color: var(--text-2); }
.policy-thumb-restrictions li { display: flex; align-items: center; gap: 6px; }
.policy-thumb-restrictions .icon { color: var(--accent-2); }

/* Bloqueio de sites */
.site-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; max-height: 220px; overflow: auto; }
.site-chip { padding: 3px 9px; border-radius: 7px; font-size: 12px; color: var(--text-2); background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.25); }
textarea.mono { font-family: var(--mono) !important; font-size: 13px !important; line-height: 1.55; }

/* ==========================================================================
   TEMA CLARO  (html[data-theme="light"], definido por theme.js)
   ========================================================================== */
.theme-icon-light { display: none; }
.theme-icon-dark { display: inline-flex; }
:root[data-theme="light"] .theme-icon-light { display: inline-flex; }
:root[data-theme="light"] .theme-icon-dark { display: none; }
.theme-toggle .icon { width: 17px; height: 17px; }
.auth-foot .theme-toggle { width: 28px; height: 28px; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f4fa;
  --bg-2: #efe9f5;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-2: #ffffff;
  --surface-solid: #ffffff;
  --border: rgba(46, 26, 71, 0.09);
  --border-strong: rgba(46, 26, 71, 0.17);
  --text: #2e1a47;
  --text-2: #4b3a63;
  --muted: #7b6c91;
  --accent: #5b2d8e;
  --accent-2: #6f9a22;
  --accent-soft: rgba(91, 45, 142, 0.09);
  --grad: linear-gradient(135deg, #2e1a47 0%, #5b2d8e 100%);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.09);
  --warn: #b45309;
  --warn-soft: rgba(217, 119, 6, 0.11);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.07);
  --violet: #7c3aed;
  --shadow: 0 1px 2px rgba(46, 26, 71, 0.05), 0 10px 30px -14px rgba(46, 26, 71, 0.18);
}
:root[data-theme="light"] a:hover { color: #3f1f66; }
:root[data-theme="light"] ::selection { background: rgba(91, 45, 142, 0.2); }

/* fundo */
:root[data-theme="light"] .bg-grid {
  background-image: linear-gradient(rgba(46, 26, 71, 0.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(46, 26, 71, 0.045) 1px, transparent 1px);
}
:root[data-theme="light"] .bg-glow {
  background: radial-gradient(600px 400px at 12% -5%, rgba(191, 228, 106, 0.12), transparent 70%),
              radial-gradient(700px 500px at 100% 0%, rgba(91, 45, 142, 0.10), transparent 70%);
}

/* botões e selos com texto sobre gradiente */
:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .btn-primary:hover,
:root[data-theme="light"] .avatar,
:root[data-theme="light"] .step-n { color: #fff; }
:root[data-theme="light"] .spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
:root[data-theme="light"] .btn-ghost { background: #fff; }
:root[data-theme="light"] .btn-danger { color: #b91c1c; }
:root[data-theme="light"] .btn-danger:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
:root[data-theme="light"] .alert-error { color: #991b1b; }
:root[data-theme="light"] .alert-success { color: #065f46; }
:root[data-theme="light"] .icon-btn:hover { background: #f1f5f9; }

/* login */
:root[data-theme="light"] .auth-hero { background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(243, 245, 250, 0.3)); }
:root[data-theme="light"] .auth-card {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 30px 80px -30px rgba(46, 26, 71, 0.28), inset 0 1px 0 #fff;
}
:root[data-theme="light"] .input-wrap { background: #fff; }
:root[data-theme="light"] .input-wrap input::placeholder,
:root[data-theme="light"] .search input::placeholder { color: #94a3b8; }
:root[data-theme="light"] .radar-ring { border-color: rgba(91, 45, 142, 0.22); }
:root[data-theme="light"] .radar::before, :root[data-theme="light"] .radar::after { background: rgba(91, 45, 142, 0.14); }

/* estrutura do console */
:root[data-theme="light"] .sidebar { background: linear-gradient(180deg, #ffffff, #f8fafc); }
:root[data-theme="light"] .nav-label,
:root[data-theme="light"] .nav-item.is-disabled { color: #94a3b8; }
:root[data-theme="light"] .nav-item:hover { background: rgba(46, 26, 71, 0.05); }
:root[data-theme="light"] .nav-item.is-active {
  background: linear-gradient(90deg, rgba(91, 45, 142, 0.12), rgba(91, 45, 142, 0.02));
  box-shadow: inset 0 0 0 1px rgba(91, 45, 142, 0.2);
}
:root[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.82); }
:root[data-theme="light"] .crumbs .sep { color: #cbd5e1; }
:root[data-theme="light"] .data-table th { background: #f8fafc; }
:root[data-theme="light"] .data-table tbody tr:hover { background: rgba(91, 45, 142, 0.05); }
:root[data-theme="light"] .donut-track { stroke: rgba(46, 26, 71, 0.08); }
:root[data-theme="light"] .sidebar-backdrop { background: rgba(46, 26, 71, 0.35); }

/* blocos de código / segredos */
:root[data-theme="light"] details.json pre,
:root[data-theme="light"] .secret { background: #f1f5f9; }
:root[data-theme="light"] details.json pre,
:root[data-theme="light"] .secret code { color: #3f1f66; }
:root[data-theme="light"] .secret { box-shadow: none; border-color: rgba(91, 45, 142, 0.3); }

/* miniaturas de política */
:root[data-theme="light"] .policy-thumb,
:root[data-theme="light"] .wall-preview { background: linear-gradient(135deg, #ebe4f3, #f1f5f9); }
:root[data-theme="light"] .policy-thumb-restrictions {
  background: radial-gradient(circle at 80% 20%, rgba(91, 45, 142, 0.16), transparent 60%), linear-gradient(135deg, #f1ebf8, #f8fafc);
}
:root[data-theme="light"] .policy-type { background: rgba(255, 255, 255, 0.92); }

/* ==========================================================================
   Resultado de política + janela "Aplicar regra"
   ========================================================================== */
.status-pill { white-space: nowrap; text-transform: none; }
.state-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.edition-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--warn); white-space: nowrap; }
.policy-table td { vertical-align: middle; }
.detail-cell { min-width: 260px; max-width: 460px; line-height: 1.45; }
.panel-head .head-actions { align-items: center; }
.panel-head h2 .chip { margin-left: 4px; }
.empty.compact { padding: 26px 16px; }

.modal {
  width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 820px); padding: 0; border: 0; border-radius: 18px;
  background: transparent; color: var(--text); overflow: visible;
}
.modal::backdrop { background: rgba(16, 9, 28, 0.62); backdrop-filter: blur(3px); }
:root[data-theme="light"] .modal::backdrop { background: rgba(46, 26, 71, 0.35); }
.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-card {
  display: flex; flex-direction: column; max-height: min(86vh, 820px); border-radius: 18px; overflow: hidden;
  background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.55);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.modal-head h2 { font-size: 21px; margin-top: 2px; }
.modal-foot { display: flex; align-items: center; gap: 6px; margin: 0; padding: 12px 22px 16px; border-top: 1px solid var(--border); }

.tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--border); }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; border: 0;
  border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 13.5px var(--font); cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { display: grid; gap: 10px; padding: 16px 22px; overflow-y: auto; }
.tab-panel[hidden] { display: none; }

.rule-row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(196, 180, 222, 0.04);
}
.rule-row:hover { border-color: var(--border-strong); }
.rule-row form { margin: 0; }
.rule-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(191, 228, 106, 0.22);
}
.rule-icon.is-applied { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, 0.28); }
.rule-body { display: grid; gap: 3px; min-width: 0; }
.rule-body strong { font-size: 14px; }
.rule-summary { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.rule-summary li { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; color: var(--text-2); background: rgba(196, 180, 222, 0.1); }
.rule-warn { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--warn); }
@media (max-width: 560px) {
  .rule-row { grid-template-columns: 1fr; }
  .rule-icon { display: none; }
}

/* ==========================================================================
   Online/offline, inventário e eventos
   ========================================================================== */
.conn { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; font-weight: 600; }
.conn-on { color: var(--ok); }
.conn-off { color: var(--muted); }
.kpi-sub { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.inline-tabs { padding: 0; margin: 0 0 14px; }
.tab-panel.flush { padding: 0; overflow: visible; }
.hw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hw-card { display: grid; gap: 10px; align-content: start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(196, 180, 222, 0.03); }
.hw-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hw-title .icon { color: var(--accent); }
.disk { display: grid; gap: 6px; }
.disk-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
meter { width: 100%; height: 10px; border-radius: 999px; appearance: none; border: 0; background: rgba(196, 180, 222, 0.18); }
meter::-webkit-meter-bar { background: rgba(196, 180, 222, 0.18); border: 0; border-radius: 999px; height: 10px; }
meter::-webkit-meter-optimum-value { background: var(--ok); border-radius: 999px; }
meter::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 999px; }
meter::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 999px; }
meter::-moz-meter-bar { background: var(--ok); border-radius: 999px; }
.nic { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.nic:last-child { border-bottom: 0; padding-bottom: 0; }
.sw-search { max-width: 420px; margin-bottom: 12px; }
.sw-table { max-height: 520px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }

.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.compact-select { min-width: 0; flex: 0 0 auto; }
.compact-select select { height: 100%; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--text); font: 13.5px var(--font); cursor: pointer; }
.compact-select select option { background: var(--surface-solid); color: var(--text); }
@media (max-width: 900px) { .hw-grid { grid-template-columns: 1fr; } }

/* Janela "Nova regra" */
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 8px 22px 18px; }
.type-card {
  display: grid; gap: 6px; align-content: start; padding: 16px; border-radius: 14px; color: var(--text);
  border: 1px solid var(--border); background: rgba(196, 180, 222, 0.04); transition: border-color .15s, transform .15s, background .15s;
}
.type-card:hover { color: var(--text); border-color: rgba(191, 228, 106, 0.5); background: var(--accent-soft); transform: translateY(-2px); }
.type-card strong { font-size: 14.5px; }
.type-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; border-radius: 12px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(191, 228, 106, 0.25);
}
@media (max-width: 560px) { .type-grid { grid-template-columns: 1fr; } }

/* Android: QR de provisionamento e plataforma */
.qr-layout { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.qr-box { padding: 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border-strong); line-height: 0; }
.qr-box svg { width: 260px; max-width: 100%; height: auto; display: block; }
.wifi-extra summary { cursor: pointer; margin-bottom: 8px; }
.platform-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text-2); background: rgba(196, 180, 222, 0.08); white-space: nowrap; }
.platform-tag.android { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: var(--ok-soft); }
.platform-tag.windows { color: var(--accent); border-color: rgba(191, 228, 106, 0.35); background: var(--accent-soft); }
.battery-meter { max-width: 160px; }
@media (max-width: 760px) { .qr-layout { grid-template-columns: 1fr; } .qr-box svg { width: 220px; } }

/* Regra "Apps permitidos" (Android): lista de apps com caixa de seleção */
.app-picker { max-height: 440px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.app-picker .check-col { width: 36px; text-align: center; }
.app-picker input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.app-picker label { cursor: pointer; }
.app-picker .tag { margin-right: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.allowed-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.allowed-list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }

/* Lista de apps da regra: ferramentas e ícones */
.picker-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.picker-tools .sw-search { margin-bottom: 0; flex: 1 1 240px; }
.app-cell { display: inline-flex; align-items: center; gap: 10px; }
.app-cell img, .app-cell .ps-noimg, .app-ico { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.app-ico, .app-cell .ps-noimg { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); color: var(--text-2); }
.app-picker tr.is-new { background: var(--accent-soft); }

/* Janela de busca no estilo da Play Store: sempre clara, como a loja */
.play-modal { width: min(1180px, calc(100vw - 24px)); max-width: none; height: min(92vh, 980px); max-height: none; padding: 0; border: 0; border-radius: 16px; background: #fff; overflow: hidden; }
.play-store { --ps-text: #202124; --ps-muted: #5f6368; --ps-green: #01875f; --ps-green-dark: #056449; --ps-line: #dadce0;
  display: flex; flex-direction: column; height: 100%; background: #fff; color: var(--ps-text); font-family: Roboto, "Segoe UI", Arial, sans-serif; }
.ps-top { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #eee; }
.ps-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; color: var(--ps-muted); white-space: nowrap; }
.ps-brand .icon { width: 26px; height: 26px; color: var(--ps-green); }
.ps-search { flex: 1; display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto; height: 48px; padding: 0 18px; border-radius: 8px; background: #f1f3f4; color: var(--ps-muted); }
.ps-search:focus-within { background: #fff; box-shadow: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15); }
.ps-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ps-text); }
.ps-close { border: 0; background: transparent; color: var(--ps-muted); cursor: pointer; padding: 6px; border-radius: 50%; }
.ps-close:hover { background: #f1f3f4; }
.ps-body { flex: 1; overflow: auto; padding: 24px 40px 32px; }
.ps-status { color: var(--ps-muted); margin: 0 0 12px; }
.ps-status:empty { display: none; }

.ps-hero { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr); gap: 32px; align-items: start; padding-bottom: 28px; border-bottom: 1px solid var(--ps-line); }
.ps-title { font-size: 34px; font-weight: 400; line-height: 1.2; margin: 0; color: var(--ps-text); }
.ps-dev { margin: 6px 0 0; color: var(--ps-green); font-weight: 500; font-size: 16px; }
.ps-genre { margin: 2px 0 0; color: var(--ps-muted); font-size: 14px; }
.ps-summary { margin: 16px 0 0; color: var(--ps-text); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ps-stats { display: flex; align-items: center; gap: 0; margin-top: 20px; }
.ps-hero-icon { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 1px 2px rgba(60, 64, 67, .3); margin-right: 20px; flex: none; }
.ps-stat { display: flex; flex-direction: column; align-items: center; padding: 0 22px; border-left: 1px solid var(--ps-line); }
.ps-stat:first-of-type { border-left: 0; }
.ps-stat strong { font-size: 15px; font-weight: 500; }
.ps-stat span { font-size: 12.5px; color: var(--ps-muted); }
.ps-actions { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.ps-btn { border: 0; border-radius: 8px; background: var(--ps-green); color: #fff; font-weight: 500; cursor: pointer; font-family: inherit; }
.ps-btn:hover { background: var(--ps-green-dark); }
.ps-btn.is-on { background: #e6f4ea; color: var(--ps-green-dark); box-shadow: inset 0 0 0 1px #9fd4b4; }
.ps-btn-lg { min-width: 180px; height: 44px; font-size: 15px; padding: 0 24px; }
.ps-btn-sm { height: 34px; padding: 0 16px; font-size: 13.5px; }
.ps-lib { font-size: 13px; color: var(--ps-green-dark); background: #e6f4ea; padding: 4px 10px; border-radius: 999px; }
.ps-rating { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px 18px; border: 1px solid var(--ps-line); border-radius: 12px; font-size: 15px; }
.ps-age { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 4px; background: #e8710a; color: #fff; font-weight: 700; }
.ps-age.is-free { background: #0f9d58; }
.ps-pkg { margin: 14px 0 0; font-family: var(--mono); font-size: 12px; color: var(--ps-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.ps-shot { height: 300px; width: auto; border-radius: 10px; border: 1px solid #eee; flex: none; scroll-snap-align: start; }

.ps-section { font-size: 20px; font-weight: 400; margin: 28px 0 16px; color: var(--ps-text); }
.ps-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ps-card { position: relative; display: flex; flex-direction: column; gap: 12px; border-radius: 12px; padding: 0 0 12px; cursor: pointer; transition: background .15s; }
.ps-card:hover { background: #f8f9fa; }
.ps-card-media { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #f1f3f4; box-shadow: 0 1px 2px rgba(60, 64, 67, .3); }
.ps-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-card-row { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.ps-card-icon { width: 48px; height: 48px; border-radius: 12px; flex: none; box-shadow: 0 1px 2px rgba(60, 64, 67, .3); }
.ps-card-text { display: flex; flex-direction: column; min-width: 0; }
.ps-card-text strong { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-card-text span { font-size: 13px; color: var(--ps-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-card-meta { color: var(--ps-text) !important; }
.ps-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px; }
.ps-card-foot .ps-pkg { margin: 0; }
.ps-card-lib { position: absolute; top: 10px; left: 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.ps-noimg { display: block; background: #f1f3f4; }
.ps-card-media .ps-noimg { width: 100%; height: 100%; }
.ps-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid #eee; font-size: 13px; color: var(--ps-muted); }
.ps-foot a { color: var(--ps-green); }
.ps-done { border: 1px solid var(--ps-line); background: #fff; color: var(--ps-green); font-weight: 500; border-radius: 8px; height: 38px; padding: 0 20px; cursor: pointer; }
.ps-done:hover { background: #f6fafe; }

@media (max-width: 980px) {
  .ps-hero { grid-template-columns: 1fr; }
  .ps-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-body { padding: 20px; }
}
@media (max-width: 620px) {
  .ps-brand span { display: none; }
  .ps-cards { grid-template-columns: 1fr; }
  .ps-title { font-size: 26px; }
  .ps-shot { height: 220px; }
  .ps-foot { flex-direction: column; align-items: stretch; }
}

/* Lista da regra: visão "Permitidos" x "Apps dos celulares" */
.picker-view button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.picker-view button:hover { color: var(--text); background: rgba(196, 180, 222, 0.07); }
.picker-view button.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(191, 228, 106, 0.3); }
.picker-filter { margin: 0 0 8px; max-width: none; }
.picker-hint { margin: 0 0 10px; }
.view-hidden { display: none; }
.app-picker tr.is-unselected { opacity: .62; }
.app-picker tr.is-unselected:hover { opacity: 1; }
.app-picker table { width: 100%; }
.app-picker .app-cell-text { display: flex; flex-direction: column; min-width: 0; }
.app-picker .app-cell-text small { font-size: 11.5px; word-break: break-all; }
.app-picker .origin-cell { width: 1%; white-space: nowrap; }
.app-picker .origin-cell .tag { display: inline-block; margin: 2px 4px 2px 0; }
@media (max-width: 720px) { .app-picker .origin-cell { white-space: normal; } }

/* Apps fixos da regra Android (não podem ser retirados) */
.fixed-apps { margin: 0 0 14px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); }
.fixed-apps-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.fixed-apps ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fixed-apps li, .allowed-list li.is-fixed { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text); }

/* Cartão "Versão atual" da regra de apps Android */
.apps-rule-card .rule-state { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 4px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.rule-state-text { font-size: 13.5px; color: var(--text-2); }
.rule-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.rule-block-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.rule-block-title .icon { color: var(--accent); }
.rule-sub { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 8px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rule-sub:first-of-type { margin-top: 0; }
.rule-sub small { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.app-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.app-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text); }
.app-chips li img, .app-chips .chip-ico { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.app-chips .chip-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.app-chips li.is-fixed { padding-left: 10px; background: var(--surface-2); border-style: dashed; color: var(--text-2); }
.app-chips li.is-fixed .icon { color: var(--muted); }
.app-chips li.is-empty { border-style: dashed; color: var(--muted); font-weight: 400; }
.app-chips .tag { margin-left: 2px; }
.apps-rule-card .steps { gap: 14px; }
.apps-rule-card .steps li { line-height: 1.5; }
.rule-notes { display: grid; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); }
.rule-notes p { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.rule-notes .icon { flex: none; margin-top: 2px; color: var(--ok); }

/* Celular modelo (etiqueta) */
.ref-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; vertical-align: middle;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; }
.ref-tag .icon { color: #d97706; }
h1 .ref-tag { font-size: 13px; margin-left: 6px; }
.ref-form { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ref-form p { margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.ref-form .btn { justify-self: start; }
.protect-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; line-height: 1.5; }

/* Biblioteca de apps: atualizações pendentes e situação nos celulares */
.panel-attention { border-color: rgba(251, 191, 36, 0.45); box-shadow: var(--shadow), 0 0 0 1px rgba(251, 191, 36, 0.18); margin-bottom: 14px; }
.panel-attention .panel-head .icon { color: var(--warn); }
.inline-form { display: inline-block; margin: 0 4px 0 0; }
.tag-danger { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.35); }

/* Restrições do celular (Android) */
.field-warn { color: var(--warn); }
.field-warn .icon { vertical-align: -2px; }
.optgroup legend .icon { vertical-align: -2px; margin-right: 2px; }
.optgroup .check .tag { margin-left: 4px; font-size: 11px; }
.restriction-group { margin: 16px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); letter-spacing: .02em; }
.restriction-list li.is-off { color: var(--muted); background: transparent; }
.restriction-list li.is-off .icon { color: var(--muted); }

/* Papel de parede (Android): prévia em formato de celular */
.phone-preview { width: 180px; margin: 0 auto 16px; aspect-ratio: 9 / 20; border-radius: 22px; overflow: hidden; border: 6px solid #24153a; box-shadow: 0 0 0 1px var(--border); background: #24153a; }
.phone-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Localizar celular */
.locate-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.locate-form { margin: 8px 0; }
.locate-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.locate-map { position: relative; min-height: 340px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: rgba(196, 180, 222, 0.05); }
.locate-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.locate-map-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: var(--text-2); }
.locate-map-empty .icon { color: var(--muted); }
.locate-side { display: grid; gap: 14px; align-content: start; }
.locate-side .btn { justify-self: start; }
.locate-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.locate-history li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.locate-history li > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.locate-dot { flex: none; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.locate-dot.ok { background: var(--ok); }
.locate-dot.fail { background: var(--warn); }
.locate-foot { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; }
@media (max-width: 860px) { .locate-grid { grid-template-columns: 1fr; } .locate-map { min-height: 260px; } }

/* Verificação em duas etapas */
.auth-wrap.auth-single { grid-template-columns: minmax(0, 480px); justify-content: center; }
.auth-card-head .chip { justify-self: start; }
.mfa-code { letter-spacing: .25em; font-variant-numeric: tabular-nums; font-size: 18px; }
.mfa-help { margin-top: 14px; font-size: 13px; }
.mfa-help summary { cursor: pointer; color: var(--text-2); }
.mfa-qr { display: flex; justify-content: center; margin: 14px 0; }
.mfa-qr svg { width: 260px; max-width: 100%; height: auto; border-radius: 12px; background: #fff; }
.mfa-secret { word-break: break-all; }
.mfa-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 14px 0; padding: 0; list-style: none; }
.mfa-codes li { padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border); background: rgba(196, 180, 222, 0.05); font-size: 15px; text-align: center; }
.mfa-codes-panel { border-color: rgba(251, 191, 36, 0.45); }

/* Conformidade */
.compliance-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.compliance-issues li { line-height: 1.45; }
.compliance-issues li.sev-info { color: var(--muted); }
.compliance-issues .tag { font-size: 11px; margin-right: 2px; }
.compliance-limits { display: flex; align-items: flex-start; gap: 6px; margin-top: 14px; }

/* Programas permitidos */
.allow-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.allow-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 13.5px; }
.allow-list li > span { min-width: 0; overflow-wrap: anywhere; }
.inline-form { display: inline-block; margin: 0 4px 4px 0; }
.allow-callout { margin: 0 0 16px; }
.allow-empty { padding: 28px 16px; }

/* Lista de dispositivos: menos apertada */
#devices-table td { padding: 14px 18px; }
#devices-table th { padding-left: 18px; padding-right: 18px; }
#devices-table .cell-device { min-width: 220px; }
.device-main { display: grid; gap: 4px; min-width: 0; }
.device-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.device-tags:empty { display: none; }
.status-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.user-cell { display: inline-block; line-height: 1.45; }

/* Detalhe do resultado de uma política: item por item, o que falhou primeiro */
.result-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.result-detail li { position: relative; padding-left: 14px; line-height: 1.45; }
.result-detail li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.result-detail li.rd-fail { color: var(--danger); font-weight: 600; }
.result-detail li.rd-fail::before { background: var(--danger); }
.result-detail li.rd-warn { color: var(--warn); }
.result-detail li.rd-warn::before { background: var(--warn); }
.result-why { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--danger); }

/* Miniatura da política: a imagem preenche a caixa 16:9 sem aumentá-la (papel de parede de celular é vertical). */
.policy-thumb { overflow: hidden; }
.policy-thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.policy-thumb > .policy-type { z-index: 1; }
/* Cartões com lista (restrições, apps, sites): altura mínima igual à da imagem, sem cortar texto. */
.policy-thumb.policy-thumb-restrictions { aspect-ratio: auto; min-height: 168px; overflow: visible; }


/* ==========================================================================
   Identidade Tarumã: logo oficial e ajustes de marca
   ========================================================================== */
.brand-logo { display: block; height: auto; }
.brand-logo.for-light { display: none; }
:root[data-theme="light"] .brand-logo.for-dark { display: none; }
:root[data-theme="light"] .brand-logo.for-light { display: block; }
.logo-mark { display: block; object-fit: contain; }
.brand-text small { color: var(--accent); letter-spacing: .02em; }
.hero-logo { width: min(360px, 80%); margin: 6px 0 4px; }
.hero-tagline { margin: 4px 0 0; font-size: 15px; color: var(--text-2); }
.brand-foot { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: 10.5px; }
