/* Warm surfaces keep the brand colour on the actions that matter.
   Presentation only. All navigation, form controls and data stay in place. */
body.app-shell {
  --df-paper: #f7f5f0;
  --df-yellow: #e4f48b;
  --df-lime: var(--df-yellow);
  --df-violet: #4b46c8;
  --df-violet-deep: #3b35aa;
  --df-rail: #ece9e2;
  --df-border: #dcd9d2;
  --bg: var(--df-paper);
  --sidebar: var(--df-rail);
  --ink: #202c35;
  --ink-2: #495761;
  --ink-3: #5f6b70;
  --ink-4: #677278;
  --placeholder: #677278;
  --surface-2: #f2f0ea;
  --surface-3: #efedf8;
  --line: var(--df-border);
  --line-2: #c5c5c0;
  background: var(--df-paper);
}
body.app-shell ::selection { background: var(--df-yellow); color: var(--ink); }
body.app-shell .sidebar {
  --ink-on-dark: #35424c;
  --ink-on-dark-2: #59636b;
  background: var(--df-rail);
  border-right-color: var(--df-border);
  color: var(--ink);
  scrollbar-color: #bbb9b1 transparent;
}
body.app-shell .sidebar .brand { border-bottom-color: var(--df-border); }
body.app-shell .sidebar .brand .brand-logo { color: #202c35; }
body.app-shell .sidebar .brand .brand-logo::after {
  color: var(--df-violet);
  -webkit-text-stroke: 0;
}
body.app-shell .sidebar .brand :is(.brand-sub,.brand-dealer),
body.app-shell .sidebar .nav-h { color: #5f676c; }
body.app-shell .sidebar .brand .brand-dealer { border-top-color: var(--df-border); }
body.app-shell .sidebar :is(nav a,.sidebar-foot a,.acct-s) {
  min-height: 44px;
  color: #35424c;
  border-radius: 8px;
}
body.app-shell .sidebar :is(nav a,.sidebar-foot a,.acct-s):hover {
  background: #e2dfd8;
  color: var(--ink);
}
body.app-shell .sidebar :is(nav a.active,.sidebar-foot a.active) {
  background: var(--df-violet);
  color: #fff;
}
body.app-shell .sidebar :is(nav a.active,.sidebar-foot a.active):hover {
  background: var(--df-violet-deep);
  color: #fff;
}
body.app-shell .sidebar :is(nav a.active,.sidebar-foot a.active) .ico { color: #fff; }
body.app-shell .sidebar .sidebar-foot { border-top-color: var(--df-border); }
body.app-shell .sidebar .side-score {
  background: #ffffff70;
  border-color: #cfcdc6;
  color: #35424c;
}
body.app-shell .sidebar .side-score :is(.ss-n,.ss-t i,.ss-n i) { color: #35424c; }
body.app-shell .sidebar .side-score.active,
body.app-shell .sidebar .side-score.active :is(.ss-n,.ss-t i,.ss-n i) { color: #fff; }
body.app-shell .sidebar :is(nav,.sidebar-foot) .badge:not(.warn) {
  background: #dedaf3;
  color: #3b35aa;
}
body.app-shell .sidebar :is(nav a.active,.sidebar-foot a.active) .badge:not(.warn) {
  background: var(--df-yellow);
  color: var(--ink);
}
body.app-shell .sidebar :is(a,button,summary):focus-visible { outline-color: var(--df-violet); }
body.app-shell .sidebar .user-row :is(.user-chip,.user-ico) { color: #35424c; }
body.app-shell .sidebar .user-row .user-ico { width: 44px; height: 44px; min-height: 44px; }
body.app-shell .sidebar .user-row .user-ico:hover { background: #dfdce9; color: #3b35aa; }
body.app-shell .sidebar .user-row .user-ico .badge { box-shadow: 0 0 0 2px var(--df-rail); }
body.app-shell .sidebar .vtog { background: #dfdcd5; border-color: #d0cec7; }
body.app-shell .sidebar .vtog :is(a,b,button) { min-height: 44px; color: #49535d; }
body.app-shell .sidebar .vtog :is(a,b,button).on { background: var(--df-violet); color: #fff; }
body.app-shell .sidebar .logout-link:hover { background: #e2dfd8; }
body.app-shell .sidebar .dsw { background: #ffffff70; border-color: #cfcdc6; }
body.app-shell .sidebar .dsw > summary,
body.app-shell .sidebar .dsw .dsw-n,
body.app-shell .sidebar .dsw .dsw-i { color: #35424c; }
body.app-shell .sidebar :is(.dsw-k,.dsw-i:not(.on) i) { color: #5f676c; }
body.app-shell .sidebar .dsw :is(summary,.dsw-i):hover { background: #e2dfd8; color: #202c35; }
body.app-shell .sidebar .dsw .dsw-i.on { background: #efedf8; color: #3b35aa; box-shadow: inset 3px 0 0 var(--df-violet); }
body.app-shell .sidebar .dsw .dsw-i.on i { color: #4b46c8; }
body.app-shell .sidebar .dsw:focus-visible,
body.app-shell .sidebar .dsw :is(summary,.dsw-i):focus-visible { outline-color: var(--df-violet); }

/* White work cards and neutral controls let the selected state read first. */
body.app-shell .card { border-color: #dfdcd5; box-shadow: 0 2px 5px #30291f03; }
body.app-shell .page-head { border-bottom-color: #dedbd4; }
body.app-shell .btn { border-color: #c7c6c1; border-radius: 7px; }
body.app-shell .btn:not(.primary,.danger):hover { background: #f0eee8; border-color: #aaa9a4; }
body.app-shell :is(input:not([type]),input[type=text],input[type=search],input[type=email],input[type=tel],input[type=url],input[type=password],input[type=date],input[type=datetime-local],input[type=time],input[type=number],select,textarea) {
  background-color: #fff;
  border-color: #c7c6c1;
}
body.app-shell :is(.seg,.mseg) { background: #eeece6; border-color: #dfdcd5; }
body.app-shell .chip { background: #fff; border-color: #d1cfc8; }
body.app-shell :is(.chip.active,.seg a.active,.seg button.active,.seg .on,.mseg a.on,.nc-seg a.active) {
  background: var(--df-violet);
  border-color: var(--df-violet);
  color: #fff;
}
body.app-shell .mseg a.on .lbl { color: #fff; }
body.app-shell :is(.kpi,.one80-quiet) { background: #f4f2ed; border-color: #dfdcd5; }
body.app-shell .kpi.lead { background: #efedf8; border-color: #d9d5ef; }
body.app-shell .brief-card { background: #fff; }
/* Shared tones for the shift schedule, staff tables and their mobile list views. */
body.app-shell {
  --row-surface: var(--surface);
  --row-header: var(--surface-2);
  --row-hover: var(--surface-3);
  --row-selected: var(--brand-tint);
  --row-ink: var(--ink);
  --row-muted: var(--ink-3);
  --row-link: var(--df-violet);
  --row-line: var(--line);
}
/* No dark block: the staff app is light-only (<meta name="color-scheme" content="light">). A dark row palette painted navy
   tables under light-theme gray text (2.0-2.8:1), QA 2026-11-24 PR #60. */
body.app-shell .z-shift .shift-card {
  color: var(--row-ink);
  background: var(--row-surface);
  border-color: var(--row-line);
}
body.app-shell .z-shift .shift-card :is(.shift-v,.shift-week li span,.shift-week li b) { color: var(--row-ink); }
body.app-shell .z-shift .shift-card :is(.shift-l,.shift-s,.shift-season,.shift-wknote,.shift-wk > summary,.shift-week li.off span) { color: var(--row-muted); }
body.app-shell .z-shift .shift-card :is(.shift-ico,.shift-edit) { color: var(--row-link); }
body.app-shell .z-shift .shift-card .shift-tag { background: var(--row-header); color: var(--row-muted); }
body.app-shell .z-shift .shift-card .shift-week li { background: var(--row-surface); border-color: var(--row-line); }
body.app-shell .z-shift .shift-card .shift-week li.wk2 { background: var(--row-header); }
body.app-shell .z-shift .shift-card .shift-week li.today { background: var(--df-violet); border-color: var(--df-violet); }
body.app-shell .z-shift .shift-card .shift-week li.today :is(b,span) { color: var(--surface); }

@media screen {
  body.app-shell .main :is(.tbl,.vrow,.sq-row) {
    background: var(--row-surface);
    color: var(--row-ink);
  }
  body.app-shell .main .tbl tr > th { background: var(--row-header); color: var(--row-muted); }
  body.app-shell .main .tbl tr > :is(th,td),
  body.app-shell .main :is(.sq-row,.vrow) { border-color: var(--row-line); }
  body.app-shell .main .tbl.zebra tbody tr:nth-child(even) > td,
  body.app-shell .main .tbl tr.g-sec > td.g-sec-cell { background: var(--row-header); }
  body.app-shell .main .tbl .muted,
  body.app-shell .main :is(.vrow-sub,.sq-sub,.sq-meta) { color: var(--row-muted); }
  body.app-shell .main :is(.sq-open,.sq-meta b,.vrow-title,.vrow-price) { color: var(--row-ink); }
  body.app-shell .main .tbl td.num:not(.muted,.ok,.warn,.bad) { color: var(--row-ink); }
  body.app-shell .main .tbl a.rowlink { color: var(--row-link); }
  body.app-shell .main .tbl tbody tr:hover,
  body.app-shell .main table:is(.tbl.zebra,.tbl.stack,.tbl) tbody tr:hover > td,
  body.app-shell .main :is(.vrow,.sq-row):hover { background-color: var(--row-hover); }
  body.app-shell .main table:is(.tbl.zebra,.tbl.stack,.tbl) tbody tr:is(.selected,[aria-selected="true"],[aria-expanded="true"]) > td,
  body.app-shell .main :is(.vrow,.sq-row):is(.selected,[aria-selected="true"],[aria-expanded="true"]) {
    background-color: var(--row-selected);
  }
  body.app-shell .main .tbl tr:is(.selected,[aria-selected="true"],[aria-expanded="true"]) > td:first-child,
  body.app-shell .main :is(.vrow,.sq-row):is(.selected,[aria-selected="true"],[aria-expanded="true"]) {
    box-shadow: inset 3px 0 var(--df-violet);
  }
}
body.app-shell .filebtn { background: #f6f4ef; border-color: #d2cfc7; }
body.app-shell .filebtn .fb-face { background: #efedf8; color: #3b35aa; }
body.app-shell :is(a,button,input,select,textarea,summary):focus-visible { outline-color: var(--df-violet); }
@media screen and (forced-colors: none) {
  body.app-shell .z-shift .shift-card :is(.shift-edit,.shift-wk > summary):focus-visible {
    outline-color: var(--row-link);
  }
}

/* The mobile rail uses the same warm surface and purple selected state. */
@media screen and (max-width: 840px) {
  body.app-shell .m-appbar { background: #f7f5f0f5; border-color: #dedbd4; }
  body.app-shell .m-tabbar {
    background: #f2efe8;
    border-top-color: #d9d6cf;
    box-shadow: 0 -3px 14px #30291f08;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body.app-shell .m-tab { color: #53616a; padding-block: 6px; }
  body.app-shell .m-tab.active { color: #fff; }
  body.app-shell .m-tab.active::before {
    inset: 4px;
    background: var(--df-violet);
    border-radius: 14px;
  }
  body.app-shell .m-tab.active .ico { color: #fff; }
  body.app-shell .m-tab :is(.badge,.badge.warn) { box-shadow: 0 0 0 2px #f2efe8; }
  body.app-shell .m-tab:focus-visible { outline-color: var(--df-violet); }
  body.app-shell .m-sheet,
  body.app-shell .m-sheet-grab { background: #f7f5f0; }
  body.app-shell .m-sheet-h { color: #5f676c; }
  body.app-shell .m-sheet .lang-btn { background: #eeece6; color: #495761; }
  body.app-shell .m-sheet .lang-btn.on { background: var(--df-violet); color: #fff; }
  body.app-shell .inv-bar { background-color: #f7f5f0f7; border-bottom-color: #dedbd4; }
}

/* The guest canvas shares the quiet palette, without changing photo framing. */
body:has(> .topbar):not(.app-shell) {
  --bg: #f7f5f0;
  --canvas: #f7f5f0;
  --card: #fff;
  --surface: #f0eee8;
  --surface-2: #e8e5dd;
  --line: #dedbd4;
  --red: #4b46c8;
  background: #f7f5f0;
}
body:has(> .topbar):not(.app-shell) .topbar { background: #f7f5f0; border-bottom-color: #dedbd4; }
body:has(> .topbar):not(.app-shell) :is(.tb-brand,.tb-link,.tb-share) { color: #202c35; }
body:has(> .topbar):not(.app-shell) :is(.tb-link.cur,.tb-brand .mk) { color: #4b46c8; }
body:has(> .topbar):not(.app-shell) .tb-brand .mk { background: #4b46c8; }

/* Native file controls retain their names, labels and upload behaviour. */
body:has(> .topbar):not(.app-shell) .sl-wrap input[type=file]:not(.sl-file) {
  max-width: 100%;
  min-height: 44px;
  padding: 6px;
  border: 1px solid #d2cfc7;
  border-radius: 7px;
  background: #fff;
  color: #495761;
  font: inherit;
}
body:has(> .topbar):not(.app-shell) .sl-wrap input[type=file]:not(.sl-file)::file-selector-button {
  min-height: 44px;
  margin-right: 10px;
  padding: 9px 14px;
  border: 0;
  border-radius: 5px;
  background: #efedf8;
  color: #3b35aa;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
@media (forced-colors: active) {
  body.app-shell .sidebar :is(nav a.active,.sidebar-foot a.active),
  body.app-shell .m-tab.active { outline: 2px solid Highlight; }
}
