/* Shared adult visual language. No selectors apply to Nojoumi's child mode. */
.ghaly-unified{--ga-surface:#fff;--ga-ink:#172f3c;--ga-muted:#637985;--ga-brand:#087f83;--ga-wash:#e6f5f3;--ga-bg:#f3f7fa;--ga-line:#e2eaf0;color-scheme:light}
.ghaly-unified[data-ga-theme=dark]{--ga-surface:#142633;--ga-ink:#e3edf4;--ga-muted:#a9bbc6;--ga-brand:#51c6c2;--ga-wash:#1b3d43;--ga-bg:#0d1821;--ga-line:#2d4351;--ga-shadow:0 5px 22px #0002;color-scheme:dark;background:var(--ga-bg)!important}
.ghaly-unified :is(.ghaly-font-toggle,.ghaly-gear,.web-refresh,#web-notifications){display:none!important}
.ghaly-unified .ga-unified-settings-toggle{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:10px;background:transparent!important;color:var(--ga-muted)!important;cursor:pointer}
.ghaly-unified .ga-unified-settings-toggle:hover{background:var(--ga-wash)!important;transform:none}
.ghaly-unified .ghaly-brand-link{max-width:calc(100% - 92px)}
.ga-parent-toolbar[hidden]{display:none!important}
.ga-parent-addon[hidden]{display:none!important}
.ghaly-unified .ga-parent-toolbar{position:fixed;top:0;left:0;right:0;z-index:9998;height:48px;background:var(--ga-surface)!important;border-bottom:1px solid var(--ga-line);display:flex;align-items:center;direction:rtl}
.ghaly-unified .ga-preferences{box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto;direction:rtl;color:var(--ga-ink);background:var(--ga-surface);border:1px solid var(--ga-line);border-radius:18px;padding:16px;font:14px/1.7 Ghaly,'Segoe UI',sans-serif;box-shadow:0 20px 80px #0003}
.ga-preferences::backdrop{background:#0b1e2c80;backdrop-filter:blur(4px)}
.ghaly-unified :is(.modal,.ga-settings,.web-settings){z-index:10020!important}
.ga-preferences-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:8px}
.ghaly-unified .ga-preferences-heading h2{font-size:20px!important;line-height:1.5;margin:0!important;color:var(--ga-ink)}
.ga-preferences-heading small{font:600 11px/1.5 Ghaly,sans-serif;color:var(--ga-muted)}
.ghaly-unified .ga-preferences-close{--ghaly-font-scale:1;padding:0!important;width:36px;height:36px;min-height:36px;border:0;border-radius:10px;background:var(--ga-bg)!important;color:var(--ga-muted)!important;font:26px 'Segoe UI',sans-serif;cursor:pointer}
.ga-preferences fieldset{border:0;border-top:1px solid var(--ga-line);padding:10px 0;margin:0;min-width:0}
.ga-preferences legend{font:700 14px Ghaly,sans-serif;padding:0 0 0 12px;color:var(--ga-ink)}
.ga-preferences fieldset p{font:12px/1.6 Ghaly,sans-serif;color:var(--ga-muted);margin:0 0 6px}
.ga-choice-group{display:flex;gap:4px;flex-wrap:wrap}
.ghaly-unified .ga-choice-group>button{flex:1;min-width:0;min-height:36px;padding:6px 7px!important;border:1px solid var(--ga-line)!important;border-radius:10px;background:var(--ga-bg)!important;color:var(--ga-ink)!important;font:600 13px/1.5 Ghaly,sans-serif!important;cursor:pointer;white-space:normal;transform:none!important}
.ghaly-unified .ga-choice-group>button[aria-checked=true]{background:var(--ga-wash)!important;color:var(--ga-brand)!important;border-color:var(--ga-brand)!important;box-shadow:inset 0 0 0 1px var(--ga-brand)}
.ga-preference-actions{border-top:1px solid var(--ga-line);padding-top:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 6px}
.ghaly-unified .ga-preference-action{min-height:34px;border:0;background:var(--ga-bg)!important;color:var(--ga-ink)!important;text-align:right;padding:6px 8px!important;border-radius:9px;font:600 13px/1.5 Ghaly,sans-serif!important;cursor:pointer;transform:none!important}
.ghaly-unified .ga-preference-action:hover{background:var(--ga-bg)!important}
.ghaly-unified :is(button,a,input,select):focus-visible{outline:3px solid var(--ga-brand);outline-offset:3px}
/* Parent mode uses the Ghaly palette and compact cards; children's styles remain native. */
.ghaly-unified:has(body.parent-app){font-size:calc(16px * var(--ghaly-font-scale,1))!important}
.ga-unified-settings-toggle[hidden]{display:none!important}
.ghaly-unified body.parent-app{--ink:var(--ga-ink)!important;--paper:var(--ga-bg)!important;--purple:var(--ga-brand)!important;--surface:var(--ga-surface)!important;--soft:var(--ga-wash)!important;--edge:var(--ga-line)!important;--line:var(--ga-line)!important;--muted:var(--ga-muted)!important;font:14px/1.6 Ghaly,'Segoe UI',sans-serif!important;background:var(--ga-bg)!important;background-image:none!important;padding-top:48px!important;padding-bottom:76px!important}
.ghaly-unified body.parent-app header{max-width:1000px;box-sizing:border-box;padding:10px 14px!important;top:auto!important;position:relative!important}
.ghaly-unified body.parent-app header>div:first-child{display:block!important}
.ghaly-unified body.parent-app #headerActions{justify-content:flex-end;gap:8px}
.ghaly-unified body.parent-app .parent-identity>span{max-width:90px}
.ghaly-unified body.parent-app .brand{font-size:0!important;display:flex!important;align-items:center;gap:8px;white-space:nowrap}
.ghaly-unified body.parent-app .brand:after{content:'نجومي · الآباء';font:800 17px Ghaly,sans-serif;color:var(--ga-ink)}
.ghaly-unified body.parent-app .brand>span{display:none!important}
.ghaly-unified body.parent-app :is(.parent-settings,.parent-interfaces){display:none!important}
.ghaly-unified body.parent-app main{padding:6px 14px 20px!important;max-width:1000px}
.ghaly-unified body.parent-app :is(.panel,.admin-child-card,.adult-fold){border:1px solid var(--ga-line)!important;border-radius:15px!important;background:var(--ga-surface)!important;padding:12px!important;box-shadow:none!important;margin-bottom:10px;color:var(--ga-ink)}
.ghaly-unified body.parent-app :is(header,main) :is(h1,h2,h3){font-family:Ghaly,sans-serif!important;color:var(--ga-ink)!important;line-height:1.65}
.ghaly-unified body.parent-app :is(header,main) :is(h1,h2){font-size:17px!important}.ghaly-unified body.parent-app :is(header,main) h3{font-size:15px!important}
.ghaly-unified body.parent-app :is(.hint,.muted,.points,.audit){font-size:12px!important;color:var(--ga-muted)!important}
.ghaly-unified body.parent-app :is(button,.small){border-radius:10px;min-height:36px;padding:7px 11px;font-size:13px;line-height:1.5}
.ghaly-unified body.parent-app .primary{background:#087f83!important;color:#fff!important}
.ghaly-unified body.parent-app :is(input,select){border:1px solid var(--ga-line)!important;background:var(--ga-surface)!important;color:var(--ga-ink)!important;min-height:40px;padding:8px 10px;border-radius:10px;font-size:14px}
.ghaly-unified body.parent-app .parent-stat-strip{border-color:var(--ga-line);background:var(--ga-surface);padding:8px 12px}
.ghaly-unified body.parent-app .parent-stat-strip b{font-size:19px;color:var(--ga-brand)}
.ghaly-unified body.parent-app .parent-navigation{background:var(--ga-surface)!important;border-color:var(--ga-line)!important;border-radius:16px;gap:5px}
.ghaly-unified body.parent-app .parent-navigation button{font:600 12px Ghaly,sans-serif;color:var(--ga-muted);background:transparent!important}
.ghaly-unified body.parent-app .parent-navigation button.active{background:var(--ga-wash)!important;color:var(--ga-brand)!important}
.ghaly-unified body.parent-app :is(.journey,.parent-date>div,.parent-date>summary){background:var(--ga-surface)!important;border-color:var(--ga-line)!important;box-shadow:none}
.ghaly-unified body.parent-app .journey>summary{background:var(--ga-bg)!important}
.ghaly-unified body.parent-app :is(.parent-progress-table,.progress-table-head,.parent-stat-strip){color:var(--ga-muted)}
.ghaly-unified.ghaly-web:has(body.parent-app) body{padding-top:80px!important;padding-bottom:24px!important}
.ghaly-unified.ghaly-web body.parent-app :is(header,main){max-width:1600px!important}
.ghaly-unified.ghaly-web body.parent-app .parent-navigation{position:static!important;display:flex;margin:0 0 16px;border:1px solid var(--ga-line);padding:5px;flex-wrap:wrap}
.ghaly-unified.ghaly-web body.parent-app .parent-navigation button{flex-direction:row;min-height:36px;flex:0 0 auto;padding:7px 14px}
.ghaly-unified.ghaly-web body.parent-app .admin-child-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px}
.ghaly-unified.ghaly-web body.parent-app .journey-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:14px}
/* Dark surfaces and semantic states across all roles. */
.ghaly-unified[data-ga-theme=dark] body{background:var(--ga-bg)!important;color:var(--ga-ink)!important}
.ghaly-unified[data-ga-theme=dark] :is(.card,.panel,.metric,.summary-card,.stat,.ghaly-font-control,.ghaly-font-menu,.ghaly-app-menu,.ghaly-switch-panel,.ghaly-switch-role,.role,.sheet,.dialog,.ga-settings,.ga-auth>div,.web-sidebar,.web-login-card,.web-settings,.ga-disclosure,.account-tile,.parent-stat-strip){background:var(--ga-surface)!important;border-color:var(--ga-line)!important;color:var(--ga-ink)!important;box-shadow:none!important}
.ghaly-unified[data-ga-theme=dark] .metric:first-child{background:linear-gradient(125deg,#143b4b,#09666a)!important;color:white!important}
.ghaly-unified[data-ga-theme=dark] :is(h1,h2,h3,.title,.section-title,.amount,.account-balance,.account-name,.entry-note,.web-logo,.web-home,.web-role-link){color:var(--ga-ink)!important}
.ghaly-unified[data-ga-theme=dark] :is(.meta,.muted,.sub,.label,label,.report,.section-total,.bar-label small,.tx-meta,.points,.hint,.account-caption,.account-id,.web-account>span,.web-login p,.web-settings p){color:var(--ga-muted)!important}
.ghaly-unified[data-ga-theme=dark] :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.control){background:#10212e!important;color:var(--ga-ink)!important;border-color:var(--ga-line)!important;box-shadow:none!important}
.ghaly-unified[data-ga-theme=dark] :is(.filter-box,.seg,.segments,.presets,.status>div,.ga-search,.ga-filters button,.web-home,.web-role-link:hover,.web-account button:hover,.ga-disclosure>summary){background:#1b303e!important;color:var(--ga-muted)!important;border-color:var(--ga-line)!important}
.ghaly-unified[data-ga-theme=dark] :is(.btn,button.primary,.primary,.web-login-card button){background:#087f83!important;color:white!important}
.ghaly-unified[data-ga-theme=dark] :is(.btn.secondary,.btn.gray,.secondary,.preset,.chips .btn,.segments .btn,.parent-week-actions button){background:#243c49!important;color:#c8dbe5!important;box-shadow:none!important}
.ghaly-unified[data-ga-theme=dark] :is(.btn.danger,.btn.red,.danger,button.danger){background:#482b37!important;color:#ffb4c0!important}
.ghaly-unified[data-ga-theme=dark] :is(.btn.amber,.btn.gold){background:#493c28!important;color:#f7d394!important}
.ghaly-unified[data-ga-theme=dark] :is(.btn.active,.segments .active,.preset.active,.seg>button.active,.ga-filters button[aria-pressed=true],.web-role-link[aria-current=page],.btn.line-state.selected,.btn[data-quick].selected:disabled){background:var(--ga-wash)!important;color:#a2ede4!important;border-color:#387a79!important}
.ghaly-unified[data-ga-theme=dark] :is(body>nav.tabs,body>nav:has(button.nav)){background:var(--ga-surface)!important;border-color:var(--ga-line)!important}
.ghaly-unified[data-ga-theme=dark] :is(body>nav.tabs,body>nav:has(button.nav))>button.active{background:var(--ga-wash)!important;color:#a2ede4!important}
.ghaly-unified[data-ga-theme=dark] :is(.ga-role-art,.tx-icon,.badge,.pill,.day,.parent-date>summary){background:var(--ga-wash)!important;color:var(--ga-brand)!important}
.ghaly-unified[data-ga-theme=dark] :is(.ghaly-preference-row,.entry,.list-row,.reward,.ledger-entry,.web-account,table,td,th,.table-wrap,.adult-fold,.admin-child-card){border-color:var(--ga-line)!important}
.ghaly-unified[data-ga-theme=dark] :is(.ledger-entry.credit,.entry.credit){background:#153a34!important}.ghaly-unified[data-ga-theme=dark] :is(.ledger-entry.debit,.entry.debit){background:#3c2934!important}
.ghaly-unified[data-ga-theme=dark] :is(th,.empty){background:#1b303e!important;color:var(--ga-muted)!important}
.ghaly-unified[data-ga-theme=dark] :is(.bar-track,.progress){background:#28414e!important}
.ghaly-unified[data-ga-theme=dark] :is(.ga-monetary-positive,.entry.credit .entry-amount){color:#79d9c3!important}.ghaly-unified[data-ga-theme=dark] :is(.ga-monetary-negative,.negative,.entry.debit .entry-amount){color:#ffb4c0!important}
.ghaly-unified[data-ga-theme=dark] :is(.overlay:has(.loader),.ga-auth){background:var(--ga-bg)!important}
.ghaly-unified[data-ga-theme=dark] :is(.loader,.ghaly-switch-head,.ghaly-font-menu button,.ghaly-app-menu button,.ghaly-app-menu a){background:var(--ga-surface)!important;color:var(--ga-ink)!important}
.ghaly-unified[data-ga-theme=dark] .overview-band{background:linear-gradient(125deg,#143b4b,#09666a)!important}
@media(max-width:650px){.ghaly-unified body.parent-app .parent-navigation{position:fixed!important;bottom:0;left:0;right:0;z-index:40;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:5px 6px calc(5px + env(safe-area-inset-bottom));border-radius:16px 16px 0 0}.ghaly-unified body.parent-app .parent-navigation button{font-size:10px;min-height:44px;padding:4px 2px}.ghaly-unified body.parent-app .admin-child-grid{grid-template-columns:1fr}.ghaly-unified.ghaly-web body.parent-app .parent-navigation{position:static!important;display:flex;overflow:auto;flex-wrap:nowrap}.ga-preferences{padding:14px!important}}

.ghaly-unified[data-ga-theme=dark] #ghaly-login{background:#087f83!important;color:white!important}
.ghaly-unified[data-ga-theme=dark] .ghaly-preference-row{background:var(--ga-surface)!important;color:var(--ga-ink)!important}

/* RTL navigation opens from the same edge as its trigger, on every surface. */
.ghaly-unified .ga-navigation-toggle{order:-10!important}
.ghaly-unified .ga-unified-settings-toggle{order:20}
.ghaly-unified .ghaly-switch-panel{position:absolute;inset:0 0 0 auto;box-sizing:border-box;width:min(340px,88vw);height:100dvh;max-height:100dvh;border-radius:0;padding:18px 16px calc(18px + env(safe-area-inset-bottom));overflow:auto}
.ghaly-unified .ghaly-switch-list{grid-template-columns:1fr}
