.sidebar .brand{display:flex;flex-direction:column;gap:9px;align-items:flex-start;padding:8px 0 22px}.sidebar .brand>img{width:100%;max-width:185px;height:65px;object-fit:contain}.sidebar .brand>span{font-size:18px;line-height:1.3}.sidebar .brand small{font-size:11px;letter-spacing:1px;margin-top:5px}html[data-theme=dark] .sidebar .brand>img{background:#f5f6fa;border-radius:9px;padding:8px}.staff-reports-view .layout{grid-template-columns:minmax(0,1fr)}.staff-reports-view #main{min-width:0}.staff-reports-view .widget-column{display:none}.staff-report-filter{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;margin-bottom:18px}.staff-report-filter .field{flex:1;min-width:170px}.staff-report-filter .control{width:100%}.staff-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:12px;margin:22px 0}.staff-kpis>div{padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.staff-kpis small{display:block;min-height:34px;color:var(--muted);font-size:13px}.staff-kpis strong{font-size:27px}.staff-chart{padding:20px;border:1px solid var(--line);border-radius:14px;margin:22px 0}.staff-chart-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:13px}.staff-chart-legend span:nth-child(1){color:#43768b}.staff-chart-legend span:nth-child(2){color:#9366a5}.staff-chart-legend span:nth-child(3){color:#548d74}.staff-chart-row{display:grid;grid-template-columns:65px minmax(0,1fr);gap:15px;align-items:center;margin:15px 0}.staff-chart-row strong{font-size:13px}.staff-bar{position:relative;margin:3px 0;font-size:12px;padding:4px 8px;isolation:isolate}.staff-bar:before{content:'';position:absolute;z-index:-1;inset:0 auto 0 0;width:var(--bar);min-width:2px;background:#c7dfe7;border-radius:4px}.staff-bar.design:before{background:#e3d7ed}.staff-bar.production:before{background:#cfe3d8}html[data-theme=dark] .staff-bar:before{opacity:.2}.vault-password{padding:20px;border:1px solid var(--line);border-radius:10px;font:16px ui-monospace,monospace;word-break:break-all;user-select:all;margin-top:16px}.vault-password:empty{display:none}.staff-password-eye{vertical-align:middle}.message-dialog{width:min(600px,calc(100vw - 28px))!important;max-width:600px}.staff-messenger{display:flex;flex-direction:column;gap:12px;min-height:0}.staff-messenger>.field{margin:0}.message-list{display:flex;flex-direction:column;gap:12px;height:min(42vh,370px);min-height:160px;overflow-y:auto;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--bg,#edf2f8);overscroll-behavior:contain}.message-bubble{max-width:86%;border:1px solid var(--line);border-radius:12px;padding:10px 13px;background:var(--surface,#fff);align-self:flex-start;overflow-wrap:anywhere}.message-bubble.outgoing{align-self:flex-end;background:#dce9f5;color:#203c56}.message-bubble p{white-space:pre-wrap;margin:0 0 6px;font-size:14px;line-height:1.5}.message-bubble small{font-size:11px;opacity:.75}.message-empty{margin:auto;color:var(--muted);text-align:center;font-size:14px}#message-form{display:flex;align-items:flex-end;gap:10px}#message-form textarea{resize:vertical;min-height:70px;max-height:150px;flex:1;width:100%}.staff-messenger>small{font-size:12px;color:var(--muted);line-height:1.5}html[data-theme=dark] .message-bubble.outgoing{background:#2b485e;color:#e1edf8}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:650px){.sidebar .brand{flex-direction:row;padding:5px;align-items:center}.sidebar .brand>img{max-width:110px;height:45px}.sidebar .brand>span{font-size:14px}.staff-report-filter .button{flex:1}.staff-chart{padding:12px}.staff-chart-row{grid-template-columns:50px minmax(0,1fr);gap:8px}.message-dialog{padding:16px!important}.message-bubble{max-width:92%}.staff-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}#team-messages-button{font-size:12px;padding:9px}.staff-reports-view #main{padding:16px}}

/* Five photographic soft palettes, with opaque readable work surfaces. */
html[data-palette="fresh-coast"]{--blue:#427c8c;--accent:#427c8c;--bg:#eaf4f6;--fresh-image:url("/theme-coast.png")}
html[data-palette="fresh-leaves"]{--blue:#568267;--accent:#568267;--bg:#edf5ef;--fresh-image:url("/theme-leaves.png")}
html[data-palette="fresh-mist"]{--blue:#5b7795;--accent:#5b7795;--bg:#edf1f7;--fresh-image:url("/theme-mist.png")}
html[data-palette="fresh-peach"]{--blue:#aa7660;--accent:#aa7660;--bg:#fcf0e9;--fresh-image:url("/theme-peach.png")}
html[data-palette="fresh-lavender"]{--blue:#826a9e;--accent:#826a9e;--bg:#f2eef8;--fresh-image:url("/theme-lavender.png")}
html[data-palette^="fresh-"] body{background-image:linear-gradient(#ffffff66,#ffffff88),var(--fresh-image);background-size:cover;background-position:center;background-attachment:fixed}html[data-palette^="fresh-"] .surface{background:rgba(248,250,253,.95)}html[data-palette^="fresh-"] .sidebar{background:rgba(248,250,253,.93)}html[data-theme="dark"][data-palette^="fresh-"] body{background-image:linear-gradient(#101b2adb,#101b2aee),var(--fresh-image)}html[data-theme="dark"][data-palette^="fresh-"] .surface{background:rgba(30,43,60,.97)}html[data-theme="dark"][data-palette^="fresh-"] .sidebar{background:rgba(30,43,60,.96)}html[data-theme="dark"][data-palette^="fresh-"]{--bg:#1c2939;--blue:#94b6d9;--accent:#a8c1dd}
/* QA fix: day-mode image themes were overridden by operations.css background shorthand. */
html[data-palette^="fresh-"]:not([data-theme="dark"]) body{background-color:var(--bg);background-image:linear-gradient(#ffffff66,#ffffff88),var(--fresh-image);background-size:cover;background-position:center;background-attachment:fixed}
/* QA fix: night-mode messenger history was a light panel with pale text. */
html[data-theme=dark] .message-list{background:#1b2835;border-color:#3b4d60}
html[data-theme=dark] .message-bubble.incoming{background:#263747;border-color:#3b4e63;color:#dce5f0}

/* Readability in the original card/dialog paths, without changing status or disabled behavior. */
@media screen {
  html:not([data-theme="dark"]){
    --readable-surface:var(--panel,#f8fafd);
    --readable-ink:var(--ink,#243650);
    --readable-muted:color-mix(in srgb,var(--readable-ink) 80%,var(--readable-surface));
    --readable-border:color-mix(in srgb,var(--readable-ink) 70%,var(--readable-surface));
    --readable-focus:color-mix(in srgb,var(--accent,#537fc0) 45%,var(--readable-ink));
    --readable-shadow:0 6px 18px color-mix(in srgb,var(--readable-ink) 14%,transparent);
  }
  html[data-palette]:not([data-theme="dark"]) .job-dialog,
  html:not([data-theme="dark"]) .job-dialog :is(.surface,.quote-job-details,.order-contact){
    background:var(--readable-surface);
    color:var(--readable-ink);
    border-color:var(--readable-border);
    box-shadow:var(--readable-shadow);
  }
  html:not([data-theme="dark"]) .job-dialog :is(.control,.button:not(.primary)){
    background:var(--readable-surface);
    color:var(--readable-ink);
    border-color:var(--readable-border);
    box-shadow:none;
  }
  html:not([data-theme="dark"]) .job-dialog :is(.section-desc,.eyebrow,.review small,.field label,.stock-table th,.stock-table td small,.job-customer-info,.paste-help,.dialog-close),
  html:not([data-theme="dark"]) .job-dialog .control::placeholder{color:var(--readable-muted)}
  html[data-palette]:not([data-theme="dark"]) :is(.collection-customer.focused,.cash-kpi.ws-metric,.product-choice,.kanban-column .job-card){
    background:var(--readable-surface);
    color:var(--readable-ink);
    border-color:var(--readable-border);
    box-shadow:var(--readable-shadow);
  }
  html:not([data-theme="dark"]) :is(.job-card,.collection-customer,.cash-kpi.ws-metric,.product-choice) :is(.job-number,.job-product,.job-meta,.quantity,.quantity span,.card-workflow,.job-actions,.ws-detail-hint),
  html:not([data-theme="dark"]) :is(.collection-customer,.cash-kpi.ws-metric) p{color:var(--readable-muted)}
  html[data-palette]:not([data-theme="dark"]) :is(.segmented button.selected,nav button.active){
    background:var(--pale,#dce7f7);
    color:var(--readable-ink);
    box-shadow:inset 0 0 0 1px var(--readable-border);
  }
  html:not([data-theme="dark"]) :is(.job-card,.collection-customer,.cash-kpi.ws-metric,.product-choice):is(:focus-visible,:active),
  html:not([data-theme="dark"]) .job-dialog :is(button,a,.control):focus-visible{
    outline:3px solid var(--readable-focus);
    outline-offset:3px;
  }
  html[data-theme="dark"]{--print-ready-surface:#304b40;--print-ready-ink:#b5dcc4;--print-ready-border:#a6d0bf}
  html[data-theme="dark"] .print-status.ready{
    background:var(--print-ready-surface);
    color:var(--print-ready-ink);
    border-color:var(--print-ready-border);
  }
}
