/* Web5.1.0. Default appearance only; holiday palettes remain fixed. */
:root{--p303-page:#f8fafc;--p303-surface:#fff;--p303-soft:#f1f5f9;--p303-line:#dce5ee;--p303-text:#203248;--p303-muted:#64748b;--p303-focus:#1d70c4}
html[data-p303-color=dark]{--p303-page:#0b1220;--p303-surface:#131e30;--p303-soft:#1c2a40;--p303-line:#34445e;--p303-text:#e4edf9;--p303-muted:#a6b5ca;--p303-focus:#77b6ff;color-scheme:dark;background:#0b1220}
html[data-p303-color=dark] body.p303-house{--house-paper:#0b1220;--house-ink:#e4edf9;--house-green:#83baff;--house-lime:#1c2a40;background:#0b1220!important;color:#e4edf9}
html[data-p303-color=dark] body[data-seasonal=halloween]{--season-paper:#0b1220!important;--season-soft:#2b251e!important;--season-ink:#f6dfbe!important}
#introSplashScreen{background:var(--p303-page)!important;color:var(--p303-text)!important;z-index:9990}
#introSplashScreen .house-mark{color:#237bd3;background:var(--p303-surface);border:1px solid var(--p303-line)}
#p303StartupStatus{text-align:center;max-width:360px;line-height:1.7;color:var(--p303-muted)}
#p303StartupRetry{gap:12px;margin-top:20px;flex-wrap:wrap;justify-content:center}
#p303StartupRetry button{padding:10px 17px;border-radius:8px;border:1px solid var(--p303-line);background:var(--p303-surface);color:var(--p303-text);cursor:pointer}
#welcomeOverlay{background:var(--p303-page)!important;color:var(--p303-text)!important;z-index:9991;transition:none}
#welcomeTextTitle{color:var(--p303-text)!important;font-size:clamp(25px,4vw,40px)!important}
#p303WelcomeSub{color:var(--p303-muted)!important}
.p303-login-color-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--p303-line);border-radius:7px;padding:7px 10px;background:var(--p303-surface);color:var(--p303-text);font-size:12px;line-height:1.3;font-family:inherit;cursor:pointer}
.p303-login-color-toggle:disabled{opacity:.55;cursor:default}
.ui400-login-language:has(.p303-login-color-toggle){display:flex;justify-content:space-between;align-items:center;gap:12px}
.ui400-login-language .p303-login-color-toggle{order:-1}
.house-login-box>.p303-login-color-toggle{position:absolute;left:24px;top:18px}
.p303-switch{position:relative;width:45px;height:26px;flex:none}
.p303-switch input{position:absolute;inset:0;opacity:0;width:100%!important;height:100%!important;cursor:pointer;z-index:1;margin:0}
.p303-switch>span{display:block;width:45px;height:26px;border-radius:20px;background:#9ba9ba;transition:background .15s}
.p303-switch>span:after{content:'';position:absolute;width:20px;height:20px;border-radius:50%;left:3px;top:3px;background:white;box-shadow:0 1px 3px #0003;transition:transform .15s}
.p303-switch input:checked+span{background:#237bd3}.p303-switch input:checked+span:after{transform:translateX(19px)}
.p303-switch input:disabled{cursor:default}.p303-switch:has(input:disabled){opacity:.5}
.p303-switch input:focus-visible+span{outline:2px solid var(--p303-focus);outline-offset:3px}
/* One compact settings card; password and email are separate subpanels. */
#profileModal.p303-profile-overlay{position:fixed;inset:0;z-index:110;align-items:center;justify-content:center;padding:20px;background:#05112480;backdrop-filter:blur(4px);box-sizing:border-box}
#profileModal>.p303-profile-card{width:min(460px,100%);max-width:460px;max-height:min(700px,calc(100dvh - 40px));background:var(--p303-surface);border:1px solid var(--p303-line);border-radius:15px;box-shadow:0 20px 70px #030e2544;padding:0;overflow:hidden;color:var(--p303-text);display:flex;flex-direction:column}
.p303-profile-header{display:flex;align-items:center;gap:12px;padding:20px;border-bottom:1px solid var(--p303-line);flex:none}
.p303-profile-header>div:nth-child(2){flex:1;min-width:0}
.p303-profile-header h3{font-size:19px;line-height:1.35;font-weight:700;color:var(--p303-text);margin:0}
.p303-profile-header p{font-size:12px;color:var(--p303-muted);margin:5px 0 0;overflow-wrap:anywhere}
.p303-profile-avatar{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;flex:none;background:#237bd3;color:white;font-size:22px;font-weight:700}
#closeProfileBtn{width:40px;height:40px;flex:none;border:0;border-radius:6px;background:transparent;color:var(--p303-muted);font-size:28px;cursor:pointer;line-height:1}
#closeProfileBtn:hover{background:var(--p303-soft)}
.p303-profile-body{padding:20px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.p303-profile-body [hidden]{display:none!important}
.p303-profile-body label:not(.p303-profile-item){display:block;font-size:12px;font-weight:650;margin:15px 0 7px}
.p303-profile-body input:not([type=checkbox]){box-sizing:border-box;min-width:0;width:100%;border:1px solid var(--p303-line);background:var(--p303-surface);color:var(--p303-text);border-radius:8px;padding:12px;font-size:14px;outline:none;min-height:44px}
.p303-profile-body input:focus{border-color:var(--p303-focus);box-shadow:0 0 0 2px #237bd31c}
.p303-profile-body input[readonly]{background:var(--p303-soft);color:var(--p303-muted)}
.p303-profile-name-row{display:flex;gap:8px;align-items:center}.p303-profile-name-row>button{align-self:stretch;padding:0 17px;border:0;border-radius:8px;background:#1d70c4;color:white;cursor:pointer;font-size:13px;font-weight:650}
.p303-profile-settings{border-top:1px solid var(--p303-line);margin-top:22px;padding-top:4px}
.p303-profile-item{display:flex;width:100%;box-sizing:border-box;align-items:center;justify-content:space-between;gap:15px;padding:17px 0;border:0;border-bottom:1px solid var(--p303-line);background:transparent;text-align:left;color:var(--p303-text);cursor:pointer}
.p303-profile-item:last-child{border-bottom:0;padding-bottom:2px}.p303-profile-item strong{display:block;font-size:14px;font-weight:650}.p303-profile-item small{display:block;color:var(--p303-muted);font-size:11px;line-height:1.6;margin-top:4px;overflow-wrap:anywhere}
.p303-profile-item>span:last-child:not(.p303-switch){font-size:23px;color:var(--p303-muted)}
.p303-profile-back{padding:0;min-height:32px;margin:0 0 12px;border:0;background:transparent;color:var(--p303-focus);font-size:12px;cursor:pointer}
.p303-profile-body h4{font-size:18px;font-weight:700;margin:0;color:var(--p303-text)}
.p303-profile-description{font-size:12px;color:var(--p303-muted);line-height:1.7;margin:8px 0 16px}
.p303-profile-primary{display:block;width:100%;margin-top:20px;min-height:44px;padding:11px 14px;border:0;background:#1d70c4;color:white;font-size:14px;font-weight:650;border-radius:8px;cursor:pointer}
.p303-profile-body button:disabled{opacity:.55;cursor:wait}
.p303-profile-password{position:relative}.p303-profile-password input{padding-right:48px!important}.p303-profile-password button{position:absolute;top:3px;bottom:3px;right:3px;width:40px;display:grid;place-items:center;background:transparent;color:var(--p303-muted);border:0;border-radius:6px;cursor:pointer}
#p303EmailChangeDetails{margin:0;border:0;border-radius:0;background:none;padding:0}#p303EmailChangeDetails>summary{display:none}
#p303ProfileDetailsFeedback,#passwordModalAlert,#p303EmailChangeFeedback{font-size:12px;line-height:1.6;color:var(--p303-muted);margin-top:10px;overflow-wrap:anywhere}
/* Dark surfaces: preserve avatars, uploaded art and user-selected document colors. */
html[data-p303-color=dark] #loginScreen,html[data-p303-color=dark] .house-login-panel,html[data-p303-color=dark] .house-login-box{background:var(--p303-page)!important;color:var(--p303-text)!important;border-color:var(--p303-line)!important}
html[data-p303-color=dark] #loginScreen:before{background-image:none}
html[data-p303-color=dark] #loginScreen:after{background:transparent}
html[data-p303-color=dark] :is(.house-login-welcome h1,.house-quick-account,.p303-login-mobile-mark,.p303-login-links button,.house-link,.p303-auth-heading h2,.p303-auth-eyebrow,.p303-auth-switch button){color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.house-login-welcome p,.house-login-footnote,.p303-remember,.p303-login-mobile-mark p,.p303-auth-description,.p303-auth-heading p,.p303-auth-label){color:var(--p303-muted)!important}
html[data-p303-color=dark] :is(.house-quick-account,.house-login-field,.p303-auth-sheet,.p303-auth-main,.p303-auth-input,.p303-auth-aside){background:var(--p303-surface)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(#loginUsername,#loginPassword,.p303-auth-input){background:transparent!important;color:var(--p303-text)!important}
html[data-p303-color=dark] input::placeholder,html[data-p303-color=dark] textarea::placeholder{color:#92a2b9!important;opacity:1}
html[data-p303-color=dark] :is(.house-login-eye,.p303-auth-eye){color:#a8bbd3!important}
html[data-p303-color=dark] #appScreen>header,html[data-p303-color=dark] #appScreen>header>nav,html[data-p303-color=dark] #p303NavList{background:var(--p303-surface)!important;border-color:var(--p303-line)!important}
html[data-p303-color=dark] :is(.p303-brand-name,.p303-brand-mark,.p303-brand-house,#currentUserName,#periodSelect,#currentPeriodLabel){color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-brand-sub,.p303-utility,#p303NavList button){color:var(--p303-muted)!important}
html[data-p303-color=dark] #p303NavList button[aria-current=page]{color:#9fc9ff!important;border-bottom-color:#77b6ff!important}
html[data-p303-color=dark] :is(#p303PeriodControl,.p303-user-menu,#userMenuBtn,.p303-n-card,.p303-n-listpane,.p303-n-detailpane,.p303-n-sidebar,.p303-n-modal,.p303-center-panel,.p303-center-card,.p303-adm-roster,.p303-adm-detail,.p303-adm-kpi,.ui400-stat,.ui400-queue,.p303-l-foldercard,.p303-l-paper-card,.house-settlement,.p303-l-detail,.p303-l-dialog,.p303-l-adminbar){background:var(--p303-surface)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.house-home,.p303-learning-inner,.p303-center,.p303-n-page,.p303-adm){color:var(--p303-text)}
html[data-p303-color=dark] :is(.p303-finance-banner,.p303-l-hero,.p303-adm-info,.p303-l-stat,.p303-center-info,.ui400-health,.p303-file-hint){background:var(--p303-soft)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-finance-banner h1,.p303-finance-section-title h2,#formSectionTitle,.p303-center-head h1,.p303-center-head h2,.p303-n-head h2,.p303-n-detail-title h2,.p303-n-card-title,.p303-n-itemtitle,.p303-l-hero-copy h2,.p303-l-foldercard-info strong,.p303-adm-head h2,.p303-adm-user-name,.ui400-stat strong){color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-finance-banner p,.p303-n-itemdesc,.p303-n-itemmeta,.p303-n-head p,.p303-n-detail-title p,.p303-n-detail-text,.p303-l-paper-meta,.p303-center-head p,.ui400-stat small,.ui400-empty){color:var(--p303-muted)!important}
html[data-p303-color=dark] :is(.p303-n-search,.p303-n-filter,.p303-n-select,.p303-n-listitem,.p303-l-search,.p303-center-button.secondary,.p303-adm-action,.p303-l-outline,.p303-mail-preview,.p303-n-detail-section){background:var(--p303-surface)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-n-listitem.active,.p303-n-filter.active,.p303-n-category.active,.p303-mail-list article,.ui400-breadcrumb){background:var(--p303-soft)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-n-sharing-text,.p303-n-detail-section h3,.p303-n-check,.p303-center-card h3,.p303-adm-info-val,.p303-adm-info-lab){color:var(--p303-text)!important}
html[data-p303-color=dark] #appScreen :is(input:not([type=checkbox]):not([type=color]),textarea,select),html[data-p303-color=dark] .p303-n-modal :is(input:not([type=checkbox]):not([type=color]),textarea,select){background:var(--p303-surface);color:var(--p303-text);border-color:var(--p303-line)}
html[data-p303-color=dark] :is(#appScreen,#profileModal,.p303-n-modal) :is(.text-slate-500,.text-slate-600,.text-gray-500,.text-gray-600){color:var(--p303-muted)!important}
html[data-p303-color=dark] :is(#appScreen,#profileModal,.p303-n-modal) :is(.text-slate-700,.text-slate-800,.text-slate-900,.text-gray-700,.text-gray-800){color:var(--p303-text)!important}
html[data-p303-color=dark] :is(#appScreen,#confirmExpenseModal,#p303GenericConfirm,#p303AlertModal,#p303ResultModal) :is(.bg-white,.bg-slate-50,.bg-gray-50,.bg-slate-100){background-color:var(--p303-surface)!important;color:var(--p303-text);border-color:var(--p303-line)}
html[data-p303-color=dark] :is(#expenseMain table,#expenseMain thead,#expenseMain tbody,#expenseFormSection){background:var(--p303-surface)!important;color:var(--p303-text)!important;border-color:var(--p303-line)!important}
html[data-p303-color=dark] #expenseMain :is(td,th){border-color:var(--p303-line)!important}
html[data-p303-color=dark] .loc-header,html[data-p303-color=dark] .p303-loc-footer{background:#172747!important;border-color:#3a5887!important;color:#bfd5ff!important}
html[data-p303-color=dark] .tung-header,html[data-p303-color=dark] .p303-tung-footer{background:#102f28!important;border-color:#2e6651!important;color:#a3e1c4!important}
html[data-p303-color=dark] :is(.loc-header,.p303-loc-footer) :is(h3,p,span){color:#bfd5ff!important}
html[data-p303-color=dark] :is(.tung-header,.p303-tung-footer) :is(h3,p,span){color:#a3e1c4!important}
html[data-p303-color=dark] :is(.loc-header,.tung-header) .p303-person-avatar{color:#fff!important}
html[data-p303-color=dark] .house-settlement>.grid>div{background:var(--p303-surface)!important;border-color:var(--p303-line)!important}
html[data-p303-color=dark] .house-settlement>.grid>div>div:last-child{background:var(--p303-soft)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-rich-toolbar,.p303-rich-editor){background:var(--p303-surface);border-color:var(--p303-line)}
html[data-p303-color=dark] .p303-rich-toolbar :is(button,select,label){color:var(--p303-text)!important}
html[data-p303-color=dark] .p303-rich-toolbar select{background:var(--p303-surface)!important;border-color:var(--p303-line)!important}
html[data-p303-color=dark] .p303-rich-toolbar button[aria-pressed=true]{color:#b9d9ff!important;background:#24436b!important}
/* Documents remain paper-colored so chosen font/highlight colors stay accurate. */
html[data-p303-color=dark] .p303-rich-content,html[data-p303-color=dark] .p303-rich-surface{background:#fff!important;color:#203a51!important;border-radius:6px;padding:14px}
html[data-p303-color=dark] .p303-rich-count{background:var(--p303-surface)!important;color:var(--p303-muted)!important}
html[data-p303-color=dark] #p303NotificationPanel{background:var(--p303-surface);border-color:var(--p303-line)}
html[data-p303-color=dark] #p303NotificationList button{color:var(--p303-text);border-color:var(--p303-line)}
html[data-p303-color=dark] .ui400-sidebar{border-color:var(--p303-line)}
html[data-p303-color=dark] .ui400-sidebar a{color:var(--p303-muted)}
html[data-p303-color=dark] .ui400-sidebar a[aria-current=page]{background:#213a5d;color:#b9d9ff}
html[data-p303-color=dark] :is(body.p303-house .soft-card,#appScreen>footer,.p303-finance-shortcuts,.p303-finance-tools>label,.house-settlement>div:first-child,.p303-header-search,.p303-n-workspace,.p303-n-empty,.p303-n-loading,.p303-n-error,.p303-n-member,.p303-l-collection,.p303-l-empty--large,.p303-grant-collection,.p303-grant-paper,.ui400-panel,.ui400-visibility,.ui400-mobile-menu,#p303AdminNav,.p303-modal,.p303-duplicate-dialog,.p303-duplicate-actions button,.p303-mail-recipients label,.ui410-member-management .danger-action,.ui400-body .p303-adm-person,.ui400-body .p303-adm-detail-top,.ui400-body #p303SeasonAdmin){background:var(--p303-surface)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.house-home,.house-resume,.house-today-summary,.house-destination,.house-search,.p303-lifecycle-box,.p303-n-settings,.p303-n-ghost,.p303-n-link,.p303-n-detailactions button,.p303-n-detail-links a,.p303-grant-panel,.p303-grant-panel>summary,.p303-grant-header,.p303-adm-detail-top,.p303-adm-person.active,.p303-adm-search,.p303-auth-policy,.p303-auth-close,.p303-l-iconbtn,.p303-l-collection-actions button,#payerSelectorContainer,#p303DuplicateExpenseList li,#p303DuplicateExpenseList>div){background:var(--p303-soft)!important;border-color:var(--p303-line)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] #expenseMain thead th{background:var(--p303-soft)!important;color:var(--p303-muted)!important}
html[data-p303-color=dark] #expenseMain tbody tr:hover{background:var(--p303-soft)!important}
html[data-p303-color=dark] #p303ModuleContent>.p303-access-page{background:var(--p303-surface)!important;color:var(--p303-text)!important;border-color:var(--p303-line)!important}
html[data-p303-color=dark] #p303ModuleContent>.p303-access-page .p303-access-secondary{background:var(--p303-soft)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-access-title,.p303-l-detail-heading h2,.p303-l-paper-info h4,.p303-adm-person-name,.p303-adm-kpi-value,.ui400-panel h2,.ui400-panel h3,.p303-center-panel h2,.p303-center-panel h3,.ui400-body h1,.ui400-body h2,.ui400-body h3,.ui400-body h4,.p303-n-modal h3){color:var(--p303-text)!important}
html[data-p303-color=dark] :is(.p303-l-detail-desc,.p303-adm-person-sub,.p303-adm-kpi-label,.p303-access-message,.p303-center-field label,.p303-center-row label,.ui400-stat span){color:var(--p303-muted)!important}
html[data-p303-color=dark] #kmCongratsModal :is(.p303-km-dialog,.p303-km-actions,.p303-km-secondary){background:var(--p303-surface)!important;color:var(--p303-text)!important;border-color:#ab9145!important}
html[data-p303-color=dark] #kmCongratsModal :is(.p303-km-close,.p303-km-amount){background:var(--p303-soft)!important;color:var(--p303-text)!important}
html[data-p303-color=dark] #kmCongratsModal :is(h2,.p303-km-description,.p303-km-note){color:var(--p303-text)!important}
/* Cursor-following light is decorative; never intercepts clicks or selection. */
.p303-password-beam{position:fixed;z-index:250;pointer-events:none;background:linear-gradient(90deg,#fff0ab38,#fff3bc13);clip-path:polygon(0 44%,100% 0,100% 100%,0 56%);transform-origin:0 50%;mix-blend-mode:screen}
.p303-password-spot{position:fixed;z-index:251;pointer-events:none;width:90px;height:90px;transform:translate(-50%,-50%);background:radial-gradient(circle,#fff5bd20,transparent 70%);border-radius:50%;mix-blend-mode:screen}
.p303-password-beam[hidden],.p303-password-spot[hidden]{display:none!important}
.is-lamp-on{color:#f3d36e!important}
@media(max-width:600px){#profileModal.p303-profile-overlay{padding:16px}#profileModal>.p303-profile-card{max-height:calc(100dvh - 32px);border-radius:13px}.p303-profile-header{padding:17px}.p303-profile-header h3{font-size:18px}.p303-profile-body{padding:18px}.p303-profile-body input:not([type=checkbox]){font-size:16px}.house-login-box>.p303-login-color-toggle{left:18px;top:18px}}
@media(prefers-reduced-motion:reduce){.p303-password-beam,.p303-password-spot{display:none!important}.p303-switch>span,.p303-switch>span:after{transition:none}}

html[data-p303-color=dark] #passwordModalAlert.bg-rose-50{background:#361f2e!important;color:#ffc3cc!important;border-color:#6e4255!important}
html[data-p303-color=dark] #passwordModalAlert.bg-emerald-50{background:#12342d!important;color:#a7e6c9!important;border-color:#365f53!important}
