*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f5f7;color:#1b1d24}.layout{display:flex;min-height:100vh}.side{width:228px;flex:0 0 228px;background:#11131b;color:#fff;padding:18px 14px;min-height:100vh}.brand{display:flex;align-items:center;gap:9px;padding:0 6px 22px;font-size:14px}.brand strong{font-size:20px}.brand span{font-weight:700}.side nav a{display:block;color:#d6d8df;text-decoration:none;padding:10px 14px;border-radius:7px;margin:3px 0;font-size:15px}.side nav a:hover,.side nav a.active{background:#262936;color:#fff}.nav-section{font-size:12px;font-weight:700;color:#fff;border-top:1px solid #555;margin:16px 6px 6px;padding-top:10px}.topbar{height:64px;background:#fff;border-bottom:1px solid #ddd;padding:0 28px;display:flex;align-items:center;justify-content:space-between;font-weight:600}.top-user{font-weight:400;color:#777}main{flex:1;min-width:0}section{padding:28px;max-width:1450px}h1{font-size:25px;margin:0 0 6px}h2{font-size:20px}.muted{color:#777}.cards{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:15px;margin-top:22px}.card-stat{background:#fff;border:1px solid #ddd;border-radius:12px;padding:18px}.card-stat small{display:block;color:#777}.card-stat strong{display:block;font-size:28px;margin-top:8px}.panel{background:#fff;border:1px solid #ddd;border-radius:12px;padding:20px}table{width:100%;border-collapse:collapse;background:#fff;margin-top:18px}th,td{padding:12px;border-bottom:1px solid #ececf0;text-align:left;vertical-align:middle}th{font-size:12px;text-transform:uppercase;color:#777}.actions{white-space:nowrap;text-align:right}.btn,.button{display:inline-block;border:0;border-radius:7px;padding:8px 12px;text-decoration:none;cursor:pointer;font-size:13px;background:#e91e63;color:#fff}.btn-secondary{background:#6b7280}.btn-light{background:#eceef2;color:#222}.btn-danger{background:#c62828}.btn-edit{background:#1565c0}.filters,.form-grid{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.filters input,.filters select,.form-grid input,.form-grid select,.form-grid textarea,select,input,textarea{padding:10px;border:1px solid #cfd1d8;border-radius:7px;background:#fff}.form-grid>div{display:flex;flex-direction:column;gap:5px}.form-grid label{font-size:12px;color:#666}.alert{padding:12px 14px;border-radius:8px;background:#eaf4ff;border:1px solid #cfe5ff;margin:12px 0}.alert.error{background:#ffe9ed;border-color:#ffc9d2;color:#9d1835}.warn{color:#b56b00;font-weight:600}.badge{display:inline-block;background:#eceef2;border-radius:999px;padding:5px 9px;font-size:12px}.badge-success{background:#e7f5eb;color:#20733b}.badge-danger{background:#fde8e8;color:#a52222}.badge-warn{background:#fff2d8;color:#8b5a00}.modal{display:none;position:fixed;inset:0;background:#0008;align-items:center;justify-content:center;padding:20px}.modal.show{display:flex}.modal-card{background:#fff;border-radius:12px;padding:22px;width:min(520px,100%)}.modal-card label{display:block;margin:12px 0 5px}.modal-card input,.modal-card select{width:100%}.login{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#171923}.login-card{background:#fff;width:380px;padding:35px;border-radius:16px}.logo{margin:auto;background:#e91e63;color:#fff;width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800}.login-card h1{text-align:center}.login-card p{text-align:center;color:#777}.login-card label{display:block;margin-top:14px}.login-card input{width:100%;margin-top:5px}.login-card button{width:100%;margin-top:20px}.login-card .btn{border:0}.role-box{border:1px solid #ddd;border-radius:10px;padding:16px;margin-bottom:15px}.perm-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.perm-group{border:1px solid #eee;border-radius:8px;padding:10px}.perm-group h4{margin:0 0 8px;font-size:13px;text-transform:uppercase;color:#666}.perm-group label{display:block;margin:6px 0;font-size:13px}.print-only{display:none}@media(max-width:900px){.side{width:190px;flex-basis:190px}.cards{grid-template-columns:repeat(2,1fr)}.perm-grid{grid-template-columns:1fr}}@media(max-width:650px){.side{width:70px;flex-basis:70px;padding:18px 8px}.brand span,.side nav a{font-size:0}.side nav a:before{content:'•';font-size:18px}.nav-section{font-size:0}.cards{grid-template-columns:1fr}section{padding:15px}.topbar{padding:0 15px}}
@media print{.side,.topbar,.no-print{display:none!important}.layout{display:block}.print-only{display:block}section{padding:0}.panel{border:0}table{font-size:11px}}

