/* Canonical screen palette. Content families and semantic states are independent.
   Text pairs are opaque so their contrast does not depend on the ambient gradient.
   Printed documents retain their existing print styles. */
@media screen {
 :root {
  --nc-page:#15332f;--nc-panel:#203b38;--nc-field:#142e2b;--nc-raised:#2a4542;
  --nc-text:#f5faf7;--nc-body:#e3ede8;--nc-muted:#becfc6;--nc-hint:#aabeb4;--nc-line:#7f9e92;
  --nc-primary:#bdeed5;--nc-primary-ink:#12382b;--nc-focus:#a5e3f6;--nc-link:#b9e8f6;
  --nc-jade:#24483d;--nc-jade-accent:#b6e6ce;--nc-petrol:#233f4b;--nc-petrol-accent:#b9e8f6;
  --nc-plum:#40394f;--nc-plum-accent:#dfcef2;--nc-slate:#30414e;--nc-slate-accent:#ccddec;
  --nc-neutral-surface:#303e43;--nc-neutral:#d4dfe5;
  --nc-success-surface:#234637;--nc-success:#bcebd0;
  --nc-info-surface:#253f53;--nc-info:#b9e3fb;
  --nc-planned-surface:#443853;--nc-planned:#e1cff7;
  --nc-waiting-surface:#4d3e25;--nc-waiting:#ffe0a8;
  --nc-urgent-surface:#512f36;--nc-urgent:#ffd0cd;--nc-favorite:#f3db82;
 }
 body:is(.nt-console,.nt-field,.nt-offline) {color:var(--nc-body);background:radial-gradient(ellipse at 0 0,#64dbaa24,transparent 42%),radial-gradient(ellipse at 100% 5%,#b894f526,transparent 45%),linear-gradient(150deg,#15392f,#172f37 55%,#302d43)}
 body:is(.nt-console,.nt-field,.nt-offline) {--ui-success:var(--nc-success);--ui-info:var(--nc-info);--ui-planned:var(--nc-planned);--ui-waiting:var(--nc-waiting);--ui-urgent:var(--nc-urgent);--ui-neutral:var(--nc-neutral);--muted:var(--nc-muted);--nt-readable:var(--nc-muted)}
 body.nt-console :is(.glass,.workspace),body.nt-field .layout>section {background:var(--nc-panel)!important;box-shadow:0 15px 38px #07182033,inset 0 1px #ffffff16!important;border-color:#a4c7b94d!important}
 body.nt-console :is(h1,h2,h3,h4,strong,label),body.nt-field :is(h1,h2,h3,label) {color:var(--nc-text)}
 body.nt-console :is(.meta,.help,.muted,.caption,.mobile-help,.revenue-card small,.nt-message-reference,.nt-muted,.intro,.hint,.field-help,.nt-timeline time,.nt-timeline span,.note-foot,.nt-agenda-caption,.nt-agenda-count) {color:var(--nc-muted)!important;opacity:1}
 body.nt-console .eyebrow {color:var(--nc-muted)!important}
 body.nt-console :is(.nt-client-name,.stat strong,.summary strong,.nt-metrics strong,.revenue-card strong,.amount,.pricing-total) {color:var(--nc-text)!important}
 body.nt-console :is(.nt-record a,.meta a,.nt-return-list,.invoice-view-link),body.nt-field a {color:var(--nc-link)!important;text-underline-offset:4px}
 /* Family assignment is based on the content, never its list position. */
 body.nt-console [data-color-family=jade] {--content-surface:var(--nc-jade);--content-line:#b6e6ce55;--content-glow:#b6e6ce08;--nc-accent:var(--nc-jade-accent)}
 body.nt-console [data-color-family=petrol] {--content-surface:var(--nc-petrol);--content-line:#b9e8f655;--content-glow:#b9e8f608;--nc-accent:var(--nc-petrol-accent)}
 body.nt-console [data-color-family=plum] {--content-surface:var(--nc-plum);--content-line:#dfcef255;--content-glow:#dfcef208;--nc-accent:var(--nc-plum-accent)}
 body.nt-console [data-color-family=slate] {--content-surface:var(--nc-slate);--content-line:#ccddec55;--content-glow:#ccddec08;--nc-accent:var(--nc-slate-accent)}
 body.nt-console :is(.stat,.summary>article,.nt-metrics>article,.revenue-card,.mobile-quick-grid a) {background:var(--content-surface,var(--nc-raised))!important;border-color:var(--content-line,#ccddec55)!important;box-shadow:inset 0 3px var(--nc-accent,var(--nc-neutral))!important;color:var(--nc-text)!important}
 body.nt-console :is(.panel,.form-panel,.form-section,.client-create-card,.client-row,.event-row,.calendar-panel,.today-panel,.sync-panel,.intervention-card,.invoice-card,.subscription,.contract-row,.monthly-review,.inventory-card,.tech-card,.technician-panel,.security-panel,.nt-record-group,.nt-day-section,.pricing-box,.billing-adjustments,.monthly-form fieldset,.notebook-sidebar,.note-pane,.editor-meta) {background:var(--content-surface,var(--nc-raised))!important;border-color:var(--content-line,#a4c7b940)!important}
 body.nt-console :is(.nt-record-list>.nt-record,.subscription-details,.inventory-metrics span) {background:var(--nc-panel)!important;color:var(--nc-body)!important;border-color:#a4c7b933!important}
 body.nt-console :is(.record-search,.list-filter,.filters,.nt-day-filter,.inventory-filters,.invoice-filters,.nt-filter-drawer,.note-search,.report-filter,.filter,.nt-agenda-toolbar) {background:var(--nc-petrol)!important;border-color:#b9e8f655!important}
 body.nt-console :is(.empty,.empty-list,.editor-empty,.mobile-result,.nt-clipboard-entry,.mobile-backup-list article,.mobile-passkey-list>div,.share-panel,.history-row,.setup,.sync-result) {background:var(--nc-panel)!important;color:var(--nc-muted)!important;border-color:#a4c7b94d!important}
 body.nt-console :is(.section-count,.client-card-count,.type-chip,.inventory-metrics span,.nt-record-group>summary b) {background:var(--nc-neutral-surface)!important;color:var(--nc-neutral)!important;border-color:#a4c7b955!important}
 /* Selection is an outlined/tinted surface; primary action remains mint filled. */
 body.nt-console :is(.admin-nav-icon.is-current,.admin-nav-group.is-open>.admin-nav-toggle,.admin-nav-menu .is-current,.sidebar-link.is-active,.nt-thread[aria-current=true],.nt-fold-dock a[aria-current=page]),body.nt-console .shell .nt-page-tabs>button[aria-selected=true],body.nt-console .nt-agenda-segment button[aria-pressed=true],body.nt-field #records button[aria-pressed=true] {background:var(--nc-info-surface)!important;color:var(--nc-info)!important;border:1px solid var(--nc-info)!important;box-shadow:inset 3px 0 var(--nc-info)!important}
 body.nt-console .admin-nav-menu :is(a,button):hover {background:#ffffff10!important;color:var(--nc-text)!important;box-shadow:none!important}
 body.nt-console :is(.admin-nav-icon,.admin-nav-toggle,.nt-fold-menu-button) {color:var(--nc-body)!important}
 body.nt-console :is(button[type=submit],.button,.mobile-primary,[data-color-action=primary]),body.nt-field button:not(.secondary) {background:var(--nc-primary)!important;color:var(--nc-primary-ink)!important;border:1px solid #dcfae9!important;box-shadow:none!important}
 body.nt-console form>button[type=submit]:not(.secondary):not(.danger):not(.is-destructive):not(.cancel) {background:var(--nc-primary)!important;color:var(--nc-primary-ink)!important;border-color:#dcfae9!important}
 body.nt-console :is(.button.secondary,button.secondary,.mobile-secondary,[data-color-action=secondary],.nt-agenda-segment button:not([aria-pressed=true])),body.nt-field button.secondary {background:var(--nc-raised)!important;color:var(--nc-body)!important;border:1px solid var(--nc-line)!important;box-shadow:none!important}
 body.nt-console :is(button,a).nc-danger,body.nt-console :is(.danger,.is-destructive,.note-delete,.task-remove),body.nt-field :is(.is-destructive,#remove) {background:var(--nc-urgent-surface)!important;color:var(--nc-urgent)!important;border:1px solid var(--nc-urgent)!important;box-shadow:none!important}
 body.nt-console form>button[type=submit].nc-danger {background:var(--nc-urgent-surface)!important;color:var(--nc-urgent)!important;border-color:var(--nc-urgent)!important}
 body.nt-console :is(button,a).nc-cancel {background:var(--nc-raised)!important;color:var(--nc-body)!important;border:1px solid var(--nc-line)!important}
 body.nt-console :is(button,input,select,textarea,a)[disabled],body.nt-console [aria-disabled=true],body.nt-field button:disabled {background:#344440!important;color:#bac8c0!important;border-color:#74877e!important;opacity:1!important;box-shadow:none!important;cursor:not-allowed}
 body.nt-console :is(a,button,input,select,textarea,summary):focus-visible,body.nt-field :is(a,button,input,select,textarea,summary):focus-visible {outline:3px solid var(--nc-focus)!important;outline-offset:3px!important}
 @media(hover:hover){body.nt-console :is(button,a.button):not(:disabled):hover {filter:brightness(1.08)}body.nt-console .mobile-quick-grid a:hover {outline:1px solid var(--nc-accent);outline-offset:1px}}
 /* Field states: authored, example, read-only, disabled and invalid remain distinct. */
 body.nt-console :is(input,select,textarea):not(.sticky-note *):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=hidden]),body.nt-field :is(input,select,textarea) {background:var(--nc-field)!important;color:var(--nc-text)!important;border:1px solid var(--nc-line)!important}
 body.nt-console :is(input,textarea):not(.sticky-note *)::placeholder,body.nt-field :is(input,textarea)::placeholder {color:var(--nc-hint)!important;opacity:1;font-style:italic}
 body.nt-console :is(input,textarea)[readonly]:not(.sticky-note *) {background:#2d423c!important;color:var(--nc-body)!important;border-style:dashed!important}
 body.nt-console :is(input,select,textarea):disabled:not(.sticky-note *) {background:#344440!important;color:#bac8c0!important;opacity:1!important}
 body.nt-console :is(input,select,textarea):is([aria-invalid=true],:user-invalid),body.nt-field :is(input,select,textarea):user-invalid {border:2px solid var(--nc-urgent)!important}
 body.nt-console :is(input[type=checkbox],input[type=radio]),body.nt-field :is(input[type=checkbox],input[type=radio]) {accent-color:var(--nc-primary)}
 /* Tables use quiet opaque rows, not a stack of translucent layers. */
 body.nt-console :is(.table-wrap,.table-responsive,.pwa-table-scroll,.invoice-list) {background:var(--nc-panel)!important}
 body.nt-console table thead th {background:var(--content-surface,var(--nc-slate))!important;color:var(--nc-text)!important;border-bottom-color:var(--nc-line)!important}
 body.nt-console table tbody td {background:var(--nc-panel);color:var(--nc-body)!important;border-bottom-color:#a4c7b940!important}
 body.nt-console table tbody tr:nth-child(even) td {background:#29423e}
 body.nt-console table tbody tr:hover td {background:#344e48}
 body.nt-console table tbody tr[aria-selected=true] td {background:var(--nc-info-surface)!important;border-block-color:var(--nc-info)!important}
 body.nt-console table tbody tr:focus-within td {outline-color:var(--nc-focus)}
 /* One mapping for badges, tile borders and legends. */
 body.nt-console :is(.nt-state,[data-save-tone]),body.nt-field [data-save-tone] {--state:var(--nc-neutral);--state-bg:var(--nc-neutral-surface);color:var(--state)!important;background:var(--state-bg)!important;border:1px solid var(--state)!important;opacity:1}
 body.nt-console :is([data-tone=success],[data-save-tone=success]),body.nt-field [data-save-tone=success] {--state:var(--nc-success);--state-bg:var(--nc-success-surface)}
 body.nt-console :is([data-tone=info],[data-save-tone=info]),body.nt-field [data-save-tone=info] {--state:var(--nc-info);--state-bg:var(--nc-info-surface)}
 body.nt-console :is([data-tone=planned],[data-save-tone=planned]),body.nt-field [data-save-tone=planned] {--state:var(--nc-planned);--state-bg:var(--nc-planned-surface)}
 body.nt-console :is([data-tone=waiting],[data-save-tone=waiting]),body.nt-field [data-save-tone=waiting] {--state:var(--nc-waiting);--state-bg:var(--nc-waiting-surface)}
 body.nt-console :is([data-tone=urgent],[data-save-tone=urgent]),body.nt-field [data-save-tone=urgent] {--state:var(--nc-urgent);--state-bg:var(--nc-urgent-surface)}
 body.nt-console :is(.save-state,.mobile-draft-status,.nt-message-save),body.nt-field #save-state {padding:6px 10px;border-radius:8px;font-size:.85rem;display:inline-block}
 body.nt-console .calendar-panel .event {background:var(--nc-panel)!important;color:var(--nc-text)!important;opacity:1!important;border-left:3px solid var(--nc-planned)!important}
 body.nt-console .calendar-panel .event.confirmed {border-left-color:var(--nc-info)!important}
 body.nt-console .calendar-panel .event.done {border-left-color:var(--nc-success)!important}
 body.nt-console .calendar-panel .event.cancelled {border-left-color:var(--nc-neutral)!important}
 body.nt-console .calendar-panel .event span {color:var(--nc-body)}
 body.nt-console .legend>span {color:var(--nc-planned)}body.nt-console .legend>.confirmed {color:var(--nc-info)}body.nt-console .legend>.done {color:var(--nc-success)}body.nt-console .legend>.cancelled {color:var(--nc-neutral)}
 body.nt-console .day.today {outline:2px solid var(--nc-focus);outline-offset:2px}
 /* Feedback does not borrow the document-family purple. */
 body.nt-console :is(.error,.inventory-error,.mobile-message.is-error,.nt-form-feedback),body.nt-field #status[data-save-tone=urgent] {background:var(--nc-urgent-surface)!important;color:var(--nc-urgent)!important;border-color:var(--nc-urgent)!important}
 body.nt-console :is(.feedback,.mobile-message.is-success) {background:var(--nc-success-surface)!important;color:var(--nc-success)!important;border-color:var(--nc-success)!important}
 body.nt-console :is(.pwa-offline-status,.mobile-draft-banner),body.nt-field #conflict {background:var(--nc-waiting-surface)!important;color:var(--nc-waiting)!important;border-color:var(--nc-waiting)!important}
 body.nt-field #conflict :is(h3,p,pre) {color:var(--nc-waiting)}
 body.nt-console :is(.mobile-alert.is-red,.mobile-alert-summary .is-red) {background:var(--nc-urgent-surface)!important;color:var(--nc-urgent)!important;border-color:var(--nc-urgent)!important}
 body.nt-console :is(.mobile-alert.is-orange,.mobile-alert-summary .is-orange) {background:var(--nc-waiting-surface)!important;color:var(--nc-waiting)!important;border-color:var(--nc-waiting)!important}
 body.nt-console :is(.mobile-alert.is-green,.mobile-alert-summary .is-green) {background:var(--nc-success-surface)!important;color:var(--nc-success)!important;border-color:var(--nc-success)!important}
 body.nt-console .mobile-alert :is(strong,small) {color:inherit!important}
 body.nt-console .nt-alert-client {background:var(--nc-panel);border-color:var(--nc-waiting)}
 body.nt-console .nt-alert-client>summary span {color:var(--nc-waiting)}
 body.nt-console .nt-messenger-list,body.nt-console .nt-messenger-pane>article {background:var(--nc-petrol)!important;border-color:#b9e8f655!important}
 body.nt-console .nt-messenger .message {background:var(--nc-info-surface)!important;border-color:#b9e3fb66!important;color:var(--nc-text)!important}
 body.nt-console .nt-messenger .message.is-own {background:var(--nc-jade)!important;border-color:#b6e6ce66!important}
 body.nt-console .nt-messenger .message-head,body.nt-console .nt-thread small {color:var(--nc-muted)!important}
 body.nt-console .nt-unread {background:var(--nc-info)!important;color:#183448!important;font-weight:700}
 body.nt-console .nt-message-file {background:var(--nc-plum)!important;color:var(--nc-plum-accent)!important;border-color:#dfcef288!important}
 body.nt-console .editor-toolbar {background:var(--nc-slate)!important}
 body.nt-console [data-note-favorite].is-active {background:#4a4125!important;color:var(--nc-favorite)!important;border-color:var(--nc-favorite)!important}
 body.nt-console .canvas-wrap,body.nt-console .note-canvas {background:#f4f1e7!important;color:#192d26;color-scheme:light}
 /* Personal note colours are opaque and readable independently of the board. */
 body.nt-console .sticky-note {color:#183328!important;backdrop-filter:none}
 body.nt-console .sticky-note[data-color=mint] {background:#c7e9d5!important}
 body.nt-console .sticky-note[data-color=cyan] {background:#c5e7ed!important}
 body.nt-console .sticky-note[data-color=amber] {background:#f0dfb8!important}
 body.nt-console .sticky-note[data-color=violet] {background:#e0d4f0!important}
 body.nt-console .sticky-note[data-color=coral] {background:#f0d2c9!important}
 body.nt-console .sticky-note :is(input,textarea,select) {background:#ffffff5c!important;color:#183328!important;border:1px solid #506f61!important;color-scheme:light}
 body.nt-console .sticky-note :is(input,textarea)::placeholder {color:#425d50!important;opacity:1}
 body.nt-console .sticky-note .note-drag-handle {color:#314f40!important}
 body.nt-console .sticky-note .note-save {background:#234637!important;color:#f5faf7!important}
 body.nt-console .board-hint {color:var(--nc-muted)!important}
 body.nt-field #records button {background:var(--nc-slate)!important;color:var(--nc-text)!important}
 body.nt-field .notice {background:var(--nc-info-surface)!important;color:var(--nc-info)!important}
 body.nt-offline main {background:var(--nc-panel);border:1px solid var(--nc-line);border-radius:22px}
 body.nt-offline a {background:var(--nc-primary);color:var(--nc-primary-ink)}
 body.nt-offline p {color:var(--nc-muted)}
 @media(prefers-reduced-transparency:reduce){body:is(.nt-console,.nt-field,.nt-offline){background:var(--nc-page)}body.nt-console :is(header,.admin-nav-menu,dialog),body.nt-field header {backdrop-filter:none!important;background:var(--nc-panel)!important}}
 @media(prefers-contrast:more){body:is(.nt-console,.nt-field){--nc-muted:#e0ece5;--nc-hint:#ccddd3;--nc-line:#b8d3c5}body.nt-console :is(.nt-state,.button,input,select,textarea){border-width:2px!important}}
}
@media screen {
 body.nt-console .nt-agenda-segment button.secondary[aria-pressed=true] {background:var(--nc-info-surface)!important;color:var(--nc-info)!important;border:1px solid var(--nc-info)!important;box-shadow:inset 3px 0 var(--nc-info)!important}
 body.nt-console .nt-state {display:inline-flex;gap:6px;align-items:center;padding:5px 10px;border-radius:999px;font-weight:700}
 body.nt-console .mobile-alert-summary .is-red::before {content:'⚠ '}
 body.nt-console .mobile-alert-summary .is-orange::before {content:'! '}
 body.nt-console .mobile-alert-summary .is-green::before {content:'◷ '}
 body.nt-console .nt-clipboard-control {background:var(--nc-raised)!important;color:var(--nc-link)!important;border-color:var(--nc-line)!important}
 body.nt-console .sticky-note .note-color {color:#183328!important}
}

@media screen { body.nt-console .sticky-note button.note-delete.nc-danger {background:var(--nc-urgent-surface)!important;color:var(--nc-urgent)!important;border:1px solid var(--nc-urgent)!important;opacity:1!important} }
