/* Visual Granistone BI Financeiro, Control Center v2.3.0 */
:root{--bg:#f3f5f8;--card:#fff;--ink:#172033;--muted:#6e7d90;--line:#e3e8ef;--brand:#146c94;--brand2:#19a7ce;--nav:#13233b;--danger:#b33945;--success:#16825d}
html,body{overflow-x:hidden}body{font-family:'Segoe UI',Arial,sans-serif;font-size:13px;background:var(--bg);color:var(--ink)}
button,input,select,textarea{font-family:inherit}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #24a5cc;outline-offset:2px}
.app-shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh;transition:grid-template-columns .2s}
.sidebar{background:linear-gradient(160deg,#13233b,#0d1b30);color:#e9f2ff;height:100dvh;min-height:0;position:sticky;top:0;padding:20px 13px;overflow-x:hidden;overflow-y:auto;z-index:35}
.sidebar-header{display:flex;align-items:center;gap:8px;padding:0 3px 18px;border-bottom:1px solid #ffffff1b}
.sidebar .brand{display:flex;align-items:center;gap:11px;margin:0;padding:0;color:white;flex:1;min-width:0}
.sidebar .brand-mark{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;flex:0 0 38px;background:#fff;overflow:hidden}
.sidebar .brand-mark img{width:34px;height:34px;object-fit:contain}.sidebar .brand-copy{display:block;min-width:0}.sidebar .brand-copy strong{font-size:15px;display:block;line-height:1.3}.sidebar .brand-copy small{color:#a1b6cf;font-size:10.5px;white-space:nowrap}
.sidebar-toggle,.mobile-menu-toggle{width:29px;height:29px;display:grid;place-items:center;flex:0 0 29px;border-radius:8px;background:#ffffff0d;color:#ccddf0;border:1px solid #ffffff1a;cursor:pointer}
.sidebar-toggle svg,.mobile-menu-toggle svg,.logout-btn svg{width:17px;height:17px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}
.sidebar .side-nav{display:block;margin-top:18px}.sidebar .nav-group{margin-bottom:17px}.sidebar .nav-caption{display:block;font-size:10px;font-weight:750;letter-spacing:.11em;padding:8px 13px;color:#849ab4}
.sidebar .nav-link{display:flex;align-items:center;gap:12px;min-height:43px;padding:11px 13px;margin:2px 0;border-radius:9px;color:#c3d0df;font-size:12.5px;font-weight:550;white-space:nowrap;text-decoration:none}
.sidebar .nav-link svg{width:18px;height:18px;flex:0 0 18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.sidebar .nav-link:hover{background:#ffffff13;color:white}.sidebar .nav-link.active{color:white;background:#243954;box-shadow:inset 3px 0 0 #28a7cd}
.sidebar-foot{margin-top:auto;padding:16px 10px 2px;display:flex;gap:10px;align-items:center;border-top:1px solid #ffffff1a}
.sidebar-foot-icon{width:30px;height:30px;display:grid;place-items:center;border:1px solid #ffffff24;border-radius:9px}
.sidebar-foot-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}.sidebar-foot-copy{display:grid;gap:2px}.sidebar-foot-copy strong{color:#dfe9f5;font-size:11px}.sidebar-foot-copy small{color:#849ab4;font-size:10px}
.sidebar-backdrop,.mobile-menu-toggle{display:none}.main-shell{min-width:0;min-height:100vh}
.topbar{position:sticky;top:0;z-index:22;display:flex;justify-content:space-between;align-items:center;gap:20px;height:78px;padding:0 30px;background:#fff;border-bottom:1px solid var(--line)}
.topbar-heading{display:flex;align-items:center;gap:12px;min-width:0}.topbar-title{min-width:0}.topbar h1{font-size:20px;font-weight:730;margin:0;line-height:1.3;letter-spacing:-.03em}.topbar p{margin:3px 0 0;font-size:12px;color:#7b8899;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.top-actions{display:flex;align-items:center;gap:14px;flex:0 0 auto}.system-status{display:flex;align-items:center;gap:7px;color:#6f8096;font-size:11px}.status-dot{width:8px;height:8px;border-radius:50%;background:#20a777;box-shadow:0 0 0 3px #e7f8ef}
.user-box{display:flex;align-items:center;gap:10px;min-width:0;border-left:1px solid var(--line);padding-left:17px}.user-avatar{display:grid;place-items:center;width:35px;height:35px;flex:0 0 35px;border-radius:9px;background:#e8f3fa;color:#146c94;font-weight:800}
.user-identification{display:flex;flex-direction:column;gap:4px;max-width:190px;min-width:0}.user-identification strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-identification small{font-size:10.5px;color:#8894a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.logout-form{margin:0}.logout-btn{display:flex;align-items:center;gap:7px;padding:9px 11px;background:white;border:1px solid #d7e0e9;border-radius:9px;cursor:pointer;font-size:12px;color:#4b6079;font-weight:650}.logout-btn:hover{background:#f1f5fa}
.container{max-width:1650px;margin:0 auto;padding:26px 28px 52px;min-width:0}.card,.metric{border:1px solid #e1e7ef;border-radius:12px;box-shadow:0 6px 20px #17203307}.card{padding:22px;margin-bottom:18px}.card h2{font-size:18px}.btn{font-size:12px;border-radius:8px}.btn.primary{background:#146c94;border-color:#146c94}.btn.primary:hover{background:#115b7e}.section-head{flex-wrap:wrap}.table-wrap{max-width:100%;overflow-x:auto}table{font-size:12px}th{background:#f9fafc}.sticky-save{max-width:calc(100vw - 36px)}
.overview-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:20px}.overview-heading .section-kicker{color:#8392a5;font-size:10px;letter-spacing:.11em;font-weight:800;text-transform:uppercase}.overview-heading h2{margin:6px 0;font-size:22px;letter-spacing:-.03em}.overview-heading p{margin:0;color:#8795a5;font-size:12.5px}
.overview-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:white;border:1px solid var(--line);border-radius:13px;overflow:hidden;margin-bottom:19px;box-shadow:0 6px 18px #17203307}.overview-stat{padding:22px 23px;min-width:0;border-right:1px solid #e8edf3}.overview-stat:last-child{border:0}.overview-stat-label{font-size:11px;font-weight:700;color:#78869b}.overview-stat-number{display:block;font-size:28px;line-height:1.1;font-weight:750;letter-spacing:-.04em;margin:12px 0 6px}.overview-stat-note{font-size:11px;color:#8897a8}.overview-stat:last-child .overview-stat-number{color:#146c94}
.dashboard-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}.workspace-panel,.quick-panel,.audit-panel{min-width:0;background:white;border:1px solid var(--line);border-radius:13px;box-shadow:0 6px 18px #17203307;padding:22px}.workspace-panel{min-height:310px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.panel-eyebrow{font-size:10px;font-weight:750;color:#8491a4;letter-spacing:.1em;display:block;margin-bottom:6px}.panel-head h3{margin:0;font-size:17px;letter-spacing:-.02em}.panel-head p{margin:4px 0 0;color:#8290a2;font-size:11px}
.workspace-app-list,.quick-links{display:grid;gap:9px}.workspace-app{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;color:var(--ink)}.workspace-app:hover,.quick-link:hover{background:#f7fafc;border-color:#9bc6dc}.workspace-app-primary{display:flex;gap:12px;align-items:center;min-width:0}.workspace-app-icon{display:grid;place-items:center;background:#eaf4fa;color:#19759a;width:40px;height:40px;flex:0 0 40px;border-radius:9px;font-size:17px}.workspace-app-text{min-width:0}.workspace-app-text strong{display:block;font-size:13px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.workspace-app-text small{display:block;color:#7d8fa2;margin-top:5px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workspace-app-trailing{display:flex;align-items:center;gap:10px;flex:0 0 auto}.workspace-app-arrow{color:#9baabd;font-size:19px}
.quick-link{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:9px;color:#334c66;font-size:12px;font-weight:650}.quick-link-arrow{font-size:16px;color:#98a6b7}.quick-help{border-top:1px solid var(--line);padding-top:15px;margin-top:16px}.quick-help summary{font-size:12px;font-weight:700;color:#5e738e;cursor:pointer}.quick-help p{font-size:11.5px;color:#748398;line-height:1.7}.audit-panel{margin-top:18px}.audit-panel .panel-head{margin-bottom:8px}.audit-panel td{font-size:11.5px}
@media(min-width:1051px){.app-shell.is-collapsed{grid-template-columns:76px minmax(0,1fr)}.is-collapsed .sidebar{padding-left:12px;padding-right:12px}.is-collapsed .sidebar .brand-copy,.is-collapsed .nav-label,.is-collapsed .nav-caption,.is-collapsed .sidebar-foot-copy{display:none}.is-collapsed .sidebar-header{flex-direction:column;gap:10px}.is-collapsed .sidebar .brand{flex:0 0 auto}.is-collapsed .sidebar-toggle svg{transform:rotate(180deg)}.is-collapsed .sidebar .nav-link{justify-content:center;padding:11px}.is-collapsed .sidebar-foot{justify-content:center}}
@media(max-width:1050px){.app-shell,.app-shell.is-collapsed{display:block}.sidebar{position:fixed;top:0;left:0;bottom:0;width:260px;max-width:calc(100vw - 50px);height:100dvh;transform:translateX(-105%);transition:transform .18s;z-index:45}.app-shell.is-mobile-open .sidebar{transform:translateX(0)}.sidebar-backdrop{display:none;position:fixed;inset:0;z-index:40;background:#08182a80;border:0}.is-mobile-open .sidebar-backdrop{display:block}.sidebar-toggle{display:none}.mobile-menu-toggle{display:grid;width:36px;height:36px;flex-basis:36px;color:#1b3450;background:#f5f8fa;border-color:#dce4ec}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.two-col,.two-col.wide-left,.editor-layout{grid-template-columns:1fr}.editor-layout .card:nth-child(3){grid-column:auto}}
@media(max-width:800px){.topbar{padding:0 16px;height:70px}.container{padding:20px 15px 40px}.dashboard-workspace{grid-template-columns:1fr}.user-identification{max-width:140px}.system-status{display:none}.overview-heading{flex-wrap:wrap}.overview-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-stat:nth-child(2){border-right:0}.overview-stat:nth-child(-n+2){border-bottom:1px solid var(--line)}}
@media(max-width:550px){.topbar h1{font-size:16px}.topbar p{font-size:10px;max-width:190px}.top-actions{gap:8px}.user-box{padding-left:0;border:0}.user-avatar{width:31px;height:31px;flex-basis:31px}.user-identification{display:none}.logout-btn{padding:8px}.logout-btn span{display:none}.overview-heading h2{font-size:19px}.overview-stat{padding:17px}.overview-stat-number{font-size:23px}.workspace-panel,.quick-panel,.audit-panel{padding:16px}.workspace-app-trailing .status{display:none}.card{padding:17px}.form-grid.two,.style-grid{grid-template-columns:1fr}.span2{grid-column:auto}.sticky-save{right:10px;left:10px;bottom:10px}}
@media(prefers-reduced-motion:reduce){.app-shell,.sidebar{transition:none}}

/* Corrige regra antiga que adicionava marcadores em telas pequenas */
.sidebar .nav-link::before{content:none!important;display:none!important}


/* Sidebar dentro da viewport: fixo no desktop e navegacao com scroll independente. */
html,body{overflow-x:hidden}
.app-shell{min-width:0;max-width:100%}
.sidebar{
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  height:100vh;
  height:100dvh;
  max-height:100vh;
  max-height:100dvh;
  overflow:hidden;
}
.sidebar-header,.sidebar-foot{flex:0 0 auto;min-width:0;max-width:100%}
.sidebar .side-nav{
  flex:1 1 auto;
  min-height:0;
  max-width:100%;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:#617894 transparent;
}
.sidebar .side-nav::-webkit-scrollbar{width:5px}
.sidebar .side-nav::-webkit-scrollbar-thumb{background:#617894;border-radius:5px}
.sidebar .nav-link{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis}
.main-shell{min-width:0;max-width:100%;overflow-x:clip}
.container{min-width:0;max-width:100%}
.dashboard-workspace{grid-template-columns:minmax(0,1fr)}
@media(min-width:1051px){
  .sidebar{position:fixed;inset:0 auto 0 0;width:244px;z-index:35}
  .app-shell.is-collapsed .sidebar{width:76px}
  .main-shell{grid-column:2}
}
@media(max-width:1050px){
  .sidebar{position:fixed;top:0;bottom:0;left:0;width:260px;max-width:calc(100vw - 50px)}
  .main-shell{width:100%}
}
