.entries-heading,.entries-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.entries-section-heading h2{margin:0}
.entries-heading{align-items:flex-end;gap:16px 24px;margin-bottom:20px}
.entries-heading>.entries-period{display:grid;grid-template-columns:repeat(3,minmax(0,150px));flex:1 1 440px;gap:12px;margin:0;min-width:0}
.entries-heading>.entries-period :is(.input,.select){min-width:0;width:100%;max-width:100%}
.entries-heading>.actions{flex:0 0 auto;flex-wrap:nowrap;margin-left:auto}
.entries-filters{display:flex;gap:12px;align-items:center;margin-bottom:20px;flex-wrap:wrap}
.entries-filters .search{flex:1;min-width:180px}
.entries-filters .select{width:auto;min-width:190px}
/* Keep this desktop toolbar together; narrow windows scroll it instead of the page. */
@media(min-width:901px){
 body .entries-page>.entries-toolbar{flex-wrap:nowrap;gap:8px;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:2px 2px 6px}
 body .entries-page .entries-toolbar>.entries-period{display:grid;grid-template-columns:136px 128px 128px;flex:0 0 auto;gap:8px;min-width:0;margin:0}
 body .entries-page .entries-toolbar>.list-page-filters{flex:0 0 160px;flex-wrap:nowrap;min-width:0;width:160px}
 body .entries-page .entries-toolbar>.list-page-controls{flex:1 0 auto;gap:8px;min-width:0;max-width:none;margin-left:0}
 body .entries-page .entries-toolbar .list-page-controls>.list-page-search{flex:1 0 140px;width:140px;min-width:140px;max-width:none}
 body .entries-page .entries-toolbar .list-page-actions{flex-wrap:nowrap;max-width:none}
 body .entries-page .entries-toolbar :is(.input,.select){width:100%;min-width:0;height:44px;font-size:14px;padding-inline:10px}
 body .entries-page .entries-toolbar select.select{padding-right:30px;background-position:right 10px center}
 body .entries-page .entries-toolbar .list-page-actions>.btn{font-size:14px;padding-inline:10px}
}
@media(min-width:901px) and (max-width:1250px){
 body .entries-page .entries-toolbar>.entries-period{grid-template-columns:110px 120px 120px;gap:6px}
 body .entries-page .entries-toolbar>.list-page-filters{flex-basis:146px;width:auto}
 body .entries-page .entries-toolbar .list-page-controls>.list-page-search{flex-basis:102px;min-width:102px;width:102px}
 body .entries-page .entries-toolbar :is(.input,.select){padding-left:7px}
}
.customer-location{display:block;color:var(--muted);font-size:12px;margin-top:5px}
.entries-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}
.entries-summary .mini{min-width:0}.entries-summary b{font-size:22px;overflow-wrap:anywhere}
.entries-bars{display:grid;gap:18px;margin:24px 0}
.entries-bar-row>div:first-child{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:7px;flex-wrap:wrap}
.entries-bar-row b{font-weight:600}.entries-bar-row small{color:var(--muted);font-weight:400}
.entries-bar-track{height:12px;background:color-mix(in srgb,var(--accent-purple) 16%,transparent);border-radius:6px;overflow:hidden}
.entries-bar-track>span{display:block;height:100%;border-radius:6px;background:var(--accent-purple)}
.entries-bar-track>.entry-bar-alt{background:var(--accent-green)}
.entries-analysis{margin-top:20px}
.receipt-methods-report{margin:20px 0}.receipt-methods-total{margin-top:16px}.receipt-methods-total b{font-size:24px}.receipt-methods-report .entries-bar-track{background:color-mix(in srgb,var(--accent-green) 16%,transparent)}.receipt-methods-report .entries-bar-track>span{background:var(--accent-green)}
@media(max-width:600px){.entries-heading>.actions{width:100%;display:flex;flex-wrap:nowrap}.entries-heading>.actions>.btn{flex:1;padding-inline:10px}.entries-summary{grid-template-columns:1fr}.entries-summary .mini{display:flex;align-items:center;justify-content:space-between;gap:12px}.entries-filters .select{width:100%}}

/* Dashboard pair: compact content with matching header actions and shared row height. */
.entries-dashboard-card .entries-section-heading h2{font-size:18px}.entries-dashboard-card .entries-summary{margin:12px 0}.entries-dashboard-card .entries-bars{gap:12px;margin:14px 0}.entries-dashboard-card .finance-note{font-size:13px;line-height:1.5;margin:12px 0 0}


