/* AXYS V81 | Responsivo, minimalista; preserva dados e regras existentes. */
:root{--v81-border:rgba(156,183,218,.22);--v81-surface:#13181e}
#axs-app #view-dashboard .v80-dashboard-summary-grid{display:block!important;min-width:0}
#axs-app #view-dashboard #axs-meta-card{width:100%;min-height:172px}
#axs-app #view-dashboard #axys-funnel-conversion{display:block!important;grid-column:1/-1;width:100%;min-width:0;padding:24px 27px!important;border-radius:17px;border:1px solid rgba(142,178,225,.22)!important;background:linear-gradient(123deg,rgba(68,101,145,.13),#11151b 82%)!important;margin:2px 0 0!important;box-shadow:none!important}
#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;display:grid!important;gap:0!important}
#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis>div{border-radius:0!important;padding:6px 16px!important;min-width:0}
#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis>div:first-child{padding-left:0!important}
#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis>div:last-child{border-right:0!important}
#view-dashboard .v80-dashboard-summary-grid .v80-summary-card{display:none!important}
/* Seções e navegação internas, uma única janela PF/PJ. */
#v79-finance-dialog{max-width:785px;width:min(94vw,785px);max-height:92dvh;overflow:auto;scroll-behavior:smooth;padding:22px 24px}
#v79-finance-dialog>form{display:block}
#v79-finance-dialog .v81-finance-nav{position:sticky;top:-22px;z-index:2;display:flex;gap:6px;overflow-x:auto;padding:10px 0 13px;background:#131921;border-bottom:1px solid var(--v81-border);scrollbar-width:thin;margin-bottom:10px}
#v79-finance-dialog .v81-finance-nav a{color:#aea4bd;white-space:nowrap;font-size:11px;font-weight:700;padding:8px 13px;border:1px solid rgba(145,175,214,.18);border-radius:999px;text-decoration:none;background:#1a212b}
#v79-finance-dialog .v81-finance-nav a:hover,#v79-finance-dialog .v81-finance-nav a:focus-visible{color:#edf5ff;background:#273548;border-color:#6891c7}
#v79-finance-dialog .v81-finance-sections{display:grid;gap:11px}
#v79-finance-dialog .v81-finance-section{scroll-margin-top:85px;padding:15px 16px;border:1px solid rgba(159,186,221,.15);border-radius:14px;background:rgba(255,255,255,.014)}
#v79-finance-dialog .v81-finance-section-heading{margin:0 0 12px!important;display:grid;gap:3px}
#v79-finance-dialog .v81-finance-section-heading h4{font-size:14px;color:#e1edfc;font-weight:780;letter-spacing:-.01em}
#v79-finance-dialog .v81-finance-section-heading p{font-size:10px;color:#9e95ad;line-height:1.5;margin:0}
#v79-finance-dialog .v81-finance-section .v79-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#v79-finance-dialog .v81-meta-controls{border-top:1px solid rgba(167,193,226,.13);margin-top:14px;padding-top:13px}
#v79-finance-dialog .v81-meta-controls .v80-meta-dialog-content{display:grid;gap:12px}
#v79-finance-dialog .v81-meta-controls .v80-meta-dialog-content>div:first-child{display:none}
#v79-finance-dialog .v81-meta-controls label{display:flex;flex-direction:row;align-items:center;gap:10px;font-size:11px}
#v79-finance-dialog .v81-meta-controls :is(input[type=checkbox],input[type=radio]){width:17px;height:17px;min-width:17px;accent-color:#8dbdfb}
#v79-finance-dialog footer{position:sticky;bottom:-22px;z-index:3;background:#13181e;padding:15px 1px 4px;margin-top:12px;border-top:1px solid rgba(168,197,235,.2)}
/* Gerenciar funções só sob solicitação. Editar número em segunda janela lateral. */
#v79-chip-dialog{width:min(94vw,690px)}
#v79-chip-dialog .v81-role-bar{display:grid;grid-template-columns:auto minmax(130px,1fr) auto;gap:9px;align-items:center;margin-top:14px}
#v79-chip-dialog .v81-role-bar label{font-size:10px;color:#b7c3d3}
#v79-chip-dialog .v81-role-bar select{width:100%;max-width:100%;min-width:0}
#v79-chip-dialog .v81-role-bar button,#v79-chip-dialog .v81-new-chip{border:1px solid rgba(169,202,244,.25);background:#2a3d57;color:#edf5ff;border-radius:11px;padding:11px 14px;font-size:11px;font-weight:720;min-height:40px}
#v79-chip-dialog .v81-new-chip{display:block;width:100%;margin-top:15px}
#v79-chip-dialog .v81-role-list[hidden]{display:none!important}
#v79-chip-dialog .v81-role-list{margin-top:10px}
#v79-chip-dialog .v79-chip-list{max-height:min(300px,33dvh);overflow-y:auto}
#v81-chip-editor-dialog{position:fixed;right:0;top:0;bottom:0;left:auto;margin:0;width:min(485px,100vw);max-height:100dvh;height:100dvh;min-height:100dvh;border-radius:22px 0 0 22px;padding:24px 21px;box-shadow:-22px 0 70px #000b;z-index:100000;overflow-y:auto}
#v81-chip-editor-dialog::backdrop{background:rgba(0,0,0,.7);backdrop-filter:blur(5px)}
#v81-chip-editor-dialog .v79-chip-editor{display:grid;grid-template-columns:1fr 1fr;gap:13px;border:0;padding:0;margin-top:23px}
#v81-chip-editor-dialog .v79-chip-editor label{display:grid;gap:7px;min-width:0}
#v81-chip-editor-dialog .v79-editor-buttons{grid-column:1/-1;display:flex;justify-content:flex-end}
#v81-chip-editor-dialog .v79-note{grid-column:1/-1}
#v81-chip-editor-dialog #v79-chip-active-color,#v81-chip-editor-dialog #v79-chip-inactive-color{padding:5px;cursor:pointer}
#v81-chip-editor-dialog :is(input,select){width:100%;min-width:0}
/* Contexto das funções no topo e na lateral; não altera o papel autenticado. */
#axs-app .v81-role-context{display:grid;gap:5px;padding:9px 10px;margin:4px 5px 10px;border:1px solid rgba(142,173,214,.18);border-radius:11px;background:#12181f}
#axs-app .v81-role-context label{font-size:9px;color:#9aaabf;letter-spacing:.04em;text-transform:uppercase}
#axs-app .v81-role-context select,#axs-app .v81-role-top{min-width:0;width:100%;border:1px solid rgba(154,186,227,.18);border-radius:9px;background:#1a222c;color:#d2e4fc;font-size:11px;padding:8px}
#axs-app .v81-role-top{width:min(185px,19vw)}
/* Auditoria: botão de abrir detalhes e modal com comparação completa. */
#axs-app #view-historico .v81-audit-open{padding:8px 10px;border:1px solid rgba(141,174,218,.28);border-radius:9px;color:#c0d4ee;background:rgba(94,134,186,.08);font-size:11px;white-space:nowrap}
#axs-app #view-historico .v81-audit-open:hover{border-color:#91b9ee;background:#222c38}
.v81-audit-dialog{position:fixed;inset:0;margin:auto;width:min(640px,94vw);max-height:88dvh;overflow-y:auto;background:linear-gradient(140deg,#171f29,#101419);border-radius:19px;border:1px solid rgba(173,199,232,.27);color:#e7eef8;padding:22px;box-shadow:0 30px 90px #000a}
.v81-audit-dialog::backdrop{background:rgba(0,0,8,.82);backdrop-filter:blur(6px)}
.v81-audit-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid rgba(255,255,255,.075);padding-bottom:15px}
.v81-audit-dialog header small{font-size:10px;color:#8fafd8;letter-spacing:.1em}
.v81-audit-dialog h3{font-size:19px;font-weight:800;margin:4px 0;color:#eaf3ff}
.v81-audit-dialog header p{font-size:11px;color:#a9a0b8;line-height:1.7}
.v81-audit-dialog :is(#v81-audit-close,#v81-audit-done){padding:8px 12px;border-radius:9px;color:#dae8fa;background:#26313f;border:1px solid rgba(150,180,220,.19);font-size:12px}
.v81-audit-dialog .v81-audit-field{padding:14px 0;border-bottom:1px solid rgba(255,255,255,.085)}
.v81-audit-dialog .v81-audit-field h4{font-size:12px;color:#dce9fa;margin-bottom:10px;font-weight:750}
.v81-audit-dialog .v81-audit-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.v81-audit-dialog .v81-audit-compare>div{min-width:0;padding:11px;background:rgba(255,255,255,.035);border-radius:11px;overflow-wrap:anywhere}
.v81-audit-dialog .v81-audit-compare small{font-size:9px;letter-spacing:.08em;color:#a49aaf;text-transform:uppercase}
.v81-audit-dialog .v81-audit-compare p{margin-top:6px;font-size:12px;white-space:pre-wrap}
.v81-audit-dialog footer{padding-top:15px;display:flex;justify-content:flex-end}
/* CPA · três alertas animados, valores respeitando limites da operação. */
#axs-app .status-badge-mini.ok,#axs-app .status-badge-mini.normal,#axs-app .status-badge-mini.prejuizo{border:1px solid currentColor;border-radius:999px;padding:5px 11px;background:transparent;display:inline-flex;gap:8px;align-items:center;font-weight:750;font-size:11px}
#axs-app .status-badge-mini.ok{color:#57e0b3;background:#123f3218;border-color:#57e0b34d}
#axs-app .status-badge-mini.normal{color:#f5c769;background:#a9711618;border-color:#f5c76957}
#axs-app .status-badge-mini.prejuizo{color:#ff7d98;background:#84253f1b;border-color:#ff7d9857}


@keyframes v81-beat{0%,100%{opacity:.65;filter:drop-shadow(0 0 1px currentColor);transform:scale(.9)}50%{opacity:1;filter:drop-shadow(0 0 7px currentColor);transform:scale(1.3)}}
@media(max-width:950px){#axs-app .v81-role-top{width:130px}#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:15px!important}#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis>div:nth-child(2){border-right:0!important}#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis>div:nth-child(3){padding-left:0!important}}
@media(max-width:620px){#axs-app #view-dashboard #axys-funnel-conversion{padding:17px!important}#axs-app #view-dashboard #axys-funnel-conversion .axys-funnel-kpis>div{padding:6px!important}#v79-finance-dialog{padding:14px;max-height:95dvh}#v79-finance-dialog .v81-finance-nav{top:-14px}#v79-finance-dialog .v81-finance-section{padding:12px}#v79-finance-dialog .v81-finance-section .v79-form-grid{grid-template-columns:1fr}#v79-chip-dialog .v81-role-bar{grid-template-columns:1fr 1fr}#v79-chip-dialog .v81-role-bar label{grid-column:1/-1}#v81-chip-editor-dialog{width:100vw;border-radius:0;padding:18px}#v81-chip-editor-dialog .v79-chip-editor{grid-template-columns:1fr 1fr}#axs-app .v81-role-top{display:none}.v81-audit-dialog .v81-audit-compare{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#axs-app .status-badge-mini,#axs-app .axys-cpa-alerta{animation:none!important}#v79-finance-dialog{scroll-behavior:auto}}

#v79-finance-dialog .v81-finance-section,#v79-finance-dialog .v81-finance-section *{box-sizing:border-box}
#v79-finance-dialog .v81-finance-section input:not([type=checkbox]):not([type=radio]),#v79-finance-dialog .v81-finance-section select{width:100%;min-width:0;max-width:100%}

/* V82 · pulsação suave no contorno da etiqueta, nunca nas bolinhas. */
#axs-app .status-badge-mini :is(.status-dot,.status-slot),#axs-app .axys-cpa-alerta-dot{animation:none!important;transform:none!important;filter:none!important}
#axs-app .status-badge-mini.ok{--v82-flare:87,224,179}
#axs-app .status-badge-mini.normal{--v82-flare:245,199,105}
#axs-app .status-badge-mini.prejuizo{--v82-flare:255,125,152}
#axs-app .status-badge-mini.ok,#axs-app .status-badge-mini.normal,#axs-app .status-badge-mini.prejuizo{animation:v82-alert 2.5s ease-in-out infinite}
#axs-app .axys-cpa-alerta{animation:v82-alert 2.5s ease-in-out infinite;--v82-flare:245,199,105}
#axs-app .axys-cpa-alerta--ideal{--v82-flare:87,224,179}
#axs-app .axys-cpa-alerta--critico{--v82-flare:255,125,152}
@keyframes v82-alert{0%,100%{box-shadow:0 0 0 0 rgba(var(--v82-flare),0)}50%{box-shadow:0 0 0 3px rgba(var(--v82-flare),.10),0 0 14px rgba(var(--v82-flare),.23)}}
@media(prefers-reduced-motion:reduce){#axs-app .status-badge-mini,#axs-app .axys-cpa-alerta{animation:none!important}}
/* Painel de números e formulário de vínculo */
#v79-chip-dialog{position:fixed;inset:0;margin:auto;width:min(94vw,690px);max-height:min(90dvh,840px);overflow:auto}
#v79-chip-dialog .v81-role-bar{grid-template-columns:auto minmax(120px,1fr) auto}
#v81-chip-editor-dialog #v82-chip-attendant{min-width:0}
.v82-chip-connection{grid-column:1/-1;color:#b9f8d9;background:rgba(26,159,109,.065);border:1px solid rgba(49,189,135,.22);border-radius:10px;padding:10px 12px;font-size:11px;line-height:1.6}
.v82-chip-connection[data-status="fallen"]{color:#ff9eb1;background:rgba(241,80,106,.06);border-color:rgba(241,80,106,.24)}
.v82-chip-connection[data-status="missing"]{color:#f4ca83;border-color:rgba(242,187,99,.3);background:rgba(249,188,55,.06)}
#axs-app .v81-role-context{display:none!important}
/* Top-layer notifications, including when native dialog is open */
#axs-notice-stack[popover]{position:fixed!important;inset:calc(14px + env(safe-area-inset-top)) 14px auto auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;width:min(390px,calc(100vw - 28px))!important;max-width:none!important;overflow:visible!important;pointer-events:none!important;display:grid!important;gap:10px!important}
#axs-notice-stack[popover] .axs-notice{pointer-events:auto!important}
#axs-global-dialog{border:0!important;padding:0!important;margin:auto!important;max-width:none!important;max-height:100dvh!important;overflow:visible!important;width:100vw!important;height:100dvh!important;background:transparent!important;box-shadow:none!important}
#axs-global-dialog::backdrop{background:rgba(1,6,12,.75)!important;backdrop-filter:blur(7px)}
#axs-global-dialog .axs-global-dialog-card{max-height:90dvh;overflow:auto}
@media(max-width:650px){#axs-notice-stack[popover]{inset:calc(12px + env(safe-area-inset-top)) 10px auto 10px!important;width:calc(100vw - 20px)!important}#v81-chip-editor-dialog .v79-chip-editor{grid-template-columns:1fr!important}#v79-chip-dialog .v81-role-bar{grid-template-columns:1fr 1fr}}
