:root{--bem-accent:#256c64;--bem-focus:#247cbe}
body{background-color:#f4f7f6; padding-bottom:env(safe-area-inset-bottom)}
.sidebar{max-height:100dvh;overflow-y:auto;overscroll-behavior:contain}
.sidebar-nav{min-height:0;overflow-y:auto;flex:1}
.sidebar-header,.sidebar-footer{flex-shrink:0}
.main-content{min-width:0}
.card,.stat-card{border-radius:16px;box-shadow:0 4px 20px rgba(28,62,55,.055)}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select{min-height:42px}
textarea{min-height:90px}
button,a,input,select,textarea{touch-action:manipulation}
:focus-visible{outline:3px solid var(--bem-focus);outline-offset:3px}
.table-responsive{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.bem-app-bar{position:fixed;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:1100;display:flex;gap:8px;align-items:center;max-width:calc(100vw - 24px)}
.bem-app-bar span:empty{display:none}
.bem-app-bar button{background:var(--bem-accent);color:white;border:0;border-radius:12px;padding:10px 16px;font:600 14px system-ui;cursor:pointer;box-shadow:0 4px 18px #0002}
.bem-app-bar button[hidden]{display:none}
.bem-offline{background:#fff4d9;color:#684c0f;border:1px solid #e5c47d;padding:12px;border-radius:12px;font:14px system-ui}
@media(max-width:767px){input,select,textarea{font-size:16px!important}.modal-dialog{max-width:calc(100vw - 24px);margin:12px}.modal-body{max-height:70dvh;overflow-y:auto}.card{border-radius:12px}.bem-app-bar{bottom:calc(86px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media print{.bem-app-bar{display:none!important}}

/* Dashboard: proporções adequadas também em notebooks. */
.bem-dashboard{width:100%;min-width:0}
.bem-dashboard *, .bem-dashboard *::before, .bem-dashboard *::after{box-sizing:border-box}
.bem-dashboard .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}
.bem-dashboard .stat-card,.bem-dashboard .stat-content,.bem-dashboard .card{min-width:0}
.bem-dashboard .stat-content{overflow-wrap:anywhere}
.bem-dashboard .stat-icon{flex-shrink:0}
.bem-dashboard .stat-value{font-variant-numeric:tabular-nums}
.bem-dashboard-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.bem-dashboard-columns>.card{margin-bottom:0}
.bem-dashboard .card-header{flex-wrap:wrap;gap:12px;align-items:flex-start}
.bem-dashboard .card-title{min-width:0;flex:1 1 240px;line-height:1.4;overflow-wrap:anywhere}
.bem-dashboard .card-header form{flex-wrap:wrap;align-items:center;max-width:100%}
.bem-dashboard .card-header form select{max-width:100%;min-width:0}
.bem-dashboard .card-header .badge{margin-bottom:4px}
.bem-revenue-chart{position:relative;width:100%;height:320px;min-width:0}
.bem-monthly-bars{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px;width:100%;min-width:0}
.bem-monthly-bars>div{min-width:0}
.bem-monthly-bars>div>div:nth-child(2)>div{max-width:75%}
.bem-dashboard .birthday-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr))}
@media(min-width:993px) and (max-width:1440px){
 :root{--sidebar-width:220px}
 .sidebar-header{padding:16px}
 .sidebar-nav{padding-left:12px;padding-right:12px}
 .sidebar .nav-item{padding:10px 12px}
 .main-content>.container{padding:20px}
 .top-bar{padding:12px 20px;height:auto;min-height:70px;gap:16px;flex-wrap:wrap}
 .top-bar .quick-actions{flex-wrap:wrap;gap:8px}
 .page-title{flex-wrap:wrap;gap:8px}
 .date-display{font-size:12px}
 .bem-dashboard .stat-card{padding:16px;flex-direction:column;align-items:flex-start;gap:10px}
 .bem-dashboard .stat-icon{width:36px;height:36px;font-size:18px;border-radius:10px}
 .bem-dashboard .stat-value{font-size:24px}
 .bem-dashboard .stat-label{font-size:13px;line-height:1.4}
 .bem-dashboard .card{padding:18px}
 .bem-dashboard .card-title{font-size:16px}
 .bem-dashboard .card-header{margin-bottom:16px;padding-bottom:12px}
}
@media(max-width:1199px){.bem-dashboard .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1280px){.bem-dashboard-columns{grid-template-columns:minmax(0,1fr)}}
@media(max-width:768px){
 .bem-dashboard .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .bem-dashboard .stat-card{padding:14px;flex-direction:column;align-items:flex-start;gap:8px}
 .bem-dashboard .stat-icon{width:34px;height:34px;font-size:18px}
 .bem-dashboard .stat-value{font-size:22px}
 .bem-revenue-chart{height:260px}
 .bem-monthly-bars{gap:4px}
 .bem-monthly-bars>div>div:first-child{font-size:10px!important}
 .bem-monthly-bars>div>div:last-child{font-size:9px!important}
 .main-content>.container{padding:16px}
}
@media(max-width:480px){.bem-dashboard .stats-grid{grid-template-columns:minmax(0,1fr)}}
