:root {
  --bg: #f4f6fb; --surface: #ffffff; --text: #18202f; --muted: #667085; --border: #e3e7ef;
  --side: #0f1b2d; --side-text: #c9d4e5; --accent: #2f6fed; --accent-2: #12b981; --warn: #f59e0b; --danger: #e5484d;
  --chip: #eef2fb; --code: #0f172a; --code-text: #dbe4f3;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1220; --surface: #121b2d; --text: #e6ebf5; --muted: #93a0b8; --border: #22304a; --side: #070d18; --chip: #1b2740; --code: #050a14; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; overflow-y: auto; }
.brand { font-size: 18px; font-weight: 700; color: #fff; padding: 18px 20px 6px; }
.logo { color: var(--accent-2); }
.tenant-switch { margin: 6px 14px 10px; }
.tenant-switch select { width: 100%; background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.15); }
.tenant-switch select option { color: #000; }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7d8aa3; padding: 14px 20px 4px; }
nav a { display: flex; gap: 8px; padding: 8px 20px; cursor: pointer; color: var(--side-text); border-left: 3px solid transparent; text-decoration: none; }
nav a:hover { background: rgba(255,255,255,.05); }
nav a.active { background: rgba(47,111,237,.18); color: #fff; border-left-color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 14px 20px; font-size: 12px; }
.sidebar-foot a { color: var(--side-text); cursor: pointer; }
main { margin-left: 240px; flex: 1; padding: 0 28px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.topbar h1 { font-size: 21px; margin: 0; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }
.hidden { display: none !important; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.card h4 { margin: 16px 0 8px; font-size: 13px; color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.kpi .label { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.kpi .value { font-size: 23px; font-weight: 700; margin: 4px 0 2px; }
.kpi .value small { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi .sub { font-size: 12px; color: var(--muted); }
.kpi.good .value { color: var(--accent-2); } .kpi.warn .value { color: var(--warn); } .kpi.bad .value { color: var(--danger); } .kpi.accent .value { color: var(--accent); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--chip); }
td.num, th.num { text-align: right; white-space: nowrap; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; cursor: pointer; font: inherit; display: inline-flex; gap: 6px; align-items: center; justify-content: center; text-decoration: none; }
.btn:hover { filter: brightness(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.success { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; } .btn.danger.ghost { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.block { width: 100%; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--chip); white-space: nowrap; }
.b-green { background: #d9f7ea; color: #087a52; } .b-yellow { background: #fff1d6; color: #9a5b00; } .b-red { background: #ffe1e1; color: #b42318; }
.b-blue { background: #e0eaff; color: #1d4ed8; } .b-purple { background: #efe5ff; color: #6b21a8; } .b-gray { background: #eceff3; color: #475467; }
@media (prefers-color-scheme: dark) { .b-green{background:#0d3b2c;color:#6ee7b7}.b-yellow{background:#3d2c08;color:#fcd34d}.b-red{background:#45161a;color:#fca5a5}.b-blue{background:#172a55;color:#93b4ff}.b-purple{background:#2d1a4a;color:#d8b4fe}.b-gray{background:#253047;color:#c3cad8} }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; }
.link { color: var(--accent); cursor: pointer; }
.filters, .tabs { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filters .spacer { flex: 1; }
.tabs { gap: 4px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 14px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); }
.tabs a.active { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
select, input, textarea { font: inherit; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
textarea { width: 100%; min-height: 90px; resize: vertical; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.form label, .stack label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.form input, .form select, .form textarea, .stack input { width: 100%; min-width: 0; }
.form .full { grid-column: 1 / -1; }
.form .help { font-size: 11.5px; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { flex-direction: row !important; align-items: center; gap: 6px !important; color: var(--text) !important; font-size: 13px !important; }
.bar { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; min-width: 110px; }
.bar > span { display: block; height: 100%; background: var(--accent-2); }
.bar.warn > span { background: var(--warn); } .bar.bad > span { background: var(--danger); }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--side); color: #fff; padding: 12px 16px; border-radius: 10px; z-index: 60; max-width: 440px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.err { background: var(--danger); }
.drawer { position: fixed; inset: 0; background: rgba(5,10,20,.45); z-index: 40; display: flex; justify-content: flex-end; }
.drawer-body { width: min(780px, 100%); background: var(--surface); height: 100%; overflow: auto; padding: 24px 28px; position: relative; }
.drawer .close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.drawer h2 { margin: 0 32px 6px 0; font-size: 19px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; margin: 14px 0; }
.kv > div:nth-child(odd) { color: var(--muted); }
pre { background: var(--code); color: var(--code-text); padding: 12px 14px; border-radius: 8px; overflow: auto; font-size: 12px; max-height: 360px; white-space: pre-wrap; word-break: break-word; }
pre .add { color: #6ee7b7; } pre .del { color: #fca5a5; }
.timeline { border-left: 2px solid var(--border); margin: 8px 0 0 6px; padding-left: 14px; }
.timeline div { margin-bottom: 8px; } .timeline small { color: var(--muted); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.alert { padding: 10px 12px; border-radius: 8px; background: #fff1d6; color: #7a4a00; margin: 10px 0; }
.alert.err { background: #ffe1e1; color: #b42318; } .alert.ok { background: #d9f7ea; color: #087a52; } .alert.info { background: #e0eaff; color: #1d4ed8; }
@media (prefers-color-scheme: dark) { .alert { background: #3d2c08; color: #fcd34d; } .alert.err { background: #45161a; color: #fca5a5; } .alert.ok { background: #0d3b2c; color: #6ee7b7; } .alert.info { background: #172a55; color: #93b4ff; } }
.rec { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.rec .t { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.tile .t { font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.tile .d { color: var(--muted); font-size: 12.5px; flex: 1; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty h3 { color: var(--text); }
.markdown h2 { font-size: 16px; margin: 14px 0 6px; } .markdown h3 { font-size: 14px; margin: 12px 0 4px; }
.markdown ul { margin: 4px 0 8px 18px; padding: 0; } .markdown p { margin: 6px 0; }
.scroll { max-height: 540px; overflow: auto; }
canvas { max-height: 280px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.status-dot.ok { background: var(--accent-2); } .status-dot.error { background: var(--danger); } .status-dot.pending { background: var(--warn); }
.jobbar { font-size: 12px; color: var(--muted); }
/* login */
.brand-lg { font-size: 20px; font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.qr { display: grid; place-items: center; background: #fff; border-radius: 10px; padding: 10px; }
.qr img { width: 200px; height: 200px; }
@media print { .sidebar, .topbar .actions, .btn, nav { display: none !important; } main { margin: 0; } body { background: #fff; } }
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .app { flex-direction: column; } .sidebar { position: static; width: 100%; } main { margin: 0; padding: 0 16px 32px; }
  .form { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ login e configuração inicial */
.auth-body { display: block; min-height: 100vh; background: var(--bg); }
.auth-shell { display: grid; grid-template-columns: minmax(320px, 44%) 1fr; min-height: 100vh; }
.auth-brand { background: radial-gradient(1200px 600px at -10% -10%, #2f6fed55, transparent 60%), linear-gradient(160deg, #0b1630 0%, #10264d 55%, #0f3b5f 100%);
  color: #dbe6ff; padding: 48px 56px; display: flex; flex-direction: column; gap: 28px; position: relative; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, #12b98133, transparent 70%); }
.auth-brand .brand-lg { color: #fff; font-size: 22px; }
.auth-brand h2 { color: #fff; font-size: 30px; line-height: 1.2; margin: 24px 0 0; max-width: 460px; font-weight: 700; }
.auth-brand p { margin: 0; max-width: 460px; color: #b8c7e6; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 460px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points li b { color: #fff; display: block; }
.auth-points .ic { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; flex: none; font-size: 16px; }
.auth-foot { margin-top: auto; font-size: 12px; color: #93a6cc; display: flex; gap: 14px; flex-wrap: wrap; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: min(440px, 100%); }
.auth-box.wide { width: min(560px, 100%); }
.auth-box h1 { font-size: 24px; margin: 0 0 6px; }
.auth-box .sub { color: var(--muted); margin: 0 0 22px; }
.auth-box .stack { gap: 14px; }
.auth-box input, .auth-box select { padding: 10px 12px; font-size: 14px; }
.auth-box .btn { padding: 11px 16px; font-weight: 600; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); cursor: pointer; font: inherit; font-size: 12px; padding: 6px; }
.strength { height: 6px; border-radius: 99px; background: var(--chip); overflow: hidden; margin-top: 6px; }
.strength span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.reqs { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.reqs li::before { content: "○ "; }
.reqs li.ok { color: var(--accent-2); } .reqs li.ok::before { content: "✓ "; }
.steps { display: flex; gap: 6px; margin: 0 0 26px; }
.steps .st { flex: 1; }
.steps .st i { display: block; height: 4px; border-radius: 99px; background: var(--border); margin-bottom: 6px; }
.steps .st span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.steps .st.done i, .steps .st.active i { background: var(--accent); }
.steps .st.active span { color: var(--text); font-weight: 600; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--chip); color: var(--text); border-radius: 10px; padding: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: .5px; text-align: center; max-height: none; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 12px; cursor: pointer; }
.choice input { margin-top: 3px; width: auto !important; }
.choice b { display: block; color: var(--text); }
.choice span { font-size: 12.5px; color: var(--muted); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-brand { padding: 28px 24px; } .auth-brand h2 { font-size: 22px; } .auth-points, .auth-foot { display: none; } }
.auth-body { place-items: normal; }
input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none; }
.steps .st { min-width: 0; }
.steps .st span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.qr img { width: 200px; height: 200px; image-rendering: pixelated; }
.stack label.choice, .form label.choice { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--text); }

/* ------------------------------------------------------------------ explorador de custos, funil, mapa e tokenomics */
label.inline { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.filters-card { padding: 12px 14px; } .filters-card .filters { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg a { padding: 5px 12px; font-size: 12px; cursor: pointer; color: var(--muted); }
.seg a.active { background: var(--accent); color: #fff; }
.funnel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stage { border-radius: 12px; padding: 14px; background: var(--chip); position: relative; border: 1px solid var(--border); }
.stage .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stage .value { font-size: 21px; font-weight: 700; margin-top: 4px; }
.stage .sub { font-size: 12px; color: var(--muted); }
.stage::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c, var(--accent)); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.map-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; cursor: pointer; background: var(--surface); display: flex; flex-direction: column; gap: 6px; transition: transform .1s, box-shadow .1s; }
.map-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16,24,40,.08); }
.map-card.active { outline: 2px solid var(--accent); }
.map-card .top { display: flex; justify-content: space-between; align-items: center; }
.map-card .ic { font-size: 24px; }
.map-card .count { font-size: 11px; font-weight: 700; background: var(--chip); border-radius: 99px; padding: 2px 8px; }
.map-card .nm { font-weight: 600; }
.map-card .val { font-size: 18px; font-weight: 700; color: var(--accent-2); }
.map-card .bar { min-width: 0; }
.flow svg { width: 100%; display: block; }
.flow text { font-size: 11.5px; fill: var(--text); }
.flow .lvl { font-size: 11px; fill: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--chip); white-space: nowrap; }
.share { display: flex; align-items: center; gap: 8px; } .share .bar { flex: 1; min-width: 60px; }
@media (max-width: 1100px) { .funnel { grid-template-columns: repeat(2, 1fr); } }

.kpi .value .kpi-sm, .kpi-sm { font-size: 18px; word-break: break-word; line-height: 1.25; display: inline-block; }

/* Valor e eficiência */
.map-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
tr.hl td { background: color-mix(in srgb, var(--accent-2) 10%, transparent); }
b.good { color: var(--accent-2); } b.bad { color: var(--danger); }
#ue-edit input:not([type=checkbox]) { min-width: 70px; }
#cm-disc td, #cm-disc th { padding: 4px 8px; }

/* qualidade dos dados */
.hc { padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.hc:last-child { border-bottom: 0; }
.hc b { color: var(--text); }
.hc-ok b { color: var(--accent-2); } .hc-warn b { color: var(--warn); } .hc-bad b { color: var(--danger); }

#form-smtp-test { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border); }

/* gráficos: caixa com altura definida, cabeçalho com "Ver dados" e tabela dos números */
.chart-box { position: relative; width: 100%; }
.viz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.viz-tools { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.link-btn { background: none; border: 0; padding: 2px 0; color: var(--accent); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible, .kpi.click:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.viz-table { margin-top: 10px; max-height: 320px; overflow: auto; border-top: 1px solid var(--border); }
.viz-table table td, .viz-table table th { padding: 5px 8px; font-variant-numeric: tabular-nums; }
.viz-sub { margin: 14px 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
/* indicadores clicáveis levam ao detalhe */
.kpi.click { cursor: pointer; transition: border-color .15s, transform .15s; }
.kpi.click:hover { border-color: var(--accent); transform: translateY(-1px); }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; }
.pager:empty { display: none; }
#ai-recs [data-more-recs] { margin-top: 8px; }

/* ------------------------------------------------------------------ página inicial por papel, filtros globais, alertas, tour e celular */
.brand { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; margin-left: auto; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.gbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
#g-summary { display: none; }
.gbar.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.gbar-title { background: none; border: 0; padding: 0; font-family: inherit; pointer-events: none; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.home-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.home-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; grid-auto-flow: row dense; margin-bottom: 18px; }
.home-grid > .card { margin-bottom: 0; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
@media (max-width: 1320px) { .home-grid > .span-2 { grid-column: span 3; } .home-grid > .span-4 { grid-column: span 6; } }
@media (max-width: 1000px) { .home-grid > .card { grid-column: span 6; } }
.alert-item { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 10px 2px; font: inherit; color: inherit; cursor: pointer; }
.alert-item:hover { background: var(--chip); }
.alert-item:focus-visible, .attn:focus-visible, .persona:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.alert-ico { color: #d03b3b; font-size: 12px; padding-top: 3px; }
.alert-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.alert-body .t { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.drawer p.cause { font-size: 15px; line-height: 1.5; margin: 0 0 6px; }
.persona-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.persona { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.persona .pi { font-size: 20px; }
.persona.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--chip); }
.cz-cols h3 { margin-top: 6px; }
.cz-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.cz-row label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.cz-row.off label { color: var(--muted); }
.cz-move { display: flex; gap: 4px; }
.sum-lead p { font-size: 16px; line-height: 1.55; margin: 0; }
.sum-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.attn { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--border); padding: 12px 2px; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.attn:first-child { border-top: 0; }
.attn .ai { font-size: 16px; width: 22px; text-align: center; flex: none; }
.attn > span:nth-child(2) { flex: 1; min-width: 0; }
.attn .go { color: var(--muted); font-size: 20px; }
.attn .sum-val { white-space: nowrap; }
.attn .sum-val small { font-weight: 500; color: var(--muted); }
.sum-foot { text-align: center; margin: 8px 0 24px; }
.tour-shade { position: fixed; inset: 0; z-index: 70; background: transparent; }
.tour-shade.dim { background: rgba(5,10,20,.55); }
.tour-spot { position: fixed; z-index: 71; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(5,10,20,.55); outline: 2px solid var(--accent); pointer-events: none; transition: all .2s ease; }
.tour-pop { position: fixed; z-index: 72; width: min(380px, calc(100vw - 16px)); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.tour-pop:focus { outline: none; }
.tour-pop h3 { margin: 2px 0 6px; font-size: 16px; }
.tour-pop p { margin: 0 0 10px; line-height: 1.5; }
.tour-step { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.tour-personas { grid-template-columns: 1fr; }
.tour-personas .persona { padding: 9px 12px; }
.tour-team { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .sidebar { position: sticky; top: 0; z-index: 30; max-height: 100vh; }
  .sidebar:not(.open) #nav, .sidebar:not(.open) .tenant-switch, .sidebar:not(.open) .sidebar-foot { display: none; }
  .brand { padding: 10px 16px; }
  .topbar { position: static; flex-wrap: wrap; padding: 12px 0 10px; }
  .topbar h1 { font-size: 18px; }
  .sync-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .kpis, .sum-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; } .kpi .value { font-size: 19px; }
  .gbar { padding: 10px; }
  .gbar-title { pointer-events: auto; cursor: pointer; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); width: 100%; text-align: left; padding: 4px 0; }
  .gbar-title::after { content: " ▾"; color: var(--muted); }
  .gbar.open .gbar-title::after { content: " ▴"; }
  #g-summary { display: inline; color: var(--muted); font-weight: 400; }
  .gbar:not(.open) > :not(.gbar-title) { display: none !important; }
  .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .gbar select { flex: 1 1 42%; min-width: 0; } .gbar label.inline { flex: 1 1 100%; }
  .drawer-body { padding: 20px 16px; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* modo suporte: superadministrador dentro de um cliente */
.support-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff4e5; color: #7a4100; border: 1px solid #f5c98a; }
.support-bar.hidden { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .support-bar { background: #3a2a12; color: #ffd8a3; border-color: #7a5520; } }
:root[data-theme="dark"] .support-bar { background: #3a2a12; color: #ffd8a3; border-color: #7a5520; }

/* logotipo da empresa e relatório em PDF */
.logo-row { display: flex; align-items: center; gap: 12px; min-height: 56px; margin: 8px 0; }
.logo-preview { max-height: 56px; max-width: 220px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.report-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.report-head img { max-height: 48px; max-width: 200px; object-fit: contain; }
.report-head b { display: block; font-size: 16px; }
@media print {
  body.print-report .page:not(#page-painel), body.print-report #page-painel > :not(#home-grid),
  body.print-report #home-grid > .card:not([data-block=report]), body.print-report #support-bar,
  body.print-report #gbar, body.print-report .topbar, body.print-report #toast { display: none !important; }
  body.print-report #home-grid { display: block; }
  body.print-report [data-block=report] { box-shadow: none; border: 0; padding: 0; }
  body.print-report .report-head { border-bottom: 2px solid #2f6fed; padding-bottom: 10px; margin-bottom: 16px; }
}

/* agendas de liga/desliga */
.pw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0 14px; }
.pw-kpis div { background: var(--chip); border-radius: 10px; padding: 10px 12px; }
.pw-kpis b { display: block; font-size: 20px; } .pw-kpis span { color: var(--muted); font-size: 12px; }
.pw-form { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.pw-days { display: flex; flex-wrap: wrap; gap: 10px; } .pw-days label { display: inline-flex; gap: 4px; align-items: center; font-weight: 400; }
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.pw-candidates { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.pw-cand { display: block; padding: 3px 0; font-weight: 400; }
.pw-item { border-top: 1px solid var(--border); padding: 14px 0; }
.pw-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pw-grid { display: grid; gap: 2px; margin: 6px 0 8px; max-width: 720px; }
.pw-row { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 2px; align-items: center; }
.pw-row span { font-size: 11px; color: var(--muted); }
.pw-row i { height: 14px; border-radius: 2px; background: var(--border); }
.pw-row i.on { background: #12b981; }
.pw-hours b { font-size: 10px; color: var(--muted); font-weight: 400; }
.pw-events summary { cursor: pointer; color: var(--accent); margin-top: 8px; }
@media (max-width: 760px) { .pw-kpis { grid-template-columns: 1fr 1fr; } }
