/* Compact operational ledger. Existing brand tokens and approved prototype layout. */
.pmm-warning,.pmm-conflict{padding:12px;background:#fcf3dc;color:#75510e;border:1px solid #e3d4b6;border-radius:5px;margin:8px 0;font-size:.8125rem;line-height:1.5;overflow-wrap:anywhere}
.pmm-warning textarea{display:block;width:100%;margin:8px 0}.pmm-warning p,.pmm-conflict p{margin:6px 0;max-width:75ch}
.pmm-root{--pmm-muted:#595b61;container-type:inline-size;font-size:.875rem;color:var(--ink);min-width:0}
.pmm-root button,.pmm-root input,.pmm-root select,.pmm-root textarea{font:inherit;color:inherit}
.pmm-root button{cursor:pointer;background:transparent;border:1px solid transparent;border-radius:5px;min-height:36px;padding:6px 10px}
.pmm-root button:hover:not(:disabled){background:var(--brand-tint);color:var(--brand)}
.pmm-root button:disabled{opacity:.45;cursor:default}
.pmm-root :is(button,input,select,textarea,a):focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.pmm-root :is(select,input[type=search],textarea){border:1px solid var(--line-strong,#ccc);border-radius:5px;background:#fff;padding:8px 10px;min-height:40px;max-width:100%}
.pmm-root :is(input,textarea)::placeholder{color:var(--pmm-muted);opacity:1}
.pmm-root input[type=checkbox]{width:16px;height:16px;accent-color:var(--brand);cursor:pointer;flex-shrink:0}
.pmm-preview,.pmm-source,.pmm-result-line,.pmm-editor-actions,.pmm-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.pmm-preview{background:#e9eff8;border-radius:5px;padding:10px 12px;color:#294d83;font-size:.8125rem}
.pmm-preview button{color:#294d83;white-space:nowrap}
.pmm-source{font-size:.75rem;color:var(--pmm-muted);margin:12px 0}
.pmm-source a{color:var(--brand);text-decoration:none;min-height:32px;display:inline-flex;align-items:center}
.pmm-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:16px}
.pmm-tabs button{border-radius:0;padding:8px 0;border-bottom:2px solid transparent;color:var(--pmm-muted);min-height:44px}
.pmm-tabs button[aria-pressed=true]{border-bottom-color:var(--brand);color:var(--brand);font-weight:600}
.pmm-tabs button span{font-size:.75rem;font-weight:400;margin-left:6px}
.pmm-toolbar{display:grid;grid-template-columns:minmax(200px,1.5fr) minmax(130px,.7fr) minmax(180px,1fr) 138px auto;gap:10px;align-items:end}
.pmm-filter{display:flex;flex-direction:column;gap:4px;min-width:0}
.pmm-filter>span{font-size:.75rem;color:var(--pmm-muted)}
.pmm-filter select{width:100%;text-overflow:ellipsis}
.pmm-search{min-width:0}.pmm-search input{width:100%}
.pmm-toolbar>button{min-height:40px;border-color:var(--line)}
.pmm-more{display:flex;align-items:end;gap:16px;padding:12px 0 0}
.pmm-more .pmm-filter{width:200px}.pmm-noted{display:flex;align-items:center;gap:8px;min-height:40px}
.pmm-result-line{justify-content:flex-start;min-height:48px;color:var(--pmm-muted);font-size:.8125rem}
.pmm-result-line>button{color:var(--brand)}.pmm-feedback{margin-left:auto;display:inline-flex;align-items:center;gap:8px}
.pmm-feedback button{color:var(--brand)}
.pmm-bulk{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 12px;background:var(--brand-tint);margin-bottom:8px;border-radius:5px;font-size:.8125rem}
.pmm-bulk>span{color:var(--pmm-muted)}.pmm-bulk button{color:var(--brand)}
.pmm-ledger{border:1px solid var(--line);border-radius:7px;background:#fff;overflow:clip}
.pmm-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.8125rem;font-variant-numeric:tabular-nums}
.pmm-table th{font-weight:400;text-align:left;color:var(--pmm-muted);background:#fafafa;font-size:.75rem}
.pmm-table td,.pmm-table th{padding:4px 10px;border-bottom:1px solid #ececea;vertical-align:middle}
.pmm-table thead th{height:40px}.pmm-col-check{width:40px}.pmm-col-date{width:58px}.pmm-col-ref{width:100px}.pmm-col-money{width:164px}.pmm-col-state{width:116px}.pmm-col-note{width:27%}
.pmm-table .pmm-group th{background:#f5f6f8;color:#313b49;font-weight:600;padding:10px 12px}
.pmm-group span{font-weight:400;color:var(--pmm-muted);margin-left:12px}
.pmm-row:hover td{background:#fafbfd}.pmm-row.is-checked td,.pmm-row.is-editing td{background:#f0f4fa}
.pmm-check label,.pmm-select-page{display:flex;align-items:center;justify-content:center;min-height:36px;cursor:pointer}
.pmm-select-page span{display:none}.pmm-date{color:var(--pmm-muted);white-space:nowrap}
.pmm-movement button,.pmm-note button{display:block;text-align:left;width:100%;padding:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:0}
.pmm-movement button{font-weight:500}.pmm-note button{color:var(--brand)}.pmm-note button.has-note{color:var(--pmm-muted)}
.pmm-note-actions{display:flex;align-items:center;gap:12px;min-width:0}
.pmm-note-actions>button:first-child{flex:1;min-width:0}
.pmm-root .pmm-note button.pmm-row-action{flex:none;width:auto;min-width:68px;padding:5px 9px;border:1px solid #c7cbd1;border-radius:5px;text-align:center;font-size:.75rem;font-weight:500;white-space:nowrap;background:#fff}
.pmm-root .pmm-note button.pmm-row-remove{color:#923226;border-color:#d6b9b2}
.pmm-root .pmm-note button.pmm-row-action:hover:not(:disabled){background:var(--brand-tint)}
.pmm-root .pmm-note button.pmm-row-remove:hover:not(:disabled){background:#fff1ed}
.pmm-reference{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pmm-muted);font-size:.75rem}
.pmm-table .pmm-money{text-align:right;white-space:nowrap}.pmm-money span{font-size:.6875rem;color:var(--pmm-muted)}
.pmm-state button{min-height:32px;padding:4px 8px;font-size:.75rem;white-space:nowrap}
.pmm-state .pmm-state-review{color:#75510e;background:#fcf3dc}.pmm-state .pmm-state-resolved{color:#176a4d;background:#e6f1ec}
.pmm-expansion>td{padding:0}.pmm-editor,.pmm-detail{padding:16px 20px;background:#f5f8fc}
.pmm-editor-heading{display:flex;justify-content:space-between;gap:16px;align-items:start;margin-bottom:12px;font-size:.8125rem}
.pmm-editor-heading strong{overflow-wrap:anywhere;max-width:75ch}.pmm-editor-heading>span{white-space:nowrap;color:var(--pmm-muted)}
.pmm-editor-fields{display:flex;gap:16px;align-items:start}.pmm-editor-fields label{display:flex;flex-direction:column;gap:6px;font-size:.8125rem}
.pmm-note-field{flex:1;min-width:0}.pmm-note-field textarea{resize:vertical;min-height:88px;width:100%;line-height:1.5}
.pmm-editor-actions{justify-content:flex-start;margin-top:8px;font-size:.8125rem}.pmm-editor-actions>small{margin-left:auto;color:var(--pmm-muted)}
.pmm-editor-actions>span{color:var(--pmm-muted)}.pmm-root button.pmm-primary{color:white;background:var(--brand)}.pmm-root button.pmm-primary:hover:not(:disabled){background:#204c96;color:white}
.pmm-draft-tag{color:#75510e;font-size:.75rem}.pmm-detail>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.pmm-detail p{overflow-wrap:anywhere;max-width:75ch;line-height:1.5;margin:8px 0 16px}
.pmm-detail dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0}.pmm-detail dt{color:var(--pmm-muted);font-size:.75rem;margin-bottom:4px}.pmm-detail dd{margin:0;overflow-wrap:anywhere}
.pmm-remove-confirm{margin-top:16px;padding-top:12px;border-top:1px solid var(--line,#dce2e9)}
.pmm-root button.pmm-danger{color:#923226;border:1px solid #c89a91;background:#fff}
.pmm-root button.pmm-danger:hover:not(:disabled){background:#fff1ed}
.pmm-pagination{padding:8px 12px;font-size:.8125rem;color:var(--pmm-muted)}.pmm-pagination>div{display:flex;align-items:center;gap:12px}
.pmm-pagination button{border-color:var(--line)}.pmm-empty{padding:32px 16px;text-align:center;display:grid;gap:12px;justify-items:center}.pmm-empty h2{font-size:1rem;margin:0}.pmm-empty p{color:var(--pmm-muted);margin:0;max-width:65ch;line-height:1.5}
.pmm-empty button{border-color:var(--line);color:var(--brand)}.pmm-skeleton{height:32px;width:90%;background:#eceff2;border-radius:4px}
.pmm-footnote{font-size:.75rem;color:var(--pmm-muted);line-height:1.5;max-width:75ch;margin:12px 0 0}
.pmm-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.pmm-footer button{font-size:.75rem;color:var(--brand)}
.dashboard:has(.pmm-root) .topbar{margin-bottom:16px}
.dashboard:has(.pmm-root) .topbar .lede{display:none}
@container(max-width:1050px){
 .pmm-toolbar{grid-template-columns:minmax(180px,1fr) minmax(130px,1fr) 138px auto}.pmm-search{grid-column:1/-1}
 .pmm-col-ref{width:0}.pmm-reference,.pmm-table thead th:nth-child(4){display:none}.pmm-col-money{width:158px}.pmm-col-note{width:26%}
}
@container(max-width:760px){
 .pmm-toolbar{grid-template-columns:1fr 1fr}.pmm-toolbar>button{align-self:end}.pmm-more{flex-wrap:wrap;gap:12px}.pmm-more .pmm-filter{flex:1;min-width:130px}.pmm-noted{flex-basis:100%}
 .pmm-table,.pmm-table tbody{display:block}.pmm-table colgroup{display:none}.pmm-table thead{display:block}.pmm-table thead tr{display:block}.pmm-table thead th{display:none}.pmm-table thead th:first-child{display:block;height:auto;padding:0 10px}
 .pmm-select-page{justify-content:flex-start;gap:10px;min-height:36px}.pmm-select-page span{display:inline}
 .pmm-group{display:block}.pmm-table .pmm-group th{display:block;padding:8px 12px}.pmm-group span{margin:4px 0 0;display:block}
 .pmm-row{display:grid;grid-template-columns:32px 48px minmax(0,1fr) auto;grid-template-areas:'check date movement money' 'check state note note';align-items:center;border-bottom:1px solid #ececea;padding:8px}
 .pmm-table .pmm-row td{border:0;padding:0 4px;min-width:0}.pmm-check{grid-area:check}.pmm-date{grid-area:date}.pmm-movement{grid-area:movement}.pmm-money{grid-area:money}.pmm-state{grid-area:state;grid-column:2/4;justify-self:start}.pmm-note{grid-area:note;grid-column:4;max-width:240px;justify-self:end;width:100%}
 .pmm-row .pmm-reference{display:none}.pmm-movement button{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
 .pmm-row .pmm-money span{display:block}.pmm-state button{min-height:40px}.pmm-note button{min-height:40px}
 .pmm-expansion,.pmm-expansion>td{display:block}.pmm-editor,.pmm-detail{padding:16px}
 .pmm-editor-heading{display:block}.pmm-editor-heading>span{display:block;margin-top:6px;white-space:normal}
 .pmm-editor-fields{flex-direction:column;gap:12px}.pmm-editor-fields label{width:100%}.pmm-detail dl{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container(max-width:480px){
 .pmm-preview{padding:8px 10px;gap:4px;font-size:.75rem}.pmm-preview button{min-height:32px;padding:0;color:#294d83}
 .pmm-source{gap:0;margin:8px 0}.pmm-source>span{font-size:.6875rem}.pmm-tabs{gap:16px;margin-bottom:12px}.pmm-tabs button{font-size:.8125rem}
 .pmm-toolbar{gap:8px}.pmm-filter>span{font-size:.6875rem}.pmm-toolbar input[type=search]{font-size:1rem}
 .pmm-toolbar .pmm-filter:nth-child(3){grid-column:2}.pmm-more select{font-size:1rem}
 .pmm-result-line{min-height:40px;gap:4px}.pmm-feedback:not(:empty){flex-basis:100%;margin:0}
 .pmm-row{grid-template-columns:28px minmax(0,1fr) auto;grid-template-areas:'check movement money' 'check date state' 'check note note';padding:6px 8px}
 .pmm-state{grid-column:auto;justify-self:end}.pmm-note{grid-column:2/-1;max-width:none;justify-self:stretch}.pmm-date{font-size:.75rem}
 .pmm-row .pmm-money{font-size:.8125rem}.pmm-note button{min-height:32px}.pmm-state button{min-height:32px}.pmm-movement button{min-height:44px}
 .pmm-editor-actions>span{flex-basis:100%}.pmm-editor textarea,.pmm-editor select{font-size:1rem}.pmm-pagination>div{gap:6px}.pmm-pagination button{padding:6px}
}
@media(max-width:900px){
 .dashboard:has(.pmm-root) .sidebar-navigation,.dashboard:has(.pmm-root) .sidebar-foot{display:none}
 .dashboard.mobile-nav-open:has(.pmm-root) .sidebar-navigation,.dashboard.mobile-nav-open:has(.pmm-root) .sidebar-foot{display:grid}
 .dashboard:has(.pmm-root) .sidebar{gap:0;padding:8px 18px}.dashboard:has(.pmm-root) .sidebar-brand{padding-bottom:0;border:0}.dashboard:has(.pmm-root) .brand-logo{max-width:112px}
 .dashboard:has(.pmm-root) .topbar .lede{display:none}
 .pmm-root button,.pmm-root select,.pmm-root input[type=search]{min-height:44px}.pmm-check label{min-height:44px}
}
@media(pointer:coarse){.pmm-root button,.pmm-root select,.pmm-check label{min-height:44px}}
