html.appearance-active body,.appearance-preview.appearance-active{background-color:var(--appearance-page);background-image:linear-gradient(var(--appearance-wash),var(--appearance-wash)),var(--appearance-image);background-size:cover;background-position:center;background-attachment:fixed}
.appearance-active .top{background:var(--appearance-header);color:var(--appearance-header-ink)}
.appearance-active .top small,.appearance-active .top .mode{color:inherit}
.appearance-active .top .mode{border-color:currentColor}
.appearance-active .shell{background:rgba(255,255,255,.25);color:#10243a;border-radius:24px;margin:24px auto;padding:28px 24px 60px;box-shadow:0 12px 50px #10243a14}
.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id]{background:var(--card-color);border-color:var(--card-color);color:var(--card-ink);border-radius:var(--appearance-radius);min-height:var(--appearance-height);text-align:right}
.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id] .icon{color:inherit;background:transparent;background:color-mix(in srgb,currentColor 9%,transparent);border:1px solid currentColor}
.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id] .sub{color:inherit;opacity:1}
.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id] b{color:inherit;font-size:var(--appearance-label-size)}
.appearance-nav{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.top .work-admin-link{background:#e7ae50;color:#102b42;border-color:#e7ae50;font-weight:800;white-space:nowrap}
.appearance-active .top .work-admin-link{background:#e7ae50;color:#102b42;border-color:#e7ae50}
@media(max-width:760px){.top:has(.appearance-nav){flex-wrap:wrap;gap:14px}.appearance-nav{width:100%}.appearance-nav .mode{padding:9px 12px}.appearance-nav .work-admin-link{flex-grow:1;text-align:center}}
.appearance-active .form-card{background:#fff}
@media(max-width:760px){.appearance-active .shell{margin:14px 10px;padding:22px 14px 60px}.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id]{min-height:var(--appearance-mobile-height);padding:13px}.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id] b{font-size:1.05rem}.appearance-nav .mode{font-size:.75rem}}

.appearance-active .hello{background:rgba(255,255,255,.94);padding:18px;border-radius:16px}.appearance-active .section-label{background:rgba(255,255,255,.95);padding:10px 14px;border-radius:10px}.appearance-active .balance-controls,.appearance-active #home>.draft-history{background:rgba(255,255,255,.95);padding:12px 16px;border-radius:14px}.appearance-active .cash-strip>div{background:rgba(255,255,255,.97)}.appearance-active .back{background:#fff;padding:10px 16px;border-radius:10px;margin-bottom:12px}

/* Work page heading: date above the banner, compact wisdom below navigation. */
.work-date{padding:5px max(20px,calc((100vw - 1080px)/2));background:#edf2f6;color:#10243a;text-align:right}
.work-date .date{font-size:.85rem;font-weight:650;line-height:1.6}
header.work-banner{flex-wrap:wrap;row-gap:8px;padding-top:12px;padding-bottom:12px}
.work-banner .banner-wisdom{order:3;flex:0 0 100%;min-width:0;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;background:transparent;color:#fff;border-radius:0;padding:0}
.work-banner .banner-wisdom .wisdom-label{color:#fff;font-size:.75rem;font-weight:700;margin:0;white-space:nowrap;text-decoration:underline;text-underline-offset:4px}
.work-banner .banner-wisdom #daily-wisdom{color:#fff;font-size:.85rem;font-weight:400;line-height:1.8;max-width:none;margin:0;overflow-wrap:anywhere}
#offline-help{margin-top:28px;font-size:.85rem;line-height:1.8}

#home #balance-refresh{display:grid;place-items:center;font-size:0;padding:5px;border:1px solid #c9d5df;border-radius:6px;background:#fff;color:#637789;min-height:28px;height:28px;width:28px;min-width:28px;align-self:center}
#balance-refresh svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#balance-refresh:disabled{opacity:.45;cursor:wait}
#home .cash-strip{grid-template-columns:repeat(2,minmax(0,1fr)) 28px;align-items:center;gap:10px;margin-bottom:0}
#home .cash-strip>div{padding:11px 14px}
#home .balance-controls{background:transparent;padding:0;margin:6px 0;border-radius:0}
#home .balance-controls:has(#balance-status:empty){display:none}
#home>.section-label{margin-top:12px;margin-bottom:12px}
html .shell{padding-top:16px}
html.appearance-active .shell{margin-top:12px;padding-top:14px}
@media(max-width:600px){#home .cash-strip{gap:6px}#home .cash-strip>div{padding:10px 8px;flex-wrap:wrap}#home .cash-strip b{font-size:.82rem}.work-banner .banner-wisdom #daily-wisdom{font-size:.78rem}}

#home .cash-strip>div:has([data-balance="USD"]) b,.appearance-preview .cash-strip>div:has([data-balance="USD"]) b{color:#218344}

#home .cash-strip>div:has([data-balance="LBP"]) b,.appearance-preview .cash-strip>div:has([data-balance="LBP"]) b{color:#ed1c24}

#home [data-balance],.appearance-preview [data-balance]{color:#262626!important;font-weight:800!important}
.stock-positive,.stock-negative,.stock-zero{color:#252525;font-weight:800;font-size:1.3rem}.stock-unknown{color:#64748b}
.appearance-active :is(#main-grid,#secondary-grid) .tile[data-id] b{font-size:var(--appearance-label-size)!important}.tile .icon{font-size:28px}
#closing-list .closing-history-different{color:#b91c1c;border:2px solid #dc2626;background:#fff1f2}#closing-list .closing-history-matched{color:#166534;border:2px solid #16a34a;background:#ecfdf5}

.tile[hidden]{display:none!important}

.tile .icon{font-family:"Apple Color Emoji","Segoe UI Emoji",sans-serif;font-size:32px}

/* Manager debt card participates in the same saved tile ordering and editor. */
:is(#main-grid,#secondary-grid) .tile.dealer-debt-card{display:block;min-height:90px!important;padding:14px!important;background:var(--card-color,#fff1f2);color:var(--card-ink,#991b1b);border:1px solid #fecaca;align-self:start;cursor:default;overflow-wrap:anywhere}
.tile.dealer-debt-card header{display:flex;align-items:center;gap:8px;margin-bottom:8px}.tile.dealer-debt-card header b{flex:1;font-size:var(--appearance-label-size,16px)}
.tile.dealer-debt-card .icon{font-size:22px;width:auto;height:auto}.debt-refresh{border:1px solid #fecaca;background:#fff;border-radius:6px;padding:2px 7px;color:#991b1b;font-size:18px;cursor:pointer}
.debt-person{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px solid #fecaca}.debt-person span{font-weight:650}.debt-amount{color:#b91c1c!important;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}.debt-time,.debt-scope{display:block;font-size:11px;color:#64748b;line-height:1.6;margin-top:6px}
.tile.dealer-debt-card[data-size=small]{max-width:320px;width:100%;box-sizing:border-box}.tile.dealer-debt-card[data-size=medium]{min-height:156px!important;width:100%}.tile.dealer-debt-card[data-size=wide]{grid-column:1/-1;width:100%}
.dealer-report{margin-top:20px;color:#152b41;line-height:1.7}.dealer-report-header{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:3px solid #152b41;padding:12px 0}.dealer-report h3{margin:0}.dealer-report .dealer-balances{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;margin:16px 0}.dealer-currency{border:1px solid #d9e2ea;border-radius:12px;overflow:hidden;background:#fff}.dealer-currency h4{margin:0;padding:8px 14px;background:#152b41;color:white}.dealer-currency dl{padding:12px;margin:0}.dealer-currency dl div{display:flex;justify-content:space-between;gap:16px;padding:5px 0}.dealer-currency dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums}.dealer-currency .closing{border-top:1px solid #d9e2ea;font-size:1.15em}.dealer-report .owed{color:#b91c1c}.dealer-report .held{color:#15803d}.dealer-report .muted-note{color:#64748b;font-size:12px}.dealer-report .table-scroll{overflow:auto}.dealer-report table{width:100%;border-collapse:collapse;font-size:14px;background:#fff}.dealer-report th{background:#152b41;color:#fff;text-align:right;padding:12px;white-space:nowrap}.dealer-report td{padding:12px;border-bottom:1px solid #e2e8f0;vertical-align:top}.dealer-report tr:nth-child(even){background:#f8fafc}.dealer-report .money{white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:700}.dealer-report .ref{font-size:11px;direction:ltr;display:block;overflow-wrap:anywhere;max-width:200px}.dealer-report .warning{background:#fff1f2;color:#991b1b;border-right:4px solid #b91c1c;padding:12px}
@media print{.dealer-report{font-size:11px}.dealer-report .table-scroll{overflow:visible}.dealer-report th{background:#eee;color:#111}.dealer-report tr{break-inside:avoid}}

#work-logout{cursor:pointer;font-family:inherit;background:transparent;color:inherit}#work-logout:disabled{opacity:.65;cursor:wait}#work-logout-status{font-size:12px;max-width:300px;color:#ffe0b2}

.debt-source{display:block;font-size:11px;font-weight:400;color:#64748b}.debt-incomplete{display:block;color:#9a3412!important;font-size:12px;line-height:1.6;margin-top:8px}

.inventory-row :is(.stock-positive,.stock-negative,.stock-zero) .numeric-value{color:#252525;font-weight:800;font-size:1.3rem}

/* v76: keep dealer statement columns and long amount words inside the report. */
.dealer-report{min-width:0;max-width:100%}.dealer-report .table-scroll{max-width:100%}.dealer-report table{table-layout:fixed;min-width:0}.dealer-report th,.dealer-report td,.dealer-report .money{white-space:normal;overflow-wrap:anywhere;word-break:normal;padding:10px 7px}.dealer-report .ref{max-width:100%}.dealer-report .dealer-balances{grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))}.dealer-currency dl div{flex-wrap:wrap}.dealer-currency dt,.dealer-currency dd{min-width:0;overflow-wrap:anywhere}
@media screen and (max-width:700px){.dealer-report table,.dealer-report tbody,.dealer-report tr,.dealer-report td{display:block;width:100%;box-sizing:border-box}.dealer-report thead{display:none}.dealer-report tr{border:1px solid #d9e2ea;border-radius:12px;margin:12px 0;padding:8px}.dealer-report td{display:block;text-align:right}.dealer-report td::before{content:attr(data-label);display:block;font-weight:700;color:#152b41}.dealer-report td>*{grid-column:2}.dealer-report td .ref{grid-column:2}.dealer-report td[colspan]{display:block}.dealer-report td[colspan]::before{display:none}.dealer-report-header{flex-wrap:wrap}}

/* v78: keep balance labels and figures beside each other, even with amount words. */
.dealer-report .dealer-balances{grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr))}
.dealer-currency dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:start;gap:12px;padding:10px 0}
.dealer-currency dt{font-size:17px;font-weight:700;line-height:1.5}
.dealer-currency dt .balance-caption{display:block;font-size:13px;font-weight:400;color:#526579;margin-top:3px}
.dealer-currency dd{font-size:20px;font-weight:800;line-height:1.5;text-align:left}
.dealer-currency dd .readable-number{display:block}
.dealer-currency dd .numeric-value{white-space:normal;overflow-wrap:anywhere}
.dealer-currency dd .number-words{text-align:left;font-size:13px;line-height:1.5;max-width:none}
.dealer-currency .closing,.dealer-currency .held-balance{border-top:1px solid #d9e2ea}
.dealer-currency .closing dt,.dealer-currency .held-balance dt{font-size:19px;font-weight:800}
@media(max-width:400px){.dealer-currency dl{padding:10px}.dealer-currency dl>div{gap:8px}.dealer-currency dd{font-size:18px}.dealer-currency dt{font-size:16px}.dealer-currency .closing dt,.dealer-currency .held-balance dt{font-size:18px}}
