:root {
  --brand: #60102f;
  --brand-dark: #41081f;
  --charcoal: #27272a;
  --charcoal-dark: #18181b;
  --brand-soft: #f7eef1;
  --page: #f4f3f3;
  --surface: #fff;
  --surface-soft: #f7f6f6;
  --line: #e3e0e1;
  --text: #252427;
  --muted: #747075;
  --success: #168a51;
  --warning: #8a6500;
  --danger: #b4233c;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
  font-family: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}
.header-session { display:flex; align-items:center; gap:14px; font-size:.78rem; }
[hidden] { display:none !important; }
.summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.summary-card { position:relative; overflow:hidden; display:block; padding:18px 20px; min-width:0; border:1px solid #e7dce1; border-radius:14px; background:#f6eff2; }
.summary-card:nth-child(2) { background:#eff4ef; border-color:#dce6de; }
.summary-card:nth-child(3) { background:#f7f3ec; border-color:#e9e1d5; }
.summary-card:nth-child(4) { background:#f2f0f5; border-color:#e2dce9; }
.summary-card span { display:block; padding-right:0; color:#645b61; font-size:.73rem; font-weight:600; }
.summary-card strong { display:block; grid-column:1/-1; margin:10px 0; color:#452436; font-size:clamp(1.2rem,2vw,1.65rem); font-variant-numeric:tabular-nums; letter-spacing:-.035em; overflow-wrap:anywhere; }
.summary-card:nth-child(2) strong { color:#35533e; }
.summary-card:nth-child(3) strong { color:#695235; }
.summary-card:nth-child(4) strong { color:#554665; }
.summary-card small { display:block; grid-column:1/-1; color:#746b70; font-size:.7rem; line-height:1.6; }
.connection-status.is-error { color:var(--danger); }
.sales-table td { overflow-wrap:anywhere; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; line-height:1.55; }
.sales-table td[data-column="date"],.sales-table td.numeric-column { white-space:nowrap; }
.chart-placeholder svg { width:100%; max-height:260px; display:block; }
.pie-layout { width:100%; display:grid; grid-template-columns:minmax(130px,.7fr) minmax(0,1fr); gap:18px; align-items:center; }
.chart-legend { list-style:none; padding:0; margin:0; max-height:280px; overflow:auto; scrollbar-width:none; font-size:.72rem; }
.chart-legend::-webkit-scrollbar,.chart-bars::-webkit-scrollbar { display:none; width:0; height:0; }
.chart-legend li { display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; gap:5px 8px; padding:9px 3px; border-bottom:1px solid #e2e8f0; color:var(--text); overflow-wrap:anywhere; }
.chart-legend strong { text-align:right; font-variant-numeric:tabular-nums; }
.chart-legend small { grid-column:3; text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; }
.legend-name { grid-row:span 2; }
.legend-mark { width:10px; height:10px; border-radius:3px; grid-row:span 2; }
.pie-layout svg > path, .pie-layout svg > circle[tabindex] { transition:opacity 180ms, filter 180ms; }
.pie-layout svg > [tabindex]:hover, .pie-layout svg > [tabindex]:focus { filter:brightness(1.12); outline:none; stroke:#fff; stroke-width:2px; }
.chart-bars { width:100%; max-height:260px; overflow:auto; scrollbar-width:none; display:grid; gap:10px; padding:4px; }
.chart-bar-row { display:grid; grid-template-columns:minmax(90px,1fr) 1.5fr minmax(50px,auto); align-items:center; gap:10px; font-size:.7rem; text-align:left; }
.chart-bar-row > span { overflow-wrap:anywhere; }
.chart-bar-row strong { font-variant-numeric:tabular-nums; }
.date-shortcuts { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:16px; font-size:.72rem; color:var(--muted); }
.date-shortcuts button { color:#65717a; background:#f4f6f7; border:1px solid #e1e6e9; border-radius:20px; padding:7px 13px; transition:background 180ms; }
.date-shortcuts button:hover { background:#e9eef1; border-color:#ccd6dd; }
.advanced-filters { margin-top:20px; padding:14px; border-radius:12px; border:1px solid #e3e7e9; background:#f7f8f9; }
.advanced-filters summary { cursor:pointer; font-size:.78rem; font-weight:650; color:#5e6972; }
.advanced-filters summary span { margin-left:8px; font-weight:400; color:var(--muted); }
.advanced-filter-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:14px; }
.filter-help { font-size:.68rem; color:var(--muted); line-height:1.7; margin:12px 0 0; }
.chart-bar-track { height:15px; position:relative; background:#f0f3f5; border-radius:3px; }
.chart-bar-value { position:absolute; top:0; height:100%; background:#2563eb; border-radius:3px; transition:width 200ms var(--ease); }
.chart-bar-axis { position:absolute; top:-3px; height:21px; width:1px; background:#929ea7; z-index:1; }
@media(max-width:560px) { .summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .summary-card { padding:16px; } .pie-layout { grid-template-columns:1fr; } .pie-layout svg { max-height:190px; } .advanced-filter-grid { grid-template-columns:1fr; } }
.header-logout { border:1px solid #ffffff55; border-radius:8px; padding:7px 12px; background:transparent; color:#fff; font:inherit; }
.login-page { min-height:72vh; display:grid; place-items:center; padding:24px 0; }
.login-card { width:min(100%, 920px); display:grid; grid-template-columns:1fr 1fr; overflow:hidden; border:1px solid var(--line); border-radius:28px; background:var(--surface); box-shadow:0 18px 60px #39212b12; animation:login-enter 360ms var(--ease) both; }
.login-intro { padding:44px; color:#fff; background:linear-gradient(145deg,var(--brand),#41081f); }
.login-intro img { padding:5px; background:#fff; border-radius:18px; margin-bottom:30px; }
.login-intro .eyebrow { color:#e5cdd7; }
.login-intro h1 { font-size:clamp(1.8rem,3vw,2.4rem); line-height:1.15; }
.login-intro > p:last-child { color:#e5cdd7; font-size:.86rem; line-height:1.8; margin:22px 0 0; }
.login-form-panel { padding:44px; align-self:center; }
.login-form-panel h2 { font-size:1.25rem; }
.login-form-panel > p { font-size:.8rem; color:var(--muted); line-height:1.7; }
.login-form-panel form { display:grid; gap:8px; margin-top:24px; }
.login-form-panel input { min-height:48px; }
.login-form-panel label:not(:first-of-type) { margin-top:12px; }
.login-submit { width:100%; min-height:46px; margin-top:20px; }
.login-message { padding:10px 12px; border-radius:9px; background:var(--brand-soft); }
.login-errors { color:var(--danger); font-size:.78rem; }
.login-errors ul { padding-left:18px; }
@keyframes login-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:560px) { .login-card { grid-template-columns:1fr; border-radius:24px; } .login-intro,.login-form-panel { padding:1.35rem; } .login-intro img { width:54px; height:54px; margin-bottom:16px; } }
@media(prefers-reduced-motion:reduce) { .login-card { animation:none; } }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--brand); }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline:2px solid #a45e79; outline-offset:2px; }
input:focus-visible,select:focus-visible { outline:none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 20; background: var(--surface); padding: 12px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.app-header { position: sticky; top: 0; z-index: 10; color: #fff; background: linear-gradient(120deg, var(--brand), #4a0b23); box-shadow: 0 3px 16px #201b1d12; }
.app-navigation { max-width: 1560px; margin: 0 auto; min-height: 64px; padding: 12px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 38px; height: 38px; border-radius: 12px; object-fit: contain; background: #fff; }
.brand strong { display: block; font-size: .9rem; font-weight: 650; }
.brand small { display: block; font-size: .72rem; color: #e5cdd7; }
.header-caption { color: #e5cdd7; font-size: .8rem; }
.app-main { flex: 1; width: 100%; max-width: 1560px; margin: 0 auto; padding: 28px; }
.app-footer { min-height:50px; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem clamp(1rem,2vw,2rem); border-top:1px solid #60102f1f; color:var(--muted); background:#f3ecef; font-size:.78rem; }
.app-footer > span { white-space:nowrap; }
.last-refresh-status { margin:0; font-size:.67rem; font-weight:550; }
.last-refresh-status time { font-weight:700; }
.sales-page { display:grid; gap:20px; min-width:0; animation:page-enter 240ms ease-out both; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; font-size: .65rem; font-weight: 700; letter-spacing: .12em; color: var(--brand); }
h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 720; letter-spacing: -.035em; }
h2 { margin: 0; font-size: .95rem; font-weight: 650; }
h3 { margin: 0; font-size: .87rem; font-weight: 650; }
.page-description, .section-description { margin: 5px 0 0; font-size: .78rem; color: var(--muted); }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.report-indicator { margin-left:auto; color:#827980; font-size:.65rem; font-weight:500; }
.button { position:relative; display: inline-flex; align-items: center; justify-content: center; min-height:38px; padding:8px 14px; border:1px solid transparent; border-radius: 10px; font-size: .78rem; font-weight: 600; transition:background 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
.button-primary { color: #fff; background: var(--brand); }
.button-excel { gap:7px; color:#fff; background:#216c50; border-color:#216c50; }
.button-excel .excel-icon { width:18px; height:18px; opacity:.85; transition:opacity 180ms ease; }
.button-excel .excel-grid { opacity:.65; transition:opacity 180ms ease; }
.button-excel:hover .excel-icon,.button-excel:hover .excel-grid { opacity:1; }
.button-excel[aria-busy="true"] { opacity:.65; cursor:progress; }
.button-secondary { color: var(--text); background: var(--surface); border-color: var(--line); min-height: 34px; padding: 6px 12px; }
.text-button { color: var(--brand); background: none; border: 0; padding: 6px 0; font-size: .72rem; }
.filter-panel, .chart-panel, .results-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.filter-panel { padding: 18px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; margin-top: 14px; }
label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: .72rem; }
input, select { width: 100%; min-width: 0; max-width: 100%; min-height: 40px; padding: 9px 11px; color: var(--text); background: var(--surface); border:1px solid #cfd5dc; border-radius: 9px; font-size:.8rem; font-weight:650; outline:0; transition:border-color 220ms ease,box-shadow 300ms var(--ease),transform 260ms var(--ease),background 220ms ease; }
input:focus,select:focus { border-color:var(--brand); box-shadow:0 0 0 3px #60102f1c; transform:scale(1.003); }
.run-action { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.run-action .button { width:100%; min-width:0; padding-inline:10px; white-space:nowrap; }
.filter-status { color:#858187; font-size: .72rem; margin: 16px 0 0; }
.filter-status.is-invalid { color: var(--danger); }
.connection-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size:.7rem; margin-top:8px; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #b1a8ac; }
.analysis-section { display: grid; gap: 12px; }
.analysis-toolbar { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px; }
.chart-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.chart-controls label { width: 190px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; }
.chart-panel { padding:18px; box-shadow:0 4px 16px #201b1d04; }
.chart-label { font-size: .67rem; color: var(--muted); }
.chart-placeholder { height: 190px; display: grid; place-items: center; position: relative; margin: 18px 0 12px; }
.chart-placeholder:has(svg), .chart-placeholder:has(.chart-bars) { height:auto; min-height:230px; }
.numeric-column { text-align:right; font-variant-numeric:tabular-nums; }
.chart-placeholder > span { position: relative; z-index: 1; color: var(--muted); background: var(--surface); padding: 5px 10px; font-size: .74rem; }
.trend-placeholder { background:none; }
.distribution-placeholder .empty-ring { position: absolute; width: 172px; height: 172px; border: 21px solid #f0edef; border-radius: 50%; transition: border-width 180ms var(--ease), border-radius 180ms var(--ease); }
.distribution-placeholder[data-chart-style="pie"] .empty-ring { border-width: 4px; border-style: dashed; }
.distribution-placeholder[data-chart-style="bar"] { background: repeating-linear-gradient(to right, transparent 0, transparent 24%, #eeebec 24%, #eeebec 24.3%); }
.distribution-placeholder[data-chart-style="bar"] .empty-ring { display: none; }
.chart-caption, .chart-status { margin: 0; color: var(--muted); font-size: .67rem; }
.results-panel { overflow:hidden; box-shadow:0 8px 24px #201b1d09; }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px; }
.page-size-label { display: flex; align-items: center; gap: 9px; }
.page-size-label select { width:68px; min-height:38px; height:38px; padding-block:6px; font-size:.78rem; }
.table-wrap { max-width:100%; margin:0; min-height:min(var(--table-page-height,0px),65vh); max-height:65vh; overflow:auto; overflow-anchor:none; scrollbar-width:none; border:0; border-radius:0; }
.table-wrap::-webkit-scrollbar { display:none; width:0; height:0; }
.sales-table tfoot td { position:sticky; bottom:0; z-index:1; background:#f0edf0; color:#302a30; font-weight:750; border-top:1px solid #d7cfd4; border-bottom:0; box-shadow:0 -2px 6px #18181b09; }
.sales-table tfoot small { display:block; font-weight:400; color:var(--muted); font-size:.62rem; white-space:normal; }
.column-filter-heading { display:flex; align-items:center; justify-content:space-between; gap:5px; }
.column-filter-button { display:inline-grid; place-items:center; flex:0 0 26px; width:26px; height:26px; padding:5px; border:0; border-radius:6px; color:#c8c5c8; background:transparent; transition:background 140ms,color 140ms; }
.column-filter-button svg { width:13px; height:13px; }
.column-filter-button:hover,.column-filter-button.is-active { background:#ffffff24; color:#fff; }
.column-filter-summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0 18px 12px; }
.column-filter-summary button { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:5px 9px; border:1px solid var(--line); border-radius:8px; background:#f7f5f6; color:var(--text); font-size:.7rem; transition:background 140ms; }
.column-filter-summary button:hover { background:#f0e6eb; }
.column-filter-dialog { max-width:480px; }
.column-filter-dialog form { padding-block:16px 0; }
.column-filter-input { display:grid; gap:7px; min-width:0; }
.column-filter-input input { width:100%; }
.group-records-button { display:inline-flex; align-items:center; gap:7px; border:0; padding:4px 0; background:transparent; color:var(--brand); text-decoration:underline; text-underline-offset:3px; font:inherit; transition:color 140ms; }
.group-records-button:hover { color:#252024; }
.column-dialog.group-rows-dialog { width:min(1280px,calc(100vw - 28px)); }
.group-rows-dialog .table-shell { margin-top:12px; }
.group-rows-dialog .table-wrap { max-height:55dvh; min-height:0; }
.group-rows-dialog .results-footer { padding-inline:0; }
.group-rows-dialog .section-description { overflow-wrap:anywhere; }
@media(max-width:430px) { .group-rows-dialog .results-footer { gap:6px; flex-wrap:nowrap; } .group-rows-dialog .button { padding-inline:10px; } [data-group-rows-page] {font-size:0;} [data-group-rows-page]::after {content:attr(data-page-fraction);font-size:.65rem;white-space:nowrap;} }
.sales-table { width:100%; min-width:1120px; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:.82rem; }
.sales-table th { position:sticky; top:0; z-index:2; padding:13px 16px; text-align:left; white-space:nowrap; color:#fff; background:var(--charcoal-dark); border-bottom:1px solid #383438; box-shadow:0 2px 5px #18181b19; font-weight:750; font-size:.72rem; }
.sales-table th.numeric-column { text-align: right; }
.sales-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.sales-table tbody tr { transition:background 180ms ease; background:#fff; }
.sales-table tbody tr:nth-child(even) { background:#fafbfc; }
.sales-table tbody tr:hover { background:#f6f0f3; }
.results-empty { display: grid; justify-items: center; gap: 7px; padding: 35px 18px; text-align: center; }
.empty-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.results-empty p { margin: 0; color: var(--muted); font-size: .73rem; }
.results-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-top:6px; padding:12px 18px; color:var(--muted); font-size:.7rem; }
.pagination-actions { display:flex; align-items:center; gap:7px; }
.filter-panel,.results-panel,.chart-panel { animation:page-fade-in 180ms ease both; }
@media (hover:hover) and (pointer:fine) { .button-primary:not(:disabled):hover { background:var(--brand-dark); } .button-secondary:not(:disabled):hover { background:#f7f5f6; border-color:#bbb5b8; } .button-excel:not(:disabled):hover { background:#195b43; border-color:#195b43; box-shadow:inset 0 0 0 1px #ffffff14; } }
@media (max-width: 1000px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chart-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .chart-grid { grid-template-columns: 1fr; } .chart-controls { width: 100%; } .chart-controls label { flex: 1 1 160px; width: auto; } .app-main { padding: 20px 16px; } .app-navigation { padding-inline: 16px; } }
@media (max-width: 430px) { .filter-grid { grid-template-columns: minmax(0, 1fr); } .filter-panel, .chart-panel { padding: 14px; } .app-main { padding: 18px 12px; } .header-caption { display: none; } .brand img { width: 34px; height: 34px; } .brand strong { font-size: .83rem; } .page-heading { align-items: flex-start; } .page-actions { width: 100%; justify-content: space-between; } input, select { font-size: 1rem; } .app-footer { padding-inline: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; transform: none !important; scroll-behavior: auto !important; } }

/* Neutral controls retain the approval application's compact proportions. */
.table-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.grouping-caption { padding:10px 18px; margin:0; background:var(--brand-soft); color:var(--brand); font-size:.72rem; line-height:1.7; border-top:1px solid var(--line); }
.missing-note { display:block; font-size:.64rem; color:var(--warning); }
.column-dialog { width:min(720px,calc(100vw - 28px)); max-height:90dvh; padding:0; border:1px solid var(--line); border-radius:18px; color:var(--text); background:var(--surface); box-shadow:0 24px 80px #201b1d44; }
.column-dialog[open] { animation:page-fade-in 160ms ease both; }
.column-dialog::backdrop { background:#201b1d77; backdrop-filter:blur(3px); animation:page-fade-in 200ms ease both; }
.dialog-close { border:1px solid #ffffff29; border-radius:8px; background:#ffffff0d; color:#fff; width:32px; height:32px; font-size:1.3rem; }
.column-dialog > .panel-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; padding:20px; color:#fff; background:linear-gradient(110deg,#202023,#383638); }
.column-dialog > .panel-heading .section-description { color:#cfc5cb; }
.column-dialog > :not(.panel-heading) { margin-left:20px; margin-right:20px; }
.column-search { margin-block:18px 4px; }
.column-tools { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; }
.column-list-heading,.column-item { display:grid; grid-template-columns:minmax(0,1fr) 54px 54px 70px; align-items:center; gap:10px; }
.column-list-heading { font-size:.68rem; font-weight:650; padding:7px 8px; background:var(--charcoal-dark); color:#fff; border-radius:7px; }
.column-list-heading span:not(:first-child) { text-align:center; }
.column-list { max-height:38dvh; overflow:auto; scrollbar-color:#bba4ad var(--surface-soft); }
.column-item { font-size:.78rem; padding:9px 8px; border-bottom:1px solid var(--line); }
.column-item:nth-child(even) { background:#fafbfc; }
.column-item:has(input[aria-label$=" Grupla"]:checked) { background:var(--brand-soft); }
.column-item > span { overflow-wrap:anywhere; }
.column-item input { width:18px; min-height:18px; height:18px; margin:auto; padding:0; accent-color:var(--brand); border-radius:4px; }
.column-check { display:grid; place-items:center; width:40px; height:40px; gap:0; margin:auto; cursor:pointer; }
.column-move { display:flex; justify-content:center; gap:4px; }
.column-move button { width:30px; height:30px; border:1px solid var(--line); border-radius:7px; color:var(--brand); background:#fff; transition:border-color 180ms ease,background 180ms ease; }
.column-move button:not(:disabled):hover { border-color:#b995a5; background:var(--brand-soft); }
.column-selection-status { color:var(--brand); font-size:.73rem; }
.dialog-actions { display:flex; justify-content:flex-end; gap:12px; align-items:center; border-top:1px solid var(--line); padding-top:14px; margin-top:12px; margin-bottom:18px; }
.dialog-actions > div { display:flex; gap:8px; }
.pagination-actions .button { min-height:38px; color:#534d52; border-color:#ddd8db; background:#fff; }
.pagination-actions .button > span { margin-inline:4px; }
.pagination-actions .button:not(:disabled):hover { background:#f7f5f6; color:#29252a; border-color:#bab2b7; }
.button:active:not(:disabled) { box-shadow:inset 0 1px 3px #18181b18; }
.chart-placeholder > svg,.chart-placeholder > .pie-layout,.chart-placeholder > .chart-bars { animation:page-fade-in 200ms ease both; }
.sales-page[aria-busy="true"] .chart-placeholder { opacity:.5; transition:opacity 200ms; }
.table-shell[data-transition-phase] { will-change:opacity; }
.sales-page[aria-busy="true"] .status-dot { width:12px; height:12px; border:2px solid #dbc8d1; border-top-color:var(--brand); background:transparent; animation:spin 750ms linear infinite; }
@keyframes page-enter { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
@keyframes page-fade-in { from { opacity:0; } to { opacity:1; } }
@keyframes spin { to { transform:rotate(360deg); } }
@media(max-width:700px) { .table-actions { width:100%; justify-content:space-between; gap:10px; } .column-dialog > :not(.panel-heading) { margin-inline:14px; } .column-dialog > .panel-heading { padding:16px 14px; } .column-list-heading,.column-item { grid-template-columns:minmax(0,1fr) 40px 40px 66px; gap:5px; } .column-dialog .filter-help { font-size:.65rem; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; transform:none !important; } }


.run-action [data-run] { background:#3567a6; border-color:#3567a6; }
.run-action [data-run]:not(:disabled):hover { background:#2a568d; border-color:#2a568d; }
.run-action [data-clear-filters]:not(:disabled):hover { color:#fff; background:#b95362; border-color:#b95362; }
.run-action [data-clear-filters] { transition:color 200ms ease,background 200ms ease,border-color 200ms ease; }
.table-actions { align-items:center; gap:10px; }
.table-actions .view-control { width:200px; min-height:40px; height:40px; padding:8px 12px; }
[data-open-sort] { justify-content:space-between; gap:8px; }
[data-sort-label] { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
[data-open-sort] svg { width:18px; height:18px; flex:0 0 18px; color:#777d85; }
.sort-dialog { position:fixed; inset:auto; margin:0; max-width:calc(100vw - 28px); max-height:calc(100dvh - 28px); overflow:auto; border:1px solid #e1e3e6; border-radius:14px; padding:14px; background:#fff; color:var(--text); box-shadow:0 12px 40px #20252d24; }
.sort-dialog::backdrop { background:#25293012; }
.sort-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.sort-heading h2 { font-size:.82rem; }
.sort-close { width:28px; height:28px; border:0; border-radius:7px; background:#f5f6f7; color:#737981; font-size:1.1rem; }
.sort-search input { min-height:38px; font-size:.78rem; }
.sort-orders { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:10px 0; }
.sort-orders button { min-height:34px; border:1px solid #e3e6e9; border-radius:8px; color:#6b7580; background:#fff; font-size:.74rem; transition:background 150ms ease,border-color 150ms ease; }
.sort-orders button[aria-pressed="true"] { color:#405775; border-color:#c5d1df; background:#edf2f7; }
.sort-list { max-height:34dvh; overflow:auto; display:grid; gap:2px; }
.sort-list button { min-height:38px; padding:9px 10px; border:0; border-radius:8px; background:#fff; color:#545b65; font-size:.78rem; font-weight:600; text-align:left; transition:background 150ms ease,color 150ms ease; }
.sort-list button:hover { background:#f5f6f8; }
.sort-list button[aria-pressed="true"] { color:#405775; background:#edf2f7; }
.sort-list p { color:var(--muted); font-size:.76rem; padding:8px; }
@media(max-width:700px) {
  .compact-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .compact-filters > label:last-of-type,.compact-filters .run-action { grid-column:1/-1; }
  .table-actions { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .table-actions .view-control { width:100%; font-size:.72rem; padding-inline:8px; }
  .table-actions [data-clear-grouping] { grid-column:1/-1; justify-self:start; }
  .page-heading { align-items:center; }
  .results-footer { flex-wrap:nowrap; gap:8px; padding-inline:14px; }
  .results-footer > [data-pagination-status] { min-width:0; font-size:0; white-space:nowrap; }
  .results-footer > [data-pagination-status]::after { content:attr(data-page-fraction); font-size:.67rem; font-variant-numeric:tabular-nums; }
  .pagination-actions { flex:0 0 auto; gap:6px; }
  .pagination-actions .button { font-size:.67rem; padding-inline:7px; }
  .pagination-actions .button > span { margin-inline:2px; }
  .page-size-label .select-trigger { width:54px; min-height:38px; height:38px; font-size:.7rem; padding:6px 7px; }
  .app-footer { padding-inline:14px; gap:8px; }
}
@media(max-width:560px) {
  .summary-card span { padding-right:0; font-size:.68rem; }
  .trend-placeholder:has(svg) { min-height:260px; }
  .trend-placeholder svg { height:auto; max-height:none; }
}
@media(max-width:360px) {
  .compact-filters,.summary-grid { grid-template-columns:minmax(0,1fr); }
  .date-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .table-actions .view-control { font-size:.68rem; }
}

/* Thin, unobtrusive scrollbars keep rounded viewport edges clear. */
* { scrollbar-width:thin; scrollbar-color:#b5aab0 transparent; }
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-width:auto; scrollbar-color:auto; }
  ::-webkit-scrollbar { width:8px; height:8px; }
  ::-webkit-scrollbar-track,::-webkit-scrollbar-corner { background:transparent; }
  ::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:12px; background:#b5aab0; background-clip:padding-box; }
  ::-webkit-scrollbar-thumb:hover { background-color:#93828b; }
  ::-webkit-scrollbar-button { display:none; width:0; height:0; }
}
::selection { background:#ead0db; color:#41081f; }
input,select { accent-color:var(--brand); }
.table-shell { margin:0 14px; border:1px solid var(--line); border-radius:14px; overflow:hidden; isolation:isolate; }
.summary-card::after { content:""; position:absolute; top:-52px; right:-42px; width:145px; height:145px; border:24px solid #ffffff55; border-radius:50%; pointer-events:none; }
.summary-card > :not(svg) { position:relative; z-index:1; }
.analysis-title { display:flex; align-items:center; gap:10px; padding-block:3px; }
.analysis-title h2 { font-size:1.08rem; font-weight:720; letter-spacing:-.02em; }
.analysis-title > svg { width:32px; height:32px; padding:7px; border-radius:10px; color:var(--brand); background:#eee6e9; }
.dialog-close,.sort-close,.calendar-nav,.calendar-actions button { transition:background 180ms ease,color 180ms ease,border-color 180ms ease; }
.dialog-close > span,.sort-close > span { display:block; transition:transform 180ms ease; }
.dialog-close:hover { background:#ffffff24; border-color:#ffffff55; }
.sort-close:hover { background:#ede4e8; color:var(--brand); }
.dialog-close:hover > span,.sort-close:hover > span { transform:rotate(90deg); }
.text-button { transition:color 160ms ease,opacity 160ms ease; }
.text-button:hover { opacity:.7; }
.select-trigger { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; width:100%; min-height:40px; padding:9px 11px; color:var(--text); background:#fff; border:1px solid #cfd5dc; border-radius:9px; font-size:.8rem; font-weight:650; text-align:left; transition:border-color 200ms ease,box-shadow 200ms ease,background 160ms ease; }
.select-trigger > span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.select-trigger:hover:not(:disabled) { border-color:#b4a4ad; }
.select-trigger:focus-visible,.select-trigger[aria-expanded="true"] { outline:0; border-color:var(--brand); box-shadow:0 0 0 3px #60102f1c; }
.select-chevron { display:block; flex:0 0 14px; width:14px; height:14px; margin-left:auto; color:#8a7b82; transition:transform 160ms ease; }
.select-trigger[aria-expanded="true"] .select-chevron { transform:rotate(180deg); }
.page-size-label .select-trigger { width:68px; height:38px; min-height:38px; padding-block:6px; }
.control-dialog { position:fixed; inset:auto; margin:0; padding:8px; max-height:calc(100dvh - 24px); overflow:auto; border:1px solid #e2d9de; border-radius:12px; background:#fff; color:var(--text); box-shadow:0 12px 38px #2f20272b; }
.control-dialog::backdrop { background:#21151b0a; }
.control-search { min-height:36px; margin-bottom:6px; font-size:.8rem; }
.control-options { max-height:min(340px,48dvh); overflow:auto; outline:0; }
.control-option { display:block; width:100%; min-height:38px; border:0; border-radius:7px; padding:9px 10px; background:transparent; color:var(--text); font-size:.8rem; text-align:left; transition:background 130ms ease,color 130ms ease; }
.control-option:hover,.control-option.is-active { background:var(--brand-soft); color:var(--brand); }
.control-option[aria-selected="true"] { color:#fff; background:var(--brand); }
.control-empty { font-size:.75rem; color:var(--muted); padding:10px; }
.date-input-wrap { display:flex; position:relative; min-width:0; }
.date-input-wrap input { padding-right:40px; }
.date-input-wrap > button { position:absolute; right:2px; top:2px; bottom:2px; width:36px; padding:9px; border:0; border-radius:7px; background:transparent; color:#81717a; transition:color 160ms ease,background 160ms ease; }
.date-input-wrap > button:hover { color:var(--brand); background:var(--brand-soft); }
.date-input-wrap svg { display:block; width:18px; height:18px; }
.calendar-dialog { padding:12px; }
.calendar-header { display:grid; grid-template-columns:28px minmax(0,1fr) 72px 28px; align-items:center; gap:5px; margin-bottom:10px; }
.calendar-header .select-trigger { padding:6px 8px; min-height:34px; font-size:.75rem; }
.calendar-header input { min-height:34px; padding:6px; font-size:.75rem; text-align:center; }
.calendar-nav { width:28px; height:32px; border:0; border-radius:7px; color:var(--brand); background:var(--brand-soft); font-size:1.3rem; }
.calendar-nav:hover:not(:disabled) { background:#ead8e0; }
.calendar-weekdays,.calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.calendar-weekdays { margin-bottom:5px; color:#887780; font-size:.67rem; text-align:center; }
.calendar-day { min-height:34px; padding:5px 0; border:1px solid transparent; border-radius:8px; background:#fff; color:var(--text); font-size:.78rem; transition:background 130ms ease,color 130ms ease; }
.calendar-day:hover { background:var(--brand-soft); }
.calendar-day[aria-current="date"] { border-color:#cfb2c0; }
.calendar-day[aria-pressed="true"] { background:var(--brand); color:#fff; }
.calendar-actions { display:flex; justify-content:space-between; border-top:1px solid var(--line); margin-top:8px; padding-top:8px; }
.calendar-actions button { padding:6px 9px; border:0; border-radius:7px; background:#f8f5f6; color:var(--brand); font-size:.73rem; }
.calendar-actions button:hover { background:var(--brand-soft); }
@media(max-width:700px) { .page-size-label .select-trigger { width:54px; font-size:.7rem; padding-inline:7px; } }
@media(max-width:430px) { .select-trigger { font-size:1rem; } .analysis-title h2 { font-size:1.05rem; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; transform:none !important; } }

.suggestion-popup { position:fixed; inset:auto; margin:0; z-index:30; padding:6px; border:1px solid #e2d9de; border-radius:11px; background:#fff; color:var(--text); box-shadow:0 9px 28px #2f202722; }
.suggestion-popup:popover-open { animation:page-fade-in 140ms ease both; }
.suggestion-popup .control-options { max-height:min(260px,40dvh); }

.page-size-label .select-trigger { gap:4px; }
.page-size-label .select-chevron { flex-basis:10px; width:10px; height:10px; }