/* A dated entry list on phones; the existing desktop table remains unchanged. */
@media(max-width:900px){
 .entries-page{width:100%;max-width:100%;min-width:0;margin-inline:auto}
 body .entries-page>.entries-list-surface{padding:0;border:0;background:transparent;box-shadow:none}
 .entries-mobile-list,.entries-mobile-list>.transactions-day{background:transparent}
 .entries-mobile-row,.entries-mobile-row:hover,.entries-mobile-row:active{background:transparent;-webkit-tap-highlight-color:transparent}
 .entries-mobile-list{width:100%}
 .entries-mobile-withdrawal{border-bottom:1px solid var(--transaction-line);padding-bottom:14px}
 .entries-mobile-withdrawal .transaction-row{border-bottom:0;padding-bottom:8px}
 .entries-mobile-withdrawal .transaction-direction{color:var(--soft-purple-ink);background:var(--soft-purple)}
 .entries-mobile-withdrawal .transaction-direction svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
 .entries-mobile-withdrawal .stock-row-actions{justify-content:end}
 .entries-mobile-row .transaction-copy>span+span{margin-top:3px}
 .entries-mobile-count{font-size:12px}
}
.entries-detail-page{max-width:880px}
.entries-detail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.entries-detail-top>div{min-width:0}.entries-detail-top h2{margin:0 0 8px;overflow-wrap:anywhere}
.entries-detail-subtitle{margin:0 0 10px;font-size:16px;line-height:1.45;overflow-wrap:anywhere}
.entries-detail-subtitle span{color:var(--muted,#b9b1c5)}
.entries-detail-subtitle strong{font-weight:700}
.entries-detail-options{position:relative;flex:none;margin-top:0}
.entries-detail-options>summary{display:grid;place-items:center;list-style:none;width:44px;height:44px;padding:10px;border:1px solid var(--soft-purple-border);border-radius:9px;background:var(--soft-purple);color:var(--soft-purple-ink);cursor:pointer}
.entries-detail-options>summary::-webkit-details-marker{display:none}
.entries-detail-options>summary:focus-visible{outline:2px solid var(--soft-purple-ink);outline-offset:3px}
.entries-detail-options svg,.entries-detail-actions>.btn>svg{width:21px;height:21px;flex:none}
.entries-detail-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:5;display:grid;gap:8px;width:180px;padding:10px;border:1px solid #514958;border-radius:12px;background:#35303f;box-shadow:0 8px 20px #0004}
body.light-theme .entries-detail-menu{background:#fff;border-color:#dedbe3}
.entries-detail-menu>.btn{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;text-align:left}
.entries-detail-money{margin:18px 0}.entries-detail-money .mini{min-width:0}.entries-detail-money b{overflow-wrap:anywhere}
.entries-detail-products h3{margin:20px 0 6px;font-size:16px}
.entries-detail-items{list-style:none;padding:0;margin:0}
.entries-detail-items>li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--soft-purple-border)}
.entries-detail-items>li>div{min-width:0}.entries-detail-items strong,.entries-detail-items span{display:block;overflow-wrap:anywhere}
.entries-detail-items span{font-size:13px;color:var(--muted);margin-top:4px}
.entries-detail-items b{white-space:nowrap;flex:none;font-size:14px}
.entries-detail-discount{display:flex;justify-content:space-between;gap:12px}
.entries-detail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:24px}
body .entries-page #salesTable .stock-row-actions{
 display:grid;grid-template-columns:repeat(3,44px) 39px
}
#salesTable .stock-row-actions [data-action-tone=blue]{grid-column:1}
#salesTable .stock-row-actions [data-action-tone=green]{grid-column:2}
#salesTable .stock-row-actions [data-action-tone=edit]{grid-column:3}
#salesTable .stock-row-actions .stock-delete{grid-column:4}
#content .entries-detail-actions>.btn{display:flex;align-items:center;justify-content:center;gap:10px;flex:none;width:100%;min-width:0;max-width:100%;height:auto;min-height:48px;padding:12px 16px;white-space:normal}
#content .entries-detail-actions .table-action-label{position:static;width:auto;min-width:0;max-width:100%;height:auto;margin:0;padding:0;overflow:visible;clip-path:none;white-space:normal;overflow-wrap:normal}
@media(max-width:360px){.entries-detail-top{gap:8px}.entries-detail-top h2{font-size:21px}.entries-detail-money{gap:6px}.entries-detail-money .mini{padding:9px 7px}}

#entriesHeaderActions,#transactionsHeaderActions{display:none}
@media(max-width:900px){
 body:has(#content>.entries-page) .topbar-title-group,body:has(#content>.transactions-page) .topbar-title-group{left:76px;right:120px;width:auto;max-width:none;transform:none;justify-content:flex-start;text-align:left}
 body:has(#content>.entries-page) #entriesHeaderActions,body:has(#content>.transactions-page) #transactionsHeaderActions{display:flex}
 .topbar>.list-header-actions{align-items:center;justify-content:flex-end;gap:6px;position:absolute;left:auto;right:max(12px,env(safe-area-inset-right,0px));top:50%;transform:translateY(-50%);width:auto;max-width:none;text-align:right;pointer-events:auto;z-index:11}
 body.mobile-dock-panel-open .list-header-actions{visibility:hidden}
 .list-header-actions>button{position:relative;display:grid;place-items:center;width:44px;height:44px;padding:10px;border:0;border-radius:9px;background:transparent;color:inherit;-webkit-tap-highlight-color:transparent}
 .list-header-actions svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .list-header-actions>button:focus-visible{outline:2px solid var(--soft-purple-ink);outline-offset:1px}
 .list-header-actions>button[aria-pressed="true"]::after{content:"";position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:var(--soft-purple-ink)}
 .entries-mobile-create{display:flex;gap:8px;margin-bottom:14px}
 .entries-mobile-create>.btn{flex:1;min-width:0;font-size:14px;padding:10px;white-space:normal}
 .entries-mobile-filter-summary{margin:0 0 16px;font-size:12px;line-height:1.5}
 .entries-mobile-search:not([hidden]){display:flex;align-items:center;gap:8px;margin-bottom:12px}
 .entries-mobile-search>.input{flex:1;min-width:0}
 .entries-mobile-search>button{width:44px;height:44px;flex:none;padding:10px}
 .entries-mobile-search svg{width:21px;height:21px}
}
.entries-filter-period,.transactions-filter-period{margin:18px 0}
.entries-filter-footer,.transactions-filter-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}
.entries-filter-footer>.btn,.transactions-filter-footer>.btn{display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;min-height:46px;white-space:normal}
.entries-filter-footer svg,.transactions-filter-footer svg{width:20px;height:20px;flex:none}
