/* William, 27 October 2026: "Make sure the colours of the crm feel saas".
   Staff only (body:not(.ro)); the landlord app and customer portals keep
   their reviewed shell. The CRM works on a cool neutral ground with flat
   white surfaces, and forest stays the one brand colour: the sidebar, the
   header, the primary action and the current item. The warm green-cream
   gradient and the long soft shadows read as a marketing page, not a tool.
   The governed names (--forest, --green, --sage, --mint, --ink, --line) are
   untouched; only the page's own ground and elevation change here.
   docs/standards/design/colour.md, decision 2026-10-27.
   William, 1 November 2026: "Can we do the colours exactly like this for
   the crm?" on navy-sidebar, blue-action references. The bridge now maps
   the CRM's green names onto core.color.crm (body.nzr-crm); this file sets
   the chrome those names do not reach: the navy sidebar and phone header,
   and the slate ground behind the work. */
body:not(.ro){
 --crm-ground:var(--nzr-core-color-crm-ground);
 --crm-subtle:var(--nzr-core-color-crm-subtle);
 --mute:var(--nzr-core-color-crm-mute);
 --crm-shadow:0 1px 2px rgba(16,24,40,.05);
 --paper:var(--crm-ground);
 --off:var(--crm-ground);
 background:var(--crm-ground);
}
body.staff-concept{background:var(--crm-ground)}

/* Surfaces: white, one hairline, a 1px shadow. No coloured glow. Corner radii
   are unchanged, so the pages framed in the CRM (Maintenance) still match. */
