*{box-sizing:border-box}
html{scroll-behavior:smooth}
:root{
  --primary:#4658c8;
  --primary-dark:#3446ad;
  --violet:#6b3fc2;
  --teal:#23aeb5;
  --orange:#f57b00;
  --green:#23905a;
  --red:#d43b4d;
  --amber:#bd7711;
  --ink:#19243a;
  --muted:#738095;
  --line:#dce4ee;
  --soft:#f4f7fb;
  --soft-blue:#eef3ff;
  --white:#fff;
  --sidebar-w:136px;
  --shadow:0 10px 28px rgba(31,48,82,.08);
}
html,body{min-height:100%}
body{margin:0;direction:rtl;font-family:'IBM Plex Sans Arabic',Tahoma,Arial,sans-serif;background:var(--soft);color:var(--ink);font-variant-numeric:tabular-nums;overflow-x:hidden}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
img{display:block;max-width:100%}

/* Desktop navigation */
.desktop-sidebar{position:fixed;inset:0 0 0 auto;width:var(--sidebar-w);z-index:80;background:#fff;border-left:1px solid var(--line);display:flex;flex-direction:column;box-shadow:-6px 0 22px rgba(31,48,82,.06)}
.sidebar-brand{min-height:104px;padding:12px 8px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center}
.sidebar-brand img{width:48px;height:48px;object-fit:contain;border:1px solid var(--line);border-radius:12px;padding:4px;background:#fff}
.sidebar-brand span{display:flex;flex-direction:column}.sidebar-brand strong{font-size:16px;font-weight:900}.sidebar-brand small{font-size:9px;color:var(--muted);margin-top:2px}
.sidebar-nav{padding:10px 8px;display:flex;flex-direction:column;gap:6px;overflow-y:auto;min-height:0}
.sidebar-nav a{min-height:62px;border:1px solid transparent;border-radius:16px;color:#667287;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:7px 5px;font-size:10px;font-weight:900;transition:.15s}
.sidebar-nav a i{font-size:20px;color:#748198}.sidebar-nav a:hover{background:#f5f7fb;border-color:var(--line);color:#273750}.sidebar-nav a.active{background:linear-gradient(145deg,var(--primary),var(--violet));color:#fff;border-color:transparent;box-shadow:0 8px 18px rgba(74,73,190,.22)}.sidebar-nav a.active i{color:#fff}
.sidebar-account{margin-top:auto;border-top:1px solid var(--line);padding:10px 8px;display:grid;grid-template-columns:32px 1fr 24px;gap:6px;align-items:center;background:#fbfcfe}
.sidebar-avatar{width:32px;height:32px;border-radius:10px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:900}
.sidebar-account>span:nth-child(2){min-width:0;display:flex;flex-direction:column}.sidebar-account strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-account small{font-size:8px;color:var(--muted)}.sidebar-account>a{color:#6d798e;text-align:center}

/* Mobile navigation */
.mobile-header,.mobile-bottom-nav,.mobile-more-sheet,.mobile-sheet-backdrop{display:none}

/* Main layout */
.page{margin-right:var(--sidebar-w);padding:22px 22px 40px;min-height:100vh;max-width:1900px}
.app-footer{margin-right:var(--sidebar-w);height:34px;border-top:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;color:#8a95a6;font-size:9px}
.page-titlebar{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px}
.page-titlebar h1{margin:0;min-width:255px;padding:10px 24px;border-radius:16px;background:linear-gradient(135deg,var(--teal),var(--primary));color:#fff;text-align:center;font-size:20px;font-weight:900;box-shadow:0 10px 22px rgba(49,93,189,.16)}
.title-actions{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap}

/* Buttons and alerts */
.btn,.plain-link{min-height:38px;border:1px solid #ccd6e2;background:#fff;color:#35435a;padding:0 14px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:900;box-shadow:0 3px 9px rgba(31,48,82,.03)}
.btn:hover,.plain-link:hover{background:#f7f9fc;border-color:#aebbc9}.btn.primary{background:var(--green);border-color:var(--green);color:#fff}.btn.primary:hover{background:#197c4b}.btn.success{background:var(--teal);border-color:var(--teal);color:#fff}.btn.danger{color:var(--red);border-color:#edc1c8}.btn.small{min-height:31px;padding:0 10px;font-size:10px}.btn.icon{width:32px;min-width:32px;height:32px;min-height:32px;padding:0}.btn:disabled{opacity:.6;cursor:not-allowed}.btn.loading{pointer-events:none}
.alert-ok,.alert-error{min-height:44px;padding:10px 14px;margin-bottom:14px;border:1px solid;border-radius:14px;display:flex;align-items:center;gap:9px;font-size:11px;font-weight:900}.alert-ok{color:#197247;border-color:#bce2cd;background:#effaf4}.alert-error{color:#a72d3c;border-color:#efc2c9;background:#fff2f4}

/* Dashboard */
.quick-pill-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}.quick-pill{min-height:38px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;display:inline-flex;align-items:center;gap:8px;color:#42506a;font-size:10px;font-weight:900;box-shadow:0 4px 12px rgba(31,48,82,.04)}.quick-pill i{color:var(--primary)}
.launch-grid{display:grid;grid-template-columns:repeat(6,minmax(135px,1fr));gap:12px;margin-bottom:16px}
.launch-tile{position:relative;min-height:130px;padding:16px 12px;border-radius:22px;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;overflow:hidden;box-shadow:0 9px 20px rgba(31,48,82,.11);transition:.15s}.launch-tile:after{content:"";position:absolute;right:0;left:0;bottom:0;height:38px;background:rgba(0,0,0,.11)}.launch-tile i,.launch-tile strong,.launch-tile small{position:relative;z-index:1}.launch-tile i{font-size:34px}.launch-tile strong{font-size:14px}.launch-tile small{font-size:9px;opacity:.9}.launch-tile:hover{transform:translateY(-2px);filter:brightness(1.03)}
.launch-tile.blue{background:#4058bd}.launch-tile.purple{background:#693bb9}.launch-tile.orange{background:#f47b00}.launch-tile.teal{background:#26aeb4}.launch-tile.green{background:#329263}
.summary-line,.customer-status-grid{background:#fff;border:1px solid var(--line);border-radius:18px;display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden;margin-bottom:15px;box-shadow:0 7px 20px rgba(31,48,82,.04)}
.summary-item,.status-box{min-height:76px;padding:12px 15px;border-left:1px solid var(--line);display:flex;flex-direction:column;justify-content:center}.summary-item:last-child,.status-box:last-child{border-left:0}.summary-item span,.status-box span{font-size:9px;color:var(--muted);font-weight:800}.summary-item strong,.status-box strong{font-size:17px;font-weight:900;line-height:1.4;margin-top:2px}.green{color:#16814e!important}.red{color:#c93a4a!important}.blue{color:#285fca!important}.amber{color:#b57816!important}
.dashboard-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:15px}

/* Panels */
.section{background:#fff;border:1px solid var(--line);border-radius:18px;margin-bottom:15px;overflow:hidden;box-shadow:0 8px 22px rgba(31,48,82,.05)}
.section-head{min-height:46px;padding:0 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fbfcfe}.section-head h2{margin:0;font-size:12px;font-weight:900}.section-head>span{font-size:9px;color:var(--muted)}
.section-body{padding:18px}.section-toolbar{min-height:42px;border-bottom:1px solid var(--line);background:#f3f6fa;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px}.section-toolbar>span{font-size:9px;color:var(--muted);font-weight:800}.tool-set{display:flex;align-items:stretch}.section-toolbar a,.section-toolbar button{height:32px;border:0;border-left:1px solid #d6dee8;background:transparent;padding:0 10px;color:#56647a;font-size:9px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;gap:5px}.section-toolbar a:hover,.section-toolbar button:hover{background:#fff;color:var(--primary)}

/* Forms */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px}.form-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.field{min-width:0}.field.span-2{grid-column:span 2}.field.span-3{grid-column:span 3}.field label{display:block;margin-bottom:5px;color:#344158;font-size:10px;font-weight:900}.field input,.field select,.field textarea,.search-input{width:100%;min-height:40px;border:1px solid #d7e0ea;background:#fff;color:#1e2a3e;padding:8px 10px;border-radius:10px;outline:0;font-size:11px}.field input:focus,.field select:focus,.field textarea:focus,.search-input:focus{border-color:#4b75e8;box-shadow:0 0 0 3px rgba(75,117,232,.10)}.field input[readonly]{background:#f4f6f9;color:#5d697c}.field textarea{min-height:78px;resize:vertical}.field-hint{font-size:9px;color:#8b95a5;margin-top:4px}.suffix-wrap{position:relative}.suffix-wrap input{padding-left:54px}.suffix-wrap span{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:9px;color:#7a8698;font-weight:900}.form-actions{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}.form-block-title{margin:0 0 15px;padding-right:10px;border-right:3px solid var(--orange);font-size:13px;font-weight:900}.form-block-title.blue{border-color:#2f87ef}.form-hero{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:24px;align-items:stretch}.form-illustration{border-right:1px solid var(--line);min-height:280px;padding:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#69758a}.form-illustration i{font-size:54px;color:var(--primary);margin-bottom:12px}.form-illustration strong{font-size:15px;color:#2b3850}.form-illustration span{font-size:9px;line-height:1.8;margin-top:5px}.live-summary{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-top:16px}.live-summary div{padding:10px 12px;border-left:1px solid var(--line)}.live-summary div:last-child{border-left:0}.live-summary span{display:block;font-size:9px;color:var(--muted)}.live-summary strong{display:block;font-size:13px;margin-top:2px}.settings-fixed-name{min-height:40px;border:1px solid #d7e0ea;border-radius:10px;background:#f5f7fa;padding:9px 10px;font-size:11px;font-weight:900}

/* Tables */
.table-wrap{width:100%;overflow:auto;background:#fff}.data-table{width:100%;border-collapse:collapse;min-width:760px;font-size:10px}.data-table th{height:40px;padding:7px 10px;text-align:right;background:#fbfcfe;color:#3d4a60;font-weight:900;border-bottom:2px solid #cbd6e2;border-left:1px solid #e7ebf1;white-space:nowrap}.data-table td{height:43px;padding:7px 10px;border-bottom:1px solid #e4e9f0;border-left:1px solid #eef1f5;color:#39465b;vertical-align:middle}.data-table tr:hover td{background:#f8faff}.data-table th:last-child,.data-table td:last-child{border-left:0}.cell-title{display:block;color:#1d293c;font-weight:900;font-size:11px}.cell-sub{display:block;color:#8994a4;font-size:8px;margin-top:2px}.amount{font-weight:900;white-space:nowrap}.amount.in{color:#16814e}.amount.out{color:#c83949}.table-actions{display:flex;align-items:center;gap:5px}.status{display:inline-flex;align-items:center;justify-content:center;min-height:22px;padding:2px 8px;border-radius:999px;background:#eef1f5;color:#5e6b7e;font-size:8px;font-weight:900}.status.active,.status.completed{background:#eaf8f0;color:#177447}.status.late{background:#fff0f2;color:#b62c3d}.status.neutral{background:#eef1f5;color:#5e6b7e}.empty{padding:34px 18px;text-align:center;color:#8a94a4;font-size:11px}.toolbar{gap:12px}.toolbar form{display:flex;align-items:center;gap:6px;max-width:470px;width:100%}.table-search-row{padding:8px 12px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px;background:#fff}.table-search-row i{color:#758196}.table-search-row input{max-width:420px}.table-footer{min-height:36px;padding:6px 12px;background:#fbfcfe;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;color:#7a8495;font-size:9px}.customer-mini-list{display:flex;flex-direction:column}.customer-mini-list a{display:grid;grid-template-columns:1fr auto;gap:10px;padding:11px 14px;border-bottom:1px solid var(--line)}.customer-mini-list a:last-child{border-bottom:0}.customer-mini-list a:hover{background:#f8faff}.customer-mini-list strong{display:block;font-size:10px}.customer-mini-list span span{display:block;color:#8993a3;font-size:8px;margin-top:2px}.customer-mini-list b{font-size:10px;color:var(--red)}

/* Review */
.filter-section .section-body{padding:12px 14px}.filter-bar{display:grid;grid-template-columns:minmax(240px,1.6fr) minmax(150px,.7fr) minmax(150px,.7fr) auto;gap:12px;align-items:end}.review-heading{display:flex;justify-content:space-between;gap:20px;padding:14px 16px;border-bottom:1px solid var(--line)}.review-person h2{margin:0;font-size:16px}.review-person div{display:flex;flex-wrap:wrap;gap:13px;margin-top:5px;color:#748095;font-size:9px}.review-period{text-align:left;font-size:9px;color:#667287;line-height:1.8}.movement-type{display:inline-flex;align-items:center;gap:6px;font-weight:900}.movement-dot{width:7px;height:7px;border-radius:50%;background:var(--primary)}.movement-type.payment .movement-dot{background:var(--green)}.statement-footer{padding:10px 14px;border-top:1px solid var(--line);background:#fbfcfe;color:#687488;font-size:9px;text-align:left}.print-title{display:none}.split-layout{display:grid;grid-template-columns:minmax(360px,.72fr) minmax(620px,1.28fr);gap:15px;align-items:start}

/* Login */
.auth-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;background:#fff}.auth-side{background:linear-gradient(145deg,#3449a8,#673ab7);color:#fff;padding:55px;display:flex;flex-direction:column;justify-content:space-between}.auth-side-brand{display:flex;align-items:center;gap:14px}.auth-side-brand img{width:58px;height:58px;background:#fff;padding:6px;border-radius:12px}.auth-side-brand strong{font-size:28px}.auth-side-copy h1{margin:0 0 14px;font-size:38px;line-height:1.45;max-width:540px}.auth-side-copy p{margin:0;color:#d6dcff;line-height:1.9;max-width:500px}.auth-side small{color:#cbd2f7}.auth-form-area{display:grid;place-items:center;padding:35px}.auth-form{width:100%;max-width:420px}.auth-form h2{margin:0 0 7px;font-size:25px}.auth-form>p{margin:0 0 26px;color:#7b8596}.auth-form .field{margin-bottom:17px}.auth-submit{width:100%;height:45px;border:0;border-radius:12px;background:var(--green);color:#fff;font-weight:900;margin-top:8px}.auth-submit:hover{background:#267e4a}

/* Medium screens */
@media(max-width:1350px){.launch-grid{grid-template-columns:repeat(3,1fr)}.dashboard-grid{grid-template-columns:1fr}.split-layout{grid-template-columns:1fr}.form-grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr))}.field.span-3{grid-column:span 2}.form-hero{grid-template-columns:1fr}.form-illustration{display:none}.filter-bar{grid-template-columns:1fr 1fr}.filter-bar .field:first-child{grid-column:span 2}}

/* Phone app */
@media(max-width:760px){
  body{background:#fff;padding-bottom:82px}.desktop-sidebar{display:none}.app-footer{display:none}.page{margin:0;padding:12px 11px 20px;min-height:auto}.mobile-header{position:sticky;top:0;z-index:70;height:58px;padding:0 12px;background:rgba(255,255,255,.97);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.mobile-brand{display:flex;align-items:center;gap:8px}.mobile-brand img{width:38px;height:38px;object-fit:contain;border:1px solid var(--line);border-radius:10px;padding:3px}.mobile-brand>span{display:flex;flex-direction:column}.mobile-brand strong{font-size:15px}.mobile-brand small{font-size:8px;color:var(--muted)}.mobile-more{width:37px;height:37px;border:1px solid var(--line);border-radius:11px;background:#f8fafc;color:#566276}
  .mobile-bottom-nav{position:fixed;right:8px;left:8px;bottom:8px;height:65px;z-index:75;background:rgba(255,255,255,.98);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:20px;display:grid;grid-template-columns:repeat(5,1fr);box-shadow:0 12px 28px rgba(31,48,82,.14);padding-bottom:max(2px,env(safe-area-inset-bottom))}.mobile-bottom-nav a,.mobile-bottom-nav button{border:0;background:transparent;color:#788294;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:8px;font-weight:900;padding:0;border-radius:15px;margin:5px}.mobile-bottom-nav i{font-size:16px}.mobile-bottom-nav .active{color:#fff;background:linear-gradient(145deg,var(--primary),var(--violet))}
  .mobile-sheet-backdrop{position:fixed;inset:0;background:rgba(23,32,49,.45);z-index:88;opacity:0;visibility:hidden;transition:.2s;display:block}.mobile-sheet-backdrop.open{opacity:1;visibility:visible}.mobile-more-sheet{position:fixed;right:0;left:0;bottom:0;z-index:90;background:#fff;padding:10px 16px calc(18px + env(safe-area-inset-bottom));transform:translateY(105%);transition:.24s;display:block;border-radius:24px 24px 0 0;box-shadow:0 -10px 30px rgba(31,48,82,.14)}.mobile-more-sheet.open{transform:translateY(0)}.sheet-handle{width:46px;height:5px;border-radius:999px;background:#d5dae1;margin:0 auto 10px}.sheet-title{display:flex;align-items:center;justify-content:space-between}.sheet-title h2{font-size:16px;margin:0 0 7px}.sheet-title button{width:34px;height:34px;border:0;border-radius:10px;background:#f2f5f8;color:#5d697b}.mobile-more-sheet>a{height:49px;border-top:1px solid var(--line);display:grid;grid-template-columns:24px 1fr 14px;align-items:center;gap:8px;font-size:11px;font-weight:900}.mobile-more-sheet>a i:last-child{font-size:8px;color:#9aa4b3}
  .page-titlebar{min-height:42px;margin-bottom:11px;align-items:flex-end}.page-titlebar h1{min-width:0;width:auto;font-size:15px;padding:8px 14px}.title-actions{gap:5px}.title-actions .btn{font-size:0;width:36px;min-width:36px;padding:0}.title-actions .btn i{font-size:12px}.quick-pill-row{gap:6px}.quick-pill{font-size:8px;min-height:34px;padding:0 10px}.launch-grid{grid-template-columns:repeat(2,1fr);gap:8px}.launch-tile{min-height:105px;padding:11px}.launch-tile i{font-size:27px}.launch-tile strong{font-size:11px}.launch-tile small{font-size:7px}.summary-line,.customer-status-grid{grid-template-columns:repeat(2,1fr);margin-bottom:10px}.summary-item,.status-box{min-height:59px;padding:8px 10px}.summary-item:nth-child(2),.status-box:nth-child(2){border-left:0}.summary-item:nth-child(-n+2),.status-box:nth-child(-n+2){border-bottom:1px solid var(--line)}.summary-item strong,.status-box strong{font-size:13px}.section{margin-bottom:10px;border-radius:15px}.section-head{min-height:42px;padding:0 10px}.section-head h2{font-size:11px}.section-body{padding:12px}.form-grid,.form-grid.cols-3{grid-template-columns:1fr;gap:10px}.field.span-2,.field.span-3{grid-column:auto}.field input,.field select,.field textarea{font-size:11px;min-height:40px}.form-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.form-actions .btn{width:100%;min-width:0}.form-actions .btn:first-child:last-child{grid-column:span 2}.form-hero{display:block}.live-summary{grid-template-columns:repeat(2,1fr)}.live-summary div:nth-child(2){border-left:0}.live-summary div:nth-child(-n+2){border-bottom:1px solid var(--line)}.split-layout{display:block}.toolbar{align-items:stretch;flex-direction:column}.toolbar form{max-width:none}.table-wrap{margin:0 -12px;width:calc(100% + 24px)}.data-table{min-width:720px}.filter-bar{grid-template-columns:1fr}.filter-bar .field:first-child{grid-column:auto}.filter-bar .btn{width:100%}.review-heading{display:block}.review-period{text-align:right;margin-top:8px}.review-person div{display:block}.review-person div span{display:block;margin-top:3px}.auth-page{grid-template-columns:1fr}.auth-side{display:none}.auth-form-area{padding:24px 17px}.auth-form h2{font-size:22px}
}

@media print{body{background:#fff;padding:0}.desktop-sidebar,.mobile-header,.mobile-bottom-nav,.mobile-more-sheet,.mobile-sheet-backdrop,.app-footer,.page-titlebar .title-actions,.filter-section,.no-print,.section-toolbar{display:none!important}.page{margin:0;padding:0;max-width:none}.page-titlebar{justify-content:center}.page-titlebar h1{background:transparent;color:#000;box-shadow:none;font-size:20px}.section,.summary-line,.customer-status-grid{box-shadow:none;border:1px solid #aaa;break-inside:avoid}.data-table th{background:#eee!important;color:#000}.print-title{display:block!important;text-align:center;margin:0 0 12px;font-size:20px}}

/* Grant notes and grant details */
.note-text{display:block;max-width:280px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;color:#4e5b70}
.grant-note-preview{margin-top:12px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:#fbfcff;display:grid;grid-template-columns:130px 1fr;gap:12px;align-items:start}
.grant-note-preview span{font-size:11px;color:#6f798a;font-weight:900}.grant-note-preview strong{font-size:12px;color:#27354d;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}
.row-detail-link{display:inline-flex;align-items:center;gap:5px;margin-right:8px;padding:3px 8px;border-radius:999px;background:#eef3ff;color:var(--primary);font-size:9px;font-weight:900;white-space:nowrap}
.details-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;align-items:start}
.details-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border:1px solid var(--line);border-radius:16px;overflow:hidden;padding:0}
.details-list>div{min-height:64px;padding:10px 12px;border-bottom:1px solid var(--line);border-left:1px solid var(--line);background:#fff}
.details-list>div:nth-child(2n){border-left:0}.details-list>div:nth-last-child(-n+2){border-bottom:0}
.details-list span{display:block;font-size:10px;color:#7b8597;font-weight:800;margin-bottom:4px}.details-list strong{display:block;font-size:13px;color:#26344e;line-height:1.6;overflow-wrap:anywhere}
.grant-note-box{min-height:70px;padding:14px 16px;border:1px dashed #b9c6dc;border-radius:16px;background:#f8fbff;color:#33425c;line-height:1.9;white-space:normal;overflow-wrap:anywhere}
@media(max-width:900px){.details-layout{grid-template-columns:1fr}}
@media(max-width:760px){
  .grant-note-preview{grid-template-columns:1fr;gap:4px}
  .details-list{grid-template-columns:1fr}
  .details-list>div,.details-list>div:nth-child(2n){border-left:0;border-bottom:1px solid var(--line)}
  .details-list>div:last-child{border-bottom:0}
  .note-text{max-width:220px}
}

/* ===== Final colour and mobile polish ===== */
.launch-grid{grid-template-columns:repeat(auto-fit,minmax(155px,1fr))}
.launch-tile,.launch-tile.blue,.launch-tile.green,.launch-tile.purple,.launch-tile.orange,.launch-tile.teal,.launch-tile.gold{color:#fff!important}
.launch-tile i,.launch-tile strong,.launch-tile small{color:#fff!important}
.launch-tile.gold{background:linear-gradient(145deg,#d99a12,#b96f08)}
.summary-item strong.green,.status-box strong.green{color:#16814e!important}
.summary-item strong.red,.status-box strong.red{color:#c93a4a!important}
.summary-item strong.blue,.status-box strong.blue{color:#285fca!important}
.summary-item strong.amber,.status-box strong.amber{color:#b57816!important}

/* Daily payments reconciliation */
.daily-filter-bar{display:flex;align-items:end;justify-content:center;gap:10px;flex-wrap:wrap}
.daily-date-form{display:flex;align-items:end;gap:9px;min-width:min(430px,100%)}
.daily-date-form .field{flex:1}.daily-date-form .field label{margin-bottom:4px}
.daily-summary-grid{margin-bottom:15px}
.daily-payments-table tfoot th{background:#eef8f2;border-top:2px solid #9bcdb1;font-size:11px}
.mobile-payment-cards{display:none}
.daily-customer-totals{display:flex;flex-direction:column}
.daily-customer-totals>a{min-height:58px;padding:10px 14px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto 14px;align-items:center;gap:10px}
.daily-customer-totals>a:last-child{border-bottom:0}.daily-customer-totals>a:hover{background:#f8faff}
.daily-customer-totals strong{display:block;font-size:11px}.daily-customer-totals small{display:block;margin-top:3px;color:var(--muted);font-size:9px}
.daily-customer-totals b{color:var(--green);font-size:12px;white-space:nowrap}.daily-customer-totals>a>i{font-size:9px;color:#9aa5b4}

@media(max-width:760px){
  .page{padding-bottom:92px}
  .page-titlebar{align-items:center;gap:8px}.page-titlebar h1{max-width:calc(100% - 48px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .title-actions{flex-wrap:nowrap;overflow:auto;max-width:100%;padding-bottom:2px}.title-actions::-webkit-scrollbar{display:none}
  .quick-pill-row{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}.quick-pill-row::-webkit-scrollbar{display:none}.quick-pill{flex:0 0 auto}
  .launch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.launch-tile{min-width:0}
  .section-toolbar{padding:8px;align-items:stretch;flex-direction:column}.tool-set{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:6px}.section-toolbar a,.section-toolbar button{border:1px solid var(--line);border-radius:10px;background:#fff}
  .table-search-row input{max-width:none}.table-footer{gap:8px;flex-wrap:wrap}
  .daily-filter-bar{display:grid;grid-template-columns:40px 1fr 40px;align-items:end;padding:11px}
  .daily-date-form{min-width:0;display:grid;grid-template-columns:1fr;gap:7px}.daily-date-form .btn{width:100%}
  .daily-filter-bar>a:last-child{grid-column:1/-1;width:100%}
  .daily-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .desktop-payment-table{display:none}.mobile-payment-cards{display:block;padding:10px;background:#f7f9fc}
  .payment-mobile-card{background:#fff;border:1px solid var(--line);border-radius:16px;margin-bottom:10px;overflow:hidden;box-shadow:0 5px 14px rgba(31,48,82,.05)}
  .payment-card-head{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:9px;padding:12px}
  .payment-index{width:28px;height:28px;border-radius:9px;background:#eef3ff;color:var(--primary);display:grid;place-items:center;font-size:10px;font-weight:900}
  .payment-card-head strong{display:block;font-size:12px}.payment-card-head small{display:block;font-size:9px;color:var(--muted);margin-top:2px}.payment-card-head b{font-size:12px;color:var(--green);white-space:nowrap}
  .payment-card-meta{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fbfcfe}
  .payment-card-meta span{padding:8px 10px;font-size:9px;color:#617087;display:flex;align-items:center;gap:6px}.payment-card-meta span:first-child{border-left:1px solid var(--line)}.payment-card-meta i{color:var(--primary)}
  .payment-card-note{padding:10px 12px;font-size:10px;color:#44536a;line-height:1.8}.payment-card-note span{display:block;font-size:8px;color:var(--muted);font-weight:900;margin-bottom:2px}
  .payment-card-open{min-height:39px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;color:var(--primary);font-size:10px;font-weight:900;border-top:1px solid var(--line)}
  .mobile-total-bar{min-height:55px;padding:10px 13px;border-radius:15px;background:linear-gradient(145deg,#1e8754,#2aa86a);color:#fff;display:flex;align-items:center;justify-content:space-between;box-shadow:0 8px 17px rgba(31,140,86,.18)}.mobile-total-bar span{font-size:11px;font-weight:900}.mobile-total-bar strong{font-size:15px}
  .daily-customer-totals>a{grid-template-columns:1fr auto 10px;padding:10px 12px}.daily-customer-totals b{font-size:11px}
  .form-illustration{display:none!important}
  .note-text{max-width:180px}
}

/* ===== Larger desktop typography and controls ===== */
@media (min-width:761px){
  :root{--sidebar-w:150px}
  body{font-size:15px}
  .desktop-sidebar{width:var(--sidebar-w)}
  .sidebar-brand{min-height:116px;padding:14px 9px;gap:8px}
  .sidebar-brand img{width:54px;height:54px}
  .sidebar-brand strong{font-size:19px}
  .sidebar-brand small{font-size:11px}
  .sidebar-nav{padding:12px 9px;gap:7px}
  .sidebar-nav a{min-height:70px;padding:9px 6px;font-size:12px;gap:7px}
  .sidebar-nav a i{font-size:23px}
  .sidebar-account{padding:11px 9px;grid-template-columns:36px 1fr 26px}
  .sidebar-avatar{width:36px;height:36px;font-size:15px}
  .sidebar-account strong{font-size:11px}.sidebar-account small{font-size:9px}

  .page{margin-right:var(--sidebar-w);padding:24px 24px 44px}
  .app-footer{margin-right:var(--sidebar-w);font-size:11px}
  .page-titlebar{min-height:60px;margin-bottom:18px}
  .page-titlebar h1{min-width:290px;padding:12px 28px;font-size:24px;border-radius:17px}
  .title-actions{gap:10px}

  .btn,.plain-link{min-height:44px;padding:0 17px;font-size:13px;gap:8px}
  .btn.small{min-height:36px;padding:0 13px;font-size:12px}
  .btn.icon{width:38px;min-width:38px;height:38px;min-height:38px}
  .alert-ok,.alert-error{min-height:48px;padding:11px 16px;font-size:13px}

  .quick-pill{min-height:43px;padding:0 16px;font-size:12px}
  .launch-tile{min-height:145px;padding:18px 14px;gap:8px}
  .launch-tile i{font-size:39px}
  .launch-tile strong{font-size:17px}
  .launch-tile small{font-size:11px}
  .summary-item,.status-box{min-height:88px;padding:14px 18px}
  .summary-item span,.status-box span{font-size:12px}
  .summary-item strong,.status-box strong{font-size:21px}

  .section-head{min-height:54px;padding:0 17px}
  .section-head h2{font-size:15px}
  .section-head>span{font-size:11px}
  .section-body{padding:22px}
  .section-toolbar{min-height:49px;padding:5px 10px}
  .section-toolbar>span{font-size:11px}
  .section-toolbar a,.section-toolbar button{height:38px;padding:0 13px;font-size:12px;gap:7px}

  .form-grid{gap:18px 24px}
  .field label{margin-bottom:7px;font-size:14px}
  .field input,.field select,.field textarea,.search-input{min-height:48px;padding:11px 13px;border-radius:12px;font-size:14px}
  .field textarea{min-height:100px;line-height:1.75}
  .field-hint{font-size:11px;margin-top:5px}
  .suffix-wrap input{padding-left:62px}.suffix-wrap span{font-size:12px;left:13px}
  .form-actions{gap:10px;margin-top:25px;padding-top:19px}
  .form-block-title{margin-bottom:18px;padding-right:12px;font-size:16px;border-right-width:4px}
  .form-hero{grid-template-columns:minmax(0,1fr) 245px;gap:28px}
  .form-illustration{padding:28px}
  .form-illustration i{font-size:62px;margin-bottom:14px}
  .form-illustration strong{font-size:18px}
  .form-illustration span{font-size:12px;line-height:1.9;margin-top:7px}
  .live-summary{margin-top:19px;border-radius:16px}
  .live-summary div{padding:13px 15px}
  .live-summary span{font-size:12px}
  .live-summary strong{font-size:17px;margin-top:4px}
  .settings-fixed-name{min-height:48px;padding:11px 13px;font-size:14px}

  .data-table{font-size:13px}
  .data-table th{height:48px;padding:10px 13px;font-size:13px}
  .data-table td{height:51px;padding:10px 13px;font-size:13px}
  .cell-title{font-size:14px}.cell-sub{font-size:11px;margin-top:3px}
  .status{min-height:26px;padding:3px 10px;font-size:10px}
  .empty{padding:40px 20px;font-size:13px}
  .table-search-row{padding:10px 14px;gap:10px}
  .table-footer{min-height:42px;padding:8px 14px;font-size:11px}
  .customer-mini-list a{padding:14px 17px}
  .customer-mini-list strong{font-size:13px}.customer-mini-list span span{font-size:11px}.customer-mini-list b{font-size:13px}

  .review-person h2{font-size:20px}.review-person div,.review-period{font-size:12px}
  .note-text{font-size:13px;line-height:1.8}
  .grant-note-preview span{font-size:13px}.grant-note-preview strong{font-size:14px}
  .details-list span{font-size:12px}.details-list strong{font-size:15px}
  .grant-note-box{font-size:14px}
  .daily-payments-table tfoot th{font-size:13px}
  .daily-customer-totals strong{font-size:13px}.daily-customer-totals small{font-size:11px}.daily-customer-totals b{font-size:14px}
}

/* ===== Visible edit and delete actions ===== */
.action-buttons-visible{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}
.action-buttons-visible .btn{min-width:auto}
.action-buttons-visible .btn.edit{color:#2459bd;border-color:#b9c9ed;background:#f3f6ff}
.action-buttons-visible .btn.edit:hover{background:#e7eeff;border-color:#8eaae3}
.action-buttons-visible .btn.danger{color:#bd2f40;border-color:#efc3ca;background:#fff4f5}
.action-buttons-visible .btn.danger:hover{background:#ffe8eb;border-color:#df98a3}
.payment-card-actions{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}
.payment-card-actions a{min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;color:#285fca;font-size:11px;font-weight:900}
.payment-card-actions a:first-child{border-left:1px solid var(--line)}
.payment-card-actions a.danger{color:#bd2f40}
@media(max-width:760px){
  .action-buttons-visible{gap:5px}
  .action-buttons-visible .btn{min-height:34px;padding:0 9px;font-size:10px;border-radius:10px}
  .action-buttons-visible .btn span{display:inline}
}


/* totals summary clarity */
.totals-heading{min-height:48px;margin:4px 0 10px;padding:0 16px;border:1px solid var(--line);border-radius:16px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:900;color:#2d3a50;box-shadow:0 6px 18px rgba(25,39,67,.04)}
.totals-heading>span:first-child{display:flex;align-items:center;gap:9px}.totals-heading i{color:var(--primary)}.totals-heading a{font-size:12px;color:var(--primary);display:flex;align-items:center;gap:7px}.totals-heading-note{font-size:11px;color:#7b8597;font-weight:700}
.customer-status-grid.totals-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.totals-grid .status-box{min-height:94px;display:flex;flex-direction:column;justify-content:center}.totals-grid .status-box span{font-size:12px}.totals-grid .status-box strong{font-size:21px}.totals-grid .important-total{background:#fff7f8}.totals-grid .important-total strong{font-size:23px}
@media(max-width:1100px){.customer-status-grid.totals-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.totals-grid .status-box:nth-child(3){border-left:0}.totals-grid .status-box:nth-child(-n+3){border-bottom:1px solid var(--line)}}
@media(max-width:760px){.totals-heading{padding:10px 12px;align-items:flex-start;flex-direction:column}.totals-heading a,.totals-heading-note{font-size:10px}.customer-status-grid.totals-grid{grid-template-columns:1fr 1fr}.totals-grid .status-box{min-height:76px}.totals-grid .status-box span{font-size:10px}.totals-grid .status-box strong,.totals-grid .important-total strong{font-size:16px}.totals-grid .status-box:nth-child(odd){border-left:1px solid var(--line)}.totals-grid .status-box:nth-child(even){border-left:0}.totals-grid .status-box{border-bottom:1px solid var(--line)}.totals-grid .status-box:last-child{grid-column:1/-1;border-bottom:0;border-left:0}}

/* ===== Customer review search v1 ===== */
.customer-lookup-form{display:grid;grid-template-columns:minmax(300px,1fr) auto auto;gap:10px;align-items:end}
.customer-search-field{min-width:0}.customer-search-control{position:relative}.customer-search-control>i{position:absolute;right:14px;top:50%;transform:translateY(-50%);color:#71809a;font-size:16px;z-index:2}.customer-search-control input{padding-right:43px!important;min-height:48px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:#fff!important;font-size:15px!important}.customer-search-button{min-height:48px;min-width:110px}
.customer-search-summary{margin-top:16px;padding:10px 12px;border-radius:12px;background:#f4f7fb;color:#58667d;font-size:13px}.customer-search-summary strong{color:#23334e}
.customer-search-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}
.customer-search-result{min-height:66px;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:15px;background:#fff;transition:.15s}.customer-search-result:hover,.customer-search-result.selected{border-color:#7891ed;background:#f4f7ff;box-shadow:0 6px 16px rgba(53,76,150,.08)}.customer-result-icon{width:40px;height:40px;border-radius:12px;background:#eef2ff;color:var(--primary);display:grid;place-items:center}.customer-result-copy{min-width:0}.customer-result-copy strong{display:block;font-size:14px;color:#1f2d43;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-result-copy small{display:block;margin-top:3px;font-size:11px;color:#7b8799;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-result-action{font-size:11px;font-weight:900;color:var(--primary);white-space:nowrap}.customer-result-action i{font-size:9px;margin-right:3px}
.selected-customer-bar{margin-top:16px;padding:12px 14px;border:1px solid #bcdac9;border-radius:15px;background:#f0fbf5;display:grid;grid-template-columns:auto auto 1fr auto;gap:10px;align-items:center}.selected-customer-bar>span{color:#197346;font-size:12px;font-weight:900}.selected-customer-bar>strong{font-size:15px}.selected-customer-bar>small{color:#637287;font-size:12px}.selected-customer-bar>a{color:var(--primary);font-size:11px;font-weight:900}
.review-date-form{display:grid;grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) auto;gap:12px;align-items:end;margin-top:14px}.review-date-form .btn{min-height:44px}
.customer-search-help{margin-top:14px;padding:12px 14px;border-radius:13px;background:#fff8e9;color:#7b6025;font-size:12px;display:flex;align-items:center;gap:8px}.customer-search-empty i{margin-left:6px}
@media(max-width:900px){.customer-search-results{grid-template-columns:1fr}}
@media(max-width:760px){.customer-lookup-form{grid-template-columns:1fr 1fr}.customer-search-field{grid-column:1/-1}.customer-search-button{width:100%}.customer-lookup-form>.btn:last-child{width:100%}.selected-customer-bar{grid-template-columns:1fr auto}.selected-customer-bar>span,.selected-customer-bar>small{grid-column:1/-1}.review-date-form{grid-template-columns:1fr 1fr}.review-date-form .btn{grid-column:1/-1;width:100%}.customer-search-result{grid-template-columns:38px 1fr auto;padding:9px}.customer-result-action{font-size:0}.customer-result-action i{font-size:11px}.customer-search-control input{font-size:14px!important}}
