:root{--ink:#172338;--muted:#8792a4;--line:#edf0f4;--canvas:#f7f8fa;--blue:#2867e8;--blue-dark:#1d57d0;--green:#15966d;--font:'IBM Plex Sans Arabic',Tahoma,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:var(--font);font-size:13px;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh}.sidebar{position:fixed;z-index:5;inset:0 0 0 auto;width:254px;background:#fff;border-left:1px solid #eaedf1;padding:22px 17px 14px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:11px;padding:0 5px;margin-bottom:26px;color:#172338;text-decoration:none;font-weight:700;font-size:19px;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;background:#2365e8;color:white;border-radius:11px;font-size:21px;box-shadow:0 5px 12px #2365e82c}.brand small,.workspace small,.user-profile small{display:block;font-size:10px;color:#96a0af;font-weight:400;letter-spacing:0;margin-top:1px}.workspace{display:flex;align-items:center;gap:10px;border:1px solid #edf0f4;border-radius:9px;padding:10px;margin-bottom:27px;font-size:11px}.workspace b{font-size:11px}.workspace-icon{width:31px;height:31px;border-radius:8px;background:#eef3ff;color:#2764db;display:grid;place-items:center;font-size:15px;font-weight:600}.chevron{margin-right:auto;color:#94a0b1}.nav-label{padding:0 10px;color:#a4adba;font-size:10px;margin-bottom:8px}.nav-list{display:grid;gap:3px}.nav-item{height:39px;display:flex;align-items:center;gap:11px;padding:0 10px;border-radius:7px;text-decoration:none;color:#657287;font-size:12px;transition:.15s}.nav-item:hover{background:#f6f8fc;color:var(--blue)}.nav-item.active{background:#edf3ff;color:#2365e8;font-weight:600}.nav-icon{font-family:Arial,sans-serif;width:17px;text-align:center;font-size:17px;color:#8995a6}.active .nav-icon{color:#2867e8}.nav-count{margin-right:auto;background:#e0eaff;color:#2867e8;border-radius:20px;padding:2px 7px;font-size:10px}.nav-dot{margin-right:auto;width:6px;height:6px;border-radius:100%;background:#f39b4a}.tools-label{margin-top:25px}.sidebar-bottom{margin-top:auto}.help-card{background:#f7f9fc;border:1px solid #eff2f6;border-radius:10px;padding:14px 13px;margin-bottom:16px;position:relative}.help-icon{display:grid;place-items:center;width:25px;height:25px;background:#e7efff;color:#2867e8;border-radius:7px;margin-bottom:10px;font-weight:700}.help-card b{font-size:11px}.help-card p{margin:5px 0 9px;color:#8a95a5;font-size:10px;line-height:1.6}.text-button{border:0;background:none;color:#2867e8;font-size:10px;padding:0;font-weight:600}.text-button span{margin-right:4px}.user-profile{display:flex;align-items:center;gap:9px;border-top:1px solid var(--line);padding:13px 3px 0;font-size:11px}.avatar,.top-avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#ffe8db;color:#bd6548;font-weight:600}.icon-button{border:0;background:transparent;color:#7d899a;font-size:18px}.user-profile .icon-button{margin-right:auto}.main-area{margin-right:254px;min-height:100vh}.topbar{height:65px;border-bottom:1px solid #ebedf1;background:#fff;display:flex;align-items:center;padding:0 34px;gap:16px}.breadcrumbs{display:flex;align-items:center;gap:9px;color:#98a1b0;font-size:11px}.breadcrumbs b{color:#303d52;font-weight:500}.crumb-slash{color:#c7cdd6}.topbar-actions{margin-right:auto;display:flex;align-items:center;gap:16px}.search-wrap{width:252px;height:34px;border:1px solid #ebeff4;border-radius:7px;display:flex;align-items:center;gap:8px;padding:0 10px;color:#9ca6b4}.search-wrap>span{font-size:21px}.search-wrap input{border:0;outline:0;width:100%;font-size:10px;color:var(--ink);background:transparent}.search-wrap kbd{white-space:nowrap;border:1px solid #e7eaf0;border-radius:4px;padding:1px 4px;font:9px Arial;color:#9ca6b4}.notification-button{position:relative;font-size:17px}.notification-button i{position:absolute;top:1px;right:1px;width:6px;height:6px;background:#f26c62;border-radius:50%;border:1px solid white}.top-avatar{width:30px;height:30px;background:#e4efff;color:#3770d6;font-size:10px}.menu-toggle{display:none}.page-content{max-width:1480px;padding:26px 34px 17px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:20px}.eyebrow{font-size:10px;color:#8e99a8;margin-bottom:7px;display:flex;align-items:center;gap:6px}.live-dot,.footer-dot{width:6px;height:6px;background:#29ad7a;border-radius:50%;display:inline-block}.page-heading h1{font-size:22px;line-height:1.3;margin:0 0 4px;font-weight:600;letter-spacing:-.3px}.page-heading p,.panel-heading p,.table-heading p{margin:0;color:#929cad;font-size:11px}.heading-actions{display:flex;gap:8px}.button{height:35px;padding:0 12px;border-radius:6px;font-size:10px;font-weight:500;display:inline-flex;align-items:center;gap:7px;justify-content:center;transition:.15s}.button-outline{background:#fff;border:1px solid #e5e9ef;color:#526077}.button-outline:hover{border-color:#c4d2ee;background:#fafcff}.button-primary{background:#2867e8;color:white;border:1px solid #2867e8;box-shadow:0 3px 7px #2867e81c}.button-primary:hover{background:#1d57d0}.button-primary span{font-size:17px;line-height:1}.button-small{height:30px;font-size:9px}.metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px}.metric-card,.panel{background:white;border:1px solid #edf0f4;border-radius:9px}.metric-card{padding:14px 15px 12px;min-width:0}.metric-top{display:flex;align-items:center;justify-content:space-between;color:#7c8797;font-size:10px}.metric-icon{width:27px;height:27px;border-radius:7px;display:grid;place-items:center;font-size:14px}.metric-icon.blue{color:#2867e8;background:#edf3ff}.metric-icon.green{color:#15966d;background:#e9f7f1}.metric-icon.orange{color:#d58430;background:#fff5e9}.metric-icon.violet{color:#7e60d6;background:#f2efff}.metric-value{font-size:23px;font-weight:600;letter-spacing:-.7px;margin:11px 0 9px;color:#1b293d;direction:rtl;white-space:nowrap}.metric-value small{font-size:10px;color:#8d98a7;font-weight:400;letter-spacing:0}.metric-bottom{display:flex;align-items:center;gap:5px;color:#9aa3b1;font-size:9px;white-space:nowrap}.trend{font-weight:600;font-size:9px}.trend.up{color:#15966d}.trend.down{color:#db8c37}.sparkline{height:22px;display:flex;align-items:flex-end;gap:2px;margin-right:auto}.sparkline i{display:block;width:4px;border-radius:3px 3px 0 0;background:currentColor;opacity:.3}.sparkline i:nth-child(1){height:36%}.sparkline i:nth-child(2){height:55%}.sparkline i:nth-child(3){height:43%}.sparkline i:nth-child(4){height:65%}.sparkline i:nth-child(5){height:58%}.sparkline i:nth-child(6){height:82%}.sparkline i:nth-child(7){height:68%}.sparkline i:nth-child(8){height:95%}.sparkline i:nth-child(9){height:87%}.blue-line{color:#3673e9}.green-line{color:#22a981}.orange-line{color:#e89a43}.violet-line{color:#8b6be2}.content-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(255px,.9fr);gap:14px;margin-bottom:14px}.panel{padding:16px}.panel-heading,.table-heading{display:flex;align-items:flex-start;justify-content:space-between}.panel-heading h2,.table-heading h2{font-size:13px;margin:0 0 4px;font-weight:600}.panel-heading p,.table-heading p{font-size:10px}.select-button,.more-button{height:29px;padding:0 9px;display:inline-flex;align-items:center;gap:12px;border:1px solid #ebeff3;border-radius:5px;background:white;color:#647187;font-size:9px}.select-button span{color:#9aa4b2;font-size:12px}.more-button{font-size:18px;border:0;padding:0 3px}.chart-legend{display:flex;gap:15px;margin-top:17px;color:#758194;font-size:9px}.chart-legend span{display:flex;align-items:center;gap:6px}.legend-dot{width:7px;height:7px;border-radius:50%}.legend-dot.collected{background:#2867e8}.legend-dot.outstanding{background:#24a87d}.chart-wrap{display:flex;height:174px;margin-top:7px;gap:11px}.y-labels{display:flex;flex-direction:column;justify-content:space-between;padding:3px 0 21px;color:#9ba4b1;font-size:8px;white-space:nowrap}.chart{position:relative;flex:1;min-width:0}.grid-lines{position:absolute;inset:5px 0 23px;display:flex;flex-direction:column;justify-content:space-between}.grid-lines i{height:1px;width:100%;background:#f0f2f5}.chart svg{position:absolute;inset:4px 0 23px;width:100%;height:calc(100% - 27px);overflow:visible}.x-labels{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;color:#9ba4b1;font-size:8px}.aging-panel{padding-bottom:13px}.donut-wrap{display:flex;justify-content:center;padding:18px 0 12px}.donut{width:144px;height:144px;border-radius:50%;background:conic-gradient(#2867e8 0 48%,#42b88f 48% 74%,#f0ad55 74% 90%,#ed786a 90% 100%);display:grid;place-items:center;position:relative}.donut:before{content:"";position:absolute;inset:15px;background:#fff;border-radius:50%}.donut-inner{position:relative;display:flex;flex-direction:column;text-align:center;gap:3px}.donut-inner b{font-size:15px;letter-spacing:-.4px}.donut-inner span{font-size:9px;color:#9aa4b2}.donut-inner small{font-size:8px}.aging-legend{display:grid;gap:9px}.aging-legend div{display:flex;align-items:center;gap:7px;font-size:9px;color:#727e90}.aging-legend i{width:7px;height:7px;border-radius:2px}.aging-legend b{margin-right:auto;color:#445168;font-weight:500}.age-one{background:#2867e8}.age-two{background:#42b88f}.age-three{background:#f0ad55}.age-four{background:#ed786a}.debts-panel{padding:15px 0 0}.table-heading{padding:0 16px 14px;align-items:center}.table-toolbar{padding:0 16px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0f2f5;border-bottom:1px solid #f0f2f5;min-height:43px}.filter-tabs{display:flex;height:43px;gap:17px}.filter-tab{position:relative;border:0;background:none;padding:0;color:#8994a4;font-size:9px;white-space:nowrap}.filter-tab span{margin-right:3px;color:#a2adbb;font-size:8px}.filter-tab.active{color:#2867e8;font-weight:600}.filter-tab.active:after{content:"";position:absolute;bottom:0;right:0;left:0;height:2px;background:#2867e8;border-radius:2px}.filter-tab.active span{color:#2867e8}.table-actions{display:flex;gap:6px}.table-actions .select-button{height:26px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:right}thead{background:#fafbfd}th{height:35px;font-size:9px;color:#929cac;font-weight:500}td{height:48px;border-top:1px solid #f2f4f6;color:#536075;font-size:9px}th:first-child,td:first-child{padding-right:16px;width:32px}td:last-child,th:last-child{padding-left:15px;width:32px}input[type=checkbox]{width:13px;height:13px;margin:0;accent-color:#2867e8;vertical-align:middle}.customer-cell{display:flex;align-items:center;gap:8px}.customer-avatar{width:27px;height:27px;display:grid;place-items:center;border-radius:7px;font-size:9px;font-weight:600;color:#4065a7;background:#eaf0fb}.customer-cell b{display:block;font-size:9px;color:#354258;font-weight:500}.customer-cell small{display:block;font-size:8px;color:#a1aab7;margin-top:2px}.invoice-code{font-family:Arial,sans-serif;color:#6e7b8e;font-size:9px;direction:ltr;display:inline-block}.amount-cell{color:#344258;font-weight:600}.due-late{color:#de7d62}.status{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:20px;font-size:8px}.status:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.status.overdue{background:#fff0ee;color:#da705d}.status.pending{background:#fff6e9;color:#cb8a37}.status.paid{background:#eaf7f1;color:#319976}.status.disputed{background:#f2efff;color:#8069c3}.action-cell{color:#8894a6}.row-more{border:0;background:none;color:#8a96a7;font-size:17px;padding:4px}.table-footer{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #f0f2f5;padding:11px 16px;color:#939eac;font-size:9px}.pagination{display:flex;align-items:center;gap:4px}.pagination button{border:1px solid #edf0f4;background:#fff;border-radius:4px;min-width:25px;height:25px;color:#748095;font-size:9px}.pagination button:disabled{color:#c4cbd4}.pagination button.active{background:#2867e8;border-color:#2867e8;color:white}.pagination span{padding:0 4px}.page-footer{display:flex;justify-content:space-between;padding:16px 1px 0;color:#a0a9b6;font-size:9px}.footer-dot{margin-left:5px;width:5px;height:5px}.footer-sep{padding:0 7px}.toast{position:fixed;z-index:20;bottom:22px;left:24px;background:#1e2d42;color:#fff;padding:11px 16px;border-radius:8px;box-shadow:0 8px 28px #15233d30;font-size:11px;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translateY(0)}.modal{border:1px solid #e8edf3;border-radius:12px;padding:22px;width:min(460px,calc(100vw - 32px));box-shadow:0 20px 70px #1b2b4733;color:var(--ink)}.modal::backdrop{background:#17233866;backdrop-filter:blur(2px)}.modal-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.modal-heading h2{font-size:17px;margin:0 0 4px}.modal-heading p{font-size:10px;color:#8d98a8;margin:0}.close-modal{font-size:20px}.modal label{display:block;font-size:10px;color:#59667b;margin-bottom:13px}.modal label input:not([type=file]){display:block;width:100%;height:37px;border:1px solid #e8edf2;border-radius:6px;padding:0 10px;margin-top:6px;outline:none;font-size:11px}.modal label input:focus{border-color:#7ba1f2;box-shadow:0 0 0 3px #2867e814}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.modal-actions{display:flex;justify-content:flex-start;gap:8px;margin-top:19px}.upload-area{border:1px dashed #dbe2ec;border-radius:9px;background:#fafbfd;min-height:142px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;cursor:pointer}.upload-area .upload-icon{font-size:24px;color:#2867e8}.upload-area b{font-size:11px;color:#425068}.upload-area small{font-size:9px;color:#97a1af}.upload-area input{max-width:220px;font-size:9px;color:#8692a1}.details-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fafbfd;padding:12px;border-radius:8px}.details-meta span{font-size:9px;color:#8d98a8}.details-meta b{display:block;color:#344258;font-size:11px;margin-top:4px}.details-modal .modal-actions{justify-content:flex-start}.empty-state{text-align:center;padding:32px;color:#929cad;font-size:10px}
@media(max-width:1150px){.sidebar{width:225px}.main-area{margin-right:225px}.page-content{padding:24px 22px}.topbar{padding:0 22px}.metric-card{padding:12px}.metric-value{font-size:20px}.metric-bottom{font-size:8px}.content-grid{grid-template-columns:minmax(0,1.6fr) minmax(230px,.8fr)}}@media(max-width:900px){.sidebar{transform:translateX(100%);transition:transform .22s ease;box-shadow:none}.sidebar.open{transform:translateX(0);box-shadow:-10px 0 35px #19294420}.main-area{margin-right:0}.menu-toggle{display:block}.topbar{padding:0 18px}.page-content{padding:22px 18px}.metrics-grid{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:minmax(0,1.5fr) minmax(220px,.8fr)}}@media(max-width:650px){.topbar{height:57px;padding:0 13px;gap:9px}.breadcrumbs{font-size:10px}.topbar-actions{gap:9px}.search-wrap{width:35px;padding:0 7px;border:none}.search-wrap>span{font-size:23px}.search-wrap input,.search-wrap kbd{display:none}.page-content{padding:20px 12px}.page-heading{align-items:flex-start;gap:14px;flex-direction:column}.page-heading h1{font-size:20px}.heading-actions{width:100%}.heading-actions .button{flex:1}.metrics-grid{gap:8px}.metric-card{padding:11px 10px}.metric-top{font-size:9px}.metric-value{font-size:18px;margin:9px 0 7px}.metric-bottom{flex-wrap:wrap;white-space:normal;gap:3px}.sparkline{display:none}.content-grid{grid-template-columns:1fr}.collection-panel{min-height:245px}.aging-panel{display:grid;grid-template-columns:1fr 1fr;align-items:center}.aging-panel .panel-heading{grid-column:1/-1}.donut-wrap{padding:12px 0}.donut{width:124px;height:124px}.donut-inner b{font-size:13px}.aging-legend{padding-right:5px}.table-heading{padding:0 12px 12px}.table-toolbar{padding:0 12px;overflow:auto;gap:13px}.filter-tabs{gap:13px}.filter-tab{font-size:8px}.table-actions .select-button{padding:0 7px;gap:3px}.table-scroll{min-height:270px}.table-footer{padding:10px 12px}.pagination{gap:2px}.pagination button{min-width:22px;height:23px}.page-footer{font-size:8px;gap:12px;line-height:1.7}.page-footer span:last-child{text-align:left}.notification-button{font-size:15px}.top-avatar{width:27px;height:27px}}
.modal select{display:block;width:100%;height:37px;border:1px solid #e8edf2;border-radius:6px;padding:0 10px;margin-top:6px;background:#fff;color:#344258;outline:none;font-size:11px}.login-overlay{position:fixed;z-index:30;inset:0;background:#f6f8fb;display:grid;place-items:center;padding:20px}.login-overlay[hidden]{display:none}.login-card{width:min(390px,100%);background:#fff;border:1px solid #edf0f4;border-radius:14px;padding:27px;box-shadow:0 16px 55px #1a2b4514}.login-brand{margin:0 0 23px;padding:0}.login-card h1{font-size:20px;margin:0 0 6px}.login-card>p{font-size:11px;color:#8792a4;margin:0 0 20px}.login-card label{display:block;font-size:10px;color:#59667b;margin-bottom:13px}.login-card input{display:block;width:100%;height:39px;border:1px solid #e8edf2;border-radius:6px;padding:0 10px;margin-top:6px;outline:none;font-size:11px}.login-card input:focus{border-color:#7ba1f2;box-shadow:0 0 0 3px #2867e814}.login-card .button{width:100%;margin-top:5px;height:39px}.login-card #loginError{display:block;min-height:16px;color:#d65f55;margin-top:10px;font-size:10px}.wide-modal{width:min(760px,calc(100vw - 32px))}.workspace-table-wrap{max-height:52vh;overflow:auto;border:1px solid #edf0f4;border-radius:8px}.workspace-table-wrap table{min-width:580px}.workspace-toolbar{display:flex;gap:8px;margin:0 0 13px;align-items:center}.workspace-toolbar input,.workspace-toolbar select{height:34px;border:1px solid #e8edf2;border-radius:6px;padding:0 9px;font:inherit;font-size:10px}.pagination[hidden]{display:none}
.live-chart-note{margin:auto;text-align:center;color:#8b96a6;font-size:10px;line-height:1.8;border:1px dashed #e5eaf1;border-radius:8px;width:100%;padding:28px 10px}.workspace-toolbar select{min-width:130px;background:#fff;color:#59667b}

.invoice-attachments{margin-top:14px;padding:12px;border:1px solid #edf0f4;border-radius:8px;background:#fff}.invoice-attachments>b{display:block;margin-bottom:9px;font-size:10px;color:#425068}.invoice-attachments>div{display:flex;flex-wrap:wrap;gap:6px}.invoice-attachments>label{margin:10px 0 0;cursor:pointer}

.import-preview{max-height:48vh;overflow:auto;margin-top:12px;padding:12px;border:1px solid #e6ebf2;border-radius:8px;background:#fcfdff}.import-preview h3{margin:0 0 7px;font-size:12px}.import-preview p,.import-preview li{font-size:10px;color:#68758a;line-height:1.7}.import-preview ul{margin:4px 0;padding-right:18px}.import-mapping{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0}.import-mapping div{display:flex;justify-content:space-between;gap:8px;padding:6px;border-radius:5px;background:#f2f5fa;font-size:9px}.import-mapping span{color:#8490a1}.import-mapping b{color:#39485f;font-weight:500}.import-mapping label{display:grid;gap:5px;margin:0;color:#657287}.import-mapping select{min-width:0;height:30px;border:1px solid #e1e6ee;border-radius:5px;background:#fff;padding:0 6px;font:inherit;color:#344258}
body.offline-cash-mode .app-shell{display:none!important}
body.offline-cash-mode #workspaceModal{display:block;position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0}
body.offline-cash-mode #workspaceModal::backdrop{background:#f5f7fb}
body.offline-cash-mode #workspaceModal .workspace-close{display:none}
body.offline-cash-mode #workspaceContent{max-width:1000px;margin:0 auto;padding:clamp(16px,4vw,36px)}
body.offline-cash-mode .offline-cash-notice{padding:14px;border:1px solid #e7c66a;background:#fff8df;border-radius:12px;margin:14px 0;color:#6b4f00}