.panel{background:#fff;border:1px solid #e1e3e8;border-radius:14px;padding:24px;box-shadow:0 2px 8px #0000000a}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.panel-head h1{margin:0 0 5px}.muted{color:#6b7280}.actions{white-space:nowrap}.inline{display:inline}.btn-edit{background:#334155}.btn-danger{background:#dc2626}.btn-secondary{background:#475569}.btn-light{background:#e5e7eb;color:#111827}.filters,.report-filter{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:15px 0}.filters input,.filters select,.report-filter input,.report-filter select{background:#fff}.report-filter label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#667085}.report-tabs,.month-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:15px 0}.report-tabs a,.month-tabs a{padding:9px 13px;border-radius:8px;text-decoration:none;color:#334155;background:#f1f5f9}.report-tabs a.active,.month-tabs a.active{background:#e91e63;color:white}.column-picker{display:flex;gap:10px;flex-wrap:wrap;padding:12px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:9px;margin-bottom:12px}.column-picker label{font-size:12px}.table-wrap{overflow:auto}.modal-card{background:#fff;border-radius:14px;padding:24px;width:min(520px,calc(100% - 30px));max-height:90vh;overflow:auto}.modal.show{display:flex}.modal-card label{display:block;margin:12px 0 5px}.modal-card input,.modal-card select{width:100%}.modal-actions{display:flex;gap:8px;margin-top:18px}.nav-section{font-size:12px;color:#aeb4c2;font-weight:700;margin:18px 0 6px;padding-left:12px}.topbar{display:flex;justify-content:space-between;align-items:center}.top-user{color:#6b7280}.warn{color:#b45309}.badge-success{background:#dcfce7;color:#166534}@media print{.side,.topbar,.no-print{display:none!important}main{width:100%}.panel{box-shadow:none;border:0}.table-wrap{overflow:visible}body{background:#fff}}
.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:14px;margin:18px 0}.summary-grid .card-stat span{display:block;margin-top:8px;color:#667085;font-size:12px}.badge-warning{background:#fff2d8;color:#8b5a00}@media(max-width:900px){.summary-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){.summary-grid{grid-template-columns:1fr}}

.dashboard-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:6px}.dashboard-period{background:#f8fafc;border:1px solid #e5e7eb;color:#667085;border-radius:999px;padding:8px 12px;font-size:12px}.premium-chart{margin-top:22px;padding:24px 24px 18px;overflow:hidden;background:linear-gradient(145deg,#fff 0%,#fbfbfd 100%);box-shadow:0 14px 40px rgba(16,24,40,.07);border-color:#e6e8ee}.chart-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:4px}.eyebrow{font-size:10px;letter-spacing:.12em;font-weight:800;color:#e91e63;margin-bottom:6px}.chart-head h2{margin:0 0 5px;font-size:20px}.chart-legend{display:flex;gap:18px;flex-wrap:wrap;color:#667085;font-size:12px;padding-top:5px}.chart-legend span{display:flex;align-items:center;gap:7px}.legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block}.legend-dot.value{background:#e91e63}.legend-dot.gb{background:#344054}.chart-wrap{position:relative;width:100%;min-height:360px}.chart-wrap canvas{display:block;width:100%;height:360px}.axis-label{position:absolute;top:5px;font-size:10px;font-weight:700;color:#98a2b3}.axis-left{left:0}.axis-right{right:0}.chart-foot{display:flex;justify-content:space-between;gap:15px;color:#98a2b3;font-size:11px;border-top:1px solid #eef0f4;padding-top:12px}.chart-empty{height:280px;border:1px dashed #d9dce3;border-radius:12px;background:#fafbfc;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;color:#667085;text-align:center}.chart-empty strong{color:#344054}.chart-empty span{font-size:12px}@media(max-width:800px){.dashboard-head,.chart-head{flex-direction:column;align-items:flex-start}.chart-legend{padding-top:0}.chart-foot{flex-direction:column}.premium-chart{padding:18px}.chart-wrap,.chart-wrap canvas{min-height:300px;height:300px}}


/* =========================================================
   Tema global — claro/escuro
   A preferência fica salva no navegador.
   ========================================================= */
:root{
  --tm-bg:#f4f5f7;
  --tm-surface:#ffffff;
  --tm-surface-2:#f8fafc;
  --tm-border:#e1e3e8;
  --tm-border-soft:#ececf0;
  --tm-text:#1b1d24;
  --tm-text-muted:#667085;
  --tm-input:#ffffff;
  --tm-input-border:#cfd1d8;
  --tm-sidebar:#11131b;
  --tm-sidebar-text:#d6d8df;
  --tm-sidebar-active:#262936;
  --tm-topbar:#ffffff;
  --tm-shadow:rgba(16,24,40,.07);
}
body{
  background:var(--tm-bg);
  color:var(--tm-text);
  transition:background-color .22s ease,color .22s ease;
}
.topbar{background:var(--tm-topbar);border-color:var(--tm-border);color:var(--tm-text)}
.top-user{color:var(--tm-text-muted)}
.panel,.card-stat,table,.login-card,.modal-card{background:var(--tm-surface);border-color:var(--tm-border)}
.muted{color:var(--tm-text-muted)}
table{background:var(--tm-surface)}
th{color:var(--tm-text-muted)}
td{border-color:var(--tm-border-soft)}
.filters input,.filters select,.form-grid input,.form-grid select,.form-grid textarea,
select,input,textarea,.report-filter input,.report-filter select{
  background:var(--tm-input);
  color:var(--tm-text);
  border-color:var(--tm-input-border);
}
.column-picker{background:var(--tm-surface-2);border-color:var(--tm-border)}
.report-tabs a,.month-tabs a{background:var(--tm-surface-2);color:var(--tm-text)}
.premium-chart{background:linear-gradient(145deg,var(--tm-surface) 0%,var(--tm-surface-2) 100%);box-shadow:0 14px 40px var(--tm-shadow)}
.dashboard-period{background:var(--tm-surface-2);border-color:var(--tm-border);color:var(--tm-text-muted)}
.chart-empty{background:var(--tm-surface-2);border-color:var(--tm-border);color:var(--tm-text-muted)}
.chart-empty strong{color:var(--tm-text)}
.chart-foot{border-color:var(--tm-border-soft);color:var(--tm-text-muted)}
.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:38px;
  height:36px;
  padding:0 11px;
  border:1px solid var(--tm-border);
  border-radius:9px;
  background:var(--tm-surface);
  color:var(--tm-text);
  cursor:pointer;
  font-size:14px;
  line-height:1;
  transition:all .18s ease;
}
.theme-toggle:hover{transform:translateY(-1px);border-color:#b8bec9}
.topbar-right{display:flex;align-items:center;gap:10px}
.logo-img{
  display:block;
  width:48px;
  height:48px;
  object-fit:contain;
  object-position:center;
  border-radius:12px;
  padding:5px;
}
.brand-logo{
  width:34px;
  height:34px;
  flex:0 0 34px;
  object-fit:contain;
  object-position:center;
  border-radius:9px;
  padding:3px;
}
.login-logo{
  width:48px;
  height:48px;
  margin:0 auto;
  object-fit:contain;
  object-position:center;
  border-radius:12px;
  padding:5px;
}
.brand-fallback,.login-logo-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e91e63;
  color:#fff;
  font-weight:800;
}
.brand-fallback{width:34px;height:34px;border-radius:9px;font-size:16px}
.login-logo-fallback{width:48px;height:48px;border-radius:12px;font-size:17px;margin:0 auto}

