html#max-dashboard body .sm-workspace{padding:18px!important}
.sm-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:20px}
html#max-dashboard body .sm-card{display:flex;align-items:center;gap:10px;min-width:0;min-height:80px;padding:14px;border:1px solid var(--ui-line);border-radius:15px;background:var(--ui-raised);color:var(--ui-ink);text-align:start;cursor:pointer;transition:background .15s,border-color .15s}
html#max-dashboard body .sm-card[aria-pressed=true]{background:var(--ui-tint);border-color:var(--ui-accent);box-shadow:inset 0 0 0 1px var(--ui-accent)}
.sm-card-icon{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:10px;background:color-mix(in srgb,var(--ui-accent) 9%,transparent)}
html#max-dashboard body .sm-card-icon img{width:21px;height:21px;filter:var(--ui-icon-filter)}
.sm-card>span:nth-child(2){font-size:13px;font-weight:600}.sm-card small{display:block;font-size:10px;font-weight:400;color:var(--ui-muted);margin-top:5px}.sm-card strong{margin-inline-start:auto;font-size:24px;font-variant-numeric:tabular-nums}
.sm-filter-form{border-bottom:1px solid var(--ui-line);padding-bottom:14px;margin-bottom:12px}.sm-filters{display:grid;grid-template-columns:minmax(200px,2fr) minmax(130px,1fr) minmax(140px,1fr) auto;gap:10px;align-items:end}
.sm-filters label,.sm-dates label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:var(--ui-muted);min-width:0}
html#max-dashboard body .sm-workspace :is(input,select){width:100%;height:40px;min-height:40px;margin:0;padding:8px 10px;border:1px solid var(--ui-line);border-radius:10px;color:var(--ui-ink);background:var(--ui-raised);font:inherit;font-size:13px;box-sizing:border-box}
.sm-more{margin-top:12px}.sm-more summary{font-size:12px;color:var(--ui-accent);cursor:pointer}.sm-more .sm-filters{grid-template-columns:repeat(4,minmax(0,1fr));padding-top:12px}.sm-dates:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(130px,220px));gap:10px;padding-top:12px}.sm-dates[hidden]{display:none!important}
.sm-filter-status{display:flex;flex-wrap:wrap;gap:7px}.sm-filter-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-tint);color:var(--ui-accent);font:inherit;font-size:11px;max-width:100%;overflow-wrap:anywhere;cursor:pointer}.sm-filter-chip img{width:13px;height:13px;filter:var(--ui-icon-filter)}
.sm-status:not(:empty){padding:12px 0;font-size:13px}.sm-pager{padding-top:15px}.sm-pager>span{font-size:12px;color:var(--ui-muted)}
html#max-dashboard body .sm-table{min-width:950px!important;width:100%!important;table-layout:auto!important}.sm-table th{white-space:nowrap}.sm-table td{font-size:12px!important;vertical-align:middle}.sm-table td:first-child{white-space:nowrap}.sm-table time{display:block;font-size:11px;color:var(--ui-muted)}.sm-table small{display:block;margin-top:5px;color:var(--ui-muted);font-size:10px}.sm-material{min-width:150px}.sm-material strong{font-weight:600}.sm-ref{font-family:ui-monospace,monospace;text-align:start}
.sm-mobile-unit{display:none}.sm-type{display:inline-block;white-space:nowrap;padding:5px 8px;border-radius:7px;background:color-mix(in srgb,var(--ui-accent) 10%,transparent);color:var(--ui-accent);font-size:11px}.sm-type[data-direction=outgoing]{background:#a24e3612;color:#92543d}.sm-type[data-direction=adjustments]{background:#8b6b3114;color:#8a6a31}.sm-in{color:var(--ui-accent);font-variant-numeric:tabular-nums}.sm-out{color:#92543d;font-variant-numeric:tabular-nums}
html#max-dashboard body .sm-row-action button{white-space:nowrap;min-height:34px;padding:6px 9px;font-size:11px;display:inline-flex;align-items:center;gap:5px}.sm-row-action img{width:16px;height:16px;filter:var(--ui-icon-filter)}
.sm-empty{padding:40px 16px;text-align:center;color:var(--ui-muted)}.sm-empty>img{width:32px;height:32px;opacity:.6;filter:var(--ui-icon-filter)}.sm-empty h2{font-size:17px;color:var(--ui-ink)}.sm-empty p{font-size:13px;line-height:1.8}
html#max-dashboard body .sm-dialog{width:min(680px,calc(100vw - 24px))!important;max-height:88dvh!important;overflow:auto!important;box-sizing:border-box}.sm-detail-heading{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid var(--ui-line)}.sm-detail-heading h3{margin:10px 0;font-size:20px}.sm-detail-heading>span:last-child{font-size:12px;color:var(--ui-muted)}.sm-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 22px;margin:0}.sm-detail-grid>div{min-width:0}.sm-detail-grid dt{font-size:11px;color:var(--ui-muted);margin-bottom:6px}.sm-detail-grid dd{margin:0;font-size:13px;color:var(--ui-ink);overflow-wrap:anywhere;line-height:1.7}.sm-reason{border-top:1px solid var(--ui-line);margin-top:20px;padding-top:10px}.sm-reason h4{font-size:12px}.sm-reason p{font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}
html#max-dashboard[data-appearance=dark] body .sm-type[data-direction=adjustments]{color:#e7c580}html#max-dashboard[data-appearance=dark] body :is(.sm-type[data-direction=outgoing],.sm-out){color:#eeb39b}
@media(max-width:1000px){.sm-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.sm-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.sm-more .sm-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){html#max-dashboard body .sm-workspace{padding:12px!important}.sm-cards{gap:8px;margin-bottom:15px}html#max-dashboard body .sm-card{min-height:70px;padding:10px;gap:7px}.sm-card-icon{width:28px;height:28px;flex-basis:28px}.sm-card>span:nth-child(2){font-size:11px}.sm-card small{font-size:9px}.sm-card strong{font-size:21px}.sm-query{grid-column:1/-1}.sm-filters{gap:9px}.sm-filters>button{grid-column:1/-1}.sm-more .sm-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.sm-dates:not([hidden]){grid-template-columns:repeat(2,minmax(0,1fr))}
html#max-dashboard body .sm-table-wrap{overflow:visible!important;border:0!important;max-height:none!important;height:auto!important}html#max-dashboard body .sm-table{display:block!important;min-width:0!important;border:0!important}html#max-dashboard body .sm-table thead{display:none!important}html#max-dashboard body .sm-table tbody{display:grid!important;gap:10px}html#max-dashboard body .sm-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px;border:1px solid var(--ui-line)!important;border-radius:13px;background:var(--ui-raised)}html#max-dashboard body .sm-table td{display:block!important;padding:0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere}html#max-dashboard body .sm-table td[data-sm-label]::before{content:attr(data-sm-label);display:block;font-size:10px;color:var(--ui-muted);margin-bottom:4px}html#max-dashboard body .sm-table .sm-material{grid-column:1/-1;grid-row:1;min-width:0}html#max-dashboard body .sm-table .sm-row-action{align-self:end;justify-self:end}.sm-detail-grid{gap:15px 14px}.sm-detail-grid dd{font-size:12px}.sm-detail-heading h3{font-size:18px}
}
@media(prefers-reduced-motion:reduce){html#max-dashboard body .sm-card{transition:none}}

@media(max-width:600px){html#max-dashboard body .sm-table td:nth-child(6),html#max-dashboard body .sm-table td:nth-child(7),html#max-dashboard body .sm-table td:nth-child(8){display:none!important}.sm-mobile-unit{display:inline;margin-inline-start:4px;font-size:10px;color:var(--ui-muted)}html#max-dashboard body .sm-table .sm-row-action{grid-column:1/-1}html#max-dashboard body .sm-table tr{gap:8px;padding:12px}}
