.analytics-view[hidden],
[data-overview-only][hidden],
.analytics-notice[hidden]{display:none!important}

.analytics-view{margin-top:22px;scroll-margin-top:96px}
.analytics-load-state{max-width:540px;color:#2563eb;font-size:12px;line-height:1.5}
#hero-analytics-coverage{display:block;white-space:normal;line-height:1.5;margin-top:4px;font-size:11px}
#hero-analytics-coverage.is-partial{color:#ffe2a0}
.analytics-card-footer small{display:block;margin-top:4px;font-size:11px;line-height:1.5;color:#94600d}
.analytics-view-heading{display:flex;align-items:center;justify-content:flex-end;gap:22px;margin-bottom:12px;padding:0 2px}
.analytics-view-heading[hidden]{display:none}
.analytics-view-heading h2{margin:3px 0 0;color:#142842;font-size:17px;letter-spacing:-.02em}
.analytics-view-heading>div:first-child>p:not(.eyebrow){margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.analytics-view-heading .analytics-scope-note{max-width:760px;color:#687b94;font-size:11px}
.analytics-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:0 0 auto}
.analytics-view-heading{flex-wrap:wrap;justify-content:space-between}
.analytics-heading-actions{flex-wrap:wrap;flex-shrink:1}
.analytics-refresh-button.is-primary{color:#fff;background:var(--primary);border-color:var(--primary)}
.analytics-generated-at{color:#718198;font-size:11px;white-space:nowrap}
.analytics-refresh-button{min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;border:1px solid #d9e4f2;border-radius:10px;color:#17479a;background:#fff;box-shadow:0 6px 18px rgba(20,58,111,.05);font:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:160ms ease}
.analytics-refresh-button:hover{border-color:#b9cef0;color:var(--primary);transform:translateY(-1px)}
.analytics-refresh-button:disabled{opacity:.55;cursor:wait;transform:none}
.analytics-refresh-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.analytics-view.is-loading .analytics-refresh-button svg{animation:analytics-spin .8s linear infinite}

.analytics-report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.analytics-card{min-width:0;overflow:hidden;display:flex;flex-direction:column;border:1px solid #dfe8f4;border-radius:16px;background:#fff;box-shadow:0 14px 38px rgba(20,57,103,.06)}
.analytics-card-table{grid-column:auto}
.analytics-card-heading{min-height:76px;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:11px;padding:15px 17px;border-bottom:1px solid #e8eef6}
.analytics-card-heading h3{margin:0;color:#152a47;font-size:14px;letter-spacing:-.01em}
.analytics-card-heading p{margin:5px 0 0;color:#7d8ca0;font-size:11px;line-height:1.45}
.analytics-card-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:#2563eb;background:#eaf1ff}
.analytics-card-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.analytics-status{padding:5px 8px;border-radius:999px;font-size:10px;font-weight:850;white-space:nowrap}
.analytics-status.is-ready{color:#13775a;background:#e7f8f1}
.analytics-status.is-partial{color:#a66708;background:#fff2d9}
.analytics-status.is-unavailable{color:#6d5ab5;background:#f0ebff}
.analytics-status.is-empty{color:#66758a;background:#edf1f6}
.analytics-card-body{min-height:260px;flex:1;padding:16px 17px}
.analytics-card-footer{min-height:42px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;justify-content:space-between;gap:10px;padding:10px 17px;border-top:1px solid #edf1f6;color:#7e8da1;font-size:11px;line-height:1.45}
.analytics-card-footer strong{color:#40546f}
.analytics-issues{grid-column:1/-1;min-width:0;color:#8b5a0c}
.analytics-issues summary{width:max-content;max-width:100%;cursor:pointer;font-weight:750;list-style-position:inside}
.analytics-issues summary:hover{color:#5f3b03;text-decoration:underline;text-underline-offset:2px}
.analytics-issues ul{display:grid;gap:9px;margin:10px 0 2px;padding:0;list-style:none}
.analytics-issues li{display:grid;gap:3px;padding:9px 10px;border:1px solid #f1dfbd;border-radius:8px;color:#51647c;background:#fff9ed}
.analytics-issues li strong{color:#243b59;font-size:12px}
.analytics-issues li span{font-size:11px;line-height:1.45}
.analytics-issues code{width:max-content;max-width:100%;overflow-wrap:anywhere;color:#81520b;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:10px}

.analytics-bar-group+.analytics-bar-group{margin-top:18px;padding-top:15px;border-top:1px solid #edf1f6}
.analytics-currency-heading{margin-bottom:10px;color:#29549b;font-size:11px;font-weight:850;letter-spacing:.08em}
.analytics-bar-row+.analytics-bar-row{margin-top:13px}
.analytics-bar-label{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:7px;color:#334a68;font-size:12px;line-height:1.35}
.analytics-bar-label span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.analytics-bar-label strong{flex:0 0 auto;color:#122a49;font-size:12px}
.analytics-bar-track{height:18px;overflow:hidden;border-radius:2px;background:#edf5fb}
.analytics-bar-track span{display:block;height:100%;border-radius:2px;background:#40a4e8;transition:width 260ms ease}
.analytics-card[data-report-card="salesByProduct"] .analytics-bar-row+.analytics-bar-row{margin-top:18px}
.analytics-card[data-report-card="salesByProduct"] .analytics-bar-track{height:44px;border-radius:3px;background:#edf6fc}
.analytics-card[data-report-card="salesByProduct"] .analytics-bar-track span{border-radius:3px;background:#40a4e8}

.analytics-table-wrap{max-height:440px;overflow:auto;border:1px solid #e6edf6;border-radius:11px}
.analytics-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
.analytics-table th,.analytics-table td{padding:11px 13px;text-align:left;border-bottom:1px solid #e8eef6}
.analytics-table thead th{position:sticky;top:0;z-index:1;color:#5e7089;background:#eef4fc;font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.analytics-table th:last-child,.analytics-table td:last-child{width:135px;text-align:right}
.analytics-table tbody tr:nth-child(even){background:#f8faff}
.analytics-table tbody tr:hover{background:#eef5ff}
.analytics-table tbody th{min-width:0;color:#29415f;font-weight:650}
.analytics-table tbody th span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.analytics-table tbody td{color:#112b4e;font-weight:850;font-variant-numeric:tabular-nums}
.analytics-table tbody tr:last-child th,.analytics-table tbody tr:last-child td{border-bottom:0}

.analytics-empty{min-height:226px;display:grid;place-content:center;justify-items:center;padding:24px;color:#7d8ca0;text-align:center}
.analytics-empty>span{width:42px;height:42px;display:grid;place-items:center;margin-bottom:10px;border-radius:12px;color:#2563eb;background:#eaf1ff;font-size:18px;font-weight:800}
.analytics-empty strong{color:#435873;font-size:12px}
.analytics-empty p{max-width:300px;margin:6px 0 0;font-size:11px;line-height:1.55}
.analytics-loading{min-height:226px;display:grid;grid-template-columns:repeat(3,8px);place-content:center;justify-items:center;gap:6px;color:#74849a}
.analytics-loading>span{width:8px;height:8px;border-radius:50%;background:#3779e7;animation:analytics-pulse .9s ease-in-out infinite}
.analytics-loading>span:nth-child(2){animation-delay:.13s}
.analytics-loading>span:nth-child(3){animation-delay:.26s}
.analytics-loading small{grid-column:1/-1;margin-top:6px;font-size:11px}

.analytics-notice{position:fixed;inset:0;z-index:150;display:grid;place-items:center;padding:20px}
.analytics-notice-backdrop{position:absolute;inset:0;background:rgba(7,25,51,.54);backdrop-filter:blur(5px)}
.analytics-notice-dialog{position:relative;z-index:1;width:min(430px,100%);padding:26px;border:1px solid rgba(255,255,255,.82);border-radius:18px;background:#fff;box-shadow:0 28px 80px rgba(7,31,66,.28)}
.analytics-notice-icon{width:44px;height:44px;display:grid;place-items:center;margin-bottom:16px;border-radius:13px;color:#b06b00;background:#fff1d4;font-size:20px;font-weight:900}
.analytics-notice-dialog h2{margin:5px 0 8px;color:#162a47;font-size:18px}
.analytics-notice-dialog>p:not(.eyebrow){margin:0;color:#66778e;font-size:12px;line-height:1.65;white-space:pre-wrap}
.analytics-notice-dialog button{min-width:125px;display:block;margin:22px 0 0 auto;padding:11px 16px;border:0;border-radius:10px;color:#fff;background:linear-gradient(135deg,var(--primary),var(--primary-dark));font:inherit;font-size:12px;font-weight:850;cursor:pointer}
body.has-analytics-notice{overflow:hidden}

@keyframes analytics-spin{to{transform:rotate(360deg)}}
@keyframes analytics-pulse{0%,100%{opacity:.35;transform:translateY(0)}50%{opacity:1;transform:translateY(-4px)}}

@media(max-width:900px){
  .analytics-view-heading{align-items:flex-start;flex-direction:column}
  .analytics-heading-actions{width:100%;justify-content:space-between}
  .analytics-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .analytics-card-table{grid-column:1/-1}
}

@media(max-width:700px){
  .analytics-report-grid{grid-template-columns:1fr}
  .analytics-card-table{grid-column:auto}
  .analytics-card-heading{grid-template-columns:38px minmax(0,1fr)}
  .analytics-status{grid-column:2;justify-self:start}
  .analytics-heading-actions{align-items:stretch;flex-direction:column}
  .analytics-generated-at{white-space:normal}
  .analytics-refresh-button{width:100%}
  .analytics-card-body{min-height:220px}
  .analytics-table th:last-child,.analytics-table td:last-child{width:95px}
}

@media(prefers-reduced-motion:reduce){
  .analytics-refresh-button,.analytics-bar-track span{transition:none}
  .analytics-loading>span,.analytics-view.is-loading .analytics-refresh-button svg{animation:none}
}



