/* Lightweight global presentation layer; existing navigation and modules stay intact. */
html{--ios-bg:#edf3f8;--ios-text:#18334d;--ios-muted:#52667a;--ios-line:#cbd9e5;--ios-surface-solid:#fff}
html[data-saas-theme="dark"] :is(#appShell,#erphSaasRoot){--ios-bg:#101e2e;--ios-text:#edf6ff;--ios-muted:#b1c1d1;--ios-line:#364b61;--ios-surface-solid:#192c40}
:is(#appShell,#erphSaasRoot){color:var(--ios-text);background:var(--ios-bg)}
html[data-saas-theme="dark"] :is(#appShell,#erphSaasRoot) :is(.erph-card,.erph-rph,.ios-soft-card,.erph-modal){background:var(--ios-surface-solid);color:var(--ios-text);border-color:var(--ios-line)}
html[data-saas-theme="dark"] :is(#appShell,#erphSaasRoot) .erph-note{background:#20394c;color:#d9ecf5;border-color:#3f6072}
:is(#appShell,#erphSaasRoot) :is(.v3-command,.erph-shell,.ios-sheet,.ios-soft-card,.erph-card,.erph-rph){border-radius:20px}
:is(#appShell,#erphSaasRoot) :is(button,.v3-tile,.tk-home-event,.erph-tab,.ios-menu-card){transition:transform 160ms ease,opacity 160ms ease,background-color 160ms ease,border-color 160ms ease;touch-action:manipulation}
@media(hover:hover){:is(#appShell,#erphSaasRoot) :is(.v3-tile,.tk-home-event,.ios-menu-card):hover{transform:translateY(-3px)}:is(#appShell,#erphSaasRoot) button:not(:disabled):hover{filter:brightness(1.03)}}
:is(#appShell,#erphSaasRoot) button:not(:disabled):active{transform:scale(.98)}
:is(#appShell,#erphSaasRoot) button:disabled{cursor:wait;opacity:.65}
:is(#appShell,#erphSaasRoot) :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #089eab;outline-offset:3px}
:is(#appShell,#erphSaasRoot) :is(.erph-head,.ios-sheet-head){background:#163550;color:#f4f9ff}
:is(#appShell,#erphSaasRoot) :is(.erph-primary,.tk-home-btn.primary){background:#087f89;color:#fff}
:is(#appShell,#erphSaasRoot) .erph-tab.active{background:#dcf5f3;color:#075e65;border-color:#64c6c3}
html[data-saas-theme="dark"] :is(#appShell,#erphSaasRoot) .erph-tab.active{background:#163f4b;color:#b7f1ed}
:is(#appShell,#erphSaasRoot) :is(.erph-input,.erph-select,.erph-textarea){min-height:44px;border-radius:12px}
#erphSaasRoot .erph-field div{font-size:14px;line-height:1.65}#erphSaasRoot .erph-label{font-size:14px}#erphSaasRoot .erph-note{font-size:14px;line-height:1.6}
:is(#appShell,#erphSaasRoot) .erph-modal{width:min(1100px,calc(100vw - 40px));max-height:90dvh;border-radius:22px;animation:sookModalIn 180ms ease-out}
:is(#appShell,#erphSaasRoot) .erph-tabs{gap:6px;overflow-x:auto;scrollbar-width:thin}
:is(#appShell,#erphSaasRoot) [data-save-state="saving"]{cursor:wait;opacity:.75}:is(#appShell,#erphSaasRoot) [data-save-state="success"]{border-color:#22a576;color:#087349}
.ios-toast{transition:transform 180ms ease,opacity 180ms ease;animation:sookToastIn 180ms ease-out;max-width:min(420px,calc(100vw - 32px));font-size:14px;line-height:1.5;border-radius:14px;box-shadow:0 8px 26px #102c4326}
.ios-toast.ok{background:#e5f6ed;color:#145c3c;border:1px solid #8ecbad}.ios-toast.bad{background:#fff0ef;color:#972c29;border:1px solid #edb1ab}.ios-toast.warn{background:#fff6df;color:#805300;border:1px solid #dcb967}
.sook-skeleton-group{display:grid;gap:12px;padding:12px 0}.sook-skeleton-row{display:flex;gap:14px;padding:18px;border:1px solid var(--ios-line,#cbd9e5);border-radius:16px;background:var(--ios-surface-solid,#fff)}.sook-skeleton-row i{width:40px;height:40px;flex:none;border-radius:12px;background:#dce7ee}.sook-skeleton-row div{flex:1}.sook-skeleton-row b{display:block;height:12px;border-radius:6px;background:#dce7ee;margin:4px 0 10px;width:80%}.sook-skeleton-row b:last-child{width:55%}
html[data-saas-theme="dark"] .sook-skeleton-row :is(i,b){background:#354b60}
.sook-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ios-skeleton{animation:none!important}
.erph-rph{position:relative}.erph-reflection-confirmed{position:absolute;right:12px;top:12px;z-index:2;display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:12px;background:#e5f6ed;color:#145c3c;font-weight:700;box-shadow:0 4px 14px #145c3c22;animation:sookCheckIn 180ms ease-out}
.erph-reflection-confirmed[hidden]{display:none!important}
.erph-rph.erph-reflection-completing{animation:sookRphExit 400ms ease-in forwards;pointer-events:none}.erph-reflection-completing:after{display:none}
.erph-completed-records>summary{min-height:44px}.erph-completed-records[hidden]{display:none!important}
@keyframes sookModalIn{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:none}}
@keyframes sookToastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes sookCheckIn{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}
@keyframes sookRphExit{to{opacity:0;transform:translateY(-18px)}}
@media(min-width:761px) and (max-width:1023px){:is(#appShell,#erphSaasRoot) .saas-wrap{width:96%;padding:18px}:is(#appShell,#erphSaasRoot) .v3-mainline{grid-template-columns:minmax(0,1fr) 200px}:is(#appShell,#erphSaasRoot) .v3-bento{grid-template-columns:repeat(2,minmax(0,1fr))}:is(#appShell,#erphSaasRoot) .v3-tile{grid-column:auto!important;grid-row:auto!important}}
@media(max-width:760px){:is(#appShell,#erphSaasRoot) .erph-modal{width:calc(100vw - 16px);max-height:94dvh;border-radius:18px}:is(#appShell,#erphSaasRoot) .erph-toolbar{gap:8px;flex-wrap:wrap}:is(#appShell,#erphSaasRoot) :is(.erph-btn,.erph-tab){min-height:44px}.ios-toast{font-size:14px}}
@media(prefers-reduced-motion:reduce){:is(#appShell,#erphSaasRoot) *, .ios-toast{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

