/* Approved Home Staff Apple v0.2 design, retained verbatim. */

:root{--bg:#f4f5f0;--panel:#ffffff;--soft:#edf1eb;--text:#192e29;--muted:#65766e;--line:#dce5dd;--accent:#206b58;--accent2:#0d9488;--on:#fff;--gold:#ab712d;--goldbg:#faf2e4;--danger:#a83f3f;--shadow:0 12px 32px rgba(24,50,37,.06);--radius:20px;font-family:"HomeStaffRiyal",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans Arabic",Arial,sans-serif;font-size:15px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);line-height:1.55}body.dark{--bg:#111d1b;--panel:#192b27;--soft:#203732;--text:#ebf2ed;--muted:#a2b6ac;--line:#304740;--accent:#91cbb6;--accent2:#72c7b9;--on:#122921;--gold:#e4b878;--goldbg:#3a3024;--danger:#ff9999;--shadow:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--accent2);outline-offset:2px}button{background:none;border:0}a{color:var(--accent)}.icon{width:21px;height:21px;display:inline-block;vertical-align:middle;flex:none;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.icon.sm{width:17px;height:17px}.icon.lg{width:28px;height:28px}h1,h2,h3,p{margin:0}h1{font-size:clamp(25px,3.4vw,39px);font-weight:700;letter-spacing:-.035em;line-height:1.25}h2{font-size:22px;font-weight:700;letter-spacing:-.02em}h3{font-size:16px;font-weight:650}.muted{color:var(--muted)}.tiny{font-size:12px}.small{font-size:13px}.money{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate;display:inline-block;white-space:nowrap}.amount{font-size:30px;font-weight:740;letter-spacing:-.05em;line-height:1.3}.amount small{font-size:12px;font-weight:600;letter-spacing:0}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.13em;font-weight:750;color:var(--muted)}html[dir=rtl] .eyebrow{letter-spacing:0}.label{display:block;font-size:12px;font-weight:650;color:var(--muted);margin-bottom:5px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:var(--shadow)}.soft{background:var(--soft);border-radius:15px;padding:14px}.row{display:flex;gap:12px;align-items:center}.spread{justify-content:space-between}.stack{display:grid;gap:14px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.btn{border:1px solid var(--line);border-radius:12px;background:var(--panel);min-height:43px;padding:10px 15px;display:inline-flex;justify-content:center;align-items:center;gap:8px;font-weight:650;font-size:13px}.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on)}.btn.ghost{background:transparent}.btn.wide{width:100%}.btn.sm{min-height:35px;font-size:12px;padding:7px 11px}.iconbtn{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;color:var(--muted);border:1px solid transparent;position:relative}.iconbtn:hover,.navitem:hover{background:var(--soft)}.tag{display:inline-flex;align-items:center;gap:5px;border-radius:30px;background:var(--soft);color:var(--accent);padding:4px 10px;font-size:11px;font-weight:650;white-space:nowrap}.tag.warn{background:var(--goldbg);color:var(--gold)}.tag.neutral{color:var(--muted)}.dot{width:7px;height:7px;background:currentColor;border-radius:50%;display:inline-block}.rule{border:0;border-top:1px solid var(--line);margin:13px 0}.progress{height:7px;border-radius:12px;background:var(--line);overflow:hidden}.progress>span{display:block;height:100%;background:var(--accent2);border-radius:12px;transition:width .25s}.brandmark{width:42px;height:42px;background:#1f5749;border-radius:15px;display:grid;place-items:center;color:#e9f5df;flex:none}.brandmark .icon{width:26px;height:26px}.brandname{font-size:16px;font-weight:750;letter-spacing:-.04em;direction:ltr;text-align:start}.avatar{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:var(--soft);color:var(--accent);flex:none}.avatar.big{width:64px;height:64px;border-radius:20px}.avatar.warm{background:var(--goldbg);color:var(--gold)}.layout{min-height:100dvh;display:grid;grid-template-columns:232px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100dvh;background:var(--panel);border-inline-end:1px solid var(--line);padding:24px 16px;display:flex;flex-direction:column;gap:24px;overflow:auto}.nav{display:grid;gap:5px}.navitem{display:flex;align-items:center;gap:11px;text-align:start;padding:12px 13px;width:100%;border-radius:12px;color:var(--muted);font-size:13px;font-weight:600;min-height:44px}.navitem.active{background:var(--soft);color:var(--accent);font-weight:750}.navitem .n{margin-inline-start:auto;font-size:11px;background:var(--goldbg);color:var(--gold);border-radius:15px;padding:2px 7px}.sidebottom{margin-top:auto;display:grid;gap:10px}.userchip{padding:10px;border-radius:14px;border:1px solid var(--line)}.body{min-width:0;display:flex;flex-direction:column;min-height:100dvh}.top{height:76px;position:sticky;top:0;z-index:5;background:var(--bg);display:flex;align-items:center;justify-content:space-between;padding:0 30px;border-bottom:1px solid var(--line);gap:12px}.headtitle{font-weight:700}.topactions{display:flex;align-items:center;gap:3px}.topactions .badgecount{position:absolute;inset-inline-end:3px;top:3px;width:9px;height:9px;background:#c78535;border:2px solid var(--bg);border-radius:50%}.mobilebrand{display:none}.demo{padding:6px 10px;display:inline-flex;gap:6px;align-items:center;background:var(--soft);border-radius:24px;font-size:10px;font-weight:650;color:var(--muted)}.content{width:100%;max-width:1120px;margin:0 auto;padding:30px 34px 42px;flex:1}.home{max-width:900px;margin:0 auto;display:grid;gap:22px}.hero{padding:15px 0 0;display:flex;flex-direction:column;gap:10px;align-items:flex-start}.hero h1{font-size:clamp(28px,4vw,42px)}.hero .brandmark{width:50px;height:50px;border-radius:17px;background:var(--soft);color:var(--accent)}.hero p{font-size:14px;max-width:560px}.hero-stat{padding:20px 22px;display:grid;gap:12px;position:relative;overflow:hidden}.hero-stat .statline{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}.hero-stat .cap{font-size:12px;color:var(--muted)}.hero-stat .amount{font-size:37px}.summarygrid{display:grid;grid-template-columns:1.45fr 1fr;gap:12px}.next{display:grid;gap:12px;align-content:start}.next .event{display:flex;gap:10px;align-items:center}.event .icon{color:var(--gold)}.promptgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.prompt{display:flex;align-items:center;text-align:start;gap:12px;padding:13px;background:var(--panel);border:1px solid var(--line);border-radius:15px;min-height:66px;transition:background .15s}.prompt:hover{background:var(--soft)}.prompt .icon{color:var(--accent)}.prompt b{font-size:13px;display:block}.prompt .arrow{margin-inline-start:auto;color:var(--muted)}.chatwrap{display:flex;flex-direction:column;gap:19px}.chatbubble{max-width:90%;padding:14px 18px;border-radius:20px;background:var(--soft);align-self:flex-end;overflow-wrap:anywhere;white-space:pre-wrap}.assistantmsg{display:grid;gap:10px;max-width:100%}.assistantmsg .botlabel{font-size:12px;color:var(--muted);font-weight:650;display:flex;gap:8px;align-items:center}.assistantmsg .brandmark{width:28px;height:28px;border-radius:10px}.assistantmsg .brandmark .icon{width:18px;height:18px}.assistanttext{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.composer{position:sticky;bottom:0;background:var(--bg);padding:12px 0 5px;margin-top:5px;z-index:4}.composebox{border:1px solid var(--line);background:var(--panel);border-radius:22px;padding:13px 15px;box-shadow:0 8px 25px rgba(20,40,30,.06)}.composebox textarea{display:block;resize:vertical;max-height:150px;min-height:43px;width:100%;border:0;background:transparent;padding:7px 0;outline:none}.composebox textarea:focus-visible{outline:none}.composebottom{display:flex;align-items:center;justify-content:space-between}.send{width:41px;height:41px;border-radius:50%;display:grid;place-items:center;color:var(--on);background:var(--accent)}.sectionhead{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:22px}.sectionhead p{margin-top:5px;font-size:13px;color:var(--muted)}.sectionhead h1{font-size:30px}.staffcard{display:grid;gap:14px;text-align:start;width:100%;cursor:pointer}.staffcard:hover{border-color:var(--accent2)}.staffcard .name{font-size:18px;font-weight:750}.statbox{padding:15px;border-radius:14px;background:var(--soft)}.statbox .amount{font-size:24px}.items{display:grid;gap:0}.item{padding:15px 0;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.item:last-child{border-bottom:0}.item .tail{margin-inline-start:auto}.itembtn{width:100%;text-align:start}.itembtn:hover{background:var(--soft);border-radius:10px;padding-inline:9px}.tileicon{width:42px;height:42px;border-radius:13px;background:var(--soft);color:var(--accent);display:grid;place-items:center;flex:none}.field{display:grid;gap:6px;min-width:0}.field label{font-size:13px;font-weight:650}.field input,.field select,.field textarea{border:1px solid var(--line);border-radius:11px;min-height:46px;padding:11px 12px;background:var(--panel);width:100%;max-width:100%;min-width:0}.field input[type=date]{direction:ltr;text-align:start}.field small{color:var(--muted);font-size:11px}.wiz{max-width:760px;margin:auto;display:grid;gap:18px}.wizsteps{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}.wizsteps span{height:5px;border-radius:5px;background:var(--line)}.wizsteps .current,.wizsteps .done{background:var(--accent2)}.wizbody{padding:26px;min-height:320px;display:grid;gap:18px;align-content:start}.wizbody h2{font-size:24px}.wizfooter{display:flex;align-items:center;gap:8px;justify-content:space-between}.fieldgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.fieldgrid .full{grid-column:1/-1}.stepsmall{font-size:12px;color:var(--muted)}.warning{background:var(--goldbg);color:var(--gold);padding:13px;border-radius:12px;display:flex;gap:10px;align-items:flex-start;font-size:12px}.error{color:var(--danger);font-size:13px}.reviewcard{display:grid;gap:12px;max-width:690px}.reviewcard .amount{font-size:32px}.reviewcard .rline{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.reviewcard .rline span:first-child{color:var(--muted)}.reviewcard .actions{display:flex;gap:8px;flex-wrap:wrap}.reviewcard .actions .primary{flex:1}.checkbox{accent-color:var(--accent2);width:18px;height:18px}.reviewhead{display:flex;gap:10px;align-items:center}.overlay{position:fixed;inset:0;background:#0e241c80;z-index:20;display:flex;align-items:center;justify-content:center;padding:16px}.modal{background:var(--panel);width:min(100%,570px);max-height:90dvh;overflow:auto;border-radius:24px;padding:25px;box-shadow:0 20px 80px #0004;display:grid;gap:18px}.modalhead{display:flex;justify-content:space-between;align-items:center}.modalhead .iconbtn{flex:none}.toast{position:fixed;bottom:22px;inset-inline-start:50%;transform:translateX(-50%);background:#234b3d;color:#fff;z-index:30;border-radius:12px;padding:12px 18px;max-width:min(95%,550px);font-size:13px;box-shadow:0 8px 20px #0003}.bottomnav{display:none}.empty{padding:36px 10px;text-align:center;color:var(--muted);display:grid;justify-items:center;gap:10px}.pillstrip{display:flex;gap:8px;flex-wrap:wrap}.pillstrip button.active{background:var(--accent);color:var(--on)}.docpreview{background:var(--soft);padding:20px;display:grid;gap:12px;border-radius:15px}.docpaper{background:var(--panel);border:1px solid var(--line);padding:18px;border-radius:6px;display:grid;gap:8px}.barrow{display:grid;gap:6px}.barrow .bar{height:14px;background:var(--soft);border-radius:6px;overflow:hidden;display:flex}.barrow .bar i{height:100%;display:block}.assist-note{font-size:11px;color:var(--muted);text-align:center;padding:6px}.table{width:100%;border-collapse:collapse;font-size:13px}.table td,.table th{text-align:start;border-bottom:1px solid var(--line);padding:12px 7px}.table th{color:var(--muted);font-size:11px}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-overlay{display:none}
@media(max-width:1150px){.layout{grid-template-columns:206px minmax(0,1fr)}.sidebar{padding:20px 12px}.content{padding:25px 25px 42px}.top{padding:0 22px}.hero h1{font-size:32px}}
@media(max-width:740px){.layout{display:block}.sidebar{display:none}.top{height:64px;padding:0 13px}.mobilebrand{display:flex;gap:8px;align-items:center}.mobilebrand .brandmark{width:32px;height:32px;border-radius:11px}.mobilebrand .brandmark .icon{width:19px;height:19px}.mobilebrand .brandname{font-size:15px}.headtitle{display:none}.topactions{gap:0}.iconbtn{width:38px;height:38px}.demo{font-size:9px;padding:5px 7px}.content{padding:20px 14px 98px}.home{gap:18px}.hero{padding:4px 0 0;gap:9px}.hero h1{font-size:30px}.hero p{font-size:12px}.hero .brandmark{width:40px;height:40px;border-radius:14px}.summarygrid{grid-template-columns:1fr}.hero-stat{padding:16px}.hero-stat .amount{font-size:34px}.next{padding:13px 15px;gap:7px}.next .event .small{font-size:12px}.next .event .tiny{font-size:10px}.panel{padding:16px;border-radius:18px}.prompt{padding:10px;min-height:59px;gap:8px}.prompt b{font-size:12px}.prompt .icon{width:19px;height:19px}.prompt .arrow{display:none}.promptgrid{gap:8px}.composer{bottom:76px;padding:7px 0;background:var(--bg)}.composebox{padding:9px 12px;border-radius:19px}.composebox textarea{min-height:37px}.assist-note{font-size:10px}.bottomnav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;background:var(--panel);border-top:1px solid var(--line);padding:7px 4px max(8px,env(safe-area-inset-bottom));z-index:10;box-shadow:0 -6px 24px rgba(10,30,20,.05)}.bottomnav button{min-height:56px;display:grid;justify-items:center;align-content:center;gap:4px;color:var(--muted);font-size:10px;padding:4px 0;position:relative}.bottomnav button.active{color:var(--accent);font-weight:750}.bottomnav button.active:before{content:'';position:absolute;top:-7px;height:3px;width:26px;background:var(--accent);border-radius:0 0 3px 3px}.bottomnav .icon{width:23px;height:23px}.sectionhead{margin-bottom:15px}.sectionhead h1{font-size:25px}.sectionhead p{font-size:12px}.sectionhead .btn{font-size:12px;padding:9px 10px}.stafflist{grid-template-columns:1fr}.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}.wizbody{min-height:270px;padding:18px}.fieldgrid{grid-template-columns:1fr}.fieldgrid .full{grid-column:auto}.wizfooter{flex-wrap:wrap}.wizfooter .btn{font-size:12px;padding:9px 12px}.modal{padding:18px;border-radius:20px;max-height:85dvh}.overlay{align-items:flex-end;padding:8px}.toast{bottom:88px}.profilecols{grid-template-columns:1fr}.reviewcard .actions .btn{flex:auto}.reviewcard .actions .primary{flex:1}.menu-overlay{display:grid;gap:4px}.amount{font-size:26px}.table{font-size:12px}.table td,.table th{padding:10px 4px}.demo span{display:inline}.mobilehide{display:none}}
@media(max-width:360px){.content{padding-inline:11px}.top{padding-inline:9px}.topactions .iconbtn{width:33px}.brandname{font-size:13px}.prompt b{font-size:11px}.grid2{gap:8px}.hero h1{font-size:27px}.staffcard{padding:13px}.amount{font-size:23px}.demo{display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

html[dir=rtl] .ico-chev,html[dir=rtl] .ico-back{transform:scaleX(-1)}
@media(max-width:740px){.home{gap:12px}.home .hero>.brandmark{display:none}.hero{padding-top:0;gap:5px}.hero h1{font-size:28px}.hero p{line-height:1.6}.summarygrid{gap:8px}.hero-stat{padding:13px 15px;gap:7px}.hero-stat .amount{font-size:30px}.hero-stat .tileicon{width:35px;height:35px}.next{padding:10px 13px;gap:4px}.next .event:last-child{display:none}.next .event .tiny{display:none}.prompt{min-height:51px}.home:has(.hero) .composer{position:relative;bottom:auto;margin-top:0}.content:has(.hero){padding-bottom:86px}.composebox textarea{min-height:33px;resize:none}.home:has(.hero) .assist-note{padding:4px}.home:has(.hero) .composebox{padding:8px 12px}.home:has(.hero) .send{width:38px;height:38px}}

/* Apple-inspired design system; no external assets */
:root{--bg:#f2f2f7;--panel:#fff;--soft:#e9edf6;--text:#1c1c1e;--muted:#62626a;--line:#dedee5;--accent:#0864d6;--accent2:#20964d;--on:#fff;--gold:#965000;--goldbg:#fff1dc;--danger:#bf3038;--shadow:0 2px 9px rgba(25,25,35,.035);--radius:24px;letter-spacing:-.01em}
body.dark{--bg:#101012;--panel:#1c1c1e;--soft:#2c2c35;--text:#f5f5f7;--muted:#b0b0ba;--line:#38383f;--accent:#78b3ff;--accent2:#37bf68;--on:#10151d;--gold:#ffb65e;--goldbg:#362819;--danger:#ff8d94;--shadow:none}
.brandmark{background:var(--accent);color:var(--on);border-radius:13px}.hero .brandmark{display:none}.top{height:68px;background:var(--bg);border-bottom:0}.sidebar{border:0;padding:24px 18px;background:var(--panel)}.navitem{border-radius:11px;font-size:14px}.navitem.active{background:var(--soft)}.panel{border:0;border-radius:24px;box-shadow:var(--shadow)}.home{gap:18px;max-width:960px}.apple-hero{padding:0;gap:3px}.apple-hero h1{font-size:clamp(30px,4vw,42px);letter-spacing:-.03em}.eyebrow{letter-spacing:.04em}.assistantpanel{display:grid;gap:15px;padding:22px}.assistantpanel h2{font-size:20px}.assistantpanel .tileicon{width:46px;height:46px}.ai-icon{background:#e4efff;color:#0864d6}.dark .ai-icon{background:#1c3658;color:#92c2ff}.assistantpanel .composer{position:relative;bottom:auto;margin:0;padding:0;background:none}.assistantpanel .composebox{background:var(--bg);border:1px solid var(--line);box-shadow:none;border-radius:20px}.assistantpanel .assist-note{padding:6px 0 0}.promptgrid{gap:6px}.prompt{min-height:44px;border:0;background:var(--bg);padding:10px 12px;border-radius:13px}.prompt b{font-size:12px;font-weight:600}.prompt .icon{color:var(--accent)}.hero-stat{gap:9px;padding:20px}.hero-stat .amount{font-size:38px}.hero-stat .iconbtn{width:36px;height:36px}.summarygrid{grid-template-columns:1.5fr 1fr;align-items:start}.mini-staff{border-top:1px solid var(--line);margin-top:3px}.mini-staff .item{padding:9px 0}.mini-staff .item:last-child{padding-bottom:0}.tileicon.blue,.tileicon.violet,.tileicon.orange{color:white}.tileicon.blue{background:#176ce0}.tileicon.violet{background:#8b4fc4}.tileicon.orange{background:#b96604}.mini-staff .tileicon,.next .tileicon{width:34px;height:34px;border-radius:10px}.mini-staff .icon,.next .tileicon .icon{width:18px;height:18px}.next .event{padding-top:10px;border-top:1px solid var(--line)}.next .event .tileicon .icon{color:#fff}.linktext{color:var(--accent);font-weight:650}.btn{border-radius:13px}.bottomnav{box-shadow:none}.bottomnav button.active:before{display:none}.chatbubble{background:var(--soft)}.composebox{box-shadow:var(--shadow)}.sectionhead h1{font-size:32px}.staffcard,.reviewcard{border:1px solid transparent}.staffcard:hover{border-color:var(--accent)}
@media(max-width:1150px){.sidebar{padding:20px 12px}.summarygrid{grid-template-columns:1fr}.home{gap:14px}}
@media(max-width:740px){.top{height:58px}.content{padding:13px 15px 96px}.home{gap:12px}.apple-hero h1{font-size:32px}.apple-hero p{font-size:12px}.assistantpanel{padding:15px;gap:10px}.assistantpanel .tileicon{width:40px;height:40px}.assistantpanel h2{font-size:18px}.assistantpanel .composebox{padding:8px 11px}.assistantpanel .composebox textarea{min-height:31px}.assistantpanel .assist-note{font-size:9px}.promptgrid{gap:6px}.prompt{min-height:42px;padding:7px 8px}.prompt b{font-size:11px}.prompt .icon{width:16px;height:16px}.hero-stat{padding:15px;gap:7px}.hero-stat .amount{font-size:32px}.mini-staff .item{padding:7px 0}.mini-staff .tileicon{width:30px;height:30px}.next{padding:14px;gap:7px}.next .event:last-child{display:flex}.next .event .tiny{display:block}.panel{border-radius:22px}.bottomnav{padding-top:4px}.bottomnav button{min-height:53px}.bottomnav button.active{color:var(--accent)}.sectionhead h1{font-size:27px}}
@media(max-width:360px){.content{padding-inline:11px}.prompt b{font-size:10px}.apple-hero h1{font-size:29px}}
/* Application extensions: keep the approved visual language. */
.boot-screen{min-height:100dvh;display:grid;place-items:center;color:var(--muted)}
.skip-link{position:fixed;top:-80px;inset-inline-start:12px;background:var(--panel);padding:12px;z-index:100;border-radius:12px}.skip-link:focus{top:12px}
.auth-layout{min-height:100dvh;display:grid;place-items:center;padding:24px 16px;background:var(--bg)}.auth-card{width:min(100%,460px);padding:32px}.auth-card .brandmark{width:54px;height:54px}.auth-card h1{font-size:30px}.auth-card .auth-intro{display:grid;gap:10px;margin:20px 0 24px}.auth-footer{display:flex;justify-content:center;gap:8px;margin-top:20px}
.connection-banner{background:var(--goldbg);color:var(--gold);padding:10px 18px;font-size:12px;text-align:center}.empty .btn{margin-top:8px}.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.spaced{margin-top:16px}.nowrap{white-space:nowrap}.soft .amount{font-size:24px}.align-start{align-items:flex-start}.overline{font-size:11px;font-weight:650;color:var(--muted);margin-bottom:6px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.field input:invalid:not(:placeholder-shown){box-shadow:none}.field textarea{resize:vertical;min-height:88px}.field input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--accent)}.field.inline-check{display:flex;align-items:center}.field .mono,input.mono{direction:ltr;text-align:left;font-family:ui-monospace,monospace}.form-error{background:var(--goldbg);padding:12px 14px;border-radius:12px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.form-error:empty{display:none}.error-code{font-size:11px;color:var(--muted)}
.table-wrap{width:100%;overflow:auto}.table td{vertical-align:top}.table .btn{white-space:nowrap}.transactions-list .item{align-items:flex-start}.records-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.card-actions{display:flex;gap:8px;flex-wrap:wrap}.card-actions .btn{flex:1}.action-strip{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.action-strip .btn{white-space:nowrap}.filterbar{display:flex;gap:10px;flex-wrap:wrap;align-items:end}.filterbar .field{flex:1;min-width:130px}.filterbar input,.filterbar select{min-height:42px;padding:8px 10px}.search-box{width:100%;padding:11px 14px;border:1px solid var(--line);border-radius:14px;background:var(--panel);margin-bottom:16px;min-height:44px}
.reviewcard{max-width:none}.reviewcard .reviewhead b{overflow-wrap:anywhere}.review-selection{display:flex;gap:8px;align-items:center;font-size:12px}.draft-payload{display:grid;gap:9px}.draft-payload .rline{align-items:flex-start}.draft-payload .rline b{max-width:65%;text-align:end;overflow-wrap:anywhere}.status-badge{margin-inline-start:auto}.status-danger{color:var(--danger)}.review-note{font-size:12px;color:var(--muted);overflow-wrap:anywhere}.conflict-panel{border:1px solid var(--gold);background:var(--goldbg);padding:13px;border-radius:13px;color:var(--gold);font-size:12px}.allocation-list{display:grid;gap:6px}.allocation-list .rline{font-size:12px}.approved-note{color:var(--accent2);font-weight:650}
.modal{width:min(100%,620px);max-height:calc(100dvh - 32px);overscroll-behavior:contain}.modal.wide-modal{width:min(100%,760px)}.modalhead h2{font-size:21px}.modal>form{display:grid;gap:16px}.overlay{background:rgba(0,0,0,.38);backdrop-filter:blur(3px)}.dialog-help{font-size:12px;color:var(--muted)}.modal-bottom{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.modal-bottom .primary{flex:1}.checkbox-row{display:flex;align-items:flex-start;gap:8px;font-size:12px}.checkbox-row input{width:18px;height:18px;flex:none;accent-color:var(--accent)}.toast{background:#1c1c1e;color:#fff;transform:translateX(50%);inset-inline-start:50%;text-align:center}.toast.error-toast{background:#7f2228}html[dir=ltr] .toast{transform:translateX(-50%)}
.profile-nav{display:grid;gap:0}.profile-nav button{font-size:14px}.profile-title .avatar{width:64px;height:64px}.wizard-save{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}.wizard-save.unsaved{color:var(--gold)}.wizard-review{display:grid;gap:12px}.wizard-review .rline{display:flex;justify-content:space-between;gap:15px;font-size:13px}.wizard-review .rline b{text-align:end;overflow-wrap:anywhere}.wizard-review h3{margin-top:6px}.wizfooter{padding-bottom:10px}.wizard-status-line{min-height:20px}.info-line{display:flex;gap:10px;align-items:flex-start;font-size:12px;color:var(--muted)}.info-line .icon{color:var(--accent);flex:none}.settings-grid{display:grid;grid-template-columns:1fr;gap:16px}.settings-grid h2{font-size:20px}.settings-grid .item:last-child{padding-bottom:0}.settings-status{font-size:12px;color:var(--muted)}.token-display{direction:ltr;text-align:left;overflow-wrap:anywhere;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg);font:12px ui-monospace,monospace}.permissions-table label{display:flex;align-items:center;gap:5px;white-space:nowrap}.permissions-table input{accent-color:var(--accent)}.mini-label{font-size:11px;font-weight:650;color:var(--muted)}
.thread-list{display:grid;gap:8px}.thread-item{display:flex;align-items:center;gap:10px}.thread-item button:first-child{flex:1;text-align:start}.thread-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chatwrap{min-height:60px}.message-meta{font-size:10px;color:var(--muted)}.source-result{display:grid;gap:8px;background:var(--soft);border-radius:16px;padding:15px}.source-result .amount{font-size:28px}.composer textarea{font-size:15px}.ai-unavailable{font-size:12px;padding:12px 14px;border-radius:14px;background:var(--soft);color:var(--muted);display:flex;gap:10px;align-items:center}.ai-unavailable button{color:var(--accent);font-weight:650}.topactions .demo{font-size:10px}.report-bars{display:grid;gap:18px}.report-bars .barrow b{font-size:12px}.loan-balance{color:var(--gold)}.doc-meta{display:grid;gap:5px;font-size:12px;color:var(--muted)}.file-label{display:block;border:1px dashed var(--line);padding:18px;border-radius:14px;cursor:pointer;background:var(--bg)}.file-label input{display:block;max-width:100%;font-size:12px;margin-top:8px}.document-version{font-size:11px;color:var(--muted)}.file-url{word-break:break-word}.loading-button{opacity:.65}.clear-button{color:var(--danger)}
@media(max-width:900px){.records-grid{grid-template-columns:1fr}.top .demo{display:none}.sectionhead{gap:10px}.sectionhead .btn{flex:none}}
@media(max-width:740px){.auth-card{padding:24px}.sectionhead{align-items:flex-start}.sectionhead h1{font-size:26px}.sectionhead p{max-width:260px}.panel .amount{font-size:27px}.topactions .iconbtn{width:36px;height:40px}.records-grid{gap:12px}.filterbar{gap:8px}.filterbar .field{min-width:125px}.modal{max-height:calc(100dvh - 24px);padding:18px}.overlay{padding:8px}.modal .grid2{grid-template-columns:1fr}.modalhead h2{font-size:20px}.reviewcard .rline{gap:8px}.reviewcard .amount{font-size:28px}.status-badge{font-size:10px}.wizard-review .rline{font-size:12px}.action-strip .btn{padding:9px 12px;min-height:42px}.profile-title{align-items:flex-start}.profile-title .avatar{width:50px;height:50px}.profile-title h2{font-size:20px}.assistantpanel .composebox textarea{min-height:44px}.prompt{min-height:46px}.bottomnav button{min-height:54px}.btn.sm{min-height:40px}.mobile-full{width:100%}.hero-stat .amount{font-size:32px}.auth-footer .btn{min-height:44px}}
@media(max-width:380px){.topactions .iconbtn{width:32px}.mobilebrand .brandname{font-size:14px}.content{padding-inline:12px}.sectionhead{flex-wrap:wrap}.sectionhead h1{font-size:25px}.sectionhead .btn{margin-inline-start:auto}.action-strip{gap:6px}.action-strip .btn{font-size:11px;padding:8px 10px}.grid3 .panel{padding:14px 12px}.grid3 .amount{font-size:23px}.reviewhead{gap:8px}.reviewhead .tileicon{width:34px;height:34px}.modal{padding:16px}.modalhead h2{font-size:19px}}


.synthetic-mobile-note{display:none}@media(max-width:740px){.synthetic-mobile-note{display:block;text-align:center;font-size:10px;color:var(--muted);padding:3px 12px 6px}}

.period-cards{display:none}.period-table-dates{display:flex;flex-wrap:wrap;gap:3px 6px;align-items:center}.period-table-dates time{display:inline-block}.period-card{display:grid;gap:11px;padding:17px 0;border-bottom:1px solid var(--line)}.period-card:last-child{border-bottom:0;padding-bottom:0}.period-date-range{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.date-range-value{display:inline-block;white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12px}.period-amount{font-size:22px;font-weight:720;letter-spacing:-.035em;line-height:1.4}.period-card .statbox{padding:10px 12px}.period-card .grid2{gap:8px}.period-card .row>b{overflow-wrap:anywhere}@media(max-width:600px){.period-table{display:none}.period-cards{display:grid}.period-card .btn{min-height:40px}.period-card .statbox{border-radius:12px}.period-amount{font-size:20px}}

.voice-status{display:flex;gap:8px;align-items:center;padding:9px 4px;font-size:11px;color:var(--muted)}.voice-record-dot{width:9px;height:9px;background:var(--danger);border-radius:50%;flex:none}.voice-status .btn{font-size:11px;min-height:34px;padding:6px 9px}.composebottom>.row{flex-wrap:wrap;gap:0}.composebottom .btn.sm{font-size:11px;padding:7px 9px;min-height:36px}

.renewal-step-list{display:grid;gap:6px;margin-top:9px}.clause-change{padding:14px 0;border-top:1px solid var(--line)}.clause-change:first-child{border-top:0}.clause-change p,.source-result p,.modal .soft p{overflow-wrap:anywhere;white-space:pre-wrap}.modal .checkbox-row{line-height:1.6}.modal .soft .field input,.modal .soft .field textarea,.modal .soft .field select{background:var(--panel)}

/* Optional profile originals use the established avatar and modal geometry. */
.avatar{overflow:hidden}.avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}.profile-original-preview{display:block;width:160px;height:160px;max-width:100%;object-fit:contain;border-radius:16px;border:1px solid var(--line);background:var(--soft)}.profile-original-preview.small-preview{width:64px;height:64px;border-radius:12px}.modal .soft>details summary{cursor:pointer}.modal input[type="time"]{min-width:0;max-width:100%;direction:ltr}.reviewcard img{margin:8px 0}.reviewcard:focus{outline:2px solid var(--accent);outline-offset:4px}

/* Read-only Smart Audit, responsive Apple-style details. */
.audit-list,.audit-record,.audit-change,.audit-value,.audit-item .grow{min-width:0}
.audit-item{width:100%;text-align:start;overflow-wrap:anywhere}
.audit-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-top:6px}
.audit-value{overflow-wrap:anywhere;white-space:pre-wrap;font-size:13px}
.audit-change{margin:10px 0}
.audit-nested{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}
.audit-record{margin-top:10px}
.audit-value .money{font-size:14px}

/* Private chat history and selected draft correction. */
.thread-item .thread-title{display:block;white-space:normal;overflow-wrap:anywhere;text-align:start}
.thread-item .btn{min-width:0;text-align:start;flex-direction:column;align-items:flex-start}
.correction-target{margin-bottom:8px;min-width:0;overflow-wrap:anywhere}
.rline{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.rline>span{min-width:0;overflow-wrap:anywhere}.rline>b{max-width:65%;text-align:end;overflow-wrap:anywhere}

/* Local, glyph-only fallback. Saudi Riyal Font © Emran Alhaddad;
 * SIL OFL 1.1, see saudi-riyal-LICENSE.txt. */
@font-face{font-family:HomeStaffRiyal;src:url('/static/saudi-riyal.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap;unicode-range:U+20C1}
@font-face{font-family:HomeStaffRiyal;src:url('/static/saudi-riyal-bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap;unicode-range:U+20C1}
.money{direction:ltr;unicode-bidi:isolate;white-space:nowrap}
