/* Shared visual language inspired by the Mercado Turbo reference.
   Sales typography and semantic status colours remain defined by their modules. */
body.ew-navigation{
 --ew-surface:#fff;--ew-page:#eeedf3;--ew-border:#d9d5e2;
 --ew-purple:#67478d;--ew-soft:#f5f2f8;--ew-green:#16856c;
 --ew-red:#b6213b;--ew-blue:#397ab8;
 background:var(--ew-page);color:#24344c;
}
body.ew-app-analises{
 color-scheme:light;--bg-app:#eeedf3;--bg-card:#fff;--bg-card-muted:#f7f4fa;
 --bg-input:#fff;--text-primary:#24344c;--text-secondary:#53647b;--text-muted:#758299;
 --border:#d9d5e2;--border-strong:#c9c0d8;--accent:#67478d;--accent-strong:#513675;
 --accent-soft:#efe9f6;--table-head:#f2eef7;--hover:#f5f2f8;--card:#fff;
 --paper:#eeedf3;--ink:#24344c;--muted:#758299;--line:#d9d5e2;
 --success:#16856c;--danger:#b6213b;--green:#16856c;--green-soft:#e5f3ec;
}
body.ew-app-analises .grain{display:none}
body.ew-app-analises :is(.hero-card,.metric-card){border-radius:8px;min-height:0;padding:18px;border-color:var(--ew-border);box-shadow:0 2px 5px #28304407}
body.ew-app-analises .hero-card.dark{background:#b6213b;border-color:#b6213b}
body.ew-app-analises .hero-card.dark p{color:#fff}
body.ew-app-analises .hero-card.dark strong{color:#fff}
body.ew-app-analises .metric-card.accent{background:#e9f3ee;border-color:#c9e3d5}
body.ew-app-analises .primary{background:var(--ew-red);color:white}
body.ew-app-analises .secondary{background:var(--ew-purple);color:white}
body.ew-app-analises:is(:has(#view-quality.active),:has(#view-inventory.active)){background:var(--ew-page)}
body.ew-app-analises:is(:has(#view-quality.active),:has(#view-inventory.active)) :is(main,.topbar){background:transparent}
body.ew-navigation main,body.ew-app-analises>main{max-width:1900px;padding:20px 24px}
#ew-navigation nav{max-width:none;width:100%}
body.ew-navigation :is(.heading,.title-row){margin-bottom:14px;gap:14px}
body.ew-navigation :is(.panel,.q-panel,.post-panel,.card,.metric,.account-card,.ads-insights,.ads-campaign,.ads-kpi,.filters,.tax-settings){border-color:var(--ew-border);border-radius:8px;box-shadow:0 2px 5px #28304407}
body.ew-navigation :is(.panel,.q-panel,.post-panel){background:var(--ew-surface)}
body.ew-navigation :is(.filters,.panel.toolbar){padding:13px 16px;gap:10px;background:white}
body.ew-navigation :is(.filters,.toolbar,.q-filters,.post-filters) :is(input:not([type=checkbox]),select){border-color:#ccc3dc;background:white;border-radius:4px;padding:6px 9px;min-height:32px}
body.ew-navigation :is(.filters,.toolbar) label{color:#6c7790;font-weight:500;gap:4px}
body.ew-navigation :is(.metric,.card){padding:15px 17px}
body.ew-navigation :is(.metrics,.cards,.sh-grid){gap:10px}
body.ew-navigation :is(.metric,.card,.account-card) strong{font-variant-numeric:tabular-nums}
body.ew-navigation :is(.panel-heading,.panel-head){margin-bottom:14px}
body.ew-navigation :is(.chip,.pill){border-radius:4px}
body.ew-navigation .table-wrap{border-color:var(--ew-border);border-radius:6px}
body.ew-navigation table th{background:#f2eef7;color:#625578;border-bottom-color:var(--ew-border);text-transform:none;letter-spacing:.02em;padding:10px 11px}
body.ew-navigation table td{border-bottom-color:#e5e1eb;padding:11px;vertical-align:middle}
body.ew-navigation table tbody tr:nth-child(even){background:#f8f6fa}
body.ew-navigation table tbody tr:hover{background:#f1edf6}
body.ew-navigation :is(.pager,.period-shortcuts) button{background:#f4f0f8;border-color:#d8cce7;color:#67478d;border-radius:4px}
body.ew-navigation :is(#views,.sh-tabs,.stage-bar) button{border-radius:4px}
body.ew-navigation :is(.q-tabs,.post-tabs) button:not([aria-current=page]):not(.active){background:#f4f1f8}
body.ew-navigation :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #8462ae;outline-offset:3px}
body.ew-navigation dialog{border-radius:10px;border-color:var(--ew-border);box-shadow:0 18px 60px #24304a40}
body.ew-navigation dialog::backdrop{background:#24304480}
body.ew-navigation :is(.bar,.sh-bar){background:#eae4f1;border-radius:4px}
body.ew-navigation :is(.bar,.sh-bar) span:not(.red){background:var(--ew-purple)}
body.ew-navigation .daily-bars span{background:var(--ew-purple);border-radius:3px 3px 0 0}
body.ew-navigation .channel-bar-svg .current{fill:var(--ew-red)}
body.ew-navigation .channel-bar-svg .previous{fill:#b4a1ce}
body.ew-navigation .share-bar-svg .track{fill:#ede7f3}
body.ew-navigation .share-bar-svg .value{fill:var(--ew-purple)}
body.ew-navigation .quality-line polyline{stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
body.ew-navigation .ew-listing-row:nth-child(even),body.ew-navigation .order.sale-row:nth-child(even){background:#f5f2f8}
body.ew-navigation .ew-listing-row>td{padding:12px 10px}
body.ew-navigation .q-card{border-color:var(--ew-border);box-shadow:0 2px 6px #2430440b;border-radius:10px}
body.ew-navigation :is(.q-question,.post-message){border-radius:8px}
body.ew-navigation .quality-system-card{border-color:var(--ew-border);background:white}
/* The dashboard keeps the current financial definitions and all account filters. */
body.ew-app-gestao .connection-status{max-width:1900px;padding:0 24px;margin-top:10px}
body.ew-app-gestao .filters{margin-bottom:10px}
body.ew-app-gestao .heading{margin-bottom:12px}
body.ew-app-gestao .advanced-filters{margin-top:10px;padding-top:8px}
body.ew-app-gestao #counts{margin:10px 0;color:#69748b}
body.ew-app-gestao .overview-metrics{gap:12px}
body.ew-app-gestao .overview-metrics .metric{padding:18px 20px;border:0;box-shadow:0 3px 8px #28304412;color:white}
body.ew-app-gestao .overview-metrics :is(.metric-label,.metric-foot){color:#fff}
body.ew-app-gestao .tone-revenue{background:#bd304c}
body.ew-app-gestao .tone-orders{background:#67478d}
body.ew-app-gestao .tone-ticket{background:#24876a}
body.ew-app-gestao .tone-tax{background:#397ab8}
body.ew-app-gestao .overview-metrics .metric-label{margin-bottom:8px}
body.ew-app-gestao .metric-value{letter-spacing:-.4px}
body.ew-app-gestao #comparison-note{margin:9px 0 14px}
body.ew-app-gestao .panel{padding:18px;margin-bottom:0}
body.ew-app-gestao .home-grid{gap:14px;margin:14px 0;grid-template-columns:minmax(0,2fr) minmax(290px,1fr)}
body.ew-app-gestao .status-item{position:relative;padding:8px 10px;margin:3px 0;border:0;border-radius:4px;isolation:isolate;overflow:hidden}
.status-item .status-fill{position:absolute;inset:0 auto 0 0;background:#e4f1ed;z-index:-1}
.status-item.status-shipped .status-fill{background:#fff0dd}
.status-item.status-pending .status-fill{background:#eee8f5}
.status-item.status-cancelled .status-fill{background:#fbe7ec}
body.ew-app-gestao .margin-preview{margin-top:10px;padding:12px;background:#f6f3f9;border-radius:6px}
body.ew-app-gestao .margin-preview .metric-label{margin-bottom:5px}
body.ew-app-gestao .margin-preview .metric-foot{margin-top:6px}
body.ew-app-gestao .visits-account-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(290px,1fr);gap:14px;margin:14px 0}
body.ew-app-gestao .visits-panel{margin:0}
body.ew-app-gestao .accounts-panel .section-heading{margin:0 0 15px;display:block}
body.ew-app-gestao .accounts-panel .section-heading p{margin-top:4px}
body.ew-app-gestao .account-cards{grid-template-columns:1fr;gap:12px}
body.ew-app-gestao .account-card{grid-template-columns:1fr auto;padding:16px 14px;background:#f8f6fa;box-shadow:none;border-left:4px solid #67478d}
body.ew-app-gestao .account-card.account-ML2{border-left-color:#16836f}
body.ew-app-gestao .account-card.account-SHOPEE{border-left-color:#dc7836}
body.ew-app-gestao .account-link{color:#34445e;font-weight:700}
body.ew-app-gestao .account-card strong{display:block;margin:0;color:#25354f}
.ew-chart-controls{display:flex;gap:4px;flex-wrap:wrap}
body.ew-app-gestao .ew-chart-controls button{padding:4px 9px;border:1px solid #d8cce7;background:#f4f0f8;color:#67478d;min-height:28px}
body.ew-app-gestao .ew-chart-controls button[aria-pressed=true]{background:#67478d;border-color:#67478d;color:white}
.ew-chart-legend{display:flex;flex-wrap:wrap;gap:15px;justify-content:center;margin:3px 0 10px;color:#5a6680}
.ew-chart-legend span{display:inline-flex;align-items:center;gap:6px}
.ew-chart-legend span:before{content:'';width:18px;border-top:3px solid var(--series-color);border-radius:2px}
.ew-chart-series-ML1{--series-color:#67478d;fill:#67478d;stroke:#67478d}
.ew-chart-series-ML2{--series-color:#16836f;fill:#16836f;stroke:#16836f}
.ew-chart-series-SHOPEE{--series-color:#dc7836;fill:#dc7836;stroke:#dc7836}
body.ew-app-gestao .chart-grid{stroke:#e8e3ed}
body.ew-app-gestao .chart-label{fill:#69748b;font-size:11px}
.ew-chart-line{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.ew-chart-dot{stroke:white;stroke-width:1.5}
.ew-chart-bar{stroke:none;transition:opacity .12s}
.ew-chart-bar:hover,.ew-chart-bar:focus,.ew-chart-dot:hover,.ew-chart-dot:focus{opacity:.75;outline:none;stroke:#24344c;stroke-width:2}
body.ew-app-gestao .ew-chart-point{min-height:20px;margin:4px 0;color:#5d4876}
body.ew-app-gestao #revenue-chart svg{min-height:0}
body.ew-app-gestao .modality-cards .metric{padding:10px 13px;background:#f8f6fa;box-shadow:none}
body.ew-app-gestao .modality-cards .metric-label{margin-bottom:3px}
body.ew-app-gestao .modality-cards .metric-value{font-size:19px!important}
body.ew-app-gestao .modality-cards .metric-foot{margin-top:3px}
.modality-share{width:100%;height:6px;display:block;margin-top:9px}
.modality-share .track{fill:#eae3f1}.modality-share .value{fill:#67478d}
/* Keep charts legible on Android without shrinking a desktop canvas. */
@media(max-width:1000px){
 body.ew-app-gestao :is(.home-grid,.visits-account-grid){grid-template-columns:1fr}
 body.ew-app-gestao .account-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.ew-app-gestao .account-card{display:block}
 body.ew-app-gestao .account-card strong{margin:8px 0}
}
@media(max-width:650px){
 body.ew-navigation main,body.ew-app-analises>main{padding:16px 12px}
 body.ew-navigation :is(.panel,.filters){padding:13px}
 body.ew-app-gestao .connection-status{padding:0 12px}
 body.ew-app-gestao .overview-metrics{gap:8px}
 body.ew-app-gestao .overview-metrics .metric{padding:14px 12px}
 body.ew-app-gestao .account-cards{grid-template-columns:1fr}
 body.ew-app-gestao .account-card{display:grid}
 body.ew-app-gestao .account-card strong{margin:0}
 body.ew-app-gestao .panel-heading{flex-wrap:wrap;gap:8px}
 body.ew-app-gestao .visits-toolbar>div{width:100%;justify-content:space-between}
 .ew-chart-legend{gap:10px}
 body.ew-navigation :is(button,input,select){min-height:32px}
}
@media print{body.ew-navigation{background:white}body.ew-navigation main{max-width:none;padding:0}.ew-chart-controls{display:none}}
