/* "Clean and neutral" look. Loaded only inside the demo restaurant (see demo-banner.js), so real restaurants keep the current design.
   Everything is scoped under body.theme-clean, so removing the class (or this file) restores the classic look exactly.

   Palette   ground #F3F4F6 · surface #FFFFFF · line #E3E6EB · text #161B22 · muted #5E6775 · amber #E2A33B (active states only)
   Type      IBM Plex Sans throughout, sentence case, tabular numbers. Weight and size carry the hierarchy.
   Surfaces  flat white cards, 12px corners, one hairline border, almost no shadow. */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap");

body.theme-clean {
  --bg: #F3F4F6;
  --panel: #FFFFFF;
  --panel-light: #F3F4F6;
  --row-alt: #F8F9FA;
  --paper: #FFFFFF;
  --ink: #161B22;
  --amber: #E2A33B;
  --green: #2F7D55;
  --red: #C0392B;
  --rail: #E3E6EB;
  --text-dim: #5E6775;
  --text-bright: #161B22;
  /* the seven section colours collapse to one quiet slate; money stays green, scheduling stays amber */
  --hiring: #3D4A5C;
  --staffcolor: #3D4A5C;
  --training: #3D4A5C;
  --comms: #3D4A5C;
  --payroll: #2F7D55;
  --scheduling: #C98A1B;
  --grid-bg: #FFFFFF;
  --grid-alt: #F8F9FA;
  --grid-border: #E3E6EB;
  --grid-text: #161B22;
  --grid-dim: #5E6775;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  color: var(--ink);
}

/* ---------- type: one family, sentence case, no stamped capitals ---------- */
body.theme-clean *:not(.num):not(code):not(pre) {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
body.theme-clean .num { font-family: 'IBM Plex Sans', system-ui, sans-serif !important; font-variant-numeric: tabular-nums; letter-spacing: normal !important; text-transform: none !important; }
body.theme-clean h1, body.theme-clean h2, body.theme-clean h3 { font-weight: 600; letter-spacing: -0.01em !important; }
body.theme-clean label { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-top: 12px; }

/* ---------- top bars and navigation ---------- */
body.theme-clean header,
body.theme-clean #sidebar,
body.theme-clean nav.sections,
body.theme-clean #topbarNew {
  background: #FFFFFF;
  border-bottom: 1px solid var(--rail);
  box-shadow: none;
}
body.theme-clean #sidebar { gap: 2px; padding: 0 20px; }
body.theme-clean .nav-stub,
body.theme-clean .section-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  padding: 14px 14px 12px;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color .12s ease, box-shadow .12s ease;
}
body.theme-clean nav.sections { padding: 0 28px; gap: 2px; }
body.theme-clean .nav-stub .dot { display: none; }
body.theme-clean .nav-stub:hover,
body.theme-clean .section-btn:hover { color: var(--ink); }
body.theme-clean .nav-stub.active,
body.theme-clean .section-btn.active {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--amber);
}
body.theme-clean .nav-badge { background: var(--amber); color: var(--ink); font-weight: 600; }
body.theme-clean .topbar-mark,
body.theme-clean .landing-mark {
  transform: none;
  border: none;
  border-radius: 9px;
  background: var(--amber);
  color: var(--ink);
}
body.theme-clean .topbar-mark { width: 34px; height: 34px; font-size: 11px; color: var(--ink); }
body.theme-clean #topbarNew h1, body.theme-clean header h1 { font-size: 18px; }

