/* ==========================================================================
   Alpino Glass — shell "Floating Bubbles" (core/base_glass.html)
   Tokens · bolhas em vidro · sidebar · navbar · bottom nav · painéis · folha "Mais"
   Escopo: tudo que é do shell usa o prefixo .ag-* para não colidir com
   alpino-ui.css / alpino-patterns.css (.sidebar, .gs-*, .panel etc.).
   ========================================================================== */

@font-face{
  font-family:"Google Sans"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url("../vendor/fonts/google-sans-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face{
  font-family:"Google Sans"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url("../vendor/fonts/google-sans-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- tokens */
:root{
  --bg:#eef1f6; --surf:#f8f9fb; --surf2:#ffffff;
  --ink:#101828; --mut:#5b6474;
  --brand:#095cf4; --bink:#0a4fd6;
  --soft:rgba(9,92,244,.09); --edge:rgba(16,24,40,.07);
  --glass:rgba(255,255,255,.62); --gline:rgba(255,255,255,.75);
  --sh:0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.07);
  --glow:0 4px 12px rgba(9,92,244,.32);
  --bub-bg:linear-gradient(135deg, rgba(255,255,255,.78), rgba(236,243,255,.62) 55%, rgba(9,92,244,.13));
  --bub-line:rgba(255,255,255,.85);
  --bub-sh:inset 0 1px 0 rgba(255,255,255,.95), 0 4px 14px rgba(9,92,244,.10);
  --cta-bg:linear-gradient(135deg,#4f8dff,#095cf4 52%,#0040b0);
  --cta-sh:inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 6px rgba(0,30,90,.25), 0 4px 12px rgba(9,92,244,.32);
  --danger:#d92d20;
  --card-bg:rgba(250,251,253,.72); --card-line:rgba(255,255,255,.70);
  --card-sh:inset 0 1px 0 rgba(255,255,255,.85), 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.08);
  --card-blur:blur(16px) saturate(150%);

  /* legado do tickets/base.html — telas ainda consomem */
  --ti-primary:#095cf4; --ti-primary-2:#0046bd; --ti-radius:14px;
  --sb-width:216px; --sb-min:50px; --sb-gap:12px;

  --ag-sb-w:216px; --ag-rail:50px; --ag-gap:12px; --ag-nav-h:46px; --ag-bnav-h:58px;
}
body.dark-mode{
  --bg:#0b1220; --surf:#121a2b; --surf2:#1a2336;
  --ink:#e6eaf2; --mut:#9aa4b8;
  --bink:#8fb8ff;
  --soft:rgba(143,184,255,.12); --edge:rgba(255,255,255,.08);
  --glass:rgba(26,35,54,.62); --gline:rgba(255,255,255,.10);
  --card-bg:rgba(18,26,43,.66); --card-line:rgba(255,255,255,.09);
  --card-sh:inset 0 1px 0 rgba(255,255,255,.06), 0 10px 26px rgba(0,0,0,.40);
  --sh:0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04);
  --bub-bg:linear-gradient(135deg, rgba(44,62,104,.62), rgba(24,36,64,.55) 55%, rgba(9,92,244,.28));
  --bub-line:rgba(143,184,255,.16);
  --bub-sh:inset 0 1px 0 rgba(255,255,255,.08), 0 4px 14px rgba(0,0,0,.30);
}

/* ---------------------------------------------------------------- base */
html, body{ font-family:"Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important; }
h1,h2,h3,h4,h5,h6,strong,b{ font-weight:700; }
/* alpino-ui.css faz html+body height:100% overflow-x:hidden → o BODY vira o scroller
   e a janela nunca rola (sticky/scroll-spy quebram). No shell a janela é o scroller. */
html:has(> body.ag-body){ height:auto; overflow-x:hidden; }
body.ag-body{ height:auto; min-height:100%; overflow-x:clip; background-color:var(--bg) !important; color:var(--ink); transition:background-color .3s, color .3s; }
body.ag-body.dark-mode{ background-color:var(--bg) !important; color:var(--ink) !important; }
/* fundo "Tubos": manchas + peças metálicas nas bordas (static/img/alpino-bg-tubos.svg) + grão.
   Substitui no shell o body::before do alpino-ui.css (as telas antigas seguem com ele). */
body.ag-body{ isolation:isolate; }
body.ag-body::before{ display:none !important; }
.app-bg{ position:fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden; }
.app-bg .blob{ position:absolute; border-radius:50%; filter:blur(90px); }
.app-bg .b1{ width:46vw; height:46vh; left:-10vw; top:-14vh; background:#095cf4; opacity:.16; }
.app-bg .b2{ width:38vw; height:40vh; right:-8vw; top:-6vh; background:#fbbf24; opacity:.18; }
.app-bg .b3{ width:46vw; height:42vh; right:8vw; bottom:-18vh; background:#6366f1; opacity:.08; }
.app-bg .tubos{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.5; }
.app-bg .grain{ position:absolute; inset:0; width:100%; height:100%; opacity:.12; mix-blend-mode:multiply; }
body.dark-mode .app-bg .b1{ opacity:.30; }
body.dark-mode .app-bg .b2{ opacity:.12; }
body.dark-mode .app-bg .tubos{ opacity:.32; }
body.dark-mode .app-bg .grain{ opacity:.16; mix-blend-mode:screen; }
@media (max-width:767.98px){
  .app-bg .tubos{ width:300%; left:-100%; }
}

/* botões claros em heros escuros (regra crítica do projeto) */
body.dark-mode a.btn-light, body.dark-mode button.btn-light, body.dark-mode .hd-grad .btn-light{
  color:#0b2a6e !important; background:rgba(255,255,255,.92) !important;
}
body.dark-mode a.btn:not(.btn-light), body.dark-mode button.btn:not(.btn-light){ color:#fff !important; }
body.dark-mode.ag-body .form-select{ background-repeat:no-repeat !important; background-position:right .75rem center !important; background-size:16px 12px !important; }
/* no Glass, btn-light no CONTEÚDO (cards, barras, listas) fica tonal; branco só em superfícies escuras (hero, cabeçalhos em degradê) */
body.dark-mode.ag-body .main-content .btn-light{
  color:var(--bink) !important; background:var(--soft) !important; border-color:var(--edge) !important;
}
body.dark-mode.ag-body .main-content .btn-light:hover{ background:var(--surf2) !important; color:var(--ink) !important; }
body.dark-mode.ag-body .main-content .ag-hero .btn-light, body.dark-mode.ag-body .main-content .hd-grad .btn-light,
body.dark-mode.ag-body .main-content .hero-card .btn-light, body.dark-mode.ag-body .main-content .modal-header .btn-light{
  color:#0b2a6e !important; background:rgba(255,255,255,.92) !important;
}

.ag-shell :focus-visible, .ag-body .ag-panel :focus-visible, .ag-sheet :focus-visible{
  outline:2px solid var(--brand); outline-offset:2px;
}

/* ---------------------------------------------------------------- bolha base */
.ag-bub{
  position:relative;
  background:var(--bub-bg);
  -webkit-backdrop-filter:blur(14px) saturate(160%); backdrop-filter:blur(14px) saturate(160%);
  border:1px solid var(--bub-line);
  box-shadow:var(--bub-sh);
  color:var(--ink);
}
.ag-cta, .ag-bub.is-active{
  background:var(--cta-bg) !important; color:#fff !important;
  border-color:rgba(255,255,255,.28) !important;
  box-shadow:var(--cta-sh) !important;
}
.ag-cta::after, .ag-bub.is-active::after{
  content:""; position:absolute; left:1px; right:1px; top:1px; height:48%;
  border-radius:inherit; border-bottom-left-radius:40% 30%; border-bottom-right-radius:40% 30%;
  background:linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0));
  pointer-events:none;
}

/* painel flutuante em vidro (submenu, menu do usuário, legenda, busca, folha) */
.ag-panel{
  background:var(--glass);
  -webkit-backdrop-filter:blur(18px) saturate(170%); backdrop-filter:blur(18px) saturate(170%);
  border:1px solid var(--gline);
  border-radius:22px;
  box-shadow:0 24px 60px rgba(16,24,40,.18), inset 0 1px 0 rgba(255,255,255,.6);
  color:var(--ink);
}
body.dark-mode .ag-panel{ box-shadow:0 26px 60px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); }
.ag-panel.is-open{ animation:agIn .18s cubic-bezier(.2,.8,.3,1) both; }
@keyframes agIn{ from{ opacity:0; transform:translateY(-4px) scale(.98); } to{ opacity:1; transform:none; } }

/* ---------------------------------------------------------------- layout */
.ag-col{ min-width:0; padding:var(--ag-gap) var(--ag-gap) 0; }
@media (min-width:768px){
  .ag-col{ margin-left:calc(var(--ag-rail) + var(--ag-gap) * 2); padding-left:0; transition:margin-left .24s cubic-bezier(.22,1,.36,1); }
}
@media (min-width:1200px){
  /* sidebar expandida empurra o conteúdo (navbar junto) */
  body:not(.ag-rail) .ag-col{ margin-left:calc(var(--ag-sb-w) + var(--ag-gap) * 2); }
}
/* alpino-ui.css põe overflow-x:hidden no .main-content: cortava a sombra/brilho do hero
   e dos cards na borda (e o hidden força overflow-y auto, cortando em cima também).
   clip só no eixo x + 40px de folga (padding com margem negativa) p/ a sombra respirar: com 12px a
   sombra do hero (blur 34px) era cortada numa linha vertical visível ao lado do card. */
.ag-col > .main-content{
  padding:0 40px 18px; margin:0 -40px !important; min-width:0; max-width:none !important;
  overflow:visible !important; overflow-x:clip !important; overflow-clip-margin:40px;
}
@media (max-width:767.98px){
  .ag-col{ padding:8px 10px 0; }
  .ag-col > .main-content{ padding:0 40px calc(var(--ag-bnav-h) + 28px + env(safe-area-inset-bottom)); margin:0 -40px !important; }
}

/* ---------------------------------------------------------------- sidebar */
.ag-sb{
  position:fixed; z-index:1040;
  top:var(--ag-gap); bottom:var(--ag-gap); left:var(--ag-gap);
  width:var(--ag-sb-w);
  display:flex; flex-direction:column; gap:10px;
  transition:width .24s cubic-bezier(.22,1,.36,1);
}
.ag-logo{
  display:flex; align-items:center; justify-content:flex-start;
  height:46px; padding:0 2px; border:0; background:none; cursor:pointer; flex:0 0 auto;
  border-radius:14px;
}
.ag-logo img{ display:block; filter:drop-shadow(0 6px 14px rgba(9,92,244,.28)); }
.ag-logo-word{ height:40px; width:auto; }
.ag-logo-mark{ width:46px; height:46px; display:none !important; }
.ag-sb-scroll{
  flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden;
  display:flex; flex-direction:column; gap:6px; justify-content:safe center;
  padding:8px 22px 22px 20px; margin:-8px -22px -12px -20px;
  scrollbar-width:none;
}
.ag-sb-scroll::-webkit-scrollbar{ width:0; height:0; }
.ag-sec{
  font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--mut); padding:8px 12px 0; white-space:nowrap;
}
.ag-sec:first-child{ padding-top:0; }
.ag-item{
  display:flex; align-items:center; gap:10px;
  width:100%; min-height:40px; padding:0 12px;
  border-radius:999px; flex:0 0 auto;
  font-size:12.5px; font-weight:600; line-height:1.15; text-align:left;
  text-decoration:none !important; cursor:pointer;
  transition:transform .14s ease, box-shadow .14s ease;
}
.ag-item > i:first-child{ font-size:17px; width:20px; text-align:center; flex:0 0 auto; color:var(--bink); }
.ag-item.is-active > i:first-child{ color:#fff; }
.ag-item .ag-lbl{ min-width:0; flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-item .ag-chev{ font-size:11px; color:var(--mut); flex:0 0 auto; transition:transform .15s ease; }
.ag-item.is-active .ag-chev{ color:rgba(255,255,255,.85); }
.ag-item[aria-expanded="true"] .ag-chev{ transform:translateX(2px); }
.ag-item:hover{ transform:translateX(2px); }
.ag-item:active{ transform:translateX(2px) translateY(1px); }
.ag-item:not(.is-active):hover{ box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 6px 18px rgba(9,92,244,.18); }
.ag-badge{
  min-width:19px; height:19px; padding:0 6px; border-radius:999px; flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--danger); color:#fff; font-size:10.5px; font-weight:700; line-height:1;
  box-shadow:0 2px 6px rgba(217,45,32,.35);
}
.ag-item.is-active .ag-badge{ box-shadow:0 0 0 2px rgba(255,255,255,.85); }

/* trilho (recolhida no desktop / sempre no tablet) */
body.ag-rail .ag-sb{ width:var(--ag-rail); }
body.ag-rail .ag-logo{ justify-content:center; padding:0; margin-left:2px; }
body.ag-rail .ag-logo-word{ display:none; }
body.ag-rail .ag-logo-mark{ display:block !important; }
body.ag-rail .ag-sb-scroll{ align-items:center; padding:8px 20px 22px; margin:-8px -20px -12px; }
body.ag-rail .ag-sec{ font-size:0; padding:2px 0 0; width:22px; height:1px; background:var(--edge); margin:4px auto; }
body.ag-rail .ag-sec:first-child{ display:none; }
body.ag-rail .ag-item{ width:46px; height:46px; min-height:46px; padding:0; justify-content:center; }
body.ag-rail .ag-item:hover{ transform:none; }
body.ag-rail .ag-item .ag-lbl, body.ag-rail .ag-item .ag-chev{ display:none; }
body.ag-rail .ag-item > i:first-child{ width:auto; }
body.ag-rail .ag-item .ag-badge{ position:absolute; top:-3px; right:-3px; min-width:17px; height:17px; font-size:9.5px; padding:0 4px; }

/* scrim transparente (só captura clique fora) */
.ag-scrim{ position:fixed; inset:0; z-index:1039; display:none; background:transparent; }
.ag-scrim.visible{ display:block; }

/* tooltip do trilho */
#agTip{
  position:fixed; z-index:2080; pointer-events:none;
  background:#0b1220; color:#fff; padding:6px 10px; border-radius:9px;
  font-size:12px; font-weight:600; white-space:nowrap;
  box-shadow:0 10px 28px rgba(2,8,23,.30);
  opacity:0; transform:translateY(-50%) translateX(-4px);
  transition:opacity .12s ease, transform .12s ease;
}
#agTip.show{ opacity:1; transform:translateY(-50%); }
#agTip::before{ content:""; position:absolute; right:100%; top:50%; transform:translateY(-50%); border:6px solid transparent; border-right-color:#0b1220; }
body.dark-mode #agTip{ background:#1f2a40; }
body.dark-mode #agTip::before{ border-right-color:#1f2a40; }

/* painel lateral de grupo */
.ag-side-panel{
  position:fixed; z-index:2070; width:300px; padding:10px;
  max-height:calc(100vh - 24px); overflow:auto;
}
.ag-side-panel[hidden]{ display:none !important; }
.ag-side-panel::before{
  content:""; position:absolute; left:-7px; top:var(--caret, 24px);
  width:13px; height:13px; transform:rotate(45deg);
  background:var(--glass); border-left:1px solid var(--gline); border-bottom:1px solid var(--gline);
  border-radius:0 0 0 3px;
}
.ag-ph{ display:flex; align-items:center; gap:10px; padding:4px 6px 10px; margin-bottom:6px; border-bottom:1px solid var(--edge); }
.ag-ph-ico{
  width:34px; height:34px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center;
  background:var(--cta-bg); color:#fff; font-size:15px; box-shadow:var(--cta-sh);
}
.ag-ph .t{ font-size:13px; font-weight:700; line-height:1.15; }
.ag-ph .s{ font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--mut); margin-top:2px; }
.ag-link{
  display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:14px;
  color:var(--ink) !important; text-decoration:none !important;
  transition:background .14s ease, transform .14s ease;
}
.ag-link > i:first-child{
  width:32px; height:32px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center;
  font-size:15px; background:var(--soft); color:var(--bink);
}
.ag-link .txt{ display:grid; min-width:0; flex:1 1 auto; }
.ag-link .t{ font-size:12.5px; font-weight:700; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-link .s{ font-size:11px; color:var(--mut); line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-link .go{ font-size:12px; color:var(--mut); opacity:0; transform:translateX(-3px); transition:opacity .14s, transform .14s; }
.ag-link:hover, .ag-link.is-active, .ag-link.is-kb{ background:var(--soft); transform:translateX(2px); }
.ag-link:hover .go, .ag-link.is-kb .go{ opacity:1; transform:none; }
.ag-link.is-active > i:first-child{ background:var(--cta-bg); color:#fff; box-shadow:var(--glow); }

/* ---------------------------------------------------------------- navbar */
.ag-nav{
  position:sticky; top:var(--ag-gap); z-index:1030;
  display:flex; align-items:center; gap:8px; flex-wrap:nowrap;
  margin-bottom:var(--ag-gap); min-width:0;
}
.ag-pill{
  height:var(--ag-nav-h); border-radius:999px;
  display:flex; align-items:center; gap:6px; padding:0 6px; min-width:0;
}
.ag-nav-sp{ flex:1 1 auto; min-width:0; }
.ag-nav-brand{ display:none; align-items:center; gap:8px; text-decoration:none !important; color:var(--ink) !important; font-weight:700; font-size:14px; flex:0 0 auto; }
.ag-nav-brand img{ width:40px; height:40px; filter:drop-shadow(0 6px 14px rgba(9,92,244,.28)); }

/* breadcrumb (Início › … › página) — some sozinho quando só tem o Início (ex.: na home) */
.ag-crumbs{ padding:0 14px 0 6px; flex:0 1 auto; min-width:0; }
.ag-crumbs:not(:has(li + li)){ display:none; }
.ag-crumbs ol{ display:flex; align-items:center; gap:2px; list-style:none; margin:0; padding:0; min-width:0; }
.ag-crumb{ display:flex; align-items:center; min-width:0; font-size:12.5px; font-weight:600; color:var(--mut); white-space:nowrap; }
.ag-crumb + .ag-crumb::before{
  content:"\F285"; font-family:"bootstrap-icons"; font-size:10px; color:var(--mut); opacity:.7; margin:0 6px 0 4px; flex:0 0 auto;
}
.ag-crumb a{ display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 10px; border-radius:999px; color:var(--bink) !important; text-decoration:none !important; overflow:hidden; text-overflow:ellipsis; max-width:220px; }
.ag-crumb a:hover{ background:var(--soft); }
.ag-crumb:first-child a{ width:34px; padding:0; justify-content:center; font-size:15px; }
.ag-crumb:first-child a:not(:hover){ background:var(--soft); }
.ag-crumb[aria-current="page"]{ color:var(--ink); font-weight:700; padding:0 4px; overflow:hidden; text-overflow:ellipsis; max-width:280px; display:block; line-height:34px; }

.ag-tabs{ padding:0 5px; overflow-x:auto; scrollbar-width:none; flex:0 1 auto; }
.ag-tabs::-webkit-scrollbar{ height:0; }
.ag-tabs:not(:has(*)){ display:none; }
.ag-tab{
  height:36px; padding:0 14px; border-radius:999px; border:0; background:transparent;
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap; flex:0 0 auto;
  font-size:12.5px; font-weight:600; color:var(--mut) !important; text-decoration:none !important;
  position:relative; transition:color .14s, background .14s;
}
.ag-tab:hover{ color:var(--ink) !important; background:var(--soft); }
.ag-tab.is-active, .ag-tab[aria-selected="true"]{ background:var(--cta-bg); color:#fff !important; box-shadow:var(--cta-sh); }

.ag-search{ position:relative; width:min(320px, 30vw); padding:0 8px 0 14px; cursor:text; }
.ag-search > i{ color:var(--mut); font-size:14px; }
.ag-search input{
  flex:1 1 auto; min-width:0; border:0; outline:0; background:transparent; color:var(--ink);
  font-size:12.5px; font-weight:500; height:100%;
}
.ag-search input::placeholder{ color:var(--mut); }
.ag-kbd{
  font:600 10.5px/1 "Google Sans", system-ui, sans-serif; color:var(--mut);
  padding:5px 7px; border-radius:8px; background:var(--soft); border:1px solid var(--edge); white-space:nowrap;
}
.ag-search-x{ display:none; border:0; background:none; color:var(--mut); width:34px; height:34px; border-radius:999px; }

.ag-status{ padding:0 5px 0 12px; gap:4px; }
.ag-tempo{
  display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 10px 0 2px; margin-right:6px;
  border-right:1px solid var(--edge); font-size:12px; font-weight:600; color:var(--ink); white-space:nowrap; cursor:default;
}
.ag-tempo[hidden]{ display:none; }
.ag-tempo .ico{ font-size:17px; line-height:1; color:#f59e0b; }
.ag-tempo .ico.is-nuvem{ color:#3b82f6; }
.ag-tempo .mm{ font-size:11px; font-weight:600; color:var(--mut); }
.ag-tempo .mx{ color:#d92d20; } .ag-tempo .mn{ color:#0a4fd6; margin-left:4px; }
body.dark-mode .ag-tempo .ico{ color:#fcd34d; } body.dark-mode .ag-tempo .ico.is-nuvem{ color:#93c5fd; }
body.dark-mode .ag-tempo .mx{ color:#fca5a5; } body.dark-mode .ag-tempo .mn{ color:#93c5fd; }
.ag-tempo:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; border-radius:8px; }
.ag-online{ display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--ink); padding-right:6px; }
.ag-online .dot{ width:8px; height:8px; border-radius:50%; background:#12b76a; box-shadow:0 0 0 0 rgba(18,183,106,.55); animation:agPulse 2s ease-out infinite; flex:0 0 auto; }
.ag-online.is-off .dot{ background:#98a2b3; animation:none; }
button.ag-online{ border:0; background:none; height:32px; border-radius:999px; padding:0 8px 0 6px; cursor:pointer; }
button.ag-online:hover{ background:var(--soft); }
button.ag-online:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }
.ag-status-wrap{ position:relative; display:flex; flex:0 0 auto; }
@keyframes agPulse{ 0%{ box-shadow:0 0 0 0 rgba(18,183,106,.55); } 70%{ box-shadow:0 0 0 7px rgba(18,183,106,0); } 100%{ box-shadow:0 0 0 0 rgba(18,183,106,0); } }
.ag-ibtn{
  position:relative; width:36px; height:36px; border-radius:999px; border:0; background:transparent;
  display:inline-grid; place-items:center; color:var(--ink) !important; font-size:16px; text-decoration:none !important;
  transition:background .14s;
}
.ag-ibtn:hover{ background:var(--soft); }
.ag-ibtn .ag-badge{ position:absolute; top:1px; right:-1px; min-width:17px; height:17px; font-size:9.5px; padding:0 4px; }
.ag-search-btn{ display:none; }

.ag-user-wrap{ position:relative; flex:0 0 auto; }
.ag-user{
  height:var(--ag-nav-h); border-radius:999px; padding:0 12px 0 5px; gap:9px; cursor:pointer;
  display:flex; align-items:center; max-width:240px;
}
.ag-user img{ width:36px; height:36px; border-radius:50%; object-fit:cover; object-position:center top; flex:0 0 auto; border:2px solid rgba(255,255,255,.9); }
.ag-user .txt{ display:grid; min-width:0; text-align:left; line-height:1.15; }
.ag-user .nm{ font-size:12.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-user .sub{ font-size:11px; color:var(--mut); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-user > i{ font-size:11px; color:var(--mut); transition:transform .15s; }
.ag-user[aria-expanded="true"] > i{ transform:rotate(180deg); }
.ag-user img.ce-glow-red{ box-shadow:0 0 0 2px rgba(220,38,38,.65), 0 0 14px 4px rgba(220,38,38,.60); border-color:transparent; animation:cePulseRed 1.8s ease-in-out infinite; }
.ag-user img.is-simulando{ box-shadow:0 0 0 2px #f4a300, 0 0 14px 4px rgba(244,163,0,.60); border-color:#ffd166; animation:agSimPulse 2s ease-in-out infinite; }
@keyframes agSimPulse{ 50%{ box-shadow:0 0 0 2px #f4a300, 0 0 20px 7px rgba(244,163,0,.45); } }
.ag-um-sim{ display:inline-flex; align-items:center; gap:5px; margin-top:4px; padding:2px 8px; border-radius:999px; font-size:10.5px; font-weight:700; color:#3b2600; background:linear-gradient(135deg,#ffd166,#f4a300); }
body.ag-body .tp-bar{ display:none !important; }
.ag-user img.ce-glow-blue{ box-shadow:0 0 0 2px rgba(9,92,244,.65), 0 0 14px 4px rgba(9,92,244,.55); border-color:transparent; }
@keyframes cePulseRed{ 0%,100%{ box-shadow:0 0 0 2px rgba(220,38,38,.60), 0 0 10px 3px rgba(220,38,38,.45); } 50%{ box-shadow:0 0 0 3px rgba(220,38,38,.75), 0 0 18px 6px rgba(220,38,38,.70); } }
.ag-user-wrap #ceHint{ z-index:1046; cursor:pointer; }

/* menu do usuário */
.ag-user-menu{ position:absolute; right:0; top:calc(100% + 10px); width:290px; padding:8px; z-index:2070; }
.ag-user-menu[hidden]{ display:none !important; }
.ag-um-head{ display:flex; align-items:center; gap:10px; padding:8px 8px 12px; margin-bottom:4px; border-bottom:1px solid var(--edge); }
.ag-um-head img{ width:42px; height:42px; border-radius:50%; object-fit:cover; object-position:center top; flex:0 0 auto; }
.ag-um-head .nm{ font-size:13px; font-weight:700; line-height:1.2; }
.ag-um-head .em{ font-size:11px; color:var(--mut); word-break:break-all; }
.ag-mi{
  display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:0 10px;
  border:0; border-radius:12px; background:transparent; color:var(--ink) !important;
  font-size:12.5px; font-weight:600; text-decoration:none !important; text-align:left; cursor:pointer;
}
.ag-mi > i{ font-size:15px; width:20px; text-align:center; color:var(--bink); flex:0 0 auto; }
.ag-mi > span{ flex:1 1 auto; min-width:0; }
.ag-mi:hover{ background:var(--soft); }
.ag-mi .ag-badge{ margin-left:auto; }
.ag-mi .form-switch{ margin:0; padding-left:2.5em; min-height:0; }
.ag-mi .form-check-input{ cursor:pointer; margin-top:0; }
.ag-mi-sep{ height:1px; background:var(--edge); margin:4px 6px; }
.ag-mi-danger, .ag-mi-danger > i{ color:var(--danger) !important; }
body.dark-mode .ag-mi-danger, body.dark-mode .ag-mi-danger > i{ color:#ff8a80 !important; }

/* resultados da busca */
.ag-search-panel{ position:absolute; top:calc(100% + 10px); right:0; width:min(420px, calc(100vw - 24px)); padding:8px; z-index:2070; max-height:min(460px, 70vh); overflow:auto; }
.ag-search-panel[hidden]{ display:none !important; }
.ag-sr-h{ font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--mut); padding:6px 10px 4px; }
.ag-sr-empty{ font-size:12px; color:var(--mut); padding:10px; }

/* ---------------------------------------------------------------- bottom nav + folha */
.ag-bnav{ display:none; }
.ag-sheet-scrim{ position:fixed; inset:0; z-index:1044; background:rgba(8,12,24,.28); display:none; }
.ag-sheet-scrim.visible{ display:block; }
.ag-sheet{
  position:fixed; left:10px; right:10px; z-index:1045;
  bottom:calc(var(--ag-bnav-h) + 18px + env(safe-area-inset-bottom));
  max-height:min(70vh, 560px); overflow:auto; padding:10px 12px 14px;
}
.ag-sheet[hidden]{ display:none !important; }
.ag-sheet-grip{ width:38px; height:4px; border-radius:999px; background:var(--edge); margin:0 auto 10px; }
.ag-sheet-h{ display:flex; align-items:center; gap:8px; margin-bottom:10px; min-height:36px; }
.ag-sheet-h .t{ font-size:13px; font-weight:700; flex:1 1 auto; min-width:0; }
.ag-sheet-back{
  display:inline-flex; align-items:center; gap:4px; height:36px; padding:0 12px; border-radius:999px;
  font-size:12.5px; font-weight:600; cursor:pointer;
}
.ag-sheet-grid{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px 6px; }
.ag-sheet-b{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:4px 0; min-height:44px;
  background:none; border:0; color:var(--ink) !important; text-decoration:none !important; text-align:center;
}
.ag-sheet-b .bub{
  width:52px; height:52px; border-radius:999px; display:grid; place-items:center; font-size:19px; color:var(--bink);
}
.ag-sheet-b .bub .ag-badge{ position:absolute; top:-2px; right:-2px; min-width:17px; height:17px; font-size:9.5px; padding:0 4px; }
.ag-sheet-b .lb{ font-size:11px; font-weight:600; line-height:1.15; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; max-width:100%; }
.ag-sheet-b.is-active .bub{ background:var(--cta-bg); color:#fff; box-shadow:var(--cta-sh); }
.ag-sheet-list{ display:grid; gap:4px; }

/* ---------------------------------------------------------------- responsivo */
@media (max-width:1199.98px){
  .ag-search{ display:none; }
  .ag-search-btn{ display:inline-grid; }
  .ag-user{ padding:0 5px; }
  .ag-user .txt, .ag-user > i{ display:none; }
  .ag-nav.is-searching .ag-search{
    display:flex; position:absolute; left:0; right:0; top:0; width:auto; z-index:2; padding-right:4px;
  }
  .ag-nav.is-searching .ag-search .ag-kbd{ display:none; }
  .ag-nav.is-searching .ag-search-x{ display:inline-grid; place-items:center; }
}
@media (max-width:767.98px){
  .ag-sb{ display:none; }
  .ag-nav{ flex-wrap:wrap; top:8px; row-gap:8px; gap:6px; }
  .ag-nav-brand{ display:flex; }
  .ag-nav::before{ content:""; position:absolute; z-index:-1; inset:-8px -10px -6px; pointer-events:none; background:linear-gradient(var(--bg) 72%, transparent); }
  .ag-tabs{ order:10; flex:1 1 100%; height:42px; }
  .ag-crumbs{ order:9; flex:1 1 100%; height:40px; overflow-x:auto; scrollbar-width:none; }
  .ag-crumbs::-webkit-scrollbar{ height:0; }
  .ag-crumbs ol:has(> li:nth-child(4)) > li:not(:first-child):not(:nth-last-child(-n+2)){ display:none; }
  .ag-crumbs ol:has(> li:nth-child(4)) > li:nth-last-child(2)::before{ content:"\2026\00a0\00a0\F285"; }
  .ag-crumbs .ag-crumb a{ max-width:130px; }
  .ag-crumbs .ag-crumb[aria-current="page"]{ flex:1 1 auto; max-width:none; }
  .ag-crumb a{ height:30px; max-width:160px; }
  .ag-crumb:first-child a{ width:30px; }
  .ag-crumb[aria-current="page"]{ line-height:30px; max-width:200px; }
  .ag-tab{ height:32px; padding:0 12px; }
  /* abas centralizadas na linha; margem automática (e não justify-content:center) para não cortar a 1ª aba quando a pílula rola */
  .ag-tabs > .ag-tab:first-child{ margin-left:auto; }
  .ag-tabs > .ag-tab:last-child{ margin-right:auto; }
  .ag-status{ padding:0 4px 0 10px; height:42px; }
  .ag-online .txt{ display:none; }
  .ag-tempo .mm{ display:none; }
  .ag-tempo{ padding-right:8px; margin-right:4px; }
  .ag-online{ padding-right:2px; }
  .ag-user{ height:42px; }
  .ag-user img{ width:34px; height:34px; }
  .ag-nav.is-searching .ag-search{ height:42px; }

  .ag-bnav{
    position:fixed; z-index:1036; left:10px; right:10px;
    bottom:calc(10px + env(safe-area-inset-bottom));
    height:var(--ag-bnav-h); border-radius:999px; padding:0 6px;
    display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); align-items:center;
  }
  .ag-bn{
    position:relative; height:48px; min-width:44px; border-radius:999px; border:0; background:transparent;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    color:var(--mut) !important; text-decoration:none !important; font-size:10.5px; font-weight:600;
  }
  .ag-bn > i{ font-size:18px; line-height:1; color:var(--bink); }
  .ag-bn.is-active{ background:var(--cta-bg); color:#fff !important; box-shadow:var(--cta-sh); }
  .ag-bn.is-active > i{ color:#fff; }
  .ag-bn .ag-badge{ position:absolute; top:2px; left:calc(50% + 4px); min-width:17px; height:17px; font-size:9.5px; padding:0 4px; }

  #globalToasts{ bottom:calc(var(--ag-bnav-h) + 16px + env(safe-area-inset-bottom)) !important; }
  .alpino-session-stack:not(.is-mounted), .push-convite, .ia-mini{ bottom:calc(var(--ag-bnav-h) + 22px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width:429.98px){ .ag-nav-brand span{ display:none; } }
@media (max-width:339.98px){ .ag-tempo{ display:none !important; } }

/* ---------------------------------------------------------------- toasts de vidro (todas as telas Glass)
   Sem mudar markup: o tom vem do .bg-* do header (showToast / messages) ou do .text-bg-* do toast. */
body.ag-body .toast{
  --st:#095cf4; --st-ink:#0a4fd6;
  width:min(380px, calc(100vw - 32px)); max-width:100%; border-radius:20px !important; overflow:hidden; color:var(--ink) !important;
  background:linear-gradient(135deg, color-mix(in srgb, var(--st) 16%, transparent), color-mix(in srgb, var(--st) 5%, transparent) 62%), rgba(250,251,253,.84) !important;
  border:1px solid color-mix(in srgb, var(--st) 30%, rgba(255,255,255,.7)) !important;
  -webkit-backdrop-filter:blur(18px) saturate(160%); backdrop-filter:blur(18px) saturate(160%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 14px 34px rgba(16,24,40,.16), 0 6px 18px color-mix(in srgb, var(--st) 22%, transparent) !important;
}
body.ag-body .toast:has(.bg-success), body.ag-body .toast.text-bg-success{ --st:#12b76a; --st-ink:#067647; }
body.ag-body .toast:has(.bg-danger),  body.ag-body .toast.text-bg-danger{  --st:#f04438; --st-ink:#b42318; }
body.ag-body .toast:has(.bg-warning), body.ag-body .toast.text-bg-warning{ --st:#f79009; --st-ink:#b54708; }
body.ag-body .toast:has(.bg-info),    body.ag-body .toast.text-bg-info,
body.ag-body .toast:has(.bg-primary), body.ag-body .toast.text-bg-primary{ --st:#095cf4; --st-ink:#0a4fd6; }
body.ag-body .toast:has(.bg-secondary), body.ag-body .toast.text-bg-secondary{ --st:#64748b; --st-ink:#334155; }
body.ag-body .toast .toast-header{
  background:transparent !important; color:var(--ink) !important; border:0; padding:10px 10px 2px 12px; gap:0;
}
body.ag-body .toast .toast-header > i:first-child{
  width:30px; height:30px; flex:0 0 auto; margin-right:10px !important; border-radius:999px; display:grid; place-items:center;
  font-size:14px; color:#fff; background:var(--st);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px color-mix(in srgb, var(--st) 40%, transparent);
}
body.ag-body .toast .toast-header strong{ font-size:13px; font-weight:700; color:var(--st-ink); }
body.ag-body .toast .toast-header small{ font-size:11px; color:var(--mut) !important; opacity:1 !important; }
body.ag-body .toast .toast-body{ background:transparent !important; color:var(--ink) !important; font-size:13px; line-height:1.4; padding:0 14px 12px 52px; }
body.ag-body .toast:not(:has(.toast-header)){ border-left:4px solid var(--st) !important; }
body.ag-body .toast:not(:has(.toast-header)) .toast-body{ padding:12px 14px; }
body.ag-body .toast .btn-close, body.ag-body .toast .btn-close-white{ filter:none; opacity:.55; width:.7em; height:.7em; }
body.ag-body .toast .btn-close:hover{ opacity:.9; }
body.ag-body .toast a{ color:var(--st-ink); font-weight:600; }
body.dark-mode.ag-body .toast{
  background:linear-gradient(135deg, color-mix(in srgb, var(--st) 24%, transparent), color-mix(in srgb, var(--st) 7%, transparent) 62%), rgba(18,26,43,.86) !important;
  border-color:color-mix(in srgb, var(--st) 36%, transparent) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 14px 34px rgba(0,0,0,.5), 0 6px 18px color-mix(in srgb, var(--st) 18%, transparent) !important;
}
body.dark-mode.ag-body .toast:has(.bg-success), body.dark-mode.ag-body .toast.text-bg-success{ --st-ink:#6ce9a6; }
body.dark-mode.ag-body .toast:has(.bg-danger),  body.dark-mode.ag-body .toast.text-bg-danger{  --st-ink:#fda29b; }
body.dark-mode.ag-body .toast:has(.bg-warning), body.dark-mode.ag-body .toast.text-bg-warning{ --st-ink:#fec84b; }
body.dark-mode.ag-body .toast:has(.bg-info), body.dark-mode.ag-body .toast.text-bg-info,
body.dark-mode.ag-body .toast:has(.bg-primary), body.dark-mode.ag-body .toast.text-bg-primary{ --st-ink:#8fb8ff; }
body.dark-mode.ag-body .toast:has(.bg-secondary), body.dark-mode.ag-body .toast.text-bg-secondary{ --st-ink:#cbd5e1; }
body.dark-mode.ag-body .toast .btn-close{ filter:invert(1) grayscale(1); }

/* ---------------------------------------------------------------- biblioteca de pastas e arquivos (.lib-*) no Glass
   Mesmo markup do alpino-ui.css; aqui só o visual: cabeçalho tonal, linhas em pílula, chips nos tokens. */
body.ag-body .lib-crumb a{ color:var(--mut); }
body.ag-body .lib-crumb a:hover{ color:var(--bink); }
body.ag-body .lib-crumb .lib-crumb-ico, body.ag-body .lib-crumb > .bi-chevron-right{ color:var(--mut); }
body.ag-body .lib-crumb .cur{ color:var(--ink); }
body.ag-body .lib-top-count{ display:inline-flex; align-items:center; height:24px; padding:0 10px; border-radius:999px; font-size:11px; font-weight:700; color:var(--bink); background:var(--soft); }
body.ag-body .lib-tbl{ border-top:0; display:grid; gap:4px; }
body.ag-body .lib-row{ border-bottom:0; border-radius:14px; padding:9px 10px; transition:background .14s ease, box-shadow .14s ease; }
body.ag-body .lib-row:not(.lib-head){ background:var(--surf2); border:1px solid var(--edge); }
body.ag-body .lib-row:not(.lib-head):hover{ background:var(--surf2); border-color:rgba(9,92,244,.28); box-shadow:0 6px 16px rgba(9,92,244,.10); border-radius:14px; }
body.dark-mode.ag-body .lib-row:not(.lib-head){ background:rgba(255,255,255,.035); }
body.dark-mode.ag-body .lib-row:not(.lib-head):hover{ background:rgba(255,255,255,.06); border-color:rgba(143,184,255,.30); }
body.ag-body .lib-head{ padding:9px 10px; border-radius:12px; background:var(--soft); color:var(--bink); font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
body.ag-body .lib-head > *{ color:var(--bink) !important; font-size:11px !important; font-weight:700; }
body.ag-body .lib-row .c-nome .nm{ color:var(--ink); font-size:13.5px; }
body.ag-body .lib-row .c-nome a.nm:hover, body.ag-body .lib-row .c-nome button.nm:hover{ color:var(--bink); }
body.ag-body .lib-row .c-nome .sub, body.ag-body .lib-row .c-mod, body.ag-body .lib-row .c-tam{ color:var(--mut); }
body.ag-body .lib-person{ background:var(--soft); color:var(--ink); }
body.ag-body .lib-busca input{ height:38px; border-radius:999px; background:var(--surf2); border-color:var(--edge); color:var(--ink); }
body.ag-body .lib-row.drop-hot, body.ag-body .lib-row.is-drop-hot{ background:var(--soft) !important; box-shadow:inset 0 0 0 1.5px var(--brand) !important; border-radius:14px; }

/* ---------------------------------------------------------------- gráficos Glass (static/js/alpino-charts.js + ApexCharts)
   Card de vidro normal; o gráfico entra com fade/subida e a série anima pelo ApexCharts. */
.ag-chart{ position:relative; min-width:0; opacity:0; transform:translateY(8px) scale(.985); transition:opacity .5s ease, transform .6s cubic-bezier(.22,1,.36,1); }
.ag-chart.is-in{ opacity:1; transform:none; }
.ag-chart svg, .ag-chart .apexcharts-canvas{ overflow:visible !important; }
.ag-chart .apexcharts-legend-text{ color:var(--ink) !important; }
.ag-chart .apexcharts-tooltip.apexcharts-theme-dark{ background:rgba(16,24,40,.94) !important; border:1px solid rgba(255,255,255,.08) !important; border-radius:12px !important; box-shadow:0 10px 26px rgba(0,0,0,.3) !important; }
.ag-chart .apexcharts-tooltip-title{ background:transparent !important; border-bottom-color:rgba(255,255,255,.1) !important; }
.ag-chart-legend{ display:grid; gap:6px; margin-top:10px; }
.ag-chart-leg{ display:flex; align-items:center; gap:10px; padding:7px 10px; border-radius:12px; background:var(--soft); font-size:12.5px; font-weight:600; color:var(--ink); }
.ag-chart-leg .d{ width:10px; height:10px; border-radius:999px; flex:0 0 auto; background:var(--c); box-shadow:0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.ag-chart-leg .v{ margin-left:auto; font-weight:700; }
.ag-chart-leg .p{ color:var(--mut); font-weight:600; font-size:11.5px; min-width:38px; text-align:right; }
@media (prefers-reduced-motion:reduce){ .ag-chart{ opacity:1; transform:none; transition:none; } }

/* ================================================================ componentes de página
   Reutilizáveis em qualquer tela no shell Glass (documentados no PADROES_UI_ALPINO.md §15).
   ================================================================ */

/* tons de ícone (círculo tonal) — contraste AA nos dois temas */
.ag-tn-blue{ --tn-bg:rgba(9,92,244,.11); --tn-fg:#0a4fd6; }
.ag-tn-cyan{ --tn-bg:rgba(8,145,178,.12); --tn-fg:#0e7090; }
.ag-tn-green{ --tn-bg:rgba(6,118,71,.12); --tn-fg:#067647; }
.ag-tn-amber{ --tn-bg:rgba(181,71,8,.12); --tn-fg:#b54708; }
.ag-tn-red{ --tn-bg:rgba(217,45,32,.11); --tn-fg:#b42318; }
.ag-tn-purple{ --tn-bg:rgba(105,56,239,.11); --tn-fg:#5925dc; }
body.dark-mode .ag-tn-blue{ --tn-bg:rgba(143,184,255,.14); --tn-fg:#8fb8ff; }
body.dark-mode .ag-tn-cyan{ --tn-bg:rgba(103,227,249,.13); --tn-fg:#67e3f9; }
body.dark-mode .ag-tn-green{ --tn-bg:rgba(50,213,131,.14); --tn-fg:#6ce9a6; }
body.dark-mode .ag-tn-amber{ --tn-bg:rgba(253,176,34,.14); --tn-fg:#fec84b; }
body.dark-mode .ag-tn-red{ --tn-bg:rgba(249,112,102,.15); --tn-fg:#fda29b; }
body.dark-mode .ag-tn-purple{ --tn-bg:rgba(155,138,251,.15); --tn-fg:#bdb4fe; }

/* contador em bolinha colorida (ao lado de títulos) */
.ag-n{
  min-width:20px; height:20px; padding:0 6px; border-radius:999px; flex:0 0 auto;
  display:inline-grid; place-items:center; color:#fff; font-size:11px; font-weight:700; line-height:1;
  background:var(--c, var(--brand)); box-shadow:0 2px 6px rgba(16,24,40,.18);
}

/* hero fino de página (degradê sólido — sem backdrop-filter: vaza nos cantos) */
.ag-hero{
  position:relative; overflow:hidden; isolation:isolate; margin-bottom:12px;
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:10px 12px 10px 14px; border-radius:20px; color:#fff;
  background:linear-gradient(112deg, #0b4ad6 0%, #091c48 55%, #05070e 100%);
  border:1px solid rgba(255,255,255,.14); background-clip:padding-box;
  box-shadow:0 14px 34px rgba(9,28,72,.28), inset 0 1px 0 rgba(255,255,255,.18);
}
.ag-hero::before{ content:""; position:absolute; z-index:-1; left:-8%; top:-60%; width:60%; height:220%; pointer-events:none; background:radial-gradient(closest-side, rgba(96,165,250,.45), rgba(96,165,250,0)); }
.ag-hero::after{
  content:""; position:absolute; z-index:-1; inset:0 0 0 45%; pointer-events:none; opacity:.35;
  background-image:linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size:22px 22px;
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 40%); mask-image:linear-gradient(90deg, transparent, #000 40%);
}
.ag-hero-l{ display:flex; align-items:center; gap:12px; min-width:0; }
.ag-hero-ico{
  width:36px; height:36px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; font-size:16px; color:#fff;
  background:linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); border:1px solid rgba(255,255,255,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35);
}
.ag-hero-tx{ min-width:0; }
.ag-hero-t{ font-size:17px; font-weight:700; line-height:1.2; margin:0; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 0 18px rgba(147,197,253,.45); }
.ag-hero-s{ font-size:11.5px; margin:1px 0 0; color:rgba(255,255,255,.82); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-hero-s strong{ color:#fff; font-weight:600; }
.ag-hero-a{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
.ag-hb{
  position:relative; display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 13px; border-radius:999px;
  color:#fff !important; text-decoration:none !important; font-size:12.5px; font-weight:600; cursor:pointer;
  background:linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.08));
  border:1px solid rgba(255,255,255,.28);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 4px 14px rgba(0,0,0,.18);
  transition:transform .14s ease, background .14s ease;
}
.ag-hb:hover{ transform:translateY(-1px); background:linear-gradient(135deg, rgba(255,255,255,.28), rgba(255,255,255,.12)); }
.ag-hb.is-hl{ background:#fff; color:#0b2a6e !important; border-color:#fff; box-shadow:0 6px 18px rgba(0,0,0,.22); }
.ag-hb .filter-dot{ position:absolute; top:-2px; right:-2px; }

/* KPIs em pílula — <a class="ag-kpi"> = filtro de 1 clique (.active liga) */
.ag-kpis{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:12px; margin-bottom:12px; }
.ag-kpi{
  display:flex; align-items:center; gap:10px; min-width:0; min-height:56px; padding:8px 12px 8px 8px;
  border-radius:999px; text-decoration:none !important; color:var(--ink) !important;
  transition:transform .14s ease, box-shadow .14s ease;
}
.ag-kpi:hover{ transform:translateY(-1px); box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 8px 22px rgba(9,92,244,.16); }
.ag-kpi .ic{ width:32px; height:32px; border-radius:999px; display:grid; place-items:center; font-size:14px; flex:0 0 auto; background:var(--tn-bg, var(--soft)); color:var(--tn-fg, var(--bink)); }
.ag-kpi .tx{ display:grid; min-width:0; flex:1 1 auto; }
.ag-kpi .tt{ display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; line-height:1.2; min-width:0; }
.ag-kpi .tt > span:first-child{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-kpi .sb{ font-size:11px; color:var(--mut); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-kpi .go{ font-size:12px; color:var(--mut); opacity:0; transform:translateX(-4px); transition:opacity .14s, transform .14s; flex:0 0 auto; }
.ag-kpi:hover .go, .ag-kpi:focus-visible .go{ opacity:1; transform:none; }
.ag-kpi.active{ background:var(--cta-bg) !important; color:#fff !important; border-color:rgba(255,255,255,.28) !important; box-shadow:var(--cta-sh) !important; }
.ag-kpi.active .ic{ background:rgba(255,255,255,.22); color:#fff; }
.ag-kpi.active .sb, .ag-kpi.active .go{ color:rgba(255,255,255,.85); }
.ag-kpi.active .ag-n{ background:#fff !important; color:#0b2a6e; }

/* card de conteúdo + cabeçalho (ícone tonal · título/sub · ações) */
.ag-card{
  background:var(--card-bg); border:1px solid var(--card-line); border-radius:20px; padding:14px;
  -webkit-backdrop-filter:var(--card-blur); backdrop-filter:var(--card-blur);
  box-shadow:var(--card-sh); min-width:0; position:relative; display:flex; flex-direction:column; color:var(--ink);
}
.ag-ch{ display:flex; align-items:center; gap:10px; margin-bottom:12px; min-width:0; }
.ag-ch > .min-w-0{ flex:1 1 auto; }
.ag-ci{ width:32px; height:32px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; font-size:15px; background:var(--tn-bg, var(--soft)); color:var(--tn-fg, var(--bink)); }
.ag-ct{ font-size:13px; font-weight:700; line-height:1.2; display:flex; align-items:center; gap:6px; min-width:0; }
.ag-ct > span:first-child{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-cs{ font-size:11px; color:var(--mut); line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ag-chip{
  display:inline-flex; align-items:center; gap:5px; height:30px; padding:0 12px; border-radius:999px; flex:0 0 auto;
  font-size:11.5px; font-weight:600; color:var(--bink) !important; text-decoration:none !important; cursor:pointer;
}
.ag-chips{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:-2px 0 12px; }
.ag-chips:empty{ display:none; }

@media (max-width:1199.98px){
  .ag-kpi .go{ display:none; }
  .ag-hb > span:not(.filter-dot){ display:none; }
  .ag-hb{ width:32px; height:32px; padding:0; justify-content:center; }
}
@media (max-width:767.98px){
  .ag-hero{ padding:9px 10px 9px 12px; border-radius:18px; gap:8px; }
  .ag-hero-t{ font-size:16px; }
  .ag-hero-ico{ display:none; }
  .ag-kpis{ gap:8px; }
  .ag-kpi{ justify-content:center; padding:6px; gap:6px; min-height:48px; }
  .ag-kpi .tx, .ag-kpi .tt{ display:contents; }
  .ag-kpi .tt > span:first-child, .ag-kpi .sb{ display:none; }
}
@media (prefers-reduced-motion: reduce){
  .ag-kpi, .ag-hb{ transition:none; }
  .ag-kpi:hover, .ag-hb:hover{ transform:none; }
}

/* ================================================================ DataTable no Glass
   Só no shell novo (body.ag-body): as telas do shell antigo seguem com a faixa azul do alpino-ui.
   Cabeçalho tonal (sem faixa sólida), tabela sem cantos arredondados, linhas e controles nos tokens.
   ================================================================ */
body.ag-body .table.table-alpino{
  --bs-table-bg:transparent; --bs-table-color:var(--ink); --bs-table-border-color:var(--edge);
  --bs-table-hover-bg:var(--soft); --bs-table-hover-color:var(--ink);
  --bs-table-accent-bg:transparent; --bs-table-striped-bg:transparent;
  --table-radius:0;
  color:var(--ink);
}
body.ag-body .table-alpino thead th{
  background:var(--soft) !important; color:var(--bink) !important;
  border:0 !important; border-bottom:1px solid var(--edge) !important; border-radius:0 !important;
  font-size:10.5px !important; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  height:36px;
}
body.ag-body .table-alpino tbody tr > *{ border-radius:0 !important; }
body.ag-body table.dataTable.table-alpino thead th:first-child,
body.ag-body table.dataTable.table-alpino tbody td:first-child{ padding-left:12px; }
body.ag-body table.dataTable.table-alpino thead th:last-child,
body.ag-body table.dataTable.table-alpino tbody td:last-child{ padding-right:12px; }
body.ag-body .table-alpino tbody td{
  color:var(--ink) !important; border-bottom:1px solid var(--edge) !important; font-size:12.5px;
}
body.ag-body .table-alpino tbody tr:last-child > td{ border-bottom:0 !important; }
body.ag-body .table-alpino.table-hover > tbody > tr:hover > *{ background-color:var(--soft) !important; color:var(--ink) !important; --bs-table-bg-state:transparent; }
body.ag-body .table-alpino thead th span.dt-column-order{ opacity:.75; }
body.ag-body .table-alpino td.dt-empty{ color:var(--mut) !important; padding:22px 0 !important; text-align:center; }

/* moldura: a tabela fica num bloco com borda suave, cantos retos */
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table{
  border:1px solid var(--edge); background:var(--surf2); overflow:hidden; margin:10px 0 0 !important;
}
/* tabela mais larga que o card: a moldura ROLA na horizontal (com overflow:hidden as
   colunas da direita sumiam sem barra — ex.: Diário Auxiliar · Contas a Pagar). A
   barra é estilizada para ficar visível em repouso (a do macOS some). No Chrome,
   scrollbar-width/scrollbar-color ANULAM o ::-webkit-scrollbar e a barra volta a ser
   a de sobreposição (0 px, invisível): por isso elas ficam só para o Firefox. */
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table{
  overflow-x:auto; overflow-y:hidden;
}
@supports not selector(::-webkit-scrollbar){
  body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table{ scrollbar-width:thin; scrollbar-color:var(--brand) var(--soft); }
}
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table::-webkit-scrollbar{ height:6px; }
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table::-webkit-scrollbar-track{ background:var(--soft); }
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table::-webkit-scrollbar-thumb{ background:var(--brand); border-radius:999px; border:1px solid var(--soft); }
body.dark-mode.ag-body .dt-container:has(table.table-alpino) .dt-layout-table{ background:rgba(255,255,255,.02); }
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-row{ margin:0 !important; }
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table > *{ padding:0 !important; }
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-table table.table-alpino{ margin:0 !important; }
body.ag-body .dt-container:has(table.table-alpino) .dt-layout-row:last-child{ margin-top:10px !important; }

/* controles: por página, busca, Excel, paginação */
body.ag-body .dt-container:has(table.table-alpino){ color:var(--ink); font-size:12.5px; }
body.ag-body .dt-container:has(table.table-alpino) .dt-length label,
body.ag-body .dt-container:has(table.table-alpino) .dt-search label,
body.ag-body .dt-container:has(table.table-alpino) .dt-info{ color:var(--mut); font-size:12px; font-weight:500; }
body.ag-body .dt-container:has(table.table-alpino) .dt-search input,
body.ag-body .dt-container:has(table.table-alpino) .dt-length select{
  height:34px; border-radius:12px; border:1px solid var(--edge) !important;
  background-color:var(--surf2) !important; color:var(--ink) !important; font-size:12.5px;
  box-shadow:inset 0 1px 2px rgba(16,24,40,.04);
}
body.ag-body .dt-container:has(table.table-alpino) .dt-search input{ min-width:220px; padding:0 12px; }
body.ag-body .dt-container:has(table.table-alpino) .dt-search input::placeholder{ color:var(--mut); }
body.ag-body .dt-container:has(table.table-alpino) .dt-search input:focus,
body.ag-body .dt-container:has(table.table-alpino) .dt-length select:focus{
  border-color:var(--brand) !important; box-shadow:0 0 0 3px var(--soft) !important; outline:0;
}
body.ag-body .dt-container:has(table.table-alpino) .dt-buttons .btn,
body.ag-body table.table-alpino th.dt-type-numeric:not(.text-end), body.ag-body table.table-alpino td.dt-type-numeric:not(.text-end),
body.ag-body table.table-alpino th.dt-type-date:not(.text-end), body.ag-body table.table-alpino td.dt-type-date:not(.text-end){ text-align:left; }
body.ag-body .form-control::file-selector-button{ background:var(--soft); color:var(--bink); border-color:var(--edge); font-weight:600; }
body.dark-mode.ag-body .form-control::file-selector-button{ background:var(--surf); color:var(--ink); }
body.ag-body .form-control:hover:not(:disabled)::file-selector-button{ background:var(--surf2); }
body.ag-body div.dt-processing{
  background:var(--surf2) !important; color:var(--ink) !important; border:1px solid var(--edge) !important;
  border-radius:14px !important; box-shadow:var(--sh) !important; font-size:12.5px; font-weight:600; padding:8px 10px !important;
}
body.ag-body div.dt-processing > div:last-child > div{ background:var(--brand); }
body.ag-body .dt-buttons .btn{
  height:34px; padding:0 14px; border-radius:999px !important; font-size:12px; font-weight:600;
  display:inline-flex; align-items:center; gap:2px;
  background:#e6f0ff !important; color:#0a4fd6 !important;
  border:1px solid rgba(9,92,244,.22) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 2px 8px rgba(9,92,244,.10) !important;
  transition:background .15s, box-shadow .15s, transform .15s;
}
body.ag-body .dt-buttons .btn i{ color:inherit; }
body.ag-body .dt-buttons .btn:hover,
body.ag-body .dt-buttons .btn:focus-visible{
  background:#d4e5ff !important; color:#0846bd !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 6px 18px rgba(9,92,244,.20) !important;
}
body.ag-body .dt-buttons .btn:active{ transform:translateY(1px); }
body.dark-mode.ag-body .dt-buttons .btn{
  background:rgba(143,184,255,.16) !important; color:#a9c8ff !important;
  border-color:rgba(143,184,255,.30) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 2px 10px rgba(0,0,0,.25) !important;
}
body.dark-mode.ag-body .dt-buttons .btn:hover,
body.dark-mode.ag-body .dt-buttons .btn:focus-visible{
  background:rgba(143,184,255,.24) !important; color:#cfe0ff !important;
}
body.ag-body .dt-container:has(table.table-alpino) .pagination{ gap:4px; margin:0; }
body.ag-body .dt-container:has(table.table-alpino) .page-link{
  min-width:32px; height:32px; padding:0 10px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px !important; border:0 !important; background:transparent !important;
  color:var(--ink) !important; font-size:12px; font-weight:600; box-shadow:none !important;
}
body.ag-body .dt-container:has(table.table-alpino) .page-link:hover{ background:var(--soft) !important; }
body.ag-body .dt-container:has(table.table-alpino) .page-item.active .page-link,
body.ag-body .dt-container:has(table.table-alpino) .dt-paging-button.current .page-link{
  background:var(--cta-bg) !important; color:#fff !important; box-shadow:var(--cta-sh) !important;
}
body.ag-body .dt-container:has(table.table-alpino) .page-item.disabled .page-link{ color:var(--mut) !important; opacity:.55; }

/* ================================================================ modais no Glass
   Só no shell novo: card de vidro, cabeçalho fino no degradê do hero, fechar em bolha.
   ================================================================ */
body.ag-body .modal-backdrop.show{ opacity:.38; }
body.ag-body .modal .modal-content{
  border-radius:22px; overflow:hidden; background:var(--surf) !important; color:var(--ink) !important;
  border:1px solid var(--gline); box-shadow:0 30px 80px rgba(9,28,72,.35);
}
body.ag-body .modal .modal-header{
  background:linear-gradient(112deg, #0b4ad6 0%, #091c48 60%, #05070e 100%) !important; color:#fff !important;
  border:0; padding:12px 14px 12px 18px; min-height:56px;
}
body.ag-body .modal .modal-title{ font-size:15px; font-weight:700; color:#fff; }
body.ag-body .modal .modal-header .btn-close{
  filter:none; opacity:1; width:32px; height:32px; padding:0; margin:0 0 0 auto; border-radius:999px;
  background:rgba(255,255,255,.16) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/11px no-repeat;
  border:1px solid rgba(255,255,255,.28); box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
}
body.ag-body .modal .modal-header .btn-close:hover{ background-color:rgba(255,255,255,.26); }
body.ag-body .modal .modal-body{ padding:16px 18px; }
body.ag-body .modal .modal-footer{ border-top:1px solid var(--edge); background:var(--surf); padding:10px 14px; }
body.dark-mode.ag-body .modal .modal-content{ background:var(--surf) !important; color:var(--ink) !important; }
body.dark-mode.ag-body .modal .modal-header{ background:linear-gradient(112deg, #0b3aa8 0%, #0a1a40 60%, #05070e 100%) !important; }
body.ag-body .modal .modal-footer .btn-light{ color:var(--bink); background:var(--soft); border:1px solid var(--edge); border-radius:999px; font-weight:600; }
body.ag-body .modal .modal-footer .btn-light:hover{ background:var(--surf2); color:var(--ink); }
/* ação destrutiva (Excluir/Remover/Confirmar perigoso): pílula vermelha em degradê, par do CTA azul */
body.ag-body .modal .btn-danger, body.ag-body .offcanvas .btn-danger, body.ag-body .ag-form-ft .btn-danger{
  display:inline-flex; align-items:center; justify-content:center; gap:.35rem; min-height:36px; padding:6px 16px;
  border:0; border-radius:999px; font-weight:700; color:#fff;
  background-image:linear-gradient(135deg, #d92d20, #f04438); box-shadow:0 6px 14px rgba(217,45,32,.28);
  transition:filter .12s ease, transform .12s ease, box-shadow .12s ease;
}
body.ag-body .modal .btn-danger > i, body.ag-body .offcanvas .btn-danger > i, body.ag-body .ag-form-ft .btn-danger > i{ margin:0 !important; }
body.ag-body .modal .btn-danger:hover:not(:disabled), body.ag-body .offcanvas .btn-danger:hover:not(:disabled),
body.ag-body .ag-form-ft .btn-danger:hover:not(:disabled){ color:#fff; filter:brightness(1.06); transform:translateY(-1px); box-shadow:0 8px 18px rgba(217,45,32,.34); }
body.ag-body .modal .btn-danger:active, body.ag-body .offcanvas .btn-danger:active, body.ag-body .ag-form-ft .btn-danger:active{ transform:translateY(0); }
body.ag-body .modal .btn-danger:focus-visible, body.ag-body .offcanvas .btn-danger:focus-visible,
body.ag-body .ag-form-ft .btn-danger:focus-visible{ outline:none; box-shadow:0 0 0 .25rem rgba(217,45,32,.30); }
body.ag-body .modal .btn-danger:disabled, body.ag-body .offcanvas .btn-danger:disabled{ background-image:none; background:#cbd5e1; box-shadow:none; }
body.dark-mode.ag-body .modal .btn-danger:disabled, body.dark-mode.ag-body .offcanvas .btn-danger:disabled{ background:rgba(255,255,255,.14); color:rgba(255,255,255,.5); }
body.dark-mode.ag-body .modal .modal-body .btn-light, body.dark-mode.ag-body .modal .modal-footer .btn-light{
  color:var(--bink) !important; background:var(--soft) !important; border:1px solid var(--edge) !important;
}
body.dark-mode.ag-body .modal .modal-body .btn-light:hover, body.dark-mode.ag-body .modal .modal-footer .btn-light:hover{ background:var(--surf2) !important; color:var(--ink) !important; }
body.ag-body .modal .modal-body, body.ag-body .modal .modal-footer{ font-size:13.5px; }
body.dark-mode.ag-body .modal .form-control, body.dark-mode.ag-body .modal .form-select{ background-color:var(--surf2) !important; color:var(--ink) !important; border-color:rgba(255,255,255,.12) !important; }
body.dark-mode.ag-body .modal .form-select{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa4b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}
body.ag-body .modal .form-control, body.ag-body .modal .form-select{
  border-radius:12px; border:1px solid var(--edge); background-color:var(--surf2); color:var(--ink); min-height:38px; font-size:13px;
}
body.ag-body .modal .form-control-sm, body.ag-body .modal .form-select-sm{ min-height:34px; font-size:12.5px; border-radius:10px; }
body.ag-body .modal .form-control::placeholder{ color:var(--mut); opacity:.85; }
body.ag-body .modal .form-control:focus, body.ag-body .modal .form-select:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--soft); background-color:var(--surf2); color:var(--ink); }
body.ag-body .modal .form-label{ font-size:12.5px; font-weight:600; color:var(--ink); margin-bottom:5px; }
body.dark-mode.ag-body .modal .form-control, body.dark-mode.ag-body .modal .form-select{ border-color:rgba(255,255,255,.12); color-scheme:dark; }
body.dark-mode.ag-body .modal .form-select{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa4b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat:no-repeat; background-position:right .75rem center; background-size:16px 12px;
}
body.ag-body .modal .title-inline .s{ font-size:11.5px; font-weight:500; opacity:.78; line-height:1.3; }

/* formulário de página (.ag-form): mesmos campos dos modais Glass; card estreito = .ag-form.is-narrow */
.ag-form{ gap:0; }
.ag-form.is-narrow{ max-width:640px; width:100%; margin-inline:auto; }
.ag-form .form-label{ font-size:12.5px; font-weight:600; color:var(--ink); margin-bottom:5px; }
.ag-form .form-label .req{ color:#d92d20; }
.ag-form .form-control, .ag-form .form-select{
  border-radius:12px; border:1px solid var(--edge); background-color:var(--surf2); color:var(--ink); min-height:40px; font-size:13px;
  box-shadow:inset 0 1px 2px rgba(16,24,40,.04);
}
.ag-form textarea.form-control{ min-height:96px; }
.ag-form .form-control-sm, .ag-form .form-select-sm{ min-height:34px; font-size:12.5px; border-radius:10px; }
.ag-form .form-control::placeholder{ color:var(--mut); opacity:.85; }
.ag-form .form-control:focus, .ag-form .form-select:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--soft); background-color:var(--surf2); color:var(--ink); }
.ag-form .form-control[readonly], .ag-form .form-control:disabled{ background-color:var(--soft); color:var(--bink); }
.ag-form .form-control.is-invalid, .ag-form .form-select.is-invalid{ border-color:#d92d20; }
.ag-form .form-check-input{ border-color:var(--edge); background-color:var(--surf2); }
.ag-form .form-check-input:checked{ background-color:var(--brand); border-color:var(--brand); }
.ag-form .form-text, .ag-form .ag-hint{ color:var(--mut) !important; font-size:11.5px; line-height:1.45; margin-top:4px; }
.ag-form .ag-err, .ag-form .errorlist, .ag-form .invalid-feedback{ color:#b42318; font-size:12px; margin-top:4px; }
.ag-form ul.errorlist{ list-style:none; padding:0; margin:4px 0 0; }
.ag-form .ag-form-ft{ display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:auto; padding-top:16px; border-top:1px solid var(--edge); }
.ag-form .ag-form-ft .btn-light{ color:var(--bink); background:var(--soft); border:1px solid var(--edge); border-radius:999px; font-weight:600; }
.ag-form .ag-form-ft .btn-light:hover{ background:var(--surf2); color:var(--ink); }
.ag-form .ag-form-ft .btn-danger{ border-radius:999px; font-weight:600; }
.ag-form .ag-form-err{ display:flex; gap:8px; align-items:flex-start; padding:10px 12px; margin-bottom:14px; border-radius:14px; font-size:12.5px;
  background:color-mix(in srgb, #d92d20 12%, transparent); border:1px solid color-mix(in srgb, #d92d20 35%, transparent); color:#912018; }
body.dark-mode .ag-form .ag-err, body.dark-mode .ag-form .errorlist, body.dark-mode .ag-form .invalid-feedback{ color:#fda29b; }
body.dark-mode .ag-form .ag-form-err{ color:#fecdca; }
body.dark-mode .ag-form .form-control, body.dark-mode .ag-form .form-select{ border-color:rgba(255,255,255,.12); background-color:var(--surf2); color:var(--ink); color-scheme:dark; }
body.dark-mode .ag-form .form-select{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa4b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat:no-repeat; background-position:right .75rem center; background-size:16px 12px;
}
@media (max-width:575.98px){ .ag-form .ag-form-ft > *{ flex:1 1 auto; justify-content:center; } }

/* ================================================================ offcanvas no Glass (filtros / ações)
   Só no shell novo, para TODO .offcanvas-end:not(.ia-offcanvas) (offcanvas-glass, filter-canvas, offcanvas-actions):
   painel flutuante de vidro, cabeçalho no degradê do hero (igual aos modais), campos nos tokens,
   (fora o widget da IA, .ia-offcanvas, que tem visual próprio) modo em pílula segmentada (.btn-group) e linha de ações final fixa no rodapé.
   ================================================================ */
body.ag-body .offcanvas-backdrop{ background:#0b1220 !important; }
body.ag-body .offcanvas-backdrop.show{ opacity:.22 !important; }
body.ag-body .offcanvas.offcanvas-end:not(.ia-offcanvas){
  top:12px; right:12px; bottom:12px; height:auto; width:min(calc(100vw - 24px), 420px) !important;
  border:1px solid var(--gline) !important; border-radius:24px !important; overflow:hidden;
  background:var(--surf) !important; color:var(--ink) !important;
  -webkit-backdrop-filter:none; backdrop-filter:none;
  box-shadow:0 30px 80px rgba(9,28,72,.30), 0 2px 8px rgba(9,28,72,.08) !important;
}
body.ag-body .offcanvas.offcanvas-end:not(.ia-offcanvas):not(.show):not(.showing),
body.ag-body .offcanvas.offcanvas-end:not(.ia-offcanvas).hiding{ transform:translateX(calc(100% + 24px)); }
body.dark-mode.ag-body .offcanvas.offcanvas-end:not(.ia-offcanvas){ box-shadow:0 30px 80px rgba(0,0,0,.6) !important; }

body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header{
  background:linear-gradient(112deg, #0b4ad6 0%, #091c48 60%, #05070e 100%); color:#fff;
  padding:12px 14px 12px 16px; min-height:60px; border:0; gap:10px; flex:0 0 auto;
}
body.dark-mode.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header{ background:linear-gradient(112deg, #0b3aa8 0%, #0a1a40 60%, #05070e 100%); }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-title{ font-size:15px; font-weight:700; color:#fff !important; display:flex; align-items:center; gap:8px; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header .text-muted,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header .small{ color:rgba(255,255,255,.72) !important; font-size:11.5px; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .title-inline{ display:flex; align-items:center; gap:10px; min-width:0; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header .ti-ico{
  width:36px; height:36px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; font-size:15px;
  background:rgba(255,255,255,.14) !important; color:#fff !important; border:1px solid rgba(255,255,255,.24);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header .btn-close{
  filter:none !important; opacity:1; width:32px; height:32px; padding:0; margin:0 0 0 auto; border-radius:999px; flex:0 0 auto;
  background:rgba(255,255,255,.16) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/11px no-repeat;
  border:1px solid rgba(255,255,255,.28); box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-header .btn-close:hover{ background-color:rgba(255,255,255,.26); }

body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body{ padding:16px 16px 0; font-size:13px; scrollbar-width:thin; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body > :last-child{ margin-bottom:16px; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .form-label,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body label.fw-semibold,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .fw-semibold.mb-1{ font-size:12.5px; font-weight:600 !important; color:var(--ink); margin-bottom:5px; display:block; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body label > .bi:first-child,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .fw-semibold > .bi:first-child,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .section-head > .bi:first-child{ color:var(--bink); }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .section-head{
  font-size:10.5px !important; font-weight:700 !important; letter-spacing:.07em !important; text-transform:uppercase; color:var(--mut) !important;
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .text-muted,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .form-text{ color:var(--mut) !important; font-size:11.5px; line-height:1.45; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body hr{ border-color:var(--edge); opacity:1; }

body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-control,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-select{
  border-radius:12px; border:1px solid var(--edge); background-color:var(--surf2); color:var(--ink);
  min-height:38px; font-size:13px; box-shadow:inset 0 1px 2px rgba(16,24,40,.04);
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-control-sm,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-select-sm{ min-height:34px; font-size:12.5px; border-radius:10px; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-control::placeholder{ color:var(--mut); opacity:.8; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-control:focus,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-select:focus{ border-color:var(--brand); box-shadow:0 0 0 3px var(--soft); background-color:var(--surf2); color:var(--ink); }
body.dark-mode.ag-body .offcanvas-end:not(.ia-offcanvas) .form-control,
body.dark-mode.ag-body .offcanvas-end:not(.ia-offcanvas) .form-select{ border-color:rgba(255,255,255,.12); color-scheme:dark; }
body.dark-mode.ag-body .offcanvas-end:not(.ia-offcanvas) .form-select{
  background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa4b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat:no-repeat !important; background-position:right .75rem center !important; background-size:16px 12px !important;
  background-color:var(--surf2) !important;
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .form-check-input:checked{ background-color:var(--brand); border-color:var(--brand); }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .input-group-text{ border-radius:12px; border-color:var(--edge); background:var(--soft); color:var(--bink); font-size:12px; font-weight:600; }

body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-group{
  display:flex; gap:3px; padding:3px; border-radius:999px; background:var(--soft); border:1px solid var(--edge);
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-group > .btn{
  flex:1 1 0; border:0 !important; border-radius:999px !important; margin:0 !important; min-height:32px;
  font-size:12.5px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; gap:4px;
  background:transparent !important; color:var(--mut) !important; box-shadow:none !important;
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-group > .btn:hover{ color:var(--ink) !important; background:var(--surf2) !important; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-group > .btn.btn-primary,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-group > .btn.active,
body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-group > .btn-check:checked + .btn{
  background:var(--cta-bg) !important; color:#fff !important; box-shadow:var(--cta-sh) !important;
}

body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .btn-light,
body.dark-mode.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .btn-light{
  border-radius:999px; border:1px solid var(--edge) !important; background:var(--soft) !important; color:var(--bink) !important;
  font-weight:600; min-height:36px; display:inline-flex; align-items:center; justify-content:center; gap:4px;
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body .btn-light:hover{ background:var(--surf2) !important; }
body.ag-body .offcanvas-end:not(.ia-offcanvas) .btn-alpino-cta{ border-radius:999px; min-height:36px; background-image:var(--cta-bg); box-shadow:var(--cta-sh); }

/* linha de ações final (Limpar · Aplicar) fica presa no rodapé enquanto o formulário rola */
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body form > .d-flex.gap-2:last-child{
  position:sticky; bottom:0; z-index:2; margin:4px -16px 0 !important; padding:12px 16px 16px;
  background:var(--surf); border-top:1px solid var(--edge);
}
body.ag-body .offcanvas-end:not(.ia-offcanvas) .offcanvas-body > form:last-child{ margin-bottom:0; }
@media (max-width:575.98px){
  body.ag-body .offcanvas.offcanvas-end:not(.ia-offcanvas){ top:8px; right:8px; bottom:8px; width:calc(100vw - 16px) !important; border-radius:20px !important; }
}

/* ================================================================ Inteligência Alpino (offcanvas .ia-offcanvas) no Glass
   Mesmo painel flutuante dos outros offcanvas (12px das bordas, raio 24, --surf, cabeçalho no degradê do hero),
   mas com miolo de chat: bolhas nos tokens, fontes/ações em pílula e compositor único (clipe · texto · enviar).
   ================================================================ */
body.ag-body .ia-offcanvas{
  top:12px; right:12px; bottom:12px; height:auto; width:min(calc(100vw - 24px), 540px) !important;
  border:1px solid var(--gline) !important; border-radius:24px !important; overflow:hidden;
  background:var(--surf) !important; color:var(--ink);
  -webkit-backdrop-filter:none; backdrop-filter:none;
  box-shadow:0 30px 80px rgba(9,28,72,.30), 0 2px 8px rgba(9,28,72,.08) !important;
}
body.ag-body .ia-offcanvas::before{ display:none; }
body.ag-body .ia-offcanvas:not(.show):not(.showing),
body.ag-body .ia-offcanvas.hiding{ transform:translateX(calc(100% + 24px)); }
body.dark-mode.ag-body .ia-offcanvas{ background:var(--surf) !important; color:var(--ink); box-shadow:0 30px 80px rgba(0,0,0,.6) !important; }

body.ag-body .ia-offcanvas .ia-head{
  background:linear-gradient(112deg, #0b4ad6 0%, #091c48 60%, #05070e 100%);
  padding:12px 14px 12px 14px; min-height:64px; gap:10px; flex:0 0 auto; position:relative;
}
body.ag-body .ia-offcanvas .ia-head::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(120% 90% at 0% 0%, rgba(120,170,255,.28), transparent 55%);
}
body.dark-mode.ag-body .ia-offcanvas .ia-head{ background:linear-gradient(112deg, #0b3aa8 0%, #0a1a40 60%, #05070e 100%); }
body.ag-body .ia-offcanvas .ia-head > *{ position:relative; z-index:1; }
body.ag-body .ia-offcanvas .ia-head .ia-ico{
  width:44px; height:44px; flex:0 0 44px; border-radius:14px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.24); box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
}
body.ag-body .ia-offcanvas .ia-head-tx{ min-width:0; flex:1 1 auto; }
body.ag-body .ia-offcanvas .ia-head h2{ font-size:15px; font-weight:700; letter-spacing:0; line-height:1.2; color:#fff; }
body.ag-body .ia-offcanvas .ia-head small{
  display:block; color:rgba(255,255,255,.72); opacity:1; font-size:11.5px; line-height:1.3;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
body.ag-body .ia-offcanvas .ia-head .ia-hbtn,
body.ag-body .ia-offcanvas .ia-head .btn-close{
  width:32px; height:32px; padding:0; margin:0; flex:0 0 auto; border-radius:999px; opacity:1;
  display:grid; place-items:center; font-size:14px; color:#fff; text-decoration:none; cursor:pointer;
  background-color:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.28); box-shadow:inset 0 1px 0 rgba(255,255,255,.3);
  transition:background-color .15s ease;
}
body.ag-body .ia-offcanvas .ia-head .ia-min-btn{ display:none; }
body.ag-body .ia-offcanvas .ia-head .ia-full{ margin-left:0; }
body.ag-body .ia-offcanvas .ia-head .btn-close{
  filter:none !important;
  background:rgba(255,255,255,.16) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/11px no-repeat;
}
body.ag-body .ia-offcanvas .ia-head .ia-hbtn:hover,
body.ag-body .ia-offcanvas .ia-head .btn-close:hover{ background-color:rgba(255,255,255,.26); }
body.ag-body .ia-offcanvas .ia-head .ia-hbtn:focus-visible,
body.ag-body .ia-offcanvas .ia-head .btn-close:focus-visible{ outline:2px solid #fff; outline-offset:2px; box-shadow:none; }

body.ag-body .ia-offcanvas .ia-body{
  padding:18px 16px; gap:10px; scrollbar-width:thin;
  background:radial-gradient(90% 40% at 100% 0%, var(--soft), transparent 70%), var(--surf);
}
body.ag-body .ia-offcanvas .ia-msg{ font-size:13.5px; line-height:1.5; padding:10px 14px; border-radius:18px; }
body.ag-body .ia-offcanvas .ia-msg.user{
  background:var(--cta-bg); color:#fff; border-bottom-right-radius:6px; box-shadow:var(--cta-sh);
}
body.ag-body .ia-offcanvas .ia-msg.bot{
  background:var(--surf2); color:var(--ink); border:1px solid var(--edge); border-bottom-left-radius:6px; box-shadow:var(--sh);
}
body.ag-body .ia-offcanvas .ia-msg.bot.erro{ border-color:rgba(217,45,32,.45); color:#b42318; }
body.dark-mode.ag-body .ia-offcanvas .ia-msg.bot.erro{ color:#fda29b; }
body.ag-body .ia-offcanvas .ia-msg.bot h3, body.ag-body .ia-offcanvas .ia-msg.bot h4,
body.ag-body .ia-offcanvas .ia-msg.bot h5, body.ag-body .ia-offcanvas .ia-msg.bot h6{ color:var(--bink); }
body.ag-body .ia-offcanvas .ia-msg.bot a{ color:var(--bink); }
body.ag-body .ia-offcanvas .ia-msg.bot code{ background:var(--soft); }
body.ag-body .ia-offcanvas .ia-msg.bot blockquote{ background:var(--soft); color:var(--mut); border-left-color:var(--brand); }
body.ag-body .ia-offcanvas .ia-msg.bot .ia-tbl-wrap{ border:1px solid var(--edge); border-radius:12px; }
body.ag-body .ia-offcanvas .ia-msg.bot th, body.ag-body .ia-offcanvas .ia-msg.bot td{ border:0; border-bottom:1px solid var(--edge); padding:6px 10px; }
body.ag-body .ia-offcanvas .ia-msg.bot tbody tr:last-child td{ border-bottom:0; }
body.ag-body .ia-offcanvas .ia-msg.bot thead th{
  background:var(--soft); color:var(--mut); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase;
}
body.ag-body .ia-offcanvas .ia-grafico-titulo{ color:var(--ink); }

body.ag-body .ia-offcanvas .ia-fonte-pill{
  background:var(--soft); color:var(--bink); border:1px solid var(--edge); font-size:11.5px; font-weight:600; padding:3px 10px;
}
body.ag-body .ia-offcanvas .ia-acoes{ gap:5px; margin-top:-2px; }
body.ag-body .ia-offcanvas .ia-acoes .ia-btn, body.ag-body .ia-offcanvas .ia-img-dl.ia-btn{
  min-height:28px; padding:3px 11px; border-radius:999px; font-size:11.5px; font-weight:600;
  background:var(--glass); color:var(--mut); border:1px solid var(--gline); box-shadow:var(--sh);
  transition:color .15s ease, background-color .15s ease;
}
body.ag-body .ia-offcanvas .ia-acoes .ia-btn:hover, body.ag-body .ia-offcanvas .ia-img-dl.ia-btn:hover{ background:var(--surf2); color:var(--bink); }
body.ag-body .ia-offcanvas .ia-acoes .ia-btn.ativo{ background:var(--cta-bg); color:#fff; border-color:transparent; box-shadow:var(--cta-sh); }
body.ag-body .ia-offcanvas .ia-aviso{ color:var(--mut); opacity:1; font-size:11px; }
body.ag-body .ia-offcanvas .ia-typing{ background:var(--surf2); border:1px solid var(--edge); border-radius:18px; border-bottom-left-radius:6px; box-shadow:var(--sh); }
body.ag-body .ia-offcanvas .ia-typing .ia-typing-dots span{ background:var(--brand); }
body.ag-body .ia-offcanvas .ia-typing .ia-typing-label{ color:var(--mut); }

body.ag-body .ia-offcanvas .ia-foot{ border-top:1px solid var(--edge); background:var(--surf); padding:10px 12px 12px; }
body.ag-body .ia-offcanvas .ia-foot .ia-input-wrap{
  gap:6px; align-items:flex-end; padding:5px; border-radius:22px;
  background:var(--surf2); border:1px solid var(--edge); box-shadow:var(--sh);
  transition:border-color .15s ease, box-shadow .15s ease;
}
body.ag-body .ia-offcanvas .ia-foot .ia-input-wrap:focus-within{ border-color:var(--brand); box-shadow:0 0 0 3px var(--soft), var(--sh); }
body.ag-body .ia-offcanvas .ia-foot textarea{
  border:0; background:transparent; color:var(--ink); padding:8px 4px; min-height:36px; font-size:13.5px; line-height:1.4; box-shadow:none;
}
body.ag-body .ia-offcanvas .ia-foot textarea::placeholder{ color:var(--mut); opacity:.85; }
body.ag-body .ia-offcanvas .ia-foot textarea:focus{ box-shadow:none; }
body.dark-mode.ag-body .ia-offcanvas .ia-foot textarea{ background:transparent; color:var(--ink); }
body.ag-body .ia-offcanvas .ia-attach-btn{
  width:36px; height:36px; border-radius:999px; border:0; background:var(--soft); color:var(--bink); font-size:1rem;
}
body.ag-body .ia-offcanvas .ia-attach-btn:hover{ background:var(--edge); }
body.dark-mode.ag-body .ia-offcanvas .ia-attach-btn{ background:var(--soft); color:var(--bink); }
body.ag-body .ia-offcanvas .ia-send{ width:36px; height:36px; border-radius:999px; background:var(--cta-bg); box-shadow:var(--cta-sh); font-size:.95rem; }
body.ag-body .ia-offcanvas .ia-send:disabled{ opacity:.45; box-shadow:none; }
body.ag-body .ia-offcanvas .ia-chip{ background:var(--soft); border-color:var(--edge); color:var(--ink); border-radius:999px; padding:3px 8px 3px 3px; }
body.ag-body .ia-offcanvas .ia-chip img{ border-radius:999px; }

body.ag-body .ia-mini{
  border-radius:20px; background:linear-gradient(112deg, #0b4ad6 0%, #091c48 60%, #05070e 100%);
  border:1px solid rgba(255,255,255,.14); box-shadow:0 18px 40px rgba(9,28,72,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
body.ag-body .ia-mini img{ border-radius:12px; }
body.ag-body .ia-mini button{ border-radius:999px; border:1px solid rgba(255,255,255,.24); }

@media (max-width:767.98px){
  body.ag-body .ia-offcanvas .ia-head .ia-min-btn{ display:grid; }
}
@media (max-width:575.98px){
  body.ag-body .ia-offcanvas{ top:8px; right:8px; bottom:8px; width:calc(100vw - 16px) !important; border-radius:20px !important; }
  body.ag-body .ia-offcanvas .ia-head{ padding:10px 10px 10px 12px; gap:8px; }
  body.ag-body .ia-offcanvas .ia-head .ia-ico{ width:38px; height:38px; flex-basis:38px; }
  body.ag-body .ia-offcanvas .ia-head small{ display:none; }
  body.ag-body .ia-offcanvas .ia-msg{ max-width:94%; }
}

/* ---------------------------------------------------------------- estado vazio (.alpino-empty: .ico/.ico-big · .t · .s) */
body.ag-body .alpino-empty{
  padding:24px 16px; text-align:center; color:var(--mut); font-size:13px;
  border:1px dashed var(--edge); border-radius:18px; background:var(--soft);
}
body.ag-body .alpino-empty .ico, body.ag-body .alpino-empty .ico-big{
  width:48px; height:48px; border-radius:999px; margin:0 auto 10px; display:grid; place-items:center; font-size:20px;
  background:var(--surf2); color:var(--bink); border:1px solid var(--edge); box-shadow:var(--sh);
}
body.ag-body .alpino-empty .t{ font-size:14px; font-weight:700; color:var(--ink); }
body.ag-body .alpino-empty .s{ font-size:12px; color:var(--mut); margin-top:2px; }

/* ---------------------------------------------------------------- loading overlay global */
.global-loading-overlay{ position:fixed; inset:0; background:rgba(255,255,255,.78); backdrop-filter:blur(3px); z-index:99998; display:none; align-items:center; justify-content:center; padding:16px; }
body.dark-mode .global-loading-overlay{ background:rgba(8,12,18,.78); }
.global-loading-overlay.show{ display:flex; }
.global-loading-box{ min-width:240px; max-width:92vw; border-radius:18px; background:#fff; box-shadow:0 20px 50px rgba(0,0,0,.18); padding:22px 20px; text-align:center; border:1px solid rgba(0,0,0,.08); }
body.dark-mode .global-loading-box{ background:#171a1f; border-color:rgba(255,255,255,.08); color:#e8eefc; }
.global-loading-spinner{ width:54px; height:54px; border-radius:999px; border:4px solid rgba(9,92,244,.16); border-top-color:#095cf4; margin:0 auto 12px; animation:gLoadSpin .85s linear infinite; }
@keyframes gLoadSpin{ to{ transform:rotate(360deg); } }
.global-loading-title{ font-weight:700; margin-bottom:4px; }
.global-loading-sub{ color:#64748b; font-size:.92rem; }
body.dark-mode .global-loading-sub{ color:#94a3b8; }

/* ---------------------------------------------------------------- modal Meu perfil (contato de emergência) */
#modalPerfilUsuario .modal-content{ border:0; border-radius:18px; overflow:hidden; position:relative; }
#modalPerfilUsuario .perfil-close{ position:absolute; top:10px; right:12px; z-index:3; }
#modalPerfilUsuario .perfil-hero{ height:60px; background:linear-gradient(135deg,#095cf4,#3b82f6); }
#modalPerfilUsuario .perfil-body{ padding:0 20px 18px; text-align:center; }
#modalPerfilUsuario .perfil-avatar{ width:78px; height:78px; border-radius:50%; object-fit:cover; object-position:center top; border:3px solid #fff; box-shadow:0 6px 14px rgba(0,0,0,.16); margin-top:-39px; background:#fff; }
body.dark-mode #modalPerfilUsuario .perfil-avatar{ border-color:var(--ti-dark-2,#1f2430); }
#modalPerfilUsuario .perfil-avatar.ce-glow-red{ box-shadow:0 8px 18px rgba(0,0,0,.16), 0 0 0 3px rgba(220,38,38,.65), 0 0 18px 6px rgba(220,38,38,.55); }
#modalPerfilUsuario .perfil-avatar.ce-glow-blue{ box-shadow:0 8px 18px rgba(0,0,0,.16), 0 0 0 3px rgba(9,92,244,.65), 0 0 18px 6px rgba(9,92,244,.50); }
#modalPerfilUsuario .perfil-nome{ margin:8px 0 1px; font-weight:700; font-size:1.1rem; }
#modalPerfilUsuario .perfil-sub{ color:var(--bs-secondary-color); font-size:.82rem; margin-bottom:12px; }
#modalPerfilUsuario .alpino-session-stack{ flex-direction:row; flex-wrap:wrap; gap:6px; margin:0; }
#modalPerfilUsuario .alpino-session-clock{ width:auto; padding:3px 8px; font-size:11px; box-shadow:none; }
#modalPerfilUsuario .perfil-info{ text-align:left; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
@media (max-width:575.98px){ #modalPerfilUsuario .perfil-info{ grid-template-columns:1fr; } }
#modalPerfilUsuario .perfil-row{ display:flex; align-items:center; gap:10px; padding:7px 10px; border:1px solid rgba(15,23,42,.08); border-radius:11px; background:#fafbfd; min-width:0; }
body.dark-mode #modalPerfilUsuario .perfil-row{ background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.08); }
#modalPerfilUsuario .perfil-row .ic{ width:32px; height:32px; border-radius:9px; display:grid; place-content:center; background:rgba(9,92,244,.10); color:#095cf4; flex:0 0 32px; font-size:.95rem; }
body.dark-mode #modalPerfilUsuario .perfil-row .ic{ background:rgba(59,130,246,.18); color:#93c5fd; }
#modalPerfilUsuario .perfil-row .lab{ font-size:.64rem; text-transform:uppercase; letter-spacing:.04em; color:var(--bs-secondary-color); font-weight:700; }
#modalPerfilUsuario .perfil-row .val{ font-weight:600; min-width:0; font-size:.9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#modalPerfilUsuario .perfil-emerg{ text-align:left; margin-top:12px; border-top:1px dashed rgba(15,23,42,.12); padding-top:12px; }
body.dark-mode #modalPerfilUsuario .perfil-emerg{ border-top-color:rgba(255,255,255,.12); }
#modalPerfilUsuario .pe-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
#modalPerfilUsuario .pe-title{ font-weight:700; font-size:.98rem; display:flex; align-items:center; gap:8px; }
#modalPerfilUsuario .pe-title i{ color:#dc2626; }
#modalPerfilUsuario .pe-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:575.98px){ #modalPerfilUsuario .pe-grid{ grid-template-columns:1fr; } }
#modalPerfilUsuario .pe-block{ border:1px solid rgba(220,38,38,.16); border-radius:11px; padding:10px 12px; background:linear-gradient(180deg, rgba(220,38,38,.04), rgba(220,38,38,.01)); }
body.dark-mode #modalPerfilUsuario .pe-block{ border-color:rgba(255,255,255,.10); background:rgba(255,255,255,.03); }
#modalPerfilUsuario .pe-block-h{ font-weight:700; font-size:.86rem; display:flex; align-items:center; gap:8px; margin-bottom:6px; }
#modalPerfilUsuario .pe-badge{ display:inline-grid; place-items:center; width:24px; height:24px; border-radius:7px; background:linear-gradient(135deg,#d03b3b,#ef4444); color:#fff; font-size:.72rem; font-weight:700; box-shadow:0 4px 12px rgba(220,38,38,.30), inset 0 1px 0 rgba(255,255,255,.28); }
#modalPerfilUsuario .pe-line{ display:flex; align-items:center; gap:8px; padding:4px 0; border-bottom:1px dashed rgba(15,23,42,.08); font-size:.84rem; }
#modalPerfilUsuario .pe-line:last-child{ border-bottom:0; }
body.dark-mode #modalPerfilUsuario .pe-line{ border-bottom-color:rgba(255,255,255,.10); }
#modalPerfilUsuario .pe-line > i{ color:#b91c1c; width:15px; text-align:center; flex-shrink:0; }
#modalPerfilUsuario .pe-line .k{ font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.02em; color:var(--bs-secondary-color); flex:0 0 62px; }
#modalPerfilUsuario .pe-line .v{ font-weight:600; min-width:0; word-break:break-word; }
#modalPerfilUsuario .pe-declaracao{ border:1px solid rgba(224,136,0,.30); background:rgba(224,136,0,.06); border-radius:11px; padding:10px 12px; margin-top:10px; }
body.dark-mode #modalPerfilUsuario .pe-declaracao{ background:rgba(224,136,0,.10); }
#modalPerfilUsuario .pe-empty{ color:var(--bs-secondary-color); font-size:.86rem; padding:4px 2px 2px; }
#modalPerfilUsuario #peForm .form-control-sm{ font-size:.84rem; }

/* ---------------------------------------------------------------- movimento reduzido */
@media (prefers-reduced-motion: reduce){
  .ag-panel.is-open, .ag-online .dot, .ag-user img.ce-glow-red, .ag-user img.is-simulando{ animation:none !important; }
  .ag-sb, .ag-col, .ag-item, .ag-link, .ag-tab, .ia-offcanvas .ia-hbtn, .ia-offcanvas .ia-input-wrap{ transition:none !important; }
  .ag-item:hover, .ag-link:hover{ transform:none; }
}

/* ================================================================ Dashboard Glass (.ag-dash*) — padrão de indicadores
   Referência: /centralti/dashboard/ (centralti/templates/centralti/dashboard_indicadores.html).
   hero de status (.ag-hero-st) · KPIs de altura igual (.ag-dkpis/.ag-dkpi) · seções (.ag-dsec) ·
   grade 12 colunas de cards de gráfico com altura igual por linha (.ag-dgrid/.ag-dcard .sp-4|6|8|12).
   Gráficos = AlpinoCharts (static/js/alpino-charts.js). Status: .st-ok verde · .st-warn âmbar · .st-bad vermelho.
   ================================================================ */
.st-ok{ --st:#12b76a; --st-fg:#067647; --st-bg:rgba(18,183,106,.12); }
.st-warn{ --st:#f79009; --st-fg:#b54708; --st-bg:rgba(247,144,9,.13); }
.st-bad{ --st:#f04438; --st-fg:#b42318; --st-bg:rgba(240,68,56,.12); }
body.dark-mode .st-ok{ --st-fg:#6ce9a6; --st-bg:rgba(50,213,131,.14); }
body.dark-mode .st-warn{ --st-fg:#fec84b; --st-bg:rgba(253,176,34,.14); }
body.dark-mode .st-bad{ --st-fg:#fda29b; --st-bg:rgba(249,112,102,.15); }

/* entrada em sequência (AlpinoCharts.reveal) — só com JS e sem movimento reduzido */
.ag-anim .ag-rise{ opacity:0; transform:translateY(12px); transition:opacity .55s ease, transform .7s cubic-bezier(.22,1,.36,1); transition-delay:calc(var(--i, 0) * 70ms); }
.ag-anim .ag-rise.is-in{ opacity:1; transform:none; }

/* hero de status: pontinho pulsante + veredito na cor do pior sinal */
.ag-hero-st .ag-hero-ico{ position:relative; }
.ag-sig{ position:absolute; right:-2px; bottom:-2px; width:12px; height:12px; border-radius:999px; background:var(--st, #12b76a); border:2px solid #0b1f4d; }
.ag-sig::after{ content:""; position:absolute; inset:-2px; border-radius:inherit; border:2px solid var(--st, #12b76a); animation:agSig 1.8s ease-out infinite; }
@keyframes agSig{ from{ transform:scale(1); opacity:.9; } to{ transform:scale(2.4); opacity:0; } }
.ag-verdict{ display:inline-flex; align-items:center; gap:6px; height:22px; padding:0 10px; border-radius:999px; font-size:11.5px; font-weight:700; color:#fff; vertical-align:1px;
  background:color-mix(in srgb, var(--st) 30%, transparent); border:1px solid color-mix(in srgb, var(--st) 60%, transparent); }
.ag-verdict::before{ content:""; width:7px; height:7px; border-radius:999px; background:var(--st); box-shadow:0 0 8px var(--st); }
.ag-hero-st .ag-hero-s{ display:flex; align-items:center; gap:8px; }

/* KPIs: todos com a mesma altura; o rodapé visual tem altura fixa */
.ag-dkpis{ display:grid; gap:12px; grid-template-columns:repeat(6, minmax(0,1fr)); grid-auto-rows:1fr; margin-bottom:6px; }
.ag-dkpi{
  position:relative; display:flex; flex-direction:column; gap:6px; min-width:0; padding:13px 14px 12px; border-radius:20px;
  background:var(--card-bg); border:1px solid var(--card-line); box-shadow:var(--card-sh);
  -webkit-backdrop-filter:var(--card-blur); backdrop-filter:var(--card-blur); color:var(--ink);
}
.ag-dkpi::before{ content:""; position:absolute; top:-1px; left:18px; right:18px; height:3px; border-radius:0 0 4px 4px; background:var(--st, var(--tn-fg, var(--brand))); opacity:.9; }
.ag-dkpi .hd{ display:flex; align-items:center; gap:8px; min-width:0; }
.ag-dkpi .ic{ width:28px; height:28px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; font-size:13px; background:var(--tn-bg, var(--soft)); color:var(--tn-fg, var(--bink)); }
.ag-dkpi .lb{ font-size:12px; font-weight:600; color:var(--mut); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1 1 auto; min-width:0; }
.ag-dkpi .vl{ font-size:30px; font-weight:700; line-height:1.05; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.ag-dkpi .vl .u{ font-size:14px; font-weight:600; color:var(--mut); margin-left:2px; letter-spacing:0; }
.ag-dkpi .sb{ display:flex; align-items:center; gap:6px; min-width:0; font-size:11.5px; color:var(--mut); min-height:20px; }
.ag-dkpi .sb > span:first-child{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.ag-dkpi .ft{ margin-top:auto; height:36px; display:flex; flex-direction:column; justify-content:flex-end; min-width:0; }
.ag-dkpi .ft .ag-chart{ margin:0 -4px -4px; }
a.ag-dkpi{ text-decoration:none !important; transition:transform .16s ease, box-shadow .16s ease; }
a.ag-dkpi:hover{ transform:translateY(-2px); box-shadow:var(--card-sh), 0 10px 26px rgba(9,92,244,.14); }

/* tag de status e variação contra o período anterior */
.ag-dtag{ display:inline-flex; align-items:center; gap:5px; height:20px; padding:0 8px; border-radius:999px; flex:0 0 auto;
  font-size:10.5px; font-weight:700; background:var(--st-bg); color:var(--st-fg); }
.ag-dtag::before{ content:""; width:6px; height:6px; border-radius:999px; background:var(--st); }
.ag-delta{ display:inline-flex; align-items:center; gap:2px; height:20px; padding:0 7px; border-radius:999px; flex:0 0 auto;
  font-size:10.5px; font-weight:700; background:var(--soft); color:var(--mut); }
.ag-delta.is-bom{ background:rgba(18,183,106,.12); color:#067647; }
.ag-delta.is-mau{ background:rgba(240,68,56,.12); color:#b42318; }
body.dark-mode .ag-delta.is-bom{ background:rgba(50,213,131,.14); color:#6ce9a6; }
body.dark-mode .ag-delta.is-mau{ background:rgba(249,112,102,.15); color:#fda29b; }

/* medidor (fração) e barra segmentada (distribuição) para KPIs de estado */
.ag-meter{ display:grid; gap:5px; }
.ag-meter .l{ display:flex; justify-content:space-between; font-size:10.5px; font-weight:600; color:var(--mut); }
.ag-meter .t{ height:8px; border-radius:999px; background:var(--soft); overflow:hidden; }
.ag-meter .f{ display:block; height:100%; width:var(--p, 0%); border-radius:inherit; background:linear-gradient(90deg, color-mix(in srgb, var(--st, var(--brand)) 70%, #fff), var(--st, var(--brand)));
  box-shadow:0 0 10px color-mix(in srgb, var(--st, var(--brand)) 55%, transparent); }
.ag-anim .ag-rise .ag-meter .f{ width:0; transition:width 1s cubic-bezier(.22,1,.36,1) .25s; }
.ag-anim .ag-rise.is-in .ag-meter .f{ width:var(--p, 0%); }
.ag-seg{ display:flex; gap:3px; height:8px; }
.ag-seg > span{ flex:var(--p) 1 0; min-width:4px; border-radius:999px; background:var(--c); }
.ag-seg > span[style*="--p:0;"]{ display:none; }
.ag-seg-l{ display:flex; justify-content:space-between; gap:6px; font-size:10.5px; font-weight:600; color:var(--mut); margin-bottom:5px; }

/* seções */
.ag-dsec{ display:flex; align-items:center; gap:10px; margin:18px 2px 10px; min-width:0; }
.ag-dsec .ic{ width:30px; height:30px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; font-size:14px; background:var(--tn-bg); color:var(--tn-fg); }
.ag-dsec .t{ font-size:14px; font-weight:700; white-space:nowrap; color:var(--ink); }
.ag-dsec .s{ font-size:11.5px; color:var(--mut); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.ag-dsec .r{ flex:1 1 auto; height:1px; min-width:24px; background:linear-gradient(90deg, var(--edge), transparent); }

/* grade de cards de gráfico: cards da mesma linha com a mesma altura */
.ag-dgrid{ display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:12px; align-items:stretch; }
.ag-dgrid > .sp-3{ grid-column:span 3; } .ag-dgrid > .sp-4{ grid-column:span 4; } .ag-dgrid > .sp-6{ grid-column:span 6; }
.ag-dgrid > .sp-8{ grid-column:span 8; } .ag-dgrid > .sp-12{ grid-column:span 12; }
.ag-dcard{ height:100%; }
.ag-dcard .ag-ch{ margin-bottom:6px; }
.ag-dhl{ display:grid; justify-items:end; flex:0 0 auto; line-height:1.1; text-align:right; }
.ag-dhl b{ font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; color:var(--ink); }
.ag-dhl small{ font-size:10.5px; color:var(--mut); font-weight:600; white-space:nowrap; }
.ag-dexp{ width:32px; height:32px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; padding:0; border:0; font-size:13px; color:var(--bink); cursor:pointer; }
.ag-dbody{ flex:1 1 auto; display:flex; flex-direction:column; justify-content:center; min-height:var(--h, 260px); min-width:0; }
.ag-dsplit{ display:grid; grid-template-columns:minmax(0,1fr); gap:6px; align-items:center; }
.ag-dsplit .ag-chart-legend{ margin-top:0; }
.ag-dempty{ display:grid; place-items:center; gap:6px; text-align:center; color:var(--mut); font-size:12.5px; padding:24px 8px; }
.ag-dempty i{ font-size:26px; color:var(--st-fg, var(--mut)); }
.ag-chart-leg{ padding:6px 10px; }
.ag-chart-legend.is-compact{ gap:4px; }

/* modal: lista de sinais de saúde e tabela de detalhe */
.ag-dhealth{ display:grid; gap:8px; }
.ag-dhealth .it{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:var(--surf2); border:1px solid var(--edge); box-shadow:inset 3px 0 0 var(--st); }
.ag-dhealth .it .ic{ width:32px; height:32px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; background:var(--st-bg); color:var(--st-fg); }
.ag-dhealth .it .tx{ flex:1 1 auto; min-width:0; }
.ag-dhealth .it .n{ font-weight:700; font-size:13px; }
.ag-dhealth .it .d{ font-size:11.5px; color:var(--mut); }
.ag-dhealth .it .v{ font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.ag-dtable{ width:100%; border-collapse:collapse; font-size:12.5px; color:var(--ink); }
.ag-dtable th{ text-align:left; font-size:10.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--bink); background:var(--soft); padding:8px 10px; }
.ag-dtable td{ padding:8px 10px; border-bottom:1px solid var(--edge); }
.ag-dtable td:nth-child(n+2), .ag-dtable th:nth-child(n+2){ text-align:right; font-variant-numeric:tabular-nums; }
.ag-dtable td.tl, .ag-dtable th.tl, .ag-dtable.is-text td, .ag-dtable.is-text th{ text-align:left; }
.ag-dtable tr.st-ok td:first-child, .ag-dtable tr.st-warn td:first-child, .ag-dtable tr.st-bad td:first-child{ box-shadow:inset 3px 0 0 var(--st); }

@media (max-width:1399.98px){ .ag-dkpis{ grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media (max-width:1199.98px){
  .ag-dgrid > .sp-4, .ag-dgrid > .sp-3{ grid-column:span 6; }
  .ag-dgrid > .sp-8, .ag-dgrid > .sp-8 + .sp-4:last-child{ grid-column:span 12; }
  .ag-dgrid > .sp-4:last-child:nth-child(odd){ grid-column:span 12; }
  .ag-dgrid > .sp-12 .ag-dbody, .ag-dgrid > .sp-8 + .sp-4:last-child .ag-dbody,
  .ag-dgrid > .sp-4:last-child:nth-child(odd) .ag-dbody{ min-height:0; }
  .ag-dgrid > .sp-12 .ag-dsplit, .ag-dgrid > .sp-8 + .sp-4:last-child .ag-dsplit,
  .ag-dgrid > .sp-4:last-child:nth-child(odd) .ag-dsplit{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
}
@media (max-width:767.98px){
  .ag-dkpis{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
  .ag-dkpi{ padding:11px 12px 10px; border-radius:18px; }
  .ag-dkpi .vl{ font-size:24px; }
  .ag-dgrid{ gap:10px; }
  .ag-dgrid > [class*="sp-"]{ grid-column:span 12 !important; }
  .ag-dgrid .ag-dsplit{ grid-template-columns:minmax(0,1fr) !important; }
  .ag-dsec .s{ display:none; }
  .ag-dhl b{ font-size:16px; }
}
@media (prefers-reduced-motion: reduce){
  .ag-sig::after{ animation:none; }
  a.ag-dkpi, a.ag-dkpi:hover{ transition:none; transform:none; }
}

/* ==========================================================================
   Liquid Glass — navbar (pílulas + usuário), sidebar (.ag-item) e bottom nav
   Material/tokens em static/css/alpino-liquid-glass.css (carregado depois deste arquivo);
   aqui só o que é específico do shell. Ativo (.is-active) = vidro TINGIDO azul (sem backdrop).
   ========================================================================== */
/* sidebar fica sobre o fundo fixo (sem texto rolando atrás): lente mais limpa */
html.lg-svg-ok .ag-item[data-lg].lg-ready{ --lg-blur:.3px; }
body.dark-mode .ag-nav .ag-bub[data-lg], body.dark-mode .ag-bnav[data-lg]{ --lg-blur:1.8px; }
/* dock do mobile: menos transparente e mais blur (o conteúdo rolando por trás disputava com os ícones) */
@media (max-width:767.98px){
  body .ag-bnav[data-lg]{
    --lg-tint:rgba(255,255,255,.34); --lg-tint-fb:rgba(248,250,255,.62); --lg-tint-deep:rgba(250,251,255,.76);
    --lg-blur:3px;
    -webkit-backdrop-filter:blur(16px) saturate(var(--lg-sat)) brightness(var(--lg-bri));
    backdrop-filter:blur(16px) saturate(var(--lg-sat)) brightness(var(--lg-bri));
  }
  body.dark-mode .ag-bnav[data-lg]{
    --lg-tint:rgba(18,27,48,.48); --lg-tint-fb:rgba(22,32,56,.64); --lg-tint-deep:rgba(14,21,38,.78);
    --lg-blur:3.5px;
  }
}
.ag-item[data-lg]:not(.is-active):hover, .ag-user[data-lg]:hover, .ag-user[data-lg][aria-expanded="true"],
.ag-search[data-lg]:focus-within{ box-shadow:var(--lg-sh-hi); }
.ag-item[data-lg]:active, .ag-user[data-lg]:active{ --lg-glare:1.4; }
/* tema claro: o brilho branco some no vidro branco → na sidebar o brilho do ponteiro é AZUL (pedido do usuário 02/11) */
body:not(.dark-mode) .ag-item[data-lg]{ --lg-glare-c:#2f7bff; --lg-glare-a:34%; }
body:not(.dark-mode) .ag-item[data-lg]:not(.is-active):hover{
  box-shadow:inset 0 1px 0 rgba(255,255,255,1), inset 0 -1px 1px rgba(255,255,255,.55), inset 0 0 0 1px rgba(9,92,244,.22),
             inset 0 0 16px rgba(9,92,244,.14), 0 2px 4px rgba(16,24,40,.06), 0 8px 24px rgba(9,92,244,.26), 0 0 18px rgba(47,123,255,.22);
  border-color:rgba(120,170,255,.75);
}
body:not(.dark-mode) .ag-item[data-lg]:not(.is-active):hover > i:first-child{ color:var(--brand); filter:drop-shadow(0 0 6px rgba(9,92,244,.45)); }

/* ativo = vidro tingido (mantém o degradê azul aprovado, ganha o aro/brilho do material) */
.ag-bub[data-lg].is-active{
  -webkit-backdrop-filter:none !important; backdrop-filter:none !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 6px rgba(0,30,90,.28), inset 0 0 0 .5px rgba(255,255,255,.22),
             0 4px 12px rgba(9,92,244,.34), 0 0 22px rgba(79,141,255,.22) !important;
}

/* seleção dentro das pílulas/doca: degradê tingido com o mesmo aro */
.ag-tabs[data-lg] .ag-tab.is-active, .ag-tabs[data-lg] .ag-tab[aria-selected="true"],
.ag-bnav[data-lg] .ag-bn.is-active{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 6px rgba(0,30,90,.25), 0 4px 12px rgba(9,92,244,.30);
}
/* hover interno (abas, sininho, Online, crumbs) lê melhor sobre vidro claro com um véu branco do que com --soft */
body:not(.dark-mode) .ag-bub[data-lg] .ag-ibtn:hover, body:not(.dark-mode) .ag-bub[data-lg] button.ag-online:hover,
body:not(.dark-mode) .ag-bub[data-lg] .ag-tab:not(.is-active):not([aria-selected="true"]):hover,
body:not(.dark-mode) .ag-bub[data-lg] .ag-crumb a:hover{ background:rgba(255,255,255,.62); }


/* Barra de baixo com 7 atalhos (ex.: Tarefas + IA + Coletor) em celular estreito (344px): rótulo menor para não encostar. */
@media (max-width:379.98px){
  .ag-bnav:has(> .ag-bn:nth-child(7)){ padding:0 4px; }
  .ag-bnav:has(> .ag-bn:nth-child(7)) .ag-bn{ font-size:9.5px; letter-spacing:-.02em; }
}
