/* Common shell. Loaded last on every administrative screen. */
:root[data-theme="dark"]{color-scheme:dark;--bg:#0a0a0a;--bg2:#121212;--card:#161616;--card2:#1c1c1c;--text:#f5f5f5;--muted:#aaa;--border:#303030;--primary:#20a5f0;--primary-h:#55bcf5;--bg-2:#121212;--card-2:#1c1c1c;--text-2:#bbb;--text-3:#aaa;--border-strong:#484848;--topbar:#121212;--hover:rgba(255,255,255,.04);--flow-shadow:0 4px 20px rgba(0,0,0,.18)}
:root[data-theme="light"]{color-scheme:light;--bg:#f4f5f7;--bg2:#fff;--card:#fff;--card2:#f8f9fb;--text:#171b22;--muted:#606875;--border:#dce0e6;--primary:#087dbb;--primary-h:#086b9f;--bg-2:#fff;--card-2:#f8f9fb;--text-2:#4d5663;--text-3:#606875;--border-strong:#b8c0cb;--topbar:#fff;--hover:rgba(0,0,0,.03);--flow-shadow:0 4px 20px rgba(0,0,0,.05)}
body.flow-admin-page,body.flow-admin-login{margin:0;padding:0!important;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.flow-shell-header,.flow-admin-page .flow-admin-nav{background:var(--bg2);color:var(--text);border-bottom:1px solid var(--border)}
.flow-shell-header *,.flow-admin-nav *{box-sizing:border-box}
.flow-shell-header .flow-shell-inner{max-width:1440px;margin:0 auto;padding:18px 28px;min-height:80px;display:flex;align-items:center;gap:20px}
.flow-shell-brand{width:124px;height:36px;flex:0 0 124px;display:flex;align-items:center;text-decoration:none}
.flow-shell-brand img{width:124px;height:36px;object-fit:contain;object-position:left center;max-width:none}
.flow-logo-light{display:none}
html[data-theme="light"] .flow-logo-dark{display:none}
html[data-theme="light"] .flow-logo-light{display:block}
.flow-shell-title{padding-left:20px;border-left:1px solid var(--border);font-size:14px;font-weight:800;white-space:nowrap}
.flow-shell-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.flow-shell-header .flow-shell-button{font:700 13px/1.3 system-ui,sans-serif;display:inline-flex;justify-content:center;align-items:center;min-height:40px;padding:10px 14px;border:1px solid var(--border);border-radius:9px;color:var(--text);background:var(--card);text-decoration:none;white-space:nowrap;cursor:pointer}
.flow-shell-header [data-flow-theme-toggle]{min-width:118px;gap:4px}
.flow-shell-button:hover{border-color:var(--primary)!important}
.flow-shell-button:focus-visible,.flow-admin-nav a:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.flow-admin-page .flow-admin-nav-inner{max-width:1440px;margin:0 auto;padding:12px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.flow-admin-page .flow-admin-nav-links{display:flex;flex-wrap:wrap;gap:8px}
.flow-admin-page .flow-admin-nav a{color:var(--text);font:700 13px/1.4 system-ui,sans-serif;text-decoration:none;padding:10px 12px;border-radius:8px;white-space:nowrap}
.flow-admin-page .flow-admin-nav a.is-active{color:var(--primary);background:var(--card2);box-shadow:inset 0 0 0 1px var(--border)}
.flow-admin-page .flow-admin-nav .flow-new-user{background:#20a5f0;color:#fff;flex-shrink:0;text-align:center}
body.flow-admin-page>.container,body.flow-admin-page>.report-content{width:100%;max-width:1440px;margin:0 auto;padding:30px 28px!important;box-sizing:border-box}
.flow-clients-page p,.flow-clients-page small{color:var(--muted)}
.flow-clients-page input,.flow-clients-page select{background:var(--bg2);color:var(--text);border-color:var(--border)}
.flow-clients-page .card{background:var(--card);border-color:var(--border)}
.flow-admin-login{min-height:100vh;display:flex;justify-content:center;align-items:center}
.flow-admin-login .box{box-sizing:border-box;background:var(--card);color:var(--text);border-color:var(--border);box-shadow:var(--flow-shadow);margin:20px;max-width:420px}
.flow-admin-login input{box-sizing:border-box;background:var(--bg2);color:var(--text);border-color:var(--border)}
.flow-admin-login label{color:var(--muted)}
.flow-admin-login img{width:124px;height:36px;object-fit:contain;margin:auto}
@media screen{
.flow-report-page .toolbar,.flow-report-page .relatorio{max-width:none;background:var(--card);color:var(--text);box-shadow:var(--flow-shadow)}
.flow-report-page .field input,.flow-report-page .field select{background:var(--bg2);color:var(--text);border-color:var(--border)}
.flow-report-page .rep-meta,.flow-report-page .rep-metrica,.flow-report-page th{background:var(--card2)}
.flow-report-page .rep-meta,.flow-report-page .rep-metrica .valor,.flow-report-page .secao-titulo,.flow-report-page td,.flow-report-page .dist-label,.flow-report-page .dist-valor{color:var(--text)}
.flow-report-page .field label,.flow-report-page .rep-brand-text,.flow-report-page .rep-periodo,.flow-report-page .rep-metrica .label,.flow-report-page th,.flow-report-page .rep-footer{color:var(--muted)}
.flow-report-page .secao-titulo,.flow-report-page th,.flow-report-page td,.flow-report-page .rep-footer{border-color:var(--border)}
.flow-report-page .dist-bar-wrap{background:var(--border)}
.flow-report-page .rep-metrica.green .valor{color:#16a34a}
.flow-report-page .relatorio table{min-width:0;width:100%}
html[data-theme="dark"] .rep-brand img{filter:brightness(0) invert(1)}
}
.flow-report-page .rep-header{gap:20px}
.flow-report-page .rep-brand{min-width:0}
.flow-report-page .rep-brand img{display:block;width:140px;height:auto;flex-shrink:0}
@media(max-width:700px){
.flow-shell-header .flow-shell-inner{padding:16px;gap:12px;flex-wrap:wrap;min-height:124px}
.flow-shell-title{padding-left:12px}
.flow-shell-actions{width:100%;margin-left:0;gap:8px}
.flow-shell-header .flow-shell-button{flex:1;padding:9px 10px}
.flow-admin-page .flow-admin-nav-inner{padding:12px 16px;flex-direction:column;align-items:stretch;gap:12px}
.flow-admin-page .flow-admin-nav-links{gap:6px}
.flow-admin-page .flow-admin-nav a{padding:9px 10px}
body.flow-admin-page>.container,body.flow-admin-page>.report-content{padding:24px 16px!important}
}
@media(max-width:640px){
.flow-report-page .filtros{grid-template-columns:minmax(0,1fr)}
.flow-report-page .field,.flow-report-page .field input,.flow-report-page .field select{min-width:0}
.flow-report-page .rep-header{flex-direction:column;align-items:flex-start}
.flow-report-page .rep-title-block{text-align:left;width:100%}
.flow-report-page .rep-brand{flex-wrap:wrap}
.flow-report-page .relatorio{padding:24px 16px}
.flow-report-page .relatorio td{overflow-wrap:anywhere}
}
@media print{
.flow-shell-header,.flow-admin-nav{display:none!important}
body.flow-report-page{background:#fff;color:#1a1a1a}
body.flow-report-page>.report-content{padding:0!important;max-width:none}
.flow-report-page .rep-brand img{filter:none}
}

.flow-shell-button[hidden]{display:none!important}@media(max-width:640px){.flow-shell-inner{flex-wrap:wrap}.flow-shell-actions{flex-wrap:wrap;gap:7px}.flow-shell-actions [data-pwa-install]{font-size:12px}}

/* WhatsApp sem número: mantém o espaço do botão e não cria um link. */
.lead-mini-actions .whats[aria-disabled="true"],.btn-whats[aria-disabled="true"],.btn-action:disabled{opacity:.38;cursor:not-allowed;filter:grayscale(1)}
.lead-mini-actions .whats[aria-disabled="true"]:hover,.btn-whats[aria-disabled="true"]:hover{transform:none;box-shadow:none}

/* Navegação inferior do aplicativo móvel. */
.flow-mobile-navigation{display:none}
.flow-mobile-menu{box-sizing:border-box;color:var(--text);background:var(--card);border:1px solid var(--border);border-radius:22px 22px 0 0;width:100%;max-width:600px;max-height:80dvh;margin:auto auto 0;padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 40px rgba(0,0,0,.18);overflow:auto}
.flow-mobile-menu::backdrop{background:rgba(0,0,0,.55)}
.flow-mobile-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.flow-mobile-menu h2{font-size:20px;margin:0}.flow-mobile-menu-heading button{background:var(--card2);border:1px solid var(--border);color:var(--text);width:44px;height:44px;border-radius:50%;font-size:28px;cursor:pointer}
.flow-mobile-menu-links{display:grid;gap:8px;margin-top:18px}.flow-mobile-menu-links a{padding:14px;border-radius:12px;background:var(--card2);color:var(--text);text-decoration:none;font:600 15px system-ui}.flow-mobile-menu a:focus-visible,.flow-mobile-menu button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
@media(max-width:767px){
body.flow-admin-page{padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))!important;scroll-padding-bottom:calc(90px + env(safe-area-inset-bottom,0px))}
.flow-admin-page .flow-admin-nav{display:none!important}
.flow-shell-actions .flow-profile-link,.flow-shell-actions a[href="/admin/logout.php"],.flow-shell-actions .flow-shell-export{display:none!important}
.flow-mobile-navigation{position:fixed;left:0;right:0;bottom:0;z-index:1000;display:flex;align-items:stretch;gap:4px;padding:8px 6px calc(8px + env(safe-area-inset-bottom,0px));background:var(--bg2);color:var(--muted);border-top:1px solid var(--border);box-shadow:0 -3px 18px rgba(0,0,0,.08);box-sizing:border-box}
.flow-mobile-navigation>a,.flow-mobile-navigation>button{flex:1;min-width:0;min-height:54px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;border:0;border-radius:12px;background:transparent;color:inherit;text-decoration:none;font:600 11px system-ui;cursor:pointer;padding:5px 2px;box-sizing:border-box;text-align:center}
.flow-mobile-navigation svg{width:23px;height:23px;flex-shrink:0}.flow-mobile-navigation .is-active{color:var(--primary);background:var(--hover)}
.flow-mobile-navigation a:focus-visible,.flow-mobile-navigation button:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
.flow-mobile-navigation a:active,.flow-mobile-navigation button:active{background:var(--hover)}
}
@media print{.flow-mobile-navigation,.flow-mobile-menu{display:none!important}}

@media(max-width:767px){.flow-mobile-navigation .flow-mobile-brand{position:relative;justify-content:flex-end;color:var(--primary);font-weight:800}.flow-mobile-brand-icon{position:absolute;left:50%;top:-19px;transform:translateX(-50%);display:block;width:36px;height:36px;object-fit:contain;background:var(--card);border:3px solid var(--border);border-radius:50%;padding:4px;box-sizing:content-box;box-shadow:0 3px 12px rgba(0,0,0,.12)}}
