/* ZH Digital — Client Portal opt-in night experience (Dev1.5, staging candidate).
   The existing portal.css remains the untouched Day-mode source of truth.
   Brand preview media, colour swatches and business documents are never inverted. */
html[data-zh-theme="night"]{
 --portal-canvas:#071923;--ink:#eaf7f8;--slate:#bad3d8;
 --line:#355360;--soft:#0f2935;--soft2:#123440;
 --shadow:0 18px 50px rgba(0,0,0,.18);
 color-scheme:dark;
}
html[data-zh-theme="night"] body.portal-body{background:#071923;color:#ebf8fa}
html[data-zh-theme="night"] .portal-workspace{background:radial-gradient(circle at 90% 0%,rgba(75,236,178,.065),transparent 33rem),linear-gradient(170deg,#071923,#0a232d)}
html[data-zh-theme="night"] .portal-topbar{background:rgba(13,34,44,.95);border-bottom:1px solid #2c5361;box-shadow:0 8px 30px #0003;color:#e8f6f7}
html[data-zh-theme="night"] .portal-topbar .portal-user :is(b,small){color:#e5f7f9}
html[data-zh-theme="night"] .portal-topbar .portal-user small{color:#abc9d0}
html[data-zh-theme="night"] .portal-main :is(h1,h2,h3,h4){color:#edfaff}
html[data-zh-theme="night"] .portal-main :is(p,small,dt,dd,li){color:inherit}
html[data-zh-theme="night"] .portal-main :is(.portal-panel,.portal-project-card,.portal-project-list-card,.portal-action-card,.portal-attention-panel,.portal-service-choice-card,.portal-service-row,.portal-care-plan,.portal-account-form,.portal-info-note,.portal-outstanding-card,.portal-refinement-request,.portal-finance-mini,.portal-check-row,.portal-team-row,.portal-file-row,.portal-proposal-row,.portal-payment-row,.portal-finance-row,.portal-card-next,.portal-next-step,.portal-security-core,.portal-member-manage,.portal-attention-list,.portal-simple-dl,.portal-brand-asset,.portal-brand-summary,.portal-service-intake-head,.portal-service-value,.portal-approval,.portal-record-summary){
 background:#102c39!important;border-color:#355763!important;color:#e6f5f7!important;box-shadow:0 13px 30px #0002;
}
html[data-zh-theme="night"] .portal-main :is(.portal-project-card,.portal-project-list-card,.portal-service-choice-card):hover{background:#16404a!important;border-color:#5aa891!important}
html[data-zh-theme="night"] .portal-main :is(.portal-panel,.portal-project-card,.portal-project-list-card,.portal-action-card,.portal-service-choice-card,.portal-info-note,.portal-care-plan,.portal-finance-mini,.portal-card-next,.portal-next-step) :is(h2,h3,h4,b,strong){color:#eaf9fa!important}
html[data-zh-theme="night"] .portal-main :is(.portal-panel,.portal-project-card,.portal-project-list-card,.portal-action-card,.portal-service-choice-card,.portal-info-note,.portal-care-plan,.portal-finance-mini,.portal-card-next,.portal-next-step) :is(p,small,li,dd){color:#bed5dc!important}
html[data-zh-theme="night"] .portal-main :is(table,tbody,thead,tr,th,td){border-color:#3c606b;color:#e9f5f8}
html[data-zh-theme="night"] .portal-main th{background:#19414b!important;color:#e8fcf6!important}
html[data-zh-theme="night"] .portal-main :is(tr:nth-child(even),.portal-records,.portal-disclosure-body){background:#0d2935;color:#d7ecf0}
html[data-zh-theme="night"] .portal-main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){background:#0b2430!important;color:#eafaf7!important;border-color:#47717c!important}
html[data-zh-theme="night"] .portal-main :is(input,textarea)::placeholder{color:#a5c4cb}
html[data-zh-theme="night"] .portal-main :is(input,select,textarea,button,a):focus-visible,
html[data-zh-theme="night"] .portal-theme-trigger:focus-visible,
html[data-zh-theme="night"] .portal-theme-option:focus-visible{outline:2px solid #79f5c7!important;outline-offset:3px}
html[data-zh-theme="night"] .portal-main :is(.portal-btn,.portal-disclosure>summary,.portal-project-tabs button,.portal-account-tabs button){border-color:#427380;color:#eaf8f9}
html[data-zh-theme="night"] .portal-main :is(.portal-status,.portal-flash.ok){color:#9cf2cc}
/* Preserve true brand canvases and embedded document previews rather than recolouring clients' assets. */
html[data-zh-theme="night"] .portal-main :is(img,video,canvas,.portal-brand-swatches,.portal-logo-concept-thumb,.portal-refinement-image){filter:none!important}
/* Portal gateway, sign-in and invite views are also eligible for Night mode. */
html[data-zh-theme="night"] body.portal-login-body{background:linear-gradient(160deg,#071923,#10303c);color:#ecf7fa}
html[data-zh-theme="night"] .portal-login-card{background:#102f3b;color:#eaf7f7;border-color:#3b6971}
html[data-zh-theme="night"] .portal-login-card :is(h1,h2,b,strong){color:#ebfbfa}
html[data-zh-theme="night"] .portal-login-card :is(p,small){color:#c6dce0}
html[data-zh-theme="night"] .portal-login-card :is(input,select,textarea){background:#0c2734;color:#ebfbfa;border-color:#47727f}
/* Dev1.6 — portal dark polish, limited to client portal. Admin remains untouched. */
/* Day and Night preference now lives only in Account > Profile. No floating portal controls. */
.portal-appearance-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;max-width:760px;padding:20px 24px}
.portal-appearance-panel .portal-appearance-copy{min-width:0}
.portal-appearance-panel h2{font-size:18px;margin:6px 0 5px}
.portal-appearance-panel p{font-size:12px;line-height:1.55;margin:0;color:#536d77}
.portal-appearance-switch{position:relative;flex:0 0 auto;width:51px;height:30px;padding:3px;border:1px solid #a6c5c7;border-radius:999px;background:#cbdadd;cursor:pointer;transition:background .2s,border-color .2s}
.portal-appearance-knob{display:block;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 6px #0003;transform:translateX(0);transition:transform .2s}
.portal-appearance-switch[aria-checked="true"]{background:#1c916d;border-color:#45cba2}
.portal-appearance-switch[aria-checked="true"] .portal-appearance-knob{transform:translateX(20px)}
.portal-appearance-switch:focus-visible{outline:3px solid #48d59b;outline-offset:3px}
html[data-zh-theme="night"] .portal-appearance-panel{background:#113440!important;border-color:#456a71!important}
html[data-zh-theme="night"] .portal-appearance-panel :is(h2,.portal-kicker){color:#ddfff1!important}
html[data-zh-theme="night"] .portal-appearance-panel p{color:#bbd6dd!important}
html[data-zh-theme="night"] .portal-appearance-switch:not([aria-checked="true"]){background:#385a60;border-color:#659293}
/* Public gateway and sign-in: restore readable form labels, secondary links and CTA hierarchy. */
html[data-zh-theme="night"] .portal-login-card :is(label,.portal-form-note){color:#c4e1e8!important}
html[data-zh-theme="night"] .portal-login-card label{font-size:12px!important}
html[data-zh-theme="night"] .portal-login-card :is(a,.portal-forgot-link){color:#95f7d5!important}
html[data-zh-theme="night"] .portal-login-card button.portal-btn,
html[data-zh-theme="night"] .portal-login-card button[type="submit"]{background:#2dd6aa!important;color:#07302d!important;border:1px solid #76f1cf!important;font-weight:850}
html[data-zh-theme="night"] .portal-login-card :is(input,select,textarea):focus{border-color:#7ff6cf!important;outline:2px solid #4ce5bd!important;outline-offset:1px}
html[data-zh-theme="night"] .portal-back-site{color:#bddbe1!important}
/* Overview, quick actions and accordion summaries: remove hard-coded white surfaces and restore contrast. */
html[data-zh-theme="night"] .portal-main :is(.portal-quick-actions a,.portal-disclosure,.portal-records details>summary,.portal-account-tabs>a,.portal-project-card-compact,.portal-attention-list>a,.portal-glance>div,.portal-metrics>div,.portal-card-next,.portal-next-step){background:#12323e!important;color:#ebf8fa!important;border-color:#3b606b!important;box-shadow:0 5px 18px #0002}
html[data-zh-theme="night"] .portal-main :is(.portal-quick-actions a,.portal-disclosure>summary,.portal-account-tabs>a,.portal-attention-list>a,.portal-card-next,.portal-next-step) :is(b,strong,h3,h4){color:#ecfbfa!important}
html[data-zh-theme="night"] .portal-main :is(.portal-quick-actions a,.portal-disclosure>summary,.portal-account-tabs>a,.portal-attention-list>a,.portal-card-next,.portal-next-step) :is(small,p){color:#bbd4dc!important}
html[data-zh-theme="night"] .portal-main :is(.portal-quick-actions a,.portal-disclosure,.portal-account-tabs>a):hover{background:#18424a!important;border-color:#55a88f!important}
html[data-zh-theme="night"] .portal-main .portal-disclosure-body{background:#0e2c37!important;color:#eaf8f8!important}
html[data-zh-theme="night"] .portal-main .portal-disclosure-body :is(.portal-empty,.portal-team-row,.portal-project-card-compact){background:#143541!important;color:#e5f6f6!important;border-color:#40626c!important}
html[data-zh-theme="night"] .portal-main .portal-section-intro :is(h2,p){color:#e5f6f8!important}
/* Portal project / proposal / finance summaries: same semantic materials and text roles. */
html[data-zh-theme="night"] .portal-main :is(.portal-heading-account,.portal-heading-calm,.portal-guided-next,.portal-logo-project-card,.portal-logo-waiting,.portal-brand-summary,.portal-profile-head,.portal-account-primary,.portal-team-row,.portal-security-status,.portal-info-note,.portal-review-next,.portal-service-choice-placeholder,.portal-release-status){background:#12313d!important;color:#ebf8f9!important;border-color:#42616d!important}
html[data-zh-theme="night"] .portal-main :is(.portal-account-primary,.portal-project-card-compact,.portal-security-core .portal-panel,.portal-account-tabs>a.active){background-image:none!important}
html[data-zh-theme="night"] .portal-main :is(.portal-heading-account,.portal-heading-calm,.portal-guided-next,.portal-logo-project-card,.portal-brand-summary,.portal-team-row,.portal-security-status) :is(h1,h2,h3,b,strong){color:#eafafa!important}
html[data-zh-theme="night"] .portal-main :is(.portal-heading-account,.portal-heading-calm,.portal-guided-next,.portal-logo-project-card,.portal-brand-summary,.portal-team-row,.portal-security-status) :is(p,small,dd,dt,span){color:#bdd7dd!important}
html[data-zh-theme="night"] .portal-main :is(.portal-project-tabs a,.portal-service-choice-details,.portal-service-choice-card,.portal-service-intake-wrap,.portal-finance-mini,.portal-finance-overview,.portal-project-score,.portal-project-next-step,.portal-team-invite-form,.portal-recovery-grid code){background:#153541!important;border-color:#426672!important;color:#e5f9f8!important}
html[data-zh-theme="night"] .portal-main :is(.portal-project-tabs a,.portal-finance-mini,.portal-project-score,.portal-service-choice-card,.portal-service-intake-wrap) :is(b,strong,small,span){color:#dcf0f2!important}
html[data-zh-theme="night"] .portal-main :is(.portal-project-tabs a.active,.portal-account-tabs>a.active){border-color:#50b69a!important;background:#17483e!important}
html[data-zh-theme="night"] .portal-main :is(.portal-project-tabs a.active,.portal-account-tabs>a.active) :is(b,small){color:#b5ffe0!important}
html[data-zh-theme="night"] .portal-main :is(.portal-kicker,.portal-inline-link,.portal-section-intro .portal-kicker){color:#66f3bb!important}
html[data-zh-theme="night"] .portal-main :is(.portal-btn.soft,.portal-btn.tiny.soft){background:#1c414d!important;color:#e6f9f9!important;border-color:#4c7481!important}
/* Match native form controls to dark surfaces, retain actual images/docs/logo preview backgrounds. */
html[data-zh-theme="night"] .portal-main :is(.portal-account-form,.upload-panel,.portal-accept-form,.portal-refinement-response) label{color:#c5e2e6!important}
html[data-zh-theme="night"] .portal-main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){background:#0c2936!important;color:#eafafa!important;border-color:#59838e!important}
html[data-zh-theme="night"] .portal-main :is(.portal-brand-swatches,.portal-logo-concept-thumb-image,.portal-logo-focus-image,.portal-mfa-qr-card,.portal-document-preview,.portal-proposal-preview,.portal-brand-canvas){color-scheme:light}
html[data-zh-theme="night"] .portal-main :is(.portal-brand-swatches,.portal-logo-focus-image,.portal-mfa-qr-card) :is(img,svg){filter:none!important}
@media(max-width:640px){.portal-appearance-panel{gap:14px;padding:18px 16px}.portal-appearance-panel h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){.portal-appearance-switch,.portal-appearance-knob{transition:none!important}}
/* Client Portal public gateway: complementary night treatment without recolouring illustrative screen content. */
html[data-zh-theme="night"] .portal-gateway-v2{background:radial-gradient(ellipse at 80% 8%,rgba(41,191,142,.105),transparent 34%),linear-gradient(165deg,#071923,#102f3b 85%)!important;color:#ebf9f8!important}
html[data-zh-theme="night"] .portal-gateway-hero h1{color:#f0fbfa!important}
html[data-zh-theme="night"] .portal-gateway-hero h1 em{color:#67efbb!important}
html[data-zh-theme="night"] .portal-gateway-hero>div:first-child>p{color:#c7dee2!important}
html[data-zh-theme="night"] .portal-gateway-hero>div:first-child>small{color:#afcfd7!important}
html[data-zh-theme="night"] .portal-gateway-hero>div:first-child>small a{color:#82f5c7!important}
html[data-zh-theme="night"] .portal-gateway-actions .gateway-outline{background:#143543!important;color:#e8f9f9!important;border-color:#476e79!important}
html[data-zh-theme="night"] .portal-topbar .portal-user button{background:#153b48;color:#e9faf7;border:1px solid #4b727b}
html[data-zh-theme="night"] .portal-topbar .portal-user button:hover{background:#1b4d56;border-color:#61b795}
/* Full-width project/overview shell and generated action lists. */
html[data-zh-theme="night"] .portal-main :is(.portal-focus-panel,.portal-attention-panel,.portal-focus-projects,.portal-project-next-step,.portal-project-summary,.portal-overview-card,.portal-project-summary-card,.portal-service-overview,.portal-next-action,.portal-record-summary,.portal-release-status){background:#102e39!important;border-color:#3a626b!important;color:#e8f7f9!important}
html[data-zh-theme="night"] .portal-main :is(.portal-focus-panel,.portal-project-next-step,.portal-overview-card,.portal-project-summary,.portal-record-summary,.portal-release-status) :is(h2,h3,h4,b,strong){color:#e7f8fa!important}
html[data-zh-theme="night"] .portal-main :is(.portal-focus-panel,.portal-project-next-step,.portal-overview-card,.portal-project-summary,.portal-record-summary,.portal-release-status) :is(p,small,dd){color:#bad4db!important}
html[data-zh-theme="night"] .portal-main .portal-project-card-compact{background:#173943!important;border-color:#4b6d73!important}
html[data-zh-theme="night"] .portal-main :is(.portal-quick-actions,.portal-records,.portal-focus-projects) :is(a,button):focus-visible{outline:3px solid #86f7d3!important;outline-offset:3px}

/* Dev1.7 — semantic portal Night-mode polish from real authenticated screenshots.
   Keep intentional document/brand previews neutral; never theme Admin. */
html[data-zh-theme="night"] .portal-main .portal-metrics article,
html[data-zh-theme="night"] .portal-main .portal-metrics article.mint,
html[data-zh-theme="night"] .portal-main .portal-project-score,
html[data-zh-theme="night"] .portal-main .portal-finance-overview{background:#143541!important;background-image:none!important;border:1px solid #446774!important;color:#ecf9f8!important;box-shadow:0 8px 23px #0002}
html[data-zh-theme="night"] .portal-main .portal-metrics :is(span,strong,b,small),
html[data-zh-theme="night"] .portal-main .portal-project-score strong,
html[data-zh-theme="night"] .portal-main .portal-money b,
html[data-zh-theme="night"] .portal-main .portal-finance-row b,
html[data-zh-theme="night"] .portal-main .portal-finance-row dd,
html[data-zh-theme="night"] .portal-main .finance-card dd,
html[data-zh-theme="night"] .portal-main .portal-simple-dl dd{color:#e6f7f9!important}
html[data-zh-theme="night"] .portal-main .portal-metrics :is(span,small),
html[data-zh-theme="night"] .portal-main .portal-project-score span,
html[data-zh-theme="night"] .portal-main .portal-finance-row small,
html[data-zh-theme="night"] .portal-main .portal-money small,
html[data-zh-theme="night"] .portal-main .finance-card dt,
html[data-zh-theme="night"] .portal-main .portal-simple-dl dt{color:#b7d6dd!important}
html[data-zh-theme="night"] .portal-main .portal-finance-row{border-color:#426672!important;color:#eaf8f9!important}
html[data-zh-theme="night"] .portal-main :is(.stage-ribbon span,.timeline-step>i){background:#22434d!important;color:#cbe5e7!important;border-color:#4a707a!important}
html[data-zh-theme="night"] .portal-main :is(.stage-ribbon span.reached,.timeline-step.complete>i){background:#205945!important;color:#a5ffcf!important}
html[data-zh-theme="night"] .portal-main .timeline-step:not(:last-child):before{background:#456572!important}
html[data-zh-theme="night"] .portal-main .timeline-step :is(h3,p,small){color:#d8edef!important}
html[data-zh-theme="night"] .portal-main .portal-status{background:#244650!important;color:#d4edf0!important;border:1px solid #52747b!important}
html[data-zh-theme="night"] .portal-main .portal-status:is(.complete,.paid,.accepted,.active){background:#1a4c3b!important;color:#a2ffd0!important;border-color:#3c8462!important}
html[data-zh-theme="night"] .portal-main .portal-status:is(.in_progress,.build,.review,.sent){background:#19465a!important;color:#b1e9ff!important;border-color:#387c9c!important}
html[data-zh-theme="night"] .portal-main .portal-status:is(.waiting,.proposal,.onboarding,.due){background:#5a4424!important;color:#ffe0a0!important;border-color:#867042!important}
html[data-zh-theme="night"] .portal-main .portal-status:is(.overdue,.cancelled,.declined){background:#552c34!important;color:#ffd3dc!important;border-color:#8e505d!important}
html[data-zh-theme="night"] .portal-main :is(.portal-btn.soft,.portal-btn.tiny.soft,.portal-user button){color:#eaf8f8!important}
html[data-zh-theme="night"] .portal-main :is(.portal-inline-link,.portal-row-arrow,.portal-panel-head>a,.portal-records a){color:#8bffd2!important}
/* Preserve native file inputs but stop a stark white upload surface from reading as a theme failure. */
html[data-zh-theme="night"] .portal-main input[type="file"]{color:#e7f7fa!important;background:#173743!important;border:1px dashed #557987!important;border-radius:10px;padding:9px!important}
html[data-zh-theme="night"] .portal-main input[type="file"]::file-selector-button{color:#063229!important;background:#a1f8d0!important;border:0!important;border-radius:7px;padding:7px 11px;font-weight:750;cursor:pointer;margin-right:12px}
/* Login/form surfaces: improve subtitle and label hierarchy without neon overload. */
html[data-zh-theme="night"] .portal-login-card :is(label,.portal-form-note){color:#c7e0e6!important}
html[data-zh-theme="night"] .portal-login-card :is(input,textarea,select){background:#193745!important;color:#f1fcfb!important}
/* Portal public gateway second section must follow appearance too; illustrative browser UI unchanged. */
html[data-zh-theme="night"] .portal-gateway-page .portal-gateway-path{background:#0b2530!important;border-color:#355863!important;color:#eaf9f8!important}
html[data-zh-theme="night"] .portal-gateway-path .gateway-path-intro h2{color:#eaf9f8!important}
html[data-zh-theme="night"] .portal-gateway-path .gateway-path-intro p{color:#bcd6dc!important}
html[data-zh-theme="night"] .portal-gateway-path li{background:linear-gradient(160deg,#153641,#102b35)!important;border-color:#416471!important}
html[data-zh-theme="night"] .portal-gateway-path li b{color:#ecf9fa!important}
html[data-zh-theme="night"] .portal-gateway-path li p{color:#bdd8dd!important}
html[data-zh-theme="night"] .portal-gateway-path li>span{background:#22533f!important;color:#b4ffdb!important}
html[data-zh-theme="night"] .portal-gateway-page .portal-login-shell>.portal-login-brand{background:#0d2732!important;border-color:#375963!important}
/* Day mode remains owned by portal.css; these rules are Night-scoped. */


/* Dev1.8 — evidence-driven fixes: authenticated portal screenshots 2026-10-10.
   All semantic corrections are Night-only. Day-mode portal.css is unchanged. */
html[data-zh-theme="night"] .portal-main .portal-client-journey{
 background:#13323f!important;border-color:#436471!important;color:#effaff!important;
 background-image:none!important;
}
html[data-zh-theme="night"] .portal-main .portal-client-journey .portal-panel-head :is(h2,p){color:#ecf9fb!important}
html[data-zh-theme="night"] .portal-main .portal-client-journey .portal-panel-head p{color:#bdd7de!important}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step{
 background:#1b3d49!important;color:#d0e6e9!important;border:1px solid #41616d!important;
}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step :is(b,small){color:inherit!important}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step i{
 background:#355967!important;color:#d2e8ee!important;
}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step.complete{
 background:#1b423f!important;color:#d0f2df!important;border-color:#3f7463!important;
}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step.complete i{background:#245c43!important;color:#a8ffce!important}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step.current{
 background:#1a5844!important;color:#f0fff7!important;border-color:#71d3aa!important;
 box-shadow:inset 0 0 0 1px #399f72!important;
}
html[data-zh-theme="night"] .portal-main .portal-client-journey-step.current i{background:#69f4af!important;color:#053025!important}
/* Proposals: keep record stamps fully legible on dark green instead of pale mint on white. */
html[data-zh-theme="night"] .portal-main .acceptance-record{
 background:#183f35!important;border-color:#428568!important;color:#ecfff6!important;
}
html[data-zh-theme="night"] .portal-main .acceptance-record span{color:#9bffd0!important}
html[data-zh-theme="night"] .portal-main .acceptance-record :is(b,strong){color:#f3fff9!important}
html[data-zh-theme="night"] .portal-main .acceptance-record small{color:#c2e3d4!important}
/* Finance counters are articles INSIDE .portal-finance-mini; the outer grid is not the card. */
html[data-zh-theme="night"] .portal-main .portal-finance-mini article{
 background:#153743!important;background-image:none!important;
 border:1px solid #4b707b!important;color:#e8f7f8!important;
}
html[data-zh-theme="night"] .portal-main .portal-finance-mini article span{color:#bfe1e5!important}
html[data-zh-theme="night"] .portal-main .portal-finance-mini article b{color:#f0fcfc!important}
/* Documents: .file-picker is a styled label; the actual file input is hidden. */
html[data-zh-theme="night"] .portal-main .upload-panel .file-picker{
 background:#163944!important;border:1px dashed #5e8491!important;
 color:#e8fafa!important;
}
html[data-zh-theme="night"] .portal-main .upload-panel .file-picker span[data-file-name]{color:#d6edf1!important}
html[data-zh-theme="night"] .portal-main .upload-panel .file-picker:hover{background:#1b4651!important;border-color:#7bd3b3!important}
html[data-zh-theme="night"] .portal-main .upload-panel .file-picker:focus-within{
 outline:2px solid #74f4c5!important;outline-offset:2px;
}
/* Finance review CTA: saturated mint always gets DARK foreground. */
html[data-zh-theme="night"] .portal-main :is(a,button).portal-btn.mint{
 color:#07372b!important;text-shadow:none!important;
}
html[data-zh-theme="night"] .portal-main :is(a,button).portal-btn.mint:hover{color:#052b23!important}
/* Email destinations on dark notes should behave like links, not invisible navy text. */
html[data-zh-theme="night"] .portal-main :is(.portal-info-note,.portal-panel,.portal-page-head) a[href^="mailto:"]{
 color:#85f7c9!important;text-decoration:underline!important;text-underline-offset:3px;
}
html[data-zh-theme="night"] .portal-main :is(.portal-info-note,.portal-panel,.portal-page-head) a[href^="mailto:"]:hover{
 color:#c9ffe5!important;
}


/* Dev1.9 — owner-approved final portal dark appearance micro-polish.
   All authenticated controls scoped to Night, retaining Day mode unchanged. */
html[data-zh-theme="night"] .portal-main .portal-panel-head>span{
  color:#d4edf2!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary,
html[data-zh-theme="night"] .portal-main .portal-account-disclosure[open]>summary{
  background:#173944!important; background-image:none!important;
  color:#edfafa!important; border-bottom-color:#426570!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary b{
  color:#effcfa!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary small{
  color:#b9d9de!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary>span{
  color:#9cebcf!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary::before{
  background:#244b59!important; color:#b7f7de!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary:hover{
  background:#204953!important;
}
html[data-zh-theme="night"] .portal-main .portal-account-disclosure>summary:focus-visible{
  outline:2px solid #80f4cf;outline-offset:-2px;
}
/* Counts are informational accents; give dark tab chips a deliberate surface. */
html[data-zh-theme="night"] .portal-main .portal-project-tabs a span{
  background:#264c57!important; color:#ebfafa!important;
  border:1px solid #58848c!important;
}
html[data-zh-theme="night"] .portal-main .portal-project-tabs a.active span{
  background:#a9fbd7!important; color:#073d2b!important;
  border-color:#a9fbd7!important;
}
/* Public client-portal landing: select the approved, actual dark-mode ZH Digital
   artwork rather than leaving the original low-contrast tagline on navy. */
.portal-gateway-page .portal-gateway-logo-night{display:none!important}
html[data-zh-theme="night"] .portal-gateway-page .portal-gateway-logo-day{display:none!important}
html[data-zh-theme="night"] .portal-gateway-page .portal-gateway-logo-night{
  display:block!important;
}


/* Dev1.10 — cache-safe styling and stable single-image brand treatment.
   The previous gateway HTML inserted two brand images while the portal CSS URL
   remained frozen at Dev1.6; a cached stylesheet displayed BOTH logos. */
html[data-zh-theme="night"] body.portal-gateway-page .portal-login-brand img.portal-gateway-logo {
  content:url("/after-dark/assets/logo-dark-APPROVED.png")!important;
}
/* Authenticated success messages must never put pale mint text on pale mint. */
html[data-zh-theme="night"] .portal-main .portal-flash.ok {
  background:#154b3a!important;
  background-image:none!important;
  color:#eafff5!important;
  border:1px solid #4b9979!important;
}
html[data-zh-theme="night"] .portal-main .portal-flash.ok :is(b,strong,span,a){color:#eafff5!important}
/* Team counts and accordion summary text: explicit dark-surface contrast. */
html[data-zh-theme="night"] .portal-main .portal-panel-head>span{color:#daedf3!important}
html[data-zh-theme="night"] .portal-main details.portal-account-disclosure>summary,
html[data-zh-theme="night"] .portal-main details.portal-account-disclosure[open]>summary{
 background:#173944!important; background-image:none!important; color:#effbfb!important;
}
html[data-zh-theme="night"] .portal-main details.portal-account-disclosure>summary :is(b,small){color:#edfafa!important}
html[data-zh-theme="night"] .portal-main details.portal-account-disclosure>summary small{color:#c7e3e8!important}

/* Dev1.11 — readable active service names/types in the authenticated portal.
   Previous portal.css declares these in dark navy/slate, overriding the row's
   otherwise correct Night-mode surface. Preserve status, amounts, links, Day. */
html[data-zh-theme="night"] .portal-main .portal-service-list .portal-service-row > div:first-child > b {
  color:#eefcfc!important;
}
html[data-zh-theme="night"] .portal-main .portal-service-list .portal-service-row > div:first-child > small {
  color:#bedde3!important;
}