html.dark body,
body.dark{
  --tm-bg:#0d0f14;
  --tm-surface:#151821;
  --tm-surface-2:#1b1f2a;
  --tm-border:#2b303c;
  --tm-border-soft:#292e39;
  --tm-text:#f2f4f7;
  --tm-text-muted:#aab1bf;
  --tm-input:#11141b;
  --tm-input-border:#394150;
  --tm-sidebar:#090b10;
  --tm-sidebar-text:#cdd3de;
  --tm-sidebar-active:#242938;
  --tm-topbar:#12151c;
  --tm-shadow:rgba(0,0,0,.30);
}
body.dark .side{background:var(--tm-sidebar)}
body.dark .side nav a{color:var(--tm-sidebar-text)}
body.dark .side nav a:hover,
body.dark .side nav a.active{background:var(--tm-sidebar-active);color:#fff}
body.dark .nav-section{border-color:#343946;color:#aeb4c2}
body.dark .badge{background:#252b36;color:#d9dee8}
body.dark .badge-success{background:#163b27;color:#8ee0ad}
body.dark .badge-danger{background:#4b1d22;color:#ffadb5}
body.dark .badge-warn,
body.dark .badge-warning{background:#493718;color:#f6d78e}
body.dark .alert{background:#172b3d;border-color:#264c6b;color:#cfe7ff}
body.dark .alert.error{background:#421d25;border-color:#71303d;color:#ffb6c1}
body.dark .btn-light{background:#2a303b;color:#f2f4f7}
body.dark .report-tabs a,
body.dark .month-tabs a{background:#202530;color:#d9dee8}
body.dark .report-tabs a.active,
body.dark .month-tabs a.active{background:#e91e63;color:#fff}
body.dark .chart-legend{color:#aab1bf}
body.dark .eyebrow{color:#ff5f93}
body.dark .axis-label{color:#8992a3}
body.dark .chart-foot{color:#8992a3}
body.dark .chart-empty span{color:#aab1bf}
body.dark .chart-wrap canvas{filter:none}
body.dark .login{background:#090b10}
body.dark .login-card{box-shadow:0 20px 60px rgba(0,0,0,.35)}
@media(prefers-reduced-motion:reduce){
  body,.theme-toggle{transition:none}
}

/* Fase 3.2.1 — correções de centralização e tema */
.login{
  position:relative;
}
.login-card .login-logo{
  display:block;
  width:48px;
  height:48px;
  margin:0 auto 8px;
  object-fit:contain;
  object-position:center;
}
.login-theme-toggle span{display:inline}
.topbar-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
}
.theme-toggle{
  white-space:nowrap;
}
@media(max-width:650px){
  .login-theme-toggle span{display:none}
}

/* Fase 3.2 — Dashboard com dois gráficos */
.dashboard-charts-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:18px;
  margin-top:18px;
}
.dashboard-chart-card{
  min-width:0;
  overflow:hidden;
}
.dashboard-chart-card .chart-head{
  min-height:108px;
}
.chart-wrap-small{
  min-height:300px;
}
.chart-legend.single{
  justify-content:flex-end;
}
@media(max-width:1050px){
  .dashboard-charts-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:650px){
  .dashboard-charts-grid{
    gap:12px;
  }
  .dashboard-chart-card .chart-head{
    min-height:auto;
  }
  .dashboard-chart-card .chart-legend{
    margin-top:10px;
    justify-content:flex-start;
  }
}
.sortable-table th{white-space:nowrap}
.sort-link{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.sort-link:hover{text-decoration:underline}
.sort-link::after{content:'↕';font-size:11px;opacity:.35}
.sortable-table th .sort-link:has(+ *)::after{content:''}


/* =========================================================
   Fase 3.3 — navegação inspirada no "Meu Extrato"
   ========================================================= */
.layout{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
.top-navigation{
  width:100%;
  flex:0 0 auto;
  min-height:68px;
  padding:0;
  background:var(--tm-topbar,#fff);
  color:var(--tm-text,#1b1d24);
  border-bottom:1px solid var(--tm-border,#e1e3e8);
  box-shadow:0 1px 0 rgba(16,24,40,.03);
}
.topnav-inner{
  width:100%;
  max-width:1500px;
  min-height:68px;
  margin:0 auto;
  padding:0 28px;
  display:flex;
  align-items:stretch;
  gap:22px;
}
.brand-link{
  width:78px;
  flex:0 0 78px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  text-decoration:none;
  padding:0;
}
.brand-link .brand-logo{
  width:58px;
  height:58px;
  padding:3px;
  border-radius:0;
}
.main-nav{
  display:flex;
  align-items:stretch;
  gap:4px;
  flex:1;
}
.main-nav a{
  position:relative;
  min-width:132px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:0 18px;
  color:var(--tm-text,#1b1d24);
  text-decoration:none;
  font-size:12px;
  line-height:1.25;
  letter-spacing:.13em;
  font-weight:500;
  transition:color .18s ease,background-color .18s ease;
}
.main-nav a:hover{
  color:#e91e63;
  background:rgba(233,30,99,.025);
}
.main-nav a.active{
  color:#e91e63;
}
.main-nav a.active::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:#e91e63;
}
.topnav-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex:0 0 auto;
  color:var(--tm-text);
}
.topnav-user{
  max-width:130px;
  font-size:13px;
  font-weight:500;
  color:var(--tm-text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topnav-logout{
  color:var(--tm-text-muted);
  text-decoration:none;
  font-size:12px;
}
.topnav-logout:hover{color:#e91e63}
.topnav-theme{
  min-width:36px;
  padding:0 9px;
}
.admin-menu{
  position:relative;
  font-size:10px;
  letter-spacing:.08em;
  color:var(--tm-text-muted);
}
.admin-menu summary{
  list-style:none;
  cursor:pointer;
  padding:8px 0;
  user-select:none;
}
.admin-menu summary::-webkit-details-marker{display:none}
.admin-menu summary::after{content:' ▾';font-size:10px}
.admin-menu-popover{
  position:absolute;
  z-index:30;
  right:0;
  top:34px;
  min-width:210px;
  padding:8px;
  border:1px solid var(--tm-border);
  border-radius:10px;
  background:var(--tm-surface);
  box-shadow:0 12px 30px rgba(16,24,40,.14);
}
.admin-menu-popover a{
  display:block;
  padding:9px 10px;
  color:var(--tm-text);
  text-decoration:none;
  border-radius:7px;
  font-size:12px;
  letter-spacing:0;
}
.admin-menu-popover a:hover{
  background:var(--tm-surface-2);
  color:#e91e63;
}
.layout main{
  width:100%;
  min-width:0;
}
.topbar{
  height:58px;
  padding:0 28px;
}
.topbar-right{gap:10px}

/* =========================================================
   Meu extrato — layout interno
   ========================================================= */
.report-section{
  max-width:none;
  padding:26px 28px 36px;
  background:var(--tm-bg);
}
.report-page-layout{
  width:100%;
  max-width:1500px;
  margin:0 auto;
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  gap:20px;
  align-items:start;
}
.report-sidebar{
  background:var(--tm-surface);
  border:1px solid var(--tm-border);
  border-radius:12px;
  padding:18px;
  box-shadow:0 2px 8px var(--tm-shadow);
}
.report-sidebar-head{
  padding:2px 4px 14px;
  border-bottom:1px solid var(--tm-border-soft);
}
.report-sidebar-kicker,
.report-eyebrow{
  font-size:10px;
  letter-spacing:.13em;
  font-weight:800;
  color:#e91e63;
}
.report-sidebar-head h2{
  margin:5px 0 5px;
  font-size:20px;
}
.report-sidebar-head p{
  margin:0;
  font-size:12px;
  line-height:1.45;
}
.report-sidebar-group{
  padding:14px 0 8px;
  border-bottom:1px solid var(--tm-border-soft);
}
.report-sidebar-title{
  margin:0 4px 8px;
  color:var(--tm-text-muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.report-sidebar-group a{
  display:block;
  padding:9px 10px;
  margin:3px 0;
  border-radius:7px;
  color:var(--tm-text);
  text-decoration:none;
  font-size:13px;
}
.report-sidebar-group a:hover{
  background:var(--tm-surface-2);
}
.report-sidebar-group a.active{
  color:#e91e63;
  background:rgba(233,30,99,.08);
  font-weight:700;
}
.report-side-form{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 0 4px;
}
.report-side-form label{
  display:flex;
  flex-direction:column;
  gap:5px;
  color:var(--tm-text-muted);
  font-size:11px;
}
.report-side-form input,
.report-side-form select{
  width:100%;
  min-width:0;
  font-size:12px;
}
.report-side-submit{
  width:100%;
  margin-top:3px;
}
.report-side-clear{
  text-align:center;
  color:var(--tm-text-muted);
  font-size:11px;
  text-decoration:none;
  padding:5px;
}
.report-side-clear:hover{color:#e91e63}
.report-sidebar-note{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin-top:14px;
  padding:11px;
  border-radius:8px;
  background:var(--tm-surface-2);
  color:var(--tm-text-muted);
  font-size:10px;
  line-height:1.45;
}
.report-sidebar-note strong{color:var(--tm-text)}
.report-main{
  min-width:0;
}
.month-strip{
  display:flex;
  gap:4px;
  align-items:stretch;
  overflow-x:auto;
  padding:0 0 1px;
  margin-bottom:14px;
  scrollbar-width:thin;
}
.month-card{
  position:relative;
  min-width:118px;
  min-height:76px;
  padding:12px 15px 10px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  background:#dfe0e2;
  color:#5f6268;
  text-decoration:none;
  border-radius:7px 7px 0 0;
  border-bottom:4px solid #b8bbc0;
  transition:background-color .18s ease,color .18s ease;
}
.month-card:hover{
  background:#d4d5d8;
  color:#33363b;
}
.month-card.active{
  background:var(--tm-surface);
  color:var(--tm-text);
  border-bottom-color:#24a8d5;
}
.month-card-name{
  font-size:13px;
  font-weight:800;
  letter-spacing:.06em;
}
.month-card strong{
  font-size:13px;
  font-weight:500;
}
.month-card small{
  font-size:9px;
  color:var(--tm-text-muted);
}
.month-strip-empty{
  width:100%;
  padding:18px;
  background:var(--tm-surface);
  border:1px dashed var(--tm-border);
  border-radius:8px;
  color:var(--tm-text-muted);
}
.report-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:25px;
  padding:22px 24px;
  margin-bottom:14px;
}
.report-hero-main h1{
  margin:4px 0 4px;
  font-size:23px;
  text-transform:uppercase;
}
.report-hero-main p{margin:0;font-size:12px}
.report-hero-total{
  min-width:220px;
  text-align:right;
}
.report-hero-total span{
  display:block;
  color:var(--tm-text-muted);
  font-size:12px;
}
.report-hero-total strong{
  display:block;
  margin-top:3px;
  color:#5ea823;
  font-size:26px;
  font-weight:700;
}
.report-hero-total small{
  display:block;
  margin-top:3px;
  color:var(--tm-text-muted);
  font-size:10px;
}
.report-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.report-kpi{
  min-height:78px;
  padding:14px 16px;
  background:var(--tm-surface);
  border:1px solid var(--tm-border);
  border-radius:10px;
}
.report-kpi span{
  display:block;
  color:var(--tm-text-muted);
  font-size:11px;
}
.report-kpi strong{
  display:block;
  margin-top:6px;
  font-size:20px;
}
.report-kpi a{
  display:inline-block;
  margin-top:4px;
  color:#e91e63;
  text-decoration:none;
  font-size:10px;
}
.report-content-card{
  padding:20px;
}
.report-content-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:15px;
}
.report-content-head h2{
  margin:4px 0 4px;
  font-size:19px;
}
.report-content-head p{
  margin:0;
  font-size:12px;
}
.report-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.report-table-wrap{
  border-top:1px solid var(--tm-border-soft);
}
.report-data-table{
  min-width:1500px;
  margin-top:0;
}
.report-data-table th{
  white-space:nowrap;
  background:var(--tm-surface-2);
  position:sticky;
  top:0;
  z-index:1;
}
.report-data-table td{
  white-space:nowrap;
  font-size:12px;
}
.column-picker{
  max-height:none;
}
.column-picker label{
  white-space:nowrap;
}
@media(max-width:1100px){
  .topnav-inner{padding:0 16px;gap:10px}
  .main-nav a{min-width:110px;padding:0 12px}
  .topnav-tools{gap:7px}
  .topnav-user{max-width:90px}
  .report-page-layout{grid-template-columns:210px minmax(0,1fr)}
}
@media(max-width:850px){
  .main-nav a{min-width:88px;font-size:10px;letter-spacing:.08em}
  .admin-menu{display:none}
  .topnav-theme span{display:none}
  .report-page-layout{grid-template-columns:1fr}
  .report-sidebar{order:2}
  .report-main{order:1}
  .report-sidebar-group{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}
  .report-sidebar-group a{margin:0}
  .report-side-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
  .report-side-form .report-sidebar-title,
  .report-side-submit,
  .report-side-clear{grid-column:1/-1}
}
@media(max-width:650px){
  .topnav-inner{min-height:62px;height:62px;padding:0 10px;gap:5px}
  .brand-link{width:48px;flex-basis:48px}
  .brand-link .brand-logo{width:44px;height:44px}
  .main-nav{gap:0}
  .main-nav a{
    min-width:0;
    flex:1;
    padding:0 5px;
    font-size:8px;
    letter-spacing:.04em;
  }
  .topnav-user,.topnav-logout{display:none}
  .topbar{height:48px;padding:0 14px}
  .report-section{padding:14px 10px 25px}
  .report-hero{align-items:flex-start;flex-direction:column;padding:17px}
  .report-hero-total{min-width:0;width:100%;text-align:left}
  .report-kpis{grid-template-columns:1fr}
  .report-content-card{padding:14px}
  .report-content-head{flex-direction:column}
  .report-side-form{grid-template-columns:1fr}
  .report-sidebar-group{grid-template-columns:1fr}
}
@media print{
  .top-navigation,.topbar,.report-sidebar,.month-strip,.report-kpis,.no-print{display:none!important}
  .layout{display:block}
  .report-section{padding:0;background:#fff}
  .report-page-layout{display:block}
  .report-hero{border:0;box-shadow:none;padding:0;margin-bottom:10px}
  .report-content-card{border:0;box-shadow:none;padding:0}
  .report-table-wrap{overflow:visible}
  .report-data-table{min-width:0;font-size:9px}
  .report-data-table td,.report-data-table th{font-size:9px;padding:5px}
}

/* Dark mode — navegação e Meu extrato */
body.dark .top-navigation{
  background:var(--tm-topbar);
  border-color:var(--tm-border);
}
body.dark .main-nav a{color:var(--tm-text)}
body.dark .main-nav a:hover{color:#ff5f93;background:rgba(255,95,147,.04)}
body.dark .main-nav a.active{color:#ff5f93}
body.dark .month-card{background:#2a2f38;color:#c8cdd7;border-bottom-color:#3d424d}
body.dark .month-card:hover{background:#333944;color:#fff}
body.dark .month-card.active{background:var(--tm-surface);color:var(--tm-text);border-bottom-color:#24a8d5}
body.dark .admin-menu-popover{box-shadow:0 12px 30px rgba(0,0,0,.4)}

/* Specificity override for legacy .side nav rules */
.top-navigation .main-nav a{
  display:flex;
  margin:0;
  border-radius:0;
  padding:0 18px;
  background:transparent;
  color:var(--tm-text,#1b1d24);
}
.top-navigation .main-nav a:hover{
  background:rgba(233,30,99,.025);
  color:#e91e63;
}
.top-navigation .main-nav a.active{
  background:transparent;
  color:#e91e63;
}
@media(max-width:1100px){
  .top-navigation .main-nav a{padding:0 12px}
}
@media(max-width:650px){
  .top-navigation .main-nav a{padding:0 5px}
}

/* =========================================================
   Fase 3.3.2 — Ajuste visual final do Meu Extrato
   ========================================================= */
.layout{display:flex!important;flex-direction:column!important;min-height:100vh!important}
.layout>.top-navigation{width:100%!important;min-height:72px!important;height:72px!important;flex:0 0 72px!important;padding:0!important;margin:0!important;position:relative!important;left:auto!important;top:auto!important}
.topnav-inner{min-height:72px!important;height:72px!important;max-width:1540px!important;padding:0 24px!important;margin:0 auto!important;display:flex!important;align-items:stretch!important}
.layout>.top-navigation .brand-link{width:72px!important;flex:0 0 72px!important;height:72px!important;display:flex!important;align-items:center!important}
.layout>.top-navigation .brand-link .brand-logo{width:48px!important;height:48px!important;object-fit:contain!important}
.layout>.top-navigation .main-nav{display:flex!important;align-items:stretch!important;flex:1 1 auto!important;min-width:0!important;gap:0!important}
.layout>.top-navigation .main-nav a{min-width:140px!important;height:72px!important;padding:0 18px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:12px!important;line-height:1.2!important;letter-spacing:.12em!important}
.layout>.top-navigation .topnav-tools{height:72px!important;display:flex!important;align-items:center!important;gap:12px!important}
.layout>.top-navigation .topnav-user{font-size:13px!important}
.layout>main{width:100%!important;min-width:0!important;flex:1 1 auto!important}
.topbar{height:0!important;min-height:0!important;padding:0!important;border:0!important;overflow:hidden!important}

.report-section{padding:28px 30px 40px!important;background:var(--tm-bg)!important}
.report-page-layout{max-width:1540px!important;grid-template-columns:238px minmax(0,1fr)!important;gap:18px!important}
.report-sidebar{position:sticky;top:18px;border-radius:12px!important;padding:18px!important;box-shadow:0 5px 18px rgba(16,24,40,.05)!important}
.report-sidebar-head h2{font-size:21px!important}
.report-sidebar-group a{font-size:13px!important}
.report-main{min-width:0!important}
.month-strip{gap:5px!important;margin-bottom:16px!important;padding-bottom:2px!important}
.month-card{min-width:124px!important;min-height:84px!important;padding:12px 16px!important;border-radius:9px 9px 3px 3px!important;background:#e1e3e6!important;border:1px solid #d4d7dc!important;border-bottom:4px solid #b7bbc1!important}
.month-card.active{background:#fff!important;border-color:#d9dce1!important;border-bottom-color:#e91e63!important;box-shadow:0 4px 12px rgba(16,24,40,.06)!important}
.month-card-name{font-size:13px!important}
.month-card strong{font-size:13px!important}
.report-hero{margin-bottom:14px!important;border-radius:12px!important;padding:20px 24px!important;box-shadow:0 4px 14px rgba(16,24,40,.05)!important}
.report-hero-main h1{font-size:25px!important}
.report-hero-total strong{color:#58a52c!important;font-size:25px!important}
.report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
.report-kpi{min-height:88px!important;padding:16px 18px!important;border-radius:11px!important;box-shadow:0 3px 10px rgba(16,24,40,.04)!important}
.report-kpi strong{font-size:22px!important}
.report-content-card{border-radius:12px!important;padding:18px!important;box-shadow:0 4px 14px rgba(16,24,40,.05)!important}
.report-content-head{margin-bottom:12px!important}
.report-actions .btn{border-radius:7px!important}
.column-picker{margin-bottom:12px!important}
.report-table-wrap{border:1px solid var(--tm-border)!important;border-radius:10px!important;overflow:auto!important}
.report-data-table{min-width:1500px!important;margin:0!important}
.report-data-table th{background:#f1f3f5!important;padding:12px 10px!important;font-size:11px!important}
.report-data-table td{padding:11px 10px!important;font-size:12px!important}
.report-data-table tbody tr:hover{background:#fafbfc!important}

@media(max-width:1050px){
  .layout>.top-navigation .main-nav a{min-width:112px!important;padding:0 10px!important;font-size:10px!important}
  .layout>.top-navigation .topnav-user{max-width:90px!important}
  .report-page-layout{grid-template-columns:220px minmax(0,1fr)!important}
}
@media(max-width:850px){
  .layout>.top-navigation{height:auto!important;min-height:64px!important;flex-basis:auto!important}
  .topnav-inner{height:auto!important;min-height:64px!important;flex-wrap:wrap!important;padding:0 12px!important}
  .layout>.top-navigation .brand-link{height:64px!important;width:56px!important;flex-basis:56px!important}
  .layout>.top-navigation .main-nav{order:2!important;width:100%!important;flex-basis:100%!important;height:50px!important}
  .layout>.top-navigation .main-nav a{height:50px!important;min-width:0!important;flex:1 1 0!important;font-size:9px!important;padding:0 5px!important}
  .layout>.top-navigation .topnav-tools{margin-left:auto!important;height:64px!important}
  .report-page-layout{grid-template-columns:1fr!important}
  .report-sidebar{position:static!important;order:2!important}
  .report-main{order:1!important}
}
@media(max-width:650px){
  .report-section{padding:14px 10px 28px!important}
  .month-card{min-width:105px!important}
  .report-kpis{grid-template-columns:1fr!important}
}

/* Fase 3.3.3 — terminologia Acessos e tabela de faturas em uma única linha */
.invoices-table-wrap{overflow-x:auto;width:100%;}
.invoices-table{min-width:1180px;margin-top:0;table-layout:auto;}
.invoices-table th,.invoices-table td{white-space:nowrap;vertical-align:middle;}
.invoices-table td:nth-child(4){min-width:190px;}
.invoices-table td:nth-child(6){min-width:105px;font-weight:600;}
.invoices-table td:nth-child(10){min-width:125px;}
.invoices-table .btn{white-space:nowrap;}


/* Fase 3.3.11 — Faturas sem rolagem horizontal */
.invoices-table-wrap{overflow-x:hidden!important;width:100%!important}
.invoices-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.invoices-table th,.invoices-table td{white-space:normal!important;overflow-wrap:anywhere;word-break:normal}
.invoices-table th:nth-child(1),.invoices-table td:nth-child(1){width:8%}
.invoices-table th:nth-child(2),.invoices-table td:nth-child(2){width:10%}
.invoices-table th:nth-child(3),.invoices-table td:nth-child(3){width:9%}
.invoices-table th:nth-child(4),.invoices-table td:nth-child(4){width:17%;min-width:0!important}
.invoices-table th:nth-child(5),.invoices-table td:nth-child(5){width:11%}
.invoices-table th:nth-child(6),.invoices-table td:nth-child(6){width:10%;min-width:0!important}
.invoices-table th:nth-child(7),.invoices-table td:nth-child(7){width:12%}
.invoices-table th:nth-child(8),.invoices-table td:nth-child(8){width:13%}
.invoices-table th:nth-child(9),.invoices-table td:nth-child(9){width:10%}
.invoices-table .btn{white-space:normal!important;padding:7px 9px}
@media(max-width:1050px){.invoices-table{font-size:12px}.invoices-table th,.invoices-table td{padding:9px 6px}.invoices-table .btn{font-size:11px}}

.invoice-package-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0;padding:14px;border:1px solid #d9e1eb;border-radius:10px;background:#f7f9fc}.invoice-package-summary>div{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.invoice-package-summary strong{margin-right:4px}.summary-chip{display:inline-block;padding:5px 9px;border-radius:999px;background:#eef2f7;font-size:12px}.invoice-package-summary .muted{font-size:13px}@media(max-width:900px){.invoice-package-summary{grid-template-columns:1fr}}

.report-package-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 14px;padding:14px;border:1px solid #d9e1eb;border-radius:10px;background:#f7f9fc}.report-package-summary>div{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.report-package-summary strong{margin-right:4px}@media(max-width:900px){.report-package-summary{grid-template-columns:1fr}}

/* Fase 3.3.12 — tabela de acessos da fatura: campos separados e sem pacote/consumo misturados */
.invoice-access-table-wrap{overflow-x:hidden!important;width:100%;}
.invoice-access-table{width:100%!important;min-width:0!important;table-layout:fixed!important;margin-top:18px;}
.invoice-access-table th,.invoice-access-table td{white-space:normal!important;overflow-wrap:anywhere;vertical-align:middle;}
.invoice-access-table th:nth-child(1),.invoice-access-table td:nth-child(1){width:9%;}
.invoice-access-table th:nth-child(2),.invoice-access-table td:nth-child(2){width:8%;}
.invoice-access-table th:nth-child(3),.invoice-access-table td:nth-child(3){width:12%;}
.invoice-access-table th:nth-child(4),.invoice-access-table td:nth-child(4){width:15%;}
.invoice-access-table th:nth-child(5),.invoice-access-table td:nth-child(5){width:11%;}
.invoice-access-table th:nth-child(6),.invoice-access-table td:nth-child(6){width:10%;}
.invoice-access-table th:nth-child(7),.invoice-access-table td:nth-child(7){width:12%;}
.invoice-access-table th:nth-child(8),.invoice-access-table td:nth-child(8){width:10%;}
.invoice-access-table th:nth-child(9),.invoice-access-table td:nth-child(9){width:8%;}
.invoice-access-table th:nth-child(10),.invoice-access-table td:nth-child(10){width:12%;}
.invoice-access-table .actions{white-space:normal!important;}
.invoice-access-table .btn{white-space:nowrap;}
@media(max-width:1050px){.invoice-access-table{font-size:12px}.invoice-access-table th,.invoice-access-table td{padding:8px 6px}}


/* Atualizações — v3.5.0 */
.update-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.update-card{border:1px solid var(--border,#d9dee7);border-radius:12px;padding:18px;min-width:0}.update-card h2{margin-top:0}.update-status-list{display:grid;gap:10px}.update-status-list>div{display:flex;justify-content:space-between;gap:16px;padding-bottom:8px;border-bottom:1px solid var(--border,#e5e7eb)}.update-status-list>div:last-child{border-bottom:0}.update-card input[type=file]{width:100%;padding:12px;border:1px dashed var(--border,#cbd5e1);border-radius:10px;background:transparent}@media(max-width:850px){.update-grid{grid-template-columns:1fr}}

/* =========================================================
   Versão 3.6.0 — menu lateral, responsividade e contraste
   ========================================================= */
.layout{
  display:flex!important;
  flex-direction:row!important;
  align-items:stretch;
  min-height:100vh!important;
}
.layout>main{
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
}
.app-sidebar{
  position:sticky;
  top:0;
  width:238px!important;
  flex:0 0 238px!important;
  height:100vh;
  min-height:100vh!important;
  padding:0!important;
  overflow:hidden auto;
  z-index:50;
  background:var(--tm-sidebar)!important;
  color:var(--tm-sidebar-text)!important;
  border-right:1px solid rgba(255,255,255,.06);
}
.sidebar-inner{min-height:100%;display:flex;flex-direction:column;padding:18px 14px}
.sidebar-brand{display:flex!important;align-items:center;gap:10px!important;padding:4px 7px 20px!important;color:#fff;text-decoration:none}
.sidebar-brand .brand-logo{width:42px!important;height:42px!important;flex:0 0 42px!important;border-radius:10px!important;padding:2px!important}
.sidebar-brand-text{display:flex!important;flex-direction:column;line-height:1.05}
.sidebar-brand-text strong{font-size:17px}.sidebar-brand-text small{margin-top:3px;color:#98a2b3;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.sidebar-nav{display:block!important;flex:1 1 auto}
.sidebar-section-title{margin:18px 9px 7px;padding-top:13px;border-top:1px solid rgba(255,255,255,.10);color:#7f8796;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.sidebar-section-title:first-child{margin-top:2px;border-top:0;padding-top:0}
.app-sidebar .sidebar-nav a{display:flex!important;align-items:center!important;gap:11px!important;margin:3px 0!important;padding:10px 11px!important;border-radius:8px!important;background:transparent!important;color:var(--tm-sidebar-text)!important;text-decoration:none;font-size:13px!important;line-height:1.25!important}
.app-sidebar .sidebar-nav a:hover{background:rgba(255,255,255,.06)!important;color:#fff!important}
.app-sidebar .sidebar-nav a.active{background:rgba(233,30,99,.16)!important;color:#ff6b9c!important;font-weight:700}
.nav-icon{width:20px;flex:0 0 20px;text-align:center;font-size:15px;line-height:1}
.sidebar-footer{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:center;margin-top:20px;padding:15px 7px 2px;border-top:1px solid rgba(255,255,255,.10)}
.sidebar-theme{grid-column:1/-1;width:100%;justify-content:flex-start;background:rgba(255,255,255,.05)!important;border-color:rgba(255,255,255,.12)!important;color:#e6e9ef!important}
.sidebar-user{min-width:0;color:#cbd1dc;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-logout{color:#98a2b3;text-decoration:none;font-size:12px}.sidebar-logout:hover{color:#ff6b9c}
.sidebar-mobile-toggle,.sidebar-backdrop{display:none}

.topbar{
  height:58px!important;
  min-height:58px!important;
  padding:0 28px!important;
  border-bottom:1px solid var(--tm-border)!important;
  overflow:visible!important;
  background:var(--tm-topbar)!important;
  color:var(--tm-text)!important;
}
section{width:100%;max-width:1600px;padding:24px 28px 36px}
.panel{min-width:0}
.panel-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.row-actions{white-space:nowrap}

/* Acessos — seleção e edição em massa */
.select-col{width:42px;min-width:42px;text-align:center!important}
.select-col input{width:17px;height:17px;margin:0;vertical-align:middle}
.bulk-selection-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 12px;padding:10px 12px;border:1px solid var(--tm-border);border-radius:9px;background:var(--tm-surface-2);font-size:12px}
.bulk-field{margin-top:14px;padding:12px;border:1px solid var(--tm-border);border-radius:9px;background:var(--tm-surface-2)}
.bulk-field-toggle{display:flex!important;align-items:center;gap:8px;margin:0 0 9px!important;font-weight:700}
.bulk-field-toggle input{width:auto!important;margin:0}
.bulk-field>input,.bulk-field>select{width:100%}
.btn:disabled{opacity:.48;cursor:not-allowed;transform:none!important}

/* Acessos — refinamento visual da tabela */
.lines-filters{
  display:grid;
  grid-template-columns:minmax(260px,1.7fr) minmax(190px,1fr) minmax(190px,1fr) auto auto;
  gap:10px;
  align-items:end;
}
.lines-filters input,
.lines-filters select{width:100%;min-width:0}
.lines-filters .btn,
.lines-filters a.btn{height:40px;display:inline-flex;align-items:center;justify-content:center}
.lines-table-wrap{overflow:visible}
.lines-table{
  width:100%;
  table-layout:fixed;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
}
.lines-table th,
.lines-table td{
  padding:12px 10px;
  vertical-align:middle;
}
.lines-table thead th{
  font-size:12px;
  letter-spacing:.02em;
}
.lines-table tbody tr:nth-child(even){background:rgba(148,163,184,.03)}
.lines-table tbody tr:hover{background:rgba(233,30,99,.03)}
.lines-table th:nth-child(2),
.lines-table td:nth-child(2){width:96px}
.lines-table th:nth-child(3),
.lines-table td:nth-child(3){width:18%}
.lines-table th:nth-child(4),
.lines-table td:nth-child(4){width:15%}
.lines-table th:nth-child(5),
.lines-table td:nth-child(5){width:12%}
.lines-table th:nth-child(6),
.lines-table td:nth-child(6){width:15%}
.lines-table th:nth-child(7),
.lines-table td:nth-child(7){width:12%}
.lines-table th:last-child,
.lines-table td:last-child{width:210px}
.line-phone-cell strong{
  display:inline-block;
  white-space:nowrap;
  font-size:15px;
  line-height:1.15;
  letter-spacing:-.02em;
}
.line-text{
  display:block;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.lines-table .badge{
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:11px;
  padding:6px 10px;
}
.lines-table .row-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  white-space:normal;
}
.btn-compact{
  min-height:32px;
  padding:7px 10px;
  border-radius:8px;
  font-size:12px;
  line-height:1.1;
}
body.dark .lines-table tbody tr:nth-child(even){background:rgba(148,163,184,.04)}
body.dark .lines-table tbody tr:hover{background:rgba(255,95,147,.06)}
/* Meu Extrato: estrutura interna preservada, com contraste adequado no escuro. */
body.dark .report-sidebar,
body.dark .report-hero,
body.dark .report-kpi,
body.dark .report-content-card{background:#171b24!important;border-color:#303746!important;color:#f5f7fa!important;box-shadow:none!important}
body.dark .report-sidebar-head{border-color:#303746!important}
body.dark .report-sidebar-head h2,
body.dark .report-content-head h2,
body.dark .report-hero-main h1,
body.dark .report-kpi strong,
body.dark .report-sidebar-note strong{color:#f7f8fa!important}
body.dark .report-sidebar-head p,
body.dark .report-hero-main p,
body.dark .report-content-head p,
body.dark .report-kpi span,
body.dark .report-hero-total span,
body.dark .report-hero-total small{color:#b8c0cf!important}
body.dark .report-sidebar-group a{color:#dce1ea!important}
body.dark .report-sidebar-group a:hover{background:#222834!important;color:#fff!important}
body.dark .report-sidebar-group a.active{background:rgba(255,95,147,.14)!important;color:#ff79a5!important}
body.dark .report-sidebar-note{background:#202631!important;color:#b8c0cf!important}
body.dark .month-card{background:#252b36!important;color:#d8dde6!important;border-color:#353d4b!important;border-bottom-color:#495261!important}
body.dark .month-card:hover{background:#303744!important;color:#fff!important}
body.dark .month-card strong{color:#edf0f5!important}
body.dark .month-card small{color:#aab3c2!important}
body.dark .month-card.active{background:#f5f7fa!important;color:#151821!important;border-color:#d7dce4!important;border-bottom-color:#ff3d7f!important;box-shadow:0 4px 14px rgba(0,0,0,.25)!important}
body.dark .month-card.active strong,body.dark .month-card.active .month-card-name{color:#151821!important}
body.dark .month-card.active small{color:#5e6675!important}
body.dark .report-package-summary,
body.dark .invoice-package-summary{background:#171b24!important;border-color:#303746!important;color:#e9edf3!important}
body.dark .summary-chip{background:#262d39!important;color:#e7ebf1!important}
body.dark .report-data-table th{background:#222834!important;color:#c4cad5!important}
body.dark .report-data-table tbody tr:hover{background:#1d222c!important}
body.dark .report-table-wrap{border-color:#303746!important}
body.dark .report-hero-total strong{color:#79d442!important}
body.dark .column-picker{background:#1d222c!important;border-color:#303746!important;color:#e6eaf0!important}

/* Responsividade global */
@media(max-width:1100px){
  .app-sidebar{width:210px!important;flex-basis:210px!important}
  section{padding:20px}
  .report-section{padding:20px!important}
  .report-page-layout{grid-template-columns:205px minmax(0,1fr)!important}
  .panel-head{align-items:flex-start}
}
@media(max-width:900px){
  .layout{display:block!important}
  .app-sidebar{
    position:fixed!important;
    left:0;top:0;
    width:260px!important;
    max-width:84vw;
    height:100%;
    transform:translateX(-105%);
    transition:transform .2s ease;
    box-shadow:14px 0 35px rgba(0,0,0,.25);
  }
  body.sidebar-open .app-sidebar{transform:translateX(0)}
  .sidebar-mobile-toggle{display:flex;position:fixed;left:12px;top:11px;z-index:70;width:40px;height:40px;align-items:center;justify-content:center;border:1px solid var(--tm-border);border-radius:9px;background:var(--tm-surface);color:var(--tm-text);font-size:20px;cursor:pointer}
  .sidebar-backdrop{display:block;position:fixed;inset:0;z-index:45;background:rgba(0,0,0,.48);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}
  body.sidebar-open .sidebar-backdrop{opacity:1;visibility:visible}
  .topbar{padding-left:64px!important;height:62px!important;min-height:62px!important}
  section{padding:18px 14px 28px}
  .report-section{padding:16px 12px 28px!important}
  .report-page-layout{grid-template-columns:1fr!important}
  .report-sidebar{position:static!important;order:2!important}
  .report-main{order:1!important}
  .filters,.report-filter{align-items:stretch}
  .filters input,.filters select,.filters .btn,.filters a.btn{flex:1 1 180px;min-width:0}
  .panel-head{flex-direction:column;align-items:stretch}
  .panel-actions{justify-content:flex-start}
  .modal{padding:12px;z-index:90}
}
@media(max-width:1180px){
  .lines-table{font-size:12.5px}
  .lines-table th,
  .lines-table td{padding:11px 8px}
  .lines-table th:last-child,
  .lines-table td:last-child{width:196px}
  .btn-compact{padding:6px 9px;font-size:11.5px}
}
@media(max-width:900px){
  .lines-filters{grid-template-columns:1fr 1fr}
  .lines-filters .btn,
  .lines-filters a.btn{width:100%}
}
@media(max-width:700px){
  section{padding:12px 9px 24px}
  .panel{padding:14px;border-radius:10px}
  .cards,.summary-grid,.report-kpis{grid-template-columns:1fr!important}
  .form-grid{display:grid;grid-template-columns:1fr}
  .modal-card{width:100%;padding:18px}
  .modal-actions{flex-wrap:wrap}.modal-actions .btn{flex:1 1 150px;text-align:center}
  .table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table-wrap>table{min-width:720px}
  .panel>table:not(.invoices-table):not(.invoice-access-table){display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
  .lines-table-wrap{overflow:visible}
  .lines-table,
  .lines-table thead,
  .lines-table tbody,
  .lines-table th,
  .lines-table td,
  .lines-table tr{display:block;width:100%}
  .lines-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%)}
  .lines-table tbody{display:grid;gap:12px}
  .lines-table tbody tr{background:var(--tm-surface);border:1px solid var(--tm-border);border-radius:12px;padding:12px 12px 10px;box-shadow:0 3px 10px var(--tm-shadow)}
  .lines-table tbody td{padding:7px 0;border:0!important}
  .lines-table tbody td::before{content:attr(data-label);display:block;margin-bottom:4px;color:var(--tm-text-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
  .lines-table tbody td.select-col::before{margin-bottom:0}
  .lines-table tbody td.select-col{padding-bottom:2px}
  .lines-table tbody td.select-col input{width:18px;height:18px}
  .lines-table .line-text,
  .lines-table .badge{white-space:normal;overflow:visible;text-overflow:initial}
  .line-phone-cell strong{font-size:18px}
  .lines-table .row-actions{justify-content:flex-start;padding-top:10px;border-top:1px solid var(--tm-border-soft)!important;margin-top:6px}
  .lines-table .row-actions::before{content:'Ações';display:block;width:100%;margin-bottom:6px;color:var(--tm-text-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
  .lines-table .row-actions .btn,
  .lines-table .row-actions form{flex:1 1 calc(33.333% - 6px)}
  .lines-table .row-actions form .btn{width:100%}
  .report-hero{padding:16px!important;gap:12px!important}
  .report-hero-total{min-width:0!important;width:100%!important;text-align:left!important}
  .report-content-card{padding:14px!important}
  .report-content-head{flex-direction:column!important}
  .report-sidebar-group{grid-template-columns:1fr!important}
  .report-side-form{grid-template-columns:1fr!important}
  .month-card{min-width:108px!important}
  .update-grid{grid-template-columns:1fr!important}
  .update-status-list>div{flex-direction:column;gap:4px}
}
@media(max-width:480px){
  .topbar{padding-left:60px!important;padding-right:10px!important;font-size:14px}
  .filters input,.filters select,.filters .btn,.filters a.btn{flex-basis:100%;width:100%}
  .panel-actions .btn{flex:1 1 100%;text-align:center}
  .lines-table .row-actions .btn,
  .lines-table .row-actions form{flex:1 1 100%}
  .report-section{padding:10px 7px 22px!important}
  .report-sidebar{padding:14px!important}
  .report-hero-main h1{font-size:21px!important}
  .report-hero-total strong{font-size:22px!important}
}
@media print{
  .app-sidebar,.sidebar-mobile-toggle,.sidebar-backdrop{display:none!important}
  .layout{display:block!important}
  .topbar{display:none!important}
}
