/* Shared defaults for every record grid. Filtering is presentation-only. */
.app-grid{min-width:0;max-width:100%;border:1px solid var(--mud-palette-table-lines);border-radius:var(--mud-default-borderradius);background:var(--mud-palette-surface);overflow:hidden}
.app-grid .mud-table-container{max-height:min(65vh,640px);overflow:auto;overscroll-behavior:contain}
.app-grid .mud-table{background:var(--mud-palette-surface);max-width:100%}
.app-grid .mud-table-root{width:100%;table-layout:auto}
.app-grid .mud-table-row>.mud-table-cell{text-align:left;vertical-align:middle;padding:6px 10px;font-size:.875rem;height:52px;box-sizing:border-box;white-space:nowrap;border-color:var(--mud-palette-table-lines)}
.app-grid .mud-table-body .mud-table-cell:first-child{white-space:normal;min-width:160px;max-width:300px}
.app-grid .mud-table-head .mud-table-cell{height:48px;background:var(--mud-palette-background);font-weight:600;position:sticky;top:0;z-index:2}
.app-grid .mud-table-cell .column-header{justify-content:flex-start;gap:4px}
.app-grid .mud-table-cell .column-header button{min-width:32px;min-height:32px}
.app-grid .mud-table-cell .mud-icon-button.filtered{color:var(--mud-palette-primary);background:var(--mud-palette-primary-hover)}
.app-grid .mud-table-cell strong,.app-grid .mud-table-cell .small{display:block}
.app-grid .mud-table-cell .small{font-size:.75rem;line-height:1.35}
.app-grid .mud-table-cell .grizzlys-field{min-width:120px;max-width:240px}
.app-grid .grizzlys-field .mud-input-control{margin:0}
.app-grid .grizzlys-field .mud-input-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.app-grid .grizzlys-field .mud-input-outlined input{padding:8px 10px;min-height:38px;box-sizing:border-box;font-size:.875rem}
.app-grid .grizzlys-field .mud-input-outlined fieldset legend{max-width:0}
.app-grid .mud-toolbar{min-height:40px;height:auto;padding:4px 10px;gap:8px;flex-wrap:wrap}
.grid-count{margin-right:auto}.grid-empty{padding:16px}
.grid-business-footer{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:10px 12px;background:var(--mud-palette-background);border-top:1px solid var(--mud-palette-table-lines);font-size:.8125rem}
.app-grid .cash-emphasis{font-weight:700;background:var(--mud-palette-background-grey)}
.app-grid .mud-table-sticky-left{background:var(--mud-palette-surface);z-index:1}
.app-grid thead .mud-table-sticky-left{z-index:4;background:var(--mud-palette-background)}
.app-grid .mud-table-pagination{min-height:44px}
.app-grid .module-actions,.app-grid .category-actions{display:flex;gap:6px;flex-wrap:nowrap;margin:0}
.app-grid .grizzlys-button{min-height:38px;padding:6px 10px}
.library-filters,.project-filters,.pricing-filters{align-items:start}
.grizzlys-chart{min-width:0;width:100%;height:360px;overflow:hidden}
.grizzlys-chart .mud-chart{width:100%;height:100%;font-family:Cairo,sans-serif}
.grizzlys-chart svg text{font-family:Cairo,sans-serif;font-size:12px}
.chart-point-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.chart-point-actions .mud-button-root{text-transform:none}
.chart-grid-scroll{max-width:100%;overflow-x:auto}
@media(max-width:699px){.app-grid .mud-table-row>.mud-table-cell{height:56px;padding:6px 8px}.app-grid .mud-table-cell .mud-icon-button,.app-grid .grizzlys-button{min-width:40px;min-height:40px}.app-grid .mud-toolbar>.grid-count{width:100%}.grizzlys-chart{height:360px}.chart-grid-scroll>.grizzlys-chart{min-width:600px}}
.grid-column-filter{padding:12px;display:flex;flex-direction:column;gap:12px;min-width:240px;max-width:calc(100vw - 32px)} .app-grid .mud-table-cell:first-child:has(>input[type=checkbox]){min-width:44px;width:44px;max-width:44px} .monthly-cash-grid .mud-table-cell:first-child{min-width:120px}
.library-filters .grizzlys-field .mud-input-outlined input,.project-filters .grizzlys-field .mud-input-outlined input,.pricing-filters .grizzlys-field .mud-input-outlined input{height:44px;min-height:44px;box-sizing:border-box;padding:10px 14px} .library-filters .grizzlys-field .mud-input-control-helper-container,.project-filters .grizzlys-field .mud-input-control-helper-container{margin:0}
.tone-0{--option-color:#8a2a2b}.tone-3{--option-color:#3d6480}.tone-4{--option-color:#795d84}.tone-5{--option-color:#317c7b}.tone-6{--option-color:#a47832}.tone-7{--option-color:#aa545b}.tone-8{--option-color:#5e6b67}
.item-profit-chart{min-width:900px}

/* Reserve native chart legends inside the chart flex layout. */
.grizzlys-chart .mud-chart-bar,.grizzlys-chart svg.mud-chart-scatter{flex:1 1 0;min-height:0}

.app-grid th,.app-grid td,.app-grid select,.app-grid input{text-align:left}

.many-item-profit-chart{min-width:1800px}.long-item-profit-chart{min-width:3600px}
.chart-grid-scroll:focus-visible,.app-grid table:focus-visible{outline:2px solid var(--mud-palette-primary);outline-offset:-2px}

/* MudBlazor 9.12 scatter paths paint above native hover circles. Lines are
   decorative; keep native point tooltips reachable through their stroke. */
.grizzlys-chart .mud-chart-scatter .mud-chart-line{pointer-events:none}

/* Closed native column popups retain their last absolute desktop position.
   Remove their invisible boxes from layout before a narrow-screen resize. */
.column-filter-popup:not(.mud-popover-open){display:none}