/* ---------- surfaces ---------- */
body.theme-clean #contentWrap { padding: 28px 32px 72px; }
body.theme-clean .stub,
body.theme-clean .ticket,
body.theme-clean .card,
body.theme-clean .overview-card,
body.theme-clean .rev-card,
body.theme-clean .ai-sched,
body.theme-clean .avail-req {
  background: #FFFFFF;
  background-image: none;
  color: var(--ink);
  border: 1px solid var(--rail);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
body.theme-clean .stub { padding: 20px 20px 18px; margin-bottom: 16px; }
body.theme-clean .overview-card:hover { transform: none; box-shadow: 0 2px 8px rgba(16, 24, 40, 0.08); }
body.theme-clean .stub, body.theme-clean .ticket {
  --grid-alt: #F8F9FA;
  --grid-border: #E3E6EB;
  --grid-text: #161B22;
  --grid-dim: #5E6775;
}
body.theme-clean .stub h3 { font-size: 16px; padding-right: 90px; }
body.theme-clean .stub .meta { opacity: 1; color: var(--text-dim); font-size: 12.5px; }

/* the rotated "stamp" tags become small quiet chips */
body.theme-clean .stub .tag,
body.theme-clean .stamp,
body.theme-clean .stamp.filled {
  transform: none;
  border: none;
  background: #F3F4F6;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
}
body.theme-clean .stamp { top: 14px; right: 14px; }
body.theme-clean .stamp.filled { background: #E6F2EB; color: var(--green); }

/* ---------- controls ---------- */
body.theme-clean input[type="text"], body.theme-clean input[type="tel"], body.theme-clean input[type="email"],
body.theme-clean input[type="password"], body.theme-clean input[type="date"], body.theme-clean input[type="time"],
body.theme-clean input[type="number"], body.theme-clean input[type="url"], body.theme-clean select, body.theme-clean textarea,
body.theme-clean .stub input, body.theme-clean .stub select {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid #D5D9E0;
  border-radius: 8px;
  padding: 9px 12px;
}
body.theme-clean td input[type="text"], body.theme-clean td input[type="tel"], body.theme-clean td input[type="date"] { padding: 6px 8px; border-radius: 6px; }
body.theme-clean input:focus, body.theme-clean select:focus, body.theme-clean textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(226, 163, 59, 0.25);
}
body.theme-clean ::placeholder { color: #8A93A1; opacity: 1; }

body.theme-clean button.primary,
body.theme-clean button.primary.amber,
body.theme-clean button.primary-action,
body.theme-clean .stub .mini,
body.theme-clean button.action,
body.theme-clean .enter-btn,
body.theme-clean .assign-btn {
  background: var(--ink);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
}
body.theme-clean button.primary { padding: 11px 14px; }
body.theme-clean .stub .mini { padding: 7px 12px; }
body.theme-clean button.primary:hover, body.theme-clean button.primary-action:hover,
body.theme-clean .stub .mini:hover, body.theme-clean button.action:hover { background: #2B3340; }
body.theme-clean .stub .mini.outline,
body.theme-clean button.ghost,
body.theme-clean .secondary-btn,
body.theme-clean .edit-btn,
body.theme-clean #logoutBtn,
body.theme-clean .top-chip,
body.theme-clean .lang-btn,
body.theme-clean .ov-arrow,
body.theme-clean .ov-today {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid #D5D9E0;
  border-radius: 8px;
  font-weight: 500;
}
body.theme-clean .stub .mini.outline:hover, body.theme-clean button.ghost:hover, body.theme-clean .secondary-btn:hover,
body.theme-clean .edit-btn:hover, body.theme-clean .top-chip:hover { background: #F3F4F6; border-color: #C3C9D2; }
body.theme-clean .lang-btn.active, body.theme-clean .top-chip.amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
body.theme-clean .del-btn { color: var(--text-dim); }
body.theme-clean .del-btn:hover { color: var(--red); }
body.theme-clean .role-pill, body.theme-clean .tab-btn, body.theme-clean .house-btn {
  background: #FFFFFF; color: var(--text-dim); border: 1px solid #D5D9E0; border-radius: 999px; font-weight: 500; font-size: 12.5px; padding: 6px 12px;
}
body.theme-clean .role-pill.active, body.theme-clean .tab-btn.active, body.theme-clean .house-btn.active {
  background: var(--ink); color: #FFFFFF; border-color: var(--ink);
}
body.theme-clean .staff-roles span, body.theme-clean .role-chip {
  border: none; background: #F3F4F6; color: var(--text-dim); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 500;
}

/* ---------- lists, rows, dividers: solid hairlines instead of dashes ---------- */
body.theme-clean .pay-row, body.theme-clean .assign-row, body.theme-clean .snap-mgr, body.theme-clean .rev-line, body.theme-clean .ai-sched .prop-line {
  border-bottom-style: solid; border-top-style: solid; border-color: #EEF0F3;
}
body.theme-clean .staff-row, body.theme-clean .rank-row { border-bottom-color: #EEF0F3; }
body.theme-clean .progress-track { background: #EEF0F3; }
body.theme-clean .bar-chart .bar { border-radius: 6px 6px 0 0; opacity: 1; }
body.theme-clean .video-thumb { border-radius: 8px; }

/* ---------- Overview ---------- */
body.theme-clean .snap-head { border-bottom: 1px solid var(--rail); padding-bottom: 12px; }
body.theme-clean .snap-head .eyebrow-s { font-size: 19px; font-weight: 600; }
body.theme-clean .snap-head .date { opacity: 1; color: var(--text-dim); }
body.theme-clean .snap-h { font-size: 12.5px; font-weight: 600; opacity: 1; color: var(--text-dim); }
body.theme-clean .snap-sec { margin-top: 22px; }
body.theme-clean .ov-greet { font-size: 22px; font-weight: 600; }
body.theme-clean .ov-day { border-color: #D5D9E0; background: #FFFFFF; border-radius: 8px; }
body.theme-clean .ov-day span { opacity: 1; color: var(--text-dim); }
body.theme-clean .ov-day.sel { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
body.theme-clean .ov-day.sel span { color: #C9CFD8; }
body.theme-clean .snap-tile { background: #F8F9FA; border: 1px solid #EEF0F3; border-radius: 10px; }
body.theme-clean .snap-tile .lbl { color: var(--text-dim); opacity: 1; }
body.theme-clean .house-head, body.theme-clean .svc-head { font-weight: 600; background: transparent; }
body.theme-clean .snap-warn { border-radius: 8px; }

/* ---------- tables and the schedule grid (Back Office) ---------- */
body.theme-clean table { background: #FFFFFF; border: 1px solid var(--rail); border-radius: 12px; }
body.theme-clean thead th { background: #F8F9FA; color: var(--text-dim); font-weight: 600; font-size: 12px; }
body.theme-clean tbody tr { border-bottom-color: #EEF0F3; }
body.theme-clean tbody tr:nth-child(even) { background: #FBFBFC; }
body.theme-clean table.sales-grid thead th { background: #F3F4F6; color: var(--ink); font-weight: 600; }
body.theme-clean table.sales-grid td.lbl { font-weight: 500; }
body.theme-clean .toolbar h2 { font-size: 20px; }
body.theme-clean .ai-sched textarea { background: #FFFFFF; color: var(--ink); border: 1px solid #D5D9E0; }
body.theme-clean .pub-bar { border-radius: 10px; }
body.theme-clean .week-label { font-weight: 600; }
body.theme-clean .pct.up { color: var(--green); }
body.theme-clean .pct.down { color: var(--red); }

/* ---------- banners ---------- */
body.theme-clean .banner.success { background: #E6F2EB; color: #1F5A3B; }
body.theme-clean .banner.warn { background: #FFF1D6; color: #7A4F00; }


/* ---------- guided tour bubble and setup checklist ---------- */
body.theme-clean .osr-cl { background: #FFFFFF; border: 1px solid var(--rail); border-left: 3px solid var(--amber); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
body.theme-clean .osr-cl-bar { background: #E3E6EB; }
body.theme-clean .osr-bub { background: #FFFFFF; color: var(--ink); border: 1px solid var(--rail); border-radius: 14px; box-shadow: 0 12px 32px rgba(16, 24, 40, 0.22); }
body.theme-clean .osr-bub h4 { font-weight: 600; font-size: 17px; }
body.theme-clean .osr-bub p { color: var(--text-dim); }
body.theme-clean .osr-bub .osr-dots i { background: #D5D9E0; }
body.theme-clean .osr-bub button { border-color: #D5D9E0; border-radius: 8px; }
body.theme-clean .osr-bub button.osr-primary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }


/* ---------- one slim navigation bar ---------- */
body.theme-clean #topbarNew, body.theme-clean header { display: none; }
body.theme-clean #sidebar, body.theme-clean nav.sections { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; padding: 0 20px; min-height: 56px; border-bottom: 1px solid var(--rail); background: #FFFFFF; }
body.theme-clean #sidebar .topbar-mark { margin-right: 14px; flex: none; }
body.theme-clean nav.sections .header-left { display: flex; align-items: center; gap: 10px; margin-right: 16px; flex: none; }
body.theme-clean nav.sections .brand-mark { width: 30px; height: 30px; border-radius: 8px; border: none; background: var(--amber); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; transform: none; }
body.theme-clean nav.sections .header-left h1 { font-size: 14px; font-weight: 600; margin: 0; white-space: nowrap; }
body.theme-clean nav.sections .header-left .sub { display: none; }
body.theme-clean .nav-stub, body.theme-clean .section-btn { white-space: nowrap; padding: 18px 12px 16px; }
body.theme-clean .cn-more { margin-left: auto; position: relative; flex: none; }
body.theme-clean .cn-trigger { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text-dim); font-size: 13.5px; font-weight: 500; padding: 7px 10px; cursor: pointer; }
body.theme-clean .cn-trigger svg { fill: currentColor; }
body.theme-clean .cn-trigger:hover, body.theme-clean .cn-trigger[aria-expanded="true"], body.theme-clean .cn-trigger.on { background: #F3F4F6; color: var(--ink); }
body.theme-clean .cn-panel { position: fixed; z-index: 9000; min-width: 230px; background: #FFFFFF; border: 1px solid var(--rail); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
body.theme-clean .cn-panel[hidden] { display: none; }
body.theme-clean .cn-panel .nav-stub { text-align: left; border-radius: 8px; padding: 9px 12px; box-shadow: none; width: 100%; justify-content: flex-start; }
body.theme-clean .cn-panel .nav-stub:hover { background: #F3F4F6; }
body.theme-clean .cn-panel .nav-stub.active { background: #F3F4F6; box-shadow: none; }
body.theme-clean .cn-sep { height: 1px; background: var(--rail); margin: 4px 6px; }
body.theme-clean .cn-panel #topbarRight, body.theme-clean .cn-panel #hdrRight { flex-direction: column; align-items: stretch; }
body.theme-clean .cn-panel .top-chip, body.theme-clean .cn-panel #logoutBtn, body.theme-clean .cn-panel .back-link { display: block; text-align: left; border: none; background: transparent; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; width: 100%; box-sizing: border-box; }
body.theme-clean .cn-panel .top-chip:hover, body.theme-clean .cn-panel #logoutBtn:hover, body.theme-clean .cn-panel .back-link:hover { background: #F3F4F6; }
body.theme-clean .cn-panel .osr-help { width: auto; height: auto; border: none; border-radius: 8px; padding: 9px 12px; color: var(--ink); font-size: 13.5px; font-weight: 500; text-align: left; display: block; }
body.theme-clean .cn-panel .osr-help::after { content: " Take the tour"; }
body.theme-clean .cn-panel .osr-help:hover { background: #F3F4F6; color: var(--ink); }
body.theme-clean .cn-panel .lang-switch, body.theme-clean .cn-panel .i18n-switch { display: flex; gap: 6px; padding: 6px 12px; }
body.theme-clean .module-header .eyebrow { display: none; }
body.theme-clean #sidebar .nav-stub { flex: none; width: auto; }
body.theme-clean #sidebar, body.theme-clean nav.sections { position: relative; z-index: 40; overflow: visible; }
@media (max-width: 640px) {
  body.theme-clean #sidebar, body.theme-clean nav.sections { padding: 0 0 0 10px; overflow-x: auto; scrollbar-width: none; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  body.theme-clean #contentWrap { padding: 16px 14px 64px; }
  body.theme-clean .stub { padding: 16px 16px 14px; }
  body.theme-clean #sidebar { padding: 0 8px; }
  body.theme-clean .nav-stub { padding: 12px 11px 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-clean * { transition: none !important; }
}


/* ---------- unified navigation: five groups with drop-downs ---------- */
body.theme-clean #sidebar > .nav-stub, body.theme-clean nav.sections > .section-btn { display: none !important; }
body.theme-clean .cn-tab { display: inline-flex; align-items: center; gap: 6px; flex: none; background: transparent; border: none; border-radius: 0; color: var(--text-dim); font-size: 14px; font-weight: 500; padding: 18px 14px 16px; cursor: pointer; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; transition: color .12s ease, box-shadow .12s ease; }
body.theme-clean .cn-tab:hover, body.theme-clean .cn-tab[aria-expanded="true"] { color: var(--ink); }
body.theme-clean .cn-tab.active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--amber); }
body.theme-clean .cn-chev { opacity: .55; }
body.theme-clean .cn-item { display: block; width: 100%; text-align: left; background: transparent; border: none; border-radius: 8px; padding: 9px 12px; font-size: 14px; color: var(--ink); cursor: pointer; }
body.theme-clean .cn-item:hover { background: #F3F4F6; }
body.theme-clean .cn-item.on { font-weight: 600; background: #F3F4F6; }
body.theme-clean .cn-panel:not(.cn-settings) { min-width: 210px; }
body.theme-clean .cn-panel .back-link, body.theme-clean .cn-panel .top-chip.back-link { display: none; }
body.theme-clean .cn-trigger { padding: 8px; }
@media (max-width: 640px) {
  body.theme-clean .cn-tab { padding: 16px 7px 14px; font-size: 13px; gap: 0; }
  body.theme-clean .cn-chev { display: none; }
  body.theme-clean .cn-more { padding: 0 4px; }
  body.theme-clean .cn-trigger { padding: 8px 6px; }
}

/* ---------- the real Open Shift Rail logo (the app icon) instead of a text box ---------- */
body.theme-clean .topbar-mark, body.theme-clean .brand-mark, body.theme-clean .landing-mark,
body.theme-clean.theme-warm .topbar-mark, body.theme-clean.theme-warm nav.sections .brand-mark {
  background: #1C201D url("/icons/icon-192.png") center / cover no-repeat;
  color: transparent; font-size: 0; border: none; transform: none; border-radius: 10px; overflow: hidden;
}
body.theme-clean .landing-mark span { visibility: hidden; }
body.theme-clean .topbar-mark, body.theme-clean nav.sections .brand-mark { width: 36px; height: 36px; flex: none; }
body.theme-clean #sidebar .brand { display: none; }


/* ---------- logo + restaurant name always visible; on phones the tabs move to their own row ---------- */
body.theme-clean .cn-brand, body.theme-clean nav.sections .header-left { display: flex; align-items: center; gap: 10px; flex: none; margin-right: 12px; min-width: 0; }
body.theme-clean .cn-name, body.theme-clean nav.sections .header-left h1 { font-size: 15px; font-weight: 650; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; color: var(--ink); }
body.theme-clean .cn-tabs { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
body.theme-clean .cn-more { margin-left: auto; }
@media (max-width: 760px) {
  body.theme-clean #sidebar, body.theme-clean nav.sections { flex-wrap: wrap; overflow: visible; padding: 8px 12px 0; min-height: 0; row-gap: 0; }
  body.theme-clean .cn-brand, body.theme-clean nav.sections .header-left { order: 1; flex: 1 1 0; margin-right: 0; }
  body.theme-clean .cn-name, body.theme-clean nav.sections .header-left h1 { max-width: none; font-size: 16px; }
  body.theme-clean .cn-more { order: 2; margin-left: 0; padding: 0; }
  body.theme-clean .cn-tabs { order: 3; flex: 0 0 100%; overflow-x: auto; scrollbar-width: none; margin: 4px -12px 0; padding: 0 8px; }
  body.theme-clean .cn-tabs::-webkit-scrollbar { display: none; }
  body.theme-clean .cn-tab { padding: 12px 10px 10px; font-size: 14px; flex: none; }
  body.theme-clean.theme-warm .cn-tab { padding: 8px 14px; margin: 4px 0 8px; }
  body.theme-clean .cn-chev { display: inline; }
}


/* ---------- schedule: phone view (one day as a list) ---------- */
body.theme-clean .view-toggle { display: inline-flex; gap: 6px; margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--rail); }
body.theme-clean #phoneSched { display: none; }
body.theme-clean.sched-phone #phoneSched { display: block; max-width: 560px; }
body.theme-clean.sched-phone .grid-wrap, body.theme-clean.sched-phone #floatHead, body.theme-clean.sched-phone .grand-total-bar,
body.theme-clean.sched-phone .copy-bar, body.theme-clean.sched-phone .ai-sched, body.theme-clean.sched-phone #sectionSchedule .toolbar .desc { display: none !important; }
body.theme-clean .ps-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
body.theme-clean .ps-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 6px; background: #FFFFFF; border: 1px solid var(--rail); border-radius: 14px; cursor: pointer; color: var(--ink); }
body.theme-clean .ps-day span { font-size: 11.5px; color: var(--text-dim); font-weight: 500; }
body.theme-clean .ps-day b { font-size: 17px; font-weight: 650; }
body.theme-clean .ps-day i { font-style: normal; font-size: 11px; color: var(--text-dim); min-height: 14px; }
body.theme-clean .ps-day.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
body.theme-clean .ps-day.on span, body.theme-clean .ps-day.on i { color: #E7DFD0; }
body.theme-clean.theme-warm .ps-day { border-radius: 18px; background: #FFFCF7; }
body.theme-clean.theme-warm .ps-day.on { background: var(--amber); border-color: var(--amber); color: #2C2620; }
body.theme-clean.theme-warm .ps-day.on span, body.theme-clean.theme-warm .ps-day.on i { color: #5A3A05; }
body.theme-clean .ps-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 14px; }
body.theme-clean .ps-sum div { background: #FFFFFF; border: 1px solid var(--rail); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
body.theme-clean .ps-sum b { font-size: 19px; font-weight: 650; }
body.theme-clean .ps-sum span { font-size: 12px; color: var(--text-dim); }
body.theme-clean.theme-warm .ps-sum div { background: #FBF4E8; border: none; border-radius: 16px; }
body.theme-clean .ps-role { margin: 16px 2px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
body.theme-clean .ps-card { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left; background: #FFFFFF; border: 1px solid var(--rail); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; color: var(--ink); }
body.theme-clean.theme-warm .ps-card { background: #FFFCF7; border-radius: 18px; }
body.theme-clean .ps-time { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.theme-clean .ps-who { display: flex; flex-direction: column; min-width: 0; }
body.theme-clean .ps-who b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.theme-clean .ps-who i { font-style: normal; font-size: 12.5px; color: var(--text-dim); }
body.theme-clean .ps-h { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
body.theme-clean .ps-empty { padding: 28px 12px; text-align: center; color: var(--text-dim); background: #FFFFFF; border: 1px dashed var(--rail); border-radius: 14px; }
body.theme-clean .ps-edit { margin-top: 10px; background: transparent; border: none; color: var(--text-dim); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 8px 2px; }
@media (max-width: 760px) {
  body.theme-clean .house-toggle { flex-wrap: wrap; row-gap: 8px; }
  body.theme-clean .view-toggle { margin-left: 0; padding-left: 0; border-left: none; flex: 0 0 100%; }
  body.theme-clean .ps-card { grid-template-columns: 96px 1fr auto; padding: 11px 12px; }
}


/* ---------- moving between the main app and Back Office: the bar stays put and the page cross-fades ---------- */
@view-transition { navigation: auto; }
body.theme-clean #sidebar, body.theme-clean nav.sections { view-transition-name: topnav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; }
::view-transition-group(topnav) { animation-duration: 0s; }


/* ---------- inside /app.html: the two pages hide their own top bars (the outer page has the only bar) ---------- */
body.embed #sidebar, body.embed #topbarNew, body.embed header, body.embed nav.sections, body.embed #demoBanner { display: none !important; }
body.embed #shell { display: block; }

/* logo size: a little bigger */
body.theme-clean .topbar-mark, body.theme-clean nav.sections .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
body.theme-clean .cn-name, body.theme-clean nav.sections .header-left h1 { font-size: 16px; }
body.theme-clean #sidebar, body.theme-clean nav.sections { min-height: 68px; }
@media (max-width: 760px) {
  body.theme-clean .topbar-mark, body.theme-clean nav.sections .brand-mark { width: 48px; height: 48px; }
  body.theme-clean .cn-name, body.theme-clean nav.sections .header-left h1 { font-size: 17px; }
}

/* phones: logo clearly bigger */
@media (max-width: 760px) {
  body.theme-clean .topbar-mark, body.theme-clean nav.sections .brand-mark { width: 64px; height: 64px; border-radius: 16px; }
  body.theme-clean .cn-brand, body.theme-clean nav.sections .header-left { gap: 14px; }
  body.theme-clean .cn-name, body.theme-clean nav.sections .header-left h1 { font-size: 20px; }
  body.theme-clean #sidebar, body.theme-clean nav.sections { padding-top: 12px; }
}


/* ---------- counts for swaps and requests, in the menu and on the tab ---------- */
body.theme-clean .cn-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
body.theme-clean .cn-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: #2C2620; font-size: 12px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
body.theme-clean .cn-badge[hidden] { display: none; }
body.theme-clean .cn-tab .cn-dot { min-width: 18px; height: 18px; margin-left: 6px; font-size: 11px; }
body.theme-clean.theme-warm .cn-badge { background: #D9732F; color: #FFFFFF; }
body.theme-clean .snap-warn a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ---------- desktop layout: use the whole screen instead of a phone-width column ---------- */
@media (min-width: 1000px) {
  body.theme-clean #contentWrap, body.theme-clean #contentWrap:has(#panelOverview.active), body.theme-clean #contentWrap:has(#panelComms.active) { max-width: 1240px; margin: 0 auto; padding: 30px 36px 80px; }
  body.theme-clean main { padding: 0; margin: 0; max-width: none; }
  body.theme-clean .tab-panel.active:not(#panelOverview) { column-count: 2; column-gap: 28px; }
  body.theme-clean .tab-panel.active:not(#panelOverview) > * { break-inside: avoid; }
  body.theme-clean .tab-panel.active > .module-header { column-span: all; margin-bottom: 22px; }
  body.theme-clean .tab-panel.active:not(#panelOverview) h3, body.theme-clean .tab-panel.active:not(#panelOverview) .section-h, body.theme-clean .tab-panel.active:not(#panelOverview) h4 { break-after: avoid; }
  body.theme-clean .module-header p { max-width: 70ch; }
  /* Overview: one wide card, content in two columns, the four numbers across the top */
  body.theme-clean #panelOverview { max-width: 1100px; margin: 0 auto; }
  body.theme-clean #panelOverview .snapshot { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-content: start; padding: 28px 32px 26px; }
  body.theme-clean #panelOverview .snapshot > * { grid-column: 1 / -1; min-width: 0; }
  body.theme-clean #panelOverview .snapshot > .snap-sec { grid-column: auto; }
  body.theme-clean #panelOverview .snap-tiles { grid-template-columns: repeat(4, 1fr); }
  body.theme-clean #panelOverview .snap-picker, body.theme-clean #panelOverview .ov-picker { max-width: none; }
}