body:not(.ro) :is(.panel,.sc-card,.sc-table-wrap,#scPanel>#propertyFacts,.mwb,.mw-focus,.mw-card,.mw-day,.mw-greeting,.pb-brief,.pb-hero,.kpi,.jhead,.stage,.pqe,.lease-card,.comm-centre,.leave-policy-card,.pf-card,.vp-score,.pz-score,.pz-stage,.dm-hero,.property-workspace-toggle,.portfolio-digest-toggle,#propertyDirectoryPanel){box-shadow:var(--crm-shadow)}

/* Text on a white surface is ink and grey; green is kept for what you can
   press and what is current, so the eye goes to the action, not the title. */
body:not(.ro) :is(.panel,.sc-card,.mwb,.mw-focus,.mw-card,.pb-brief) :is(h2,h3,h4){color:var(--ink)}
body:not(.ro) :is(.panel,.sc-card,.mwb,.mw-focus,.mw-card,.pb-brief) :is(.eyebrow,.hr-kicker){color:var(--mute)}
body:not(.ro) .sc-table thead{background:var(--crm-subtle)}

/* Page headers are part of the page, not a banner over it. Today's greeting
   and the Inbox head were the last dark-green gradient heroes in the work
   area (swept across every sidebar section, 30 October 2026); they become
   the same white surface as everything else, with ink titles. The ink title
   rule above had already reached the Inbox head and left "Inbox" near-black
   on forest, so these two have to move together. */
body:not(.ro) :is(.mw-greeting,.inbox-head){background:#fff;color:var(--ink)}
body:not(.ro) .mw-greeting{border:1px solid var(--line)}
body:not(.ro) .mw-greeting:after{display:none}
body:not(.ro) .inbox-head{border-bottom:1px solid var(--line)}
body:not(.ro) :is(.mw-greeting,.inbox-head) :is(h2,.mw-profile-line,.mw-profile-line strong,.mw-quote blockquote){color:var(--ink)}
body:not(.ro) :is(.mw-greeting,.inbox-head) :is(.mw-kicker,.inbox-kicker,p,.mw-greeting-copy a,.mw-quote cite){color:var(--mute)}
body:not(.ro) .mw-profile-line span{color:var(--forest);background:var(--mint);border-color:var(--line)}
body:not(.ro) .mw-profile-photo{border-color:var(--line);box-shadow:none}
body:not(.ro) .mw-quote{border-left-color:var(--line)}
body:not(.ro) .inbox-head .comm-safety{background:var(--mint);color:var(--forest)}
body:not(.ro) .inbox-tabs{background:var(--crm-subtle)}

/* In the references blue is for what you press and what is selected; a
   secondary button and a count read in ink. Selected ghost buttons keep
   their blue fill and white label. */
body.nzr-crm:not(.ro) #appMain :is(.btn.ghost,.sc-button:not(.sc-primary):not(.sc-text)):not([aria-pressed=true]):not(.active):not([aria-selected=true]):not([aria-current]){color:var(--ink)}
body.nzr-crm:not(.ro) :is(.mw-count,.pb-brief-kpi b){color:var(--ink)}
body.nzr-crm:not(.ro) :is(.mobile-tools-menu-head,.mobile-tools-menu>.btn.ghost:not(.mtm-current),.mobile-tools-menu>a.btn.ghost:not(.mtm-current)){color:var(--ink)}

/* Chrome. William, 2026-11-02: "Can we just made the side bar white as
   well?" The desk sidebar is white with a hairline, the name in navy and the
   green emblem; items read in ink, section labels in mute, and the current
   page is the blue tint with blue text, as it is everywhere else in the
   CRM. William, the same day, on the navy phone header: "White or green
   please". White, so the phone matches the desk: the header is a white bar
   with a hairline, the name in navy, the green emblem, and the search field
   the same subtle grey as on the desk. Green is the customer portals' colour
   and stays out of the CRM. */
@media(max-width:900px){
 body.nzr-crm:not(.ro)>.top{background:#fff;color:var(--ink);border-bottom:1px solid var(--line)}
 body.nzr-crm:not(.ro)>.top .top-brand>a img{content:url(../nzr-logo.png)}
 body.nzr-crm:not(.ro)>.top h1{color:var(--nzr-core-color-site-green)}
 body.nzr-crm:not(.ro)>.top :is(h1 span,#brandMode,.tag){color:var(--mute)}
 body.nzr-crm:not(.ro)>.top .command-search .field{background:var(--crm-subtle);border-color:var(--line)}
 body.nzr-crm:not(.ro)>.top .command-search svg{color:var(--mute)}
 body.nzr-crm:not(.ro)>.top .command-search input{color:var(--ink)}
 body.nzr-crm:not(.ro)>.top .command-search input::placeholder{color:var(--mute)}
 body.nzr-crm:not(.ro)>.top .command-search .field:focus-within{background:#fff;border-color:var(--forest)}
}
body:not(.ro) .mw-profile-photo{background:var(--nzr-core-color-cover-sage);color:var(--nzr-core-color-site-green)}
@media(min-width:901px){
 body.staff-concept>.top .command-search .field{background:var(--crm-subtle)}
 body.nzr-crm .staff-concept #scSidebar,body.nzr-crm.staff-concept #scSidebar{background:#fff;color:var(--ink);border-right:1px solid var(--line)}
 body.nzr-crm.staff-concept #scSidebar .sc-brand{color:var(--nzr-core-color-site-green)}
 body.nzr-crm.staff-concept #scSidebar button{color:var(--ink)}
 body.nzr-crm.staff-concept #scSidebar button:hover{background:var(--crm-subtle);color:var(--ink)}
 body.nzr-crm.staff-concept #scSidebar :is([aria-current=page],.sc-nav-sub button[aria-current=page]){background:var(--mint);color:var(--forest);font-weight:600}
 body.nzr-crm.staff-concept #scSidebar :is([data-sc-group]>h2,details>summary,.sc-rail-foot,.sc-nav-sub-h,.sc-nav-sub-g){color:var(--mute)}
 body.nzr-crm.staff-concept #scSidebar :is(.sc-account,.sc-nav-sub,.sc-nav-more-pages){border-color:var(--line)}
 body.nzr-crm.staff-concept #scSidebar .sc-nav-more[aria-current=true]{color:var(--forest)}
 body.nzr-crm.staff-concept #scSidebar nav{scrollbar-color:var(--line) transparent}
 body.nzr-crm.staff-concept #scNavSearch{background:var(--crm-subtle);border:1px solid var(--line);color:var(--ink)}
 body.nzr-crm.staff-concept #scSidebar :is(details>summary,#scNavSearch,button):focus-visible{outline-color:var(--forest)}
}

/* William, 2026-11-05: "Can we do an mix of the green and the new white
   version". White and slate carry the layout; NZR green is the accent again
   (the bridge maps --forest to green-mid), the name reads in the house green,
   and the initials tile is sage with a green letter, as it was before the
   navy palette. */
