/* Generated by scripts/build_command_center_css.py; edit source stylesheets. */
/* source: command-center.css */
:root {
  --bg0: #020617;
  --bg1: #071426;
  --surface: rgba(7, 19, 33, 0.76);
  --surface-strong: rgba(8, 24, 42, 0.88);
  --surface-soft: rgba(3, 12, 22, 0.52);
  --line: rgba(34, 211, 238, 0.32);
  --line-strong: rgba(34, 211, 238, 0.58);
  --line-soft: rgba(125, 211, 252, 0.14);
  --text: #e5f2ff;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --green: #22c55e;
  --red: #fb7185;
  --amber: #f59e0b;
  --violet: #a78bfa;
  --panel-radius: 18px;
  --control-radius: 12px;
  --control-height: 38px;
  --panel-shadow: 0 24px 72px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.055);
  --glass-highlight: rgba(226, 248, 255, 0.06);
}

* { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: "Bahnschrift", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(ellipse at 74% 5%, rgba(34, 211, 238, 0.18), transparent 28%),
    radial-gradient(ellipse at 18% 92%, rgba(16, 185, 129, 0.12), transparent 34%),
    radial-gradient(ellipse at 98% 72%, rgba(99, 102, 241, 0.12), transparent 26%),
    linear-gradient(145deg, #020617 0%, #06111f 43%, #0a1627 72%, #111827 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(34, 211, 238, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.055) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 192px 192px, 192px 192px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.3));
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035), rgba(255,255,255,0.035) 1px, transparent 1px, transparent 6px);
  opacity: 0.16;
  pointer-events: none;
}

.orbital-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.62;
  background:
    conic-gradient(from 220deg at 76% 26%, transparent 0 62deg, rgba(34,211,238,0.28) 64deg 68deg, transparent 70deg 360deg),
    conic-gradient(from 30deg at 18% 78%, transparent 0 120deg, rgba(16,185,129,0.18) 124deg 128deg, transparent 130deg 360deg);
  mask-image: radial-gradient(circle at 76% 26%, #000 0 18%, transparent 42%), radial-gradient(circle at 18% 78%, #000 0 14%, transparent 36%);
}

.scan-beam {
  position: fixed;
  left: -20%;
  top: 0;
  width: 34%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.07), transparent);
  transform: skewX(-18deg);
  animation: sweep 9s linear infinite;
  contain: paint;
}

@keyframes sweep {
  from { transform: translateX(-40vw) skewX(-18deg); }
  to { transform: translateX(170vw) skewX(-18deg); }
}

.sidebar, .topbar, .panel, .ai-panel {
  background:
    linear-gradient(180deg, var(--glass-highlight), transparent 34%),
    linear-gradient(180deg, var(--surface-strong), rgba(6, 16, 30, 0.78)),
    linear-gradient(125deg, rgba(34,211,238,0.07), transparent 44%, rgba(99,102,241,0.05));
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.045), var(--panel-shadow);
  backdrop-filter: blur(14px) saturate(1.1);
}

.sidebar {
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255,255,255,0.05), inset -1px 0 0 rgba(34,211,238,0.08);
}

.brand {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 14px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.14);
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.55);
  display: grid;
  place-items: center;
  color: var(--cyan);
  box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.14);
  font-weight: 800;
}

.brand h1 { margin: 0; font-size: 17px; line-height: 1.1; letter-spacing: 0.02em; }
.brand small { color: var(--muted); font-size: 11px; }

.pin-button {
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--control-radius);
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 14px;
}

.nav a.nav-locked,
.pin-button:disabled {
  color: rgba(148, 163, 184, 0.6);
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.24);
  cursor: not-allowed;
  opacity: 0.72;
}

.nav a.nav-locked:hover,
.nav a.nav-locked:focus {
  color: #bae6fd;
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.08);
  outline: none;
}

.nav a.active {
  color: #ecfeff;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.2), rgba(16, 185, 129, 0.08));
  border-color: var(--line-strong);
  box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.08), 0 0 18px rgba(34, 211, 238, 0.08);
}

.pin-button {
  width: 100%;
  margin-top: 14px;
  color: #cffafe;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.36);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,0.62), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.title h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: 0.01em; text-shadow: 0 0 18px rgba(125,211,252,0.18); }
.title span { color: var(--muted); font-size: 13px; }

.command {
  height: 42px;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  background: linear-gradient(180deg, rgba(3, 12, 22, 0.78), rgba(2, 8, 23, 0.54));
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: #bae6fd;
  font-size: 14px;
  box-shadow: inset 0 0 24px rgba(14, 165, 233, 0.08), 0 0 0 1px rgba(255,255,255,0.025);
}

.command span {
  flex: 0 0 auto;
  white-space: nowrap;
  margin-right: 8px;
}

.command input {
  width: 100%;
  min-height: 30px;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #e0f2fe;
  background: transparent;
  font: inherit;
  line-height: 1.45;
}

.command input:disabled,
.ai-query-form input:disabled {
  color: rgba(148, 163, 184, 0.72);
  cursor: not-allowed;
}

.command:has(input:disabled) {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(15, 23, 42, 0.5);
  color: rgba(186, 230, 253, 0.72);
}

.command.wide { width: 100%; }
.status { display: flex; gap: 10px; align-items: center; justify-content: flex-end; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 14px var(--green); margin-top: 4px; }
.dot.offline { background: var(--amber); box-shadow: 0 0 14px var(--amber); }

.module-tabs-shell {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 42px;
}

.module-tabs-nav {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.36);
  border-radius: 11px;
  background: rgba(2, 8, 23, 0.72);
  color: #cffafe;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.module-tabs-nav.is-available {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.module-tabs-nav:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(8, 145, 178, 0.22);
}

.module-tabs-nav:focus-visible,
.tab:focus-visible,
.ai-fab:focus-visible,
.ai-close:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 2px;
}

.tabs {
  display: flex;
  gap: 8px;
  height: 42px;
  padding: 2px;
  border-radius: 14px;
  background: rgba(2, 8, 23, 0.26);
  border: 1px solid rgba(125, 211, 252, 0.08);
}

#moduleTabs {
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#moduleTabs::-webkit-scrollbar { display: none; }

.tab {
  min-width: 88px;
  min-height: var(--control-height);
  border-radius: 11px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  color: var(--muted);
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.56), rgba(2, 8, 23, 0.34));
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tab:hover {
  color: #e0faff;
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(8, 145, 178, 0.14);
  transform: translateY(-1px);
}

.tab.active {
  color: #ecfeff;
  border-color: rgba(34, 211, 238, 0.72);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.34), rgba(16, 185, 129, 0.14));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.16), inset 0 0 18px rgba(34, 211, 238, 0.06), inset 0 1px 0 rgba(255,255,255,0.07);
}

.people-list::-webkit-scrollbar,
.people-interaction-list::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.people-list::-webkit-scrollbar-track,
.people-interaction-list::-webkit-scrollbar-track {
  background: rgba(2, 8, 23, 0.24);
  border-radius: 999px;
}
.people-list::-webkit-scrollbar-thumb,
.people-interaction-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34,211,238,0.62), rgba(16,185,129,0.36));
  border-radius: 999px;
}
.command-panel { min-height: 0; }
.grid { display: grid; gap: 18px; min-height: 0; }
.overview-grid { grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(92px, auto); }

.overview-finance-recent {
  border-top: 1px solid rgba(34, 211, 238, 0.16);
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
}

.overview-finance-recent > strong {
  color: var(--text);
  font-size: 12px;
}

.overview-finance-recent .list {
  gap: 5px;
}

.overview-finance-recent .row {
  min-height: 32px;
  padding: 6px 8px;
}

.overview-finance-recent .row small {
  font-size: 11px;
}

.overview-first-screen-signals {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
}

.overview-signal-card {
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(2, 8, 23, 0.22);
  display: grid;
  gap: 5px;
  min-width: 0;
  align-content: start;
  padding: 10px;
}

.overview-signal-card > span,
.overview-signal-card > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-signal-card > span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.overview-signal-card > strong {
  font-size: 24px;
  line-height: 1;
}

.overview-signal-card > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.compact-kpis {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.overview-command-deck,
.finance-overview-workbench {
  border-color: rgba(34, 211, 238, 0.34);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.055)),
    rgba(2, 8, 23, 0.34);
}

.overview-action-panel .workbench-actions,
.finance-quick-context .workbench-actions {
  margin-top: 12px;
}

.workbench-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.finance-workbench-columns {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  min-width: 0;
}

.finance-workbench-columns.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-workbench-columns > .list,
.finance-workbench-columns > .budget-list {
  min-width: 0;
}
.finance-grid { grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(88px, auto); }
.people-grid { grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(90px, auto); }
.task-workbench-panel {
  grid-column: 1 / -1;
  min-width: 0;
}

.task-workbench-panel .kpis + .list {
  margin-top: 14px;
}

.panel {
  position: relative;
  border-radius: var(--panel-radius);
  padding: 18px;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.panel::before, .ai-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--cyan), transparent 42%) top left / 96px 1px no-repeat,
    linear-gradient(var(--cyan), transparent 42%) top left / 1px 96px no-repeat,
    linear-gradient(270deg, var(--cyan), transparent 42%) top right / 96px 1px no-repeat,
    linear-gradient(var(--cyan), transparent 42%) top right / 1px 96px no-repeat,
    linear-gradient(90deg, transparent, rgba(34,211,238,0.35), transparent) bottom left / 100% 1px no-repeat;
  opacity: 0.76;
  pointer-events: none;
}

.panel::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 16px;
  width: 46px;
  height: 12px;
  border-top: 1px solid rgba(34,211,238,0.45);
  border-right: 1px solid rgba(34,211,238,0.45);
  transform: skewX(-28deg);
  opacity: 0.75;
  pointer-events: none;
}

.panel.tab-focus {
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.11),
    0 0 30px rgba(34, 211, 238, 0.08),
    var(--panel-shadow);
}

.panel.tab-panel-hidden {
  display: none !important;
}

.panel.tab-focus::before {
  opacity: 0.95;
}

.panel h3 {
  margin: 0 0 13px;
  font-size: 15px;
  color: #dff9ff;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-shadow: 0 0 16px rgba(34,211,238,0.22);
}
.panel h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
  vertical-align: 1px;
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stacked-kpis { grid-template-columns: repeat(2, 1fr); }
.kpi {
  min-height: 84px;
  padding: 14px;
  border-radius: 13px;
  border: 1px solid rgba(125, 211, 252, 0.13);
  background:
    linear-gradient(180deg, rgba(226, 248, 255, 0.035), transparent 32%),
    linear-gradient(135deg, rgba(2, 8, 23, 0.56), rgba(14, 165, 233, 0.07)), var(--surface-soft);
  box-shadow: inset 0 0 28px rgba(34,211,238,0.04), 0 10px 26px rgba(0,0,0,0.18);
}
.kpi.stack { margin-top: 10px; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi strong { display: block; margin-top: 7px; font-size: 31px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }

.cyan { color: var(--cyan); } .green { color: var(--green); } .red { color: var(--red); } .amber { color: var(--amber); } .violet { color: var(--violet); }
.list { display: grid; gap: 10px; }
.muted-row { color: var(--muted); }

.row {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(2, 8, 23, 0.38), rgba(14, 165, 233, 0.04));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.row span:first-child { min-width: 0; }
.row strong { display: block; color: #e5f2ff; font-size: 13px; }
.row small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  color: #cffafe;
  background: rgba(14, 165, 233, 0.12);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}
.priority-high, .priority-urgent { border-color: rgba(248, 113, 113, 0.52); color: #fecaca; background: rgba(239, 68, 68, 0.14); }
.priority-low { border-color: rgba(148, 163, 184, 0.28); color: #cbd5e1; background: rgba(148, 163, 184, 0.09); }
.empty-brief p { margin: 0; color: var(--muted); line-height: 1.6; }
.system-strip { min-height: 78px; }
.command-console {
  padding: 16px;
}

.command-console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.command-console-head.compact {
  align-items: center;
}

.command-console-head p {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.hud-button {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  border: 1px solid rgba(125, 211, 252, 0.26);
  color: #cffafe;
  background: rgba(2, 8, 23, 0.42);
  font: inherit;
  font-size: 12px;
  padding: 0 14px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
  box-shadow: inset 0 0 14px rgba(125, 211, 252, 0.025);
}

.hud-button.primary {
  border-color: rgba(34, 211, 238, 0.58);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32), rgba(16, 185, 129, 0.18));
  color: #ecfeff;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12), inset 0 0 16px rgba(14, 165, 233, 0.06);
}

.hud-button.danger {
  border-color: rgba(251, 113, 133, 0.48);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.18);
}

.hud-button:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(14, 165, 233, 0.14);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.09), inset 0 0 14px rgba(125, 211, 252, 0.035);
}

.hud-button:active {
  transform: translateY(0);
  box-shadow: inset 0 0 18px rgba(2, 8, 23, 0.34);
}

.hud-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.command-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.command-split {
  align-items: start;
}

.command-split h3 {
  margin-top: 0;
}

.command-row.ready {
  border-color: rgba(34, 197, 94, 0.28);
}

.command-row.needs-review {
  border-color: rgba(245, 158, 11, 0.32);
}

.bar-list { display: grid; gap: 12px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(64px, 96px) 1fr minmax(56px, auto);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(125, 211, 252, 0.11);
  border: 1px solid rgba(125, 211, 252, 0.12);
}
.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(34,211,238,0.88), rgba(16,185,129,0.78));
  box-shadow: 0 0 18px rgba(34,211,238,0.28);
}
.bar-row strong { color: #ecfeff; text-align: right; font-variant-numeric: tabular-nums; }

.finance-month-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}
.finance-month-picker .field { min-width: 160px; margin: 0; }
.finance-month-picker input[type="month"] {
  color-scheme: dark;
  min-height: 38px;
}
.finance-custom-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.finance-custom-range .field { min-width: 150px; margin: 0; }
.finance-custom-range input[type="date"] {
  color-scheme: dark;
  min-height: 38px;
}
.finance-calendar-toolbar {
  display: grid;
  grid-template-columns: 38px minmax(170px, 220px) max-content 38px minmax(128px, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 42px;
  margin: 12px 0 14px;
}
.finance-calendar-month-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 9px;
  background: rgba(2, 8, 23, 0.42);
}
.finance-calendar-month-field span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.knowledge-note-tags {
  min-width: 0;
  max-width: min(45%, 320px);
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.tag.category-preset {
  min-width: 36px;
}
.finance-calendar-month-field input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  color-scheme: dark;
  font: inherit;
  font-size: 13px;
}
.finance-calendar-toolbar .hud-button {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}
.finance-calendar-toolbar .finance-month-nav {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
}
.finance-calendar-range {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.finance-calendar-panel,
.finance-calendar-detail-panel {
  min-width: 0;
}
.finance-calendar-scroll {
  min-width: 0;
  overflow-x: hidden;
}
.finance-calendar-detail-panel > h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-calendar-detail-panel .stacked-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.finance-calendar-detail-panel .kpi {
  min-width: 0;
  padding: 12px;
}
.finance-calendar-detail-panel .kpi strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}
.finance-category-summary { margin-top: 14px; }
.finance-category-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.finance-category-row {
  appearance: none;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.52), rgba(2, 8, 23, 0.72));
  color: #dff8ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.06), 0 10px 22px rgba(2, 8, 23, 0.24);
  cursor: pointer;
  text-align: left;
}
.finance-category-row:hover {
  border-color: rgba(34, 211, 238, 0.56);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12), 0 12px 26px rgba(2, 8, 23, 0.32);
}
.finance-category-row strong {
  color: #fb7185;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.finance-active-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(15, 23, 42, 0.74));
  color: #dff9ff;
}
.finance-active-filter strong { color: #22d3ee; }

.chart {
  height: 180px;
  border-radius: 16px;
  background:
    linear-gradient(rgba(125, 211, 252, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(34,211,238,0.1), transparent 26%),
    rgba(2, 8, 23, 0.22);
  background-size: 34px 34px;
  position: relative;
  overflow: hidden;
}

.chart.center { display: grid; place-items: center; text-align: center; color: #bae6fd; }
.chart::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(34,211,238,0.05) 48%, transparent 50%);
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
}

.chart svg,
.chart-donut svg { display: block; }
.chart svg { width: 100%; height: 100%; }
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(92px, auto);
  gap: 8px;
  align-items: stretch;
}
.day {
  min-width: 0;
  min-height: 92px;
  height: auto;
  padding: 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: linear-gradient(90deg, rgba(2, 8, 23, 0.34), rgba(14, 165, 233, 0.035));
  color: var(--muted);
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  align-content: start;
  gap: 5px;
  overflow: hidden;
}
.day b {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.15;
  margin: 0;
}
.day span {
  display: block;
  min-width: 0;
  font-size: 11px;
  line-height: 1.22;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
.day br { display: none; }
.day.hot { border-color: rgba(251, 113, 133, 0.42); box-shadow: inset 0 -22px 40px rgba(251, 113, 133, 0.09); }
.day.selected { border-color: rgba(34, 211, 238, 0.76); box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.16), 0 0 16px rgba(34, 211, 238, 0.16); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(125, 211, 252, 0.15);
  background: rgba(2, 8, 23, 0.26);
  border-radius: 12px;
}
.field small { display: block; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.field {
  border-color: var(--line-soft);
  background: linear-gradient(180deg, rgba(3, 12, 22, 0.56), rgba(7, 19, 32, 0.38));
}

.field:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.09), inset 0 0 18px rgba(34, 211, 238, 0.035);
}

.field input::placeholder,
.field textarea::placeholder,
.command input::placeholder,
.auth-form input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}
.field textarea {
  min-height: 86px;
  resize: vertical;
}
.field select option { color: #0f172a; }
.finance-entry-row {
  display: grid;
  grid-template-columns: 150px 120px minmax(180px, 1fr) 150px 150px 120px;
  gap: 10px;
  margin-bottom: 10px;
}

.record-editor-row {
  grid-template-columns: 150px 120px minmax(180px, 1fr) 150px 150px 120px;
  margin-top: 12px;
}

.finance-record-editor {
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08), 0 18px 44px rgba(8, 47, 73, 0.18);
}
.quick-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 10px;
}
.category-preset { cursor: pointer; }

[data-import-preview-row] label:has([data-import-row-select]) {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

[data-import-preview-row] > span:first-child,
[data-import-preview-row] label strong,
[data-import-preview-row] small {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

[data-import-preview-row] .finance-record-actions {
  flex: 0 0 auto;
}

[data-import-row-select] {
  appearance: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin: 0;
  border: 1px solid rgba(34, 211, 238, 0.64);
  border-radius: 4px;
  background: rgba(2, 6, 23, 0.72);
  cursor: pointer;
}

[data-import-row-select]:checked {
  background: #22d3ee;
  box-shadow: inset 0 0 0 8px #082f49;
}

[data-import-row-select]:disabled {
  cursor: not-allowed;
}
.finance-day-list {
  margin-top: 12px;
  max-height: 300px;
  overflow: auto;
}

.finance-record-row {
  align-items: center;
}

.finance-record-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.finance-record-actions [hidden] {
  display: none !important;
}

.mini-action {
  align-items: center;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.14), rgba(2, 8, 23, 0.32));
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-height: 32px;
  padding: 4px 10px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

.mini-action:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(34, 211, 238, 0.7);
}

.mini-action.danger {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(251, 113, 133, 0.42);
  color: #fecdd3;
}

.mini-action.active,
.finance-hot-day-row .mini-action.active {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.58);
  color: #ecfeff;
}

.segmented-control {
  align-items: center;
  background: rgba(2, 8, 23, 0.42);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
}

.segmented-option {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  min-height: 30px;
  min-width: 54px;
  padding: 5px 10px;
}

.segmented-option:hover,
.segmented-option.active,
.segmented-option[aria-pressed="true"] {
  background: rgba(34, 211, 238, 0.16);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.36), 0 0 16px rgba(34, 211, 238, 0.12);
  color: var(--text);
}

.finance-range-control {
  justify-self: end;
}

.category-chart {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 180px minmax(0, 1fr);
}

.chart-donut {
  align-items: center;
  aspect-ratio: 1;
  display: grid;
  justify-items: center;
  position: relative;
}

.chart-donut svg {
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.24));
  height: 150px;
  transform: rotate(-90deg);
  width: 150px;
}

.chart-donut span {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  position: absolute;
}

.empty-donut {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 50%;
  height: 150px;
  width: 150px;
}

.chart-bars {
  display: grid;
  gap: 10px;
}

.chart-bar-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) 110px;
}

.chart-bar-row span {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.chart-bar-row span i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.chart-bar-row .bar-track b {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.88), rgba(16, 185, 129, 0.8));
  border-radius: inherit;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.24);
  display: block;
  height: 100%;
}

.budget-form,
.snapshot-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(80px, 0.8fr) auto;
  margin: 10px 0;
}

.budget-form input,
.snapshot-form input,
.snapshot-form textarea {
  background: rgba(2, 8, 23, 0.36);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 34px;
  outline: 0;
  padding: 7px 9px;
}

.snapshot-form {
  grid-template-columns: 150px 1fr auto auto;
  margin-top: 12px;
}

.snapshot-form textarea {
  min-height: 78px;
  resize: vertical;
}

.budget-list,
.snapshot-details {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.budget-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(110px, 1.1fr) minmax(120px, 1fr) auto;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: linear-gradient(90deg, rgba(2, 8, 23, 0.34), rgba(14, 165, 233, 0.035));
}

.budget-row.over {
  border-color: rgba(251, 113, 133, 0.42);
  box-shadow: inset 0 0 24px rgba(251, 113, 133, 0.08);
}

.budget-row strong {
  color: var(--text);
  display: block;
  font-size: 13px;
}

.budget-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.asset-mini { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 14px; }
.asset-mini .row + .row { margin-top: 8px; }
.asset-liability-panel {
  min-height: 620px;
}

.asset-workbench {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.asset-balance-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 88px minmax(0, 1fr);
}

.asset-net-ring {
  width: 78px;
  height: 78px;
}

.asset-net-ring::before {
  width: 52px;
  height: 52px;
}

.asset-balance-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.asset-body-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  min-width: 0;
}

.asset-view-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.asset-balance-columns,
.asset-ledger-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-balance-column,
.asset-ledger-section,
.asset-capture-panel {
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(2, 8, 23, 0.44), rgba(14, 165, 233, 0.045));
  min-width: 0;
  padding: 12px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .liability-side,
.asset-ledger-section:nth-child(2) {
  background: linear-gradient(135deg, rgba(2, 8, 23, 0.46), rgba(248, 113, 113, 0.045));
}

.asset-column-head,
.asset-section-title,
.asset-capture-head,
.asset-capture-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.asset-capture-panel {
  position: sticky;
  top: 96px;
}

.asset-capture-panel .asset-ledger-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-capture-panel .asset-ledger-row {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr) minmax(72px, 0.66fr) minmax(92px, 0.58fr);
}

.asset-capture-panel .asset-ledger-row .asset-snapshot-note {
  grid-column: 1 / -1;
}

.asset-capture-panel .asset-ledger-row .asset-row-delete {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 28px;
}

.asset-capture-panel .asset-ledger-header {
  grid-template-columns: minmax(0, 1fr) minmax(72px, 0.66fr) minmax(92px, 0.58fr);
}

.asset-capture-panel .asset-ledger-header span:nth-child(n+4) {
  display: none;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-workflow-strip,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-task-switcher,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-current-context,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-draft-totals,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-draft-delta,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-save-preview,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-human-ledger,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reconciliation-controls,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reconciliation-actions,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-quick-presets {
  align-items: center;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 14px;
  background: rgba(2, 8, 23, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  padding: 7px 10px;
}

.asset-monthly-reconciliation {
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.08), rgba(2, 8, 23, 0.2)),
    rgba(2, 8, 23, 0.24);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 16px;
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
}

.asset-reconciliation-meta,
.asset-reconciliation-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-reconciliation-controls {
  display: grid;
  grid-template-columns: minmax(130px, 0.4fr) minmax(130px, 0.4fr) minmax(220px, 1fr);
}

.asset-reconciliation-grid {
  grid-template-columns: 1fr;
}

.asset-reconciliation-grid .asset-ledger-header,
.asset-reconciliation-line {
  display: grid;
  gap: 8px;
  grid-template-columns: 72px minmax(170px, 1.1fr) minmax(110px, 0.55fr) minmax(132px, 0.72fr) minmax(210px, 1.25fr) auto;
}

.asset-reconciliation-line {
  align-items: center;
  min-width: 0;
}

.asset-reconciliation-check {
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 12px;
  gap: 6px;
  min-height: 40px;
  padding: 2px 0;
}

.asset-reconciliation-line input {
  background: rgba(2, 8, 23, 0.42);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 36px;
  min-width: 0;
  outline: 0;
  padding: 8px 10px;
  width: 100%;
}

.asset-reconciliation-line input[type="checkbox"] {
  accent-color: #22d3ee;
  cursor: pointer;
  flex: 0 0 32px;
  height: 32px;
  min-height: 32px;
  width: 32px;
}

.asset-reconciliation-line input:focus {
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.asset-task-switcher {
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(16, 185, 129, 0.06)),
    rgba(2, 8, 23, 0.34);
  border-color: rgba(34, 211, 238, 0.28);
  padding: 6px;
}

.asset-task-switcher a {
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 12px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  min-height: 30px;
  padding: 5px 10px;
  text-decoration: none;
}

.asset-task-switcher a:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.08);
}

.asset-view-tabs a {
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.asset-view-tabs a.active,
.asset-view-tabs a[aria-pressed="true"] {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.58);
  color: var(--text);
  box-shadow:
    inset 0 0 0 1px rgba(34, 211, 238, 0.18),
    0 0 18px rgba(34, 211, 238, 0.1);
}

.asset-view-tabs a:hover {
  transform: translateY(-1px);
}

.asset-workbench [hidden] {
  display: none !important;
}

.asset-body-grid-v2[data-asset-active-view="entry"] {
  align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.45fr);
}

.asset-body-grid-v2[data-asset-active-view="history"],
.asset-body-grid-v2[data-asset-active-view="composition"] {
  grid-template-columns: 1fr;
}

.asset-body-grid-v2[data-asset-active-view="history"] .asset-view-panel-v2,
.asset-body-grid-v2[data-asset-active-view="composition"] .asset-view-panel-v2 {
  position: static;
}

.asset-current-context {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.1), rgba(2, 8, 23, 0.34)),
    rgba(2, 8, 23, 0.34);
  border-color: rgba(125, 211, 252, 0.2);
}

.asset-current-context span {
  color: var(--muted);
  font-size: 12px;
}

.asset-current-context b,
.asset-current-context strong {
  color: var(--text);
}

.asset-current-context strong {
  flex: 1 1 360px;
  font-size: 12px;
  line-height: 1.32;
  min-width: 240px;
}

.section-kicker {
  color: var(--cyan);
  display: block;
  font-size: 11px;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.asset-reconcile-guide {
  align-items: stretch;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
  min-width: 0;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reconcile-guide span {
  align-items: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(2, 8, 23, 0.34));
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 6px;
  min-height: 30px;
  min-width: 0;
  padding: 6px 8px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reconcile-guide b {
  align-items: center;
  background: rgba(34, 211, 238, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  display: inline-flex;
  flex: 0 0 22px;
  font-size: 11px;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.asset-draft-totals span,
.asset-draft-delta span {
  color: var(--muted);
  font-size: 12px;
}

.asset-draft-totals b,
.asset-draft-delta b {
  margin-left: 6px;
}

.asset-draft-delta {
  background: rgba(15, 23, 42, 0.36);
  margin-top: 0;
}

.asset-capture-panel-v2 .asset-draft-totals,
.asset-capture-panel-v2 .asset-draft-delta {
  gap: 6px;
  padding: 7px 10px;
}

.muted-text {
  color: var(--muted);
}

.asset-save-preview {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(2, 8, 23, 0.34)),
    rgba(2, 8, 23, 0.34);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1fr);
  margin-top: 0;
  padding: 9px 10px;
}

.asset-save-preview span,
.asset-save-preview small {
  color: var(--muted);
  font-size: 12px;
}

.asset-save-preview strong {
  color: var(--text);
  display: block;
  margin: 3px 0;
}

.asset-save-preview-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-save-preview-grid span {
  background: rgba(2, 8, 23, 0.38);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 10px;
  min-width: 0;
  padding: 6px;
}

.asset-save-preview-grid b {
  display: block;
  font-size: 13px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.asset-save-preview-empty {
  border-color: rgba(148, 163, 184, 0.18);
}

.asset-save-preview-ready {
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.08);
}

.asset-human-ledger {
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.12), transparent 54%),
    rgba(2, 8, 23, 0.34);
  margin-top: 12px;
}

.asset-human-ledger span {
  color: var(--cyan);
  font-size: 12px;
}

.asset-human-ledger strong {
  color: var(--text);
}

.asset-human-ledger small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.asset-quick-presets {
  background: rgba(2, 8, 23, 0.2);
  border-radius: 12px;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
}

.asset-quick-presets .mini-action {
  min-height: 30px;
  padding: 5px 10px;
}

.asset-capture-panel-v2 .asset-quick-presets {
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding: 6px 8px;
}

.asset-capture-panel-v2 .asset-quick-presets .mini-action {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
}

.asset-clearance-toolbar {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.09), rgba(16, 185, 129, 0.045)),
    rgba(2, 8, 23, 0.42);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  padding: 10px;
}

.asset-clearance-search-field {
  margin: 0;
}

.asset-clearance-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-clearance-tools .mini-action[aria-pressed="true"],
.asset-clearance-tools .mini-action.active {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.12), 0 0 18px rgba(34, 211, 238, 0.12);
  color: var(--text);
}

.asset-ledger-section[data-collapsed="true"] .asset-quick-presets,
.asset-ledger-section[data-collapsed="true"] .asset-ledger-header,
.asset-ledger-section[data-collapsed="true"] .asset-ledger-rows {
  display: none;
}

.asset-ledger-row[hidden] {
  display: none !important;
}

.asset-workbench-v2 .asset-body-grid {
  order: 6;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.45fr);
}

.asset-workbench-v2 .asset-balance-head {
  order: 0;
}

.asset-workbench-v2 [data-asset-advanced-flow="snapshot-maintenance"] {
  order: 1;
}

.asset-workbench-v2 [data-asset-workflow-guide="true"] {
  order: 2;
}

.asset-workbench-v2 [data-asset-task-switcher="true"] {
  order: 3;
}

.asset-workbench-v2 [data-asset-current-context="true"] {
  order: 4;
}

.asset-workbench-v2 .asset-workflow-strip {
  order: 5;
}

.asset-workbench-v2 [data-asset-primary-flow="monthly-reconciliation"] {
  order: 7;
}

.asset-workbench-v2 [data-asset-reconciliation-workbench="true"] {
  order: 8;
}

.asset-workbench-v2 .asset-capture-panel {
  grid-column: 1;
  grid-row: 1;
  order: 1;
  position: static;
}

.asset-workbench-v2 .asset-entry-reference-panel {
  grid-column: 2;
  grid-row: 1;
  order: 2;
}

.asset-workbench-v2 .asset-view-panel {
  grid-column: 1 / -1;
  grid-row: 3;
  order: 3;
  position: sticky;
  top: 96px;
}

.asset-flow-label {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(15, 23, 42, 0.58)),
    rgba(2, 8, 23, 0.46);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  display: grid;
  gap: 3px;
  margin: 12px 0 8px;
  padding: 10px 12px;
}

.asset-flow-label strong {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

.asset-flow-label small {
  color: var(--muted);
  line-height: 1.45;
}

.asset-flow-label-primary {
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.07);
}

.asset-flow-label-advanced {
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.1), rgba(15, 23, 42, 0.5)),
    rgba(2, 8, 23, 0.34);
  border-color: rgba(148, 163, 184, 0.18);
  margin-top: 18px;
}

.asset-mode-note {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(249, 115, 22, 0.12), rgba(15, 23, 42, 0.62)),
    rgba(2, 8, 23, 0.5);
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  margin: 8px 0 12px;
  padding: 10px 12px;
}

.asset-mode-note strong {
  color: var(--amber);
  font-size: 13px;
}

.asset-mode-note span {
  line-height: 1.5;
}

.asset-body-grid-advanced {
  opacity: 0.92;
}

.asset-body-grid-advanced:focus-within,
.asset-body-grid-advanced:hover {
  opacity: 1;
}

.asset-capture-panel-v2 {
  display: grid;
  align-items: start;
  gap: 8px 10px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.56fr);
  padding-bottom: 104px;
}

.asset-capture-panel-v2 .asset-capture-head {
  grid-column: 1;
  grid-row: 1;
}

.asset-capture-panel-v2 .asset-human-ledger {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0;
  padding: 8px 10px;
}

.asset-capture-panel-v2 .asset-capture-actions {
  grid-column: 2;
  grid-row: 4;
}

.asset-capture-panel-v2 .asset-ledger-grid {
  grid-column: 1 / -1;
  grid-row: 5;
}

.asset-capture-panel-v2 .asset-draft-totals {
  grid-column: 1;
  grid-row: 3;
}

.asset-capture-panel-v2 .asset-draft-delta {
  grid-column: 2;
  grid-row: 3;
}

.asset-capture-panel-v2 .asset-save-preview {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.asset-capture-panel-v2 .asset-clearance-toolbar {
  grid-column: 1;
  grid-row: 4;
}

.asset-capture-panel-v2 .asset-note-field {
  grid-column: 1 / -1;
  grid-row: 6;
  order: 9;
}

.asset-capture-panel-v2 .asset-paste-assist {
  grid-column: 1 / -1;
  grid-row: 7;
  order: 10;
}

.asset-capture-panel-v2 #assetSnapshotLookupResult {
  grid-column: 1 / -1;
  grid-row: 8;
  order: 11;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-section {
  background:
    linear-gradient(180deg, rgba(34, 211, 238, 0.055), rgba(2, 8, 23, 0.2)),
    rgba(2, 8, 23, 0.28);
  padding: 10px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-section:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(248, 113, 113, 0.07), rgba(2, 8, 23, 0.22)),
    rgba(2, 8, 23, 0.28);
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-header,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(90px, 0.46fr) minmax(88px, 0.5fr);
  gap: 8px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-header {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 4px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-row {
  align-items: center;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-header span:nth-child(n+4) {
  display: none;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-row .asset-snapshot-note,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-row .asset-row-delete {
  grid-column: 1 / -1;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-ledger-row .asset-row-delete {
  justify-self: end;
  min-height: 28px;
  min-width: 58px;
  padding-left: 0;
  padding-right: 0;
}

.asset-capture-panel-v2 input {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-capture-panel-v2 .asset-capture-head p {
  color: var(--muted);
  display: none;
  font-size: 12px;
  line-height: 1.32;
  margin: 4px 0 0;
}

.asset-capture-panel-v2 .asset-capture-head h4,
.asset-capture-panel-v2 .asset-capture-head .section-kicker {
  margin-bottom: 2px;
}

.asset-capture-panel-v2 .asset-human-ledger small {
  display: none;
}

.asset-capture-panel-v2 .asset-draft-totals,
.asset-capture-panel-v2 .asset-draft-delta {
  gap: 6px;
}

.asset-capture-panel-v2 .asset-draft-totals span,
.asset-capture-panel-v2 .asset-draft-delta span,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-capture-panel-v2 .asset-save-preview-grid span {
  min-height: 32px;
  padding: 7px 8px;
}

.asset-capture-panel-v2 .asset-save-preview {
  grid-template-columns: 1fr;
  min-width: 0;
  padding: 9px;
}

.asset-capture-panel-v2 .asset-save-preview small {
  display: none;
}

.asset-capture-panel-v2 .asset-save-preview-grid {
  gap: 6px;
  grid-template-columns: repeat(2, minmax(74px, 1fr));
}

.asset-capture-panel-v2 .asset-capture-actions {
  align-content: stretch;
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(2, 8, 23, 0.82)),
    rgba(2, 8, 23, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 14px;
  box-shadow:
    0 14px 34px rgba(2, 8, 23, 0.38),
    0 0 22px rgba(34, 211, 238, 0.08);
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  justify-content: flex-start;
  padding: 8px;
  position: sticky;
  top: 96px;
  z-index: 8;
}

.asset-capture-panel-v2 .asset-capture-actions .tag {
  grid-column: 1 / -1;
  min-height: 28px;
}

.asset-workbench-v2 > .asset-capture-actions-bottom {
  align-content: center;
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto minmax(180px, 1fr);
  height: auto;
  margin-top: 4px;
  order: 9;
  position: static;
  width: 100%;
}

.asset-workbench-v2 > .asset-capture-actions-bottom .hud-button {
  align-self: center;
  height: auto;
  min-height: 38px;
}

.asset-capture-panel-v2 .asset-clearance-toolbar {
  grid-template-columns: minmax(150px, 1fr);
}

.asset-capture-panel-v2 .asset-clearance-tools {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.asset-view-panel-v2 .asset-balance-columns {
  grid-template-columns: 1fr;
}

.asset-view-panel-v2 {
  grid-template-columns: 1fr;
}

.asset-view-panel-v2 .asset-history-panel {
  grid-row: auto;
}

.asset-view-panel-v2 .asset-history-list {
  max-height: 292px;
  overflow: auto;
  padding-right: 2px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-row[data-asset-history-active="true"] {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(34, 211, 238, 0.18),
    0 0 18px rgba(34, 211, 238, 0.08);
}

.asset-view-panel-v2 .asset-detail-list {
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.asset-entry-reference-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  position: sticky;
  top: 96px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reference-card {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(15, 23, 42, 0.34)),
    rgba(2, 8, 23, 0.34);
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 16px;
  min-width: 0;
  padding: 10px;
}

.asset-reference-kpis {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reference-kpis span {
  background: rgba(2, 8, 23, 0.34);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  padding: 6px;
}

.asset-reference-kpis b {
  display: block;
  font-size: 14px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.asset-reference-split {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin-top: 8px;
  min-width: 0;
}

.asset-reference-split > div > strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reference-row {
  align-items: center;
  background: rgba(2, 8, 23, 0.3);
  border: 1px solid rgba(125, 211, 252, 0.12);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto);
  margin-top: 5px;
  min-height: 38px;
  min-width: 0;
  padding: 6px 8px;
}

.asset-reference-row.muted {
  color: var(--muted);
}

.asset-reference-row span,
.asset-reference-row strong,
.asset-reference-row small,
.asset-reference-row b {
  min-width: 0;
}

.asset-reference-row strong,
.asset-reference-row b {
  display: block;
  overflow-wrap: anywhere;
}

.asset-reference-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.2;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.asset-reference-row b {
  font-size: 13px;
  text-align: right;
}

.asset-reference-history-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  max-height: 168px;
  overflow: auto;
  padding-right: 2px;
}

.asset-reference-hint {
  margin-top: 10px;
}

.asset-column-head h4,
.asset-section-title strong,
.asset-capture-head h4 {
  color: var(--text);
  margin: 0;
}

.asset-capture-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

.asset-detail-list,
.asset-ledger-rows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-panel {
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(2, 8, 23, 0.44), rgba(34, 211, 238, 0.04));
  min-width: 0;
  padding: 12px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-filter {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(2, 8, 23, 0.32)),
    rgba(2, 8, 23, 0.28);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto auto;
  margin-top: 12px;
  min-width: 0;
  padding: 10px;
}

.asset-history-filter .field {
  margin: 0;
  min-width: 0;
}

.asset-history-filter .tag {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

.asset-history-summary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-summary > div,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-comparison,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-detail {
  background: rgba(2, 8, 23, 0.34);
  border: 1px solid rgba(125, 211, 252, 0.13);
  border-radius: 14px;
  min-width: 0;
  padding: 10px;
}

.asset-history-summary span,
.asset-history-comparison span,
.asset-history-comparison small,
.asset-history-detail-head span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.asset-history-summary strong,
.asset-history-comparison strong,
.asset-history-detail-head strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.asset-history-comparison {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr) minmax(170px, auto);
  margin-top: 10px;
}

.asset-history-comparison strong {
  margin: 0;
}

.asset-history-comparison small {
  text-align: right;
}

.asset-history-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 238px;
  overflow: auto;
  padding-right: 2px;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-row {
  align-items: center;
  background: linear-gradient(90deg, rgba(2, 8, 23, 0.36), rgba(14, 165, 233, 0.055));
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
  min-height: 58px;
  min-width: 0;
  padding: 9px 11px;
  text-align: left;
}

.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-row:hover,
.asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-row.active {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.075), 0 0 14px rgba(34, 211, 238, 0.06);
}

.asset-history-row span,
.asset-history-row strong,
.asset-history-row small,
.asset-history-row b {
  min-width: 0;
}

.asset-history-row strong,
.asset-history-row b {
  display: block;
  font-variant-numeric: tabular-nums;
}

.asset-history-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.asset-history-row[hidden] {
  display: none;
}

.asset-history-detail {
  margin-top: 10px;
}

.asset-history-detail-head {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.compact-history-detail {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asset-ledger-header {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 8px;
  grid-template-columns: minmax(108px, 1fr) minmax(84px, 0.52fr) minmax(112px, 0.7fr) minmax(132px, 1.1fr) auto;
  letter-spacing: 0.03em;
  margin-top: 10px;
  min-width: 0;
  padding: 0 10px;
}

.asset-detail-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(2, 8, 23, 0.32);
  border: 1px solid rgba(125, 211, 252, 0.12);
}

.asset-detail-row span,
.asset-detail-row strong,
.asset-ledger-row input,
.asset-row-reference {
  min-width: 0;
}

.asset-detail-row strong:first-child,
.asset-detail-row span strong {
  display: block;
  overflow-wrap: anywhere;
}

.asset-detail-row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.asset-ledger-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 1fr) minmax(92px, 0.52fr) minmax(112px, 0.7fr) minmax(140px, 1fr) auto;
  min-width: 0;
}

.asset-row-reference {
  background: rgba(2, 8, 23, 0.34);
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 10px;
  display: grid;
  gap: 2px;
  min-height: 36px;
  padding: 5px 8px;
}

.asset-row-reference span {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 5px;
  justify-content: space-between;
  line-height: 1.15;
  min-width: 0;
}

.asset-row-reference b {
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-ledger-row input,
.asset-paste-assist textarea,
.asset-note-field input,
.asset-date-field input {
  background: rgba(2, 8, 23, 0.42);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 36px;
  outline: 0;
  padding: 8px 10px;
  width: 100%;
}

.asset-ledger-row input:focus,
.asset-paste-assist textarea:focus,
.asset-note-field input:focus,
.asset-date-field input:focus {
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
}

.asset-date-field {
  min-width: 190px;
}

.asset-note-field {
  margin-top: 12px;
}

.asset-paste-assist {
  margin-top: 12px;
}

.asset-paste-assist summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  margin-bottom: 8px;
}

.asset-paste-assist textarea {
  min-height: 76px;
  resize: vertical;
}

.asset-capture-actions {
  justify-content: flex-start;
  margin-top: 12px;
  flex-wrap: wrap;
}
.ring {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 63%, var(--amber) 63% 71%, var(--red) 71% 82%, rgba(34,211,238,0.25) 82% 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 30px rgba(34,211,238,0.16);
}
.ring::before {
  content: "";
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(2,8,23,0.9);
  border: 1px solid rgba(125,211,252,0.2);
  position: absolute;
}
.ring span { position: relative; text-align: center; font-size: 11px; color: var(--muted); }
.ring b { display:block; font-size: 19px; color: var(--text); }

.people-form {
  display: grid;
  gap: 10px;
}
[data-people-overview-panel="quick-create"] .people-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}
[data-people-overview-panel="quick-create"] .people-form .hud-button {
  grid-column: 1 / -1;
}

.library-form {
  display: grid;
  gap: 10px;
}

.library-form .hud-button {
  width: 100%;
}

.people-search-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  margin-bottom: 10px;
}

.people-search-row input {
  background: rgba(2, 8, 23, 0.36);
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 12px;
  color: var(--text);
  min-width: 0;
  outline: none;
  padding: 9px 10px;
}

.people-person-row {
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.people-person-row.active {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: inset 0 0 24px rgba(34, 211, 238, 0.08);
}

.person-head {
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px;
}

.person-head strong {
  color: var(--text);
  display: block;
  font-size: 18px;
}

.person-head small,
.microcopy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.tag.active {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.62);
}

.people-list,
.people-interaction-list {
  max-height: 360px;
  overflow: auto;
}

.people-field-row,
.people-interaction-row {
  align-items: center;
}

.ai-fab {
  position: static;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.65);
  background: radial-gradient(circle at 30% 20%, rgba(167, 139, 250, 0.7), rgba(14, 165, 233, 0.28) 48%, rgba(2, 8, 23, 0.88));
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.32), inset 0 1px 0 rgba(255,255,255,0.12);
  z-index: auto;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}
.ai-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.28), 0 0 24px rgba(167, 139, 250, 0.22), inset 0 1px 0 rgba(255,255,255,0.14);
}

.ai-fab:disabled,
.ai-query-form button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  filter: grayscale(0.35);
}

body.auth-required .ai-fab {
  opacity: 0.5;
}

.ai-panel {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 430px;
  height: 560px;
  max-height: calc(100dvh - 56px);
  border-radius: 22px;
  padding: 18px;
  display: none;
  overflow: hidden;
  background-color: rgba(5, 15, 28, 0.96);
  z-index: 5;
}
body.ai-open .ai-panel { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 14px; }
.qq-activation-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(19, 45, 43, .42); backdrop-filter: blur(8px); }
.qq-activation-modal[hidden] { display: none; }
.qq-activation-card { width: min(420px, 100%); display: grid; gap: 18px; padding: 28px; border: 1px solid rgba(45, 125, 102, .35); border-radius: 8px; background: var(--surface, #f8fbf5); box-shadow: 0 24px 80px rgba(17, 45, 42, .28); }
.qq-activation-link { display: inline-flex; justify-content: center; color: #0d6f5b; font-weight: 700; text-decoration: none; }
.ai-panel h3, .answer-card h4 { margin: 0; }
.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ai-close {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 10px;
  background: rgba(2, 8, 23, 0.72);
  color: #e0faff;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.ai-close:hover {
  border-color: rgba(34, 211, 238, 0.72);
  background: rgba(8, 145, 178, 0.2);
}
.ai-query-form {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
}
.ai-query-form input {
  min-width: 0;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 14px;
  background: rgba(2, 8, 23, 0.56);
  color: var(--text);
  padding: 11px 12px;
}
.ai-query-form button,
.mini-button {
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.16);
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
}
.mini-button.glow {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32), rgba(16, 185, 129, 0.24));
}
.answer-card {
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(2, 8, 23, 0.36);
  padding: 14px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}
.answer-card p { font-size: 15px; line-height: 1.55; margin: 12px 0; }
.ai-chip-row,
.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.ai-result {
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.38);
  background: rgba(2, 8, 23, 0.48);
  padding: 10px 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.prompt {
  min-height: 44px;
  border-radius: 15px;
  border: 1px solid rgba(167, 139, 250, 0.38);
  background: rgba(2, 8, 23, 0.48);
  padding: 12px;
  color: #ddd6fe;
  font-size: 13px;
}
.source {
  border-left: 2px solid var(--cyan);
  padding-left: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}

.fatal-error {
  margin: 24px;
  color: #fecaca;
  white-space: pre-wrap;
}

.login-required {
  max-width: 720px;
}

.login-required p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 18px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: start;
}

.auth-stack,
.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(2, 8, 23, 0.62);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.auth-form button,
.status-button {
  min-height: 32px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.9), rgba(14, 165, 233, 0.72));
  color: #e0faff;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-register {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.48);
}

.auth-register summary {
  cursor: pointer;
  color: #bae6fd;
}

.auth-message {
  min-height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 145, 178, 0.12);
  color: #bae6fd;
  padding: 10px 12px;
  font-size: 13px;
}

.auth-message.error {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.28);
  color: #fecaca;
}

.status-button {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.w12 { grid-column: span 12; } .w9 { grid-column: span 9; } .w8 { grid-column: span 8; } .w7 { grid-column: span 7; } .w6 { grid-column: span 6; } .w5 { grid-column: span 5; } .w4 { grid-column: span 4; } .w3 { grid-column: span 3; }
.h2 { grid-row: span 2; } .h3 { grid-row: span 3; }

@media (max-width: 1180px) {
  .status {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 920px) {
  .command-panel[data-command-state="idle"] .command-summary,
  .command-panel[data-command-state="idle"] .command-split {
    display: none;
  }
  .people-list {
    max-height: none;
    overflow: visible;
  }
  .command input,
  .module-stage input:not([type="checkbox"]):not([type="radio"]),
  .module-stage select,
  .module-stage textarea,
  .status-button,
  .mini-action,
  .segmented-option,
  .tag.category-preset,
  .asset-task-switcher a {
    min-height: 38px;
  }
  .tag.category-preset {
    min-width: 36px;
  }
  .command-console-head { display: grid; }
  .command-actions { justify-content: start; }
  .split { grid-template-columns: 1fr; }
  .finance-entry-row { grid-template-columns: 1fr; }
  .budget-form, .snapshot-form { grid-template-columns: 1fr; }
  .budget-row { grid-template-columns: 1fr; }
  .finance-workbench-columns,
  .finance-workbench-columns.two {
    grid-template-columns: 1fr;
  }
  .workbench-actions {
    justify-content: flex-start;
  }
  .asset-balance-head,
  .asset-body-grid,
  .asset-balance-columns,
  .asset-ledger-grid,
  .asset-reconcile-guide {
    grid-template-columns: 1fr;
  }
  .asset-workbench {
    gap: 12px;
  }
  .asset-net-ring {
    height: 86px;
    width: 86px;
  }
  .asset-net-ring::before {
    height: 60px;
    width: 60px;
  }
  .asset-reconcile-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-save-preview,
  .asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-save-preview-grid {
    grid-template-columns: 1fr;
  }
  .asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reconcile-guide span {
    font-size: 11px;
    min-height: 34px;
    padding: 6px 8px;
  }
  .asset-capture-panel {
    position: static;
  }
  .asset-entry-reference-panel {
    position: static;
  }
  .asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-reference-kpis {
    grid-template-columns: 1fr;
  }
  .asset-view-panel-v2 {
    position: static;
  }
  .asset-balance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .asset-capture-panel-v2 .asset-ledger-grid,
  .asset-clearance-toolbar,
  .asset-body-grid-v2[data-asset-active-view="entry"],
  .asset-view-panel-v2,
  .asset-view-panel-v2 .asset-balance-columns {
    grid-template-columns: 1fr;
  }
  .asset-history-filter,
  .asset-workbench-v2:not([data-asset-human-contract="asset-liability-ledger-v5"]) .asset-history-summary,
  .asset-history-comparison,
  .compact-history-detail {
    grid-template-columns: 1fr;
  }
  .asset-history-filter .tag,
  .asset-history-comparison small {
    justify-self: start;
    text-align: left;
  }
  .asset-workbench-v2 .asset-entry-reference-panel,
  .asset-workbench-v2 .asset-capture-panel {
    width: 100%;
  }
  .asset-workbench-v2 .asset-capture-panel {
    grid-column: 1;
    grid-row: 1;
  }
  .asset-workbench-v2 .asset-entry-reference-panel {
    grid-column: 1;
    grid-row: 2;
  }
  .asset-workbench-v2 > .asset-capture-actions-bottom {
    grid-template-columns: 1fr;
    order: 9;
  }
  .asset-workbench-v2 .asset-view-panel {
    grid-column: 1;
    grid-row: 4;
  }
  .asset-capture-panel-v2 .asset-capture-actions {
    background: rgba(2, 8, 23, 0.9);
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 14px;
    grid-row: 2;
    padding: 8px;
    position: sticky;
    top: 8px;
    z-index: 2;
  }
  .asset-capture-panel-v2 .asset-human-ledger {
    grid-row: 3;
  }
  .asset-capture-panel-v2 .asset-draft-totals {
    grid-row: 4;
  }
  .asset-capture-panel-v2 .asset-draft-delta {
    grid-row: 5;
  }
  .asset-capture-panel-v2 .asset-save-preview {
    grid-row: 6;
  }
  .asset-capture-panel-v2 .asset-clearance-toolbar {
    grid-row: 7;
  }
  .asset-capture-panel-v2 .asset-ledger-grid {
    grid-row: 8;
  }
  .asset-capture-panel-v2 .asset-note-field {
    grid-row: 9;
  }
  .asset-capture-panel-v2 .asset-paste-assist {
    grid-row: 10;
  }
  .asset-capture-panel-v2 #assetSnapshotLookupResult {
    grid-row: 11;
  }
  .asset-workbench-v2 > .asset-capture-actions-bottom {
    grid-template-columns: 1fr;
  }
  .asset-capture-panel-v2 .asset-clearance-tools .mini-action {
    min-width: 44px;
  }
  .asset-capture-panel-v2 .asset-ledger-header {
    display: none;
  }
  .asset-capture-panel-v2 .asset-ledger-row {
    grid-template-columns: 1fr;
  }
  .asset-reconciliation-controls,
  .asset-reconciliation-grid .asset-ledger-header,
  .asset-reconciliation-line {
    grid-template-columns: 1fr;
  }
  .asset-reconciliation-grid .asset-ledger-header {
    display: none;
  }
  .asset-capture-panel-v2 .asset-ledger-section {
    width: 100%;
  }
  .asset-capture-panel-v2 .asset-ledger-row .asset-row-delete {
    justify-self: start;
    max-width: 140px;
    width: 100%;
  }
  .asset-ledger-row,
  .asset-ledger-header {
    grid-template-columns: 1fr;
  }
  .asset-capture-head {
    align-items: stretch;
    display: grid;
  }
  .asset-date-field {
    min-width: 0;
  }
  .category-chart { grid-template-columns: 1fr; }
  .chart-bar-row { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .w12, .w9, .w8, .w7, .w6, .w5, .w4, .w3 { grid-column: span 12; }
  .h2, .h3 { grid-row: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .ai-panel {
    left: 18px;
    right: 18px;
    bottom: 18px;
    width: auto;
    height: min(520px, calc(100dvh - 36px));
    max-height: calc(100dvh - 36px);
  }
}

@media (max-width: 640px) {
  [data-people-overview-panel="quick-create"] .people-form {
    grid-template-columns: 1fr;
  }
  [data-people-overview-panel="quick-create"] .people-form .hud-button {
    grid-column: auto;
  }
  .knowledge-note-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .knowledge-note-row > span:first-child {
    width: 100%;
  }
  .knowledge-note-tags {
    max-width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
  .finance-calendar-toolbar {
    grid-template-columns: 38px minmax(0, 1fr) max-content 38px;
  }
  .finance-calendar-month-field {
    grid-template-columns: minmax(0, 1fr);
  }
  .finance-calendar-month-field span {
    display: none;
  }
  .finance-calendar-range {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .finance-calendar-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 211, 238, 0.48) rgba(2, 8, 23, 0.2);
  }
  .finance-calendar-scroll .calendar {
    min-width: 700px;
  }
  .panel { padding: 14px; }
  .brand h1,
  .title h2 { font-size: 18px; }
  .title span { display: none; }
  .status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    gap: 8px;
    font-size: 12px;
  }
  #workspaceStatus {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .status-button {
    justify-self: end;
    min-height: 38px;
  }
  .kpis { grid-template-columns: 1fr; }
  .people-search-row,
  .people-form,
  .auth-grid,
  .command {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 44px;
    align-items: flex-start;
    padding: 10px 12px;
  }
  .command span {
    margin: 0 0 4px;
    white-space: normal;
  }
  .tabs {
    height: 44px;
    padding-bottom: 2px;
    padding-inline: 5px;
    gap: 7px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .module-tabs-shell {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
    height: 44px;
  }
  .module-tabs-nav {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  .tab { min-width: 82px; min-height: 44px; }
  .ai-panel {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 16px;
    height: min(520px, calc(100dvh - 28px));
    max-height: calc(100dvh - 28px);
    background: #050f1c;
  }
  .ai-fab {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    opacity: 1;
  }
  body.auth-required .ai-fab {
    display: none;
  }
  .ai-query-form { grid-template-columns: minmax(0, 1fr) 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* source: vendor/tabulator-6.5.2/tabulator.min.css */
.tabulator{background-color:#888;border:1px solid #999;font-size:14px;overflow:hidden;position:relative;text-align:left;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}.tabulator[tabulator-layout=fitDataFill] .tabulator-tableholder .tabulator-table{min-width:100%}.tabulator[tabulator-layout=fitDataTable]{display:inline-block}.tabulator.tabulator-block-select,.tabulator.tabulator-ranges .tabulator-cell:not(.tabulator-editing){user-select:none}.tabulator .tabulator-header{background-color:#e6e6e6;border-bottom:1px solid #999;box-sizing:border-box;color:#555;font-weight:700;outline:none;overflow:hidden;position:relative;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;white-space:nowrap;width:100%}.tabulator .tabulator-header.tabulator-header-hidden{display:none}.tabulator .tabulator-header .tabulator-header-contents{overflow:hidden;position:relative}.tabulator .tabulator-header .tabulator-header-contents .tabulator-headers{display:inline-block}.tabulator .tabulator-header .tabulator-col{background:#e6e6e6;border-right:1px solid #aaa;box-sizing:border-box;display:inline-flex;flex-direction:column;justify-content:flex-start;overflow:hidden;position:relative;text-align:left;vertical-align:bottom}.tabulator .tabulator-header .tabulator-col.tabulator-moving{background:#cdcdcd;border:1px solid #999;pointer-events:none;position:absolute}.tabulator .tabulator-header .tabulator-col.tabulator-range-highlight{background-color:#d6d6d6;color:#000}.tabulator .tabulator-header .tabulator-col.tabulator-range-selected{background-color:#3876ca;color:#fff}.tabulator .tabulator-header .tabulator-col .tabulator-col-content{box-sizing:border-box;padding:4px;position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-popup-button{padding:0 8px}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-header-popup-button:hover{cursor:pointer;opacity:.6}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title-holder{position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap;width:100%}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title.tabulator-col-title-wrap{text-overflow:clip;white-space:normal}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-title-editor{background:#fff;border:1px solid #999;box-sizing:border-box;padding:1px;width:100%}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title .tabulator-header-popup-button+.tabulator-title-editor{width:calc(100% - 22px)}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{align-items:center;bottom:0;display:flex;position:absolute;right:4px;top:0}.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:6px solid #bbb;border-left:6px solid transparent;border-right:6px solid transparent;height:0;width:0}.tabulator .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{border-top:1px solid #aaa;display:flex;margin-right:-1px;overflow:hidden;position:relative}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter{box-sizing:border-box;margin-top:2px;position:relative;text-align:center;width:100%}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter textarea{height:auto!important}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter svg{margin-top:3px}.tabulator .tabulator-header .tabulator-col .tabulator-header-filter input::-ms-clear{height:0;width:0}.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-right:25px}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover{background-color:#cdcdcd;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter{color:#bbb}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter.tabulator-col-sorter-element .tabulator-arrow:hover{border-bottom:6px solid #555;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=none] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:6px solid #bbb;border-top:none}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter{color:#666}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter.tabulator-col-sorter-element .tabulator-arrow:hover{border-bottom:6px solid #555;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=ascending] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:6px solid #666;border-top:none}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter{color:#666}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter.tabulator-col-sorter-element .tabulator-arrow:hover{border-top:6px solid #555;cursor:pointer}}.tabulator .tabulator-header .tabulator-col.tabulator-sortable[aria-sort=descending] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow{border-bottom:none;border-top:6px solid #666;color:#666}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical .tabulator-col-content .tabulator-col-title{align-items:center;display:flex;justify-content:center;text-orientation:mixed;writing-mode:vertical-rl}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-col-vertical-flip .tabulator-col-title{transform:rotate(180deg)}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-title{padding-right:0;padding-top:20px}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable.tabulator-col-vertical-flip .tabulator-col-title{padding-bottom:20px;padding-right:0}.tabulator .tabulator-header .tabulator-col.tabulator-col-vertical.tabulator-sortable .tabulator-col-sorter{bottom:auto;justify-content:center;left:0;right:0;top:4px}.tabulator .tabulator-header .tabulator-frozen{left:0;position:sticky;z-index:11}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator .tabulator-header .tabulator-calcs-holder{background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;box-sizing:border-box;display:inline-block}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important}.tabulator .tabulator-header .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-header .tabulator-frozen-rows-holder{display:inline-block;padding-top:1em}.tabulator .tabulator-header .tabulator-frozen-rows-holder:empty{display:none}.tabulator .tabulator-tableholder{-webkit-overflow-scrolling:touch;overflow:auto;position:relative;white-space:nowrap;width:100%}.tabulator .tabulator-tableholder:focus{outline:none}.tabulator .tabulator-tableholder .tabulator-placeholder{align-items:center;box-sizing:border-box;display:flex;justify-content:center;min-width:100%;width:100%}.tabulator .tabulator-tableholder .tabulator-placeholder[tabulator-render-mode=virtual]{min-height:100%}.tabulator .tabulator-tableholder .tabulator-placeholder .tabulator-placeholder-contents{color:#ccc;display:inline-block;font-size:20px;font-weight:700;padding:10px;text-align:center;white-space:normal}.tabulator .tabulator-tableholder .tabulator-table{background-color:#fff;color:#333;display:inline-block;overflow:visible;position:relative;white-space:nowrap}.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-calcs{background:#e2e2e2!important;font-weight:700}.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-top{border-bottom:2px solid #aaa}.tabulator .tabulator-tableholder .tabulator-table .tabulator-row.tabulator-calcs.tabulator-calcs-bottom{border-top:2px solid #aaa}.tabulator .tabulator-tableholder .tabulator-range-overlay{inset:0;pointer-events:none;position:absolute;z-index:10}.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range{border:1px solid #2975dd;box-sizing:border-box;position:absolute}.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range.tabulator-range-active:after{background-color:#2975dd;border-radius:999px;bottom:-3px;content:"";height:6px;position:absolute;right:-3px;width:6px}.tabulator .tabulator-tableholder .tabulator-range-overlay .tabulator-range-cell-active{border:2px solid #2975dd;box-sizing:border-box;position:absolute}.tabulator .tabulator-footer{background-color:#e6e6e6;border-top:1px solid #999;color:#555;font-weight:700;user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;white-space:nowrap}.tabulator .tabulator-footer .tabulator-footer-contents{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:5px 10px}.tabulator .tabulator-footer .tabulator-footer-contents:empty{display:none}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs{margin-top:-5px;overflow-x:auto}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs .tabulator-spreadsheet-tab{border:1px solid #999;border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-top:none;display:inline-block;font-size:.9em;padding:5px}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs .tabulator-spreadsheet-tab:hover{cursor:pointer;opacity:.7}.tabulator .tabulator-footer .tabulator-spreadsheet-tabs .tabulator-spreadsheet-tab.tabulator-spreadsheet-tab-active{background:#fff}.tabulator .tabulator-footer .tabulator-calcs-holder{background:#f3f3f3!important;border-bottom:1px solid #aaa;border-top:1px solid #aaa;box-sizing:border-box;overflow:hidden;text-align:left;width:100%}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row{background:#f3f3f3!important;display:inline-block}.tabulator .tabulator-footer .tabulator-calcs-holder .tabulator-row .tabulator-col-resize-handle{display:none}.tabulator .tabulator-footer .tabulator-calcs-holder:only-child{border-bottom:none;margin-bottom:-5px}.tabulator .tabulator-footer>*+.tabulator-page-counter{margin-left:10px}.tabulator .tabulator-footer .tabulator-page-counter{font-weight:400}.tabulator .tabulator-footer .tabulator-paginator{color:#555;flex:1;font-family:inherit;font-size:inherit;font-weight:inherit;text-align:right}.tabulator .tabulator-footer .tabulator-page-size{border:1px solid #aaa;border-radius:3px;display:inline-block;margin:0 5px;padding:2px 5px}.tabulator .tabulator-footer .tabulator-pages{margin:0 7px}.tabulator .tabulator-footer .tabulator-page{background:hsla(0,0%,100%,.2);border:1px solid #aaa;border-radius:3px;display:inline-block;margin:0 2px;padding:2px 5px}.tabulator .tabulator-footer .tabulator-page.active{color:#d00}.tabulator .tabulator-footer .tabulator-page:disabled{opacity:.5}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-footer .tabulator-page:not(disabled):hover{background:rgba(0,0,0,.2);color:#fff;cursor:pointer}}.tabulator .tabulator-col-resize-handle{display:inline-block;margin-left:-3px;margin-right:-3px;position:relative;vertical-align:middle;width:6px;z-index:11}@media (hover:hover) and (pointer:fine){.tabulator .tabulator-col-resize-handle:hover{cursor:ew-resize}}.tabulator .tabulator-col-resize-handle:last-of-type{margin-right:0;width:3px}.tabulator .tabulator-col-resize-guide{background-color:#999;height:100%;margin-left:-.5px;opacity:.5;position:absolute;top:0;width:4px}.tabulator .tabulator-row-resize-guide{background-color:#999;height:4px;left:0;margin-top:-.5px;opacity:.5;position:absolute;width:100%}.tabulator .tabulator-alert{align-items:center;background:rgba(0,0,0,.4);display:flex;height:100%;left:0;position:absolute;text-align:center;top:0;width:100%;z-index:100}.tabulator .tabulator-alert .tabulator-alert-msg{background:#fff;border-radius:10px;display:inline-block;font-size:16px;font-weight:700;margin:0 auto;padding:10px 20px}.tabulator .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-msg{border:4px solid #333;color:#000}.tabulator .tabulator-alert .tabulator-alert-msg.tabulator-alert-state-error{border:4px solid #d00;color:#590000}.tabulator-row{background-color:#fff;box-sizing:border-box;min-height:22px;position:relative}.tabulator-row.tabulator-row-even{background-color:#efefef}@media (hover:hover) and (pointer:fine){.tabulator-row.tabulator-selectable:hover{background-color:#bbb;cursor:pointer}}.tabulator-row.tabulator-selected{background-color:#9abcea}@media (hover:hover) and (pointer:fine){.tabulator-row.tabulator-selected:hover{background-color:#769bcc;cursor:pointer}}.tabulator-row.tabulator-row-moving{background:#fff;border:1px solid #000}.tabulator-row.tabulator-moving{border-bottom:1px solid #aaa;border-top:1px solid #aaa;pointer-events:none;position:absolute;z-index:15}.tabulator-row.tabulator-range-highlight .tabulator-cell.tabulator-range-row-header{background-color:#d6d6d6;color:#000}.tabulator-row.tabulator-range-highlight.tabulator-range-selected .tabulator-cell.tabulator-range-row-header,.tabulator-row.tabulator-range-selected .tabulator-cell.tabulator-range-row-header{background-color:#3876ca;color:#fff}.tabulator-row .tabulator-row-resize-handle{bottom:0;height:5px;left:0;position:absolute;right:0}.tabulator-row .tabulator-row-resize-handle.prev{bottom:auto;top:0}@media (hover:hover) and (pointer:fine){.tabulator-row .tabulator-row-resize-handle:hover{cursor:ns-resize}}.tabulator-row .tabulator-responsive-collapse{border-bottom:1px solid #aaa;border-top:1px solid #aaa;box-sizing:border-box;padding:5px}.tabulator-row .tabulator-responsive-collapse:empty{display:none}.tabulator-row .tabulator-responsive-collapse table{font-size:14px}.tabulator-row .tabulator-responsive-collapse table tr td{position:relative}.tabulator-row .tabulator-responsive-collapse table tr td:first-of-type{padding-right:10px}.tabulator-row .tabulator-cell{border-right:1px solid #aaa;box-sizing:border-box;display:inline-block;outline:none;overflow:hidden;padding:4px;position:relative;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.tabulator-row .tabulator-cell .tabulator-tick{fill:#2dc214}.tabulator-row .tabulator-cell .tabulator-cross{fill:#ce1515}.tabulator-row .tabulator-cell.tabulator-row-header{background:#e6e6e6;border-bottom:1px solid #aaa;border-right:1px solid #999}.tabulator-row .tabulator-cell.tabulator-frozen{background-color:inherit;display:inline-block;left:0;position:sticky;z-index:11}.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left{border-right:2px solid #aaa}.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right{border-left:2px solid #aaa}.tabulator-row .tabulator-cell.tabulator-editing{border:1px solid #1d68cd;outline:none;padding:0}.tabulator-row .tabulator-cell.tabulator-editing input,.tabulator-row .tabulator-cell.tabulator-editing select{background:transparent;border:1px;outline:none}.tabulator-row .tabulator-cell.tabulator-validation-fail{border:1px solid #d00}.tabulator-row .tabulator-cell.tabulator-validation-fail input,.tabulator-row .tabulator-cell.tabulator-validation-fail select{background:transparent;border:1px;color:#d00}.tabulator-row .tabulator-cell.tabulator-row-handle{align-items:center;display:inline-flex;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box{width:80%}.tabulator-row .tabulator-cell.tabulator-row-handle .tabulator-row-handle-box .tabulator-row-handle-bar{background:#666;height:3px;margin-top:2px;width:100%}.tabulator-row .tabulator-cell.tabulator-range-selected:not(.tabulator-range-only-cell-selected):not(.tabulator-range-row-header){background-color:#9abcea}.tabulator-row .tabulator-cell .tabulator-data-tree-branch-empty{display:inline-block;width:7px}.tabulator-row .tabulator-cell .tabulator-data-tree-branch{border-bottom:2px solid #aaa;border-bottom-left-radius:1px;border-left:2px solid #aaa;display:inline-block;height:9px;margin-right:5px;margin-top:-9px;vertical-align:middle;width:7px}.tabulator-row .tabulator-cell .tabulator-data-tree-control{align-items:center;background:rgba(0,0,0,.1);border:1px solid #333;border-radius:2px;display:inline-flex;height:11px;justify-content:center;margin-right:5px;overflow:hidden;vertical-align:middle;width:11px}@media (hover:hover) and (pointer:fine){.tabulator-row .tabulator-cell .tabulator-data-tree-control:hover{background:rgba(0,0,0,.2);cursor:pointer}}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse{background:transparent;display:inline-block;height:7px;position:relative;width:1px}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand{background:#333;display:inline-block;height:7px;position:relative;width:1px}.tabulator-row .tabulator-cell .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle{align-items:center;background:#666;border-radius:20px;color:#fff;display:inline-flex;font-size:1.1em;font-weight:700;height:15px;justify-content:center;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;width:15px}@media (hover:hover) and (pointer:fine){.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle:hover{cursor:pointer;opacity:.7}}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-close{display:initial}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle.open .tabulator-responsive-collapse-toggle-open{display:none}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle svg{stroke:#fff}.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle .tabulator-responsive-collapse-toggle-close{display:none}.tabulator-row .tabulator-cell .tabulator-traffic-light{border-radius:14px;display:inline-block;height:14px;width:14px}.tabulator-row.tabulator-group{background:#ccc;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;box-sizing:border-box;font-weight:700;min-width:100%;padding:5px 5px 5px 10px}@media (hover:hover) and (pointer:fine){.tabulator-row.tabulator-group:hover{background-color:rgba(0,0,0,.1);cursor:pointer}}.tabulator-row.tabulator-group.tabulator-group-visible .tabulator-arrow{border-bottom:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;margin-right:10px}.tabulator-row.tabulator-group.tabulator-group-level-1{padding-left:30px}.tabulator-row.tabulator-group.tabulator-group-level-2{padding-left:50px}.tabulator-row.tabulator-group.tabulator-group-level-3{padding-left:70px}.tabulator-row.tabulator-group.tabulator-group-level-4{padding-left:90px}.tabulator-row.tabulator-group.tabulator-group-level-5{padding-left:110px}.tabulator-row.tabulator-group .tabulator-group-toggle{display:inline-block}.tabulator-row.tabulator-group .tabulator-arrow{border-bottom:6px solid transparent;border-left:6px solid #666;border-right:0;border-top:6px solid transparent;display:inline-block;height:0;margin-right:16px;vertical-align:middle;width:0}.tabulator-row.tabulator-group span{color:#d00;margin-left:10px}.tabulator-toggle{background:#dcdcdc;border:1px solid #ccc;box-sizing:border-box;display:flex;flex-direction:row}.tabulator-toggle.tabulator-toggle-on{background:#1c6cc2}.tabulator-toggle .tabulator-toggle-switch{background:#fff;border:1px solid #ccc;box-sizing:border-box}.tabulator-popup-container{-webkit-overflow-scrolling:touch;background:#fff;border:1px solid #aaa;box-shadow:0 0 5px 0 rgba(0,0,0,.2);box-sizing:border-box;display:inline-block;font-size:14px;overflow-y:auto;position:absolute;z-index:10000}.tabulator-popup{border-radius:3px;padding:5px}.tabulator-tooltip{border-radius:2px;box-shadow:none;font-size:12px;max-width:min(500px,100%);padding:3px 5px;pointer-events:none}.tabulator-menu .tabulator-menu-item{box-sizing:border-box;padding:5px 10px;position:relative;user-select:none}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-disabled{opacity:.5}@media (hover:hover) and (pointer:fine){.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover{background:#efefef;cursor:pointer}}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu{padding-right:25px}.tabulator-menu .tabulator-menu-item.tabulator-menu-item-submenu:after{border-color:#aaa;border-style:solid;border-width:1px 1px 0 0;content:"";display:inline-block;height:7px;position:absolute;right:10px;top:calc(5px + .4em);transform:rotate(45deg);vertical-align:top;width:7px}.tabulator-menu .tabulator-menu-separator{border-top:1px solid #aaa}.tabulator-edit-list{-webkit-overflow-scrolling:touch;font-size:14px;max-height:200px;overflow-y:auto}.tabulator-edit-list .tabulator-edit-list-item{color:#333;outline:none;padding:4px}.tabulator-edit-list .tabulator-edit-list-item.active{background:#1d68cd;color:#fff}.tabulator-edit-list .tabulator-edit-list-item.active.focused{outline:1px solid hsla(0,0%,100%,.5)}.tabulator-edit-list .tabulator-edit-list-item.focused{outline:1px solid #1d68cd}@media (hover:hover) and (pointer:fine){.tabulator-edit-list .tabulator-edit-list-item:hover{background:#1d68cd;color:#fff;cursor:pointer}}.tabulator-edit-list .tabulator-edit-list-placeholder{color:#333;padding:4px;text-align:center}.tabulator-edit-list .tabulator-edit-list-group{border-bottom:1px solid #aaa;color:#333;font-weight:700;padding:6px 4px 4px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-2,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-2{padding-left:12px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-3,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-3{padding-left:20px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-4,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-4{padding-left:28px}.tabulator-edit-list .tabulator-edit-list-group.tabulator-edit-list-group-level-5,.tabulator-edit-list .tabulator-edit-list-item.tabulator-edit-list-group-level-5{padding-left:36px}.tabulator.tabulator-ltr{direction:ltr}.tabulator.tabulator-rtl{direction:rtl;text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col{border-left:1px solid #aaa;border-right:initial;text-align:initial}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-col-group .tabulator-col-group-cols{margin-left:-1px;margin-right:0}.tabulator.tabulator-rtl .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title{padding-left:25px;padding-right:0}.tabulator.tabulator-rtl .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter{left:8px;right:auto}.tabulator.tabulator-rtl .tabulator-tableholder .tabulator-range-overlay .tabulator-range.tabulator-range-active:after{background-color:#2975dd;border-radius:999px;bottom:-3px;content:"";height:6px;left:-3px;position:absolute;right:auto;width:6px}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell{border-left:1px solid #aaa;border-right:initial}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-branch{border-bottom-left-radius:0;border-bottom-right-radius:1px;border-left:initial;border-right:2px solid #aaa;margin-left:5px;margin-right:0}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell .tabulator-data-tree-control{margin-left:5px;margin-right:0}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left{border-left:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right{border-right:2px solid #aaa}.tabulator.tabulator-rtl .tabulator-row .tabulator-col-resize-handle:last-of-type{margin-left:0;margin-right:-3px;width:3px}.tabulator.tabulator-rtl .tabulator-footer .tabulator-calcs-holder{text-align:initial}.tabulator-print-fullscreen{bottom:0;left:0;position:absolute;right:0;top:0;z-index:10000}body.tabulator-print-fullscreen-hide>:not(.tabulator-print-fullscreen){display:none!important}.tabulator-print-table{border-collapse:collapse}.tabulator-print-table .tabulator-data-tree-branch{border-bottom:2px solid #aaa;border-bottom-left-radius:1px;border-left:2px solid #aaa;display:inline-block;height:9px;margin-right:5px;margin-top:-9px;vertical-align:middle;width:7px}.tabulator-print-table .tabulator-print-table-group{background:#ccc;border-bottom:1px solid #999;border-right:1px solid #aaa;border-top:1px solid #999;box-sizing:border-box;font-weight:700;min-width:100%;padding:5px 5px 5px 10px}@media (hover:hover) and (pointer:fine){.tabulator-print-table .tabulator-print-table-group:hover{background-color:rgba(0,0,0,.1);cursor:pointer}}.tabulator-print-table .tabulator-print-table-group.tabulator-group-visible .tabulator-arrow{border-bottom:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #666;margin-right:10px}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-1 td{padding-left:30px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-2 td{padding-left:50px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-3 td{padding-left:70px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-4 td{padding-left:90px!important}.tabulator-print-table .tabulator-print-table-group.tabulator-group-level-5 td{padding-left:110px!important}.tabulator-print-table .tabulator-print-table-group .tabulator-group-toggle{display:inline-block}.tabulator-print-table .tabulator-print-table-group .tabulator-arrow{border-bottom:6px solid transparent;border-left:6px solid #666;border-right:0;border-top:6px solid transparent;display:inline-block;height:0;margin-right:16px;vertical-align:middle;width:0}.tabulator-print-table .tabulator-print-table-group span{color:#d00;margin-left:10px}.tabulator-print-table .tabulator-data-tree-control{align-items:center;background:rgba(0,0,0,.1);border:1px solid #333;border-radius:2px;display:inline-flex;height:11px;justify-content:center;margin-right:5px;overflow:hidden;vertical-align:middle;width:11px}@media (hover:hover) and (pointer:fine){.tabulator-print-table .tabulator-data-tree-control:hover{background:rgba(0,0,0,.2);cursor:pointer}}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse{background:transparent;display:inline-block;height:7px;position:relative;width:1px}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-collapse:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand{background:#333;display:inline-block;height:7px;position:relative;width:1px}.tabulator-print-table .tabulator-data-tree-control .tabulator-data-tree-control-expand:after{background:#333;content:"";height:1px;left:-3px;position:absolute;top:3px;width:7px}
/*# sourceMappingURL=tabulator.min.css.map */

/* source: styles/tokens.css */
:root {
  --cc-font-sans: "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
  --cc-font-mono: "Cascadia Mono", "SFMono-Regular", monospace;
  --cc-canvas: #f4f6f5;
  --cc-surface: #ffffff;
  --cc-surface-muted: #f8faf9;
  --cc-surface-strong: #edf2ef;
  --cc-ink: #17211d;
  --cc-ink-soft: #52605a;
  --cc-ink-faint: #7b8781;
  --cc-line: #d9e0dc;
  --cc-line-strong: #bac6c0;
  --cc-nav: #182722;
  --cc-nav-hover: #243832;
  --cc-nav-active: #31584b;
  --cc-accent: #176b50;
  --cc-accent-strong: #0f573f;
  --cc-accent-soft: #e5f1ec;
  --cc-blue: #286f91;
  --cc-blue-soft: #e6f1f6;
  --cc-danger: #ae3e4b;
  --cc-danger-soft: #f9e9eb;
  --cc-warning: #946100;
  --cc-warning-soft: #fbf1d9;
  --cc-shadow-float: 0 16px 42px rgba(21, 39, 32, 0.16);
  --cc-radius-sm: 3px;
  --cc-radius-md: 6px;
  --cc-nav-width: 224px;
  --cc-topbar-height: 58px;
  --cc-viewbar-height: 46px;
  --cc-control-height: 34px;
  --cc-touch-size: 44px;
  --cc-content-max: 1512px;
}


/* source: product-ui.css */
:root {
  --product-bg: #f3f5f6;
  --product-surface: #ffffff;
  --product-surface-soft: #f8faf9;
  --product-sidebar: #182321;
  --product-sidebar-muted: #a9b7b2;
  --product-text: #1d2926;
  --product-muted: #66736f;
  --product-line: #d8dfdc;
  --product-line-strong: #bec9c5;
  --product-card-emboss: rgba(25, 68, 58, 0.045);
  --product-card-fiber: rgba(170, 125, 55, 0.026);
  --product-accent: #176b5b;
  --product-accent-soft: #e4f0ed;
  --product-red: #b83d4c;
  --product-amber: #a86616;
  --product-green: #23734f;
  --product-blue: #346889;
  --product-violet: #67588a;
  --panel-radius: 6px;
  --control-radius: 6px;
  --control-height: 38px;
  --text: var(--product-text);
  --muted: var(--product-muted);
  --cyan: var(--product-blue);
  --blue: var(--product-blue);
  --green: var(--product-green);
  --red: var(--product-red);
  --amber: var(--product-amber);
  --violet: var(--product-violet);
  --line: var(--product-line);
  --line-strong: var(--product-accent);
  --line-soft: #e8ecea;
}

html {
  background: var(--product-bg);
}

body {
  background: var(--product-bg);
  color: var(--product-text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before,
body::after,
.orbital-bg,
.scan-beam {
  display: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  letter-spacing: 0;
}

.shell {
  background: var(--product-bg);
}

.sidebar,
.topbar,
.panel,
.ai-panel {
  background: var(--product-surface);
  border: 1px solid var(--product-line);
  box-shadow: none;
  backdrop-filter: none;
}

.sidebar {
  border: 0;
  border-right: 1px solid #2c3b37;
  border-radius: 0;
  background: var(--product-sidebar);
  color: #f2f6f4;
}

.brand {
  height: auto;
  min-height: 56px;
  gap: 10px;
  padding: 0 8px 16px;
  border-bottom: 1px solid #32423e;
}

.mark {
  width: 34px;
  height: 34px;
  border: 1px solid #5c7c74;
  border-radius: 6px;
  color: #d8eee7;
  background: #24332f;
  box-shadow: none;
}

.brand h1 {
  color: #f4f8f6;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

.brand small {
  color: var(--product-sidebar-muted);
  font-size: 10px;
}

.pin-button {
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: var(--product-sidebar-muted);
  background: transparent;
  font-size: 14px;
}

.pin-button:disabled {
  color: #73847f;
  border: 0;
  background: transparent;
  opacity: 0.7;
}

.pin-button {
  margin-top: 18px;
  border: 1px solid #3a4c47;
  color: #c5d4cf;
  background: #202e2a;
}

.nav.pinned {
  border-top: 1px solid #2e3e39;
}

.nav.pinned a {
  font-size: 12px;
}

.topbar::after {
  display: none;
}

.title h2 {
  margin: 0 0 3px;
  color: var(--product-text);
  font-size: 21px;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0;
  text-shadow: none;
}

.title > span:not(.mobile-app-label) {
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-app-label {
  display: none;
}

.command {
  display: flex;
  align-items: center;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--product-line-strong);
  border-radius: 6px;
  background: var(--product-surface-soft);
  color: var(--product-accent);
  box-shadow: none;
  font-size: 13px;
}

.command span {
  font-weight: 700;
}

.command input {
  color: var(--product-text);
}

.command input::placeholder,
.ai-query-form input::placeholder {
  color: #87928e;
}

.status {
  gap: 8px;
  color: var(--product-muted);
  font-size: 11px;
}

.dot {
  width: 7px;
  height: 7px;
  margin-top: 0;
  background: var(--product-green);
  box-shadow: none;
}

.status-button,
.ai-fab {
  min-width: 38px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--product-text);
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.ai-fab {
  position: static;
  width: auto;
  height: 36px;
}

.ai-fab:hover,
.status-button:hover {
  border-color: var(--product-accent);
  background: var(--product-accent-soft);
  color: var(--product-accent);
}

.module-tabs-shell {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 6px;
  height: 42px;
}

.module-tabs-nav {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--product-text);
  box-shadow: none;
  font-size: 15px;
}

.module-tabs-nav:hover {
  border-color: var(--product-accent);
  background: var(--product-accent-soft);
  color: var(--product-accent);
}

.module-tabs-nav:focus-visible,
.tab:focus-visible,
.ai-fab:focus-visible,
.ai-close:focus-visible {
  outline: 2px solid var(--product-accent);
  outline-offset: 2px;
}

.tabs {
  height: 42px;
  gap: 2px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

.tab {
  min-width: 74px;
  min-height: 41px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--product-muted);
  box-shadow: none;
  font-size: 13px;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.tab:hover {
  transform: none;
  border-color: var(--product-line-strong);
  background: #eef2f0;
  color: var(--product-text);
}

.tab.active {
  border-color: var(--product-accent);
  background: transparent;
  color: var(--product-accent);
  box-shadow: none;
  font-weight: 750;
}

.command-panel {
  min-width: 0;
}

.grid {
  gap: 12px;
}

.panel {
  position: relative;
  isolation: isolate;
  padding: 16px;
  border: 1px solid var(--product-line-strong);
  border-radius: 6px;
  background-color: var(--product-surface);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 27px, var(--product-card-emboss) 28px),
    repeating-linear-gradient(90deg, transparent 0 87px, var(--product-card-fiber) 88px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 1px 2px rgba(23, 55, 48, 0.035);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.panel:hover {
  border-color: #9aafa8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 4px 12px rgba(23, 55, 48, 0.065);
}

.panel::before,
.panel::after,
.ai-panel::before {
  display: none;
}

.panel.tab-focus {
  border-color: var(--product-line);
  box-shadow: none;
}

.panel h3 {
  margin: 0 0 12px;
  color: var(--product-text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
}

.panel h3::before {
  display: none;
}

.microcopy,
.muted,
.muted-row,
.field small,
.row small {
  color: var(--product-muted);
}

.kpis {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: var(--product-surface);
}

.kpi {
  min-height: 74px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kpi:last-child {
  border-right: 0;
}

.kpi span {
  color: var(--product-muted);
  font-size: 12px;
}

.kpi strong {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: 0;
}

.cyan { color: var(--product-blue); }
.green { color: var(--product-green); }
.red { color: var(--product-red); }
.amber { color: var(--product-amber); }
.violet { color: var(--product-violet); }

.list {
  gap: 0;
  border-top: 1px solid var(--product-line);
}

.row {
  min-height: 48px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid #e8ecea;
  border-radius: 0;
  background: transparent;
}

.row:last-child {
  border-bottom: 0;
}

.row:hover {
  background: #f8faf9;
}

.row strong:not(.cyan):not(.green):not(.red):not(.amber):not(.violet) {
  color: var(--product-text);
}

.tag {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--product-line);
  border-radius: 999px;
  background: #f5f7f6;
  color: var(--product-muted);
  box-shadow: none;
  font-size: 11px;
}

button.tag.category-preset,
a.tag[href] {
  min-height: 32px;
}

.hud-button,
.mini-action,
.workbench-actions a,
.segmented-option {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--product-line-strong);
  border-radius: 5px;
  background: #ffffff;
  color: var(--product-text);
  box-shadow: none;
  font-size: 12px;
}

.hud-button:hover,
.mini-action:hover,
.workbench-actions a:hover,
.segmented-option:hover {
  border-color: var(--product-accent);
  background: var(--product-accent-soft);
  color: var(--product-accent);
}

.hud-button.primary,
.mini-action.primary {
  border-color: var(--product-accent);
  background: var(--product-accent);
  color: #ffffff;
}

.hud-button.danger,
.mini-action.danger {
  border-color: #d9a7ad;
  color: var(--product-red);
}

.field {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.field:focus-within {
  border-color: transparent;
  box-shadow: none;
}

.field input,
.field select,
.field textarea,
.people-search-row input,
.ai-query-form input {
  min-height: var(--control-height);
  padding: 0 10px;
  border: 1px solid var(--product-line-strong);
  border-radius: 5px;
  background: #ffffff;
  color: var(--product-text);
  box-shadow: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.people-search-row input:focus,
.ai-query-form input:focus,
.command input:focus {
  outline: 2px solid #9cc6bc;
  outline-offset: 1px;
}

.field textarea {
  min-height: 96px;
  padding-block: 9px;
}

.workbench-actions {
  gap: 7px;
}

.overview-signal-card,
.finance-overview-signal,
.asset-reference-card,
.asset-status-card,
.answer-card {
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background-color: var(--product-surface-soft);
  background-image: repeating-linear-gradient(135deg, transparent 0 19px, rgba(25, 68, 58, 0.024) 20px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.bar,
.progress-track,
.chart-track {
  background: #e5eae8;
}

.bar > i,
.progress-track > i,
.chart-track > i {
  background: var(--product-accent);
}

.system-strip,
.library-signal-strip {
  color: var(--product-muted);
  background: #f8faf9;
}

.overview-home {
  padding: 20px;
}

.overview-home-head,
.overview-section-head,
.people-overview-header,
.people-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.overview-home-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--product-line);
}

.overview-home-head h3,
.people-overview-header h3 {
  margin: 2px 0 4px;
  font-size: 19px;
}

.overview-home-head p {
  margin: 0;
  color: var(--product-muted);
  font-size: 12px;
}

.overview-eyebrow,
.overview-section-head > div > span,
.people-section-head > div > span {
  color: var(--product-accent);
  font-size: 10px;
  font-weight: 750;
}

.overview-primary-actions {
  flex: 0 0 auto;
}

.overview-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 0;
  border-bottom: 1px solid var(--product-line);
}

.overview-focus-panel,
.overview-change-panel {
  min-width: 0;
  padding: 2px 18px 16px 0;
}

.overview-change-panel {
  padding: 2px 0 16px 18px;
  border-left: 1px solid var(--product-line);
}

.overview-section-head,
.people-section-head {
  align-items: center;
  margin-bottom: 8px;
}

.overview-section-head h4,
.people-section-head h4 {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.35;
}

.overview-task-list,
.overview-change-list,
.people-overview-list {
  max-height: 320px;
  overflow-y: auto;
}

.overview-task-row,
.overview-change-row {
  min-height: 58px;
}

.overview-task-row > span:first-child,
.overview-change-row > span:first-child {
  min-width: 0;
}

.overview-task-kind {
  display: block;
  margin-bottom: 2px;
  color: var(--product-accent);
  font-size: 10px;
  font-weight: 750;
}

.overview-context-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 14px;
  border: 0;
  background: transparent;
}

.overview-context-strip .overview-signal-card {
  min-height: 82px;
  padding: 8px 14px;
  border: 0;
  border-right: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

.overview-context-strip .overview-signal-card:first-child {
  padding-left: 0;
}

.overview-context-strip .overview-signal-card:last-child {
  padding-right: 0;
  border-right: 0;
}

.overview-context-strip .overview-signal-card > span,
.overview-context-strip .overview-signal-card small {
  color: var(--product-muted);
}

.overview-context-strip .overview-signal-card strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.overview-home-footer {
  padding: 12px 16px;
  border-style: dashed;
  background: var(--product-surface-soft);
}

.overview-home-footer .overview-section-head {
  margin: 0;
}

.people-overview-primary {
  padding: 20px;
}

.people-overview-header {
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--product-line);
}

.people-overview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--product-muted);
  font-size: 12px;
}

.people-overview-metrics strong {
  color: var(--product-text);
  font-size: 14px;
}

.people-master-detail {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(300px, 1.15fr);
  min-height: 360px;
}

.people-master,
.people-detail {
  min-width: 0;
}

.people-master {
  padding-right: 18px;
}

.people-detail {
  padding-left: 18px;
  border-left: 1px solid var(--product-line);
}

.people-overview-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--product-line);
}

.people-overview-fact {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 52px;
  padding: 12px 0;
  border-bottom: 1px solid #e8ecea;
}

.people-overview-fact span {
  color: var(--product-muted);
  font-size: 12px;
}

.people-overview-fact strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
}

.people-detail-actions {
  margin-top: 14px;
}

.people-overview-create {
  border-color: #dfe5e2;
  background: #f8faf9;
}

.people-overview-create .people-form {
  grid-template-columns: 1fr;
}

.people-overview-create .people-form .hud-button {
  grid-column: auto;
}

.finance-overview-summary {
  padding: 20px;
}

.finance-overview-summary .command-console-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.finance-overview-summary .command-console-head h3 {
  margin-bottom: 3px;
  font-size: 19px;
}

.finance-overview-summary .command-console-head p,
.finance-overview-ledger .command-console-head p,
.finance-overview-hot-days .command-console-head p,
.finance-overview-anomalies .command-console-head p,
.finance-overview-assets .command-console-head p {
  margin: 0;
  color: var(--product-muted);
  font-size: 11px;
}

.finance-overview-primary-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.finance-overview-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--product-line);
  border-bottom: 1px solid var(--product-line);
}

.finance-month-picker {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
}

.finance-month-picker .field {
  min-width: 140px;
  margin: 0;
}

.finance-month-picker input[type="month"] {
  min-height: 36px;
}

.finance-overview-range-control {
  display: grid;
  gap: 5px;
  min-width: 310px;
}

.finance-overview-control-label {
  color: var(--product-muted);
  font-size: 11px;
  font-weight: 650;
}

.segmented-control {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--product-line);
  border-radius: 6px;
  background: #f4f7f6;
}

.segmented-option {
  flex: 1 1 0;
  min-width: 58px;
  border-color: transparent;
  background: transparent;
}

.segmented-option.active {
  border-color: var(--product-line-strong);
  background: #ffffff;
  color: var(--product-accent);
  box-shadow: 0 1px 2px rgba(32, 45, 41, 0.08);
  font-weight: 750;
}

.finance-overview-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-overview-range-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(4, minmax(92px, 0.7fr));
  gap: 0;
  align-items: center;
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--product-line);
  color: var(--product-muted);
  font-size: 12px;
}

.finance-overview-range-summary > span {
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid var(--product-line);
}

.finance-overview-range-summary > span:first-child {
  padding-left: 0;
}

.finance-overview-range-summary > span:last-child {
  padding-right: 0;
  border-right: 0;
  text-align: right;
}

.finance-overview-range-summary small {
  display: block;
  margin-top: 2px;
  color: var(--product-muted);
}

.finance-overview-ledger,
.finance-overview-hot-days,
.finance-overview-anomalies,
.finance-overview-assets {
  min-height: 260px;
}

.finance-overview-ledger .command-console-head,
.finance-overview-hot-days .command-console-head,
.finance-overview-anomalies .command-console-head,
.finance-overview-assets .command-console-head {
  align-items: flex-start;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--product-line);
}

.finance-overview-ledger-list,
.finance-overview-anomaly-list,
.finance-overview-asset-list,
.finance-overview-hot-days .list {
  max-height: none;
  overflow-y: visible;
}

.finance-overview-assets {
  background: var(--product-surface-soft);
}

.asset-flow-label,
.asset-monthly-reconciliation,
.asset-mode-note,
.asset-ledger-section,
.asset-task-switcher,
.asset-current-context,
.asset-capture-panel,
.asset-human-ledger,
.asset-save-preview,
.asset-clearance-toolbar,
.asset-reference-card,
.asset-status-card,
.asset-history-filter,
.asset-history-comparison {
  border-color: var(--product-line);
  background: var(--product-surface-soft);
  background-image: none;
  color: var(--product-text);
  box-shadow: none;
}

.asset-flow-label strong,
.asset-mode-note strong,
.asset-current-context strong,
.asset-save-preview strong,
.asset-history-comparison strong {
  color: var(--product-text);
}

.asset-reconciliation-name,
.asset-reconciliation-amount,
.asset-reconciliation-note,
.asset-snapshot-name,
.asset-snapshot-amount,
.asset-snapshot-note,
.asset-capture-panel input,
.asset-capture-panel textarea,
.asset-monthly-reconciliation input,
.asset-monthly-reconciliation textarea {
  min-height: var(--control-height);
  border: 1px solid var(--product-line-strong);
  border-radius: 5px;
  background: var(--product-surface);
  color: var(--product-text);
  box-shadow: none;
}

.asset-reconciliation-checked {
  accent-color: var(--product-accent);
  background: var(--product-surface);
}

.asset-task-switcher a.active,
.asset-view-tabs a.active,
.asset-clearance-toolbar .active {
  border-color: var(--product-accent);
  background: var(--product-accent-soft);
  color: var(--product-accent);
}

.asset-net-ring span,
.asset-net-ring strong {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(17, 31, 27, 0.7);
}

.auth-grid {
  max-width: 860px;
}

.auth-message {
  border: 1px solid #a9cec4;
  border-radius: 5px;
  background: var(--product-accent-soft);
  color: var(--product-accent);
}

.auth-message.error {
  border-color: #e0b0b6;
  background: #fff4f5;
  color: var(--product-red);
}

.ai-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  z-index: 1200;
  display: none;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: 380px;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 20px;
  border: 0;
  border-left: 1px solid var(--product-line-strong);
  border-radius: 0;
  background: #ffffff;
  box-shadow: -18px 0 40px rgba(32, 45, 41, 0.12);
}

body.ai-open .ai-panel {
  display: grid;
}

.ai-panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--product-line);
}

.ai-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--product-line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--product-text);
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(190px, 0.8fr) minmax(280px, 1.2fr);
  }

  .status {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 920px) {
  button.tag.category-preset,
  a.tag[href] {
    min-height: 38px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi:nth-child(2n) {
    border-right: 0;
  }

  .overview-home-layout,
  .people-master-detail {
    grid-template-columns: 1fr;
  }

  .overview-focus-panel,
  .people-master {
    padding-right: 0;
  }

  .overview-change-panel,
  .people-detail {
    margin-top: 14px;
    padding: 14px 0 0;
    border-top: 1px solid var(--product-line);
    border-left: 0;
  }

  .overview-context-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-context-strip .overview-signal-card:nth-child(2) {
    border-right: 0;
  }

  .finance-overview-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .finance-overview-range-control {
    min-width: 0;
  }

  .finance-overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-overview-range-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-overview-range-summary > span {
    min-height: 42px;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--product-line);
  }

  .finance-overview-range-summary > span:first-child {
    grid-column: 1 / -1;
    padding-left: 10px;
  }

  .finance-overview-range-summary > span:last-child {
    padding-right: 10px;
    text-align: left;
  }

}

@media (max-width: 640px) {
  .mobile-app-label {
    display: block;
    margin-bottom: 1px;
    color: var(--product-accent);
    font-size: 10px;
    font-weight: 700;
  }

  .title h2 {
    margin: 0;
    font-size: 19px;
  }

  .title > span:not(.mobile-app-label) {
    display: none;
  }

  .command {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    min-height: 40px;
    height: 40px;
    padding: 0 10px;
  }

  .command span {
    margin: 0 8px 0 0;
    white-space: nowrap;
  }

  .status {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .status .dot,
  #workspaceStatus,
  #clock {
    display: none;
  }

  .status-button,
  .ai-fab {
    min-width: 36px;
    min-height: 34px;
    padding: 0 8px;
  }

  .module-tabs-shell {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 4px;
    height: 40px;
  }

  .module-tabs-nav {
    width: 30px;
    min-width: 30px;
    height: 32px;
  }

  .tabs {
    height: 40px;
    scroll-snap-type: x proximity;
  }

  .tab {
    flex: 0 0 calc((100% - 6px) / 4);
    min-width: 0;
    min-height: 39px;
    padding-inline: 10px;
    scroll-snap-align: start;
  }

  .panel {
    padding: 12px;
  }

  .overview-home,
  .people-overview-primary,
  .finance-overview-summary {
    padding: 14px;
  }

  .overview-home-head,
  .people-overview-header {
    display: grid;
  }

  .overview-primary-actions,
  .people-overview-header .workbench-actions {
    justify-content: flex-start;
  }

  .overview-context-strip {
    grid-template-columns: 1fr;
  }

  .overview-context-strip .overview-signal-card {
    min-height: 64px;
    padding: 9px 0;
    border-right: 0;
    border-bottom: 1px solid var(--product-line);
  }

  .overview-context-strip .overview-signal-card:last-child {
    border-bottom: 0;
  }

  .overview-task-list,
  .overview-change-list,
  .people-overview-list {
    max-height: none;
  }

  .people-master-detail {
    min-height: 0;
  }

  .people-overview-fact {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .finance-overview-summary .command-console-head {
    display: grid;
  }

  .finance-overview-primary-actions {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .finance-overview-primary-actions a {
    flex: 0 0 auto;
  }

  .finance-month-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .finance-month-picker .tag {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .finance-overview-range-summary {
    grid-template-columns: 1fr;
  }

  .finance-overview-range-summary > span,
  .finance-overview-range-summary > span:first-child {
    grid-column: auto;
  }

  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets {
    min-height: 0;
  }

  .grid {
    gap: 8px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi {
    min-height: 64px;
    padding: 10px;
  }

  .kpi strong {
    font-size: 19px;
  }

  .ai-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: min(78dvh, 620px);
    max-height: 78dvh;
    padding: 16px;
    border: 0;
    border-top: 1px solid var(--product-line-strong);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -18px 48px rgba(32, 45, 41, 0.22);
  }

  [data-command-recycle="true"],
  [data-command-recycle="true"] .panel,
  [data-command-recycle="true"] .list,
  [data-command-recycle="true"] .row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  [data-command-recycle="true"] .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  [data-command-recycle="true"] .row > :first-child,
  [data-command-recycle="true"] .row strong,
  [data-command-recycle="true"] .row small {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  [data-command-recycle="true"] .row > .mini-action,
  [data-command-recycle="true"] .row > .tag {
    justify-self: end;
  }

}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .tab {
    transition: none;
  }
}

.action-feedback {
  margin: 8px 24px 0;
  padding: 10px 12px;
  border: 1px solid #e6a8a8;
  border-radius: 6px;
  background: #fff4f4;
  color: #8f1d1d;
  font-size: 14px;
  line-height: 1.45;
}

.action-feedback[hidden] {
  display: none;
}

/* Legacy sticky asset actions are intentionally retired because the bottom action bar preserves reachability. */
.budget-row {
  border-color: var(--product-line);
  border-radius: var(--panel-radius);
  background: var(--product-surface);
  background-image: none;
  color: var(--product-text);
  box-shadow: none;
}

.budget-row.over {
  border-color: #e0b0b6;
  box-shadow: none;
}

.asset-capture-panel-v2 .asset-capture-actions {
  position: static;
  top: auto;
  z-index: auto;
  border-color: var(--product-line);
  border-radius: var(--panel-radius);
  background: var(--product-surface-soft);
  background-image: none;
  color: var(--product-text);
  box-shadow: none;
}

.ring.asset-net-ring {
  position: relative;
  border: 1px solid var(--product-line-strong);
  background: var(--product-accent-soft);
  background-image: none;
  color: var(--product-text);
  box-shadow: none;
}

.ring.asset-net-ring::before {
  border-color: var(--product-line);
  background: var(--product-surface);
  background-image: none;
  box-shadow: none;
}

.ring.asset-net-ring span,
.ring.asset-net-ring strong,
.ring.asset-net-ring b {
  color: var(--product-text);
  text-shadow: none;
}

.auth-form input {
  border-color: var(--product-line-strong);
  border-radius: var(--control-radius);
  background: var(--product-surface);
  background-image: none;
  color: var(--product-text);
  box-shadow: none;
}

.auth-form input::placeholder {
  color: var(--product-muted);
  opacity: 1;
}

.auth-form input:focus {
  border-color: var(--product-accent);
  outline: 2px solid #9cc6bc;
  outline-offset: 1px;
  box-shadow: none;
}

.auth-form button {
  border-color: var(--product-accent);
  border-radius: var(--control-radius);
  background: var(--product-accent);
  background-image: none;
  color: #ffffff;
  box-shadow: none;
  text-shadow: none;
}

.auth-register {
  border-color: var(--product-line);
  border-radius: var(--panel-radius);
  background: var(--product-surface-soft);
  background-image: none;
  color: var(--product-text);
  box-shadow: none;
}

.auth-register summary {
  color: var(--product-accent);
  text-shadow: none;
}

.mini-button.glow {
  border-color: var(--product-line-strong);
  background: var(--product-accent-soft);
  background-image: none;
  color: var(--product-accent);
  box-shadow: none;
  text-shadow: none;
}

/* 2026-07-13 finance console refinement.
   Keep business selectors stable; improve the finance page as a calm operations console. */
.finance-grid {
  align-items: start;
}

.finance-grid .panel {
  border-color: #dfe7e3;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 250, 0.96)),
    var(--product-surface);
}

.finance-grid .command-console-head {
  gap: 18px;
}

.finance-grid .command-console-head h3,
.asset-balance-head h3,
.asset-capture-head h4 {
  color: #172421;
  letter-spacing: -0.01em;
}

.finance-grid .command-console-head p,
.asset-capture-head p,
.asset-mode-note,
.asset-current-context {
  max-width: 76ch;
  line-height: 1.65;
}

.finance-overview-summary {
  border-color: #cddbd5;
  background:
    linear-gradient(135deg, rgba(228, 240, 237, 0.88), rgba(255, 255, 255, 0.98) 38%),
    #ffffff;
}

.finance-overview-kpis,
.asset-balance-kpis,
.asset-reference-kpis {
  border-radius: 10px;
  border-color: #d5dfdb;
}

.finance-overview-kpis .kpi,
.asset-balance-kpis .kpi,
.asset-reference-kpis .kpi {
  min-height: 82px;
  background: #ffffff;
}

.finance-overview-kpis .kpi strong,
.asset-balance-kpis .kpi strong,
.asset-reference-kpis .kpi strong {
  font-size: clamp(20px, 2vw, 28px);
}

.asset-liability-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.asset-liability-panel > h3 {
  display: none;
}

.asset-workbench-v2 {
  display: grid;
  gap: 14px;
  color: var(--product-text);
}

.asset-workbench-v2 .asset-balance-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid #d5dfdb;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(228, 240, 237, 0.92), rgba(255, 255, 255, 0.98) 42%),
    #ffffff;
}

.asset-workbench-v2 .asset-balance-head h3 {
  margin-bottom: 5px;
  font-size: 20px;
}

.asset-workbench-v2 .asset-balance-head p {
  margin: 0;
  color: var(--product-muted);
  font-size: 12px;
  line-height: 1.65;
}

.asset-workbench-v2 .asset-body-grid,
.asset-body-grid-v2 {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.asset-workbench-v2 .asset-capture-panel,
.asset-workbench-v2 .asset-entry-reference-panel,
.asset-workbench-v2 .asset-view-panel,
.asset-view-panel-v2,
.asset-capture-panel-v2,
.asset-human-ledger,
.asset-save-preview,
.asset-current-context,
.asset-mode-note,
.asset-task-switcher,
.asset-flow-label,
.asset-monthly-reconciliation,
.asset-ledger-section,
.asset-reference-card,
.asset-status-card,
.asset-history-filter,
.asset-history-comparison {
  border: 1px solid #d9e3df;
  border-radius: 12px;
  background: #ffffff;
  background-image: none;
  box-shadow: 0 10px 28px rgba(31, 45, 40, 0.045);
}

.asset-current-context,
.asset-mode-note,
.asset-flow-label,
.asset-monthly-reconciliation {
  background: #f8fbf9;
}

.asset-workbench-v2 .asset-task-switcher,
.asset-view-tabs,
.asset-clearance-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: #f5f8f7;
}

.asset-task-switcher a,
.asset-view-tabs a,
.asset-clearance-toolbar .mini-action,
.asset-clearance-toolbar .hud-button {
  border-radius: 8px;
}

.asset-task-switcher a.active,
.asset-view-tabs a.active,
.asset-view-tabs a[aria-pressed="true"],
.asset-clearance-toolbar .active {
  border-color: #8db9af;
  background: #e3f0ec;
  color: #14594c;
  box-shadow: inset 0 0 0 1px rgba(20, 89, 76, 0.08);
}

.asset-capture-panel-v2 {
  padding: 16px;
}

.asset-capture-panel-v2 .asset-capture-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e3ebe7;
}

.asset-capture-panel-v2 .asset-human-ledger {
  padding: 14px;
  background: #f8faf9;
}

.asset-capture-panel-v2 .asset-ledger-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.asset-capture-panel-v2 .asset-ledger-section {
  overflow: hidden;
}

.asset-capture-panel-v2 .asset-ledger-section > h5,
.asset-ledger-section h5 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #e4ebe8;
  background: #f8fbf9;
  color: #172421;
  font-size: 13px;
}

.asset-capture-panel-v2 .asset-ledger-header,
.asset-capture-panel-v2 .asset-ledger-row,
.asset-ledger-header,
.asset-ledger-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(96px, 0.52fr) minmax(82px, 0.42fr) minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.asset-capture-panel-v2 .asset-ledger-header,
.asset-ledger-header {
  padding: 8px 12px;
  border-bottom: 1px solid #e6ece9;
  background: #fbfcfb;
  color: #6a7773;
  font-size: 11px;
  font-weight: 700;
}

.asset-capture-panel-v2 .asset-ledger-row,
.asset-ledger-row {
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f0;
  border-radius: 0;
  background: #ffffff;
}

.asset-capture-panel-v2 .asset-ledger-row:nth-child(even),
.asset-ledger-row:nth-child(even) {
  background: #fbfcfb;
}

.asset-capture-panel-v2 .asset-ledger-row:hover,
.asset-ledger-row:hover {
  background: #f2f8f5;
}

.asset-ledger-row input,
.asset-ledger-row textarea,
.asset-capture-panel-v2 input,
.asset-capture-panel-v2 textarea,
.asset-reconciliation-name,
.asset-reconciliation-amount,
.asset-reconciliation-note,
.asset-snapshot-name,
.asset-snapshot-amount,
.asset-snapshot-note {
  min-height: 36px;
  border-color: #c8d4cf;
  border-radius: 8px;
  background: #ffffff;
  color: #172421;
}

.asset-ledger-row input:focus,
.asset-ledger-row textarea:focus,
.asset-capture-panel-v2 input:focus,
.asset-capture-panel-v2 textarea:focus {
  border-color: #7fb1a6;
  outline: 2px solid rgba(127, 177, 166, 0.2);
  outline-offset: 1px;
}

.asset-row-reference {
  border-color: #dbe5e1;
  border-radius: 8px;
  background: #f7faf8;
}

.asset-row-reference b {
  color: #172421;
}

.asset-row-reference span {
  color: #687670;
}

.asset-capture-panel-v2 .asset-draft-totals,
.asset-capture-panel-v2 .asset-draft-delta,
.asset-save-preview {
  padding: 12px 14px;
  background: #f7faf8;
}

.asset-workbench-v2 > .asset-capture-actions-bottom {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d5dfdb;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -12px 30px rgba(31, 45, 40, 0.08);
  backdrop-filter: blur(8px);
}

.asset-workbench-v2 > .asset-capture-actions-bottom .hud-button {
  min-height: 40px;
}

.asset-view-panel-v2 {
  padding: 14px;
}

.asset-view-panel-v2 .asset-balance-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.asset-view-panel-v2 .asset-detail-list,
.asset-view-panel-v2 .asset-history-list {
  max-height: 520px;
  overflow: auto;
}

.asset-detail-row,
.asset-history-row {
  border-color: #e6ece9;
  background: #ffffff;
}

.ring.asset-net-ring {
  width: 90px;
  height: 90px;
  border-color: #b8cec7;
  background: #e4f0ed;
}

.ring.asset-net-ring::before {
  width: 62px;
  height: 62px;
}

@media (max-width: 1180px) {
  .asset-workbench-v2 .asset-body-grid,
  .asset-body-grid-v2 {
    grid-template-columns: 1fr;
  }
}

/* A canvas card can become narrower than the desktop viewport. Keep the
   capture and review panels readable before the page reaches phone width. */
@media (min-width: 761px) and (max-width: 1380px) {
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-body-grid-v2[data-asset-active-view="entry"],
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-body-grid-advanced[data-asset-active-view="entry"] {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: minmax(0, 1fr);
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel,
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-view-panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-entry-reference-panel {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    position: static;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-section {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-grid {
    min-width: 720px;
  }
}

@media (max-width: 760px) {
  .asset-workbench-v2 .asset-balance-head,
  .asset-workbench-v2 > .asset-capture-actions-bottom {
    grid-template-columns: 1fr;
  }

  .asset-capture-panel-v2 .asset-ledger-grid {
    grid-template-columns: 1fr;
  }

  .asset-capture-panel-v2 .asset-ledger-header,
  .asset-ledger-header {
    display: none;
  }

  .asset-capture-panel-v2 .asset-ledger-row,
  .asset-ledger-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 12px;
    border: 1px solid #e1e9e5;
    border-radius: 10px;
    margin-bottom: 8px;
  }
}

/* Owner 1.0 Library/Vault: keep the five-tab rail and record actions fully visible. */
@media (min-width: 761px) {
  [data-command-library="vault"] .vault-library-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-command-library="vault"] .vault-library-entry-form > :nth-child(n + 5) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body:has([data-command-library="vault"]) #moduleTabs .tab {
    flex: 0 0 calc((100% - 8px) / 5);
    min-width: 0;
    padding-inline: 4px;
  }

  [data-command-library="vault"] .library-entry-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  [data-command-library="vault"] .library-entry-detail > * {
    min-width: 0;
    width: 100%;
  }

  [data-command-library="vault"] .library-entry-detail p {
    margin: 0;
  }

  [data-command-library="vault"] .library-entry-detail .tag {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  [data-command-library="vault"] .library-entry-detail .finance-record-actions {
    justify-content: flex-start;
  }
}

/* Finance reading surfaces: overview, calendar, ledger, chart, budget. */
.finance-overview-workbench,
.finance-quick-panel,
.finance-calendar-panel,
.finance-calendar-detail-panel,
.chart-panel,
.finance-overview-ledger,
.finance-overview-hot-days,
.finance-overview-anomalies,
.finance-overview-assets,
[data-tab-panel="finance-ledger"],
[data-tab-panel="finance-chart"],
[data-tab-panel="finance-budget"] {
  border-radius: 12px;
}

.finance-overview-workbench .command-console-head,
.finance-quick-panel .command-console-head,
.finance-calendar-panel .command-console-head,
.chart-panel .command-console-head,
[data-tab-panel="finance-ledger"] .command-console-head,
[data-tab-panel="finance-budget"] .command-console-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e2ebe7;
}

.finance-overview-primary-actions,
.workbench-actions {
  align-items: center;
}

.finance-overview-primary-actions a,
.workbench-actions a,
.finance-range-control .segmented-option,
.finance-overview-range-control .segmented-option {
  border-radius: 999px;
}

.finance-overview-filter-bar,
[data-tab-panel="finance-ledger"] .workbench-actions,
.chart-panel .workbench-actions {
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e1e9e5;
  border-radius: 12px;
  background: #f8fbf9;
}

.finance-month-picker .tag,
.finance-custom-range .tag {
  min-height: 28px;
  background: #eef5f2;
}

.finance-overview-range-summary {
  border: 1px solid #e0e8e4;
  border-radius: 10px;
  background: #fbfcfb;
}

.finance-overview-range-summary > span {
  padding-block: 10px;
}

.finance-record-row {
  min-height: 58px;
  padding: 11px 12px;
  border-color: #e6ece9;
  border-radius: 10px;
  background: #ffffff;
}

.finance-calendar-detail-panel .stacked-kpis {
  gap: 8px;
}

.finance-calendar-detail-panel .kpi {
  min-height: 68px;
  padding: 10px;
}

.finance-calendar-detail-panel .finance-day-list {
  gap: 6px;
  margin-top: 8px;
}

.finance-calendar-detail-panel .finance-record-row {
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 8px;
}

.finance-calendar-detail-panel .finance-record-actions {
  gap: 4px;
}

.finance-record-row:hover {
  border-color: #c7d8d1;
  background: #f7faf8;
}

.finance-record-row strong {
  font-size: 13px;
  line-height: 1.35;
}

.finance-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.finance-entry-row,
.budget-form,
.snapshot-form {
  gap: 10px;
}

.quick-category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #e5ece9;
  border-radius: 12px;
  background: #f8fbf9;
}

.quick-category-strip .category-preset {
  background: #ffffff;
}

.finance-calendar-toolbar,
.finance-custom-range,
.finance-month-picker {
  border-color: #dfe7e3;
}

.finance-calendar-toolbar {
  margin-bottom: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #f8fbf9;
}

.finance-calendar-scroll {
  padding: 4px;
  border: 1px solid #e3ebe7;
  border-radius: 8px;
  background: #fbfcfb;
}

@media (min-width: 1181px) {
  .finance-grid:has(.finance-calendar-panel:not(.tab-panel-hidden)) {
    height: 100%;
    min-height: 0;
    align-items: stretch;
    grid-auto-rows: minmax(0, 1fr);
  }

  .finance-calendar-panel:not(.tab-panel-hidden),
  .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    min-height: 0;
    height: 100%;
    align-self: stretch;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    display: flex;
    flex-direction: column;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll,
  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-v2 {
    min-height: 0;
    height: 100%;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-v2 {
    display: flex;
    flex-direction: column;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
    overflow-y: hidden;
  }

  .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-day-list {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow: auto;
  }
}

.calendar {
  gap: 6px;
}

.calendar .day,
.day {
  min-height: 78px;
  border: 1px solid #e1e9e5;
  border-radius: 10px;
  background: #ffffff;
  color: var(--product-text);
}

.calendar .day.hot,
.day.hot {
  border-color: #c7d8d1;
  background: #f7faf8;
}

.calendar .day.selected,
.day.selected {
  border-color: #7fb1a6;
  background: #e8f4f0;
  box-shadow: inset 0 0 0 1px rgba(23, 107, 91, 0.12);
}

.calendar .day b,
.day b {
  color: #172421;
  font-size: 14px;
}

.bar-list,
.chart-bars,
.budget-list,
.finance-budget-signals {
  gap: 8px;
}

.bar-row,
.chart-bar-row,
.budget-row {
  border: 1px solid #e4ebe8;
  border-radius: 10px;
  background: #ffffff;
}

.bar-track,
.progress-track,
.chart-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
}

.bar-track i,
.bar-track b,
.progress-track i,
.chart-track i {
  border-radius: inherit;
}

.category-chart {
  gap: 18px;
  padding: 14px;
  border: 1px solid #e3ebe7;
  border-radius: 12px;
  background: #fbfcfb;
}

.chart-donut {
  border-color: #d5e0dc;
  background: #ffffff;
  min-height: 180px;
  min-width: 180px;
}

.chart-donut canvas {
  height: 164px !important;
  max-height: 164px;
  max-width: 164px;
  width: 164px !important;
}

[data-finance-chart-engine="chartjs"] .chart-donut svg {
  display: none;
}

[data-finance-chart-total="true"] {
  max-width: 116px;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-align: center;
}

[data-tab-panel="finance-budget"] .kpis,
[data-tab-panel="finance-ledger"] .kpis {
  border-radius: 10px;
}

[data-tab-panel="finance-budget"] .kpi,
[data-tab-panel="finance-ledger"] .kpi {
  min-height: 76px;
}

@media (max-width: 760px) {
  .finance-overview-filter-bar,
  [data-tab-panel="finance-ledger"] .workbench-actions,
  .chart-panel .workbench-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .finance-calendar-toolbar {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
  }

  .finance-calendar-toolbar > .finance-month-nav:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .finance-calendar-toolbar > .finance-calendar-month-field {
    grid-column: 2;
    grid-row: 1;
  }

  .finance-calendar-toolbar > .finance-month-nav:nth-of-type(3) {
    grid-column: 3;
    grid-row: 1;
  }

  .finance-calendar-toolbar > .hud-button {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .finance-calendar-toolbar > .finance-calendar-range {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .finance-record-row {
    align-items: flex-start;
    display: grid;
  }

  .finance-record-actions {
    justify-content: flex-start;
  }
}

/* Current asset ledger authority.
   command-center.css keeps legacy compatibility; this V5 root owns the
   rendered capture and reconciliation sheets. */
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-ledger-section,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-grid {
  border-color: #dce6e2;
  background: #ffffff;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-section {
  overflow: hidden;
  padding: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-section:nth-child(2) {
  border-color: #eadfe1;
  background: #ffffff;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-section-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe8e4;
  background: #f4f8f6;
  color: #20342f;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 [data-asset-clearance-section="liability"] > .asset-section-title,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconciliation-grid .liability-side > .asset-section-title {
  background: #faf6f7;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-section-title strong {
  color: #20342f;
  font-size: 13px;
  letter-spacing: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-quick-presets,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-toolbar,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconciliation-controls {
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #e7eeeb;
  border-radius: 0;
  background: #fbfcfb;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-toolbar {
  border: 1px solid #dfe8e4;
  border-radius: 10px;
  background: #f7faf9;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-toolbar .mini-action,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-toolbar .hud-button,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-quick-presets .mini-action {
  border-color: #d7e2de;
  background: #ffffff;
  color: #52635d;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-toolbar .active,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-tools .mini-action[aria-pressed="true"],
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-clearance-tools .mini-action.active,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-quick-presets .mini-action:hover {
  border-color: #8db9af;
  background: #e7f2ee;
  color: #14594c;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-header,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) minmax(96px, 0.5fr) minmax(118px, 0.62fr) minmax(180px, 1fr) 60px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-header {
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #dfe8e4;
  background: #eef5f2;
  color: #52635d;
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-header span:nth-child(n+4) {
  display: block;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-rows,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-grid {
  gap: 0;
  margin-top: 0;
  border-top: 0;
  background: #ffffff;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-line {
  min-height: 54px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #edf2ef;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row:nth-child(even),
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-line:nth-child(even) {
  background: #fbfdfc;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row:hover,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-line:hover {
  background: #f4faf7;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row .asset-snapshot-note,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row .asset-row-delete {
  grid-column: auto;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row .asset-row-delete {
  justify-self: stretch;
  min-width: 0;
  width: auto;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row input,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-line input,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-monthly-reconciliation .asset-reconciliation-line textarea {
  border-color: #d8e2de;
  background: #fcfefd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-row-reference {
  border-color: #e2ebe7;
  background: #f8fbfa;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-row-reference b {
  overflow: visible;
  text-overflow: clip;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-row-delete,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 [data-asset-reconciliation-delete] {
  border-color: #f3d7d9;
  background: #fff7f7;
  color: #b8525d;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-draft-totals,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-draft-delta,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconciliation-meta,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconciliation-actions {
  border-color: #e2ebe7;
  background: #f8fbfa;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview {
  border-radius: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-workflow-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  order: 5;
  padding: 7px 9px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  background: #f7faf9;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  margin-top: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide span {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #dfe8e4;
  border-radius: 6px;
  background: #f9fbfa;
  color: #5d6c67;
  font-size: 12px;
  line-height: 1.35;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide b {
  align-items: center;
  display: inline-flex;
  flex: 0 0 22px;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #a9c8bf;
  border-radius: 999px;
  background: #e7f2ee;
  color: #14594c;
  font-size: 11px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview-grid span {
  min-width: 0;
  min-height: 32px;
  padding: 7px 8px;
  border: 1px solid #e1e9e6;
  border-radius: 6px;
  background: #ffffff;
  color: #687670;
  font-size: 12px;
  line-height: 1.35;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview-grid b {
  display: block;
  margin-top: 3px;
  color: #20342f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-kpis span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e2e9e6;
  border-radius: 6px;
  background: #f8faf9;
  color: #687670;
  font-size: 11px;
  line-height: 1.35;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-kpis b {
  display: block;
  margin-top: 3px;
  color: #20342f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-history-list {
  display: grid;
  gap: 0;
  max-height: 180px;
  margin-top: 8px;
  overflow: auto;
  border: 1px solid #e3eae7;
  border-radius: 8px;
  background: #ffffff;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto);
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 0;
  background: #ffffff;
  color: #20342f;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row:last-child {
  border-bottom: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row:hover {
  background: #f5f9f7;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row span,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row strong,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row small,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row b {
  min-width: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row strong,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row b {
  display: block;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row small {
  display: block;
  margin-top: 2px;
  color: #73817c;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-row b {
  color: #20342f;
  font-size: 13px;
  text-align: right;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce5e1;
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr) auto auto;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid #e0e8e4;
  border-radius: 8px;
  background: #f7faf8;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter .field {
  min-width: 0;
  margin: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter .tag {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-summary > div,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-detail {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e2e9e6;
  border-radius: 8px;
  background: #f9fbfa;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-summary span,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison span,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison small,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-detail-head span {
  display: block;
  color: #71807a;
  font-size: 11px;
  line-height: 1.35;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-summary strong,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison strong,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-detail-head strong {
  display: block;
  margin-top: 3px;
  color: #20342f;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr) minmax(150px, auto);
  gap: 8px;
  margin-top: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison strong {
  margin: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison small {
  text-align: right;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-list {
  display: grid;
  gap: 0;
  max-height: 292px;
  margin-top: 8px;
  overflow: auto;
  padding: 0;
  border: 1px solid #e3eae7;
  border-radius: 8px;
  background: #ffffff;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(126px, auto);
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 0;
  background: #ffffff;
  color: #20342f;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row:last-child {
  border-bottom: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row:hover,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row.active,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row[data-asset-history-active="true"] {
  border-color: #c5d9d3;
  background: #eef6f3;
  box-shadow: inset 3px 0 0 #5f9e90;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row span,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row strong,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row small,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row b {
  min-width: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row strong,
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row b {
  display: block;
  font-variant-numeric: tabular-nums;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row small {
  display: block;
  margin-top: 3px;
  color: #71807a;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row[hidden] {
  display: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-detail {
  margin-top: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-detail-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-balance-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-balance-column {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7e4;
  border-radius: 8px;
  background: #ffffff;
  background-image: none;
  box-shadow: none;
}

[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .liability-side {
  border-color: #eadfe1;
  background: #fdfafa;
  background-image: none;
}

@media (max-width: 920px) {
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    padding-bottom: 14px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 > * {
    grid-column: 1;
    min-width: 0;
    width: 100%;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-capture-actions {
    position: static;
    top: auto;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide,
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter .tag {
    justify-self: start;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-balance-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 {
    padding: 10px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-header {
    display: none;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.5fr) 58px;
    grid-template-rows: auto auto;
    gap: 6px;
    min-height: 0;
    padding: 8px;
    border: 1px solid #e4ebe8;
    border-radius: 8px;
    margin: 0 0 6px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-snapshot-name {
    grid-column: 1;
    grid-row: 1;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-snapshot-amount {
    grid-column: 2;
    grid-row: 1;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-row-delete {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
    justify-self: stretch;
    min-height: 38px;
    max-width: none;
    padding: 0 6px;
    width: auto;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-row-reference {
    grid-column: 1;
    grid-row: 2;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row .asset-snapshot-note {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-workflow-strip {
    padding: 6px 8px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    border-radius: 8px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-save-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-card,
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-panel {
    padding: 8px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reference-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter,
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-filter .tag,
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-comparison small {
    justify-self: start;
    text-align: left;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-history-detail-head {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A desktop split panel can be narrower than the viewport. Keep the ledger
   editable there instead of waiting for the page-level mobile breakpoint. */
[data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 {
  container-type: inline-size;
}

@container (max-width: 680px) {
  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-header {
    display: none;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.5fr) 58px;
    grid-template-rows: auto auto;
    gap: 6px;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-snapshot-name {
    grid-column: 1;
    grid-row: 1;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-snapshot-amount {
    grid-column: 2;
    grid-row: 1;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-row-delete {
    grid-column: 3;
    grid-row: 1;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-row-reference {
    grid-column: 1;
    grid-row: 2;
  }

  [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-capture-panel-v2 .asset-ledger-row .asset-snapshot-note {
    grid-column: 2 / 4;
    grid-row: 2;
  }
}


/* source: styles/shell.css */
html,
body {
  margin: 0;
  min-height: 100%;
}

body:has(.shell) {
  min-width: 320px;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--cc-canvas, #f4f6f5);
  color: var(--cc-ink, #17211d);
}

.shell {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: minmax(196px, 224px) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: var(--cc-canvas, #f4f6f5);
  transition: padding-right 160ms ease;
}

.sidebar {
  position: relative;
  top: auto;
  z-index: 10;
  display: flex;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 100dvh;
  align-self: start;
  flex-direction: column;
  gap: 0;
  padding: 0 10px 12px;
  border: 0;
  border-right: 1px solid #30413b;
  border-radius: 0;
  background: var(--cc-nav, #182722);
  color: #f6faf8;
  overflow: visible;
}

.brand {
  display: flex;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mark {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: #28483e;
  box-shadow: none;
  color: #ffffff;
  font-weight: 700;
}

.brand > div:last-child,
.title,
.command,
.status {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  overflow: hidden;
  color: #f6faf8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: #adbbb5;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#primaryNav {
  display: block;
  min-height: 0;
  flex: 0 0 auto;
  margin: 10px 0 0;
  padding: 0;
  overflow: visible;
}

.cc-shell-nav {
  display: grid;
  align-content: start;
  gap: 14px;
}

.cc-shell-nav__group {
  display: grid;
  align-content: start;
  gap: 4px;
}

.cc-shell-nav__group-label {
  display: block;
  padding: 0 9px;
  color: #91a099;
  font-size: 10px;
  font-weight: 700;
  line-height: 20px;
}

.cc-shell-nav__links {
  display: grid;
  align-content: start;
  gap: 2px;
}

#primaryNav .cc-shell-nav__item {
  display: flex;
  width: 100%;
  height: 36px;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #cad4cf;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-shell-nav__icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  color: currentColor;
  opacity: 0.82;
  vertical-align: middle;
}

.cc-shell-nav__label {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#primaryNav .cc-shell-nav__item:hover {
  background: var(--cc-nav-hover, #243832);
  color: #ffffff;
}

#primaryNav .cc-shell-nav__item[aria-current="page"],
#primaryNav .cc-shell-nav__item.active {
  background: var(--cc-nav-active, #31584b);
  color: #ffffff;
  font-weight: 700;
}

#primaryNav .cc-shell-nav__item.nav-locked {
  background: transparent;
  color: #7f918b;
  cursor: not-allowed;
  opacity: 0.72;
}

.module-tabs-nav .cc-shell-tool-icon {
  width: 17px;
  height: 17px;
  pointer-events: none;
  vertical-align: middle;
}

.pin-button {
  min-height: 34px;
  flex: 0 0 auto;
  margin: 12px 0 0;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  background: transparent;
  color: #adbbb5;
  font-size: 11px;
  text-align: left;
}

.nav.pinned {
  display: grid;
  max-height: none;
  flex: 0 0 auto;
  gap: 4px;
  margin: 6px 0 0;
  padding-top: 8px;
  overflow: visible;
}

.nav.pinned a {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 5px;
  color: #adbbb5;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.nav.pinned a:hover,
.nav.pinned a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.main {
  display: grid;
  min-width: 0;
  min-height: 100dvh;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0;
  background: var(--cc-canvas, #f4f6f5);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 9;
  display: grid;
  min-width: 0;
  min-height: 62px;
  grid-template-columns: minmax(210px, 300px) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  border: 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 0;
  background: var(--cc-surface, #ffffff);
  box-shadow: none;
}

.title h2 {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title > span:not(.mobile-app-label) {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-app-label {
  display: none;
}

.command {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 6px;
  background: var(--cc-surface-muted, #f8faf9);
}

.command span {
  flex: 0 0 auto;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  white-space: nowrap;
}

.command input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cc-ink, #17211d);
  font-size: 12px;
}

.quick-command-preview {
  display: grid;
  width: 30px;
  height: 30px;
  min-width: 30px;
  flex: 0 0 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 4px;
  background: var(--cc-accent-soft, #e5f1ec);
  color: var(--cc-accent-strong, #0f573f);
  cursor: pointer;
}

.quick-command-preview:hover,
.quick-command-preview:focus-visible {
  border-color: var(--cc-accent, #176b50);
  outline: 0;
  box-shadow: 0 0 0 2px rgb(45 212 191 / 14%);
}

.quick-command-preview:disabled {
  cursor: default;
  opacity: 0.45;
}

.quick-command-preview svg {
  width: 15px;
  height: 15px;
}

.command-console-head {
  position: relative;
}

.command-console-collapse {
  display: inline-flex;
  min-width: 64px;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 4px;
  background: var(--cc-surface-muted, #f8faf9);
  color: var(--cc-ink-soft, #52605a);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.command-console-collapse:hover,
.command-console-collapse:focus-visible {
  border-color: var(--cc-accent, #176b50);
  outline: 0;
  color: var(--cc-ink, #17211d);
  box-shadow: 0 0 0 2px rgb(45 212 191 / 14%);
}

.command-panel.is-compact .command-console {
  padding-block: 10px;
}

.command-panel.is-compact .command-console-head {
  align-items: center;
  margin-bottom: 0;
}

.command-panel.is-compact .command-console-head p,
.command-panel.is-compact .command-actions,
.command-panel.is-compact .command-summary,
.command-panel.is-compact .command-split {
  display: none;
}

.command-panel.is-compact .command-console-head h3 {
  margin: 0;
}

.status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  overflow: hidden;
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
  white-space: nowrap;
}

#workspaceStatus {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-button,
.ai-fab {
  min-width: 34px;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 9px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 5px;
  background: var(--cc-surface, #ffffff);
  box-shadow: none;
  font-size: 11px;
}

.workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 10px;
  padding: 12px 18px 18px;
  background: var(--cc-canvas, #f4f6f5);
  overflow: visible;
}

.module-tabs-shell,
.tabs,
.module-stage,
.command-panel {
  min-width: 0;
}

.module-tabs-shell {
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 0;
  background: var(--cc-surface, #ffffff);
}

.module-stage {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: visible;
}

/* The archive motto belongs to the home desk only. The module stage is the
 * shell's authoritative view marker, so navigation removes the intro without
 * requiring every feature module to know about the shell decoration. */
.workspace:has(#moduleStage[data-active-view]:not([data-active-view="overview"])) .formal-workbench-intro {
  display: none !important;
}

/* The AI workbench is a bounded two-pane surface. Its conversation and active
 * context panel own their scroll areas; letting the canvas wrapper size to
 * content makes long proposal cards paint behind the composer. */
@media screen and (min-width: 761px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__columns.has-context {
    min-height: 0;
    height: 100%;
    align-items: stretch;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__columns.has-context > .module-canvas-widget:has(.ai-workbench__context-pane),
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__columns.has-context > .module-canvas-widget:has(.ai-workbench__context-pane) > .ai-workbench__context-pane {
    align-self: stretch;
    height: 100%;
    min-height: 0;
  }
}

body.ai-open .shell {
  padding-right: 380px;
}

@media (min-width: 761px) {
  body.owner-shell-v1 .ai-panel {
    top: var(--cc-desktop-topbar-height);
    bottom: 0;
    height: auto;
    max-height: none;
  }
}

@media (min-width: 1181px) {
  .module-stage:has(.finance-calendar-panel:not(.tab-panel-hidden)) {
    /* Keep the desktop workspace stable; the calendar owns its inner scroll area. */
    overflow: hidden;
  }
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: minmax(184px, 196px) minmax(0, 1fr);
  }

  .topbar {
    grid-template-columns: minmax(180px, 250px) minmax(220px, 1fr) auto;
    gap: 10px;
    padding-inline: 14px;
  }

  #workspaceStatus {
    max-width: 92px;
  }

  .workspace {
    padding-inline: 14px;
  }
}

@media (max-width: 900px) and (min-width: 761px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .command,
  .status {
    width: 100%;
    min-width: 0;
  }

  .status {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  body:has(.shell) {
    --cc-mobile-nav-height: 104px;
    padding-bottom: var(--cc-mobile-nav-height);
    overflow-x: hidden;
  }

  body.ai-open .shell {
    padding-right: 0;
  }

  .shell {
    display: block;
    min-height: calc(100dvh - var(--cc-mobile-nav-height));
  }

  .sidebar {
    position: fixed;
    z-index: 50;
    inset: auto 0 0;
    display: block;
    width: 100%;
    height: var(--cc-mobile-nav-height);
    min-height: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid var(--cc-line, #d9e0dc);
    border-radius: 0;
    background: var(--cc-surface, #ffffff);
    color: var(--cc-ink-soft, #52605a);
    overflow: hidden;
  }

  .brand,
  .pin-button,
  .nav.pinned,
  .cc-shell-nav__group-label {
    display: none;
  }

  #primaryNav {
    width: 100%;
    height: var(--cc-mobile-nav-height);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .cc-shell-nav {
    display: grid;
    width: 100%;
    min-width: 0;
    height: var(--cc-mobile-nav-height);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, 52px);
    gap: 0;
  }

  .cc-shell-nav__group,
  .cc-shell-nav__links {
    display: contents;
  }

  #primaryNav .cc-shell-nav__item {
    display: flex;
    width: 100%;
    height: 52px;
    min-width: 0;
    min-height: 52px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px 2px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cc-ink-soft, #52605a);
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #primaryNav .cc-shell-nav__icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
  }

  #primaryNav .cc-shell-nav__label {
    display: block;
    max-width: 100%;
    line-height: 14px;
  }

  #primaryNav .cc-shell-nav__item:hover {
    background: var(--cc-surface-muted, #f8faf9);
    color: var(--cc-accent-strong, #0f573f);
  }

  #primaryNav .cc-shell-nav__item[aria-current="page"],
  #primaryNav .cc-shell-nav__item.active {
    background: var(--cc-accent-soft, #e5f1ec);
    box-shadow: inset 0 3px 0 var(--cc-accent, #176b50);
    color: var(--cc-accent-strong, #0f573f);
  }

  #primaryNav .cc-shell-nav__item.nav-locked {
    background: transparent;
    box-shadow: none;
    color: var(--cc-ink-faint, #7b8781);
  }

  .main {
    min-height: calc(100dvh - var(--cc-mobile-nav-height));
    grid-template-rows: auto auto;
    align-content: start;
  }

  .topbar {
    position: relative;
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    padding: 9px 10px 10px;
    border-radius: 0;
  }

  .mobile-app-label {
    display: block;
    margin-bottom: 1px;
    color: var(--cc-accent, #176b50);
    font-size: 10px;
    font-weight: 700;
  }

  .title h2 {
    font-size: 16px;
  }

  .title > span:not(.mobile-app-label) {
    display: none;
  }

  .command {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: 38px;
  }

  .command span {
    margin: 0;
  }

  .status {
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
  }

  .status .dot,
  #workspaceStatus,
  #clock {
    display: none;
  }

  .status-button,
  .ai-fab {
    min-width: 36px;
    min-height: 34px;
    padding-inline: 7px;
  }

  .workspace {
    grid-template-rows: max-content max-content max-content;
    gap: 8px;
    padding: 8px 9px 14px;
    overflow: visible;
  }

  .command-panel {
    min-height: max-content;
  }

  .command-console-collapse {
    min-width: 60px;
    min-height: 36px;
  }

  .command-console-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .command-console-head > :first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .command-console-head .command-actions {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .command-console-head .command-console-collapse {
    grid-column: 2;
    grid-row: 1;
  }

  .module-tabs-shell {
    min-height: 40px;
  }

  .module-stage {
    min-width: 0;
    padding: 0;
  }
}

.action-feedback {
  min-width: 0;
  border-radius: 0;
}


.settings-pinned-order {
  min-width: 0;
}

.settings-pinned-list {
  min-width: 0;
}

.settings-pinned-row {
  display: grid;
  min-height: 56px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-inline: 4px;
  transition: background-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.settings-pinned-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.settings-pinned-copy small {
  overflow-wrap: anywhere;
}

.settings-pinned-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.settings-pin-reorder {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 6px;
  background: var(--cc-surface, #ffffff);
  color: var(--cc-ink-soft, #52605a);
}

.settings-pin-reorder:hover:not(:disabled),
.settings-pin-reorder:focus-visible {
  border-color: var(--cc-accent, #176b50);
  background: var(--cc-accent-soft, #e5f1ec);
  color: var(--cc-accent-strong, #0f573f);
}

.settings-pin-reorder:focus-visible {
  outline: 2px solid var(--cc-accent, #176b50);
  outline-offset: 2px;
}

.settings-pin-reorder:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.settings-pin-reorder svg {
  width: 17px;
  height: 17px;
  pointer-events: none;
}

.settings-pin-drag-handle {
  cursor: grab;
  touch-action: none;
}

.settings-pin-drag-handle:active {
  cursor: grabbing;
}

.settings-pin-sort-ghost {
  background: var(--cc-accent-soft, #e5f1ec);
  opacity: 0.45;
}

.settings-pin-sort-chosen {
  background: #f1f7f4;
  box-shadow: inset 3px 0 0 var(--cc-accent, #176b50);
}

.settings-pin-sort-drag {
  border-radius: 8px;
  background: var(--cc-surface, #ffffff);
  box-shadow: 0 8px 20px rgba(21, 50, 40, 0.14);
}

.settings-pinned-list[aria-busy="true"] .settings-pinned-row {
  opacity: 0.72;
}

.settings-pinned-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 12px;
  line-height: 20px;
}

@media (max-width: 760px) {
  .settings-pinned-row {
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: start;
    padding-block: 10px;
  }

  .settings-pin-reorder {
    width: 40px;
    height: 40px;
  }

  .settings-pinned-copy {
    min-height: 40px;
    align-content: center;
  }

  .settings-pinned-actions {
    display: grid;
    width: 100%;
    grid-column: 1 / -1;
    grid-template-columns: 40px 40px minmax(72px, 1fr);
    gap: 6px;
    padding-left: 48px;
  }

  .settings-pinned-actions .mini-action {
    min-height: 40px;
    justify-content: center;
  }
}
.quick-command-status {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}


/* source: styles/finance-v2.css */
.finance-ledger-v2 {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--cc-line, var(--line-soft, #d9e0dc));
  border-radius: 6px;
  background: var(--cc-surface, var(--surface-strong, #ffffff));
  color: var(--cc-ink, var(--text, #17211d));
  font-family: var(--cc-font-sans, "Microsoft YaHei UI", sans-serif);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  overflow-x: hidden;
}

.finance-grid,
.finance-grid *,
.finance-ledger-v2,
.finance-ledger-v2 * {
  box-sizing: border-box;
}

.finance-ledger-v2__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 0.25rem 0.25rem;
  color: var(--text-muted, #9fb2c8);
  font-size: 0.82rem;
}

.finance-ledger-v2__pagination[hidden] {
  display: none;
}

.finance-ledger-v2__pagination [disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.finance-ledger-v2__pagination-error {
  flex-basis: 100%;
  text-align: center;
  color: #fca5a5;
}

@media (max-width: 540px) {
  .finance-ledger-v2__pagination {
    gap: 0.45rem;
    justify-content: space-between;
  }

  .finance-ledger-v2__pagination [data-finance-ledger-page] {
    max-width: 46%;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

.finance-ledger-v2__native-scroll,
.finance-ledger-v2 .tabulator-tableholder {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.finance-ledger-v2__table,
.finance-ledger-v2 .tabulator-table {
  min-width: 640px;
}

.finance-ledger-v2__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.finance-ledger-v2__caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.finance-ledger-v2__table th,
.finance-ledger-v2 .tabulator-col {
  height: 34px;
  border-right: 1px solid var(--cc-line, var(--line-soft, #d9e0dc));
  border-bottom: 1px solid var(--cc-line-strong, var(--line, #bac6c0));
  background: var(--cc-surface-strong, var(--surface-soft, #edf2ef));
  color: var(--cc-ink-soft, var(--muted, #52605a));
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.finance-ledger-v2__table th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 0 10px;
}

.finance-ledger-v2__table th:nth-child(1) { width: 108px; }
.finance-ledger-v2__table th:nth-child(2) { width: 78px; }
.finance-ledger-v2__table th:nth-child(3) { width: 18%; }
.finance-ledger-v2__table th:nth-child(4) { width: 38%; }
.finance-ledger-v2__table th:nth-child(5) { width: 122px; }
.finance-ledger-v2__table th:nth-child(6) { width: 116px; }

.finance-ledger-v2__table td,
.finance-ledger-v2 .tabulator-cell {
  height: 38px;
  padding: 0 10px;
  border-right: 1px solid var(--cc-line, var(--line-soft, #e7ece9));
  border-bottom: 1px solid var(--cc-line, var(--line-soft, #e7ece9));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.finance-ledger-v2__table tbody tr {
  cursor: pointer;
}

.finance-ledger-v2__table tbody tr:hover td,
.finance-ledger-v2 .tabulator-row:hover .tabulator-cell {
  background: var(--cc-accent-soft, rgba(34, 211, 238, 0.08));
}

.finance-ledger-v2__table tbody tr:focus-visible {
  outline: 2px solid var(--cc-blue, var(--cyan, #286f91));
  outline-offset: -2px;
}

.finance-ledger-v2__summary {
  font-weight: 600;
}

.finance-ledger-v2__subject {
  display: block;
  min-width: 0;
  max-width: 100%;
  line-height: 1.25;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.finance-ledger-v2__amount-heading,
.finance-ledger-v2__amount {
  font-family: var(--cc-font-mono, "Cascadia Mono", monospace);
  text-align: right;
}

.finance-ledger-v2__amount {
  display: block;
  font-weight: 700;
}

.finance-ledger-v2__amount--income {
  color: var(--cc-accent-strong, var(--green, #0f7956));
}

.finance-ledger-v2__amount--expense {
  color: var(--cc-danger, var(--red, #c04a57));
}

.finance-ledger-v2__amount--neutral {
  color: var(--cc-ink-soft, var(--muted, #52605a));
}

.finance-ledger-v2__type {
  display: inline-flex;
  min-width: 42px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.finance-ledger-v2__type--income {
  border-color: color-mix(in srgb, var(--cc-accent, #176b50) 30%, transparent);
  background: var(--cc-accent-soft, rgba(34, 197, 94, 0.1));
  color: var(--cc-accent-strong, var(--green, #0f7956));
}

.finance-ledger-v2__type--expense {
  border-color: color-mix(in srgb, var(--cc-danger, #ae3e4b) 30%, transparent);
  background: var(--cc-danger-soft, rgba(251, 113, 133, 0.1));
  color: var(--cc-danger, var(--red, #c04a57));
}

.finance-ledger-v2__type--transfer,
.finance-ledger-v2__type--neutral,
.finance-ledger-v2__type--unknown {
  border-color: var(--cc-line, var(--line-soft, #d9e0dc));
  background: var(--cc-surface-muted, var(--surface-soft, #f8faf9));
  color: var(--cc-ink-soft, var(--muted, #52605a));
}

.finance-ledger-v2__state {
  display: grid;
  min-height: 132px;
  place-content: center;
  gap: 4px;
  padding: 24px;
  color: var(--cc-ink-soft, var(--muted, #52605a));
  text-align: center;
}

.finance-ledger-v2__state strong {
  color: var(--cc-ink, var(--text, #17211d));
  font-size: 13px;
}

.finance-ledger-v2__state span {
  font-size: 11px;
}

.finance-ledger-v2__state--error {
  border-left: 3px solid var(--cc-danger, var(--red, #ae3e4b));
  background: var(--cc-danger-soft, rgba(251, 113, 133, 0.08));
}

.finance-ledger-v2__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.finance-ledger-v2__action {
  min-height: 26px;
  padding: 0 7px;
  border: 1px solid var(--cc-line-strong, var(--line, #bac6c0));
  border-radius: 3px;
  background: var(--cc-surface, var(--surface-strong, #ffffff));
  color: var(--cc-ink, var(--text, #17211d));
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
}

.finance-ledger-v2__action:hover {
  border-color: var(--cc-accent, var(--cyan, #176b50));
  background: var(--cc-accent-soft, rgba(34, 211, 238, 0.08));
}

.finance-ledger-v2__action--danger {
  color: var(--cc-danger, var(--red, #ae3e4b));
}

.finance-ledger-v2__action:focus-visible {
  outline: 2px solid var(--cc-blue, var(--cyan, #286f91));
  outline-offset: 1px;
}

.finance-ledger-v2.tabulator {
  min-height: 0;
  border-color: var(--cc-line, var(--line-soft, #d9e0dc));
  background: transparent;
}

/* Bound only the row viewport. Keep the header and pagination in normal flow,
   including on mobile where the fallback table still uses page scrolling. */
.finance-ledger-v2.tabulator {
  height: auto !important;
}

.finance-ledger-v2.tabulator .tabulator-tableholder {
  height: auto !important;
  max-height: clamp(246px, calc(52vh - 34px), 526px) !important;
  overflow-y: auto !important;
}

.finance-ledger-v2 .tabulator-header,
.finance-ledger-v2 .tabulator-row {
  background: transparent;
  color: inherit;
}

@media (max-width: 760px) {
  .finance-ledger-v2 {
    border-radius: 3px;
    font-size: 11px;
    overflow-x: hidden;
  }

  .finance-ledger-v2__native-scroll,
  .finance-ledger-v2 .tabulator-tableholder {
    overflow-x: hidden;
  }

  .finance-ledger-v2 .tabulator-table {
    min-width: 0;
  }

  .finance-ledger-v2 .tabulator-cell {
    height: 42px;
    padding-inline: 5px;
  }

  .finance-ledger-v2 .tabulator-col .tabulator-col-content {
    padding-inline: 5px;
  }

  .finance-ledger-v2 .tabulator-col-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .finance-ledger-v2 .tabulator-cell[tabulator-field="amount"] {
    font-size: 10px;
  }

  .finance-ledger-v2__table {
    display: block;
    min-width: 0;
  }

  .finance-ledger-v2__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .finance-ledger-v2__table tbody {
    display: block;
    min-width: 0;
  }

  .finance-ledger-v2__table tbody tr {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(68px, 0.7fr) minmax(0, 1.6fr) minmax(92px, auto);
    grid-template-areas:
      "date summary amount"
      "type category amount"
      "actions actions actions";
    align-items: center;
    border-bottom: 1px solid var(--cc-line, var(--line-soft, #e7ece9));
  }

  .finance-ledger-v2__table td {
    display: block;
    min-width: 0;
    height: auto;
    min-height: 30px;
    padding: 6px 8px;
    border-right: 0;
    border-bottom: 0;
  }

  .finance-ledger-v2__date {
    grid-area: date;
    color: var(--cc-ink-soft, var(--muted, #52605a));
    font-size: 10px;
  }

  .finance-ledger-v2__type-cell {
    grid-area: type;
  }

  .finance-ledger-v2__category {
    grid-area: category;
    color: var(--cc-ink-soft, var(--muted, #52605a));
  }

  .finance-ledger-v2__summary {
    grid-area: summary;
  }

  .finance-ledger-v2__amount {
    grid-area: amount;
    align-self: stretch;
    place-content: center end;
    white-space: nowrap;
  }

  .finance-ledger-v2__action-cell {
    grid-area: actions;
  }

  .finance-ledger-v2__action-cell:empty {
    display: none;
  }

  .finance-ledger-v2__actions {
    justify-content: flex-end;
  }
}

.finance-ledger-v2-host {
  min-width: 0;
  /* Keep the ledger at its content height; the inspector may be taller. */
  align-self: start;
}

.finance-ledger-v2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 10px;
  min-width: 0;
  margin-top: 12px;
}

.finance-ledger-inspector {
  min-width: 0;
  min-height: 0;
  height: fit-content;
  align-self: start;
  padding: 14px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-left: 3px solid var(--cc-accent, #176b50);
  border-radius: 6px;
  background: var(--cc-surface, #ffffff);
  color: var(--cc-ink, #17211d);
}

.finance-ledger-inspector__empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 5px;
  color: var(--cc-ink-soft, #52605a);
  text-align: center;
}

.finance-ledger-inspector__empty strong {
  color: var(--cc-ink, #17211d);
}

.finance-ledger-inspector__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.finance-ledger-inspector__head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.finance-ledger-inspector__head strong,
.finance-ledger-inspector__head small {
  overflow-wrap: anywhere;
}

.finance-ledger-inspector__head strong {
  font-size: 15px;
}

.finance-ledger-inspector__head small,
.finance-ledger-inspector__eyebrow {
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
}

.finance-ledger-inspector__eyebrow {
  font-weight: 800;
  text-transform: uppercase;
}

.finance-ledger-inspector__facts {
  display: grid;
  gap: 0;
  margin: 10px 0 0;
}

.finance-ledger-inspector__facts > div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--cc-line, #e7ece9);
}

.finance-ledger-inspector__facts dt {
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
}

.finance-ledger-inspector__facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
}

.finance-ledger-inspector__footer {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin-top: 12px;
}

.finance-ledger-inspector__readonly {
  padding: 8px 10px;
  border-left: 2px solid var(--cc-line-strong, #bac6c0);
  background: var(--cc-surface-muted, #f3f6f4);
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
  line-height: 1.5;
}

.finance-ledger-v2__table tbody tr.is-selected td,
.finance-ledger-v2 .tabulator-row.tabulator-selected .tabulator-cell,
.finance-ledger-v2 .tabulator-row.is-selected .tabulator-cell {
  background: var(--cc-accent-soft, rgba(23, 107, 80, 0.1));
}

.finance-ledger-v2__table tbody tr.is-selected td:first-child,
.finance-ledger-v2 .tabulator-row.tabulator-selected .tabulator-cell:first-child,
.finance-ledger-v2 .tabulator-row.is-selected .tabulator-cell:first-child {
  box-shadow: inset 3px 0 0 var(--cc-accent, #176b50);
}

.finance-grid {
  --finance-tech-surface: #ffffff;
  --finance-tech-muted: #f4f7f5;
  --finance-tech-line: #dbe5e0;
  --finance-tech-accent: #0f7658;
}

.finance-grid .panel {
  border-color: var(--finance-tech-line);
  border-radius: 6px;
  background: var(--finance-tech-surface);
  box-shadow: 0 8px 24px rgba(20, 45, 37, 0.06);
}

.finance-grid .panel::before,
.finance-grid .panel::after {
  display: none;
}

.finance-grid .kpi {
  border-radius: 4px;
  background: var(--finance-tech-muted);
}

.finance-calendar-panel:not(.tab-panel-hidden),
.finance-calendar-detail-panel:not(.tab-panel-hidden) {
  height: auto;
  align-self: start;
}

.finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll,
.finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-v2 {
  height: auto;
  overflow-y: visible;
}

.finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
  overflow: visible;
}

.finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-day-list {
  flex: 0 1 auto;
  grid-auto-rows: max-content;
  align-content: start;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.finance-calendar-scroll .finance-calendar-v2 {
  display: block;
  min-width: 680px;
  padding: 4px;
  border: 0;
  background: transparent;
}

.finance-calendar-v2.fc {
  --fc-border-color: var(--cc-line, #d9e0dc);
  --fc-button-bg-color: var(--cc-surface, #ffffff);
  --fc-button-border-color: var(--cc-line-strong, #bac6c0);
  --fc-button-hover-bg-color: var(--cc-surface-muted, #edf2ef);
  --fc-button-hover-border-color: var(--cc-accent, #176b50);
  --fc-button-active-bg-color: var(--cc-accent, #176b50);
  --fc-button-active-border-color: var(--cc-accent, #176b50);
  --fc-today-bg-color: rgba(23, 107, 80, 0.08);
  color: var(--cc-ink, #17211d);
  font-size: 12px;
}

.finance-calendar-v2.fc .fc-toolbar {
  gap: 10px;
  margin-bottom: 10px;
}

.finance-calendar-v2.fc .fc-toolbar-title {
  font-size: 15px;
  letter-spacing: 0;
}

.finance-calendar-v2.fc .fc-button {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 4px;
  box-shadow: none;
  color: var(--cc-ink, #17211d);
  font-size: 11px;
  letter-spacing: 0;
}

.finance-calendar-v2.fc .fc-button-primary:not(:disabled).fc-button-active,
.finance-calendar-v2.fc .fc-button-primary:not(:disabled):active {
  color: #ffffff;
}

.finance-calendar-v2.fc .fc-col-header-cell-cushion,
.finance-calendar-v2.fc .fc-daygrid-day-number {
  padding: 5px 7px;
  color: inherit;
  text-decoration: none;
}

.finance-calendar-v2.fc .fc-daygrid-day-frame {
  min-height: 86px;
}

.finance-calendar-v2.fc .finance-calendar-event {
  margin: 1px 3px;
  border: 0;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
}

.finance-calendar-v2.fc .finance-calendar-event .fc-event-main {
  color: inherit;
}

.finance-calendar-v2.fc .finance-calendar-event .fc-event-title {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.finance-calendar-v2.fc .finance-calendar-event.is-expense {
  background: rgba(174, 62, 75, 0.12);
  color: var(--cc-danger, #ae3e4b);
}

.finance-calendar-v2.fc .finance-calendar-event.is-income {
  background: rgba(23, 107, 80, 0.12);
  color: var(--cc-accent-strong, #176b50);
}

.finance-calendar-v2-fallback {
  width: 100%;
  overflow-x: auto;
}

.finance-calendar-v2-fallback table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.finance-calendar-v2-fallback th,
.finance-calendar-v2-fallback td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  text-align: right;
}

.finance-calendar-v2-fallback th:first-child,
.finance-calendar-v2-fallback td:first-child {
  text-align: left;
}

.finance-day-editor {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--cc-line, #285249);
  border-radius: 10px;
  background: color-mix(in srgb, var(--cc-surface-muted, #0e2420) 88%, transparent);
}

.finance-day-editor header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.finance-day-editor header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.finance-day-editor strong,
.finance-day-editor small {
  min-width: 0;
}

.finance-day-editor small {
  color: var(--cc-ink-soft, #b7d1c9);
  line-height: 1.45;
}

.finance-day-entry-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.finance-day-entry-row .field,
.finance-day-entry-row input,
.finance-day-entry-row select {
  min-width: 0;
  max-width: 100%;
}

.finance-day-editor__status {
  margin: 0;
  color: var(--cc-ink-soft, #b7d1c9);
  font-size: 12px;
  line-height: 1.45;
}

.finance-day-editor__status[data-kind="success"] {
  color: var(--cc-accent-strong, #72e6ad);
}

.finance-day-editor__status[data-kind="error"] {
  color: var(--cc-danger, #ff8e99);
}

@media (min-width: 761px) and (max-width: 1380px) {
  .finance-grid:has(.finance-calendar-panel:not(.tab-panel-hidden)) .finance-calendar-panel:not(.tab-panel-hidden),
  .finance-grid:has(.finance-calendar-panel:not(.tab-panel-hidden)) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
  }

  .finance-calendar-scroll .finance-calendar-v2 {
    width: 100%;
    min-width: 0;
  }

  .finance-calendar-v2.fc .fc-scrollgrid,
  .finance-calendar-v2.fc .fc-scrollgrid table,
  .finance-calendar-v2.fc .fc-daygrid-body,
  .finance-calendar-v2.fc .fc-daygrid-body table,
  .finance-calendar-v2.fc .fc-scrollgrid-sync-table {
    width: 100% !important;
    min-width: 0 !important;
  }

  .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(320px, 0.28fr);
    gap: 12px;
  }

  .finance-calendar-detail-panel:not(.tab-panel-hidden) > .command-console-head,
  .finance-calendar-detail-panel:not(.tab-panel-hidden) > .kpis {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .finance-day-editor header,
  .finance-day-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-day-editor .hud-button {
    width: 100%;
    justify-content: center;
  }

  body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) .main {
    grid-template-rows: auto max-content;
  }

  body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) .workspace {
    height: max-content;
    align-self: start;
  }

  [data-tab-panel="finance-ledger"]:not(.tab-panel-hidden) {
    overflow: visible;
  }

  .finance-ledger-v2-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-ledger-v2-host {
    grid-row: 2;
    height: auto !important;
    max-height: none !important;
  }

  .finance-ledger-v2 .tabulator-tableholder {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible;
  }

  .finance-ledger-inspector {
    /* The full details card must scroll away before the row viewport enters
       the screen, otherwise it covers the header and most mobile rows. */
    position: static;
    z-index: 6;
    grid-row: 1;
    align-self: start;
    min-height: 0;
    padding: 10px 12px;
    overflow: visible;
    box-shadow: 0 8px 24px rgb(0 0 0 / 26%);
  }

  .finance-ledger-inspector__empty {
    min-height: 112px;
  }

  .finance-ledger-inspector__head {
    gap: 8px;
    padding-bottom: 8px;
  }

  .finance-ledger-inspector__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    margin-top: 6px;
  }

  .finance-ledger-inspector__facts > div {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 4px;
    padding: 5px 0;
  }

  .finance-ledger-inspector__footer {
    min-height: 32px;
    margin-top: 8px;
  }

  .finance-calendar-scroll .finance-calendar-v2 {
    width: 100%;
    min-width: 0;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
    overflow-x: auto;
    overflow-y: clip;
  }

  .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 64px;
  }

  .finance-calendar-v2.fc .finance-calendar-event {
    margin-inline: 1px;
    padding-inline: 2px;
  }

  .finance-calendar-v2.fc .finance-calendar-event .fc-event-title {
    display: block;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .finance-calendar-v2.fc .fc-col-header-cell-cushion {
    padding: 4px 1px;
    font-size: 10px;
    white-space: nowrap;
  }

  .finance-calendar-v2.fc .fc-daygrid-day-number {
    padding: 4px 3px;
    font-size: 10px;
  }
}

@media (max-width: 1180px) {
  .finance-ledger-v2-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-ledger-inspector {
    min-height: 0;
  }
}

@media (min-width: 921px) and (max-width: 1180px) {
  .finance-entry-row,
  .record-editor-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .finance-entry-row .field,
  .record-editor-row .field {
    min-width: 0;
  }
}

@media (min-width: 1181px) and (max-height: 700px) {
  .finance-calendar-v2.fc .fc-scrollgrid-sync-table,
  .finance-calendar-v2.fc .fc-daygrid-body,
  .finance-calendar-v2.fc .fc-daygrid-body table {
    height: auto !important;
  }

  .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 44px;
  }

  .finance-calendar-v2.fc .fc-daygrid-day-events {
    min-height: 14px;
    margin-bottom: 4px;
  }

  .finance-calendar-v2.fc .finance-calendar-event {
    font-size: 9px;
    padding-inline: 3px;
  }

  .finance-calendar-v2.fc .fc-toolbar {
    margin-bottom: 6px;
  }
}

@media (max-width: 900px) and (min-width: 761px) {
  .finance-ledger-v2__table,
  .finance-ledger-v2 .tabulator-table {
    min-width: 0;
  }

  .finance-calendar-scroll .finance-calendar-v2,
  .finance-calendar-v2-fallback table {
    min-width: 0;
  }

  .finance-calendar-v2.fc .fc-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-ledger-search,
  .finance-ledger-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-ledger-search .tag,
  .finance-ledger-search .hud-button,
  .finance-ledger-filters .hud-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}

@media (min-width: 1181px) {
  .finance-ledger-v2 .tabulator-tableholder {
    overflow-x: hidden;
  }

  .finance-grid:has(.finance-calendar-panel:not(.tab-panel-hidden)) {
    height: auto;
    align-items: start;
    grid-auto-rows: auto;
  }

  .finance-calendar-panel:not(.tab-panel-hidden),
  .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    height: auto;
    align-self: start;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) {
    display: block;
  }

  .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    display: flex;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll,
  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-v2 {
    height: auto;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
    overflow: visible;
  }

  .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-day-list {
    flex: 0 1 auto;
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (min-width: 1101px) {
  .finance-overview-summary {
    padding: 16px;
  }

  .finance-overview-summary .command-console-head {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .finance-overview-filter-bar {
    margin-bottom: 10px;
    padding-block: 4px;
  }

  .finance-overview-kpis .kpi {
    min-height: 68px;
    padding-block: 8px;
  }

  .finance-overview-range-summary {
    margin-top: 8px;
  }

  .finance-overview-range-summary > span {
    padding-block: 6px;
  }
}

.finance-ledger-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}

.finance-ledger-search .field {
  min-width: 0;
}

@media (max-width: 640px) {
  .finance-ledger-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .finance-ledger-search .tag {
    grid-column: 1 / -1;
  }
}
.finance-ledger-filters {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(160px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0 8px;
}

.finance-ledger-filters .field {
  min-width: 0;
}

@media (max-width: 720px) {
  .finance-ledger-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .finance-ledger-filters .hud-button {
    width: 100%;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head .workbench-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    gap: 10px;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head > :first-child,
  [data-tab-panel="finance-ledger"] > .command-console-head .workbench-actions > * {
    min-width: 0;
    max-width: 100%;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head > :first-child {
    width: 100%;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head .workbench-actions > a {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head .workbench-actions > .finance-month-picker,
  [data-tab-panel="finance-ledger"] > .command-console-head .workbench-actions > .finance-range-control,
  [data-tab-panel="finance-ledger"] > .command-console-head .workbench-actions > .finance-custom-range {
    grid-column: 1 / -1;
  }

  [data-tab-panel="finance-ledger"] > .command-console-head .finance-month-picker,
  [data-tab-panel="finance-ledger"] > .command-console-head .finance-range-control,
  [data-tab-panel="finance-ledger"] > .command-console-head .finance-custom-range,
  [data-tab-panel="finance-ledger"] > .command-console-head .finance-month-picker .field {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .finance-ledger-v2,
  .finance-ledger-v2 * {
    box-sizing: border-box;
  }

  .finance-ledger-search,
  .finance-ledger-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-ledger-search .field,
  .finance-ledger-filters .field,
  .finance-ledger-search input,
  .finance-ledger-filters input,
  .finance-ledger-search select,
  .finance-ledger-filters select {
    min-width: 0;
    max-width: 100%;
  }

  .finance-ledger-search .hud-button,
  .finance-ledger-filters .hud-button,
  .finance-ledger-search .mini-action,
  .finance-ledger-filters .mini-action {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .finance-calendar-v2.fc .fc-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .finance-calendar-v2.fc .fc-toolbar-chunk {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .finance-ledger-search {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-ledger-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .finance-ledger-filters [data-finance-ledger-filter-apply]:last-child {
    grid-column: 1 / -1;
  }

  .finance-ledger-inspector__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
    overflow-x: clip;
  }

  .finance-calendar-scroll .finance-calendar-v2,
  .finance-calendar-v2-fallback table {
    width: 100%;
    min-width: 0;
  }

  .finance-calendar-v2-fallback table {
    table-layout: fixed;
  }

  .finance-calendar-v2.fc .finance-calendar-event .fc-event-title {
    font-size: 7px;
  }
}

.finance-trend-panel {
  margin: 14px 0 16px;
  padding: 14px 0 2px;
  border-top: 1px solid color-mix(in srgb, var(--line, #334155) 72%, transparent);
}

.finance-trends-shell .finance-trend-panel {
  margin: 0;
  padding-top: 0;
  border-top: 0;
}

.finance-trend-head,
.finance-trend-deltas,
.finance-trend-grid {
  display: grid;
  gap: 12px;
}

.finance-trend-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.finance-trend-head h3 {
  margin: 2px 0 4px;
}

.finance-trend-head p,
.finance-trend-row small,
.finance-trend-categories small,
.finance-trend-deltas small {
  color: var(--muted, #94a3b8);
  font-size: 12px;
}

.finance-trend-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.finance-trend-kpis span,
.finance-trend-deltas > div {
  display: grid;
  gap: 2px;
}

.finance-trend-kpis span {
  color: var(--muted, #94a3b8);
  font-size: 12px;
}

.finance-trend-kpis b {
  margin-left: 4px;
  font-size: 15px;
}

.finance-trend-deltas {
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  margin: 12px 0;
  padding: 10px;
  background: color-mix(in srgb, var(--surface, #0f172a) 76%, transparent);
  border: 1px solid color-mix(in srgb, var(--line, #334155) 52%, transparent);
}

.finance-trend-deltas span,
.finance-trend-subhead span {
  font-size: 12px;
  color: var(--muted, #94a3b8);
}

.finance-trend-deltas strong {
  font-size: 16px;
}

.finance-trend-deltas strong.muted {
  color: var(--muted, #94a3b8);
}

.finance-trend-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, .65fr);
  align-items: start;
}

.finance-trend-months {
  display: grid;
  gap: 1px;
}

.finance-trend-row {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) repeat(3, minmax(64px, .55fr));
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 5px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #334155) 35%, transparent);
}

.finance-trend-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.finance-trend-row > b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.finance-trend-row-head {
  min-height: 28px;
  color: var(--muted, #94a3b8);
  font-size: 11px;
  border-bottom-color: color-mix(in srgb, var(--line, #334155) 65%, transparent);
}

.finance-trend-row-head b {
  font-weight: 600;
}

.finance-trend-categories {
  display: grid;
  gap: 4px;
}

.finance-trend-subhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px 4px;
}

.finance-trend-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.finance-trend-category:hover,
.finance-trend-category:focus-visible {
  border-color: color-mix(in srgb, var(--accent, #22d3ee) 55%, transparent);
  background: color-mix(in srgb, var(--accent, #22d3ee) 8%, transparent);
  outline: none;
}

.finance-trend-category.active {
  border-color: color-mix(in srgb, var(--accent, #22d3ee) 68%, transparent);
  background: color-mix(in srgb, var(--accent, #22d3ee) 11%, transparent);
}

.finance-trend-category > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.finance-trend-category strong,
.finance-trend-category small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-category-trend-chart {
  min-width: 0;
  margin: 0;
}

.finance-category-trend-chart > figcaption {
  display: flex;
  min-height: 44px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.finance-category-trend-chart > figcaption > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.finance-category-trend-chart > figcaption small,
.finance-category-trend-chart > figcaption em {
  color: var(--muted, #94a3b8);
  font-size: 11px;
  font-style: normal;
}

.finance-category-trend-chart > figcaption strong {
  font-size: 17px;
}

.finance-category-trend-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
  border-block: 1px solid color-mix(in srgb, var(--line, #334155) 48%, transparent);
}

.finance-category-trend-kpis > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 8px 10px;
  color: var(--muted, #94a3b8);
  font-size: 10px;
  border-right: 1px solid color-mix(in srgb, var(--line, #334155) 38%, transparent);
}

.finance-category-trend-kpis > span:last-child {
  border-right: 0;
}

.finance-category-trend-kpis b {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-category-trend-viewport {
  width: 100%;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.finance-category-trend-plot,
.finance-category-trend-labels {
  width: 100%;
  min-width: 620px;
}

.finance-category-trend-plot {
  display: block;
  height: 182px;
}

.finance-category-trend-baseline {
  stroke: color-mix(in srgb, var(--line, #334155) 72%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.finance-category-trend-bar {
  fill: color-mix(in srgb, var(--accent, #22d3ee) 24%, transparent);
}

.finance-category-trend-line {
  fill: none;
  stroke: var(--accent, #22d3ee);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.finance-category-trend-point {
  fill: var(--accent, #22d3ee);
  stroke: var(--surface, #0f172a);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.finance-category-trend-gap {
  stroke: var(--muted, #94a3b8);
  stroke-dasharray: 3 3;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.finance-category-trend-labels {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0;
  padding: 0 12px 5px;
  color: var(--muted, #94a3b8);
  font-size: 10px;
  text-align: center;
}

.finance-category-trend-labels .is-gap {
  opacity: .55;
}

.finance-trend-history {
  margin-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--line, #334155) 45%, transparent);
}

.finance-trend-history > summary {
  width: fit-content;
  margin-top: 8px;
  padding: 6px 0;
  color: var(--accent, #22d3ee);
  cursor: pointer;
  font-weight: 600;
}

.finance-trend-history[open] > summary {
  margin-bottom: 6px;
}

@media (max-width: 720px) {
  .finance-trend-head,
  .finance-trend-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-trend-kpis {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .finance-trend-deltas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 6px;
  }

  .finance-trend-deltas strong {
    font-size: 14px;
  }

  .finance-trend-row {
    grid-template-columns: minmax(86px, 1fr) repeat(3, minmax(52px, .6fr));
    gap: 4px;
    padding-inline: 2px;
    font-size: 12px;
  }

  .finance-trend-row small {
    font-size: 10px;
  }
}

/* Finance insight workbench: category, cashflow, net and budget views. */
body.owner-shell-v1 {
  --finance-income: #2b7a57;
  --finance-expense: #bd565d;
  --finance-net: #2f6f9f;
  --finance-budget: #aa7b2d;
  --finance-chart-line: rgb(35 75 72 / 18%);
  --finance-chart-soft: rgb(42 101 92 / 6%);
}

html[data-theme="night"] body.owner-shell-v1 {
  --finance-income: #5ed19a;
  --finance-expense: #ff777b;
  --finance-net: #74c8e8;
  --finance-budget: #dfb967;
  --finance-chart-line: rgb(126 196 189 / 18%);
  --finance-chart-soft: rgb(39 91 87 / 13%);
}

body.owner-shell-v1 #moduleStage [data-tab-panel^="finance-"] {
  scroll-margin-top: 116px;
}

body.owner-shell-v1 .finance-chart-overview-panel,
body.owner-shell-v1 .finance-trends-shell,
body.owner-shell-v1 .finance-budget-visual-panel,
body.owner-shell-v1 .finance-chart-reading-panel {
  overflow: clip;
}

body.owner-shell-v1 .finance-chart-head {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(420px, 1.28fr);
  gap: 22px;
  align-items: end;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-chart-head h3,
body.owner-shell-v1 .finance-budget-visual-panel h3,
body.owner-shell-v1 .finance-chart-reading-panel h3 {
  margin: 3px 0 4px;
}

body.owner-shell-v1 .finance-chart-range-actions {
  display: grid;
  grid-template-columns: minmax(200px, .72fr) minmax(360px, 1.28fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--finance-chart-line);
  border-radius: 4px;
  background: var(--finance-chart-soft);
}

body.owner-shell-v1 .finance-chart-range-actions .finance-month-picker,
body.owner-shell-v1 .finance-chart-range-actions .finance-custom-range {
  min-width: 0;
}

body.owner-shell-v1 .finance-chart-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-block: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-chart-kpis > div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  align-content: center;
  padding: 11px 15px;
  border-right: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-chart-kpis > div:last-child {
  border-right: 0;
}

body.owner-shell-v1 .finance-chart-kpis span,
body.owner-shell-v1 .finance-cashflow-chart figcaption small,
body.owner-shell-v1 .finance-net-chart figcaption small,
body.owner-shell-v1 .finance-budget-visual-row small {
  color: var(--muted);
  font-size: 11px;
}

body.owner-shell-v1 .finance-chart-kpis strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .finance-chart-structure {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, .58fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 16px;
}

body.owner-shell-v1 .finance-chart-composition {
  min-width: 0;
  padding-right: 20px;
  border-right: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-chart-composition .category-chart {
  min-height: 250px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1 .finance-chart-composition .chart-donut {
  border: 1px solid var(--finance-chart-line);
  border-radius: 50%;
  background: transparent;
}

body.owner-shell-v1 .finance-chart-composition .chart-bar-row {
  min-height: 42px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--finance-chart-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1 .finance-chart-drilldown,
body.owner-shell-v1 .finance-chart-drilldown .finance-category-summary {
  min-width: 0;
  margin: 0;
}

body.owner-shell-v1 .finance-chart-drilldown .command-console-head {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
}

body.owner-shell-v1 .finance-category-row {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid var(--finance-chart-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

body.owner-shell-v1 .finance-category-row:nth-child(odd) {
  border-right: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-category-row:hover,
body.owner-shell-v1 .finance-category-row:focus-visible {
  background: var(--finance-chart-soft);
  border-color: var(--finance-net);
  box-shadow: inset 3px 0 0 var(--finance-net);
  outline: none;
  transform: none;
}

body.owner-shell-v1 .finance-category-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1 .finance-category-row strong {
  flex: 0 0 auto;
  color: var(--finance-expense);
  font-size: 13px;
}

body.owner-shell-v1 .finance-trend-panel {
  padding: 0;
}

body.owner-shell-v1 .finance-trend-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-trend-deltas {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--finance-chart-line);
  background: transparent;
}

body.owner-shell-v1 .finance-trend-deltas > div {
  min-height: 72px;
  align-content: center;
  padding: 10px 14px;
  border-right: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-trend-deltas > div:last-child {
  border-right: 0;
}

body.owner-shell-v1 .finance-trend-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  min-height: 280px;
  margin-top: 16px;
  border-block: 1px solid var(--finance-chart-line);
  overflow-x: auto;
  scrollbar-gutter: stable;
  overscroll-behavior-inline: contain;
}

body.owner-shell-v1 .finance-trend-visuals.is-empty {
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.owner-shell-v1 .finance-cashflow-chart,
body.owner-shell-v1 .finance-net-chart {
  min-width: 0;
  margin: 0;
  padding: 15px 18px 12px;
}

body.owner-shell-v1 .finance-cashflow-chart {
  border-right: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-cashflow-chart figcaption,
body.owner-shell-v1 .finance-net-chart figcaption {
  display: flex;
  min-height: 38px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.owner-shell-v1 .finance-cashflow-chart figcaption > span:first-child,
body.owner-shell-v1 .finance-net-chart figcaption > span:first-child {
  display: grid;
  gap: 2px;
}

body.owner-shell-v1 .finance-chart-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

body.owner-shell-v1 .finance-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

body.owner-shell-v1 .finance-chart-legend i.income {
  background: var(--finance-income);
}

body.owner-shell-v1 .finance-chart-legend i.expense {
  background: var(--finance-expense);
}

body.owner-shell-v1 .finance-cashflow-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 7px;
  align-items: end;
  height: 205px;
  padding: 12px 4px 0;
  background-image: repeating-linear-gradient(to top, transparent 0 50px, var(--finance-chart-line) 50px 51px);
}

body.owner-shell-v1 .finance-cashflow-column {
  display: grid;
  min-width: 0;
  grid-template-rows: 154px 18px 17px;
  gap: 2px;
  align-items: end;
  position: relative;
  text-align: center;
}

body.owner-shell-v1 .finance-cashflow-column:focus-visible {
  outline: 2px solid var(--finance-net);
  outline-offset: 2px;
}

body.owner-shell-v1 .finance-chart-tooltip {
  --finance-tooltip-bg: #15333a;
  --finance-tooltip-ink: #fffdf5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

body.owner-shell-v1 .finance-cashflow-column > .finance-chart-tooltip {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(100% - 10px);
  width: max-content;
  max-width: 220px;
  padding: 6px 8px;
  border: 1px solid var(--finance-chart-line);
  border-radius: 4px;
  background: var(--finance-tooltip-bg);
  color: var(--finance-tooltip-ink) !important;
  box-shadow: 0 8px 18px rgb(17 50 53 / 22%);
  box-shadow: 0 8px 20px rgb(0 0 0 / 14%);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.35;
  transform: translateX(-50%);
}

body.owner-shell-v1 .finance-cashflow-column:hover > .finance-chart-tooltip,
body.owner-shell-v1 .finance-cashflow-column:focus > .finance-chart-tooltip,
body.owner-shell-v1 .finance-net-point-wrap:hover > .finance-chart-tooltip,
body.owner-shell-v1 .finance-net-point-wrap:focus > .finance-chart-tooltip {
  opacity: 1;
}

body.owner-shell-v1 .finance-net-point-wrap {
  cursor: pointer;
  outline: none;
}

body.owner-shell-v1 .finance-net-point-wrap > .finance-chart-tooltip {
  fill: var(--finance-tooltip-ink);
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--finance-tooltip-bg);
  stroke-linejoin: round;
  stroke-width: 5px;
}

body.owner-shell-v1 .finance-trend-window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

body.owner-shell-v1 .finance-trend-window-controls > span {
  min-width: 112px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

body.owner-shell-v1 .finance-cashflow-bars {
  display: flex;
  height: 154px;
  align-items: end;
  justify-content: center;
  gap: 5px;
}

body.owner-shell-v1 .finance-cashflow-column.is-gap {
  opacity: .62;
}

body.owner-shell-v1 .finance-cashflow-gap {
  width: min(34px, 72%);
  margin-bottom: 8px;
  border-top: 1px dashed var(--muted);
}

body.owner-shell-v1 .finance-cashflow-bar {
  display: block;
  width: clamp(8px, 24%, 17px);
  height: var(--finance-bar-height);
  min-height: 0;
  border-radius: 3px 3px 0 0;
  transition: height 180ms ease;
}

body.owner-shell-v1 .finance-cashflow-bar.income {
  background: var(--finance-income);
}

body.owner-shell-v1 .finance-cashflow-bar.expense {
  background: var(--finance-expense);
}

body.owner-shell-v1 .finance-cashflow-column > strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1 .finance-cashflow-column > small {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .finance-net-plot {
  display: block;
  width: 100%;
  height: 168px;
  margin-top: 8px;
  overflow: visible;
  background-image: repeating-linear-gradient(to bottom, transparent 0 41px, var(--finance-chart-line) 41px 42px);
}

body.owner-shell-v1 .finance-net-baseline {
  stroke: var(--muted);
  stroke-dasharray: 5 5;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

body.owner-shell-v1 .finance-net-line {
  fill: none;
  stroke: var(--finance-net);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

body.owner-shell-v1 .finance-net-point {
  fill: var(--finance-net);
  stroke: var(--surface);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

body.owner-shell-v1 .finance-net-point.negative {
  fill: var(--finance-expense);
}

body.owner-shell-v1 .finance-net-labels {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding-inline: 4px;
  color: var(--muted);
  font-size: 10px;
}

body.owner-shell-v1 .finance-net-labels .is-gap,
body.owner-shell-v1 .finance-trend-row.is-gap {
  color: var(--muted);
  opacity: .68;
}

body.owner-shell-v1 .finance-trend-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(230px, .8fr);
  gap: 20px;
  margin-top: 14px;
}

body.owner-shell-v1 .finance-category-trend-chart {
  padding: 2px 0 10px;
}

body.owner-shell-v1 .finance-category-trend-chart > figcaption strong,
body.owner-shell-v1 .finance-category-trend-kpis b {
  color: var(--finance-net);
}

body.owner-shell-v1 .finance-category-trend-plot {
  background-image: repeating-linear-gradient(to bottom, transparent 0 44px, var(--finance-chart-line) 44px 45px);
}

body.owner-shell-v1 .finance-trend-category.active {
  border-color: var(--finance-net);
  box-shadow: inset 3px 0 0 var(--finance-net);
}

body.owner-shell-v1 .finance-trend-values {
  min-width: 0;
  margin-top: 14px;
}

body.owner-shell-v1 .finance-trend-history {
  margin-top: 0;
  border-top: 0;
  border-bottom: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-trend-history > summary,
body.owner-shell-v1 .finance-chart-notes > summary {
  width: 100%;
  margin: 0;
  padding: 10px 2px;
  color: var(--finance-net);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

body.owner-shell-v1 .finance-trend-categories {
  padding-left: 18px;
  border-left: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-budget-visual {
  display: grid;
  gap: 2px;
  margin-top: 11px;
}

body.owner-shell-v1 .finance-budget-visual-row {
  display: grid;
  grid-template-columns: minmax(115px, 1fr) minmax(120px, 1.4fr) 54px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-budget-visual-row > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

body.owner-shell-v1 .finance-budget-visual-row strong,
body.owner-shell-v1 .finance-budget-visual-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1 .finance-budget-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  background: var(--finance-chart-soft);
  border: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-budget-track i {
  display: block;
  width: var(--finance-budget-used);
  height: 100%;
  background: var(--finance-budget);
}

body.owner-shell-v1 .finance-budget-track b {
  position: absolute;
  inset: -2px 0 -2px auto;
  width: 2px;
  background: var(--muted);
}

body.owner-shell-v1 .finance-budget-visual-row.over .finance-budget-track i {
  background: var(--finance-expense);
}

body.owner-shell-v1 .finance-budget-visual-row em {
  color: var(--finance-budget);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .finance-budget-visual-row.over em {
  color: var(--finance-expense);
}

body.owner-shell-v1 .finance-budget-visual-scope {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  color: var(--muted);
  border-bottom: 1px solid var(--finance-chart-line);
  font-size: 11px;
}

body.owner-shell-v1 .finance-budget-visual-scope strong {
  color: var(--finance-budget);
  font-size: 12px;
}

body.owner-shell-v1 .finance-chart-reading-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  margin-top: 8px;
}

body.owner-shell-v1 .finance-chart-reading-list > .row {
  min-height: 54px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--finance-chart-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1 .finance-chart-notes {
  margin-top: 8px;
  border-top: 1px solid var(--finance-chart-line);
}

body.owner-shell-v1 .finance-chart-notes .list {
  margin-top: 4px;
}

html[data-theme="day"] body.owner-shell-v1 .finance-chart-overview-panel,
html[data-theme="day"] body.owner-shell-v1 .finance-trends-shell {
  border-top: 2px solid #2c6f6a;
}

html[data-theme="night"] body.owner-shell-v1 .finance-chart-overview-panel,
html[data-theme="night"] body.owner-shell-v1 .finance-trends-shell {
  border-top: 2px solid var(--finance-net);
  box-shadow: inset 0 1px 0 rgb(116 200 232 / 8%), 0 14px 32px rgb(0 5 8 / 20%);
}

@media (max-width: 1200px) {
  body.owner-shell-v1 .finance-chart-head,
  body.owner-shell-v1 .finance-chart-structure {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .finance-chart-composition {
    padding-right: 0;
    padding-bottom: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--finance-chart-line);
  }

  body.owner-shell-v1 .finance-chart-range-actions {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1 #moduleStage [data-tab-panel^="finance-"] {
    scroll-margin-top: 166px;
  }

  body.owner-shell-v1 .finance-chart-head,
  body.owner-shell-v1 .finance-chart-range-actions,
  body.owner-shell-v1 .finance-trend-visuals,
  body.owner-shell-v1 .finance-trend-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .finance-chart-head {
    gap: 12px;
  }

  body.owner-shell-v1 .finance-chart-range-actions {
    padding: 8px;
  }

  body.owner-shell-v1 .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 .finance-chart-kpis > div {
    min-height: 62px;
    padding: 9px 10px;
    border-bottom: 1px solid var(--finance-chart-line);
  }

  body.owner-shell-v1 .finance-chart-kpis > div:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1 .finance-chart-kpis > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  body.owner-shell-v1 .finance-chart-kpis strong {
    font-size: 18px;
  }

  body.owner-shell-v1 .finance-chart-composition .category-chart {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  body.owner-shell-v1 .finance-chart-composition .chart-donut {
    width: min(210px, 70vw);
    min-width: 0;
    margin-inline: auto;
  }

  body.owner-shell-v1 .finance-category-list {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .finance-category-row:nth-child(odd) {
    border-right: 0;
  }

  body.owner-shell-v1 .finance-trend-head {
    gap: 9px;
  }

  body.owner-shell-v1 .finance-trend-kpis {
    gap: 6px 10px;
  }

  body.owner-shell-v1 .finance-trend-deltas > div {
    min-height: 65px;
    padding: 8px;
  }

  body.owner-shell-v1 .finance-trend-visuals {
    min-height: 0;
  }

  body.owner-shell-v1 .finance-cashflow-chart {
    border-right: 0;
    border-bottom: 1px solid var(--finance-chart-line);
  }

  body.owner-shell-v1 .finance-cashflow-chart,
  body.owner-shell-v1 .finance-net-chart {
    padding-inline: 4px;
  }

  body.owner-shell-v1 .finance-cashflow-columns {
    height: 188px;
    gap: 4px;
    padding-inline: 0;
  }

  body.owner-shell-v1 .finance-cashflow-column {
    grid-template-rows: 136px 18px 17px;
  }

  body.owner-shell-v1 .finance-cashflow-bars {
    height: 136px;
    gap: 3px;
  }

  body.owner-shell-v1 .finance-net-plot {
    height: 142px;
  }

  body.owner-shell-v1 .finance-trend-categories {
    padding-left: 0;
    padding-top: 12px;
    border-top: 1px solid var(--finance-chart-line);
    border-left: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 .finance-trend-category {
    min-height: 58px;
    align-items: flex-start;
  }

  body.owner-shell-v1 .finance-trend-category small {
    overflow: visible;
    line-height: 1.35;
    white-space: normal;
  }

  body.owner-shell-v1 .finance-trend-subhead {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1 .finance-category-trend-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 .finance-category-trend-kpis > span:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1 .finance-category-trend-kpis > span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--finance-chart-line);
  }

  body.owner-shell-v1 .finance-budget-visual-row {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 6px 10px;
  }

  body.owner-shell-v1 .finance-budget-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.owner-shell-v1 .finance-budget-visual-row em {
    grid-column: 2;
    grid-row: 1;
  }

  body.owner-shell-v1 .finance-chart-reading-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 390px) {
  body.owner-shell-v1 .finance-chart-kpis strong {
    font-size: 16px;
  }

  body.owner-shell-v1 .finance-cashflow-column > small {
    font-size: 8px;
  }

  body.owner-shell-v1 .finance-trend-deltas strong {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1 .finance-cashflow-bar {
    transition: none;
  }
}

.finance-category-manager-panel {
  min-width: 0;
  overflow-x: hidden;
}

.finance-category-create-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(140px, .7fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 12px 0;
  border-block: 1px solid var(--cc-line, var(--line-soft));
}

.finance-category-create-form .field,
.finance-category-rename-form,
.finance-category-management-name,
.finance-category-management-actions {
  min-width: 0;
}

.finance-category-management-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 20px;
  margin-top: 8px;
}

.finance-category-management-group {
  min-width: 0;
}

.finance-category-management-label {
  display: block;
  padding: 9px 2px 7px;
  color: var(--cc-ink-soft, var(--muted));
  font-size: 11px;
  font-weight: 700;
}

.finance-category-management-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 52px;
  padding: 8px 2px;
  border-top: 1px solid var(--cc-line, var(--line-soft));
}

.finance-category-management-name {
  display: grid;
  gap: 2px;
}

.finance-category-management-name strong,
.finance-category-management-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-category-management-name small {
  color: var(--cc-ink-soft, var(--muted));
  font-size: 10px;
}

.finance-category-management-actions,
.finance-category-rename-form {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.finance-category-rename-form input {
  width: min(180px, 20vw);
  min-width: 110px;
}

.finance-category-manager-panel [data-finance-category-status] {
  max-width: min(420px, 48vw);
  overflow-wrap: anywhere;
  white-space: normal;
}

.finance-category-manager-panel [data-finance-category-status][data-kind="error"] {
  color: var(--cc-danger, var(--red));
}

.finance-category-manager-panel [data-finance-category-status][data-kind="success"] {
  color: var(--cc-success, var(--green));
}

.finance-category-manager-panel [data-finance-category-status][data-kind="warning"] {
  color: var(--cc-warning, var(--amber));
}

.finance-category-manager-panel[data-finance-category-api-state="loading"] [data-finance-category-list] {
  opacity: .64;
  pointer-events: none;
}

@media (max-width: 900px) {
  .finance-category-management-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .finance-category-manager-panel {
    overflow-x: hidden;
  }

  .finance-category-create-form {
    grid-template-columns: minmax(0, 1fr) minmax(112px, .55fr);
  }

  .finance-category-create-form .hud-button {
    width: 100%;
  }

  .finance-category-management-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
  }

  .finance-category-management-actions,
  .finance-category-rename-form {
    width: 100%;
    justify-content: stretch;
  }

  .finance-category-rename-form {
    flex: 1 1 auto;
  }

  .finance-category-rename-form input {
    width: 100%;
    min-width: 0;
  }

  .finance-category-management-actions .mini-action,
  .finance-category-rename-form .mini-action {
    min-height: 36px;
  }

  .finance-category-manager-panel [data-finance-category-status] {
    max-width: 100%;
  }
}

/* Category management renders rows directly inside each status group. Keep
 * the two status groups side by side while giving every group two compact
 * columns on desktop; the label spans both columns for a clear hierarchy. */
body.owner-shell-v1 .finance-category-management-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  min-width: 0;
  column-gap: 14px;
}

body.owner-shell-v1 .finance-category-management-group > .finance-category-management-label {
  grid-column: 1 / -1;
}

body.owner-shell-v1 .finance-category-management-group > .finance-category-management-row,
body.owner-shell-v1 .finance-category-management-group > .row.muted-row {
  min-width: 0;
}

@media (max-width: 640px) {
  body.owner-shell-v1 .finance-category-management-group {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  body.owner-shell-v1 .finance-category-management-group > .finance-category-management-label {
    grid-column: 1;
  }
}

/* Status sections are stacked so each collection remains independently
 * scannable and can scroll without stretching the finance page. */
body.owner-shell-v1 .finance-category-management-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.owner-shell-v1 .finance-category-management-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 54%, transparent) transparent;
}

body.owner-shell-v1 .finance-category-management-group > .finance-category-management-label {
  position: sticky;
  top: 0;
  z-index: 1;
  grid-column: 1;
  background: var(--cc-surface, #fff);
}

body.owner-shell-v1 .finance-category-management-group::-webkit-scrollbar {
  width: 8px;
}

body.owner-shell-v1 .finance-category-management-group::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cc-accent, #176b50) 54%, transparent);
  background-clip: padding-box;
}

/* Final desktop arrangement: each status collection uses two columns for its
 * rows. Keep the label and empty-state row spanning the available width. */
body.owner-shell-v1 .finance-category-management-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
}

body.owner-shell-v1 .finance-category-management-group > .finance-category-management-label {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  body.owner-shell-v1 .finance-category-management-group {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  body.owner-shell-v1 .finance-category-management-group > .finance-category-management-label {
    grid-column: 1;
  }
}
/* This layer precedes the shared design layer; scoped important declarations
 * restore the snapshot editor's layout without altering other finance views. */
@layer finance-snapshot-ux {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-save-preview {
    display: grid !important;
    order: 5 !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-capture-actions {
    order: 6 !important;
  }

  @media (max-width: 760px) {
    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] {
      gap: 10px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-balance-head {
      display: block !important;
      padding: 0 !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] :is(.asset-net-ring, .asset-balance-kpis .kpi:nth-child(4), .asset-inherited-note, .asset-entry-reference-panel) {
      display: none !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-balance-kpis {
      display: grid !important;
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
      gap: 0 !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-balance-kpis .kpi {
      min-height: 58px !important;
      padding: 9px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-flow-label {
      padding: 8px 0 !important;
      margin: 0 !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-capture-head {
      grid-template-columns: minmax(0, 1fr) !important;
      gap: 10px !important;
      padding-bottom: 10px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-editor-controls {
      display: grid !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 8px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-editor-controls > span {
      grid-column: 1 / -1 !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] :is(.asset-editor-controls button, .asset-capture-actions button) {
      min-width: 0 !important;
      min-height: 44px !important;
      white-space: normal !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-ledger-rows {
      padding: 10px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-ledger-row {
      grid-template-columns: minmax(0, 1fr) !important;
      gap: 8px !important;
      padding: 10px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-ledger-row > * {
      grid-column: 1 !important;
      grid-row: auto !important;
      width: 100% !important;
      min-width: 0 !important;
      min-height: 40px !important;
    }

    body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-purpose="dated-snapshot"] .asset-save-preview-grid {
      display: none !important;
    }
  }
}

.asset-view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.asset-view-switch > .hud-button {
  flex: 1 1 140px;
  min-height: 44px;
}


/* source: styles/import-v2.css */
.cc-import-v2 {
  --import-v2-line: var(--cc-line, #d9dedb);
  --import-v2-line-strong: var(--cc-line-strong, #bdc6c1);
  --import-v2-surface: var(--cc-surface, #ffffff);
  --import-v2-muted: var(--cc-surface-muted, #f5f7f6);
  --import-v2-ink: var(--cc-ink, #17211d);
  --import-v2-soft: var(--cc-ink-soft, #56635d);
  --import-v2-accent: var(--cc-accent, #18794e);
  --import-v2-accent-soft: var(--cc-accent-soft, #e8f5ee);
  --import-v2-warning: #8a5b12;
  --import-v2-warning-soft: #fff4d8;
  --import-v2-danger: #a33a46;
  --import-v2-danger-soft: #fbeaec;
  min-width: 0;
  color: var(--import-v2-ink);
  background: var(--import-v2-surface);
  font: inherit;
}

.import-v2-host {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.cc-import-v2 *,
.cc-import-v2 *::before,
.cc-import-v2 *::after {
  box-sizing: border-box;
}

.cc-import-v2__head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--import-v2-line-strong);
}

.cc-import-v2__head h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.cc-import-v2__head p {
  margin: 3px 0 0;
  color: var(--import-v2-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.cc-import-v2__preview-state {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #a9c8b6;
  border-radius: 4px;
  background: var(--import-v2-accent-soft);
  color: var(--import-v2-accent);
  font-size: 11px;
  line-height: 1.4;
}

.cc-import-v2__source {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--import-v2-line);
}

.cc-import-v2__mapping {
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--import-v2-line);
  scroll-margin-top: calc(var(--cc-desktop-topbar-height, 68px) + var(--cc-desktop-tabs-height, 44px) + 8px);
}

.cc-import-v2__mapping > header,
.cc-import-v2__mapping > footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-import-v2__mapping h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.cc-import-v2__mapping p,
.cc-import-v2__mapping > footer > span {
  margin: 2px 0 0;
  color: var(--import-v2-soft);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.cc-import-v2__mapping-state {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--import-v2-line-strong);
  border-radius: 4px;
  background: var(--import-v2-muted);
  color: var(--import-v2-soft);
  font-size: 10px;
  font-weight: 700;
}

.cc-import-v2__mapping-state[data-state="editable"] {
  border-color: var(--import-v2-accent);
  background: var(--import-v2-accent-soft);
  color: var(--import-v2-accent);
}

.cc-import-v2__mapping-list {
  display: grid;
  min-width: 0;
  margin: 10px 0;
  border-top: 1px solid var(--import-v2-line);
}

.cc-import-v2__mapping-row {
  display: grid;
  min-width: 0;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--import-v2-line);
  grid-template-columns: minmax(150px, 0.8fr) 62px minmax(190px, 1fr);
  gap: 10px;
}

.cc-import-v2__mapping-source {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.cc-import-v2__mapping-source strong,
.cc-import-v2__mapping-source small {
  overflow-wrap: anywhere;
}

.cc-import-v2__mapping-source strong {
  font-size: 11px;
}

.cc-import-v2__mapping-source small,
.cc-import-v2__mapping-arrow {
  color: var(--import-v2-soft);
  font-size: 9px;
}

.cc-import-v2__mapping-arrow {
  text-align: center;
}

.cc-import-v2__mapping-row select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--import-v2-line-strong);
  border-radius: 4px;
  background: var(--import-v2-surface);
  color: var(--import-v2-ink);
  font: inherit;
  font-size: 11px;
}

.cc-import-v2__mapping > footer > span {
  min-width: 0;
}

.cc-import-v2__mapping > footer button {
  flex: 0 0 auto;
  border-color: var(--import-v2-accent);
  background: var(--import-v2-accent);
  color: #ffffff;
}

.cc-import-v2__source fieldset {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr) minmax(150px, 0.65fr);
  gap: 10px;
}

.cc-import-v2__source legend {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 1px;
  color: var(--import-v2-soft);
  font-size: 11px;
  font-weight: 700;
}

.cc-import-v2__field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.cc-import-v2__field > span,
.cc-import-v2__header-toggle span {
  color: var(--import-v2-soft);
  font-size: 10px;
  font-weight: 650;
}

.cc-import-v2__field input,
.cc-import-v2__field select,
.cc-import-v2__field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--import-v2-line-strong);
  border-radius: 4px;
  background: var(--import-v2-surface);
  color: var(--import-v2-ink);
  font: inherit;
}

.cc-import-v2__field input,
.cc-import-v2__field select {
  height: 34px;
  padding: 0 9px;
  font-size: 12px;
}

.cc-import-v2__field input[type="file"] {
  height: 34px;
  padding: 5px 7px;
  font-size: 11px;
}

.cc-import-v2__field textarea {
  min-height: 126px;
  padding: 9px 10px;
  resize: vertical;
  font-family: var(--cc-font-mono, "Cascadia Mono", "Microsoft YaHei UI", monospace);
  font-size: 11px;
  line-height: 1.55;
}

.cc-import-v2__field--file,
.cc-import-v2__field--text {
  grid-column: 1 / -1;
}

.cc-import-v2__header-toggle {
  display: flex;
  min-height: 34px;
  align-items: center;
  align-self: end;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--import-v2-line);
  border-radius: 4px;
  background: var(--import-v2-muted);
}

.cc-import-v2__header-toggle input,
.cc-import-v2__select-cell input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--import-v2-accent);
}

.cc-import-v2__source-action {
  display: flex;
  min-height: 36px;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
}

.cc-import-v2 button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--import-v2-line-strong);
  border-radius: 4px;
  background: var(--import-v2-surface);
  color: var(--import-v2-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.cc-import-v2 #importPreviewSubmit,
.cc-import-v2 [data-import-v2-confirm="selected"] {
  border-color: var(--import-v2-accent);
  background: var(--import-v2-accent);
  color: #ffffff;
}

.cc-import-v2 button:hover:not(:disabled) {
  filter: brightness(0.96);
}

.cc-import-v2 button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.cc-import-v2 input:focus-visible,
.cc-import-v2 select:focus-visible,
.cc-import-v2__mapping-row select:focus-visible,
.cc-import-v2 textarea:focus-visible,
.cc-import-v2 button:focus-visible,
.cc-import-v2__table-wrap:focus-visible {
  outline: 2px solid #2c73b8;
  outline-offset: 2px;
}

.cc-import-v2__source-action span {
  min-width: 0;
  color: var(--import-v2-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.cc-import-v2__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--import-v2-line);
  background: var(--import-v2-muted);
}

.cc-import-v2__summary > div {
  min-width: 0;
  padding: 9px 12px;
  border-right: 1px solid var(--import-v2-line);
}

.cc-import-v2__summary > div:last-child {
  border-right: 0;
}

.cc-import-v2__summary dt {
  color: var(--import-v2-soft);
  font-size: 10px;
}

.cc-import-v2__summary dd {
  margin: 2px 0 0;
  font-family: var(--cc-font-mono, "Cascadia Mono", monospace);
  font-size: 16px;
  font-weight: 750;
}

.cc-import-v2__table-wrap {
  min-width: 0;
  max-height: min(470px, 48vh);
  overflow-x: auto;
  overflow-y: auto;
  border-bottom: 1px solid var(--import-v2-line-strong);
}

.cc-import-v2__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.cc-import-v2__table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cc-import-v2__table th {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 32px;
  padding: 0 9px;
  border-bottom: 1px solid var(--import-v2-line-strong);
  background: var(--import-v2-muted);
  color: var(--import-v2-soft);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.cc-import-v2__table th:nth-child(1) {
  width: 52px;
}

.cc-import-v2__table th:nth-child(2) {
  width: 48px;
}

.cc-import-v2__table th:nth-child(3) {
  width: 88px;
}

.cc-import-v2__table th:nth-child(4) {
  width: 26%;
}

.cc-import-v2__table th:nth-child(6) {
  width: 82px;
}

.cc-import-v2__table td {
  height: 45px;
  padding: 6px 9px;
  border-bottom: 1px solid #edf0ee;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-import-v2__table tbody tr:hover td {
  background: #f7faf8;
}

html[data-theme="night"] .cc-import-v2__table tbody tr:hover td,
html[data-theme="night"] .cc-import-v2__table tbody tr:focus-within td {
  background: var(--import-v2-muted);
  color: var(--import-v2-ink);
}

.cc-import-v2__table td strong,
.cc-import-v2__table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-import-v2__table td small {
  margin-top: 2px;
  color: var(--import-v2-danger);
  font-size: 9px;
}

.cc-import-v2__select-cell,
.cc-import-v2__line {
  text-align: center;
}

.cc-import-v2__line {
  color: var(--import-v2-soft);
  font-family: var(--cc-font-mono, "Cascadia Mono", monospace);
}

.cc-import-v2__status {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--import-v2-accent-soft);
  color: var(--import-v2-accent);
  font-size: 10px;
  font-weight: 700;
}

.cc-import-v2__status[data-status="needs_review"] {
  background: var(--import-v2-warning-soft);
  color: var(--import-v2-warning);
}

.cc-import-v2__status[data-status="duplicate"],
.cc-import-v2__status[data-status="error"] {
  background: var(--import-v2-danger-soft);
  color: var(--import-v2-danger);
}

.cc-import-v2__status[data-status="empty"] {
  background: #eef1f0;
  color: var(--import-v2-soft);
}

.cc-import-v2__empty td {
  height: 92px;
  color: var(--import-v2-soft);
  text-align: center;
}

.cc-import-v2__actions {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.cc-import-v2__actions > span {
  color: var(--import-v2-soft);
  font-size: 11px;
}

.cc-import-v2__actions > div {
  display: flex;
  gap: 7px;
}

@media (max-width: 720px) {
  .cc-import-v2__mapping {
    scroll-margin-top: calc(var(--cc-mobile-topbar-height, 104px) + var(--cc-mobile-tabs-height, 44px) + 8px);
  }

  .cc-import-v2__head {
    align-items: flex-start;
  }

  .cc-import-v2__preview-state {
    max-width: 146px;
    text-align: right;
    white-space: normal;
  }

  .cc-import-v2__source fieldset {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-import-v2__source legend,
  .cc-import-v2__field--file,
  .cc-import-v2__field--text,
  .cc-import-v2__source-action {
    grid-column: 1;
  }

  .cc-import-v2__field textarea {
    height: 82px;
    min-height: 82px;
  }

  .cc-import-v2__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-import-v2__summary > div:nth-child(2) {
    border-right: 0;
  }

  .cc-import-v2__summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--import-v2-line);
  }

  .cc-import-v2__table-wrap {
    max-height: 42vh;
  }

  .cc-import-v2__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cc-import-v2__actions > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-import-v2__actions button {
    min-height: 42px;
    white-space: normal;
  }

  .cc-import-v2__mapping-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .cc-import-v2__mapping-arrow {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .cc-import-v2__head,
  .cc-import-v2__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-import-v2__preview-state {
    max-width: 100%;
    text-align: left;
  }

  .cc-import-v2__summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-import-v2__summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--import-v2-line);
  }

  .cc-import-v2__summary > div:last-child {
    border-bottom: 0;
  }

  .cc-import-v2__actions > div,
  .cc-import-v2__actions button {
    width: 100%;
    min-width: 0;
  }

  .cc-import-v2__mapping > header,
  .cc-import-v2__mapping > footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-import-v2__mapping-state {
    justify-self: start;
  }

  .cc-import-v2__mapping > footer button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-import-v2 *,
  .cc-import-v2 *::before,
  .cc-import-v2 *::after {
    scroll-behavior: auto !important;
  }
}

/* owner-shell-v1: elevated archive desk for import review and commit. */
body.owner-shell-v1:not(.auth-required) .import-v2-host {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2 {
  overflow: hidden;
  border: 1px solid rgb(54 88 84 / 26%);
  border-radius: 8px;
  background: rgb(251 252 247 / 86%);
  box-shadow:
    0 24px 54px rgb(30 65 62 / 15%),
    0 5px 14px rgb(30 65 62 / 7%),
    inset 0 1px 0 rgb(255 255 255 / 92%);
  backdrop-filter: blur(18px) saturate(108%);
  -webkit-backdrop-filter: blur(18px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__head {
  min-height: 76px;
  padding: 16px 20px;
  border-bottom-color: rgb(56 91 87 / 22%);
  background: rgb(255 255 252 / 58%);
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 62%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__head h2 {
  color: #173d3b;
  font-size: 19px;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__head p {
  max-width: 62ch;
  margin-top: 5px;
  color: #506762;
  line-height: 1.5;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__preview-state,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-state,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__status {
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__preview-state {
  padding: 6px 9px;
  border-color: rgb(38 112 91 / 28%);
  background: rgb(223 241 231 / 80%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 82%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__source,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping {
  padding: 18px 20px 20px;
  border-bottom-color: rgb(56 91 87 / 17%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__source legend,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping h3 {
  color: #204845;
  font-size: 13px;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__field input,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__field select,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__field textarea,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-row select {
  min-height: 36px;
  border-color: rgb(73 105 101 / 30%);
  border-radius: 5px;
  background: rgb(255 255 252 / 76%);
  box-shadow: inset 0 1px 2px rgb(26 63 60 / 4%), 0 1px 0 rgb(255 255 255 / 72%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__field textarea {
  min-height: 92px;
  line-height: 1.55;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__field input:focus,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__field select:focus,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__field textarea:focus,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-row select:focus {
  border-color: rgb(32 117 92 / 68%);
  box-shadow: 0 0 0 3px rgb(32 117 92 / 11%), inset 0 1px 2px rgb(26 63 60 / 4%);
  outline: 0;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping {
  background: rgb(245 248 243 / 42%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-list,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__table-wrap {
  border: 1px solid rgb(68 103 98 / 22%);
  border-radius: 6px;
  background: rgb(255 255 252 / 62%);
  box-shadow: 0 8px 20px rgb(28 63 60 / 6%), inset 0 1px 0 rgb(255 255 255 / 76%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-list {
  margin: 14px 0;
  overflow: hidden;
  border-top-width: 1px;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-row {
  padding: 10px 12px;
  border-bottom-color: rgb(68 103 98 / 14%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-row:last-child {
  border-bottom: 0;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping > footer {
  align-items: flex-end;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping > footer button,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions button[data-import-v2-confirm="selected"] {
  min-height: 38px;
  border: 1px solid #1d6a52;
  border-radius: 5px;
  background: #1d7457;
  box-shadow: 0 7px 14px rgb(28 93 70 / 18%), inset 0 1px 0 rgb(255 255 255 / 18%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping > footer button:hover:not(:disabled),
body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions button[data-import-v2-confirm="selected"]:hover:not(:disabled) {
  background: #145942;
  box-shadow: 0 9px 18px rgb(28 93 70 / 24%), inset 0 1px 0 rgb(255 255 255 / 20%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary {
  margin: 18px 20px 14px;
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary > div {
  min-height: 70px;
  padding: 13px 14px;
  border-right-color: rgb(68 103 98 / 15%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary dt {
  color: #61756f;
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary dd {
  margin-top: 7px;
  color: #173d3b;
  font-size: 19px;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__table-wrap {
  margin: 0 20px;
  max-width: calc(100% - 40px);
  overflow: auto;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__table {
  min-width: 700px;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__table th {
  height: 38px;
  background: rgb(229 239 233 / 78%);
  color: #49645e;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__table td {
  height: auto;
  min-height: 50px;
  border-bottom-color: rgb(68 103 98 / 13%);
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  vertical-align: middle;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__table td strong,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__table td small {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__table tbody tr:hover td,
body.owner-shell-v1:not(.auth-required) .cc-import-v2__table tbody tr:focus-within td {
  background: rgb(231 244 237 / 72%);
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions {
  min-height: 74px;
  padding: 14px 20px 18px;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions > span {
  min-width: 0;
  color: #5c706a;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions > div {
  flex-wrap: wrap;
  justify-content: flex-end;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2 {
  border-color: rgb(130 184 175 / 24%);
  background: rgb(14 29 30 / 90%);
  box-shadow: 0 26px 60px rgb(0 5 7 / 38%), inset 0 1px 0 rgb(180 220 205 / 9%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__head,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping {
  border-bottom-color: rgb(130 184 175 / 19%);
  background: rgb(19 39 40 / 56%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__head h2,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__source legend,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary dd {
  color: #e1eee7;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__head p,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions > span,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary dt {
  color: #9cb6ae;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__preview-state {
  border-color: rgb(105 196 169 / 42%);
  background: rgb(24 73 62 / 92%);
  color: #d9f5e9;
  box-shadow: inset 0 1px 0 rgb(213 246 234 / 10%), 0 8px 18px rgb(0 7 8 / 20%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__field input,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__field select,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__field textarea,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-row select {
  border-color: rgb(130 184 175 / 28%);
  background: rgb(19 39 40 / 92%);
  color: #e1eee7;
  box-shadow: inset 0 1px 2px rgb(0 4 6 / 26%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-list,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table-wrap {
  border-color: rgb(130 184 175 / 22%);
  background: rgb(17 35 36 / 78%);
  box-shadow: 0 10px 24px rgb(0 5 7 / 24%), inset 0 1px 0 rgb(180 220 205 / 6%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping-row,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary > div,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table td {
  border-color: rgb(130 184 175 / 14%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table th {
  background: rgb(30 59 58 / 88%);
  color: #b8d0c7;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table tbody tr:hover td,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table tbody tr:focus-within td {
  background: rgb(35 71 67 / 72%);
  color: #edf5ef;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .cc-import-v2__head,
  body.owner-shell-v1:not(.auth-required) .cc-import-v2__source,
  body.owner-shell-v1:not(.auth-required) .cc-import-v2__mapping,
  body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions {
    padding-inline: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary {
    margin-inline: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__table-wrap {
    margin-inline: 14px;
    max-width: calc(100% - 28px);
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__head {
    min-height: 70px;
  }
}

@media (max-width: 520px) {
  body.owner-shell-v1:not(.auth-required) .cc-import-v2 {
    border-radius: 7px;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__summary {
    margin-top: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__actions {
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .cc-import-v2__table-wrap {
    max-width: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .cc-import-v2__table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-collapse: separate;
    table-layout: auto;
  }

  .cc-import-v2__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .cc-import-v2__table tbody {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  .cc-import-v2__table tbody tr {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "select status"
      "line fields"
      "title title"
      "summary summary";
    overflow: hidden;
    border: 1px solid var(--import-v2-line-strong);
    border-radius: 7px;
    background: var(--import-v2-paper, var(--import-v2-surface));
    box-shadow: 0 7px 16px rgb(23 58 54 / 7%);
  }

  .cc-import-v2__table td {
    display: grid;
    min-width: 0;
    min-height: 42px;
    height: auto;
    grid-template-columns: minmax(64px, 0.62fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .cc-import-v2__table td::before {
    content: attr(data-label);
    color: var(--import-v2-soft);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.25;
  }

  .cc-import-v2__table td[data-field="select"] {
    grid-area: select;
    border-right: 1px solid var(--import-v2-line);
  }

  .cc-import-v2__table td[data-field="line"] {
    grid-area: line;
    border-right: 1px solid var(--import-v2-line);
  }

  .cc-import-v2__table td[data-field="status"] {
    grid-area: status;
  }

  .cc-import-v2__table td[data-field="title"] {
    grid-area: title;
  }

  .cc-import-v2__table td[data-field="title"] small {
    grid-column: 2;
  }

  .cc-import-v2__table td[data-field="summary"] {
    grid-area: summary;
    border-bottom: 0;
  }

  .cc-import-v2__table td[data-field="fields"] {
    grid-area: fields;
  }

  .cc-import-v2__table td[data-field="select"],
  .cc-import-v2__table td[data-field="status"],
  .cc-import-v2__table td[data-field="line"],
  .cc-import-v2__table td[data-field="fields"] {
    grid-template-columns: minmax(54px, 0.72fr) minmax(0, 1fr);
  }

  .cc-import-v2__table td strong,
  .cc-import-v2__table td small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .cc-import-v2__select-cell input {
    width: 18px;
    height: 18px;
    margin: 0;
  }

  .cc-import-v2__table tbody tr:hover td,
  .cc-import-v2__table tbody tr:focus-within td,
  html[data-theme="night"] .cc-import-v2__table tbody tr:hover td,
  html[data-theme="night"] .cc-import-v2__table tbody tr:focus-within td {
    background: transparent;
    color: inherit;
  }

  .cc-import-v2__table tbody tr.cc-import-v2__empty {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "empty";
  }

  .cc-import-v2__table .cc-import-v2__empty td {
    display: block;
    grid-area: empty;
    min-height: 72px;
    padding: 24px 12px;
    border: 0;
    text-align: center;
  }

  .cc-import-v2__table .cc-import-v2__empty td::before {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__table-wrap {
    margin-inline: 14px;
    max-width: calc(100% - 28px);
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__table {
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .cc-import-v2__table tbody tr {
    border-color: rgb(68 103 98 / 24%);
    background: rgb(255 255 252 / 78%);
    box-shadow: 0 8px 18px rgb(28 63 60 / 7%), inset 0 1px 0 rgb(255 255 255 / 78%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table tbody tr {
    border-color: rgb(130 184 175 / 22%);
    background: rgb(17 35 36 / 86%);
    box-shadow: 0 10px 22px rgb(0 5 7 / 22%), inset 0 1px 0 rgb(180 220 205 / 6%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-import-v2__table td::before {
    color: #9db8ae;
  }
}


/* source: styles/people-v2.css */
.cc-people-v2 {
  --people-line: var(--cc-line, #d9e0dc);
  --people-line-strong: var(--cc-line-strong, #b9c5bf);
  --people-surface: var(--cc-surface, #ffffff);
  --people-surface-muted: var(--cc-surface-muted, #f4f7f5);
  --people-ink: var(--cc-ink, #17211d);
  --people-ink-soft: var(--cc-ink-soft, #56635d);
  --people-accent: var(--cc-accent, #176b50);
  --people-accent-soft: var(--cc-accent-soft, #e8f4ee);
  --people-blue: var(--cc-blue, #286f91);
  --people-blue-soft: #eaf3f8;
  --people-warning: #8a5b12;
  --people-warning-soft: #fff4d8;
  --people-danger: var(--cc-danger, #a33a46);
  --people-danger-soft: #fbeaec;
  min-width: 0;
  align-items: start;
  row-gap: 0;
  color: var(--people-ink);
  letter-spacing: 0;
}

.cc-people-v2 *,
.cc-people-v2 *::before,
.cc-people-v2 *::after {
  box-sizing: border-box;
}

@media (min-width: 1041px) {
  .cc-people-v2 .people-index-panel {
    grid-column: span 3;
  }

  .cc-people-v2 .people-list-panel {
    grid-column: span 4;
  }

  .cc-people-v2 .people-selection-panel {
    grid-column: span 5;
  }
}

.cc-people-v2 > .panel {
  min-width: 0;
  padding: 18px 0 20px;
  border: 0;
  border-bottom: 1px solid var(--people-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cc-people-v2 > .panel:first-child {
  padding-top: 0;
}

.cc-people-v2 > .panel:last-child {
  border-bottom: 0;
}

.cc-people-v2 h3,
.cc-people-v2 h4,
.cc-people-v2 p {
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.cc-people-v2 h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.cc-people-v2 h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.cc-people-v2 .people-overview-header,
.cc-people-v2 .people-section-head,
.cc-people-v2 .people-timeline-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-people-v2 .person-head {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 5px 0 12px;
  border-bottom: 1px solid var(--people-line);
  background: transparent;
}

.cc-people-v2 .people-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #a8c8b8;
  border-radius: 4px;
  background: var(--people-accent-soft);
  color: var(--people-accent);
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
}

.cc-people-v2 .person-head > div {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}

.cc-people-v2 .person-head strong,
.cc-people-v2 .person-head small {
  overflow-wrap: anywhere;
  white-space: normal;
}

.cc-people-v2 .overview-eyebrow,
.cc-people-v2 .people-section-head > div > span,
.cc-people-v2 .people-timeline-summary span {
  color: var(--people-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.cc-people-v2 .people-overview-header {
  min-height: 58px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--people-line-strong);
}

.cc-people-v2 .people-overview-primary,
.cc-people-v2 .people-overview-create {
  min-height: 0;
}

.cc-people-v2 .people-overview-create {
  display: grid;
  grid-template-columns: minmax(132px, 0.18fr) minmax(0, 1fr);
  align-items: end;
  gap: 8px 16px;
  padding: 14px 16px;
  background: var(--people-surface-muted);
}

.cc-people-v2 .people-overview-create .people-section-head {
  align-self: center;
}

.cc-people-v2 .people-overview-create .people-form {
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(120px, 0.7fr)) auto;
  align-items: end;
  margin-top: 0;
}

.cc-people-v2 .people-overview-create > .row {
  min-height: 24px;
  grid-column: 2;
  padding-block: 2px;
}

.cc-people-v2 .people-overview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
  color: var(--people-ink-soft);
  font-size: 11px;
}

.cc-people-v2 .people-overview-metrics strong {
  color: var(--people-ink);
  font-variant-numeric: tabular-nums;
}

.cc-people-v2 .people-top-toolbar {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.55fr) auto;
  align-items: end;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-top-toolbar .field,
.cc-people-v2 .people-top-toolbar input,
.cc-people-v2 .people-top-toolbar select {
  width: 100%;
  min-width: 0;
}

.cc-people-v2 .people-top-toolbar .field > small,
.cc-people-v2 .people-overview-interaction-filters .field > small,
.cc-people-v2 .people-interaction-global-filters .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--people-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.cc-people-v2 .people-top-toolbar input,
.cc-people-v2 .people-top-toolbar select,
.cc-people-v2 .people-overview-interaction-filters select,
.cc-people-v2 .people-interaction-global-filters input,
.cc-people-v2 .people-interaction-global-filters select {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--people-line-strong);
  border-radius: 4px;
  background: var(--people-surface);
  color: var(--people-ink);
  font: inherit;
}

.cc-people-v2 .people-mobile-panes {
  display: none;
}

.cc-people-v2 .people-overview-columns {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 0.9fr) minmax(0, 1.18fr);
  gap: 0;
}

.cc-people-v2 .people-overview-list-column,
.cc-people-v2 .people-overview-profile,
.cc-people-v2 .people-overview-interactions {
  min-width: 0;
  padding-top: 12px;
}

.cc-people-v2 .people-overview-list-column {
  padding-right: 14px;
}

.cc-people-v2 .people-overview-profile,
.cc-people-v2 .people-overview-interactions {
  padding-left: 14px;
  border-left: 1px solid var(--people-line);
}

.cc-people-v2 .people-overview-profile {
  padding-right: 14px;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 .people-overview-list {
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 .people-overview-interaction-list {
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 .people-overview-interaction-filters {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}

.cc-people-v2 .people-interaction-overview-panel,
.cc-people-v2 .people-interaction-global-filters,
.cc-people-v2 .people-interaction-global-list {
  min-width: 0;
}

.cc-people-v2 .people-interaction-overview-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--people-line-strong);
}

.cc-people-v2 .people-interaction-overview-metrics {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 10px 0 0;
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-interaction-overview-metrics > span {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 8px 12px 10px;
  border-left: 1px solid var(--people-line);
}

.cc-people-v2 .people-interaction-overview-metrics > span:first-child {
  padding-left: 0;
  border-left: 0;
}

.cc-people-v2 .people-interaction-overview-metrics small {
  color: var(--people-ink-soft);
  font-size: 10px;
}

.cc-people-v2 .people-interaction-overview-metrics strong {
  overflow-wrap: anywhere;
  color: var(--people-ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.cc-people-v2 .people-interaction-global-filters {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) repeat(6, minmax(112px, 0.8fr)) auto;
  align-items: end;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-interaction-global-filters .field,
.cc-people-v2 .people-interaction-global-filters input,
.cc-people-v2 .people-interaction-global-filters select {
  width: 100%;
  min-width: 0;
}

.cc-people-v2 .people-interaction-global-list {
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 .people-interaction-entry-panel,
.cc-people-v2 .people-interaction-person-timeline {
  min-width: 0;
}

.cc-people-v2 [data-people-overview-no-results][hidden],
.cc-people-v2 [data-people-overview-interaction-empty][hidden] {
  display: none;
}

.cc-people-v2 .people-master-detail {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 0;
}

.cc-people-v2 .people-master-detail.people-overview-columns {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 0.9fr) minmax(0, 1.18fr);
}

.cc-people-v2 .people-master,
.cc-people-v2 .people-detail {
  min-width: 0;
  padding-top: 12px;
}

.cc-people-v2 .people-master {
  padding-right: 14px;
}

.cc-people-v2 .people-detail {
  padding-left: 16px;
  border-left: 1px solid var(--people-line);
}

.cc-people-v2 .people-section-head {
  min-height: 38px;
  align-items: flex-start;
}

.cc-people-v2 [data-people-list-region="true"] .people-list,
.cc-people-v2 .people-list[data-people-list-region="true"] {
  max-height: none;
  overflow-y: visible;
  overscroll-behavior: auto;
}

@media (min-width: 761px) {
  .cc-people-v2 [data-people-overview-list="true"] .people-overview-list {
    max-height: 440px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.cc-people-v2 .people-list::-webkit-scrollbar,
.cc-people-v2 .people-timeline::-webkit-scrollbar,
.cc-people-v2 .people-interaction-list::-webkit-scrollbar,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar,
.cc-people-v2 .people-profile-fields::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.cc-people-v2 .people-list::-webkit-scrollbar-track,
.cc-people-v2 .people-timeline::-webkit-scrollbar-track,
.cc-people-v2 .people-interaction-list::-webkit-scrollbar-track {
  background: transparent;
}

.cc-people-v2 .people-list::-webkit-scrollbar-thumb,
.cc-people-v2 .people-timeline::-webkit-scrollbar-thumb,
.cc-people-v2 .people-interaction-list::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: #b8c3bd;
}

.cc-people-v2 .people-overview-list-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.cc-people-v2 .people-person-row {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-bottom-color: var(--people-line);
  border-radius: 0;
  background: transparent;
  color: var(--people-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cc-people-v2 .people-person-row > span:first-child,
.cc-people-v2 .people-person-row strong,
.cc-people-v2 .people-person-row small {
  min-width: 0;
}

.cc-people-v2 .people-person-row strong,
.cc-people-v2 .people-person-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-people-v2 .people-person-row small {
  margin-top: 3px;
  color: var(--people-ink-soft);
  font-size: 10px;
}

.cc-people-v2 .people-person-row-trailing {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.cc-people-v2 .people-mobile-profile-cue {
  display: none;
  color: var(--people-blue);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.cc-people-v2 .people-person-row:hover {
  background: var(--people-surface-muted);
}

.cc-people-v2 .people-person-row.active,
.cc-people-v2 .people-person-row[aria-current="true"] {
  border-color: #a8c8b8;
  border-left: 3px solid var(--people-accent);
  background: var(--people-accent-soft);
}

.cc-people-v2 .people-person-row:focus-visible,
.cc-people-v2 button:focus-visible,
.cc-people-v2 a:focus-visible,
.cc-people-v2 input:focus-visible,
.cc-people-v2 select:focus-visible,
.cc-people-v2 textarea:focus-visible,
.cc-people-v2 summary:focus-visible {
  outline: 2px solid var(--people-blue);
  outline-offset: 2px;
}

.cc-people-v2 .people-overview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 0 12px;
  border-top: 1px solid var(--people-line);
  border-left: 1px solid var(--people-line);
}

.cc-people-v2 .people-overview-fact {
  display: block;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  border-right: 1px solid var(--people-line);
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-overview-fact span,
.cc-people-v2 .people-overview-fact strong {
  display: block;
}

.cc-people-v2 .people-overview-fact span {
  color: var(--people-ink-soft);
  font-size: 10px;
}

.cc-people-v2 .people-overview-fact strong {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cc-people-v2 .people-vitals,
.cc-people-v2 .stacked-kpis {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 12px 0;
  border-top: 1px solid var(--people-line);
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-vitals > span,
.cc-people-v2 .stacked-kpis > .kpi {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: baseline;
  justify-content: flex-start;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--people-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cc-people-v2 .people-vitals > span:last-child,
.cc-people-v2 .stacked-kpis > .kpi:last-child {
  border-right: 0;
}

.cc-people-v2 .people-vitals small,
.cc-people-v2 .stacked-kpis .kpi span {
  color: var(--people-ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.cc-people-v2 .people-vitals strong,
.cc-people-v2 .stacked-kpis .kpi strong {
  min-width: 0;
  font-size: 16px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cc-people-v2 .people-selection-panel .people-person-identity > strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cc-people-v2 .people-selection-panel .people-vitals {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cc-people-v2 .people-selection-panel .people-vitals > span:nth-child(2) {
  border-right: 0;
}

.cc-people-v2 .people-selection-panel .people-vitals > span:nth-child(-n + 2) {
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-selection-panel .people-vitals strong.amber {
  overflow-wrap: normal;
  white-space: nowrap;
}

.cc-people-v2 .people-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin: 10px 0 8px;
}

.cc-people-v2 .people-search-row input,
.cc-people-v2 .people-form input,
.cc-people-v2 .people-form select,
.cc-people-v2 .people-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--people-line-strong);
  border-radius: 4px;
  background: var(--people-surface);
  color: var(--people-ink);
  font: inherit;
}

.cc-people-v2 .people-search-row input,
.cc-people-v2 .people-form input,
.cc-people-v2 .people-form select {
  min-height: 34px;
  padding: 0 9px;
}

.cc-people-v2 .people-form textarea {
  min-height: 78px;
  padding: 8px 9px;
  resize: vertical;
}

.cc-people-v2 .people-form {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin-top: 10px;
}

.cc-people-v2 .people-form .field {
  min-width: 0;
}

.cc-people-v2 .people-form .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--people-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.cc-people-v2 .workbench-actions,
.cc-people-v2 .people-field-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.cc-people-v2 .mini-action,
.cc-people-v2 .hud-button {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: 0;
  white-space: normal;
}

.cc-people-v2 .people-profile-fields {
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 .people-inline-field-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 0 8px;
}

.cc-people-v2 .people-inline-field-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--people-ink-soft);
  font-size: 12px;
}

.cc-people-v2 [data-people-edit-field-row] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px 8px;
}

.cc-people-v2 [data-people-edit-field-row][hidden] {
  display: none !important;
}

.cc-people-v2 [data-people-edit-field-row] > small {
  grid-column: 1 / -1;
}

.cc-people-v2 .people-icon-action {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--people-line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--people-danger);
  cursor: pointer;
  font-size: 17px;
}

.cc-people-v2 .people-canvas-editor-panel {
  min-width: 0;
  height: min(760px, calc(100vh - 190px));
  min-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 14px;
  border: 1px solid var(--people-line-strong);
  background: rgb(244 247 242 / 48%);
  box-shadow: 0 14px 34px rgb(31 59 61 / 10%);
  backdrop-filter: blur(16px) saturate(118%);
  -webkit-backdrop-filter: blur(16px) saturate(118%);
}

.cc-people-v2 .people-interaction-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
  min-width: 0;
}

.cc-people-v2 .people-interaction-edit-panel {
  container-type: inline-size;
}

@container (max-width: 640px) {
  .cc-people-v2 .people-interaction-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cc-people-v2 .people-interaction-editor-history .people-timeline {
  max-height: 620px;
  overflow-y: auto;
}

.cc-people-v2 [data-people-interaction-finance-options="true"] {
  max-height: 260px;
  overflow-y: auto;
  border-block: 1px solid var(--people-line);
}

.cc-people-v2 .people-interaction-row {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  text-align: left;
  cursor: pointer;
}

.cc-people-v2 .people-interaction-list {
  grid-template-columns: minmax(0, 1fr);
  overflow-x: hidden;
}

html[data-theme="night"] body.owner-shell-v1 .cc-people-v2 .people-canvas-editor-panel {
  background: rgb(9 31 37 / 62%);
  box-shadow: 0 16px 36px rgb(0 6 9 / 24%);
}

@media (max-width: 980px) {
  .cc-people-v2 .people-interaction-editor-grid {
    grid-template-columns: 1fr;
  }

  .cc-people-v2 .people-canvas-editor-panel {
    height: min(640px, 70vh);
    min-height: 360px;
  }
}

.cc-people-v2 .people-tag-create-form {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--people-line);
  background: var(--people-surface-muted);
}

.cc-people-v2 .people-tag-create-form .field,
.cc-people-v2 .people-tag-create-form input,
.cc-people-v2 .people-tag-name-field,
.cc-people-v2 .people-tag-name-field input {
  width: 100%;
  min-width: 0;
}

.cc-people-v2 .people-tag-create-form small,
.cc-people-v2 .people-tag-name-field small {
  display: block;
  margin-bottom: 4px;
  color: var(--people-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.cc-people-v2 .people-tag-create-form input,
.cc-people-v2 .people-tag-name-field input {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--people-line-strong);
  border-radius: 4px;
  background: var(--people-surface);
  color: var(--people-ink);
  font: inherit;
}

.cc-people-v2 .people-tag-catalog-list {
  margin-top: 10px;
}

.cc-people-v2 .people-tag-catalog-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.cc-people-v2 .people-tag-row-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.cc-people-v2 .people-tag-row-actions .danger {
  border-color: #d8aab0;
  color: var(--people-danger);
}

.cc-people-v2 .people-tag-row-actions .danger:hover {
  background: var(--people-danger-soft);
}

.cc-people-v2 .people-archive-action,
.cc-people-v2 .people-remove-field {
  border-color: #d8aab0;
  color: var(--people-danger);
}

.cc-people-v2 .people-archive-action:hover,
.cc-people-v2 .people-remove-field:hover {
  background: var(--people-danger-soft);
}

.cc-people-v2 .people-archive-confirmation {
  min-width: min(240px, 100%);
  max-width: 320px;
  border: 1px solid #d8aab0;
  border-radius: 4px;
  background: var(--people-surface);
}

.cc-people-v2 .people-archive-confirmation summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.cc-people-v2 .people-archive-confirmation summary::-webkit-details-marker {
  display: none;
}

.cc-people-v2 .people-archive-confirmation-body {
  display: grid;
  gap: 8px;
  padding: 9px;
  border-top: 1px solid #d8aab0;
}

.cc-people-v2 .people-archive-confirmation-body p,
.cc-people-v2 .people-archive-confirmation-body label {
  margin: 0;
  color: var(--people-ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.cc-people-v2 .people-archive-confirmation-body label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--people-ink);
  font-weight: 700;
}

.cc-people-v2 .people-archive-final {
  justify-content: center;
  border-color: #c77d86;
  color: var(--people-danger);
}

.cc-people-v2 .people-archive-final:disabled {
  border-color: var(--people-line-strong);
  color: var(--people-ink-soft);
  cursor: not-allowed;
  opacity: 0.62;
}

.cc-people-v2 .people-field-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.cc-people-v2 .people-field-row > span:first-child,
.cc-people-v2 .people-field-row strong,
.cc-people-v2 .people-field-row small {
  min-width: 0;
}

.cc-people-v2 .people-field-row strong,
.cc-people-v2 .people-field-row small {
  display: block;
  overflow-wrap: anywhere;
}

.cc-people-v2 .people-safety-preview {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--people-line);
}

.cc-people-v2 .people-edit-guide {
  margin-top: 8px;
  border-left: 3px solid var(--people-accent);
  background: var(--people-accent-soft);
}

.cc-people-v2 .people-full-edit-form {
  display: grid;
  min-width: 0;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--people-line);
}

.cc-people-v2 .people-full-edit-section {
  min-width: 0;
  margin: 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--people-line);
}

.cc-people-v2 .people-full-edit-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.cc-people-v2 .people-full-edit-section legend {
  margin: 0 0 9px;
  padding: 0;
  color: var(--people-ink);
  font-size: 12px;
  font-weight: 750;
}

.cc-people-v2 .people-full-edit-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  align-items: start;
  gap: 9px 10px;
}

.cc-people-v2 .people-full-edit-grid [data-people-edit-field-row] {
  position: relative;
  box-sizing: border-box;
  grid-column: span var(--people-field-grid-span, 6);
  grid-template-rows: auto minmax(40px, 1fr);
  min-height: 72px;
  overflow: visible;
}

.cc-people-v2 .people-full-edit-grid [data-people-edit-field-row].people-full-edit-wide {
  --people-field-grid-span: 12;
}

.cc-people-v2 .people-full-edit-grid > .field:not([data-people-edit-field-row]):not(.people-full-edit-wide) {
  grid-column: span 6;
}

.cc-people-v2 .people-full-edit-grid .people-field-input-shell {
  position: relative;
  display: block;
  grid-column: 1;
  min-width: 0;
  height: 100%;
}

.cc-people-v2 .people-full-edit-grid .people-field-input-shell > :is(input, textarea) {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 40px;
  max-height: none;
}

.cc-people-v2 .people-full-edit-grid [data-people-edit-field-row] > .people-inline-field-actions {
  position: static;
  grid-column: 2;
  align-self: start;
  margin: 0;
}

.cc-people-v2 .people-full-edit-grid .people-inline-field-actions input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
}

.cc-people-v2 .people-full-edit-grid .people-inline-field-actions label {
  white-space: nowrap;
}

body.owner-shell-v1 #moduleStage .cc-people-v2 .people-full-edit-grid .people-field-input-shell > :is(input, textarea) {
  /* The contact editor owns its own grid resize contract. Keep native handles
     available as a fallback while the shared pointer handle changes the grid span. */
  resize: both !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
  line-height: 1.55;
}

.cc-people-v2 .people-field-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px 0 0;
  background:
    linear-gradient(135deg, transparent 0 45%, var(--people-line-strong) 46% 54%, transparent 55% 67%, var(--people-accent) 68% 76%, transparent 77%);
  cursor: nwse-resize;
  opacity: .72;
}

.cc-people-v2 .people-field-resize-handle:hover,
.cc-people-v2 .people-field-resize-handle:focus-visible,
.cc-people-v2 [data-people-edit-field-row].is-resizing .people-field-resize-handle {
  background-color: var(--people-accent-soft);
  opacity: 1;
}

body.is-resizing-people-field,
body.is-resizing-people-field * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.cc-people-v2 .people-full-edit-grid .field,
.cc-people-v2 .people-full-edit-grid input,
.cc-people-v2 .people-full-edit-grid select,
.cc-people-v2 .people-full-edit-grid textarea {
  width: 100%;
  min-width: 0;
}

.cc-people-v2 .people-full-edit-grid .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--people-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

.cc-people-v2 .people-full-edit-grid input,
.cc-people-v2 .people-full-edit-grid select,
.cc-people-v2 .people-full-edit-grid textarea {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--people-line-strong);
  border-radius: 4px;
  background: var(--people-surface);
  color: var(--people-ink);
  font: inherit;
}

.cc-people-v2 .people-full-edit-grid textarea {
  min-height: 76px;
  resize: both;
}

.cc-people-v2 .people-full-edit-wide {
  grid-column: 1 / -1;
}

.cc-people-v2 .people-full-edit-notes textarea {
  min-height: 92px;
}

.cc-people-v2 .people-full-edit-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-people-v2 .people-full-edit-actions span,
.cc-people-v2 .people-form-heading span {
  color: var(--people-ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.cc-people-v2 .people-full-edit-actions .hud-button {
  min-width: min(180px, 100%);
}

.cc-people-v2 .people-arbitrary-field-form {
  grid-template-columns: minmax(120px, 0.6fr) minmax(180px, 1fr) auto;
  align-items: end;
  padding-top: 12px;
  border-top: 1px solid var(--people-line);
}

.cc-people-v2 .people-form-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.cc-people-v2 .people-arbitrary-field-form .microcopy {
  grid-column: 1 / -1;
}

.cc-people-v2 .people-current-fields-panel > .list {
  columns: 2;
  column-gap: 14px;
}

.cc-people-v2 .people-current-fields-panel .people-field-row {
  break-inside: avoid;
  margin-bottom: 1px;
}

@media (max-width: 900px) {
  .cc-people-v2 .people-full-edit-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .cc-people-v2 .people-current-fields-panel > .list {
    columns: 1;
  }
}

@media (max-width: 600px) {
  .cc-people-v2 .people-full-edit-grid,
  .cc-people-v2 .people-arbitrary-field-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-full-edit-wide,
  .cc-people-v2 .people-form-heading,
  .cc-people-v2 .people-arbitrary-field-form .microcopy {
    grid-column: 1;
  }

  .cc-people-v2 .people-full-edit-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cc-people-v2 .people-full-edit-actions .hud-button {
    width: 100%;
  }
}

.cc-people-v2 .people-duplicate-preview details {
  margin-top: 7px;
  border: 1px solid #e0c17e;
  border-radius: 4px;
  background: var(--people-warning-soft);
}

.cc-people-v2 .people-duplicate-preview summary {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--people-warning);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.cc-people-v2 .people-duplicate-candidate {
  padding: 10px;
  border-top: 1px solid #e0c17e;
  background: var(--people-surface);
}

.cc-people-v2 .people-duplicate-candidate header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
}

.cc-people-v2 .people-duplicate-candidate header span {
  color: var(--people-warning);
}

.cc-people-v2 .people-duplicate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--people-line);
  border-left: 1px solid var(--people-line);
}

.cc-people-v2 .people-duplicate-field {
  min-width: 0;
  padding: 7px 8px;
  border-right: 1px solid var(--people-line);
  border-bottom: 1px solid var(--people-line);
}

.cc-people-v2 .people-duplicate-field span,
.cc-people-v2 .people-duplicate-field strong,
.cc-people-v2 .people-duplicate-field small {
  display: block;
  overflow-wrap: anywhere;
}

.cc-people-v2 .people-duplicate-field span,
.cc-people-v2 .people-duplicate-field small {
  color: var(--people-ink-soft);
  font-size: 9px;
}

.cc-people-v2 .people-duplicate-field strong {
  margin: 3px 0;
  font-size: 11px;
}

.cc-people-v2 .people-timeline-summary {
  min-height: 34px;
  padding: 6px 0;
  border-bottom: 1px solid var(--people-line-strong);
  font-size: 11px;
}

.cc-people-v2 .people-timeline {
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 .people-interaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 16px;
  position: relative;
  min-height: 58px;
  padding: 10px 8px 10px 24px;
}

.cc-people-v2 .people-interaction-main {
  min-width: 0;
}

.cc-people-v2 .people-interaction-main strong,
.cc-people-v2 .people-interaction-main .people-interaction-content,
.cc-people-v2 .people-interaction-main small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cc-people-v2 .people-interaction-main .people-interaction-content {
  margin-top: 3px;
  color: var(--people-ink-soft);
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.cc-people-v2 .people-interaction-row::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 2px;
  background: var(--people-blue);
  content: "";
}

.cc-people-v2 .people-interaction-row time {
  font-variant-numeric: tabular-nums;
}

.cc-people-v2 .people-linked-reminders {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--people-line);
}

.cc-people-v2 .people-linked-reminders h4 {
  margin-bottom: 6px;
}

.cc-people-v2 .people-linked-reminder {
  border-left: 3px solid var(--people-warning);
  background: var(--people-warning-soft);
}

.cc-people-v2 .microcopy {
  margin: 0;
  color: var(--people-ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 1040px) {
  .cc-people-v2 .people-master-detail.people-overview-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-people-v2 .people-overview-interactions {
    grid-column: 1 / -1;
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 1px solid var(--people-line);
    border-left: 0;
  }

  .cc-people-v2 .people-master-detail {
    grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
  }

  .cc-people-v2 .people-overview-facts,
  .cc-people-v2 .people-duplicate-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-overview-create {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-overview-create .people-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-people-v2 .people-overview-create .people-form .hud-button,
  .cc-people-v2 .people-overview-create > .row {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body:has([data-command-people="true"]) .module-tabs-nav .cc-shell-tool-icon {
    display: none;
  }

  body:has([data-command-people="true"]) #moduleTabsPrev::before,
  body:has([data-command-people="true"]) #moduleTabsNext::before {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
  }

  body:has([data-command-people="true"]) #moduleTabsPrev::before {
    content: "<";
  }

  body:has([data-command-people="true"]) #moduleTabsNext::before {
    content: ">";
  }

  body:has([data-command-people="true"]) #moduleTabs [data-module-key="people"] {
    padding-inline: 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  .cc-people-v2 {
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .cc-people-v2 > .panel {
    width: 100%;
    min-height: 0;
    grid-column: 1 / -1;
    padding: 15px 0 18px;
  }

  .cc-people-v2 .people-overview-header,
  .cc-people-v2 .people-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cc-people-v2 .person-head {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
  }

  .cc-people-v2 .people-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .cc-people-v2 .people-overview-header .workbench-actions,
  .cc-people-v2 .people-detail-actions {
    width: 100%;
  }

  .cc-people-v2 .people-overview-header .mini-action,
  .cc-people-v2 .people-detail-actions .mini-action {
    flex: 1 1 132px;
  }

  .cc-people-v2 .people-master-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-top-toolbar,
  .cc-people-v2 .people-overview-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-master-detail.people-overview-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-top-toolbar .mini-action {
    width: 100%;
  }

  .cc-people-v2 .people-interaction-overview-head {
    align-items: flex-start;
  }

  .cc-people-v2 .people-interaction-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-people-v2 .people-interaction-overview-metrics > span,
  .cc-people-v2 .people-interaction-overview-metrics > span:first-child {
    padding: 8px 10px;
    border-top: 1px solid var(--people-line);
    border-left: 0;
  }

  .cc-people-v2 .people-interaction-overview-metrics > span:nth-child(even) {
    border-left: 1px solid var(--people-line);
  }

  .cc-people-v2 .people-interaction-global-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-people-v2 .people-interaction-query-field,
  .cc-people-v2 [data-people-interaction-filter-reset="true"] {
    grid-column: 1 / -1;
  }

  .cc-people-v2 [data-people-interaction-filter-reset="true"] {
    width: 100%;
  }

  .cc-people-v2 .people-interaction-global-list {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .cc-people-v2 .people-mobile-panes {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 0 0;
  }

  .cc-people-v2 .people-mobile-panes .mini-action {
    width: 100%;
    min-width: 0;
  }

  .cc-people-v2[data-people-mobile-pane-active="list"] .people-overview-profile,
  .cc-people-v2[data-people-mobile-pane-active="list"] .people-overview-interactions,
  .cc-people-v2[data-people-mobile-pane-active="profile"] .people-overview-list-column,
  .cc-people-v2[data-people-mobile-pane-active="profile"] .people-overview-interactions,
  .cc-people-v2[data-people-mobile-pane-active="interactions"] .people-overview-list-column,
  .cc-people-v2[data-people-mobile-pane-active="interactions"] .people-overview-profile {
    display: none;
  }

  .cc-people-v2 .people-overview-list-column,
  .cc-people-v2 .people-overview-profile,
  .cc-people-v2 .people-overview-interactions {
    width: 100%;
    min-width: 0;
    grid-column: 1;
    margin: 0;
    padding: 12px 0 0;
    border-left: 0;
  }

  .cc-people-v2 .people-overview-profile,
  .cc-people-v2 .people-overview-interactions {
    margin-top: 12px;
    border-top: 1px solid var(--people-line);
  }

  .cc-people-v2 .people-overview-list,
  .cc-people-v2 .people-overview-interaction-list {
    max-height: none;
    overflow-y: visible;
  }

  .cc-people-v2 .people-master {
    padding-right: 0;
  }

  .cc-people-v2 .people-selection-panel {
    display: none;
  }

  .cc-people-v2 [data-people-list-region="true"] .people-list,
  .cc-people-v2 .people-list[data-people-list-region="true"],
  .cc-people-v2 .people-timeline {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .cc-people-v2 .people-person-row {
    min-height: 58px;
  }

  .cc-people-v2 .people-mobile-profile-cue {
    display: inline-flex;
    align-items: center;
  }

  .cc-people-v2 .people-mobile-profile-cue::after {
    margin-left: 3px;
    content: ">";
    font-size: 13px;
    line-height: 1;
  }

  .cc-people-v2 .people-overview-facts,
  .cc-people-v2 .people-duplicate-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-vitals,
  .cc-people-v2 .stacked-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-people-v2 .people-vitals > span:nth-child(2),
  .cc-people-v2 .stacked-kpis > .kpi:nth-child(2) {
    border-right: 0;
  }

  .cc-people-v2 .people-vitals > span:nth-child(-n + 2),
  .cc-people-v2 .stacked-kpis > .kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--people-line);
  }

  .cc-people-v2 .people-field-row {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-field-actions {
    width: 100%;
  }

  .cc-people-v2 .people-field-actions .mini-action,
  .cc-people-v2 .people-field-actions .tag {
    flex: 1 1 96px;
  }

  .cc-people-v2 .people-archive-confirmation {
    width: 100%;
    max-width: none;
  }

  .cc-people-v2 .people-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cc-people-v2 .people-tag-create-form,
  .cc-people-v2 .people-tag-catalog-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-tag-create-form .hud-button {
    width: 100%;
  }

  .cc-people-v2 .people-tag-row-actions {
    justify-content: stretch;
  }

  .cc-people-v2 .people-tag-row-actions .mini-action {
    flex: 1 1 120px;
    min-width: 0;
    max-width: 100%;
  }

  .cc-people-v2 .people-overview-create .people-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-people-v2 .people-overview-create .people-section-head {
    min-height: 34px;
    align-items: center;
    flex-direction: row;
  }

  .cc-people-v2 .people-overview-create .people-form > :first-child {
    grid-column: 1 / -1;
  }

  .cc-people-v2 .people-overview-create .people-form > :nth-child(4) {
    grid-column: 1;
  }

  .cc-people-v2 .people-overview-create .people-form > .hud-button {
    grid-column: 2;
    align-self: end;
  }

  .cc-people-v2 .people-overview-create {
    padding: 14px 12px;
  }

  .cc-people-v2 .people-search-row .mini-action,
  .cc-people-v2 .hud-button,
  .cc-people-v2 .mini-action {
    min-height: 40px;
  }

  .cc-people-v2 [data-people-empty-list-action="true"] {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

.cc-people-v2 .people-interaction-actions {
  min-width: 0;
  align-items: flex-start;
  justify-content: flex-end;
}

/* Keep the interaction rail clear of the title after late art-theme rules load. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 .people-interaction-row {
  padding: 10px 8px 10px 24px !important;
}

@media (prefers-reduced-motion: reduce) {
  .cc-people-v2 *,
  .cc-people-v2 *::before,
  .cc-people-v2 *::after {
    scroll-behavior: auto !important;
  }
}

/* Formal r6 module finish: archival paper by day, signal ledger by night. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 {
  --people-line: #c8d3cf;
  --people-line-strong: #aebfba;
  --people-surface: #fbfaf4;
  --people-surface-muted: #f1f4ec;
  --people-ink: #1d363c;
  --people-ink-soft: #617577;
  --people-accent: #246c69;
  --people-accent-soft: #dce9e3;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 {
  --people-line: #29434a;
  --people-line-strong: #3e6668;
  --people-surface: #0d2027;
  --people-surface-muted: #102a32;
  --people-ink: #d7e5df;
  --people-ink-soft: #78999a;
  --people-accent: #7dc8bc;
  --people-accent-soft: #173b3e;
  --people-blue: #8bbbd0;
  --people-warning: #d4ad67;
  --people-warning-soft: #332b1d;
  --people-danger: #df7d6c;
  --people-danger-soft: #352323;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .panel {
  padding: 18px 20px;
  border: 1px solid var(--people-line);
  border-radius: 4px;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .panel {
  background:
    linear-gradient(112deg, rgb(36 108 105 / 3%), transparent 38%),
    rgb(251 250 244 / 96%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .panel {
  border-color: rgb(126 196 189 / 22%);
  background:
    repeating-linear-gradient(90deg, transparent 0 71px, rgb(126 196 189 / 2.5%) 71px 72px),
    rgb(10 29 36 / 91%);
  box-shadow: 0 16px 34px rgb(0 5 8 / 18%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-primary {
  border-top: 3px solid var(--people-accent);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-primary {
  border-top: 2px solid var(--people-accent);
  border-left: 2px solid #d4ad67;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-create,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-create {
  padding: 14px 16px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-create {
  background: rgb(247 247 239 / 96%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-create {
  background: rgb(8 25 31 / 94%);
}

body.owner-shell-v1 .cc-people-v2 .overview-eyebrow,
body.owner-shell-v1 .cc-people-v2 .people-section-head > div > span,
body.owner-shell-v1 .cc-people-v2 .people-timeline-summary span {
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .cc-people-v2 .people-overview-header {
  min-height: 60px;
}

body.owner-shell-v1 .cc-people-v2 .people-person-row,
body.owner-shell-v1 .cc-people-v2 .people-overview-fact,
body.owner-shell-v1 .cc-people-v2 .people-vitals > span,
body.owner-shell-v1 .cc-people-v2 .stacked-kpis > .kpi {
  transition: background-color 120ms ease, border-color 120ms ease;
}

html[data-theme="day"] body.owner-shell-v1 .cc-people-v2 .people-person-row[aria-current="true"],
html[data-theme="day"] body.owner-shell-v1 .cc-people-v2 .people-person-row.active {
  border-color: #9dbab1;
  background: #e3eee8;
}

html[data-theme="night"] body.owner-shell-v1 .cc-people-v2 .people-person-row:hover {
  background: rgb(35 82 79 / 32%);
}

html[data-theme="night"] body.owner-shell-v1 .cc-people-v2 .people-person-row[aria-current="true"],
html[data-theme="night"] body.owner-shell-v1 .cc-people-v2 .people-person-row.active {
  border-color: #527f7b;
  background: rgb(33 78 75 / 58%);
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .panel,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .panel {
    padding: 14px 13px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-create,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-people-v2 > .people-overview-create {
    padding: 13px;
  }

  body.owner-shell-v1 .cc-people-v2 .people-overview-header {
    min-height: 0;
    gap: 10px;
  }

  body.owner-shell-v1 .cc-people-v2 .people-overview-header .workbench-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.owner-shell-v1 .cc-people-v2 .people-overview-header .mini-action {
    min-width: 0;
    min-height: 38px;
  }

  body.owner-shell-v1 .cc-people-v2 .people-master,
  body.owner-shell-v1 .cc-people-v2 .people-detail {
    padding-top: 10px;
  }

  body.owner-shell-v1 .cc-people-v2 .people-overview-create .people-form {
    gap: 8px 7px;
  }
}

/* PEOPLE-INDEPENDENT-SCROLL-R1: keep each dense People region locally scrollable. */
.cc-people-v2 [data-people-overview-list="true"] .people-overview-list {
  min-height: 0;
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 [data-people-overview-profile="true"] {
  min-height: 0;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 [data-people-overview-interactions="true"] .people-overview-interaction-list {
  min-height: 0;
  max-height: 440px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cc-people-v2 [data-people-interaction-overview="true"] .people-interaction-global-list {
  min-height: 0;
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  .cc-people-v2 [data-people-overview-list="true"] .people-overview-list {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .cc-people-v2 [data-people-overview-profile="true"] {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .cc-people-v2 [data-people-overview-interactions="true"] .people-overview-interaction-list {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .cc-people-v2 [data-people-interaction-overview="true"] .people-interaction-global-list {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* PEOPLE-CONTACT-WORKBENCH-R3: bounded workbench cards and user-resizable notes. */
.cc-people-v2 .people-contact-editor-canvas {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.cc-people-v2 .people-contact-editor-canvas > [data-module-canvas-block] {
  grid-column: span 6;
  min-width: 0;
}

/* PEOPLE-EDITOR-CARD-SCROLL-R2: profile and interaction cards always scroll independently. */
.cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
  min-height: 0;
  height: min(70vh, 620px);
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cc-people-v2 .people-overview-list-column,
.cc-people-v2 .people-overview-profile,
.cc-people-v2 .people-overview-interactions {
  min-height: 0;
  height: min(520px, calc(100vh - 360px));
  max-height: 520px;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(118, 102, 58, 0.72) rgba(118, 102, 58, 0.12);
  scrollbar-width: thin;
}

.cc-people-v2 .people-overview-list-column::-webkit-scrollbar,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar,
.cc-people-v2 .people-overview-interactions::-webkit-scrollbar {
  width: 10px;
}

.cc-people-v2 .people-overview-list-column::-webkit-scrollbar-track,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar-track,
.cc-people-v2 .people-overview-interactions::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(118, 102, 58, 0.12);
  box-shadow: inset 0 0 0 1px rgba(118, 102, 58, 0.12);
}

.cc-people-v2 .people-overview-list-column::-webkit-scrollbar-thumb,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar-thumb,
.cc-people-v2 .people-overview-interactions::-webkit-scrollbar-thumb {
  min-height: 34px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(118, 102, 58, 0.72);
  background-clip: padding-box;
}

.cc-people-v2 .people-overview-list-column::-webkit-scrollbar-button:single-button,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar-button:single-button,
.cc-people-v2 .people-overview-interactions::-webkit-scrollbar-button:single-button {
  display: block;
  width: 10px;
  height: 10px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
}

.cc-people-v2 .people-overview-list-column::-webkit-scrollbar-button:single-button:vertical:decrement,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar-button:single-button:vertical:decrement,
.cc-people-v2 .people-overview-interactions::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image:
    linear-gradient(135deg, transparent 50%, rgba(118, 102, 58, 0.8) 50%),
    linear-gradient(45deg, rgba(118, 102, 58, 0.8) 50%, transparent 50%);
  background-position: calc(50% - 2px) 6px, calc(50% + 2px) 6px;
  background-size: 4px 4px;
}

.cc-people-v2 .people-overview-list-column::-webkit-scrollbar-button:single-button:vertical:increment,
.cc-people-v2 .people-overview-profile::-webkit-scrollbar-button:single-button:vertical:increment,
.cc-people-v2 .people-overview-interactions::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(118, 102, 58, 0.8) 50%),
    linear-gradient(135deg, rgba(118, 102, 58, 0.8) 50%, transparent 50%);
  background-position: calc(50% - 2px) 1px, calc(50% + 2px) 1px;
  background-size: 4px 4px;
}

.cc-people-v2 .people-overview-list,
.cc-people-v2 .people-overview-interaction-list {
  max-height: none;
  overflow-y: visible;
}

.cc-people-v2 .people-overview-profile {
  overflow-y: scroll;
}

.cc-people-v2 .people-form textarea,
.cc-people-v2 .people-interaction-editor-grid textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  resize: both;
}

@media (max-width: 760px) {
  .cc-people-v2 .people-contact-editor-canvas {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-people-v2 .people-contact-editor-canvas > [data-module-canvas-block] {
    grid-column: 1 / -1;
  }

  .cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
    height: min(62vh, 520px);
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  .cc-people-v2 .people-overview-list-column,
  .cc-people-v2 .people-overview-profile,
  .cc-people-v2 .people-overview-interactions {
    height: auto;
    min-height: 0;
    max-height: 60vh;
    overflow-y: scroll;
  }

  .cc-people-v2 .people-overview-list,
  .cc-people-v2 .people-overview-interaction-list {
    max-height: none;
    overflow-y: visible;
  }

  .cc-people-v2 .people-full-edit-grid [data-people-edit-field-row],
  .cc-people-v2 .people-full-edit-grid [data-people-edit-field-row].people-full-edit-wide {
    --people-field-grid-span: 12;
    grid-column: 1 / -1;
  }

  .cc-people-v2 .people-field-resize-handle {
    width: 16px;
    height: 16px;
    cursor: ns-resize;
  }

  .cc-people-v2 .people-form textarea,
  .cc-people-v2 .people-interaction-editor-grid textarea {
    max-width: 100%;
    resize: vertical;
  }
}

/* PEOPLE-LONG-LIST-SCROLL-R2: only result sets that can grow independently own a scroll rail. */
.cc-people-v2 .people-interaction-global-list {
  min-height: 0;
  max-height: 560px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cc-people-v2 [data-tab-panel="people-followups"] > .list {
  min-height: 0;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cc-people-v2 .people-tag-catalog-list {
  min-height: 0;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cc-people-v2 [data-tab-panel="people-tags"] > .people-list {
  min-height: 0;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cc-people-v2 [data-tab-panel="people-tags"] > .people-interaction-list {
  min-height: 0;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 760px) {
  .cc-people-v2 .people-interaction-global-list {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  .cc-people-v2 [data-tab-panel="people-followups"] > .list {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  .cc-people-v2 .people-tag-catalog-list {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  .cc-people-v2 [data-tab-panel="people-tags"] > .people-list {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  .cc-people-v2 [data-tab-panel="people-tags"] > .people-interaction-list {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }
}

/* PEOPLE-OVERVIEW-LIST-SCROLL-R3: the column owns the single decorative
   boundary; the list inside it owns the independent vertical scroll rail. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-overview-list-column {
  box-sizing: border-box !important;
  overflow: hidden !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"] {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-height: 414px !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 102, 58, 0.82) rgba(118, 102, 58, 0.14);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::-webkit-scrollbar {
  width: 11px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(118, 102, 58, 0.14);
  box-shadow: inset 0 0 0 1px rgba(118, 102, 58, 0.16);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(157, 109, 39, 0.92), rgba(118, 102, 58, 0.74));
  background-clip: padding-box;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::-webkit-scrollbar-button:single-button:vertical:decrement,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"]::-webkit-scrollbar-button:single-button:vertical:increment {
  display: block;
  width: 11px;
  height: 11px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 [data-people-overview-list="true"] .people-overview-list[data-art-frame-owner="true"] {
    max-height: calc(60vh - 76px) !important;
  }
}

/* PEOPLE-QUICK-CREATE-SCROLL-R4: the form owns expanded tag-picker overflow
   while the outer card keeps its fixed decorative frame. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-overview-create .people-form {
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 102, 58, 0.82) rgba(118, 102, 58, 0.14);
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-overview-create .people-form::-webkit-scrollbar {
  width: 11px;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-overview-create .people-form::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(118, 102, 58, 0.14);
  box-shadow: inset 0 0 0 1px rgba(118, 102, 58, 0.16);
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-overview-create .people-form::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(157, 109, 39, 0.92), rgba(118, 102, 58, 0.74));
  background-clip: padding-box;
}


/* source: styles/work-v1.css */
.work-module-root {
  --work-ink: #17231e;
  --work-muted: #657069;
  --work-green: #1d6c50;
  --work-gold: #b68128;
  color: var(--work-ink);
}

.work-shell,
.work-overview-shell {
  display: grid;
  gap: 12px;
  min-height: min(720px, calc(100vh - 220px));
  color: var(--work-ink);
}

.work-shell { grid-template-columns: minmax(360px, 1.3fr) minmax(310px, 1fr); }
.work-overview-shell { grid-template-columns: minmax(190px, .68fr) minmax(250px, 1fr) minmax(245px, .92fr); }

.work-column {
  min-width: 0;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--work-green) 26%, #d9dedb);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(247,250,248,.96));
  box-shadow: 0 10px 26px rgba(27, 45, 36, .07);
  overflow: hidden;
  position: relative;
}

.work-column::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--work-green), var(--work-gold));
  z-index: 2;
}

.work-column__header {
  min-height: 70px;
  padding: 14px 16px 13px 19px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(29, 108, 80, .16);
  background:
    radial-gradient(circle at 92% 0, rgba(182,129,40,.11), transparent 38%),
    linear-gradient(120deg, rgba(29,108,80,.08), rgba(255,255,255,.6));
}

.work-column__header small { color: var(--work-green); font: 700 10px/1.2 "Segoe UI", sans-serif; letter-spacing: .12em; }
.work-column__header h2 { margin: 4px 0 0; font: 700 18px/1.15 "Microsoft YaHei UI", sans-serif; letter-spacing: 0; }
.work-column__scroll, .work-project-list { overflow: auto; scrollbar-gutter: stable; }
.work-column__scroll { height: calc(min(720px, calc(100vh - 220px)) - 70px); padding: 16px; }
.work-project-list { height: calc(min(720px, calc(100vh - 220px)) - 126px); padding: 8px; }

.work-search { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 9px 10px 4px 13px; }
.work-search input, .work-search button, .work-field input, .work-field select, .work-field textarea, .work-links input, .work-links select {
  border: 1px solid #ccd5d0; border-radius: 5px; background: #fff; color: var(--work-ink); font: 500 13px/1.5 "Microsoft YaHei UI", sans-serif;
}
.work-search input, .work-field input, .work-field select, .work-links input, .work-links select { min-height: 36px; padding: 7px 9px; }
.work-search button { padding: 0 12px; color: var(--work-green); font-weight: 700; }
.work-icon-button { inline-size: 34px; block-size: 34px; border-radius: 50%; border: 1px solid rgba(29,108,80,.28); background: #fff; color: var(--work-green); font-size: 22px; line-height: 1; }

.work-project-row { width: 100%; display: grid; gap: 7px; padding: 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; text-align: left; }
.work-project-row:hover, .work-project-row.is-active { border-color: rgba(29,108,80,.24); background: rgba(29,108,80,.07); }
.work-project-row.is-active { box-shadow: inset 3px 0 var(--work-green); }
.work-project-row__top, .work-project-row__meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.work-project-row__top strong { font-size: 14px; }
.work-project-row__top em { padding: 2px 6px; border-radius: 3px; background: #edf3ef; color: var(--work-green); font: 700 11px/1.4 sans-serif; font-style: normal; }
.work-project-row__top em[data-priority="urgent"], .work-project-row__top em[data-priority="high"] { background: #f8ece8; color: #a43f2f; }
.work-project-row__summary { color: var(--work-muted); font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-project-row__meta { color: #7b847f; font-size: 11px; }

.work-overview-summary { display: grid; gap: 16px; }
.work-overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.work-overview-metrics article { display: grid; gap: 4px; min-width: 0; padding: 13px 12px; border: 1px solid rgba(29,108,80,.14); border-radius: 5px; background: rgba(255,255,255,.76); }
.work-overview-metrics strong { color: var(--work-green); font: 750 24px/1 "Segoe UI", sans-serif; }
.work-overview-metrics span { color: var(--work-muted); font-size: 11px; }
.work-overview-brief { display: grid; gap: 14px; padding: 18px; border: 1px solid rgba(29,108,80,.18); border-radius: 6px; background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(239,246,242,.82)); }
.work-overview-brief > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.work-overview-brief h3 { margin: 3px 0 0; font-size: 20px; line-height: 1.3; }
.work-overview-brief header small, .work-overview-brief p { color: var(--work-muted); }
.work-overview-brief p { margin: 0; line-height: 1.7; }
.work-overview-brief dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.work-overview-brief dl div { padding: 9px; border-left: 2px solid rgba(182,129,40,.55); background: rgba(255,255,255,.6); }
.work-overview-brief dt { color: var(--work-muted); font-size: 11px; }
.work-overview-brief dd { margin: 4px 0 0; color: var(--work-ink); font-size: 13px; font-weight: 700; }
.work-overview-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-overview-tags span { padding: 4px 7px; border-radius: 4px; background: rgba(29,108,80,.1); color: var(--work-green); font-size: 11px; font-weight: 700; }
.work-overview-edit { justify-self: end; }

.work-column--overview-progress .work-column__scroll { background: linear-gradient(155deg, rgba(247,250,248,.88), rgba(255,255,255,.96)); }
.work-overview-timeline { display: grid; gap: 0; }

.work-project-form, .work-progress-form { display: grid; gap: 13px; }
.work-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.work-field { display: grid; gap: 6px; min-width: 0; }
.work-field > span { color: #53625a; font-size: 12px; font-weight: 700; }
.work-field textarea { resize: vertical; min-height: 80px; padding: 9px; }
.work-field input:focus, .work-field select:focus, .work-field textarea:focus { outline: 2px solid rgba(29,108,80,.18); border-color: var(--work-green); }
.work-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 4px; }
.work-attachment-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #e3e8e5; padding-top: 12px; }
.work-attachment-strip span { display: grid; gap: 2px; }
.work-attachment-strip small { color: var(--work-muted); }
.work-attachment-list { display: flex; flex-wrap: wrap; gap: 6px; }
.work-attachment-list span { display: inline-flex; gap: 6px; padding: 5px 7px; border: 1px solid #dce3df; border-radius: 4px; background: #f7faf8; font-size: 12px; }

.work-custom-fields { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid rgba(29,108,80,.2); border-radius: 6px; background: rgba(246,250,248,.8); }
.work-custom-fields legend { padding: 0 7px; color: var(--work-green); font-size: 13px; font-weight: 800; }
.work-custom-field-list { display: grid; gap: 9px; }
.work-custom-field-row { display: grid; grid-template-columns: minmax(120px,.45fr) minmax(220px,1fr) 34px; gap: 9px; align-items: end; padding: 10px; border: 1px solid #dde6e1; border-radius: 5px; background: rgba(255,255,255,.9); }
.work-custom-field-row textarea { min-height: 58px; }
.work-custom-field-create { display: grid; grid-template-columns: minmax(120px,.45fr) minmax(220px,1fr) auto; gap: 9px; align-items: end; padding-top: 10px; border-top: 1px dashed rgba(29,108,80,.22); }
.work-custom-field-create .button { min-height: 36px; white-space: nowrap; }
.work-custom-field-remove { border-radius: 5px; color: #9d3f36; }
.work-custom-field-empty { margin: 0; padding: 12px; color: var(--work-muted); text-align: center; font-size: 12px; }

.work-status, .work-progress-count { border: 1px solid rgba(29,108,80,.24); border-radius: 999px; padding: 4px 9px; color: var(--work-green); background: rgba(255,255,255,.72); font-size: 11px; font-weight: 700; }
.work-progress-custom-fields .work-custom-field-row {
  grid-template-columns: minmax(78px, .72fr) minmax(112px, 1.28fr) 34px;
}
.work-progress-custom-fields .work-custom-field-create {
  grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr);
}
.work-progress-custom-fields :is(input, textarea) { width: 100%; max-width: 100%; box-sizing: border-box; }
.work-progress-add-field {
  grid-column: 1 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
  padding-inline: 14px;
  border-color: rgba(29,108,80,.3);
  color: var(--work-green);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(232,243,237,.94));
}
.work-progress-add-field :is(svg, i), .work-progress-submit :is(svg, i) { width: 16px; height: 16px; flex: 0 0 auto; }
.work-progress-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(29,108,80,.16);
}
.work-progress-actions > span { color: var(--work-muted); font-size: 11px; line-height: 1.45; }
.work-progress-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #155f46;
  border-radius: 6px;
  background: linear-gradient(135deg, #1d7053, #155c4d);
  box-shadow: 0 7px 16px rgba(20,82,62,.18), inset 0 1px rgba(255,255,255,.2);
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}
.work-progress-submit:hover { background: linear-gradient(135deg, #237b5c, #176654); transform: translateY(-1px); }
.work-progress-submit:focus-visible { outline: 3px solid rgba(182,129,40,.28); outline-offset: 2px; }
.work-progress-layout { display: grid; grid-template-columns: minmax(280px, .92fr) minmax(320px, 1.08fr); gap: 18px; align-items: start; min-width: 0; }
.work-progress-editor-pane, .work-progress-display-pane { min-width: 0; min-height: 0; max-height: 620px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(29,108,80,.55) rgba(228,235,230,.7); border: 1px solid rgba(29,108,80,.18); border-radius: 8px; background: rgba(255,255,255,.82); box-shadow: 0 10px 24px rgba(25,63,49,.08); }
.work-progress-editor-pane { display: grid; gap: 18px; padding: 18px; }
.work-progress-display-pane { padding: 18px; }
.work-progress-editor-pane::-webkit-scrollbar, .work-progress-display-pane::-webkit-scrollbar { width: 10px; }
.work-progress-editor-pane::-webkit-scrollbar-thumb, .work-progress-display-pane::-webkit-scrollbar-thumb { background: rgba(29,108,80,.55); border-radius: 8px; border: 2px solid rgba(255,255,255,.72); }
.work-progress-display-pane > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(29,108,80,.14); }
.work-progress-display-pane > header strong { color: var(--work-green); font-size: 14px; }
.work-progress-display-pane > header span { color: var(--work-gold); font-size: 12px; font-weight: 800; }
.work-timeline { display: grid; gap: 0; margin-top: 14px; }
.work-progress-item { display: grid; grid-template-columns: 74px 1fr; gap: 12px; position: relative; padding: 0 0 18px; }
.work-progress-item::before { content: ""; position: absolute; left: 79px; top: 7px; bottom: -7px; width: 1px; background: #d5ddd8; }
.work-progress-item::after { content: ""; position: absolute; left: 75px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--work-green); box-shadow: 0 0 0 3px #e6f0eb; }
.work-progress-item time { color: var(--work-gold); font: 700 11px/1.5 sans-serif; }
.work-progress-item div { padding-left: 16px; min-width: 0; }
.work-progress-item strong { font-size: 13px; }
.work-progress-item p { margin: 5px 0; color: var(--work-muted); font-size: 12px; line-height: 1.55; }
.work-progress-item small { color: var(--work-green); }
.work-progress-custom-values { display: grid; gap: 5px; margin: 10px 0 0; }
.work-progress-custom-values > div { display: grid; grid-template-columns: minmax(68px, auto) 1fr; gap: 8px; padding-left: 0; }
.work-progress-custom-values dt { color: var(--work-gold); font-size: 11px; font-weight: 800; }
.work-progress-custom-values dd { margin: 0; color: var(--work-ink); font-size: 11px; overflow-wrap: anywhere; }

.work-links { margin-top: 4px; padding-top: 15px; border-top: 1px solid #e1e7e3; }
.work-links > header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.work-links form { display: grid; gap: 7px; }
.work-link-list { display: grid; gap: 6px; margin-top: 10px; }
.work-link-list span { display: flex; gap: 8px; padding: 7px 9px; border-radius: 4px; background: #f2f6f4; font-size: 12px; }
.work-link-list b { color: var(--work-green); }
.work-empty { min-height: 160px; display: grid; place-content: center; gap: 6px; padding: 24px; text-align: center; color: var(--work-muted); }
.work-empty strong { color: var(--work-ink); }
.work-empty span { font-size: 12px; }

@media (max-width: 1120px) {
  .work-shell { grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); }
  .work-column__scroll, .work-project-list { height: auto; max-height: 620px; }
  .work-overview-metrics, .work-overview-brief dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .work-shell, .work-overview-shell { display: flex; flex-direction: column; min-height: 0; }
  .work-column { overflow: visible; }
  .work-column__scroll, .work-project-list { max-height: 520px; }
  .work-form-grid { grid-template-columns: 1fr; }
  .work-custom-field-row, .work-custom-field-create { grid-template-columns: 1fr; }
  .work-custom-field-remove { justify-self: end; }
  .work-overview-metrics, .work-overview-brief dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-overview-brief > header { align-items: center; }
  .work-progress-item { grid-template-columns: 66px 1fr; }
  .work-progress-item::before { left: 71px; }
  .work-progress-item::after { left: 67px; }
}

@media (max-width: 760px) {
  .work-progress-layout { grid-template-columns: 1fr; }
  .work-progress-editor-pane, .work-progress-display-pane { max-height: 560px; }
  .work-progress-custom-fields .work-custom-field-row,
  .work-progress-custom-fields .work-custom-field-create { grid-template-columns: 1fr; }
  .work-progress-custom-fields .work-custom-field-remove,
  .work-progress-add-field { grid-column: 1; justify-self: end; }
  .work-progress-actions { align-items: stretch; flex-direction: column; }
  .work-progress-actions > span { text-align: center; }
  .work-progress-submit { width: 100%; }
}

/* Delete controls for progress entries, links and attachments. */
.work-progress-item .work-child-delete { position: absolute; top: 0; right: 0; }
.work-progress-item div { padding-right: 30px; }
.work-link-list span, .work-attachment-list span { align-items: center; }
.work-link-list .work-child-delete { margin-left: auto; }
.work-child-delete { inline-size: 24px; block-size: 24px; min-inline-size: 24px; font-size: 16px; color: #9a5b4c; border-color: rgba(154,91,76,.3); opacity: .75; }
.work-child-delete:hover, .work-child-delete:focus-visible { opacity: 1; background: #fbf1ee; }
.work-attachment-list a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* 项目状态切换：进行中 / 已完成 / 已归档 */
.work-status-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.work-status-chip { border: 1px solid rgb(45 85 68 / 22%); background: transparent; color: inherit; border-radius: 999px; padding: 3px 12px; font-size: .82rem; cursor: pointer; }
.work-status-chip.is-active { background: rgb(45 85 68 / 12%); border-color: rgb(45 85 68 / 45%); font-weight: 600; }
.work-status-chip:focus-visible { outline: 2px solid rgb(45 85 68 / 60%); outline-offset: 2px; }


/* source: styles/reminders-v2.css */
[data-reminders-v2] {
  --reminder-red: #b42318;
  --reminder-amber: #a15c00;
  --reminder-green: #18794e;
  --reminder-blue: #245ea8;
  align-content: start;
  row-gap: 0;
  color: var(--cc-ink, #1f2925);
}

[data-reminders-v2] > .panel {
  min-width: 0;
  padding: 18px 0 20px;
  border: 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-reminders-v2] > .panel:first-child {
  padding-top: 0;
}

[data-reminders-v2] > .panel:last-child {
  border-bottom: 0;
}

[data-reminders-v2] .reminder-v2-overview,
[data-reminders-v2] .reminder-v2-queue-panel {
  align-self: start;
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-overview-head,
[data-reminders-v2] .reminder-v2-queue-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

[data-reminders-v2] .reminder-v2-overview-head h3,
[data-reminders-v2] .reminder-v2-queue-head h3 {
  margin: 0 0 3px;
}

[data-reminders-v2] .reminder-v2-overview-head p,
[data-reminders-v2] .reminder-v2-queue-head p {
  max-width: 68ch;
  margin: 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-overview-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

[data-reminders-v2] .reminder-v2-jumps {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  overflow: hidden;
}

[data-reminders-v2] .reminder-v2-jump {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 0;
  background: var(--cc-surface, #fff);
  white-space: nowrap;
}

[data-reminders-v2] .reminder-v2-jump:last-child {
  border-right: 0;
}

[data-reminders-v2] .reminder-v2-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 14px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

[data-reminders-v2] .reminder-v2-kpis .kpi {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-reminders-v2] .reminder-v2-kpis .kpi:last-child {
  border-right: 0;
}

[data-reminders-v2] .reminder-v2-kpis .kpi span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  white-space: nowrap;
}

[data-reminders-v2] .reminder-v2-kpis .kpi strong {
  font-size: 18px;
  line-height: 1.1;
}

[data-reminders-v2] .reminder-v2-search {
  display: grid;
  gap: 5px;
  margin: 0 0 14px;
}

[data-reminders-v2] .reminder-v2-search-label {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

[data-reminders-v2] .reminder-v2-search label,
[data-reminders-v2] .reminder-v2-search-label span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  font-weight: 700;
}

[data-reminders-v2] .reminder-v2-search-label span {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

[data-reminders-v2] .reminder-v2-search > div {
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}

[data-reminders-v2] .reminder-v2-search input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  background: var(--cc-surface, #fff);
  color: var(--cc-ink, #1f2925);
  font: inherit;
}

[data-reminders-v2] .reminder-v2-notification-setting {
  display: grid;
  min-width: 0;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
  padding: 9px 10px;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

[data-reminders-v2] .reminder-v2-notification-setting label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cc-ink, #1f2925);
  font-size: 12px;
  font-weight: 700;
}

[data-reminders-v2] .reminder-v2-notification-setting input {
  width: 18px;
  height: 18px;
  margin: 0;
}

[data-reminders-v2] .reminder-v2-notification-setting small {
  min-width: 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-feedback {
  display: flex;
  min-height: 40px;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 11px;
  border-left: 3px solid var(--reminder-green);
  background: color-mix(in srgb, var(--reminder-green) 8%, transparent);
  color: var(--cc-ink, #1f2925);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-feedback.error {
  border-left-color: var(--reminder-red);
  background: color-mix(in srgb, var(--reminder-red) 8%, transparent);
}

[data-reminders-v2] .reminder-v2-focus-queues {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

[data-reminders-v2] .reminder-v2-preview {
  min-width: 0;
  padding: 10px 0;
}

[data-reminders-v2] .reminder-v2-preview + .reminder-v2-preview {
  padding-top: 10px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

[data-reminders-v2] .reminder-v2-section-title {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--cc-ink, #1f2925);
  font-size: 12px;
}

[data-reminders-v2] .reminder-v2-section-title span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

[data-reminders-v2] .reminder-v2-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 16px 12px;
}

[data-reminders-v2] .reminder-v2-form .reminder-v2-section-title {
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-form .reminder-v2-section-title > * {
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-form > .reminder-v2-section-title,
[data-reminders-v2] .reminder-v2-form > .reminder-v2-form-row,
[data-reminders-v2] .reminder-v2-form > .hud-button {
  flex: 0 0 100%;
}

[data-reminders-v2] .reminder-v2-form > #reminderSubmit {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  white-space: normal;
}

[data-reminders-v2] .reminder-v2-form > .field {
  flex: 0 1 calc(50% - 5px);
  box-sizing: border-box;
  width: calc(50% - 5px);
  min-width: 220px;
  min-height: 64px;
  overflow: auto;
}

/* This stylesheet is loaded before the shared field-grid layers. Keep the
   reminder editor's bounded scroll and inner spacing authoritative. */
body.owner-shell-v1 #moduleStage [data-reminders-v2] [data-reminder-editor-card] .reminder-v2-form {
  box-sizing: border-box;
  width: 100%;
  max-height: min(64vh, 640px) !important;
  padding: 16px 12px 18px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  grid-auto-rows: max-content !important;
  align-content: start;
}

[data-reminders-v2] .reminder-v2-form > .field > input,
[data-reminders-v2] .reminder-v2-form > .field > textarea {
  box-sizing: border-box;
  height: auto;
  resize: none !important;
}

[data-reminders-v2] .reminder-v2-form-row {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  align-items: start;
  gap: 8px;
}

[data-reminders-v2] .reminder-v2-form-row > .field,
[data-reminders-v2] .reminder-v2-form-row > .reminder-v2-repeat-control {
  flex: 1 1 220px;
  min-width: 220px;
}

[data-reminders-v2] .reminder-v2-repeat-control {
  display: grid;
  min-width: 0;
  gap: 7px;
}

[data-reminders-v2] .reminder-v2-repeat-detail[hidden] {
  display: none;
}

[data-reminders-v2] .reminder-v2-repeat-summary {
  min-height: 18px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.45;
}

[data-reminders-v2] .reminder-v2-form input:not([type="checkbox"]):not([type="radio"]),
[data-reminders-v2] .reminder-v2-form select,
[data-reminders-v2] .reminder-v2-form textarea {
  min-width: 0;
  width: 100%;
}

[data-reminders-v2] .reminder-v2-create-disclosure {
  margin-top: 16px;
  margin-bottom: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

[data-reminders-v2] .reminder-v2-card-head > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-create-disclosure > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
  color: var(--cc-ink, #1f2925);
  cursor: pointer;
  list-style: none;
}

[data-reminders-v2] .reminder-v2-create-disclosure > summary::-webkit-details-marker {
  display: none;
}

[data-reminders-v2] .reminder-v2-create-disclosure > summary span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-create-disclosure > summary small,
[data-reminders-v2] .reminder-v2-create-disclosure > summary span:last-child {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

[data-reminders-v2] .reminder-v2-count {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
  color: var(--cc-ink, #1f2925);
  font-variant-numeric: tabular-nums;
}

[data-reminders-v2] .reminder-v2-list {
  min-width: 0;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

[data-reminders-v2] [data-reminder-queue] .reminder-v2-list {
  min-height: 72px;
}

@media (max-width: 700px) {
  [data-reminders-v2] .reminder-v2-list {
    max-height: 60vh;
  }
}

[data-reminders-v2] .reminder-v2-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  margin: 0;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 0;
  background: transparent;
}

[data-reminders-v2] .reminder-v2-row:hover {
  background: color-mix(in srgb, var(--cc-surface-muted, #f8faf9) 78%, transparent);
}

[data-reminders-v2] .reminder-v2-row:last-child {
  border-bottom: 0;
}

[data-reminders-v2] .reminder-v2-duplicate-group {
  min-width: 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

[data-reminders-v2] .reminder-v2-duplicate-group > summary {
  display: grid;
  min-width: 0;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 2px;
  cursor: pointer;
  list-style: none;
}

[data-reminders-v2] .reminder-v2-duplicate-group > summary::-webkit-details-marker {
  display: none;
}

[data-reminders-v2] .reminder-v2-duplicate-group[open] > summary {
  background: var(--cc-surface-muted, #f8faf9);
}

[data-reminders-v2] .reminder-v2-group-description {
  display: block;
  margin-top: 4px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-group-toggle {
  min-width: 64px;
  color: var(--cc-accent-strong, #0f573f);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

[data-reminders-v2] .reminder-v2-duplicate-items {
  min-width: 0;
  padding: 0 10px 8px 18px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
  background: color-mix(in srgb, var(--cc-surface-muted, #f8faf9) 72%, transparent);
}

[data-reminders-v2] .reminder-v2-duplicate-note {
  padding: 8px 2px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-priority {
  display: block;
  width: 4px;
  height: 28px;
  border-radius: 2px;
  background: var(--reminder-blue);
}

[data-reminders-v2] .priority-urgent > .reminder-v2-priority,
[data-reminders-v2] .priority-high > .reminder-v2-priority,
[data-reminders-v2] .reminder-v2-priority.priority-urgent,
[data-reminders-v2] .reminder-v2-priority.priority-high {
  background: var(--reminder-red);
}

[data-reminders-v2] .priority-medium > .reminder-v2-priority,
[data-reminders-v2] .reminder-v2-priority.priority-medium {
  background: var(--reminder-amber);
}

[data-reminders-v2] .priority-low > .reminder-v2-priority,
[data-reminders-v2] .reminder-v2-priority.priority-low {
  background: var(--reminder-green);
}

[data-reminders-v2] .reminder-v2-copy {
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

[data-reminders-v2] .reminder-v2-title-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-title-line .tag {
  flex: 0 0 auto;
}

[data-reminders-v2] .reminder-v2-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px 12px;
  margin-top: 4px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.45;
}

[data-reminders-v2] .reminder-v2-meta span {
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-copy p {
  margin: 4px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-items: center;
  gap: 6px;
}

[data-reminders-v2] .reminder-v2-actions button,
[data-reminders-v2] .reminder-v2-more summary,
[data-reminders-v2] .reminder-v2-snooze > summary {
  min-height: 40px;
}

[data-reminders-v2] .reminder-v2-complete {
  border-color: color-mix(in srgb, var(--reminder-green) 45%, var(--cc-line, #d9e0dc));
  color: var(--reminder-green);
  font-weight: 700;
}

[data-reminders-v2] .reminder-v2-delete {
  border-color: color-mix(in srgb, var(--reminder-red) 52%, var(--cc-line, #d9e0dc));
  color: var(--reminder-red);
}

[data-reminders-v2] .reminder-v2-done-actions {
  grid-template-columns: repeat(2, max-content);
}

[data-reminders-v2] .reminder-v2-more {
  position: relative;
}

[data-reminders-v2] .reminder-v2-snooze {
  position: relative;
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-more summary,
[data-reminders-v2] .reminder-v2-snooze > summary {
  display: grid;
  min-width: 48px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #fff);
  color: var(--cc-ink-soft, #52605a);
  cursor: pointer;
  font-size: 12px;
  list-style: none;
  white-space: nowrap;
}

[data-reminders-v2] .reminder-v2-more summary::-webkit-details-marker {
  display: none;
}

[data-reminders-v2] .reminder-v2-snooze > summary::-webkit-details-marker {
  display: none;
}

[data-reminders-v2] .reminder-v2-more summary:focus-visible,
[data-reminders-v2] .reminder-v2-actions button:focus-visible,
[data-reminders-v2] .reminder-v2-jump:focus-visible {
  outline: 2px solid var(--cc-accent, #176b50);
  outline-offset: 2px;
}

[data-reminders-v2] .reminder-v2-more-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  width: min(320px, calc(100vw - 40px));
  min-width: 0;
  gap: 6px;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #fff);
  box-shadow: var(--cc-shadow-float, 0 8px 24px rgb(20 35 28 / 14%));
}

[data-reminders-v2] .reminder-v2-snooze-menu {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  width: min(260px, calc(100vw - 40px));
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #fff);
  box-shadow: var(--cc-shadow-float, 0 8px 24px rgb(20 35 28 / 14%));
}

[data-reminders-v2] .reminder-v2-snooze-menu .mini-action,
[data-reminders-v2] .reminder-v2-snooze-custom,
[data-reminders-v2] .reminder-v2-snooze-custom input {
  width: 100%;
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-snooze-custom {
  display: grid;
  gap: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
}

[data-reminders-v2] .reminder-v2-snooze-custom input {
  min-height: 36px;
  padding: 5px 7px;
  box-sizing: border-box;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  background: var(--cc-surface, #fff);
  color: var(--cc-ink, #1f2925);
  font: inherit;
}

[data-reminders-v2] .reminder-v2-more-menu > *,
[data-reminders-v2] .reminder-v2-more-menu .mini-action {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

[data-reminders-v2] .reminder-v2-more[open] > summary,
[data-reminders-v2] .reminder-v2-edit[open] > summary,
[data-reminders-v2] .reminder-v2-snooze[open] > summary {
  border-color: var(--cc-accent, #176b50);
  background: var(--cc-accent-soft, #e8f4ee);
  color: var(--cc-accent-strong, #0f573f);
}

[data-reminders-v2] .reminder-v2-more-menu small {
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-edit {
  min-width: 0;
}

[data-reminders-v2] .reminder-v2-edit > summary {
  list-style: none;
  cursor: pointer;
}

[data-reminders-v2] .reminder-v2-edit > summary::-webkit-details-marker {
  display: none;
}

[data-reminders-v2] .reminder-v2-edit-fields {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

[data-reminders-v2] .reminder-v2-edit-fields label {
  display: grid;
  gap: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
}

[data-reminders-v2] .reminder-v2-edit-fields input,
[data-reminders-v2] .reminder-v2-edit-fields select,
[data-reminders-v2] .reminder-v2-edit-fields textarea {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  background: var(--cc-surface, #fff);
  color: var(--cc-ink, #1f2925);
  font: inherit;
}

[data-reminders-v2] .reminder-v2-edit-fields textarea {
  resize: vertical;
}

[data-reminders-v2] .reminder-v2-history {
  margin-top: 7px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

[data-reminders-v2] .reminder-v2-history > summary {
  width: fit-content;
  min-height: 28px;
  color: var(--cc-accent-strong, #0f573f);
  cursor: pointer;
  font-weight: 700;
}

[data-reminders-v2] .reminder-v2-history ol {
  display: grid;
  gap: 5px;
  margin: 5px 0 0;
  padding: 7px 10px 7px 26px;
  border-left: 2px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

[data-reminders-v2] .reminder-v2-history li {
  padding-left: 2px;
}

[data-reminders-v2] .reminder-v2-history li strong,
[data-reminders-v2] .reminder-v2-history li span {
  display: block;
  overflow-wrap: anywhere;
}

[data-reminders-v2] .reminder-v2-history li strong {
  color: var(--cc-ink, #1f2925);
}

[data-reminders-v2] .reminder-v2-empty {
  display: grid;
  min-height: 48px;
  align-content: center;
  gap: 3px;
  padding: 12px 2px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.5;
}

[data-reminders-v2] .reminder-v2-empty strong {
  color: var(--cc-ink, #1f2925);
  font-size: 13px;
}

@media (min-width: 981px) {
  [data-reminders-v2] .reminder-v2-more-menu {
    top: calc(100% + 4px);
    bottom: auto;
  }

  [data-reminders-v2] [data-reminder-editor-card] .reminder-v2-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  [data-reminders-v2] .reminder-v2-form > .reminder-v2-section-title,
  [data-reminders-v2] .reminder-v2-form > #reminderSubmit {
    grid-column: 1 / -1;
  }

  [data-reminders-v2] .reminder-v2-form > .reminder-v2-form-row {
    grid-column: 1;
  }

  [data-reminders-v2] .reminder-v2-form > label:has(#reminderDescription) {
    grid-column: 2;
  }

  [data-reminders-v2] #reminderDescription {
    min-height: 76px;
    height: 100%;
  }
}

@media (max-width: 980px) {
  [data-reminders-v2] .reminder-v2-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-reminders-v2] .reminder-v2-form {
    padding-top: 14px;
  }
}

@media (max-width: 760px) {
  body:has([data-reminders-v2]) .module-tabs-nav .cc-shell-tool-icon {
    display: none;
  }

  body:has([data-reminders-v2]) #moduleTabsPrev::before,
  body:has([data-reminders-v2]) #moduleTabsNext::before {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
  }

  body:has([data-reminders-v2]) #moduleTabsPrev::before {
    content: "<";
  }

  body:has([data-reminders-v2]) #moduleTabsNext::before {
    content: ">";
  }

  body:has([data-reminders-v2]) #moduleTabs [data-module-key="reminders"] {
    padding-inline: 4px;
    font-size: 12px;
    white-space: nowrap;
  }

  [data-reminders-v2] {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  [data-reminders-v2] > .panel {
    width: 100%;
    min-height: 0;
    grid-column: 1 / -1;
    padding: 15px 14px 18px;
  }

  [data-reminders-v2] .reminder-v2-search-controls {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  [data-reminders-v2] .reminder-v2-notification-setting {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  [data-reminders-v2] .reminder-v2-notification-setting small {
    grid-column: 1 / -1;
  }

  [data-reminders-v2] .reminder-v2-overview-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-reminders-v2] .reminder-v2-queue-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  [data-reminders-v2] .reminder-v2-overview-head .reminder-v2-jumps {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  [data-reminders-v2] .reminder-v2-overview-head .reminder-v2-jumps > a {
    grid-column: 1 / -1;
    min-height: 40px;
  }

  [data-reminders-v2] .reminder-v2-jump {
    min-width: 0;
    width: 100%;
    min-height: 38px;
    padding-inline: 4px;
    font-size: 11px;
  }

  [data-reminders-v2] .reminder-v2-kpis {
    display: none;
  }

  [data-reminders-v2] .reminder-v2-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-reminders-v2] .reminder-v2-form > .field {
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
  }

  [data-reminders-v2] .reminder-v2-row {
    grid-template-columns: 4px minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
    padding: 12px 0;
  }

  [data-reminders-v2] .reminder-v2-duplicate-group > summary {
    grid-template-columns: 4px minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
    padding: 12px 0;
  }

  [data-reminders-v2] .reminder-v2-group-toggle {
    grid-column: 2;
    text-align: left;
  }

  [data-reminders-v2] .reminder-v2-duplicate-items {
    padding-right: 0;
    padding-left: 10px;
  }

  [data-reminders-v2] .reminder-v2-priority {
    grid-row: 1 / span 2;
    height: 32px;
    margin-top: 2px;
  }

  [data-reminders-v2] .reminder-v2-actions {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  [data-reminders-v2] .reminder-v2-actions > button,
  [data-reminders-v2] .reminder-v2-snooze,
  [data-reminders-v2] .reminder-v2-snooze > summary,
  [data-reminders-v2] .reminder-v2-more,
  [data-reminders-v2] .reminder-v2-more summary {
    min-width: 0;
    width: 100%;
  }

  [data-reminders-v2] .reminder-v2-more {
    grid-column: 1 / -1;
  }

  [data-reminders-v2] .reminder-v2-snooze-menu {
    position: fixed;
    z-index: 40;
    top: auto;
    right: 12px;
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
    max-height: calc(100vh - 176px - env(safe-area-inset-bottom, 0px));
    padding: 12px;
    overflow-y: auto;
  }

  [data-reminders-v2] .reminder-v2-more-menu {
    position: fixed;
    z-index: 40;
    top: auto;
    right: 12px;
    bottom: calc(112px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    width: auto;
    max-height: calc(100vh - 176px - env(safe-area-inset-bottom, 0px));
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  [data-reminders-v2] .reminder-v2-more[open]::before {
    position: fixed;
    z-index: 39;
    inset: 0 0 calc(104px + env(safe-area-inset-bottom, 0px));
    background: rgb(17 35 28 / 34%);
    content: "";
  }

  [data-reminders-v2] .reminder-v2-row:has(.reminder-v2-more[open]) > .reminder-v2-actions > button,
  [data-reminders-v2] .reminder-v2-row:has(.reminder-v2-more[open]) > .reminder-v2-actions > .reminder-v2-more > summary {
    visibility: hidden;
  }

  [data-reminders-v2] .reminder-v2-title-line {
    align-items: flex-start;
  }

  [data-reminders-v2] .reminder-v2-meta {
    display: grid;
    gap: 2px;
  }
}

/* Formal reminder workbench: queue on the left, creation and local controls on the right. */
@media (min-width: 1181px) {
  body.owner-shell-v1 [data-reminders-v2].reminders-v2 {
    gap: 18px;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-overview {
    position: relative;
    display: grid;
    min-height: 520px;
    grid-template-columns: minmax(0, 1.15fr) minmax(400px, 0.85fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 0 24px;
    padding: 20px 22px 24px;
    isolation: isolate;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-overview > * {
    position: relative;
    z-index: 1;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-overview-head {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    gap: 13px;
    margin: 0;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--cc-line, #d9e0dc);
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-overview-head h3 {
    margin-bottom: 5px;
    font-size: 18px;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-jumps {
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    border-radius: 5px;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-search {
    grid-column: 1;
    grid-row: 2;
    margin: 17px 0 0;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-kpis {
    grid-column: 1;
    grid-row: 3;
    margin: 17px 0 0;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-feedback {
    grid-column: 1;
    grid-row: 4;
    margin: 14px 0 0;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-focus-queues {
    grid-column: 1;
    grid-row: 5;
    margin-top: 16px;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-search-results {
    padding-top: 2px;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-notification-setting {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin: 0;
    padding: 1px 0 18px 18px;
    border: 0;
    border-left: 1px solid var(--cc-line, #d9e0dc);
    background: transparent;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-notification-setting > * {
    min-width: 0;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-notification-setting button {
    justify-self: start;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure {
    grid-column: 2;
    grid-row: 2 / span 4;
    align-self: start;
    /* The queue is a later grid sibling; keep the open editor above it so its save action remains clickable after scroll. */
    z-index: 2;
    margin: 0;
    padding: 0 0 0 18px;
    border-top: 0;
    border-left: 1px solid var(--cc-line, #d9e0dc);
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure > summary {
    min-height: 54px;
    padding: 0 12px;
    border-radius: 5px;
  }

  body.owner-shell-v1 [data-reminders-v2] [data-reminder-editor-card] .reminder-v2-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 12px;
    padding: 16px 12px 18px;
    max-height: min(64vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-form > .reminder-v2-section-title,
  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-form > #reminderSubmit,
  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-form > label:has(#reminderDescription) {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
  }

  body.owner-shell-v1 [data-reminders-v2] #reminderDescription {
    min-height: 82px;
    height: auto;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-queue-panel {
    padding: 20px 22px 24px;
  }

  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-queue-panel .reminder-v2-queue-head {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cc-line, #d9e0dc);
  }
}

/* Shared reminder workbench: one editor is reused by overview, today and future. */
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-workbench {
  padding: 0;
  border: 0;
}

[data-reminders-v2] .reminder-v2-workbench-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.35fr);
  align-items: start;
  gap: 18px;
  min-width: 0;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card,
[data-reminders-v2] .reminder-v2-list-card {
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 6px;
  background: color-mix(in srgb, var(--cc-surface, #fff) 94%, transparent);
  box-shadow: 0 10px 28px rgb(25 48 39 / 7%);
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card {
  position: sticky;
  top: 12px;
  z-index: 1;
  /* Beat the legacy reminder grid placement rules that span the editor across both columns. */
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: flex;
  max-height: calc(100vh - 210px);
  flex-direction: column;
  align-self: start;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

[data-reminders-v2] .reminder-v2-list-card {
  padding: 18px;
  grid-column: 2 !important;
  grid-row: 1 !important;
}

[data-reminders-v2] .reminder-v2-card-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

[data-reminders-v2] .reminder-v2-card-head h3,
[data-reminders-v2] .reminder-v2-card-head p {
  margin: 0;
}

[data-reminders-v2] .reminder-v2-card-head p {
  margin-top: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.45;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card .reminder-v2-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 12px;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card .reminder-v2-form > *,
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card .reminder-v2-form-row,
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card .reminder-v2-form > label:has(#reminderDescription) {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

/* Resizable fields and their parent share twelve tracks. Full-width defaults
   preserve the editor stack while a user span cannot create implicit columns. */
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card :is(.reminder-v2-form, .reminder-v2-form-row, .reminder-v2-repeat-control) > .field {
  grid-column: span var(--form-field-grid-span, 12) !important;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form input:is([type="checkbox"], [type="radio"]) {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  flex: 0 0 18px;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card .reminder-v2-form-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

[data-reminders-v2] .reminder-v2-workbench-view {
  display: none;
  min-width: 0;
}

#moduleStage[data-active-module-tab="0"] [data-reminder-workbench-view="overview"],
#moduleStage[data-active-module-tab="1"] [data-reminder-workbench-view="today"],
#moduleStage[data-active-module-tab="2"] [data-reminder-workbench-view="future"] {
  display: block;
}

[data-reminders-v2] .reminder-v2-workbench-view > .reminder-v2-list {
  max-height: calc(100vh - 286px);
}

[data-reminders-v2] .reminder-v2-edit-target {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

[data-reminders-v2] .reminder-v2-edit-target:hover strong,
[data-reminders-v2] .reminder-v2-edit-target:focus-visible strong {
  color: var(--cc-accent-strong, #0f573f);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* This direct-child selector intentionally outranks the later generic form-grid sheet. */
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-workbench-grid > .reminder-v2-editor-card {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: auto !important;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-workbench-grid > .reminder-v2-list-card {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: auto !important;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] [data-module-canvas-grid-source="reminders-workbench"].module-canvas-grid > .module-canvas-widget > [data-module-canvas-block] {
  position: relative;
  top: auto;
  align-self: stretch;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

/* The canvas toolbar is a sibling of the nested workbench grid. Keep it on
 * its own full row instead of letting the outer twelve-column grid shrink it. */
body.owner-shell-v1 #moduleStage [data-reminders-v2].overview-grid > .module-canvas-toolbar {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0;
}

@media (max-width: 760px) {
  [data-reminders-v2] .reminder-v2-workbench-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-workbench-grid > .reminder-v2-editor-card,
  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-workbench-grid > .reminder-v2-list-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card {
    position: static;
    max-height: none;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-editor-card .reminder-v2-form {
    max-height: min(58vh, 540px);
  }

  [data-reminders-v2] .reminder-v2-list-card {
    padding: 14px;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  [data-reminders-v2] .reminder-v2-workbench-view > .reminder-v2-list {
    max-height: 58vh;
  }
}


/* source: styles/knowledge-v2.css */
.panel.knowledge-v2 {
  padding: 0;
  overflow: hidden;
}

.panel.knowledge-v2__overview-panel {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.knowledge-v2,
.knowledge-v2 * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.knowledge-v2 {
  min-width: 0;
  color: var(--cc-ink, #17211d);
}

.knowledge-v2 [data-lucide] {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.knowledge-v2 button,
.knowledge-v2 input,
.knowledge-v2 select,
.knowledge-v2 textarea {
  max-width: 100%;
  font: inherit;
  letter-spacing: 0;
}

.knowledge-v2 button:focus-visible,
.knowledge-v2 input:focus-visible,
.knowledge-v2 select:focus-visible,
.knowledge-v2 textarea:focus-visible,
.knowledge-v2 summary:focus-visible,
.knowledge-v2 a:focus-visible {
  outline: 2px solid var(--cc-blue, #286f91);
  outline-offset: 2px;
}

.knowledge-v2__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__overview-panel > :is(.knowledge-v2__summary, .knowledge-v2__command-bar, .knowledge-v2__atlas, .knowledge-v2__workspace) {
  border-right: 1px solid var(--cc-line, #d9e0dc);
  border-left: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #ffffff);
}

.knowledge-v2__overview-panel > .knowledge-v2__summary {
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__overview-panel > .knowledge-v2__workspace {
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__command-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: #f4f5f6 !important;
}

.knowledge-v2__command-context,
.knowledge-v2__command-context > span,
.knowledge-v2__command-actions {
  display: flex;
  min-width: 0;
  align-items: center;
}

.knowledge-v2__command-context {
  gap: 9px;
}

.knowledge-v2__command-context > [data-lucide] {
  width: 28px;
  height: 28px;
  padding: 6px;
  border: 1px solid var(--cc-line-strong, #bec9c3);
  border-radius: 5px;
  background: #fff;
  color: var(--cc-blue, #286f91);
}

.knowledge-v2__command-context > span {
  align-items: flex-start;
  flex-direction: column;
  gap: 1px;
}

.knowledge-v2__command-context strong {
  font-size: 13px;
}

.knowledge-v2__command-context small {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
}

.knowledge-v2__command-actions {
  flex: 0 0 auto;
  gap: 7px;
}

.knowledge-v2__command-actions .mini-action {
  min-height: 34px;
  gap: 5px;
}

.knowledge-v2__command-actions .is-primary {
  border-color: var(--cc-accent-strong, #0f573f);
  background: var(--cc-accent, #176b50);
  color: #fff;
}

.knowledge-v2__metric {
  display: grid;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  padding: 12px 15px;
  border-right: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__metric:last-child {
  border-right: 0;
}

.knowledge-v2__metric span,
.knowledge-v2__section-head span {
  display: block;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 12px;
}

.knowledge-v2__metric > [data-lucide] {
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  padding: 6px;
  border: 1px solid var(--cc-line-strong, #bec9c3);
  border-radius: 5px;
  background: var(--cc-surface, #ffffff);
  color: var(--cc-accent-strong, #0f573f);
}

.knowledge-v2__metric[data-tone="legacy"] > [data-lucide] {
  color: var(--cc-blue, #286f91);
}

.knowledge-v2__metric[data-tone="document"] > [data-lucide] {
  color: var(--cc-warning, #9a650b);
}

.knowledge-v2__metric[data-tone="important"] > [data-lucide] {
  color: var(--cc-danger, #a33a3a);
}

.knowledge-v2__metric strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--cc-accent-strong, #0f573f);
  font-size: 19px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__atlas {
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #ffffff);
}

.knowledge-v2__atlas-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  cursor: pointer;
  list-style: none;
}

.knowledge-v2__atlas-head::-webkit-details-marker {
  display: none;
}

.knowledge-v2__atlas-head > div {
  min-width: 0;
}

.knowledge-v2__atlas-head span {
  display: block;
  color: var(--cc-blue, #286f91);
  font-size: 9px;
  font-weight: 800;
}

.knowledge-v2__atlas-head h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.knowledge-v2__atlas-head p {
  margin: 0;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  text-align: right;
}

.knowledge-v2__atlas-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.knowledge-v2__atlas-toggle {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  color: var(--cc-blue, #286f91);
  font-size: 10px;
  white-space: nowrap;
}

.knowledge-v2__atlas-toggle [data-lucide] {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.knowledge-v2__atlas[open] .knowledge-v2__atlas-toggle [data-lucide] {
  transform: rotate(180deg);
}

.knowledge-v2__atlas-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.9fr) minmax(260px, 1fr);
}

.knowledge-v2__atlas:not([open]) > .knowledge-v2__atlas-grid {
  display: none;
}

.knowledge-v2__atlas-grid > section {
  min-width: 0;
  padding: 13px 14px 14px;
}

.knowledge-v2__atlas-grid > section + section {
  border-left: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__cadence {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1.3fr) minmax(300px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
  background: #f8faf9;
}

.knowledge-v2__cadence-head {
  display: grid;
  gap: 2px;
}

.knowledge-v2__cadence-head strong {
  font-size: 12px;
}

.knowledge-v2__cadence-head span {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 10px;
}

.knowledge-v2__cadence-track {
  display: flex;
  height: 7px;
  gap: 2px;
  overflow: hidden;
  background: var(--cc-surface-strong, #edf2ef);
}

.knowledge-v2__cadence-track i[data-tone="fresh"],
.knowledge-v2__cadence-legend span[data-tone="fresh"] > i {
  background: var(--cc-accent, #176b50);
}

.knowledge-v2__cadence-track i[data-tone="warm"],
.knowledge-v2__cadence-legend span[data-tone="warm"] > i {
  background: var(--cc-blue, #286f91);
}

.knowledge-v2__cadence-track i[data-tone="stable"],
.knowledge-v2__cadence-legend span[data-tone="stable"] > i {
  background: var(--cc-warning, #9a650b);
}

.knowledge-v2__cadence-legend {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.knowledge-v2__cadence-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
  white-space: nowrap;
}

.knowledge-v2__cadence-legend > span > i {
  width: 7px;
  height: 7px;
}

.knowledge-v2__cadence-legend strong {
  color: var(--cc-ink, #17211d);
  font-variant-numeric: tabular-nums;
}

.knowledge-v2__atlas-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.knowledge-v2__atlas-label strong {
  font-size: 12px;
}

.knowledge-v2__atlas-label span,
.knowledge-v2__atlas-empty {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 10px;
}

.knowledge-v2__atlas-empty {
  margin: 14px 0;
}

.knowledge-v2__distribution-list,
.knowledge-v2__focus-list {
  display: grid;
  gap: 7px;
}

.knowledge-v2__distribution-row {
  display: grid;
  min-width: 0;
  width: 100%;
  grid-template-columns: minmax(82px, 0.74fr) minmax(80px, 1fr) 24px;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 10px;
  text-align: left;
}

.knowledge-v2__distribution-row:not(:disabled) {
  cursor: pointer;
}

.knowledge-v2__distribution-row:not(:disabled):hover > span,
.knowledge-v2__distribution-row:not(:disabled):focus-visible > span {
  color: var(--cc-blue, #286f91);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.knowledge-v2__distribution-row:disabled {
  opacity: 1;
}

.knowledge-v2__distribution-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__distribution-row > div,
.knowledge-v2__coverage-row > div {
  height: 5px;
  overflow: hidden;
  background: var(--cc-surface-strong, #edf2ef);
}

.knowledge-v2__distribution-row > div > i,
.knowledge-v2__coverage-row > div > i {
  display: block;
  height: 100%;
  background: var(--cc-blue, #286f91);
}

.knowledge-v2__distribution-row > strong,
.knowledge-v2__coverage-row > b {
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
  text-align: right;
}

.knowledge-v2__coverage {
  display: grid;
  align-content: start;
  gap: 9px;
}

.knowledge-v2__coverage .knowledge-v2__atlas-label {
  margin-bottom: 0;
}

.knowledge-v2__coverage-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 22px minmax(82px, auto) minmax(70px, 1fr) 34px;
  align-items: center;
  gap: 7px;
}

.knowledge-v2__coverage-row > [data-lucide] {
  width: 20px;
  height: 20px;
  padding: 4px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  color: var(--cc-accent-strong, #0f573f);
}

.knowledge-v2__coverage-row > span {
  display: grid;
  gap: 1px;
}

.knowledge-v2__coverage-row > span strong,
.knowledge-v2__focus-row strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__coverage-row > span small,
.knowledge-v2__focus-row small {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 9px;
}

.knowledge-v2__focus-row {
  display: grid;
  min-width: 0;
  width: 100%;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--cc-line, #d9e0dc);
  border-top: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.knowledge-v2__focus-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.knowledge-v2__focus-row > [data-lucide] {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 4px;
  background: var(--cc-warning-soft, #fff8e7);
  color: var(--cc-warning, #9a650b);
}

.knowledge-v2__focus-row > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.knowledge-v2__focus-row:hover strong,
.knowledge-v2__focus-row:focus-visible strong {
  color: var(--cc-blue, #286f91);
}

.knowledge-v2__focus-row:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--cc-blue, #286f91) 55%, transparent);
  outline-offset: 3px;
}

.knowledge-v2__focus-open {
  width: 15px;
  height: 15px;
  color: var(--cc-blue, #286f91);
  opacity: 0.7;
}

.knowledge-v2__record.is-targeted {
  animation: knowledge-target-pulse 900ms ease-out;
}

@keyframes knowledge-target-pulse {
  0% { box-shadow: inset 4px 0 0 var(--cc-warning, #9a650b), 0 0 0 3px var(--cc-warning-soft, #fff8e7); }
  100% { box-shadow: inset 3px 0 0 var(--cc-accent, #176b50), 0 0 0 0 transparent; }
}

.knowledge-v2__workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(420px, 1fr) auto;
  gap: 12px;
  padding: 12px;
  align-items: stretch;
}

.knowledge-v2__workspace > .knowledge-v2__canvas-card {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 6px;
  background: var(--cc-surface-muted, #f8faf9);
  box-shadow: 0 4px 14px rgb(30 56 51 / 8%);
}

.knowledge-v2__workspace > .knowledge-v2__canvas-card--editor {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.knowledge-v2__workspace > .knowledge-v2__canvas-card--browser {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.knowledge-v2__workspace > .knowledge-v2__readonly-archive {
  grid-column: 1 / -1;
  grid-row: 2;
}

.knowledge-v2__capture {
  min-width: 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__capture > summary {
  display: grid;
  min-height: 48px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 14px;
  cursor: pointer;
  list-style: none;
}

.knowledge-v2__capture > summary::-webkit-details-marker {
  display: none;
}

.knowledge-v2__capture-toggle-icon {
  display: block;
  width: 18px;
  height: 18px;
  color: var(--cc-ink-soft, #52605a);
  transition: transform 120ms ease;
}

.knowledge-v2__capture[open] > summary .knowledge-v2__capture-toggle-icon {
  transform: rotate(45deg);
}

.knowledge-v2__capture > summary:hover {
  background: var(--cc-surface-strong, #edf2ef);
}

.knowledge-v2__capture-collapse {
  display: none;
}

.knowledge-v2__capture > summary > span:first-of-type {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.knowledge-v2__capture > summary small {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 10px;
}

.knowledge-v2__capture-body {
  min-height: 0;
  max-height: min(760px, 72vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 14px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

/* Author styles on the capture body override the browser's closed-details rule.
   Keep the editor out of layout and hit-testing until the disclosure is opened. */
.knowledge-v2__capture:not([open]) > .knowledge-v2__capture-body {
  display: none;
}

.knowledge-v2__section-head h3,
.knowledge-v2__category-groups h3,
.knowledge-v2__saved-views h3 {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.35;
}

.knowledge-v2__capture .library-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.knowledge-v2__wide-field {
  grid-column: 1 / -1;
}

.knowledge-v2__capture .field {
  min-width: 0;
}

/* The category field was removed from capture. Keep its tag picker as a full
   form row so the shared 12-column field grid cannot collapse it to half width. */
body.owner-shell-v1 #moduleStage .knowledge-v2__capture .library-form > .field:has(.cc-tag-picker) {
  grid-column: 1 / -1;
  min-width: min(100%, 260px);
}

body.owner-shell-v1 #moduleStage .knowledge-v2__capture .library-form > .field:has(.cc-tag-picker) .cc-tag-picker {
  width: 100%;
  min-width: min(100%, 260px);
  max-width: 100%;
}

.knowledge-v2__capture-advanced {
  min-width: 0;
  grid-column: 1 / -1;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 5px;
  background: var(--cc-surface, #ffffff);
}

.knowledge-v2__capture-advanced > summary {
  display: grid;
  min-height: 40px;
  grid-template-columns: 18px auto minmax(0, 1fr) 16px;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  cursor: pointer;
  list-style: none;
}

.knowledge-v2__capture-advanced > summary::-webkit-details-marker {
  display: none;
}

.knowledge-v2__capture-advanced > summary > [data-lucide] {
  width: 16px;
  height: 16px;
  color: var(--cc-blue, #286f91);
}

.knowledge-v2__capture-advanced > summary > [data-lucide]:last-child {
  color: var(--cc-ink-soft, #52605a);
  transition: transform 160ms ease;
}

.knowledge-v2__capture-advanced[open] > summary > [data-lucide]:last-child {
  transform: rotate(180deg);
}

.knowledge-v2__capture-advanced > summary > span {
  font-size: 11px;
  font-weight: 750;
}

.knowledge-v2__capture-advanced > summary > small {
  overflow: hidden;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 9px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__capture-advanced:not([open]) > .knowledge-v2__advanced-grid {
  display: none;
}

.knowledge-v2__capture .field small {
  display: block;
  margin-bottom: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

.knowledge-v2__capture input,
.knowledge-v2__capture select,
.knowledge-v2__capture textarea,
.knowledge-v2__search-row input {
  width: 100%;
  min-height: var(--cc-control-height, 34px);
  padding: 7px 9px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: var(--cc-radius-sm, 3px);
  background: var(--cc-surface, #ffffff);
  color: var(--cc-ink, #17211d);
}

.knowledge-v2__capture textarea {
  min-height: 90px;
  resize: vertical;
}

.knowledge-v2__capture .hud-button {
  min-height: 38px;
}

/* The shared form-grid owns the editor fields, but the primary action must
   occupy a real row. Without an explicit span it can land in a narrow
   implicit grid column and render the label vertically. */
.knowledge-v2__capture .library-form > #knowledgeSubmit {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: min(180px, 100%);
  max-width: 100%;
  white-space: nowrap;
}

.knowledge-v2__result {
  display: grid;
  gap: 2px;
  margin-top: 12px;
  padding: 9px 10px;
  border-left: 3px solid var(--cc-accent, #176b50);
  background: var(--cc-accent-soft, #e5f1ec);
  font-size: 11px;
}

.knowledge-v2__result--error {
  border-left-color: var(--cc-danger, #ae3e4b);
  background: var(--cc-danger-soft, #f9e9eb);
}

.knowledge-v2__boundary {
  margin: 13px 0 0;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  line-height: 1.55;
}

.knowledge-v2__current-notes,
.knowledge-v2__readonly-archive,
.knowledge-v2__readonly-body {
  min-width: 0;
}

.knowledge-v2__canvas-card--browser > .knowledge-v2__browser {
  height: 100%;
  min-height: 0;
}

.knowledge-v2__readonly-archive {
  border-top: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__readonly-archive > summary {
  display: grid;
  min-height: 52px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 14px;
  cursor: pointer;
  list-style: none;
}

.knowledge-v2__readonly-archive > summary::-webkit-details-marker {
  display: none;
}

.knowledge-v2__readonly-archive > summary > span:first-of-type {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.knowledge-v2__readonly-archive > summary strong {
  font-size: 13px;
}

.knowledge-v2__readonly-archive > summary small {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.knowledge-v2__readonly-archive > summary:hover,
.knowledge-v2__readonly-archive[open] > summary {
  background: var(--cc-surface-strong, #edf2ef);
}

.knowledge-v2__readonly-body {
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__browser {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--cc-surface, #ffffff);
}

.knowledge-v2__browser-head {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-strong, #edf2ef);
  font-size: 12px;
}

.knowledge-v2__browser-head strong {
  font-size: 13px;
}

.knowledge-v2__browser-head span {
  color: var(--cc-ink-soft, #52605a);
  text-align: right;
}

.knowledge-v2__records {
  min-width: 0;
  min-height: 0;
  max-height: min(560px, 68vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.knowledge-v2__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.25rem 0.1rem;
  color: var(--text-muted, #9fb2c8);
  font-size: 0.82rem;
}

.knowledge-v2__pagination[hidden] {
  display: none;
}

.knowledge-v2__pagination [disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 540px) {
  .knowledge-v2__pagination {
    justify-content: space-between;
    gap: 0.4rem;
  }

  .knowledge-v2__pagination [data-knowledge-page] {
    max-width: 46%;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

.knowledge-v2__progressive {
  border-top: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__progressive > summary {
  display: grid;
  min-height: 48px;
  grid-template-columns: 20px auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 13px;
  cursor: pointer;
  list-style: none;
}

.knowledge-v2__progressive > summary::-webkit-details-marker {
  display: none;
}

.knowledge-v2__progressive > summary span {
  color: var(--cc-accent-strong, #0f573f);
  font-size: 12px;
  font-weight: 700;
}

.knowledge-v2__progressive > summary small {
  min-width: 0;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.knowledge-v2__progressive[open] > summary {
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__progressive-records {
  min-width: 0;
}

.knowledge-v2__record {
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #ffffff);
}

.knowledge-v2__record:last-child {
  border-bottom: 0;
}

.knowledge-v2__record > summary {
  display: grid;
  min-width: 0;
  min-height: 66px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 13px;
  cursor: pointer;
  list-style: none;
}

.knowledge-v2__record > summary::-webkit-details-marker {
  display: none;
}

.knowledge-v2__record-toggle {
  display: block;
  width: 18px;
  height: 18px;
  color: var(--cc-ink-soft, #52605a);
  transition: transform 120ms ease;
}

.knowledge-v2__record[open] > summary .knowledge-v2__record-toggle {
  color: var(--cc-accent, #176b50);
  transform: rotate(90deg);
}

.knowledge-v2__record > summary:hover {
  background: #f5f9f7;
}

.knowledge-v2__record[open] > summary {
  background: #f3f5f6;
  box-shadow: inset 3px 0 0 var(--cc-accent, #176b50);
}

.knowledge-v2__record--readonly {
  background: #fbfcfc;
}

.knowledge-v2__record--readonly .knowledge-v2__kind {
  background: #edf1f3;
  color: #52616a;
}

.knowledge-v2__record[data-knowledge-kind="document"] .knowledge-v2__kind {
  background: var(--cc-blue-soft, #e6f1f6);
  color: var(--cc-blue, #286f91);
}

.knowledge-v2__row-main {
  display: block;
  min-width: 0;
}

.knowledge-v2__title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.knowledge-v2__title-line > strong {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__kind {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--cc-accent-soft, #e5f1ec);
  color: var(--cc-accent-strong, #0f573f);
  font-size: 10px;
  font-weight: 700;
}

.knowledge-v2__row-main > small {
  display: -webkit-box;
  margin-top: 4px;
  overflow: hidden;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.knowledge-v2 .knowledge-note-tags {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 0 20px;
  padding: 15px 16px 17px 42px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__record:not([open]) > .knowledge-v2__detail {
  display: none;
}

.knowledge-v2__content,
.knowledge-v2__source {
  min-width: 0;
}

.knowledge-v2__content h4,
.knowledge-v2__source h4 {
  margin: 0 0 7px;
  font-size: 12px;
}

.knowledge-v2__content p {
  margin: 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.knowledge-v2__metadata {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
}

.knowledge-v2__metadata > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  gap: 8px;
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--cc-line, #d9e0dc);
  font-size: 12px;
}

.knowledge-v2__metadata dt {
  color: var(--cc-ink-faint, #7b8781);
}

.knowledge-v2__metadata dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.knowledge-v2__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-top: 14px;
}

.knowledge-v2__tags span,
.knowledge-v2__category-count {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 12px;
  background: var(--cc-surface, #ffffff);
  color: var(--cc-ink-soft, #52605a);
  font-size: 10px;
}

.knowledge-v2__source {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 11px;
  border-left: 3px solid var(--cc-blue, #286f91);
  background: var(--cc-blue-soft, #e6f1f6);
}

.knowledge-v2__source > div {
  display: grid;
  gap: 2px;
  font-size: 11px;
}

.knowledge-v2__source > div span {
  color: var(--cc-ink-soft, #52605a);
  overflow-wrap: anywhere;
}

.knowledge-v2__source-link {
  width: fit-content;
  color: var(--cc-blue, #286f91);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.knowledge-v2__editor {
  grid-column: 1 / -1;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__editor > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  font-weight: 700;
  list-style-position: inside;
}

.knowledge-v2__editor[open] > summary {
  color: var(--cc-accent-strong, #0f573f);
}

.knowledge-v2__editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
  gap: 10px;
  padding: 12px 0 2px;
}

.knowledge-v2__editor:not([open]) > .knowledge-v2__editor-body {
  display: none;
}

.knowledge-v2__editor-content {
  grid-column: 1 / -1;
}

.knowledge-v2__editor-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.knowledge-v2__copy-action {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-top: 12px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__copy-action .mini-action {
  min-height: 36px;
  border-color: var(--cc-blue, #286f91);
  background: var(--cc-blue-soft, #e6f1f6);
  color: var(--cc-blue, #286f91);
  font-weight: 750;
}

.knowledge-v2__copy-feedback {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid var(--cc-blue, #286f91);
  background: var(--cc-blue-soft, #e6f1f6);
  color: var(--cc-ink, #17211d);
  font-size: 12px;
  line-height: 1.5;
}

.knowledge-v2 [data-knowledge-copy-feedback][hidden] {
  display: none;
}

.knowledge-v2__editor-actions button,
.knowledge-v2__capture-body button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.knowledge-v2__archive-action {
  border-color: var(--cc-danger, #a33a3a);
  color: var(--cc-danger, #a33a3a);
}

.knowledge-v2__archive-action:hover,
.knowledge-v2__archive-action:focus-visible {
  background: #fff3f2;
}

.knowledge-v2__editor-boundary {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  line-height: 1.5;
}

.knowledge-v2__section-head {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__section-head > strong {
  color: var(--cc-accent-strong, #0f573f);
  font-size: 13px;
}

.knowledge-v2__section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.knowledge-v2__section-actions > strong {
  color: var(--cc-accent-strong, #0f573f);
  font-size: 13px;
}

.knowledge-v2__search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 0.8fr);
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__search-row label {
  min-width: 0;
}

.knowledge-v2__search-group {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.knowledge-v2__search-row .mini-action {
  display: inline-flex;
  min-height: var(--cc-control-height, 34px);
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.knowledge-v2__search-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.knowledge-v2__search-feedback {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.knowledge-v2__search-feedback > span,
.knowledge-v2__search-feedback > strong {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

.knowledge-v2__search-feedback > strong {
  margin-left: auto;
  white-space: nowrap;
}

.knowledge-v2__filter-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.knowledge-v2__filter-chip {
  max-width: min(220px, 100%);
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid var(--cc-line-strong, #bec9c3);
  border-radius: var(--cc-radius-sm, 3px);
  background: var(--cc-surface, #ffffff);
  color: var(--cc-ink, #17211d);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-v2__category-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__category-groups > section {
  min-width: 0;
  padding: 14px;
}

.knowledge-v2__category-groups > section + section {
  border-left: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.knowledge-v2__category-list button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
}

.knowledge-v2__category-entry {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.knowledge-v2__category-manage {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.knowledge-v2__category-manage .mini-action {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 4px;
}

.knowledge-v2__category-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.2fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--cc-line, #d9e0dc);
}

.knowledge-v2__custom-fields {
  grid-column: 1 / -1;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

.knowledge-v2__custom-fields > summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.knowledge-v2__custom-fields > summary::-webkit-details-marker {
  display: none;
}

.knowledge-v2__custom-fields > summary small {
  margin-left: auto;
  color: var(--cc-ink-faint, #7b8781);
  font-weight: 500;
}

.knowledge-v2__custom-fields[open] > summary {
  color: var(--cc-accent-strong, #0f573f);
}

.knowledge-v2__custom-field-rows {
  display: grid;
  gap: 7px;
  padding: 4px 0 8px;
}

.knowledge-v2__custom-field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(100px, 0.45fr) minmax(180px, 1fr) auto;
  gap: 7px;
  align-items: end;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #ffffff);
}

.knowledge-v2__custom-field-value {
  min-width: 0;
}

.knowledge-v2__remove-field {
  width: 34px;
  min-width: 34px;
  min-height: var(--cc-control-height, 34px);
  padding: 4px;
  border-color: var(--cc-danger, #a33a3a);
  color: var(--cc-danger, #a33a3a);
}

.knowledge-v2__custom-fields > .mini-action {
  min-height: 32px;
}

.knowledge-v2__category-results {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.34fr);
}

.knowledge-v2__category-results > section,
.knowledge-v2__saved-views {
  min-width: 0;
}

.knowledge-v2__saved-views {
  padding: 14px;
  border-left: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface-muted, #f8faf9);
}

.knowledge-v2__saved-row {
  margin-top: 8px;
}

.knowledge-v2__empty {
  display: grid;
  min-height: 170px;
  place-content: center;
  gap: 4px;
  padding: 20px;
  color: var(--cc-ink-soft, #52605a);
  text-align: center;
}

.knowledge-v2__empty span {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
}

.knowledge-v2__empty--compact {
  min-height: 90px;
}

.knowledge-v2__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1050px) {
  .knowledge-v2__atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-v2__atlas-grid > section:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--cc-line, #d9e0dc);
    border-left: 0;
  }

  .knowledge-v2__cadence {
    grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1.3fr);
  }

  .knowledge-v2__cadence-legend {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .knowledge-v2__detail,
  .knowledge-v2__category-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-v2__saved-views {
    border-top: 1px solid var(--cc-line, #d9e0dc);
    border-left: 0;
  }

  .knowledge-v2__search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 760px) {
  .knowledge-v2__capture {
    scroll-margin-top: calc(var(--cc-mobile-topbar-height) + var(--cc-mobile-tabs-height) + 26px);
  }

  .knowledge-v2__capture:not([open]) {
    display: none;
  }

  .knowledge-v2__command-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .knowledge-v2__command-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .knowledge-v2__command-actions [data-module-tab-jump="3"] {
    display: none;
  }

  .knowledge-v2__command-actions .mini-action {
    min-width: 0;
    min-height: 38px;
    padding-inline: 4px;
    justify-content: center;
    font-size: 10px;
  }

  .knowledge-v2__command-context small {
    font-size: 10px;
  }
  .knowledge-v2__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-v2__metric {
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 8px;
    padding: 10px 11px;
  }

  .knowledge-v2__metric > [data-lucide] {
    width: 26px;
    height: 26px;
    padding: 5px;
  }

  .knowledge-v2__metric span {
    font-size: 11px;
    white-space: nowrap;
  }

  .knowledge-v2__metric strong {
    font-size: 18px;
  }

  .knowledge-v2__metric:nth-child(2n) {
    border-right: 0;
  }

  .knowledge-v2__metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line, #d9e0dc);
  }

  .knowledge-v2__workspace,
  .knowledge-v2__atlas-grid,
  .knowledge-v2__category-groups,
  .knowledge-v2__category-results {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 10px;
  }

  .knowledge-v2__workspace > .knowledge-v2__canvas-card--editor,
  .knowledge-v2__workspace > .knowledge-v2__canvas-card--browser,
  .knowledge-v2__workspace > .knowledge-v2__readonly-archive {
    grid-column: 1;
    grid-row: auto;
  }

  .knowledge-v2__workspace > .knowledge-v2__canvas-card--editor,
  .knowledge-v2__workspace > .knowledge-v2__canvas-card--browser {
    min-height: 0;
  }

  .knowledge-v2__capture-body {
    max-height: 70vh;
  }

  .knowledge-v2__atlas-head {
    min-height: 54px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 12px;
  }

  .knowledge-v2__atlas-head p {
    display: none;
  }

  .knowledge-v2__atlas-meta {
    gap: 0;
  }

  .knowledge-v2__atlas-toggle {
    min-height: 30px;
  }

  .knowledge-v2__atlas-grid > section + section,
  .knowledge-v2__atlas-grid > section:last-child {
    grid-column: auto;
    border-top: 1px solid var(--cc-line, #d9e0dc);
    border-left: 0;
  }

  .knowledge-v2__atlas-grid > section:first-child {
    border-top: 0;
  }

  .knowledge-v2__cadence {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }

  .knowledge-v2__cadence-legend {
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .knowledge-v2__cadence-legend > span {
    white-space: normal;
  }

  .knowledge-v2__capture {
    border-right: 0;
  }

  .knowledge-v2__capture > summary {
    min-height: 44px;
    padding: 5px 12px;
  }

  .knowledge-v2__capture-body {
    padding: 10px 12px;
  }

  .knowledge-v2__capture .library-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .knowledge-v2__capture-advanced > summary {
    grid-template-columns: 18px minmax(0, 1fr) 16px;
  }

  .knowledge-v2__capture-advanced > summary > small {
    display: none;
  }

  .knowledge-v2__advanced-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .knowledge-v2__capture :is(input, select, textarea, button) {
    scroll-margin-block: 164px 122px;
  }

  .knowledge-v2__capture textarea {
    height: 72px;
    min-height: 68px;
  }

  .knowledge-v2__readonly-archive > summary {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .knowledge-v2__readonly-archive > summary > .tag {
    grid-column: 2;
    justify-self: start;
  }

  .knowledge-v2__wide-field {
    grid-column: auto;
  }

  .knowledge-v2__browser-head,
  .knowledge-v2__section-head {
    align-items: flex-start;
  }

  .knowledge-v2__section-head,
  .knowledge-v2__section-actions {
    width: 100%;
  }

  .knowledge-v2__section-head {
    flex-direction: column;
  }

  .knowledge-v2__section-actions {
    justify-content: space-between;
  }

  .knowledge-v2__browser-head {
    width: 100%;
    flex-direction: column;
  }

  .knowledge-v2__browser-head span {
    width: 100%;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .knowledge-v2__records {
    max-height: 60vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .knowledge-v2__progressive > summary {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .knowledge-v2__progressive > summary small {
    grid-column: 2;
  }

  .knowledge-v2__record > summary {
    min-height: 72px;
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .knowledge-v2__row-main > small {
    font-size: 13px;
    line-height: 1.55;
  }

  .knowledge-v2__kind,
  .knowledge-v2__tags span,
  .knowledge-v2__category-count {
    font-size: 11px;
  }

  .knowledge-v2 .knowledge-note-tags {
    max-width: 100%;
    grid-column: 2;
    justify-self: start;
  }

  .knowledge-v2__title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .knowledge-v2__title-line > strong {
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .knowledge-v2__detail {
    gap: 14px;
    padding: 14px;
  }

  .knowledge-v2__editor-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-v2__editor-content,
  .knowledge-v2__editor-actions {
    grid-column: auto;
  }

  .knowledge-v2__copy-action .mini-action {
    width: 100%;
    min-height: 42px;
  }

  .knowledge-v2__editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-v2__metadata {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-v2__metadata > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .knowledge-v2__metadata dd {
    text-align: left;
  }

  .knowledge-v2__search-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-v2__search-row .mini-action {
    min-height: 40px;
  }

  .knowledge-v2__search-feedback {
    align-items: flex-start;
    flex-direction: column;
  }

  .knowledge-v2__search-feedback > strong {
    margin-left: 0;
    white-space: normal;
  }

  .knowledge-v2__category-groups > section + section,
  .knowledge-v2__saved-views {
    border-top: 1px solid var(--cc-line, #d9e0dc);
    border-left: 0;
  }
}

/* Atlas cards keep their own bounded scroll surface so large datasets do not
 * stretch the page. Existing flat markup makes each section the card frame. */
body.owner-shell-v1 .knowledge-v2__atlas-grid > section {
  min-height: 208px;
  max-height: 244px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 54%, transparent) transparent;
}

body.owner-shell-v1 .knowledge-v2__atlas-grid > section > .knowledge-v2__atlas-label {
  position: sticky;
  top: -13px;
  z-index: 1;
  padding-block: 4px 8px;
  background: var(--knowledge-card-soft, rgb(239 244 241 / 88%));
}

body.owner-shell-v1 .knowledge-v2__atlas-grid > section::-webkit-scrollbar { width: 8px; }
body.owner-shell-v1 .knowledge-v2__atlas-grid > section::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--cc-accent, #176b50) 54%, transparent);
  background-clip: padding-box;
}

@media (max-width: 1050px) {
  body.owner-shell-v1 .knowledge-v2__atlas-grid > section { min-height: 196px; max-height: 232px; }
}

@media (max-width: 760px) {
  body.owner-shell-v1 .knowledge-v2__atlas-grid > section { min-height: 176px; max-height: 220px; }
  body.owner-shell-v1 .knowledge-v2__atlas-grid > section > .knowledge-v2__atlas-label { top: -10px; }
}

@media (max-width: 900px) {
  .knowledge-v2,
  .knowledge-v2 * {
    box-sizing: border-box;
  }

  .knowledge-v2__search-row,
  .knowledge-v2__cadence,
  .knowledge-v2__category-groups,
  .knowledge-v2__category-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-v2__search-group,
  .knowledge-v2__section-actions {
    min-width: 0;
  }

  .knowledge-v2__search-row .mini-action,
  .knowledge-v2__section-actions .mini-action {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  body.owner-shell-v1 #moduleStage .knowledge-v2__capture .library-form > .field:has(.cc-tag-picker) {
    min-width: 0;
  }

  body.owner-shell-v1 #moduleStage .knowledge-v2__capture .library-form > .field:has(.cc-tag-picker) .cc-tag-picker__create {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 #moduleStage .knowledge-v2__capture .library-form > .field:has(.cc-tag-picker) .cc-tag-picker__create > button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .knowledge-v2__search-group,
  .knowledge-v2__section-actions,
  .knowledge-v2__command-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .knowledge-v2__capture .library-form > #knowledgeSubmit {
    width: 100%;
    justify-self: stretch;
  }

  .knowledge-v2__search-row .mini-action,
  .knowledge-v2__section-actions .mini-action,
  .knowledge-v2__command-actions .mini-action {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .knowledge-v2__search-feedback {
    align-items: flex-start;
    flex-direction: column;
  }

  .knowledge-v2__search-feedback > strong {
    margin-left: 0;
    white-space: normal;
  }

  .knowledge-v2__category-form,
  .knowledge-v2__custom-field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .knowledge-v2__category-form .mini-action,
  .knowledge-v2__custom-fields > .mini-action,
  .knowledge-v2__remove-field {
    width: 100%;
  }

  .knowledge-v2__category-entry {
    width: 100%;
    justify-content: space-between;
  }

  .knowledge-v2__category-manage .mini-action {
    width: 32px;
  }
}

/* owner-shell-v1: formal archive workbench material and interaction pass. */
body.owner-shell-v1 .knowledge-v2 {
  --knowledge-card: rgb(252 251 246 / 91%);
  --knowledge-card-solid: #fbfaf5;
  --knowledge-card-soft: rgb(239 244 241 / 88%);
  --knowledge-card-hover: rgb(237 246 242 / 94%);
  --knowledge-card-open: rgb(231 241 237 / 96%);
  --knowledge-edge: rgb(43 78 73 / 19%);
  --knowledge-edge-strong: rgb(31 88 79 / 34%);
  --knowledge-shadow: 0 1px 0 rgb(255 255 255 / 82%), 0 8px 24px rgb(30 56 51 / 10%), 0 2px 6px rgb(30 56 51 / 7%);
  --knowledge-shadow-hover: 0 1px 0 rgb(255 255 255 / 88%), 0 12px 28px rgb(28 67 59 / 14%), 0 3px 8px rgb(28 67 59 / 8%);
  min-width: 0;
}

html[data-theme="night"] body.owner-shell-v1 .knowledge-v2 {
  --knowledge-card: rgb(12 26 27 / 93%);
  --knowledge-card-solid: #0e2021;
  --knowledge-card-soft: rgb(17 37 37 / 94%);
  --knowledge-card-hover: rgb(20 46 44 / 96%);
  --knowledge-card-open: rgb(18 50 46 / 97%);
  --knowledge-edge: rgb(121 181 169 / 19%);
  --knowledge-edge-strong: rgb(91 210 184 / 43%);
  --knowledge-shadow: 0 1px 0 rgb(165 225 212 / 5%), 0 12px 28px rgb(0 0 0 / 30%), 0 3px 8px rgb(0 0 0 / 24%);
  --knowledge-shadow-hover: 0 1px 0 rgb(165 225 212 / 8%), 0 16px 34px rgb(0 0 0 / 38%), 0 4px 10px rgb(0 0 0 / 28%);
}

body.owner-shell-v1 .knowledge-v2__overview-panel {
  display: grid;
  gap: 12px;
  overflow: visible;
}

body.owner-shell-v1 .knowledge-v2__overview-panel > :is(.knowledge-v2__summary, .knowledge-v2__command-bar, .knowledge-v2__atlas, .knowledge-v2__workspace) {
  overflow: hidden;
  border: 1px solid var(--knowledge-edge);
  border-radius: 6px;
  background: var(--knowledge-card);
  box-shadow: var(--knowledge-shadow);
  backdrop-filter: blur(13px) saturate(112%);
}

body.owner-shell-v1 .knowledge-v2__overview-panel > .knowledge-v2__summary,
body.owner-shell-v1 .knowledge-v2__overview-panel > .knowledge-v2__workspace {
  border-color: var(--knowledge-edge);
}

body.owner-shell-v1 .knowledge-v2__command-bar {
  padding: 11px 13px;
  border-bottom: 0;
  background: var(--knowledge-card-soft) !important;
}

body.owner-shell-v1 .knowledge-v2__command-context > [data-lucide],
body.owner-shell-v1 .knowledge-v2__metric > [data-lucide],
body.owner-shell-v1 .knowledge-v2__coverage-row > [data-lucide] {
  border-color: var(--knowledge-edge);
  border-radius: 5px;
  background: var(--knowledge-card-solid);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 48%);
}

html[data-theme="night"] body.owner-shell-v1 .knowledge-v2__command-context > [data-lucide],
html[data-theme="night"] body.owner-shell-v1 .knowledge-v2__metric > [data-lucide],
html[data-theme="night"] body.owner-shell-v1 .knowledge-v2__coverage-row > [data-lucide] {
  box-shadow: inset 0 1px 0 rgb(164 224 211 / 7%);
}

body.owner-shell-v1 .knowledge-v2__summary {
  border-bottom: 0;
  background: var(--knowledge-card);
}

body.owner-shell-v1 .knowledge-v2__metric {
  min-height: 72px;
  padding: 12px 14px;
  border-color: var(--knowledge-edge);
}

body.owner-shell-v1 .knowledge-v2__atlas {
  border-bottom: 0;
  background: var(--knowledge-card);
}

body.owner-shell-v1 .knowledge-v2__atlas-head,
body.owner-shell-v1 .knowledge-v2__capture > summary,
body.owner-shell-v1 .knowledge-v2__readonly-archive > summary,
body.owner-shell-v1 .knowledge-v2__progressive > summary,
body.owner-shell-v1 .knowledge-v2__record > summary {
  transition: background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

body.owner-shell-v1 .knowledge-v2__atlas-head:hover,
body.owner-shell-v1 .knowledge-v2__capture > summary:hover,
body.owner-shell-v1 .knowledge-v2__readonly-archive > summary:hover,
body.owner-shell-v1 .knowledge-v2__progressive > summary:hover {
  background: var(--knowledge-card-hover);
}

body.owner-shell-v1 .knowledge-v2__atlas[open] > .knowledge-v2__atlas-head,
body.owner-shell-v1 .knowledge-v2__capture[open] > summary,
body.owner-shell-v1 .knowledge-v2__readonly-archive[open] > summary,
body.owner-shell-v1 .knowledge-v2__progressive[open] > summary {
  background: var(--knowledge-card-open);
  box-shadow: inset 3px 0 0 var(--cc-accent, #176b50);
}

body.owner-shell-v1 .knowledge-v2__atlas-grid > section,
body.owner-shell-v1 .knowledge-v2__cadence,
body.owner-shell-v1 .knowledge-v2__capture,
body.owner-shell-v1 .knowledge-v2__readonly-archive,
body.owner-shell-v1 .knowledge-v2__search-row,
body.owner-shell-v1 .knowledge-v2__saved-views {
  border-color: var(--knowledge-edge);
  background: var(--knowledge-card-soft);
}

body.owner-shell-v1 .knowledge-v2__atlas-grid > section + section,
body.owner-shell-v1 .knowledge-v2__category-groups > section + section,
body.owner-shell-v1 .knowledge-v2__saved-views {
  border-color: var(--knowledge-edge);
}

body.owner-shell-v1 .knowledge-v2__focus-row,
body.owner-shell-v1 .knowledge-v2__distribution-row,
body.owner-shell-v1 .knowledge-v2__coverage-row {
  border-radius: 5px;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

body.owner-shell-v1 .knowledge-v2__focus-row {
  min-height: 42px;
  padding: 5px 6px;
  border-bottom-color: var(--knowledge-edge);
}

body.owner-shell-v1 .knowledge-v2__focus-row:hover,
body.owner-shell-v1 .knowledge-v2__focus-row:focus-visible,
body.owner-shell-v1 .knowledge-v2__distribution-row:not(:disabled):hover,
body.owner-shell-v1 .knowledge-v2__distribution-row:not(:disabled):focus-visible {
  background: var(--knowledge-card-hover);
}

body.owner-shell-v1 .knowledge-v2__workspace,
body.owner-shell-v1 .knowledge-v2__browser {
  background: transparent;
}

body.owner-shell-v1 .knowledge-v2__browser-head,
body.owner-shell-v1 .knowledge-v2__section-head {
  border-color: var(--knowledge-edge);
  background: var(--knowledge-card-soft);
}

body.owner-shell-v1 .knowledge-v2__record {
  border-color: var(--knowledge-edge);
  background: var(--knowledge-card);
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

body.owner-shell-v1 .knowledge-v2__record > summary {
  min-height: 58px;
  padding: 8px 12px;
}

body.owner-shell-v1 .knowledge-v2__record > summary:hover {
  background: var(--knowledge-card-hover);
}

body.owner-shell-v1 .knowledge-v2__record[open] > summary,
body.owner-shell-v1 .knowledge-v2__record.is-targeted > summary {
  background: var(--knowledge-card-open);
  box-shadow: inset 3px 0 0 var(--cc-accent, #176b50);
}

body.owner-shell-v1 .knowledge-v2__record[open] {
  box-shadow: 0 7px 18px rgb(28 67 59 / 9%);
}

html[data-theme="night"] body.owner-shell-v1 .knowledge-v2__record[open] {
  box-shadow: 0 8px 22px rgb(0 0 0 / 28%);
}

body.owner-shell-v1 .knowledge-v2__detail,
body.owner-shell-v1 .knowledge-v2__record-detail,
body.owner-shell-v1 .knowledge-v2__editor-body {
  border-color: var(--knowledge-edge);
  background: var(--knowledge-card-soft);
}

body.owner-shell-v1 .knowledge-v2__capture-advanced,
body.owner-shell-v1 .knowledge-v2__custom-field-row,
body.owner-shell-v1 .knowledge-v2__source,
body.owner-shell-v1 .knowledge-v2__copy-feedback {
  border-color: var(--knowledge-edge);
  border-radius: 5px;
  background: var(--knowledge-card-solid);
  box-shadow: 0 3px 10px rgb(30 56 51 / 6%);
}

body.owner-shell-v1 .knowledge-v2 :is(input, select, textarea) {
  border-color: var(--knowledge-edge-strong);
  border-radius: 5px;
  background: var(--knowledge-card-solid);
}

body.owner-shell-v1 .knowledge-v2 :is(input, select, textarea):focus {
  border-color: var(--cc-accent, #176b50);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cc-accent, #176b50) 15%, transparent);
}

body.owner-shell-v1 .knowledge-v2__category-list button,
body.owner-shell-v1 .knowledge-v2__filter-chip,
body.owner-shell-v1 .knowledge-v2__tags span,
body.owner-shell-v1 .knowledge-v2__category-count,
body.owner-shell-v1 .knowledge-v2__kind {
  border-radius: 6px;
}

body.owner-shell-v1 .knowledge-v2__category-list button {
  border-color: var(--knowledge-edge);
  background: var(--knowledge-card-solid);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1 .knowledge-v2__category-list button:hover,
body.owner-shell-v1 .knowledge-v2__category-list button:focus-visible,
body.owner-shell-v1 .knowledge-v2__category-list button[aria-pressed="true"],
body.owner-shell-v1 .knowledge-v2__category-list button.is-active {
  border-color: var(--knowledge-edge-strong);
  background: var(--knowledge-card-hover);
  box-shadow: inset 0 -2px 0 var(--cc-accent, #176b50);
}

body.owner-shell-v1 .knowledge-v2__saved-row {
  padding: 8px;
  border: 1px solid var(--knowledge-edge);
  border-radius: 5px;
  background: var(--knowledge-card-solid);
  transition: border-color 140ms ease, background-color 140ms ease;
}

body.owner-shell-v1 .knowledge-v2__saved-row:hover,
body.owner-shell-v1 .knowledge-v2__saved-row:focus-within {
  border-color: var(--knowledge-edge-strong);
  background: var(--knowledge-card-hover);
}

body.owner-shell-v1 .knowledge-v2__empty,
body.owner-shell-v1 .knowledge-v2__atlas-empty {
  margin: 10px;
  border: 1px dashed var(--knowledge-edge-strong);
  border-radius: 6px;
  background: var(--knowledge-card-soft);
}

body.owner-shell-v1 .knowledge-v2__atlas-empty {
  min-height: 74px;
  padding: 16px;
  text-align: center;
}

@media (hover: hover) {
  body.owner-shell-v1 .knowledge-v2__overview-panel > :is(.knowledge-v2__summary, .knowledge-v2__command-bar, .knowledge-v2__atlas, .knowledge-v2__workspace):hover {
    border-color: var(--knowledge-edge-strong);
    box-shadow: var(--knowledge-shadow-hover);
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1 .knowledge-v2,
  body.owner-shell-v1 .knowledge-v2__overview-panel,
  body.owner-shell-v1 .knowledge-v2__overview-panel > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.owner-shell-v1 .knowledge-v2__overview-panel {
    gap: 8px;
  }

  body.owner-shell-v1 .knowledge-v2__overview-panel > :is(.knowledge-v2__summary, .knowledge-v2__command-bar, .knowledge-v2__atlas, .knowledge-v2__workspace) {
    border-radius: 5px;
    box-shadow: 0 4px 14px rgb(30 56 51 / 9%);
  }

  body.owner-shell-v1 .knowledge-v2__command-bar {
    padding: 9px 10px;
  }

  body.owner-shell-v1 .knowledge-v2__capture {
    position: relative;
    display: block;
  }

  body.owner-shell-v1 .knowledge-v2__capture-collapse {
    position: absolute;
    z-index: 2;
    top: 7px;
    right: 8px;
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--knowledge-edge-strong);
    border-radius: 6px;
    color: var(--cc-ink-soft, #52605a);
    background: var(--knowledge-card-solid);
  }

  body.owner-shell-v1 .knowledge-v2__capture-collapse [data-lucide] {
    width: 16px;
    height: 16px;
  }

  body.owner-shell-v1 .knowledge-v2__capture-collapse:active,
  body.owner-shell-v1 .knowledge-v2__capture-collapse:focus-visible {
    border-color: var(--cc-accent, #176b50);
    outline: 2px solid color-mix(in srgb, var(--cc-accent, #176b50) 24%, transparent);
    outline-offset: 1px;
  }

  body.owner-shell-v1 .knowledge-v2__capture > summary {
    padding-right: 50px;
  }

  body.owner-shell-v1 .knowledge-v2__command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 .knowledge-v2__command-actions > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1 .knowledge-v2__metric {
    min-height: 64px;
    padding: 9px 10px;
  }

  body.owner-shell-v1 .knowledge-v2__atlas-grid > section,
  body.owner-shell-v1 .knowledge-v2__capture-body,
  body.owner-shell-v1 .knowledge-v2__category-groups > section,
  body.owner-shell-v1 .knowledge-v2__saved-views,
  body.owner-shell-v1 .knowledge-v2__detail {
    padding: 11px;
  }

  body.owner-shell-v1 .knowledge-v2__record > summary {
    min-height: 64px;
    padding: 9px 10px;
  }

  body.owner-shell-v1 .knowledge-v2__saved-row,
  body.owner-shell-v1 .knowledge-v2__empty,
  body.owner-shell-v1 .knowledge-v2__atlas-empty {
    margin-inline: 6px;
  }

  body.owner-shell-v1 .knowledge-v2__title-line > strong,
  body.owner-shell-v1 .knowledge-v2__browser-head span,
  body.owner-shell-v1 .knowledge-v2__command-context small,
  body.owner-shell-v1 .knowledge-v2__atlas-head h3 {
    overflow-wrap: anywhere;
    white-space: normal;
  }
}


/* source: styles/items-v2.css */
[data-items-v2="true"] {
  --items-line: var(--cc-line, #d9e0dc);
  --items-line-strong: var(--cc-line-strong, #b9c5bf);
  --items-surface: var(--cc-surface, #ffffff);
  --items-surface-muted: var(--cc-surface-muted, #f6f8f7);
  --items-ink: var(--cc-ink, #17211d);
  --items-ink-soft: var(--cc-ink-soft, #56635d);
  --items-accent: var(--cc-accent, #176b50);
  --items-accent-soft: var(--cc-accent-soft, #e8f4ee);
  --items-warning: #8a5b12;
  --items-warning-soft: #fff4d8;
  --items-focus: var(--cc-blue, #286f91);
  min-width: 0;
  align-content: start;
  color: var(--items-ink);
  letter-spacing: 0;
  padding-bottom: 48px;
}

[data-items-v2="true"] *,
[data-items-v2="true"] *::before,
[data-items-v2="true"] *::after {
  box-sizing: border-box;
}

[data-items-v2="true"] [data-lucide] {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

[data-items-v2="true"] > .panel {
  min-width: 0;
  align-self: start;
  border-color: var(--items-line);
  border-radius: 4px;
  background: var(--items-surface);
  box-shadow: none;
}

/* The list panel contains a full editor below the master list. Its grid row
 * height is only a placement hint; clipping the editor makes visible controls
 * impossible to click once the detail form grows. */
[data-items-v2="true"] .items-v2__list-panel {
  overflow: visible;
}

[data-items-v2="true"] .items-v2__crud-form {
  /* The shared dense-form rule caps this grid at the pane height.  Keeping
   * overflow visible then lets the action row paint over the trash section.
   * Let the detail pane own scrolling while the form keeps its full flow. */
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Keep tab panels below the fixed topbar and module rail when a tab jump
 * uses scrollIntoView(). The shared shell supplies the base scroll padding;
 * Items needs the extra clearance because its tab content starts beneath a
 * dense control header. */
@media (min-width: 1181px) {
  body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] :is(.panel.tab-focus, [data-tab-panel]) {
    scroll-margin-top: calc(var(--cc-desktop-topbar-height) + var(--cc-desktop-tabs-height) + 42px) !important;
  }

}

/* Keep the location-update heading and return action below the fixed top rail
 * after a tab jump, including compact desktop windows. */
@media (min-width: 1181px) and (max-height: 560px) {
  [data-items-v2="true"] .items-v2__update-panel {
    scroll-margin-top: calc(var(--cc-desktop-topbar-height) + var(--cc-desktop-tabs-height) + 42px) !important;
  }
}

@media (max-width: 1180px) {
  /* Mobile tabs sit below two fixed rails; align the active card below both
   * rails so its first action is not hidden under the navigation. */
  body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] :is(.panel.tab-focus, [data-tab-panel]) {
    scroll-margin-top: 40px !important;
  }
}

[data-items-v2="true"] h3,
[data-items-v2="true"] p,
[data-items-v2="true"] strong,
[data-items-v2="true"] span {
  min-width: 0;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

[data-items-v2="true"] h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

[data-items-v2="true"] .items-v2__header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--items-line-strong);
}

[data-items-v2="true"] .items-v2__header p {
  max-width: 72ch;
  margin: 4px 0 0;
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

[data-items-v2="true"] .items-v2__header .items-v2__truth-line {
  color: var(--items-ink);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

[data-items-v2="true"] .items-v2__jumps,
[data-items-v2="true"] .items-v2__row-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

[data-items-v2="true"] .mini-action,
[data-items-v2="true"] .hud-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 4px;
  letter-spacing: 0;
}

[data-items-v2="true"] .items-v2__summary {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--items-line);
  border-left: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__summary > div {
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px;
  border-right: 1px solid var(--items-line);
  border-bottom: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__summary span,
[data-items-v2="true"] .items-v2__summary strong {
  display: block;
}

[data-items-v2="true"] .items-v2__summary span {
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

[data-items-v2="true"] .items-v2__summary strong {
  margin-top: 4px;
  color: var(--items-ink);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

[data-items-v2="true"] .items-v2__workspace {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--items-line);
  border-bottom: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__workspace-section {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__workspace-section:last-child {
  border-right: 0;
}

[data-items-v2="true"] .items-v2__workspace-section h4 {
  margin: 0 0 7px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
}

[data-items-v2="true"] .items-v2__compact-list {
  min-width: 0;
}

[data-items-v2="true"] .items-v2__compact-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--items-line);
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.35;
}

[data-items-v2="true"] .items-v2__compact-row:first-child {
  border-top: 0;
}

[data-items-v2="true"] .items-v2__compact-row > span,
[data-items-v2="true"] .items-v2__compact-row small,
[data-items-v2="true"] .items-v2__compact-row time {
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-items-v2="true"] .items-v2__compact-row > span > strong,
[data-items-v2="true"] .items-v2__compact-row > span > small {
  display: block;
}

[data-items-v2="true"] .items-v2__compact-row > span > strong {
  color: var(--items-ink);
  font-size: 11px;
}

[data-items-v2="true"] .items-v2__compact-row > span > small,
[data-items-v2="true"] .items-v2__compact-row time {
  margin-top: 2px;
  color: var(--items-ink-soft);
  font-size: 9px;
}

[data-items-v2="true"] .items-v2__compact-row > strong {
  flex: 0 0 auto;
  color: var(--items-ink);
  font-variant-numeric: tabular-nums;
}

[data-items-v2="true"] .items-v2__compact-empty {
  display: grid;
  min-height: 54px;
  align-content: center;
  gap: 2px;
  color: var(--items-ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

[data-items-v2="true"] .items-v2__compact-empty strong {
  color: var(--items-ink);
  font-size: 11px;
}

[data-items-v2="true"] .items-v2__projection-note,
[data-items-v2="true"] .items-v2__feedback {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--items-line-strong);
  background: var(--items-surface-muted);
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

[data-items-v2="true"] .items-v2__feedback.success {
  border-left-color: var(--items-accent);
  background: var(--items-accent-soft);
  color: var(--items-ink);
}

[data-items-v2="true"] .items-v2__list {
  min-width: 0;
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--items-line);
}

@media (max-width: 700px) {
  [data-items-v2="true"] .items-v2__list {
    max-height: 60vh;
  }
}

[data-items-v2="true"] .items-v2__category-manager {
  min-width: 0;
  margin: 10px 0 2px;
  padding: 10px 0;
  border-top: 1px solid var(--items-line);
  border-bottom: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__category-heading,
[data-items-v2="true"] .items-v2__category-grid {
  display: grid;
  min-width: 0;
  align-items: end;
  gap: 8px;
}

[data-items-v2="true"] .items-v2__category-heading {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  margin-bottom: 8px;
}

[data-items-v2="true"] .items-v2__category-heading span,
[data-items-v2="true"] .items-v2__category-impact,
[data-items-v2="true"] .items-v2__category-draft-result,
[data-items-v2="true"] .items-v2__category-result {
  color: var(--items-ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

[data-items-v2="true"] .items-v2__category-grid {
  grid-template-columns: minmax(150px, 1fr) auto minmax(160px, 1fr) minmax(150px, 1fr) auto;
}

[data-items-v2="true"] .items-v2__category-grid .field,
[data-items-v2="true"] .items-v2__category-grid input,
[data-items-v2="true"] .items-v2__category-grid select {
  width: 100%;
  min-width: 0;
}

[data-items-v2="true"] .items-v2__category-grid .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

[data-items-v2="true"] .items-v2__category-grid input,
[data-items-v2="true"] .items-v2__category-grid select,
[data-items-v2="true"] .items-v2__category-grid .mini-action {
  min-height: 36px;
}

[data-items-v2="true"] .items-v2__category-impact,
[data-items-v2="true"] .items-v2__category-draft-result,
[data-items-v2="true"] .items-v2__category-result p {
  margin: 7px 0 0;
}

[data-items-v2="true"] .items-v2__category-draft-result:empty {
  display: none;
}

[data-items-v2="true"] .items-v2__category-result.warning {
  color: var(--items-warning, #8d641c);
}

[data-items-v2="true"] .items-v2__category-result.success,
[data-items-v2="true"] .items-v2__category-draft-result[data-kind="success"] {
  color: var(--items-accent);
}

[data-items-v2="true"] .items-v2__category-result ul {
  display: grid;
  gap: 4px;
  margin: 6px 0;
  padding: 0;
  list-style: none;
}

[data-items-v2="true"] .items-v2__category-result li {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__filters {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 9px;
  padding: 12px 0;
  border-bottom: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__filters .field,
[data-items-v2="true"] .items-v2__filters input,
[data-items-v2="true"] .items-v2__filters select {
  width: 100%;
  min-width: 0;
}

[data-items-v2="true"] .items-v2__filters .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

[data-items-v2="true"] .items-v2__filters input,
[data-items-v2="true"] .items-v2__filters select {
  min-height: 36px;
}

[data-items-v2="true"] .items-v2__result-count {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 2px 2px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

[data-items-v2="true"] .items-v2__header + .items-v2__list {
  margin-top: 4px;
}

[data-items-v2="true"] .items-v2__item-row,
[data-items-v2="true"] .items-v2__history-row {
  width: 100%;
  min-width: 0;
  min-height: 70px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--items-line);
  border-radius: 0;
  background: transparent;
}

[data-items-v2="true"] .items-v2__history-row,
[data-items-v2="true"] .items-v2__item-details {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 2px;
}

[data-items-v2="true"] .items-v2__item-summary {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 2px;
  cursor: pointer;
  list-style: none;
}

[data-items-v2="true"] .items-v2__item-summary::-webkit-details-marker {
  display: none;
}

[data-items-v2="true"] .items-v2__summary-copy {
  min-width: 0;
}

[data-items-v2="true"] .items-v2__row-toggle {
  margin-top: 2px;
  color: var(--items-ink-soft);
  transition: transform 120ms ease;
}

[data-items-v2="true"] .items-v2__item-row[open] > .items-v2__item-summary {
  background: var(--items-accent-soft);
  box-shadow: inset 3px 0 0 var(--items-accent);
}

[data-items-v2="true"] .items-v2__item-row[open] > .items-v2__item-summary .items-v2__row-toggle {
  color: var(--items-accent);
  transform: rotate(90deg);
}

[data-items-v2="true"] .items-v2__item-details {
  margin-left: 26px;
  padding-top: 8px;
  border-top: 1px dashed var(--items-line);
}

[data-items-v2="true"] .items-v2__item-row:last-child,
[data-items-v2="true"] .items-v2__history-row:last-child {
  border-bottom: 0;
}

[data-items-v2="true"] .items-v2__item-copy {
  min-width: 0;
}

[data-items-v2="true"] .items-v2__title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

[data-items-v2="true"] .items-v2__title-line strong,
[data-items-v2="true"] .items-v2__history-row strong {
  font-size: 13px;
  line-height: 1.4;
}

[data-items-v2="true"] .items-v2__title-line .tag {
  flex: 0 0 auto;
}

[data-items-v2="true"] .items-v2__meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px 12px;
  margin-top: 4px;
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

[data-items-v2="true"] .items-v2__meta .items-v2__source {
  color: var(--items-accent);
  font-weight: 650;
}

[data-items-v2="true"] .items-v2__item-copy > p {
  margin: 5px 0 0;
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

[data-items-v2="true"] .items-v2__duplicate-count {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid #e0c17e;
  border-radius: 3px;
  background: var(--items-warning-soft);
  color: var(--items-warning);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

[data-items-v2="true"] .items-v2__history-row time {
  max-width: 190px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

[data-items-v2="true"] .items-v2__form {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

[data-items-v2="true"] .items-v2__form .field,
[data-items-v2="true"] .items-v2__form input,
[data-items-v2="true"] .items-v2__form select {
  width: 100%;
  min-width: 0;
}

[data-items-v2="true"] .items-v2__form .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

[data-items-v2="true"] .items-v2__form input,
[data-items-v2="true"] .items-v2__form select {
  min-height: 36px;
}

[data-items-v2="true"] .items-v2__location-picker {
  grid-column: 1 / -1;
}

[data-items-v2="true"] .items-v2__picker-note {
  display: block;
  margin-top: 5px;
  color: var(--items-ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

[data-items-v2="true"] .items-v2__form .hud-button {
  align-self: end;
}

[data-items-v2="true"] .items-v2__empty {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 3px;
  padding: 12px 2px;
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

[data-items-v2="true"] .items-v2__empty strong {
  color: var(--items-ink);
  font-size: 13px;
}

[data-items-v2="true"] button:focus-visible,
[data-items-v2="true"] input:focus-visible,
[data-items-v2="true"] select:focus-visible,
[data-items-v2="true"] summary:focus-visible {
  outline: 2px solid var(--items-focus);
  outline-offset: 2px;
}

[data-items-v2="true"] .items-v2__master-detail {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 18px;
  margin-top: 12px;
}

@media (min-width: 1180px) {
  [data-items-v2="true"] .items-v2__master-detail {
    grid-template-columns: minmax(0, 1.35fr) minmax(480px, 0.9fr);
  }

  [data-items-v2="true"] .items-v2__crud-form label:has(#itemCrudName) {
    grid-column: 1 / -1;
  }
}

[data-items-v2="true"] .items-v2__master-pane,
[data-items-v2="true"] .items-v2__detail-pane {
  min-width: 0;
}

[data-items-v2="true"] .items-v2__detail-pane {
  padding-left: 18px;
  border-left: 1px solid var(--items-line-strong);
  height: auto !important;
  max-height: 720px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

[data-items-v2="true"] .items-v2__detail-heading,
[data-items-v2="true"] .items-v2__trash-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

[data-items-v2="true"] .items-v2__detail-heading h4,
[data-items-v2="true"] .items-v2__trash-heading h4,
[data-items-v2="true"] .items-v2__archive-dialog h4,
[data-items-v2="true"] .items-v2__detail-readonly h4 {
  margin: 2px 0 0;
  font-size: 14px;
  letter-spacing: 0;
}

[data-items-v2="true"] .items-v2__eyebrow,
[data-items-v2="true"] .items-v2__trash-heading > span {
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 700;
}

[data-items-v2="true"] .items-v2__detail-summary,
[data-items-v2="true"] .items-v2__readonly-notice {
  margin: 8px 0 0;
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

[data-items-v2="true"] .items-v2__readonly-notice {
  padding: 9px 10px;
  border-left: 3px solid var(--items-warning);
  background: var(--items-warning-soft);
  color: var(--items-warning);
}

[data-items-v2="true"] .items-v2__crud-form {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

[data-items-v2="true"] .items-v2__crud-form .field,
[data-items-v2="true"] .items-v2__crud-form input,
[data-items-v2="true"] .items-v2__crud-form textarea {
  width: 100%;
  min-width: 0;
}

[data-items-v2="true"] .items-v2__crud-form .field > small {
  display: block;
  margin-bottom: 4px;
  color: var(--items-ink-soft);
  font-size: 10px;
  font-weight: 650;
}

[data-items-v2="true"] .items-v2__crud-form input,
[data-items-v2="true"] .items-v2__crud-form textarea {
  min-height: 36px;
}

[data-items-v2="true"] .items-v2__field-wide,
[data-items-v2="true"] .items-v2__field-full,
[data-items-v2="true"] .items-v2__form-actions {
  grid-column: 1 / -1;
}

[data-items-v2="true"] .items-v2__important {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  color: var(--items-ink-soft);
  font-size: 11px;
}

[data-items-v2="true"] .items-v2__important input {
  width: 16px;
  min-height: 16px;
}

[data-items-v2="true"] .items-v2__form-actions,
[data-items-v2="true"] .items-v2__dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

[data-items-v2="true"] .items-v2__form-actions .hud-button {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

[data-items-v2="true"] .items-v2__custom-fields {
  min-width: 0;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--items-line-strong);
}

[data-items-v2="true"] .items-v2__custom-fields-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

[data-items-v2="true"] .items-v2__custom-fields-head strong,
[data-items-v2="true"] .items-v2__custom-fields-head small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-items-v2="true"] .items-v2__custom-fields-head strong {
  color: var(--items-ink);
  font-size: 13px;
  line-height: 1.4;
}

[data-items-v2="true"] .items-v2__custom-fields-head small {
  color: var(--items-ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

[data-items-v2="true"] .items-v2__custom-field-list {
  display: grid;
  min-width: 0;
  gap: 10px;
}

[data-items-v2="true"] .items-v2__custom-field-row {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--items-line);
  border-radius: 4px;
}

[data-items-v2="true"] .items-v2__custom-field-empty {
  margin: 0;
  padding: 10px 0 2px;
  color: var(--items-ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

[data-items-v2="true"] .items-v2__read-only {
  color: var(--items-warning);
  font-size: 10px;
  font-weight: 700;
}

[data-items-v2="true"] .items-v2__detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 0;
}

[data-items-v2="true"] .items-v2__detail-grid div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__detail-grid dt,
[data-items-v2="true"] .items-v2__detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
}

[data-items-v2="true"] .items-v2__detail-grid dt { color: var(--items-ink-soft); }
[data-items-v2="true"] .items-v2__detail-grid dd { margin-top: 3px; color: var(--items-ink); font-weight: 700; }

[data-items-v2="true"] .items-v2__trash {
  min-width: 0;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--items-line-strong);
}

[data-items-v2="true"] .items-v2__trash-row {
  display: grid;
  min-width: 0;
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--items-line);
}

[data-items-v2="true"] .items-v2__trash-row span,
[data-items-v2="true"] .items-v2__trash-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-items-v2="true"] .items-v2__trash-row small,
[data-items-v2="true"] .items-v2__trash-empty {
  margin: 3px 0 0;
  color: var(--items-ink-soft);
  font-size: 10px;
}

[data-items-v2="true"] .items-v2__archive-trigger { color: #8f2f27; border-color: #d7aaa5; }

[data-items-v2="true"] .items-v2__archive-dialog {
  width: min(430px, calc(100vw - 32px));
  max-width: 100%;
  padding: 18px;
  border: 1px solid var(--items-line-strong);
  border-radius: 6px;
  background: var(--items-surface);
  color: var(--items-ink);
}

[data-items-v2="true"] .items-v2__archive-dialog::backdrop { background: rgba(23, 33, 29, 0.45); }
[data-items-v2="true"] .items-v2__archive-dialog p { color: var(--items-ink-soft); font-size: 11px; line-height: 1.5; }

@media (max-width: 980px) {
[data-items-v2="true"] .items-v2__master-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__detail-pane {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid var(--items-line-strong);
    border-left: 0;
  }

[data-items-v2="true"] .items-v2__workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-items-v2="true"] .items-v2__workspace-section:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--items-line);
  }

  [data-items-v2="true"] .items-v2__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-items-v2="true"] .items-v2__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  [data-items-v2="true"] .items-v2__category-heading,
  [data-items-v2="true"] .items-v2__category-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  [data-items-v2="true"] .items-v2__category-grid .mini-action {
    width: 100%;
    justify-content: center;
  }

  [data-items-v2="true"] .items-v2__category-result li {
    display: grid;
  }

  [data-items-v2="true"] {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] > .panel {
    width: 100%;
    min-height: 0;
    grid-column: 1 / -1;
  }

  [data-items-v2="true"] [data-items-editor] {
    scroll-margin-top: 0;
  }

  [data-items-v2="true"] .items-v2__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__jumps {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-items-v2="true"] .items-v2__jumps .mini-action,
  [data-items-v2="true"] .items-v2__header > .mini-action {
    width: 100%;
  }

  [data-items-v2="true"] .items-v2__jumps .mini-action:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  [data-items-v2="true"] .items-v2__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-items-v2="true"] .items-v2__summary > div:last-child {
    grid-column: 1 / -1;
  }

  [data-items-v2="true"] .items-v2__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__workspace-section,
  [data-items-v2="true"] .items-v2__workspace-section:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--items-line);
    border-right: 0;
  }

  [data-items-v2="true"] .items-v2__workspace-section:first-child {
    border-top: 0;
  }

  [data-items-v2="true"] .items-v2__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }

  [data-items-v2="true"] .items-v2__filters .field:first-child,
  [data-items-v2="true"] .items-v2__result-count {
    grid-column: 1 / -1;
  }

  [data-items-v2="true"] .items-v2__result-count {
    padding-bottom: 2px;
    white-space: normal;
  }

  [data-items-v2="true"] .items-v2__item-row,
  [data-items-v2="true"] .items-v2__history-row {
    min-height: 0;
  }

  [data-items-v2="true"] .items-v2__history-row,
  [data-items-v2="true"] .items-v2__item-details {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    padding: 12px 0;
  }

  [data-items-v2="true"] .items-v2__item-summary {
    padding: 12px 8px;
  }

  [data-items-v2="true"] .items-v2__item-details {
    margin-left: 0;
  }

  /* The selected-item editor can exceed a phone viewport. Keep its list card
   * above the fixed navigation and make that card, not the document body,
   * the single mobile scroll owner. */
  [data-items-v2="true"] .items-v2__list-panel {
    height: calc(100dvh - var(--cc-mobile-topbar-height) - var(--cc-mobile-tabs-height) - var(--cc-mobile-nav-height) - 24px) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    padding-bottom: 24px;
    scrollbar-gutter: stable;
  }

  [data-items-v2="true"] .items-v2__update-panel {
    height: calc(100dvh - var(--cc-mobile-topbar-height) - var(--cc-mobile-tabs-height) - var(--cc-mobile-nav-height) - 24px) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    padding-bottom: 24px;
    scrollbar-gutter: stable;
  }

  [data-items-v2="true"] .items-v2__row-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
    justify-content: stretch;
  }

  [data-items-v2="true"] .items-v2__row-actions .mini-action {
    width: 100%;
    min-width: 0;
  }

  [data-items-v2="true"] .items-v2__duplicate-count,
  [data-items-v2="true"] .items-v2__history-row time {
    max-width: none;
    justify-content: flex-start;
    white-space: normal;
  }

  [data-items-v2="true"] .items-v2__duplicate-count {
    grid-column: 1 / -1;
  }

  [data-items-v2="true"] [data-items-location-form="true"].items-v2__form {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3px;
    margin-top: 8px;
  }

  [data-items-v2="true"] [data-items-location-form="true"] #itemLocationSubmit {
    margin-top: 0;
  }

  [data-items-v2="true"] .items-v2__crud-form,
  [data-items-v2="true"] .items-v2__detail-grid,
  [data-items-v2="true"] .items-v2__trash-row {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__crud-form {
    row-gap: 6px;
  }

  [data-items-v2="true"] .items-v2__detail-heading,
  [data-items-v2="true"] .items-v2__trash-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__detail-heading {
    position: static;
    z-index: auto;
    top: auto;
    padding: 8px 0;
    border-bottom: 1px solid var(--items-line);
    background: var(--items-surface);
  }

  [data-items-v2="true"] .items-v2__custom-fields-head {
    position: static;
    z-index: auto;
    top: auto;
    padding: 0 0 8px;
    border-bottom: 0;
    background: transparent;
  }

  [data-items-v2="true"] .items-v2__archive-trigger,
  [data-items-v2="true"] .items-v2__trash-row .mini-action,
  [data-items-v2="true"] .items-v2__form-actions .hud-button {
    width: 100%;
  }

  [data-items-v2="true"] .items-v2__form-actions {
    flex-direction: column-reverse;
  }

  [data-items-v2="true"] .mini-action,
  [data-items-v2="true"] .hud-button {
    min-height: 40px;
  }
}

[data-items-v2="true"] .items-v2__trash-row .mini-action {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

@media (max-width: 520px) {
  [data-items-v2="true"],
  [data-items-v2="true"] * {
    box-sizing: border-box;
  }

  [data-items-v2="true"] .items-v2__workspace,
  [data-items-v2="true"] .items-v2__filters,
  [data-items-v2="true"] .items-v2__form,
  [data-items-v2="true"] .items-v2__crud-form,
  [data-items-v2="true"] .items-v2__detail-grid,
  [data-items-v2="true"] .items-v2__trash-row {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__workspace-section,
  [data-items-v2="true"] .items-v2__filters .field,
  [data-items-v2="true"] .items-v2__form .field,
  [data-items-v2="true"] .items-v2__crud-form .field {
    grid-column: 1;
    min-width: 0;
  }

  [data-items-v2="true"] .items-v2__detail-heading,
  [data-items-v2="true"] .items-v2__trash-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-items-v2="true"] .items-v2__form-actions,
  [data-items-v2="true"] .items-v2__dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  [data-items-v2="true"] .items-v2__form-actions .hud-button,
  [data-items-v2="true"] .items-v2__dialog-actions .hud-button,
  [data-items-v2="true"] .items-v2__dialog-actions .mini-action {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-items-v2="true"] *,
  [data-items-v2="true"] *::before,
  [data-items-v2="true"] *::after {
    scroll-behavior: auto !important;
  }
}

/* Formal r6 module finish: inventory ledger geometry across both workbench modes. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] {
  --items-line: #c8d3cf;
  --items-line-strong: #aebfba;
  --items-surface: #fbfaf4;
  --items-surface-muted: #f1f4ec;
  --items-ink: #1d363c;
  --items-ink-soft: #617577;
  --items-accent: #246c69;
  --items-accent-soft: #dce9e3;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] {
  --items-line: #29434a;
  --items-line-strong: #3e6668;
  --items-surface: #0d2027;
  --items-surface-muted: #102a32;
  --items-ink: #d7e5df;
  --items-ink-soft: #78999a;
  --items-accent: #7dc8bc;
  --items-accent-soft: #173b3e;
  --items-warning: #d4ad67;
  --items-warning-soft: #332b1d;
  --items-focus: #8bbbd0;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] > .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] > .panel {
  border-radius: 4px;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] > .panel {
  border: 1px solid #c6d1cd;
  border-top: 3px solid var(--items-accent);
  background:
    linear-gradient(112deg, rgb(36 108 105 / 5%), transparent 42%),
    rgb(251 250 244 / 96%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-items-v2="true"] > .panel {
  border: 1px solid rgb(126 196 189 / 22%);
  border-top: 2px solid var(--items-accent);
  border-left: 2px solid #d4ad67;
  background:
    repeating-linear-gradient(90deg, transparent 0 71px, rgb(126 196 189 / 2.5%) 71px 72px),
    rgb(10 29 36 / 92%);
  box-shadow: 0 16px 34px rgb(0 5 8 / 18%);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__header h3 {
  font-family: var(--formal-serif, "Noto Serif SC", "Songti SC", SimSun, serif);
  font-size: 17px;
  font-weight: 650;
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__summary strong,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__result-count,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__compact-row time,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__history-row time {
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__summary strong {
  color: var(--items-accent);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__summary,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace {
  background: color-mix(in srgb, var(--items-accent) 2.5%, transparent);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section h4,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__eyebrow,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__trash-heading > span {
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__custom-field-row {
  padding: 10px 0 10px 10px;
  border: 0;
  border-block: 1px solid var(--items-line);
  border-left: 3px solid var(--items-accent);
  border-radius: 0;
  background: color-mix(in srgb, var(--items-accent) 4%, transparent);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__detail-grid {
  gap: 0;
  border-top: 1px solid var(--items-line);
  border-left: 1px solid var(--items-line);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__detail-grid div {
  border: 0;
  border-right: 1px solid var(--items-line);
  border-bottom: 1px solid var(--items-line);
  background: transparent;
}

html[data-theme="night"] body.owner-shell-v1 [data-items-v2="true"] .items-v2__item-row[open] > .items-v2__item-summary {
  background: rgb(35 78 75 / 58%);
}

@media (max-width: 760px) {
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__header {
    gap: 11px;
    padding-bottom: 10px;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__header h3 {
    font-size: 16px;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__summary {
    margin-top: 12px;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__summary > div {
    min-height: 62px;
    padding: 9px 10px;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section,
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section:first-child {
    grid-column: auto;
    padding: 10px;
    border-top: 0;
    border-right: 1px solid var(--items-line);
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--items-line);
    border-right: 0;
  }
}

@media (max-width: 520px) {
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section,
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section:first-child {
    grid-column: auto;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__workspace-section:last-child {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__compact-row {
    gap: 6px;
  }

  body.owner-shell-v1 [data-items-v2="true"] .items-v2__compact-row time {
    max-width: 76px;
    text-align: right;
  }
}


/* source: styles/responsive.css */
/* Shell breakpoints live in shell.css. Keep this file for module-only responsive rules. */


/* source: styles/owner-shell-v1.css */
/* Owner 1.0 shell boundary. Keep module markup and API hooks untouched. */
html:has(body.owner-shell-v1) {
  --cc-desktop-topbar-height: 68px;
  --cc-desktop-tabs-height: 44px;
  --cc-sticky-content-gap: 9px;
}

body.owner-shell-v1 {
  --cc-mobile-topbar-height: 104px;
  --cc-mobile-tabs-height: 44px;
  --cc-canvas: #f3f5f2;
  --cc-surface: #ffffff;
  --cc-surface-muted: #f7f9f7;
  --cc-ink: #17211d;
  --cc-ink-soft: #55615c;
  --cc-ink-faint: #7a8580;
  --cc-line: #d9e0dc;
  --cc-line-strong: #bdc9c3;
  --cc-accent: #176b50;
  --cc-accent-strong: #0f573f;
  --cc-accent-soft: #e7f1ec;
  --cc-nav: #132821;
  --cc-nav-hover: #1d382f;
  --cc-nav-active: #285b49;
  background: var(--cc-canvas);
  color: var(--cc-ink);
  font-family: "Microsoft YaHei UI", "Noto Sans SC", "PingFang SC", sans-serif;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .shell {
  grid-template-columns: minmax(214px, 228px) minmax(0, 1fr);
  background: var(--cc-canvas);
}

body.owner-shell-v1 .sidebar {
  align-self: stretch;
  border-right-color: #284038;
  background: var(--cc-nav);
}

body.owner-shell-v1:not(.auth-required) .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 228px;
  align-self: start;
  height: 100dvh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) .main {
  grid-column: 2;
}

body.owner-shell-v1 .brand {
  min-height: 68px;
}

body.owner-shell-v1 .brand h1 {
  font-size: 15px;
}

body.owner-shell-v1 .mark {
  border-color: rgba(255, 255, 255, 0.2);
  background: #24483b;
}

body.owner-shell-v1 .topbar {
  min-height: var(--cc-desktop-topbar-height);
  grid-template-columns: minmax(210px, 300px) minmax(300px, 1fr) auto;
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.98);
}

body.owner-shell-v1 .title h2 {
  font-size: 18px;
  font-weight: 700;
}

body.owner-shell-v1 .command {
  height: 40px;
  border-color: #c9d3ce;
  background: #fafbfa;
}

body.owner-shell-v1 .command:focus-within {
  border-color: var(--cc-accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 80, 0.1);
}

body.owner-shell-v1 .workspace {
  gap: 12px;
  padding: 14px 20px 24px;
}

/* Dense overview feeds participate in the document scroll. */
body.owner-shell-v1 .overview-task-list,
body.owner-shell-v1 .overview-change-list {
  height: auto;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}

body.owner-shell-v1 .module-tabs-shell {
  border: 1px solid var(--cc-line);
  border-radius: 6px;
  background: var(--cc-surface);
}

.cc-mobile-nav,
.cc-mobile-more {
  display: none;
}

.cc-mobile-more[hidden] {
  display: none;
}

/* A failed bootstrap remains inside the original shell and exposes no stack text. */
body.owner-shell-v1.bootstrap-failed .module-tabs-shell,
body.owner-shell-v1.bootstrap-failed .command-panel,
body.owner-shell-v1.bootstrap-failed .pin-button,
body.owner-shell-v1.bootstrap-failed .ai-fab {
  display: none;
}

body.owner-shell-v1.bootstrap-failed .module-stage {
  display: block;
}

body.owner-shell-v1 .cc-bootstrap-recovery {
  width: min(680px, 100%);
  min-height: 280px;
  margin: clamp(28px, 8vh, 92px) auto;
  padding: 28px;
  border: 1px solid var(--cc-line-strong);
  border-radius: 8px;
  background: var(--cc-surface);
  box-shadow: 0 14px 36px rgba(20, 38, 31, 0.08);
}

body.owner-shell-v1 .cc-bootstrap-recovery__eyebrow {
  margin: 0 0 8px;
  color: #9a3b20;
  font-size: 13px;
  font-weight: 700;
}

body.owner-shell-v1 .cc-bootstrap-recovery h3 {
  margin: 0;
  color: var(--cc-ink);
  font-size: 20px;
  line-height: 1.35;
}

body.owner-shell-v1 .cc-bootstrap-recovery > p:not(.cc-bootstrap-recovery__eyebrow) {
  max-width: 52ch;
  margin: 12px 0 0;
  color: var(--cc-ink-soft);
  line-height: 1.7;
}

body.owner-shell-v1 .cc-bootstrap-recovery__actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

body.owner-shell-v1 .cc-bootstrap-recovery__actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--cc-accent);
  border-radius: 6px;
  background: var(--cc-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

body.owner-shell-v1 .cc-bootstrap-recovery__actions button:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 3px;
}

body.owner-shell-v1 .cc-bootstrap-recovery__actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

body.owner-shell-v1 .panel.tab-focus {
  scroll-margin-top: 82px;
}

body.owner-shell-v1 .status-button,
body.owner-shell-v1 .ai-fab {
  border-color: #cfd8d3;
  background: #ffffff;
  color: var(--cc-ink);
}

body.owner-shell-v1 .status-button:hover,
body.owner-shell-v1 .ai-fab:hover {
  border-color: var(--cc-accent);
  background: var(--cc-accent-soft);
  color: var(--cc-accent-strong);
  transform: none;
  box-shadow: none;
}

/* Authentication is a dedicated surface, not a disabled application shell. */
body.owner-shell-v1.auth-required {
  min-height: 100dvh;
  padding-bottom: 0;
  background: #edf1ed;
}

body.owner-shell-v1.auth-required .shell {
  position: relative;
  display: block;
  min-height: 100dvh;
  background: #edf1ed;
}

body.owner-shell-v1.auth-required .sidebar {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 2;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border-right: 0;
  background: transparent;
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required .brand {
  min-height: 0;
  align-items: flex-start;
  padding: 0;
  border-bottom: 0;
}

body.owner-shell-v1.auth-required .brand h1 {
  color: var(--cc-ink);
  font-size: 17px;
}

body.owner-shell-v1.auth-required .brand small {
  margin-top: 5px;
  color: #68756f;
  font-size: 10px;
}

body.owner-shell-v1.auth-required .mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-color: #adc2b8;
  background: #1f5a45;
  font-size: 16px;
}

body.owner-shell-v1.auth-required #primaryNav,
body.owner-shell-v1.auth-required .pin-button,
body.owner-shell-v1.auth-required .nav.pinned,
body.owner-shell-v1.auth-required .topbar,
body.owner-shell-v1.auth-required .module-tabs-shell,
body.owner-shell-v1.auth-required .command-panel {
  display: none;
}

body.owner-shell-v1.auth-required .main {
  display: block;
  min-height: 100dvh;
}

body.owner-shell-v1.auth-required .action-feedback {
  width: min(860px, calc(100% - 48px));
  margin: 24px auto 0;
}

body.owner-shell-v1.auth-required .workspace {
  display: grid;
  min-height: 100dvh;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  place-items: center;
  padding: 32px;
  background: #edf1ed;
}

body.owner-shell-v1.auth-required .module-stage {
  display: grid;
  width: 100%;
  min-height: 0;
  align-self: stretch;
  place-items: center;
}

body.owner-shell-v1.auth-required .login-required {
  width: min(860px, 100%);
  max-width: none;
  margin: 0;
  padding: 38px 40px;
  border: 1px solid #d5ddd8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 55px rgba(31, 53, 44, 0.1);
}

body.owner-shell-v1.auth-required .auth-grid {
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  gap: 42px;
}

body.owner-shell-v1.auth-required .auth-grid > div:first-child {
  min-width: 0;
  padding-right: 42px;
  border-right: 1px solid #e1e6e3;
}

body.owner-shell-v1.auth-required .login-required .eyebrow {
  margin: 0 0 12px;
  color: var(--cc-accent);
  font-size: 11px;
  font-weight: 700;
}

body.owner-shell-v1.auth-required .login-required h3 {
  margin: 0 0 12px;
  color: var(--cc-ink);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

body.owner-shell-v1.auth-required .login-required p:not(.eyebrow) {
  max-width: 440px;
  margin: 0;
  color: var(--cc-ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

body.owner-shell-v1.auth-required .login-required .list {
  margin-top: 24px;
  border-top: 1px solid #e1e6e3;
}

body.owner-shell-v1.auth-required .login-required .list .row {
  min-height: 46px;
  padding: 0;
  border-bottom: 1px solid #edf0ee;
  background: transparent;
}

body.owner-shell-v1.auth-required .login-required .tag {
  border-color: #dce3df;
  background: #f5f7f5;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1.auth-required .auth-stack,
body.owner-shell-v1.auth-required .auth-form {
  gap: 14px;
}

body.owner-shell-v1.auth-required .auth-form label {
  gap: 7px;
  color: #45514c;
  font-size: 12px;
  font-weight: 600;
}

body.owner-shell-v1.auth-required .auth-form input {
  min-height: 46px;
  padding: 0 13px;
  border-color: #c8d2cd;
  border-radius: 6px;
  background: #ffffff;
  font-size: 14px;
}

body.owner-shell-v1.auth-required .auth-form input:focus {
  border-color: var(--cc-accent);
  outline: 3px solid rgba(23, 107, 80, 0.12);
  outline-offset: 0;
}

body.owner-shell-v1.auth-required .auth-form button {
  min-height: 46px;
  border: 1px solid var(--cc-accent);
  border-radius: 6px;
  background: var(--cc-accent);
  color: #ffffff;
  font-size: 14px;
}

body.owner-shell-v1.auth-required .auth-form button:hover {
  border-color: var(--cc-accent-strong);
  background: var(--cc-accent-strong);
}

body.owner-shell-v1.auth-required .auth-message {
  min-height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cc-ink-faint);
  font-size: 12px;
  line-height: 1.5;
}

body.owner-shell-v1.auth-required .auth-message.error {
  padding: 10px 12px;
  border: 1px solid #e0b0b6;
  background: #fff4f5;
  color: #9e2938;
}

@media (max-width: 1120px) {
  body.owner-shell-v1 .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title status"
      "command command";
    align-items: stretch;
  }

  body.owner-shell-v1 .title {
    grid-area: title;
    min-width: 0;
  }

  body.owner-shell-v1 .command {
    grid-area: command;
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1 .status {
    grid-area: status;
    width: auto;
    min-width: 0;
    justify-self: end;
    flex-wrap: wrap;
  }

  body.owner-shell-v1.auth-required .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  body.owner-shell-v1.auth-required .login-required {
    padding: 32px;
  }

  body.owner-shell-v1.auth-required .auth-grid {
    gap: 30px;
  }

  body.owner-shell-v1.auth-required .auth-grid > div:first-child {
    padding-right: 30px;
  }
}

@media (max-width: 900px) and (min-width: 761px) {
  body.owner-shell-v1 .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "command"
      "status";
    align-items: stretch;
  }

  body.owner-shell-v1 .title {
    grid-area: title;
    min-width: 0;
  }

  body.owner-shell-v1 .command {
    grid-area: command;
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1 .status {
    grid-area: status;
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.owner-shell-v1 .workspace {
    padding-inline: 12px;
  }
}

@media (min-width: 1181px) {
  html:has(body.owner-shell-v1:not(.auth-required)) {
    /* The module rail includes its own control row and is taller than the
     * nominal tab token. Keep scrollIntoView targets below the real sticky
     * bottom edge on dense desktop layouts. */
    scroll-padding-top: calc(var(--cc-desktop-topbar-height) + var(--cc-desktop-tabs-height) + var(--cc-sticky-content-gap) + 34px);
  }

  body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
    position: sticky;
    top: var(--cc-desktop-topbar-height);
    z-index: 8;
    background: var(--cc-surface);
  }

  body.owner-shell-v1:not(.auth-required) :is(.panel.tab-focus, [data-tab-panel]) {
    scroll-margin-top: 0;
  }
}

/* Keep the primary work surface usable on wide displays with very little height. */
@media (min-width: 1181px) and (max-height: 560px) {
  html:has(body.owner-shell-v1) {
    /* Keep the one-row desktop command bar inside its sticky rail. A 52px
     * rail is shorter than the search/control row and lets it paint over the
     * module tabs in compact-height browser windows. */
    --cc-desktop-topbar-height: 68px;
    --cc-desktop-tabs-height: 34px;
  }

  body.owner-shell-v1:not(.auth-required) .sidebar {
    overflow-y: hidden;
    scrollbar-gutter: auto;
  }

  body.owner-shell-v1 .brand {
    min-height: 48px;
  }

  body.owner-shell-v1 .brand small {
    display: none;
  }

  body.owner-shell-v1 #primaryNav {
    margin-top: 5px;
  }

  body.owner-shell-v1 .cc-shell-nav {
    gap: 4px;
  }

  body.owner-shell-v1 .cc-shell-nav__group {
    gap: 1px;
  }

  body.owner-shell-v1 .cc-shell-nav__group-label {
    line-height: 14px;
  }

  body.owner-shell-v1 .cc-shell-nav__links {
    gap: 0;
  }

  body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
    height: 25px;
    min-height: 25px;
    padding-inline: 8px;
  }

  body.owner-shell-v1 .pin-button {
    display: block;
    min-height: 22px;
    height: 22px;
    margin: 2px 0 0;
    padding: 0 6px;
    font-size: 9px;
    line-height: 1;
  }

  body.owner-shell-v1 .nav.pinned {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    max-height: 68px;
    margin: 2px 0 0;
    padding-top: 2px;
    overflow: hidden;
  }

  body.owner-shell-v1 .nav.pinned a {
    min-height: 21px;
    height: 21px;
    padding: 2px 4px;
    font-size: 9px;
    line-height: 1.1;
    overflow: hidden;
  }

  body.owner-shell-v1 .topbar {
    min-height: var(--cc-desktop-topbar-height);
    padding: 5px 16px;
  }

  body.owner-shell-v1 .command {
    height: 34px;
  }

  body.owner-shell-v1 .workspace {
    gap: 4px;
    padding: 8px 14px 10px;
  }

  body.owner-shell-v1:not(.auth-required) .module-tabs-shell,
  body.owner-shell-v1:not(.auth-required) #moduleTabs {
    height: var(--cc-desktop-tabs-height);
    min-height: var(--cc-desktop-tabs-height);
    padding: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleTabs .tab {
    height: var(--cc-desktop-tabs-height);
    min-height: var(--cc-desktop-tabs-height);
  }

  body.owner-shell-v1 .module-tabs-nav {
    height: 30px;
  }

  body.owner-shell-v1 .finance-calendar-panel:not(.tab-panel-hidden) {
    padding: 10px;
  }

  body.owner-shell-v1 .finance-calendar-panel:not(.tab-panel-hidden) > h3 {
    margin-bottom: 4px;
  }

  body.owner-shell-v1 .finance-calendar-toolbar {
    min-height: 34px;
    grid-template-columns: 32px minmax(150px, 200px) max-content 32px minmax(128px, 1fr);
    gap: 6px;
    margin: 2px 0 4px;
    padding: 4px 6px;
  }

  body.owner-shell-v1 .finance-calendar-toolbar .finance-month-nav {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }

  body.owner-shell-v1 .finance-calendar-toolbar .finance-calendar-month-field,
  body.owner-shell-v1 .finance-calendar-toolbar .hud-button {
    min-height: 32px;
  }

  body.owner-shell-v1 .finance-calendar-toolbar .finance-calendar-month-field input {
    min-height: 30px;
  }

  body.owner-shell-v1 .finance-calendar-scroll {
    padding: 2px;
  }

  body.owner-shell-v1 .finance-calendar-scroll .finance-calendar-v2 {
    padding: 2px;
  }

  body.owner-shell-v1 .finance-calendar-v2.fc .fc-toolbar {
    margin-bottom: 4px;
  }

  body.owner-shell-v1 .finance-calendar-v2.fc .fc-col-header-cell-cushion,
  body.owner-shell-v1 .finance-calendar-v2.fc .fc-daygrid-day-number {
    padding: 2px 5px;
  }

  body.owner-shell-v1 .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 40px;
  }

  body.owner-shell-v1 .finance-calendar-v2.fc .fc-daygrid-day-events {
    min-height: 10px;
    margin-bottom: 1px;
  }

  body.owner-shell-v1 .finance-calendar-v2.fc .finance-calendar-event {
    margin: 0 2px;
    padding: 0 3px;
    font-size: 9px;
  }

  body.owner-shell-v1 .finance-calendar-v2.fc .finance-calendar-event .fc-event-title {
    font-size: 9px;
    line-height: 1.1;
  }
}

@media (max-width: 760px) {
  html:has(body.owner-shell-v1:not(.auth-required)) {
    /* The mobile topbar is two rows (title/status + quick input). Keep the
     * sticky module rail below its actual rendered height so controls remain
     * hit-testable instead of sitting beneath the input. */
    --cc-mobile-topbar-height: 108px;
    --cc-desktop-topbar-height: var(--cc-mobile-topbar-height);
  }

  body.owner-shell-v1 {
    --cc-mobile-nav-height: inherit;
    --cc-mobile-content-bottom-clearance: inherit;
    padding-bottom: var(--cc-mobile-nav-height);
  }

  body.owner-shell-v1 .finance-overview-primary-actions {
    display: none;
  }

  body.owner-shell-v1 .sidebar {
    height: var(--cc-mobile-nav-height);
  }

  body.owner-shell-v1:not(.auth-required) #primaryNav {
    display: none;
  }

  body.owner-shell-v1 .cc-mobile-nav {
    display: grid;
    width: 100%;
    height: var(--cc-mobile-nav-height);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: minmax(58px, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--cc-surface);
  }

  body.owner-shell-v1 .cc-mobile-nav__item {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cc-ink-soft);
    font: inherit;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
  }

  body.owner-shell-v1 .cc-mobile-nav__item:hover,
  body.owner-shell-v1 .cc-mobile-nav__item:focus-visible {
    background: var(--cc-surface-muted);
    color: var(--cc-accent-strong);
  }

  body.owner-shell-v1 .cc-mobile-nav__item:focus-visible {
    outline: 2px solid var(--cc-accent);
    outline-offset: -3px;
  }

  body.owner-shell-v1 .cc-mobile-nav__item.active,
  body.owner-shell-v1 .cc-mobile-nav__item[aria-current="page"] {
    background: var(--cc-accent-soft);
    box-shadow: inset 0 3px 0 var(--cc-accent);
    color: var(--cc-accent-strong);
    font-weight: 700;
  }

  body.owner-shell-v1 .cc-mobile-nav__item:disabled,
  body.owner-shell-v1 .cc-mobile-nav__item[aria-disabled="true"] {
    color: var(--cc-ink-faint);
    cursor: not-allowed;
    opacity: 0.7;
  }

  body.owner-shell-v1 .cc-mobile-nav__icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
  }

  body.owner-shell-v1 .cc-mobile-nav__item > span {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.owner-shell-v1 .cc-mobile-more:not([hidden]) {
    position: fixed;
    z-index: 49;
    inset: 0 0 var(--cc-mobile-nav-height);
    display: grid;
    align-items: end;
  }

  body.owner-shell-v1 .cc-mobile-more__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(12, 22, 18, 0.48);
  }

  body.owner-shell-v1 .cc-mobile-more__surface {
    position: relative;
    display: grid;
    max-height: min(72dvh, 560px);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--cc-line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--cc-surface);
    box-shadow: 0 -14px 34px rgba(12, 28, 21, 0.18);
    color: var(--cc-ink);
  }

  body.owner-shell-v1 .cc-mobile-more__header {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1 .cc-mobile-more__header p,
  body.owner-shell-v1 .cc-mobile-more__header h2 {
    margin: 0;
    letter-spacing: 0;
  }

  body.owner-shell-v1 .cc-mobile-more__header p {
    color: var(--cc-ink-faint);
    font-size: 10px;
    font-weight: 700;
  }

  body.owner-shell-v1 .cc-mobile-more__header h2 {
    font-size: 17px;
    line-height: 1.3;
  }

  body.owner-shell-v1 .cc-mobile-more__close {
    display: grid;
    width: 36px;
    height: 36px;
    min-width: 36px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--cc-line);
    border-radius: 6px;
    background: var(--cc-surface-muted);
    color: var(--cc-ink);
  }

  body.owner-shell-v1 .cc-mobile-more__close svg {
    width: 18px;
    height: 18px;
  }

  body.owner-shell-v1 .cc-mobile-more__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 10px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.owner-shell-v1 .cc-mobile-more__item {
    display: flex;
    min-width: 0;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid var(--cc-line);
    border-radius: 6px;
    background: var(--cc-surface-muted);
    color: var(--cc-ink-soft);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
  }

  body.owner-shell-v1 .cc-mobile-more__item svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  body.owner-shell-v1 .cc-mobile-more__item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.owner-shell-v1 .cc-mobile-more__item.active,
  body.owner-shell-v1 .cc-mobile-more__item[aria-current="page"] {
    border-color: var(--cc-accent);
    background: var(--cc-accent-soft);
    color: var(--cc-accent-strong);
  }

  body.owner-shell-v1 .cc-mobile-more__item:focus-visible,
  body.owner-shell-v1 .cc-mobile-more__close:focus-visible {
    outline: 2px solid var(--cc-accent);
    outline-offset: 2px;
  }

  body.owner-shell-v1.mobile-more-open {
    overflow: hidden;
  }

  body.owner-shell-v1 .topbar {
    position: sticky;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title status"
      "command command";
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 10px;
  }

  body.owner-shell-v1 .title {
    grid-area: title;
    min-width: 0;
  }

  body.owner-shell-v1 .command {
    width: 100%;
    min-width: 0;
    grid-area: command;
  }

  body.owner-shell-v1 .status {
    display: flex;
    width: auto;
    min-width: 0;
    grid-area: status;
    align-items: center;
    align-self: start;
    justify-self: end;
    gap: 4px;
    overflow: visible;
  }

  body.owner-shell-v1 .status > .dot,
  body.owner-shell-v1 #workspaceStatus,
  body.owner-shell-v1 #clock,
  body.owner-shell-v1 .ai-fab {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .ai-fab {
    display: grid;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    place-items: center;
    padding: 0;
  }

  body.owner-shell-v1 .global-search-mount {
    flex: 0 0 36px;
  }

  body.owner-shell-v1 .status-button {
    min-height: 36px;
    padding-inline: 8px;
  }

  body.owner-shell-v1 .workspace {
    padding: 10px 9px var(--cc-mobile-content-bottom-clearance);
  }

  body.owner-shell-v1:not(.auth-required) #moduleTabs .tab {
    white-space: nowrap;
  }

  body.owner-shell-v1:not(.auth-required) {
    min-height: 100dvh;
    height: auto;
    padding-bottom: var(--cc-mobile-nav-height);
    overflow-x: clip;
    overflow-y: visible;
    scroll-padding-bottom: var(--cc-mobile-content-bottom-clearance);
  }

  html:has(body.owner-shell-v1:not(.auth-required)) {
    --cc-mobile-nav-height: calc(58px + env(safe-area-inset-bottom));
    --cc-mobile-content-bottom-clearance: calc(var(--cc-mobile-nav-height) + 24px);
    scroll-padding-top: calc(var(--cc-mobile-topbar-height) + var(--cc-mobile-tabs-height) + 8px);
    scroll-padding-bottom: var(--cc-mobile-content-bottom-clearance);
  }

  body.owner-shell-v1:not(.auth-required) .shell {
    display: block;
    height: auto;
    min-height: calc(100dvh - var(--cc-mobile-nav-height));
  }

  body.owner-shell-v1:not(.auth-required) .main {
    min-height: calc(100dvh - var(--cc-mobile-nav-height));
    overflow: visible;
  }

  body.owner-shell-v1:not(.auth-required) .topbar {
    top: 0;
    min-height: var(--cc-desktop-topbar-height);
  }

  body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
    position: sticky;
    z-index: 8;
    top: var(--cc-mobile-topbar-height);
  }

  body.owner-shell-v1:not(.auth-required) :where(.panel.tab-focus, [data-tab-panel]) {
    scroll-margin-top: calc(var(--cc-mobile-topbar-height) + var(--cc-mobile-tabs-height) + 8px);
  }

  body.owner-shell-v1:not(.auth-required) .sidebar {
    position: fixed;
    z-index: 40;
    width: 100%;
    height: var(--cc-mobile-nav-height);
    max-height: var(--cc-mobile-nav-height);
    inset: auto 0 0;
    overflow: hidden;
    scrollbar-gutter: auto;
  }

  body.owner-shell-v1.auth-required {
    padding-bottom: 0;
    background: #f7f8f6;
  }

  body.owner-shell-v1.auth-required .shell {
    display: block;
    min-height: 100dvh;
    background: #f7f8f6;
  }

  body.owner-shell-v1.auth-required .sidebar {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 15px 18px 10px;
    border: 0;
    background: #f7f8f6;
    color: var(--cc-ink);
  }

  body.owner-shell-v1.auth-required .cc-mobile-nav,
  body.owner-shell-v1.auth-required .cc-mobile-more {
    display: none;
  }

  body.owner-shell-v1.auth-required .brand {
    display: flex;
    align-items: center;
  }

  body.owner-shell-v1.auth-required .brand h1 {
    color: var(--cc-ink);
    font-size: 15px;
  }

  body.owner-shell-v1.auth-required .brand small {
    display: none;
  }

  body.owner-shell-v1.auth-required .mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-color: #b9c9c1;
    background: #1f5a45;
  }

  body.owner-shell-v1.auth-required .main {
    min-height: 0;
  }

  body.owner-shell-v1.auth-required .action-feedback {
    width: auto;
    margin: 8px 14px 0;
  }

  body.owner-shell-v1.auth-required .workspace {
    min-height: 0;
    place-items: start stretch;
    padding: 12px 14px 24px;
    background: #f7f8f6;
  }

  body.owner-shell-v1.auth-required .module-stage {
    display: grid;
    place-items: start stretch;
  }

  body.owner-shell-v1.auth-required .login-required {
    width: 100%;
    padding: 24px 20px;
    border: 1px solid #dce2de;
    border-radius: 8px;
    box-shadow: none;
  }

  body.owner-shell-v1.auth-required .auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  body.owner-shell-v1.auth-required .auth-grid > div:first-child {
    padding-right: 0;
    border-right: 0;
  }

  body.owner-shell-v1.auth-required .login-required .eyebrow {
    margin-bottom: 8px;
  }

  body.owner-shell-v1.auth-required .login-required h3 {
    margin-bottom: 0;
    font-size: 23px;
  }

  body.owner-shell-v1.auth-required .login-required p:not(.eyebrow),
  body.owner-shell-v1.auth-required .login-required .list {
    display: none;
  }

  body.owner-shell-v1.auth-required .auth-form {
    display: grid;
    min-height: 0;
    padding: 0;
  }

  body.owner-shell-v1.auth-required .auth-form input,
  body.owner-shell-v1.auth-required .auth-form button {
    min-height: 46px;
  }
}

@media (max-width: 420px) {
  body.owner-shell-v1.auth-required .workspace {
    padding-inline: 10px;
  }

  body.owner-shell-v1.auth-required .login-required {
    padding: 22px 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1 *,
  body.owner-shell-v1 *::before,
  body.owner-shell-v1 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* source: styles/library-vault-owner-v1.css */
/* Owner 1.0 Library/Vault: compact document and safe-metadata workbench. */
[data-command-library="vault"].library-owner-v1 {
  --library-line: #dfe6e2;
  --library-line-soft: #ebefed;
  --library-ink: #17231f;
  --library-muted: #65736d;
  --library-surface-soft: #f7f9f8;
  --library-accent: #177966;
  --library-accent-soft: #edf7f4;
  --library-amber: #9a650b;
  --library-amber-soft: #fff8e7;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

[data-command-library="vault"].library-owner-v1 > .panel {
  min-width: 0;
  padding: 16px;
  border-color: var(--library-line);
  border-radius: 8px;
  background: #fff;
}

[data-command-library="vault"].library-owner-v1 > .library-overview-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-command-library="vault"] .library-entity-workspace {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
}

[data-command-library="vault"] .library-entity-workspace > .panel {
  grid-column: auto;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface, #fff);
  box-shadow: var(--library-card-shadow, none);
}

[data-command-library="vault"] .library-entity-workspace > .vault-library-list-panel {
  max-height: min(760px, calc(100vh - 190px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

[data-command-library="vault"] .library-list-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 8px 10px;
  min-width: 0;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface-soft);
}

/* The entity editor is itself scrollable. Keep tag creation in normal flow so
   the picker cannot be clipped by either the field or editor scroll boundary. */
[data-command-library="vault"] .vault-library-entry-form > .field:has(.cc-tag-picker.is-open) {
  grid-column: 1 / -1;
  overflow: visible;
}

[data-command-library="vault"] .vault-library-entry-form .cc-tag-picker.is-open .cc-tag-picker__panel {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  margin-top: 6px;
}

[data-command-library="vault"] .library-list-filter > .field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

[data-command-library="vault"] .library-list-filter .cc-tag-picker.is-open .cc-tag-picker__panel {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: none;
  max-height: min(340px, 46vh);
  margin-top: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

[data-command-library="vault"] .library-list-filter > .field small,
[data-command-library="vault"] [data-library-tag-filter-status] {
  color: var(--library-muted);
  font-size: 12px;
}

[data-command-library="vault"] [data-library-tag-filter-status] {
  grid-column: 1 / -1;
}

[data-command-library="vault"] .library-overview-canvas {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}

[data-command-library="vault"] .library-overview-canvas > [data-module-canvas-block] {
  min-width: 0;
}

[data-command-library="vault"] .library-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 12px;
}

[data-command-library="vault"] .library-section-head > div {
  min-width: 0;
}

[data-command-library="vault"] .library-section-head h3 {
  margin: 0;
  color: var(--library-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}

[data-command-library="vault"] .library-section-head p,
[data-command-library="vault"] .library-section-head > span:not(.library-state-chip) {
  margin: 3px 0 0;
  color: var(--library-muted);
  font-size: 12px;
  line-height: 1.45;
}

[data-command-library="vault"] .library-section-head > span:not(.library-state-chip) {
  flex: 0 0 auto;
  white-space: nowrap;
}

[data-command-library="vault"] .library-overview-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface, #fff);
}

[data-command-library="vault"] .library-overview-actions .mini-action {
  min-width: 0;
  min-height: 38px;
  gap: 7px;
  justify-content: center;
  text-align: center;
}

[data-command-library="vault"] .library-overview-actions [data-lucide] {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

[data-command-library="vault"] .library-overview-actions .is-primary {
  border-color: #126a59;
  background: var(--library-accent);
  color: #fff;
}

[data-command-library="vault"] .library-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--library-line);
  background: #fff;
  border-color: var(--library-line);
  border-radius: 6px;
}

[data-command-library="vault"] .library-summary .kpi {
  min-width: 0;
  min-height: 68px;
  padding: 11px 13px;
  border-color: var(--library-line-soft);
}

[data-command-library="vault"] .library-summary .kpi span {
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-summary .kpi strong {
  margin-top: 4px;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

[data-command-library="vault"] .library-overview-columns,
[data-command-library="vault"] .library-search-results {
  display: grid;
  gap: 18px;
}

[data-command-library="vault"] .library-search-results {
  position: relative;
  z-index: 1;
}

[data-command-library="vault"] .library-overview-columns {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  padding: 16px;
  border: 1px solid var(--library-line);
  background: #fff;
}

[data-command-library="vault"] .library-search-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-command-library="vault"] .library-overview-column {
  min-width: 0;
}

[data-command-library="vault"] .library-overview-column[data-module-canvas-block] {
  height: 100%;
  padding: 15px;
  overflow: auto;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface, #fff);
}

[data-command-library="vault"] .library-overview-column .library-section-head {
  margin-bottom: 8px;
}

[data-command-library="vault"] .library-overview-column--secondary {
  padding-left: 15px;
  border-left: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-overview-index {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-overview-index > .library-section-head {
  margin-bottom: 4px;
}

[data-command-library="vault"] .library-overview-index > .library-section-head h3 {
  font-size: 12px;
}

[data-command-library="vault"] .library-intelligence {
  display: grid;
  grid-template-columns: minmax(210px, 0.52fr) minmax(400px, 1.1fr) minmax(330px, 0.9fr);
  margin: 0;
  border: 1px solid var(--library-line);
  background: var(--library-surface-soft);
}

[data-command-library="vault"] .library-intelligence__readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-readiness-ring {
  position: relative;
  display: grid;
  width: 76px;
  max-width: 100%;
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(var(--library-accent) var(--ring-value), #dfe7e3 0);
}

[data-command-library="vault"] .library-readiness-ring[data-tone="preview"] {
  background: conic-gradient(#367eaa var(--ring-value), #dfe7e3 0);
}

[data-command-library="vault"] .library-readiness-ring::before {
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  background: #fff;
  content: "";
}

[data-command-library="vault"] .library-readiness-ring > span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1px;
  text-align: center;
}

[data-command-library="vault"] .library-readiness-ring strong {
  color: var(--library-ink);
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

[data-command-library="vault"] .library-readiness-ring small {
  color: var(--library-muted);
  font-size: 8px;
  line-height: 1.25;
}

[data-command-library="vault"] .library-intelligence__signals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

[data-command-library="vault"] .library-intelligence__signal {
  display: grid;
  min-width: 0;
  width: 100%;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 76px;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 8px;
  padding: 10px 12px;
  border-right: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-intelligence__signal:hover,
[data-command-library="vault"] .library-intelligence__signal:focus-visible {
  background: #eef5f2;
}

[data-command-library="vault"] .library-intelligence__signal [data-lucide] {
  width: 24px;
  height: 24px;
  grid-row: 1 / 3;
  padding: 5px;
  border: 1px solid var(--library-line);
  border-radius: 4px;
  color: var(--library-accent);
}

[data-command-library="vault"] .library-intelligence__signal[data-tone="preview"] [data-lucide] {
  color: #3279a8;
}

[data-command-library="vault"] .library-intelligence__signal[data-tone="incomplete"] [data-lucide] {
  color: var(--library-amber);
}

[data-command-library="vault"] .library-intelligence__signal[data-tone="unfiled"] [data-lucide] {
  color: #b54e5f;
}

[data-command-library="vault"] .library-intelligence__signal span {
  overflow: hidden;
  color: var(--library-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-command-library="vault"] .library-intelligence__signal strong {
  color: var(--library-ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

[data-command-library="vault"] .library-intelligence__types {
  min-width: 0;
  padding: 10px 14px;
}

[data-command-library="vault"] .library-intelligence__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

[data-command-library="vault"] .library-intelligence__head strong {
  font-size: 11px;
}

[data-command-library="vault"] .library-intelligence__head span,
[data-command-library="vault"] .library-intelligence__empty {
  color: var(--library-muted);
  font-size: 10px;
}

[data-command-library="vault"] .library-intelligence__type-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

[data-command-library="vault"] .library-intelligence__type-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(72px, 0.7fr) minmax(60px, 1fr) 20px;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}

[data-command-library="vault"] button.library-intelligence__type-row {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

[data-command-library="vault"] button.library-intelligence__type-row:hover > span,
[data-command-library="vault"] button.library-intelligence__type-row:focus-visible > span {
  color: var(--library-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-command-library="vault"] .library-intelligence__type-row > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-command-library="vault"] .library-intelligence__type-row > div {
  height: 5px;
  overflow: hidden;
  background: var(--library-line);
}

[data-command-library="vault"] .library-intelligence__type-row > div > i {
  display: block;
  height: 100%;
  background: var(--library-accent);
}

[data-command-library="vault"] .library-intelligence__type-row > strong {
  color: var(--library-muted);
  text-align: right;
}

[data-command-library="vault"] .list {
  min-width: 0;
  border-top-color: var(--library-line);
}

[data-command-library="vault"] .library-record {
  min-width: 0;
  border-bottom: 1px solid var(--library-line-soft);
  color: var(--library-ink);
}

[data-command-library="vault"] .library-record:last-child {
  border-bottom: 0;
}

[data-command-library="vault"] details.library-record > summary,
[data-command-library="vault"] details.library-secret-disclosure > summary {
  list-style: none;
}

[data-command-library="vault"] details.library-record > summary::-webkit-details-marker,
[data-command-library="vault"] details.library-secret-disclosure > summary::-webkit-details-marker {
  display: none;
}

[data-command-library="vault"] details:not([open]) > :not(summary) {
  display: none;
}

[data-command-library="vault"] .library-secret-disclosure {
  min-width: 0;
}

[data-command-library="vault"] .library-more-records {
  min-width: 0;
  border-bottom: 1px solid var(--library-line-soft);
}

[data-command-library="vault"] .library-more-records > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 9px 2px;
  color: var(--library-accent);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

[data-command-library="vault"] .library-more-records > summary::-webkit-details-marker {
  display: none;
}

[data-command-library="vault"] .library-more-records > summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}

[data-command-library="vault"] .library-more-records[open] > summary::after {
  content: "-";
}

[data-command-library="vault"] .library-more-record-list {
  min-width: 0;
  border-top: 1px solid var(--library-line-soft);
}

[data-command-library="vault"] .library-record-summary,
[data-command-library="vault"] .library-document-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 2px;
}

[data-command-library="vault"] .library-record-summary {
  cursor: pointer;
}

[data-command-library="vault"] .library-record-affordance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  min-height: 28px;
  padding: 0 5px 0 7px;
  border: 1px solid var(--library-line);
  border-radius: 4px;
  color: var(--library-accent);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

[data-command-library="vault"] .library-record-affordance svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

[data-command-library="vault"] details[open] > .library-record-summary .library-record-affordance {
  border-color: var(--library-accent);
  background: var(--library-accent-soft);
}

[data-command-library="vault"] details[open] > .library-record-summary .library-record-affordance svg {
  transform: rotate(180deg);
}

[data-command-library="vault"] .library-record-summary:hover,
[data-command-library="vault"] .library-document-record:hover {
  background: var(--library-surface-soft);
}

[data-command-library="vault"] .library-record-main {
  display: block;
  min-width: 0;
}

[data-command-library="vault"] .library-record-main strong {
  display: block;
  min-width: 0;
  color: var(--library-ink);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-record-main small {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--library-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-attachment-main {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

[data-command-library="vault"] .library-file-glyph {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--library-line);
  border-radius: 5px;
  background: var(--library-surface-soft);
  color: var(--library-accent);
}

[data-command-library="vault"] .library-file-glyph[data-tone="pdf"] {
  color: #d06672;
}

[data-command-library="vault"] .library-file-glyph[data-tone="image"] {
  color: #4d9dd2;
}

[data-command-library="vault"] .library-file-glyph[data-tone="text"] {
  color: var(--library-amber);
}

[data-command-library="vault"] .library-file-glyph [data-lucide] {
  width: 17px;
  height: 17px;
}

[data-command-library="vault"] .library-attachment-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

[data-command-library="vault"] .library-attachment-workbench {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  border-top: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-attachment-list {
  min-width: 0;
  grid-auto-rows: max-content;
  align-content: start;
  padding-right: 16px;
  border-top: 0;
}

[data-command-library="vault"] .library-attachment-insights {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-attachment-insights > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

[data-command-library="vault"] .library-attachment-insights > summary::-webkit-details-marker {
  display: none;
}

[data-command-library="vault"] .library-attachment-insights > summary > span:first-child {
  display: grid;
  gap: 2px;
}

[data-command-library="vault"] .library-attachment-insights > summary small {
  color: #4d9dd2;
  font-size: 9px;
  font-weight: 800;
}

[data-command-library="vault"] .library-attachment-insights > summary strong {
  color: var(--library-ink);
  font-size: 13px;
}

[data-command-library="vault"] .library-attachment-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--library-muted);
  font-size: 10px;
  white-space: nowrap;
}

[data-command-library="vault"] .library-attachment-ready [data-lucide] {
  width: 14px;
  height: 14px;
  color: var(--library-accent);
  transition: transform 160ms ease;
}

[data-command-library="vault"] .library-attachment-insights[open] .library-attachment-ready [data-lucide] {
  transform: rotate(180deg);
}

[data-command-library="vault"] .library-attachment-insights__body {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 4px 0 12px;
}

[data-command-library="vault"] .library-attachment-donut {
  display: grid;
  width: 86px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--library-accent) 0deg var(--library-preview-angle), var(--library-line) var(--library-preview-angle) 360deg);
}

[data-command-library="vault"] .library-attachment-donut::before {
  content: "";
  width: 62px;
  aspect-ratio: 1;
  grid-area: 1 / 1;
  border-radius: 50%;
  background: var(--library-surface-soft);
}

[data-command-library="vault"] .library-attachment-donut > span {
  display: grid;
  z-index: 1;
  grid-area: 1 / 1;
  gap: 1px;
  text-align: center;
}

[data-command-library="vault"] .library-attachment-donut strong {
  color: var(--library-ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

[data-command-library="vault"] .library-attachment-donut small {
  color: var(--library-muted);
  font-size: 9px;
}

[data-command-library="vault"] .library-attachment-type-list {
  display: grid;
  min-width: 0;
  gap: 7px;
}

[data-command-library="vault"] .library-attachment-type-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(44px, 1fr) 18px;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

[data-command-library="vault"] .library-attachment-type-row > div {
  height: 5px;
  overflow: hidden;
  background: var(--library-line);
}

[data-command-library="vault"] .library-attachment-type-row > div > i {
  display: block;
  height: 100%;
  background: #4d9dd2;
}

[data-command-library="vault"] .library-attachment-type-row > strong {
  color: var(--library-muted);
  text-align: right;
}

[data-command-library="vault"] .library-attachment-footprint {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-attachment-footprint > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
}

[data-command-library="vault"] .library-attachment-footprint > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-attachment-footprint dt,
[data-command-library="vault"] .library-attachment-footprint dd {
  margin: 0;
  font-size: 10px;
}

[data-command-library="vault"] .library-attachment-footprint dt {
  color: var(--library-muted);
}

[data-command-library="vault"] .library-attachment-footprint dd {
  color: var(--library-ink);
  font-weight: 750;
}

[data-command-library="vault"] .library-type-chip,
[data-command-library="vault"] .library-state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: 180px;
  padding: 3px 8px;
  border: 1px solid #d7e0dc;
  border-radius: 999px;
  background: #f5f7f6;
  color: #52615b;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-state-chip.is-pending,
[data-command-library="vault"] .library-state-chip.is-editing {
  border-color: #ead8ad;
  background: var(--library-amber-soft);
  color: var(--library-amber);
}

[data-command-library="vault"] .library-state-chip.is-safe {
  border-color: #bedbd2;
  background: var(--library-accent-soft);
  color: #126553;
}

[data-command-library="vault"] .library-state-chip.is-muted {
  color: var(--library-muted);
}

[data-command-library="vault"] .library-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 10px;
}

[data-command-library="vault"] .library-record-detail {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid var(--library-line-soft);
  background: var(--library-surface-soft);
}

[data-command-library="vault"] .library-metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  min-width: 0;
  margin: 0;
}

[data-command-library="vault"] .library-metadata-grid > div {
  min-width: 0;
}

[data-command-library="vault"] .library-metadata-grid > .is-wide {
  grid-column: 1 / -1;
}

[data-command-library="vault"] .library-metadata-grid dt {
  margin: 0 0 3px;
  color: var(--library-muted);
  font-size: 11px;
  line-height: 1.35;
}

[data-command-library="vault"] .library-metadata-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--library-ink);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-copyable-value {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

[data-command-library="vault"] .library-copyable-value > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-inline-action {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--library-line);
  border-radius: 4px;
  background: var(--library-surface);
  color: var(--library-accent);
  cursor: pointer;
}

[data-command-library="vault"] .library-inline-action:hover,
[data-command-library="vault"] .library-inline-action:focus-visible,
[data-command-library="vault"] .library-inline-action.is-success {
  border-color: #4d9dd2;
  background: color-mix(in srgb, #4d9dd2 13%, var(--library-surface));
  color: #4d9dd2;
}

[data-command-library="vault"] .library-inline-action [data-lucide] {
  width: 15px;
  height: 15px;
}

[data-command-library="vault"] .library-action-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[data-command-library="vault"] .library-empty-note {
  margin: 0;
  color: var(--library-muted);
  font-size: 12px;
}

[data-command-library="vault"] .library-attachment-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 12px;
}

[data-command-library="vault"] .library-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid #d6dfdb;
  border-radius: 5px;
  background: #fff;
  color: #255b50;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

[data-command-library="vault"] .library-attachment-chip [data-lucide] {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

[data-command-library="vault"] a.library-attachment-chip:hover {
  border-color: #90bdb1;
  background: var(--library-accent-soft);
}

[data-command-library="vault"] .library-attachment-chip--blocked,
[data-command-library="vault"] .library-attachment-chip.is-empty {
  color: var(--library-muted);
}

[data-command-library="vault"] .library-attachment-actions {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}

[data-command-library="vault"] .library-attachment-primary-action {
  display: flex;
  min-width: 0;
  align-items: center;
}

[data-command-library="vault"] .library-attachment-primary-action > * {
  min-width: 0;
  max-width: 100%;
}

[data-command-library="vault"] .library-attachment-replacement-input[hidden] {
  display: none;
}

[data-command-library="vault"] .library-attachment-actions .mini-action {
  min-width: 78px;
  min-height: 34px;
  justify-content: center;
}

[data-command-library="vault"] .library-attachment-actions[data-attachment-action-state="busy"] {
  opacity: 0.72;
}

[data-command-library="vault"] .library-attachment-action-status {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 16px;
  color: var(--library-muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-attachment-actions[data-attachment-action-state="error"] .library-attachment-action-status {
  color: #9b342c;
}

[data-command-library="vault"] .library-attachment-actions[data-attachment-action-state="success"] .library-attachment-action-status {
  color: #17634f;
}

[data-command-library="vault"] .library-attachment-line > .library-attachment-actions {
  flex: 1 1 360px;
}

[data-command-library="vault"] .library-record-actions > .library-attachment-actions {
  flex: 1 1 auto;
}

[data-command-library="vault"] .library-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--library-line-soft);
}

[data-command-library="vault"] .library-record-actions .library-safety-note {
  min-width: 0;
  margin-right: auto;
  color: var(--library-muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-secret-actions {
  margin-top: 0;
  padding: 10px 12px 12px;
}

[data-command-library="vault"] .library-secret-disclosure > .vault-secret-inline {
  margin: 10px 12px 0;
}

[data-command-library="vault"] .library-secret-actions .mini-action,
[data-command-library="vault"] .library-state-chip.is-safe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

[data-command-library="vault"] .library-secret-actions [data-lucide],
[data-command-library="vault"] .library-state-chip [data-lucide],
[data-command-library="vault"] .vault-secret-inline [data-lucide] {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

[data-command-library="vault"] .library-record-actions .mini-action,
[data-command-library="vault"] .library-head-actions .mini-action {
  flex: 0 0 auto;
  min-height: 36px;
}

[data-command-library="vault"] .library-record-actions [data-lucide],
[data-command-library="vault"] .library-head-actions [data-lucide] {
  width: 15px;
  height: 15px;
}

.library-preview-dialog {
  width: min(1080px, calc(100vw - 48px));
  height: min(780px, calc(100vh - 48px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #35504d;
  border-radius: 6px;
  background: #091514;
  color: #e7f0ee;
  box-shadow: 0 24px 80px rgb(0 0 0 / 55%);
}

.library-preview-dialog::backdrop {
  background: rgb(2 9 9 / 76%);
}

.library-preview-dialog > header,
.library-preview-dialog > footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #0d211f;
}

.library-preview-dialog > header {
  border-bottom: 1px solid #29403d;
}

.library-preview-dialog > footer {
  border-top: 1px solid #29403d;
  color: #91a7a3;
  font-size: 11px;
}

.library-preview-dialog > header > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.library-preview-dialog > header small {
  color: #55d6bd;
  font-size: 9px;
  font-weight: 800;
}

.library-preview-dialog > header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-preview-dialog__media {
  display: grid;
  height: calc(100% - 118px);
  place-items: center;
  overflow: auto;
  background: #07100f;
}

.library-preview-dialog__media iframe,
.library-preview-dialog__media img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #fff;
}

.library-pdf-preview {
  display: grid;
  position: relative;
  grid-template-rows: minmax(116px, 32%) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: 1px;
  background: #29403d;
}

.library-pdf-preview[data-preview-state="ready"] {
  display: block;
  background: #0d211f;
}

.library-pdf-preview[data-preview-state="error"] {
  display: block;
  background: #0d211f;
}

.library-pdf-preview[data-preview-state="error"] > iframe {
  display: none;
}

.library-pdf-preview__copy {
  min-height: 0;
  overflow: auto;
  padding: 14px 18px;
  background: #0d211f;
  color: #d4e7e2;
}

.library-pdf-preview__copy small {
  display: block;
  margin-bottom: 7px;
  color: #55d6bd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.library-pdf-preview__copy p {
  max-width: 86ch;
  margin: 0;
  color: #d4e7e2;
  font: 500 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.library-pdf-preview > iframe {
  min-height: 0;
}

.library-pdf-preview[data-preview-state="ready"] > iframe {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.library-pdf-preview[data-preview-state="ready"] .library-pdf-preview__copy {
  height: 100%;
  overflow: auto;
  background: #0d211f;
}

[data-command-library="vault"] .library-empty-state {
  display: grid;
  gap: 3px;
  min-height: 72px;
  align-content: center;
  padding: 12px 2px;
  color: var(--library-muted);
}

[data-command-library="vault"] .library-empty-state strong {
  color: #43514b;
  font-size: 13px;
  font-weight: 650;
}

[data-command-library="vault"] .library-empty-state small {
  font-size: 11px;
  line-height: 1.5;
}

[data-command-library="vault"] .library-editor-panel {
  align-self: start;
  min-height: 0;
}

[data-command-library="vault"] .library-editor-disclosure {
  min-width: 0;
}

[data-command-library="vault"] .library-editor-summary {
  margin-bottom: 0;
  list-style: none;
  cursor: pointer;
}

[data-command-library="vault"] .library-editor-summary::-webkit-details-marker {
  display: none;
}

[data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-summary {
  margin-bottom: 12px;
}

[data-command-library="vault"] .library-editor-body {
  min-height: 0;
}

[data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-body {
  max-height: min(700px, calc(100vh - 220px));
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

[data-command-library="vault"] .library-editor-panel[data-tab-panel="vault-entities"],
[data-command-library="vault"] .vault-library-list-panel[data-tab-panel="vault-entities"] {
  grid-column: span 6;
}

[data-command-library="vault"] .library-entity-workspace > .library-editor-panel[data-tab-panel="vault-entities"],
[data-command-library="vault"] .library-entity-workspace > .vault-library-list-panel[data-tab-panel="vault-entities"] {
  grid-column: auto;
}

[data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-body::-webkit-scrollbar {
  width: 9px;
}

[data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--library-accent) 48%, transparent);
  background-clip: padding-box;
}

[data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-body::-webkit-scrollbar-track {
  border-radius: 999px;
  background: color-mix(in srgb, var(--library-line) 72%, transparent);
}

[data-command-library="vault"] .library-editor-body > .library-form {
  min-width: 0;
  padding: 2px 2px 4px;
}

[data-command-library="vault"] .library-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
}

[data-command-library="vault"] .library-form .field {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

[data-command-library="vault"] .library-form .field small {
  color: #46554f;
  font-size: 12px;
  font-weight: 620;
}

[data-command-library="vault"] .library-form input,
[data-command-library="vault"] .library-form select,
[data-command-library="vault"] .library-form textarea,
[data-command-library="vault"] .library-search-row input,
[data-command-library="vault"] .library-search-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid #ccd7d2;
  border-radius: 5px;
  background: #fff;
  color: var(--library-ink);
  font-size: 13px;
}

[data-command-library="vault"] .library-form input,
[data-command-library="vault"] .library-form select,
[data-command-library="vault"] .library-search-row input,
[data-command-library="vault"] .library-search-row select {
  min-height: 40px;
  padding: 0 10px;
}

[data-command-library="vault"] .library-form textarea {
  min-height: 82px;
  padding: 9px 10px;
  line-height: 1.5;
  resize: vertical;
}

[data-command-library="vault"] .vault-secret-field,
[data-command-library="vault"] .vault-secret-inline__value-row {
  display: grid;
  min-width: 0;
  align-items: stretch;
}

[data-command-library="vault"] .vault-secret-field {
  grid-template-columns: minmax(0, 1fr) auto;
}

[data-command-library="vault"] .vault-secret-inline__value-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

[data-command-library="vault"] .vault-secret-field input,
[data-command-library="vault"] .vault-secret-inline__value-row input {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

[data-command-library="vault"] .vault-secret-field .mini-action,
[data-command-library="vault"] .vault-secret-inline__value-row .mini-action {
  min-width: 76px;
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  justify-content: center;
}

[data-command-library="vault"] .library-form input:focus,
[data-command-library="vault"] .library-form select:focus,
[data-command-library="vault"] .library-form textarea:focus,
[data-command-library="vault"] .library-search-row input:focus,
[data-command-library="vault"] .library-search-row select:focus {
  outline: 2px solid #9ccbc0;
  outline-offset: 1px;
  border-color: #7eb4a8;
}

[data-command-library="vault"] .library-form input[type="file"] {
  min-height: 42px;
  padding: 3px;
  color: var(--library-muted);
  font-size: 12px;
}

[data-command-library="vault"] .library-form input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 8px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid #d6dfdb;
  background: #f4f7f5;
  color: #263b34;
  font: inherit;
  cursor: pointer;
}

[data-command-library="vault"] .vault-library-entry-form {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 11px;
}

@media (min-width: 761px) {
  [data-command-library="vault"] .library-editor-panel .library-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  [data-command-library="vault"] .library-editor-panel .library-form > .field {
    position: relative;
    flex: 0 1 calc(50% - 6px);
    box-sizing: border-box;
    width: calc(50% - 6px);
    min-width: 180px;
    max-width: 100%;
    min-height: 64px;
    overflow: auto;
  }

  [data-command-library="vault"] .library-editor-panel .library-form > .field::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 11px;
    height: 11px;
    border-right: 2px solid color-mix(in srgb, var(--library-accent) 72%, transparent);
    border-bottom: 2px solid color-mix(in srgb, var(--library-accent) 72%, transparent);
    pointer-events: none;
  }

  [data-command-library="vault"] .library-editor-panel .library-form > .field > :is(input, textarea) {
    box-sizing: border-box;
    height: 100%;
    resize: none !important;
  }

  [data-command-library="vault"] .library-editor-panel .library-form > :is(.library-safety-callout, .finance-record-actions) {
    flex: 0 0 100%;
    width: 100%;
  }
}

[data-command-library="vault"] .vault-library-entry-form > .field {
  position: relative;
  flex: 0 1 auto;
  box-sizing: border-box;
  width: calc(50% - 6px);
  min-width: 220px;
  max-width: 100%;
  min-height: 64px;
  resize: none;
  overflow: auto;
}

[data-command-library="vault"] .vault-library-entry-form > .field::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 11px;
  height: 11px;
  border-right: 2px solid color-mix(in srgb, var(--library-accent) 72%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--library-accent) 72%, transparent);
  pointer-events: none;
}

[data-command-library="vault"] .vault-library-entry-form > .field > input,
[data-command-library="vault"] .vault-library-entry-form > .field > textarea {
  box-sizing: border-box;
  height: 100%;
  resize: none;
}

[data-command-library="vault"] .vault-library-entry-form > .field:nth-child(3),
[data-command-library="vault"] .vault-library-entry-form > .library-field-editor,
[data-command-library="vault"] .vault-library-entry-form > .library-attachment-picker,
[data-command-library="vault"] .vault-library-entry-form > .finance-record-actions {
  flex-basis: 100%;
  width: 100%;
}

[data-command-library="vault"] .vault-library-entry-form > .library-field-editor {
  grid-column: 1 / -1;
}

[data-command-library="vault"] .vault-library-entry-form > .field:nth-child(3) textarea {
  min-height: 96px;
  resize: none;
}

[data-command-library="vault"] .vault-library-entry-form .finance-record-actions {
  position: sticky;
  bottom: -4px;
  z-index: 2;
  margin-top: 2px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--library-line);
  background: color-mix(in srgb, var(--library-surface) 92%, transparent);
}

[data-command-library="vault"] .vault-library-entry-form .hud-button.primary {
  min-height: 44px;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--library-accent) 18%, transparent);
}

[data-command-library="vault"] .vault-library-entry-form .library-field-editor {
  padding: 12px;
  background: color-mix(in srgb, var(--library-surface-soft) 84%, white);
}

[data-command-library="vault"] .vault-library-entry-form .library-field-editor-row {
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr) 40px;
}

[data-command-library="vault"] .vault-library-entry-form .library-field-editor-delete {
  min-width: 40px;
  width: 40px;
  padding: 0;
  color: #9d4038;
  border-color: color-mix(in srgb, #9d4038 34%, var(--library-line));
}

[data-command-library="vault"] .vault-library-entry-form .library-attachment-picker {
  padding-top: 2px;
}

[data-command-library="vault"] .library-field-editor {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 6px;
  background: var(--library-surface-soft, #f7faf8);
}

[data-command-library="vault"] .library-field-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

[data-command-library="vault"] .library-field-editor-rows {
  display: grid;
  min-width: 0;
  gap: 8px;
}

[data-command-library="vault"] .library-field-editor-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr) auto;
  align-items: end;
  min-width: 0;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--library-line-soft, #e5ece8);
}

[data-command-library="vault"] .library-field-editor-cell {
  display: grid;
  min-width: 0;
  gap: 5px;
}

[data-command-library="vault"] .library-field-editor-cell > span,
[data-command-library="vault"] .library-field-editor-hint {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.4;
}

[data-command-library="vault"] .library-form .library-field-editor-cell textarea {
  min-height: 40px;
}

[data-command-library="vault"] .library-field-editor-delete {
  align-self: end;
  min-height: 40px;
}

[data-command-library="vault"] .library-field-editor-source[hidden] {
  display: none !important;
}

[data-command-library="vault"] .library-group-panel {
  display: grid;
  gap: 12px;
}

[data-command-library="vault"] .library-group-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 0.55fr) auto;
  align-items: end;
  gap: 10px;
}

[data-command-library="vault"] .library-group-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

[data-command-library="vault"] .library-group-create-row input,
[data-command-library="vault"] .library-group-filter select,
[data-command-library="vault"] .library-group-row-actions input,
[data-command-library="vault"] .library-group-assign select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  box-sizing: border-box;
  border: 1px solid var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #fff);
  color: var(--cc-ink, #17211c);
}

[data-command-library="vault"] .library-group-filter,
[data-command-library="vault"] .library-group-assign {
  display: grid;
  gap: 4px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

[data-command-library="vault"] .library-group-status {
  min-height: 20px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.4;
}

[data-command-library="vault"] .library-group-status[data-tone="success"] {
  color: var(--cc-positive, #177149);
}

[data-command-library="vault"] .library-group-status[data-tone="error"] {
  color: var(--cc-danger, #a23432);
}

[data-command-library="vault"] .library-group-list {
  display: grid;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

[data-command-library="vault"] .library-group-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(320px, 1.3fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

[data-command-library="vault"] .library-group-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

[data-command-library="vault"] .library-group-identity strong,
[data-command-library="vault"] .library-group-identity span {
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-group-identity span,
[data-command-library="vault"] .library-group-empty span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

[data-command-library="vault"] .library-group-row-actions {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 6px;
}

[data-command-library="vault"] .library-group-empty {
  display: grid;
  gap: 4px;
  padding: 12px 0;
}

[data-command-library="vault"] .library-group-assign {
  grid-template-columns: auto minmax(120px, 190px);
  align-items: center;
  margin-right: auto;
}

[data-command-library="vault"] [data-library-entity][hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  [data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-body {
    max-height: 62vh;
    padding-right: 2px;
  }

  [data-command-library="vault"] .vault-library-entry-form {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .library-field-editor,
  [data-command-library="vault"] .vault-library-entry-form > .library-attachment-picker,
  [data-command-library="vault"] .vault-library-entry-form > .finance-record-actions {
    grid-column: 1;
  }

  [data-command-library="vault"] .vault-library-entry-form .library-field-editor-row {
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: end;
  }

  [data-command-library="vault"] .vault-library-entry-form .library-field-editor-row > .library-field-editor-cell:nth-child(2) {
    grid-column: 1 / -1;
  }

  [data-command-library="vault"] .vault-library-entry-form .finance-record-actions {
    position: static;
  }

  [data-command-library="vault"] .library-attachment-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-command-library="vault"] .library-attachment-primary-action,
  [data-command-library="vault"] .library-attachment-action-status {
    grid-column: 1 / -1;
  }

  [data-command-library="vault"] .library-attachment-actions .mini-action {
    width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  [data-command-library="vault"] .library-record-actions > .library-attachment-actions {
    grid-column: 1 / -1;
  }

  [data-command-library="vault"] .library-field-editor-row {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-field-editor-delete {
    width: 100%;
  }

  [data-command-library="vault"] .library-group-toolbar,
  [data-command-library="vault"] .library-group-row,
  [data-command-library="vault"] .library-group-row-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-group-create-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  [data-command-library="vault"] .library-group-row-actions .mini-action {
    width: 100%;
  }

  [data-command-library="vault"] .library-group-assign {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
}

[data-command-library="vault"] .vault-library-entry-form > :nth-child(n + 5) {
  grid-column: 1 / -1;
}

[data-command-library="vault"] .library-form .hud-button.primary {
  min-height: 40px;
  border-color: #126a59;
  background: var(--library-accent);
  color: #fff;
}

[data-command-library="vault"] .library-form .hud-button.primary:hover {
  border-color: #0d5c4d;
  background: #126a59;
  color: #fff;
}

[data-command-library="vault"] .library-safety-callout {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  border-left: 3px solid #d1a13f;
  background: var(--library-amber-soft);
  color: #62490e;
}

[data-command-library="vault"] .library-safety-callout strong {
  font-size: 12px;
}

[data-command-library="vault"] .library-safety-callout span {
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-form-status {
  min-width: 0;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--library-line-soft);
  color: var(--library-muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-attachment-picker {
  display: grid;
  min-width: 0;
  gap: 7px;
}

[data-command-library="vault"] .library-attachment-picker > input[type="file"] {
  min-width: 0;
  width: 100%;
}

[data-command-library="vault"] .library-attachment-selection {
  min-width: 0;
  color: var(--library-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

[data-command-library="vault"] .library-attachment-progress {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface-soft);
}

[data-command-library="vault"] .library-attachment-progress[hidden] {
  display: none;
}

[data-command-library="vault"] .library-attachment-progress__label {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--library-muted);
  font-size: 11px;
}

[data-command-library="vault"] .library-attachment-progress__label strong {
  color: var(--library-ink);
  font-variant-numeric: tabular-nums;
}

[data-command-library="vault"] .library-attachment-progress__track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--library-line);
}

[data-command-library="vault"] .library-attachment-progress__track > i {
  display: block;
  width: var(--library-upload-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--library-accent);
  transition: width 120ms ease;
}

[data-command-library="vault"] .library-attachment-progress ol {
  display: grid;
  min-width: 0;
  max-height: 140px;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

[data-command-library="vault"] .library-attachment-progress li {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 4px 0;
  color: var(--library-muted);
  font-size: 10px;
}

[data-command-library="vault"] .library-attachment-progress li > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-command-library="vault"] .library-attachment-progress li > b {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: var(--library-upload-item-progress, 0%);
  background: color-mix(in srgb, var(--library-accent) 65%, transparent);
}

[data-command-library="vault"] .library-attachment-progress li[data-library-upload-status="failed"] > span:last-child {
  color: #a23d35;
}

[data-command-library="vault"] .library-attachment-progress li[data-library-upload-status="uploaded"] > span:last-child {
  color: var(--library-accent);
}

[data-command-library="vault"] .library-form-status.is-success {
  color: #17634f;
}

[data-command-library="vault"] .library-form-status.is-warning {
  color: #8a5414;
}

[data-command-library="vault"] .vault-secret-inline {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0 2px;
  padding: 10px;
  border: 1px solid #c9d8d2;
  border-left: 3px solid var(--library-accent);
  border-radius: 5px;
  background: #f4f8f6;
}

[data-command-library="vault"] .vault-secret-inline__label {
  color: #354b43;
  font-size: 11px;
  font-weight: 700;
}

[data-command-library="vault"] .vault-secret-inline input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #bfcfc8;
  border-radius: 5px;
  background: #fff;
  color: var(--library-ink);
  font: inherit;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

body.owner-shell-v1 [data-command-library="vault"] .vault-secret-inline {
  border-color: var(--cc-line);
  background: var(--cc-surface-muted);
}

body.owner-shell-v1 [data-command-library="vault"] .vault-secret-inline input {
  border-color: var(--cc-line);
  background: var(--cc-surface);
  color: var(--cc-ink);
}

/* Keep the Atlas library surfaces legible when the Owner shell is in dark mode. */
body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 {
  --library-line: var(--cc-line, #24414b);
  --library-line-soft: var(--cc-line-soft, #1b3540);
  --library-ink: var(--cc-ink, #eef7f8);
  --library-muted: var(--cc-ink-soft, #9db2b6);
  --library-surface-soft: var(--cc-surface-muted, #0d222c);
  --library-accent-soft: var(--cc-accent-soft, #103e43);
  --library-amber-soft: var(--cc-warning-soft, #3d3217);
}

body.owner-shell-v1 [data-command-library="vault"] .library-summary,
body.owner-shell-v1 [data-command-library="vault"] .library-overview-columns {
  background: var(--cc-surface, #0d1f27);
}

body.owner-shell-v1 [data-command-library="vault"] .library-attachment-chip {
  border-color: var(--cc-line, #24414b);
  background: var(--cc-surface, #0d1f27);
  color: var(--cc-ink, #eef7f8);
}

body.owner-shell-v1 [data-command-library="vault"] .library-readiness-ring::before {
  background: var(--cc-surface, #0d1f27);
}

body.owner-shell-v1 [data-command-library="vault"] .library-empty-state strong {
  color: var(--cc-ink, #eef7f8);
}

[data-command-library="vault"] .vault-secret-inline__status {
  color: var(--library-muted);
  font-size: 11px;
  line-height: 1.4;
}

[data-command-library="vault"] .vault-secret-inline__status.is-error {
  color: #9b342c;
}

[data-command-library="vault"] .vault-secret-inline__status.is-success {
  color: #17634f;
}

[data-command-library="vault"] [data-vault-secret-output][hidden] {
  display: none;
}

[data-command-library="vault"] .vault-library-list-panel,
[data-command-library="vault"] .vault-library-secret-list {
  align-self: start;
}

[data-command-library="vault"] .library-index-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--library-line);
}

[data-command-library="vault"] .library-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface-soft);
}

[data-command-library="vault"] .library-search-row .mini-action {
  min-height: 40px;
}

[data-command-library="vault"] .library-search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

[data-command-library="vault"] .library-search-tag-tools {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) auto minmax(240px, 1.2fr);
  align-items: end;
  gap: 8px;
  min-width: 0;
  margin: -8px 0 18px;
  padding: 10px;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--library-surface-soft) 92%, #e9f4ef);
}

[data-command-library="vault"] .library-search-tag-tools:has(.cc-tag-picker.is-open) {
  position: relative;
  z-index: 8;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] [data-command-library="vault"] .library-search-panel > .library-search-tag-tools:has(.cc-tag-picker.is-open) {
  z-index: 8 !important;
}

[data-command-library="vault"] .library-search-tag-tools > .field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

[data-command-library="vault"] .library-search-tag-tools > .field > small,
[data-command-library="vault"] [data-library-search-tag-status] {
  color: var(--library-muted);
  font-size: 12px;
}

[data-command-library="vault"] .library-search-tag-tools > .mini-action {
  min-height: 40px;
}

[data-command-library="vault"] [data-library-search-tag-status] {
  grid-column: 1 / -1;
}

[data-command-library="vault"] .library-head-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

@media (max-width: 1180px) {
  [data-command-library="vault"] .library-entity-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-entity-workspace > .vault-library-list-panel {
    min-height: 0;
    max-height: min(68vh, 760px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  [data-command-library="vault"] .library-editor-panel[data-tab-panel="vault-entities"],
  [data-command-library="vault"] .vault-library-list-panel[data-tab-panel="vault-entities"] {
    grid-column: 1 / -1;
  }

  [data-command-library="vault"] .library-attachment-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-attachment-list {
    padding-right: 0;
  }

  [data-command-library="vault"] .library-attachment-insights {
    padding-left: 0;
    border-top: 1px solid var(--library-line);
    border-left: 0;
  }

  [data-command-library="vault"] .library-intelligence {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-intelligence__readiness {
    border-right: 0;
    border-bottom: 1px solid var(--library-line);
  }

  [data-command-library="vault"] .library-intelligence__types {
    border-top: 1px solid var(--library-line);
  }

  [data-command-library="vault"] .library-overview-columns,
  [data-command-library="vault"] .library-search-results {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-search-results {
    gap: 16px;
  }

  [data-command-library="vault"] .library-overview-column--secondary {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid var(--library-line);
    border-left: 0;
  }

  [data-command-library="vault"] .library-overview-column--secondary[data-module-canvas-block] {
    padding: 15px;
    border: 1px solid var(--library-line);
  }
}

@media (max-width: 760px) {
  [data-command-library="vault"] .library-search-tag-tools {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -6px;
    padding: 9px;
  }

  [data-command-library="vault"] .library-search-tag-tools > .mini-action,
  [data-command-library="vault"] [data-library-search-tag-status] {
    grid-column: 1;
  }

  [data-command-library="vault"] .library-list-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-list-filter > .mini-action,
  [data-command-library="vault"] [data-library-tag-filter-status] {
    grid-column: 1;
  }

  /* Five vault views fit the visible tab rail. The shared rail already owns
     the arrow controls, so its own gaps must not be added on top here. */
  body:has([data-command-library="vault"].library-owner-v1) #moduleTabs {
    gap: 0;
    padding-inline: 0;
  }

  body:has([data-command-library="vault"].library-owner-v1) #moduleTabs .tab {
    flex: 0 0 20%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 3px;
    font-size: 12px;
  }

  [data-command-library="vault"].library-owner-v1 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  [data-command-library="vault"].library-owner-v1 > .panel {
    grid-column: 1 / -1;
    width: 100%;
    padding: 13px 12px;
  }

  [data-command-library="vault"].library-owner-v1 > .library-overview-panel {
    padding: 0;
  }

  [data-command-library="vault"] .library-editor-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    min-height: 46px;
  }

  [data-command-library="vault"] .library-editor-summary::after {
    content: "展开";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 30px;
    padding: 0 8px;
    border: 1px solid var(--library-line);
    border-radius: 4px;
    background: var(--library-surface-soft);
    color: var(--library-accent);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
  }

  [data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-summary::after {
    content: "收起";
    border-color: var(--library-accent);
    background: var(--library-accent-soft);
  }

  [data-command-library="vault"] .library-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
  }

  [data-command-library="vault"] .library-intelligence {
    margin: 0;
  }

  [data-command-library="vault"] .library-intelligence__readiness {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px;
  }

  [data-command-library="vault"] .library-readiness-ring {
    width: 70px;
  }

  [data-command-library="vault"] .library-intelligence__signals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-command-library="vault"] .library-intelligence__signal {
    min-height: 64px;
    border-bottom: 1px solid var(--library-line);
  }

  [data-command-library="vault"] .library-intelligence__signal:nth-child(2n) {
    border-right: 0;
  }

  [data-command-library="vault"] .library-intelligence__signal:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  [data-command-library="vault"] .library-intelligence__type-list {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-overview-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-command-library="vault"] .library-overview-actions .mini-action {
    min-height: 42px;
  }

  [data-command-library="vault"] .library-overview-actions > :last-child {
    grid-column: 1 / -1;
  }

  [data-command-library="vault"] .library-summary .kpi {
    min-height: 62px;
    border-right: 1px solid var(--library-line-soft);
    border-bottom: 1px solid var(--library-line-soft);
  }

  [data-command-library="vault"] .library-summary .kpi:nth-child(2n) {
    border-right: 0;
  }

  [data-command-library="vault"] .library-summary .kpi:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  [data-command-library="vault"] .library-overview-columns,
  [data-command-library="vault"] .library-search-results {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  [data-command-library="vault"] .library-overview-columns {
    padding: 12px;
  }

  [data-command-library="vault"] .library-record-summary,
  [data-command-library="vault"] .library-document-record {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 60px;
    padding: 10px 2px;
  }

  [data-command-library="vault"] .library-attachment-state {
    display: inline-flex;
    justify-content: flex-end;
  }

  [data-command-library="vault"] .library-attachment-state .library-type-chip {
    display: none;
  }

  [data-command-library="vault"] .library-attachment-state .library-state-chip {
    max-width: 74px;
    padding-inline: 6px;
    font-size: 9px;
  }

  [data-command-library="vault"] .library-attachment-insights {
    grid-row: 1;
    border-top: 0;
    border-bottom: 1px solid var(--library-line);
  }

  [data-command-library="vault"] .library-attachment-list {
    grid-row: 2;
  }

  [data-command-library="vault"] .library-attachment-insights > summary {
    min-height: 48px;
  }

  [data-command-library="vault"] .library-record-affordance {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  [data-command-library="vault"] .library-record-summary {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  [data-command-library="vault"] .library-record-summary .library-type-chip,
  [data-command-library="vault"] .library-record-summary .library-state-chip {
    grid-column: 2;
    grid-row: 1;
    max-width: 112px;
  }

  [data-command-library="vault"] .library-metadata-grid,
  [data-command-library="vault"] .vault-library-entry-form {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-attachment-record[open] .library-metadata-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  [data-command-library="vault"] .library-attachment-record[open] .library-metadata-grid > div:first-child {
    display: none;
  }

  [data-command-library="vault"] .library-metadata-grid > .is-wide,
  [data-command-library="vault"] .vault-library-entry-form > * {
    grid-column: 1;
  }

  [data-command-library="vault"] .library-record-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  [data-command-library="vault"] .library-record-actions .library-safety-note {
    grid-column: 1 / -1;
    margin: 0;
  }

  [data-command-library="vault"] .library-record-actions .mini-action {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }

  [data-command-library="vault"] .vault-secret-inline__value-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  [data-command-library="vault"] .vault-secret-inline__value-row input {
    grid-column: 1 / -1;
    border-radius: 5px;
  }

  [data-command-library="vault"] .vault-secret-inline__value-row .mini-action {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border-left: 1px solid var(--library-line);
    border-radius: 5px;
  }

  [data-command-library="vault"] .library-search-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 9px;
  }

  [data-command-library="vault"] .library-search-row .mini-action,
  [data-command-library="vault"] .library-form .hud-button,
  [data-command-library="vault"] .library-form .mini-action {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form {
    gap: 6px;
  }

  [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form textarea {
    min-height: 62px;
  }

  [data-command-library="vault"] .library-form .finance-record-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  [data-command-library="vault"] .library-section-head {
    gap: 8px;
  }

  [data-command-library="vault"] .library-head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  [data-command-library="vault"] .library-overview-column > .library-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  [data-command-library="vault"] .library-overview-column > .library-section-head .library-head-actions {
    grid-template-columns: auto auto;
    width: auto;
  }

  /* The list header has a title beside its actions. Keep the action rail
     intrinsic there; a full-width rail makes the archive link protrude past
     the viewport on narrow screens. */
  [data-command-library="vault"] .vault-library-list-panel > .library-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  [data-command-library="vault"] .vault-library-list-panel > .library-section-head .library-head-actions {
    width: auto;
    grid-template-columns: auto auto;
    max-width: 100%;
  }

  [data-command-library="vault"] .library-attachments-panel > .library-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-attachment-chip {
    min-height: 34px;
  }

  .library-preview-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 24px);
    max-width: none;
    max-height: none;
  }

  .library-preview-dialog__media {
    height: calc(100% - 116px);
  }
}

@media (max-width: 380px) {
  [data-command-library="vault"] .library-section-head {
    flex-wrap: wrap;
  }

  [data-command-library="vault"] .library-record-summary,
  [data-command-library="vault"] .library-document-record {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-record-summary .library-type-chip,
  [data-command-library="vault"] .library-record-summary .library-state-chip,
  [data-command-library="vault"] .library-record-affordance {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  [data-command-library="vault"],
  [data-command-library="vault"] * {
    box-sizing: border-box;
  }

  [data-command-library="vault"] :is(input, select, textarea, button, .mini-action, .hud-button) {
    max-width: 100%;
  }

  [data-command-library="vault"] .library-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  [data-command-library="vault"] .library-editor-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  [data-command-library="vault"] .library-editor-summary > div {
    grid-column: 1;
    grid-row: 1;
  }

  [data-command-library="vault"] .library-editor-summary > .library-state-chip {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  [data-command-library="vault"] .library-editor-summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  [data-command-library="vault"] .library-section-head > span:not(.library-state-chip) {
    white-space: normal;
  }

  [data-command-library="vault"] .library-summary,
  [data-command-library="vault"] .library-intelligence__readiness,
  [data-command-library="vault"] .library-intelligence__signals,
  [data-command-library="vault"] .library-head-actions,
  [data-command-library="vault"] .library-record-actions,
  [data-command-library="vault"] .vault-secret-inline__value-row {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-overview-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-command-library="vault"] .library-overview-actions > :last-child {
    grid-column: 1 / -1;
  }

  [data-command-library="vault"] .library-record-summary,
  [data-command-library="vault"] .library-document-record {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .library-record-summary .library-type-chip,
  [data-command-library="vault"] .library-record-summary .library-state-chip,
  [data-command-library="vault"] .library-record-affordance {
    grid-column: 1;
    grid-row: auto;
    max-width: 100%;
    justify-self: start;
  }

  [data-command-library="vault"] .library-record-actions .mini-action,
  [data-command-library="vault"] .library-head-actions .mini-action,
  [data-command-library="vault"] .library-overview-actions .mini-action {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  [data-command-library="vault"] .vault-library-list-panel > .library-section-head,
  [data-command-library="vault"] .library-overview-column > .library-section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-command-library="vault"] .vault-library-list-panel > .library-section-head .library-head-actions,
  [data-command-library="vault"] .library-overview-column > .library-section-head .library-head-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* owner-shell-v1: premium archive cards for the Vault without changing behavior. */
body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 {
  --library-surface: rgb(252 251 246 / 93%);
  --library-surface-solid: #fbfaf5;
  --library-surface-soft: rgb(239 244 241 / 90%);
  --library-surface-hover: rgb(235 245 241 / 96%);
  --library-surface-open: rgb(228 240 235 / 97%);
  --library-line: rgb(44 80 74 / 20%);
  --library-line-soft: rgb(44 80 74 / 13%);
  --library-ink: #18302d;
  --library-muted: #627773;
  --library-accent: #176f5e;
  --library-accent-soft: #e3f1ec;
  --library-card-shadow: 0 1px 0 rgb(255 255 255 / 84%), 0 8px 24px rgb(30 56 51 / 10%), 0 2px 6px rgb(30 56 51 / 7%);
  --library-card-shadow-hover: 0 1px 0 rgb(255 255 255 / 90%), 0 13px 30px rgb(27 65 57 / 14%), 0 3px 8px rgb(27 65 57 / 8%);
  gap: 12px;
}

html[data-theme="night"] body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 {
  --library-surface: rgb(12 26 27 / 94%);
  --library-surface-solid: #0e2021;
  --library-surface-soft: rgb(17 37 37 / 95%);
  --library-surface-hover: rgb(20 46 44 / 97%);
  --library-surface-open: rgb(18 50 46 / 98%);
  --library-line: rgb(121 181 169 / 20%);
  --library-line-soft: rgb(121 181 169 / 12%);
  --library-ink: #e4efec;
  --library-muted: #95aaa5;
  --library-accent: #5bd0b7;
  --library-accent-soft: #153d36;
  --library-amber: #e0aa59;
  --library-amber-soft: #3a2c19;
  --library-card-shadow: 0 1px 0 rgb(165 225 212 / 5%), 0 12px 28px rgb(0 0 0 / 31%), 0 3px 8px rgb(0 0 0 / 24%);
  --library-card-shadow-hover: 0 1px 0 rgb(165 225 212 / 8%), 0 16px 34px rgb(0 0 0 / 39%), 0 4px 10px rgb(0 0 0 / 29%);
}

body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel:not(.library-overview-panel),
body.owner-shell-v1 [data-command-library="vault"] .library-overview-actions,
body.owner-shell-v1 [data-command-library="vault"] .library-summary,
body.owner-shell-v1 [data-command-library="vault"] .library-intelligence,
body.owner-shell-v1 [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
body.owner-shell-v1 [data-command-library="vault"] .library-overview-columns {
  overflow: hidden;
  border: 1px solid var(--library-line);
  border-radius: 6px;
  background: var(--library-surface);
  box-shadow: var(--library-card-shadow);
  backdrop-filter: blur(13px) saturate(112%);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel:not(.library-overview-panel) {
  padding: 15px;
}

body.owner-shell-v1 [data-command-library="vault"] .library-summary {
  margin: 0;
}

body.owner-shell-v1 [data-command-library="vault"] .library-summary .kpi {
  min-height: 70px;
  border-color: var(--library-line-soft);
  background: transparent;
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence {
  margin: 0;
  background: var(--library-surface-soft);
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__readiness,
body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal,
body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__types {
  border-color: var(--library-line);
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal {
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal:hover,
body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal:focus-visible {
  background: var(--library-surface-hover);
  box-shadow: inset 0 -2px 0 var(--library-accent);
}

body.owner-shell-v1 [data-command-library="vault"] .library-readiness-ring::before {
  background: var(--library-surface-solid);
}

body.owner-shell-v1 [data-command-library="vault"] .library-overview-columns {
  padding: 15px;
}

body.owner-shell-v1 [data-command-library="vault"] .library-section-head {
  min-width: 0;
  margin-bottom: 11px;
}

body.owner-shell-v1 [data-command-library="vault"] .library-section-head h3 {
  color: var(--library-ink);
}

body.owner-shell-v1 [data-command-library="vault"] :is(.library-section-head p, .library-section-head > span:not(.library-state-chip), .library-record-main small, .library-empty-note, .library-safety-note) {
  color: var(--library-muted);
}

body.owner-shell-v1 [data-command-library="vault"] .list,
body.owner-shell-v1 [data-command-library="vault"] .library-more-record-list {
  display: grid;
  gap: 5px;
  border-top: 0;
  background: transparent;
}

body.owner-shell-v1 [data-command-library="vault"] .library-record {
  overflow: hidden;
  border: 1px solid var(--library-line-soft);
  border-radius: 5px;
  background: var(--library-surface-solid);
  color: var(--library-ink);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1 [data-command-library="vault"] .library-record-summary,
body.owner-shell-v1 [data-command-library="vault"] .library-document-record {
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 5px;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1 [data-command-library="vault"] .library-document-record {
  border: 1px solid var(--library-line-soft);
  background: var(--library-surface-solid);
}

body.owner-shell-v1 [data-command-library="vault"] .library-record-summary:hover,
body.owner-shell-v1 [data-command-library="vault"] .library-record-summary:focus-visible,
body.owner-shell-v1 [data-command-library="vault"] .library-document-record:hover,
body.owner-shell-v1 [data-command-library="vault"] .library-document-record:focus-within {
  background: var(--library-surface-hover);
}

body.owner-shell-v1 [data-command-library="vault"] .library-record[open] {
  border-color: color-mix(in srgb, var(--library-accent) 58%, var(--library-line));
  box-shadow: 0 7px 18px rgb(28 67 59 / 9%);
}

html[data-theme="night"] body.owner-shell-v1 [data-command-library="vault"] .library-record[open] {
  box-shadow: 0 8px 22px rgb(0 0 0 / 29%);
}

body.owner-shell-v1 [data-command-library="vault"] .library-record[open] > .library-record-summary,
body.owner-shell-v1 [data-command-library="vault"] .library-secret-disclosure[open] > .library-record-summary {
  background: var(--library-surface-open);
  box-shadow: inset 3px 0 0 var(--library-accent);
}

body.owner-shell-v1 [data-command-library="vault"] .library-record-detail,
body.owner-shell-v1 [data-command-library="vault"] .library-attachment-insights,
body.owner-shell-v1 [data-command-library="vault"] .library-field-editor {
  border-color: var(--library-line-soft);
  background: var(--library-surface-soft);
}

body.owner-shell-v1 [data-command-library="vault"] .library-record-affordance,
body.owner-shell-v1 [data-command-library="vault"] .library-inline-action,
body.owner-shell-v1 [data-command-library="vault"] .library-file-glyph,
body.owner-shell-v1 [data-command-library="vault"] .library-attachment-chip {
  border-color: var(--library-line);
  border-radius: 5px;
  background: var(--library-surface-solid);
}

body.owner-shell-v1 [data-command-library="vault"] :is(.library-record-affordance, .library-inline-action, .library-attachment-chip):hover,
body.owner-shell-v1 [data-command-library="vault"] :is(.library-record-affordance, .library-inline-action, .library-attachment-chip):focus-visible {
  border-color: color-mix(in srgb, var(--library-accent) 62%, var(--library-line));
  background: var(--library-surface-hover);
}

body.owner-shell-v1 [data-command-library="vault"] .library-type-chip,
body.owner-shell-v1 [data-command-library="vault"] .library-state-chip {
  border-color: var(--library-line);
  border-radius: 6px;
  background: var(--library-surface-soft);
  color: var(--library-muted);
}

body.owner-shell-v1 [data-command-library="vault"] .library-state-chip.is-safe {
  border-color: color-mix(in srgb, var(--library-accent) 45%, var(--library-line));
  background: var(--library-accent-soft);
  color: var(--library-accent);
}

body.owner-shell-v1 [data-command-library="vault"] .library-state-chip:is(.is-pending, .is-editing) {
  border-color: color-mix(in srgb, var(--library-amber) 45%, var(--library-line));
  background: var(--library-amber-soft);
  color: var(--library-amber);
}

body.owner-shell-v1 [data-command-library="vault"] :is(.library-form input, .library-form select, .library-form textarea, .library-search-row input, .library-search-row select, .library-group-create-row input, .library-group-filter select, .library-group-row-actions input, .library-group-assign select) {
  border-color: var(--library-line);
  border-radius: 5px;
  background: var(--library-surface-solid);
  color: var(--library-ink);
}

body.owner-shell-v1 [data-command-library="vault"] :is(.library-form input, .library-form select, .library-form textarea, .library-search-row input, .library-search-row select):focus {
  border-color: var(--library-accent);
  outline-color: color-mix(in srgb, var(--library-accent) 48%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--library-accent) 14%, transparent);
}

body.owner-shell-v1 [data-command-library="vault"] .library-editor-summary {
  padding: 3px 2px;
  border-radius: 5px;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1 [data-command-library="vault"] .library-editor-summary:hover,
body.owner-shell-v1 [data-command-library="vault"] .library-editor-summary:focus-visible {
  background: var(--library-surface-hover);
}

body.owner-shell-v1 [data-command-library="vault"] .library-editor-disclosure[open] > .library-editor-summary {
  padding-inline: 8px;
  background: var(--library-surface-open);
  box-shadow: inset 3px 0 0 var(--library-accent);
}

body.owner-shell-v1 [data-command-library="vault"] .library-group-list {
  gap: 5px;
  border-top: 0;
}

body.owner-shell-v1 [data-command-library="vault"] .library-group-row {
  padding: 9px 10px;
  border: 1px solid var(--library-line-soft);
  border-radius: 5px;
  background: var(--library-surface-solid);
  transition: border-color 140ms ease, background-color 140ms ease;
}

body.owner-shell-v1 [data-command-library="vault"] .library-group-row:hover,
body.owner-shell-v1 [data-command-library="vault"] .library-group-row:focus-within {
  border-color: var(--library-line);
  background: var(--library-surface-hover);
}

body.owner-shell-v1 [data-command-library="vault"] :is(.library-empty-state, .library-group-empty, .library-intelligence__empty) {
  min-height: 86px;
  margin: 6px 0;
  padding: 15px;
  border: 1px dashed color-mix(in srgb, var(--library-accent) 42%, var(--library-line));
  border-radius: 6px;
  background: var(--library-surface-soft);
  text-align: center;
}

body.owner-shell-v1 [data-command-library="vault"] .library-empty-state strong {
  color: var(--library-ink);
}

body.owner-shell-v1 [data-command-library="vault"] .library-search-row {
  border-color: var(--library-line);
  border-radius: 5px;
  background: var(--library-surface-soft);
}

@media (hover: hover) {
  body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel:not(.library-overview-panel):hover,
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-actions:hover,
  body.owner-shell-v1 [data-command-library="vault"] .library-summary:hover,
  body.owner-shell-v1 [data-command-library="vault"] .library-intelligence:hover,
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-column[data-module-canvas-block]:hover,
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-columns:hover {
    border-color: color-mix(in srgb, var(--library-accent) 38%, var(--library-line));
    box-shadow: var(--library-card-shadow-hover);
  }
}

@media (max-width: 430px) {
  body.owner-shell-v1 [data-command-library="vault"].library-owner-v1,
  body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel,
  body.owner-shell-v1 [data-command-library="vault"] :is(.library-overview-actions, .library-summary, .library-intelligence, .library-overview-column[data-module-canvas-block], .library-overview-columns, .library-record, .library-document-record) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 {
    gap: 8px;
  }

  body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel:not(.library-overview-panel),
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-columns {
    padding: 11px;
  }

  body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel:not(.library-overview-panel),
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-actions,
  body.owner-shell-v1 [data-command-library="vault"] .library-summary,
  body.owner-shell-v1 [data-command-library="vault"] .library-intelligence,
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
  body.owner-shell-v1 [data-command-library="vault"] .library-overview-columns {
    border-radius: 5px;
    box-shadow: 0 4px 14px rgb(30 56 51 / 9%);
  }

  body.owner-shell-v1 [data-command-library="vault"] .library-summary .kpi {
    min-height: 62px;
    padding: 9px 10px;
  }

  body.owner-shell-v1 [data-command-library="vault"] .library-record-summary,
  body.owner-shell-v1 [data-command-library="vault"] .library-document-record {
    min-height: 58px;
    padding: 9px;
  }

  body.owner-shell-v1 [data-command-library="vault"] .library-record-detail,
  body.owner-shell-v1 [data-command-library="vault"] .library-field-editor,
  body.owner-shell-v1 [data-command-library="vault"] .library-search-row {
    padding: 9px;
  }

  body.owner-shell-v1 [data-command-library="vault"] .library-record-main :is(strong, small),
  body.owner-shell-v1 [data-command-library="vault"] .library-section-head :is(h3, p, span),
  body.owner-shell-v1 [data-command-library="vault"] .library-attachment-chip,
  body.owner-shell-v1 [data-command-library="vault"] .library-safety-note {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  body.owner-shell-v1 [data-command-library="vault"] .library-group-row,
  body.owner-shell-v1 [data-command-library="vault"] .library-group-row-actions,
  body.owner-shell-v1 [data-command-library="vault"] .library-attachment-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 [data-command-library="vault"] .library-attachment-primary-action,
  body.owner-shell-v1 [data-command-library="vault"] .library-attachment-action-status {
    grid-column: 1;
  }
}

/* The list is a scroll viewport; the surrounding owner card may clip its own decoration. */
body.owner-shell-v1 [data-command-library="vault"] .library-entity-workspace > .vault-library-list-panel {
  min-height: 0;
  max-height: min(68vh, 760px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .library-owner-v1 .library-entity-workspace .vault-library-list-panel {
  min-height: 0 !important;
  height: auto !important;
  max-height: min(68vh, 760px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
/* Long vault lists use a compact, wrapping pager that stays inside the card. */
.library-vault-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.25rem 0.15rem;
  color: var(--library-muted, #8fa7aa);
  font-size: 0.82rem;
}

.library-vault-pagination[hidden] {
  display: none;
}

.library-vault-pagination [disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 540px) {
  .library-vault-pagination {
    justify-content: space-between;
    gap: 0.4rem;
  }

  .library-vault-pagination [data-library-page] {
    max-width: 46%;
    text-align: center;
    overflow-wrap: anywhere;
  }
}


/* source: styles/profile-owner-v1.css */
.cc-profile {
  --profile-rule: var(--cc-line, #d9e0dc);
  --profile-muted: var(--cc-surface-muted, #f8faf9);
  --profile-emphasis: var(--cc-accent, #176b50);
  align-content: start;
  color: var(--cc-ink, #17211d);
  letter-spacing: 0;
}

html[data-theme="night"] .cc-profile {
  --profile-rule: var(--cc-line, #29434e);
  --profile-muted: var(--cc-surface-muted, #13232b);
  --profile-emphasis: var(--cc-accent, #2dd4bf);
}

.cc-profile .panel {
  overflow: visible;
}

.cc-profile__overview-canvas {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}

.cc-profile__overview-canvas > [data-module-canvas-block] {
  min-width: 0;
}

.cc-profile__overview-canvas [data-module-canvas-block] {
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--profile-rule);
  border-radius: 4px;
  background: var(--cc-surface, #fff);
}

.cc-profile__overview-head[data-module-canvas-block] {
  padding: 18px 20px;
  border-top: 3px solid var(--profile-emphasis);
}

.cc-profile__summary-grid[data-module-canvas-block] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--profile-rule);
}

.cc-profile__summary-grid[data-module-canvas-block] > div,
.cc-profile__summary-grid[data-module-canvas-block] > div:first-child {
  min-height: 50%;
  padding: 14px 15px;
  border-right: 1px solid var(--profile-rule);
  border-bottom: 1px solid var(--profile-rule);
}

.cc-profile__summary-grid[data-module-canvas-block] > div:nth-child(2n) {
  border-right: 0;
}

.cc-profile__summary-grid[data-module-canvas-block] > div:nth-child(n + 3) {
  border-bottom: 0;
}

.cc-profile__structure-entry[data-module-canvas-block] {
  padding: 17px 18px;
  border-left: 3px solid var(--profile-emphasis);
  background: color-mix(in srgb, var(--profile-emphasis) 5%, var(--cc-surface, #fff));
}

.cc-profile__overview-foot[data-module-canvas-block] {
  align-items: stretch;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px 18px;
  border-top: 3px solid color-mix(in srgb, #b48a45 72%, var(--profile-rule));
}

.cc-profile__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--profile-emphasis);
  font-family: var(--cc-font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.cc-profile__overview-head,
.cc-profile__editor-head,
.cc-profile__overview-foot,
.cc-profile__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cc-profile__overview-head h3,
.cc-profile__editor-head h3 {
  margin: 0;
  color: var(--cc-ink, #17211d);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.cc-profile__overview-head p,
.cc-profile__editor-head p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 13px;
  line-height: 1.65;
}

.cc-profile__completion {
  display: grid;
  width: 116px;
  min-width: 116px;
  min-height: 76px;
  align-content: center;
  justify-items: end;
  border-left: 3px solid var(--profile-emphasis);
  padding-left: 20px;
}

.cc-profile__completion strong {
  color: var(--profile-emphasis);
  font-size: 28px;
  line-height: 1;
}

.cc-profile__completion span {
  margin-top: 8px;
  color: var(--cc-ink-faint, #7b8781);
  font-family: var(--cc-font-mono, monospace);
  font-size: 12px;
}

.cc-profile__summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border-block: 1px solid var(--profile-rule);
}

.cc-profile__summary-grid > div {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--profile-rule);
}

.cc-profile__summary-grid > div:first-child {
  padding-left: 0;
}

.cc-profile__summary-grid > div:last-child {
  border-right: 0;
}

.cc-profile__summary-grid span,
.cc-profile__saved-at span,
.cc-profile__overview-foot > div > span {
  display: block;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  line-height: 1.4;
}

.cc-profile__summary-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--cc-ink, #17211d);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.cc-profile__overview-foot {
  align-items: flex-end;
  margin-top: 20px;
}

.cc-profile__structure-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 34%, var(--profile-rule));
  border-left: 4px solid var(--profile-emphasis);
  border-radius: 8px;
  background: color-mix(in srgb, var(--profile-emphasis) 7%, var(--cc-surface, #fff));
  padding: 14px 16px;
}

.cc-profile__structure-entry > div {
  min-width: 0;
}

.cc-profile__structure-entry strong {
  display: block;
  color: var(--cc-ink, #17211d);
  font-size: 15px;
}

.cc-profile__structure-entry p {
  margin: 6px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.5;
}

.cc-profile__missing {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cc-profile__missing span {
  border: 1px solid var(--profile-rule);
  border-radius: 4px;
  background: var(--profile-muted);
  padding: 4px 7px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
}

.cc-profile__all-fields {
  margin-top: 16px;
  min-width: 0;
  border: 1px solid var(--profile-rule);
  border-top: 3px solid var(--profile-emphasis);
  background: var(--cc-surface, #fff);
}

.cc-profile__all-fields-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 18px;
}

.cc-profile__all-fields-head h3 {
  margin: 0;
  color: var(--cc-ink, #17211d);
  font-size: 17px;
  letter-spacing: 0;
}

.cc-profile__all-fields-head p {
  margin: 5px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.5;
}

.cc-profile__all-fields-head > strong {
  flex: 0 0 auto;
  color: var(--profile-emphasis);
  font-family: var(--cc-font-mono, monospace);
  font-size: 12px;
}

.cc-profile__view-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--profile-rule);
}

.cc-profile__view-group {
  min-width: 0;
  padding: 0 18px 12px;
}

.cc-profile__view-group:nth-child(2n) {
  border-left: 1px solid var(--profile-rule);
}

.cc-profile__view-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--profile-rule);
}

.cc-profile__view-group h4,
.cc-profile__view-group dl,
.cc-profile__view-group dd,
.cc-profile__view-empty {
  margin: 0;
}

.cc-profile__view-group h4 {
  color: var(--cc-ink, #17211d);
  font-size: 13px;
  letter-spacing: 0;
}

.cc-profile__view-group > header span {
  color: var(--cc-ink-faint, #7b8781);
  font-family: var(--cc-font-mono, monospace);
  font-size: 10px;
}

.cc-profile__view-field {
  display: grid;
  grid-template-columns: minmax(100px, .36fr) minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 10px 0;
}

.cc-profile__view-field + .cc-profile__view-field {
  border-top: 1px solid color-mix(in srgb, var(--profile-rule) 66%, transparent);
}

.cc-profile__view-field dt {
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  line-height: 1.55;
}

.cc-profile__view-field dd {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--cc-ink, #17211d);
  cursor: text;
  font-size: 12px;
  line-height: 1.65;
  user-select: text;
}

.cc-profile__view-field dd:focus {
  border-radius: 2px;
  outline: 2px solid color-mix(in srgb, var(--profile-emphasis) 34%, transparent);
  outline-offset: 2px;
}

.cc-profile__view-empty {
  grid-column: 1 / -1;
  padding: 18px;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 12px;
}

.cc-profile__editor-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--profile-rule);
  padding-bottom: 16px;
}

.cc-profile__editor {
  min-height: 0;
  max-height: calc(100dvh - var(--cc-desktop-topbar-height, 68px) - var(--cc-desktop-tabs-height, 44px) - 24px);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
  padding-bottom: 72px;
}

.cc-profile__editor-tools {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cc-profile__structure {
  margin: 18px 0;
  border-block: 1px solid var(--profile-rule);
  background: var(--profile-muted);
  padding: 16px 0;
  scroll-margin-top: 112px;
}

.cc-profile__structure[hidden] { display: none; }

.cc-profile__structure > header,
.cc-profile__structure-section-meta,
.cc-profile__add-section,
.cc-profile__add-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.cc-profile__structure > header { align-items: center; margin-bottom: 14px; }
.cc-profile__structure > header h4 { margin: 0; font-size: 15px; }
.cc-profile__structure > header p { margin: 4px 0 0; color: var(--cc-ink-soft, #52605a); font-size: 12px; }
.cc-profile__structure > header > span { color: var(--profile-emphasis); font-family: var(--cc-font-mono, monospace); font-size: 12px; }
.cc-profile__add-section { margin-bottom: 14px; }
.cc-profile__structure label { display: grid; gap: 5px; min-width: 0; }
.cc-profile__structure label > span { color: var(--cc-ink-soft, #52605a); font-size: 11px; }
.cc-profile__structure input,
.cc-profile__structure select { width: 100%; min-width: 0; min-height: 38px; border: 1px solid var(--cc-line-strong, #bac6c0); border-radius: 5px; background: var(--cc-surface, #fff); padding: 8px 10px; color: var(--cc-ink, #17211d); font: inherit; font-size: 13px; }
.cc-profile__structure-section { border: 1px solid var(--profile-rule); background: var(--cc-surface, #fff); }
.cc-profile__structure-section + .cc-profile__structure-section { margin-top: 10px; }
.cc-profile__structure-section > summary { padding: 10px 12px; cursor: pointer; list-style: none; }
.cc-profile__structure-section > summary::-webkit-details-marker { display: none; }
.cc-profile__structure-section > summary strong,
.cc-profile__structure-section > summary small { display: block; }
.cc-profile__structure-section > summary small { margin-top: 3px; color: var(--cc-ink-faint, #7b8781); font-size: 11px; }
.cc-profile__structure-section-body { border-top: 1px solid var(--profile-rule); padding: 12px; }
.cc-profile__structure-section-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; margin-bottom: 12px; }
.cc-profile__structure-fields { display: grid; gap: 8px; }
.cc-profile__structure-field { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(120px, .7fr) minmax(160px, 1.2fr) auto; gap: 8px; align-items: end; border-top: 1px solid var(--profile-rule); padding-top: 10px; }
.cc-profile__row-actions { display: flex; gap: 4px; align-items: center; }
.cc-profile__icon-button { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--profile-rule); border-radius: 5px; background: var(--cc-surface, #fff); color: var(--cc-ink-soft, #52605a); cursor: pointer; }
.cc-profile__icon-button:hover:not(:disabled) { border-color: var(--profile-emphasis); color: var(--profile-emphasis); }
.cc-profile__icon-button:disabled { cursor: not-allowed; opacity: .35; }
.cc-profile__icon-button svg { width: 15px; height: 15px; }
.cc-profile__add-field { grid-template-columns: minmax(160px, 1fr) minmax(120px, .7fr) auto; margin-top: 12px; border-top: 1px dashed var(--profile-rule); padding-top: 12px; }
.cc-profile__structure-empty,
.cc-profile__empty-fields { margin: 0; padding: 12px; color: var(--cc-ink-soft, #52605a); font-size: 12px; }
.cc-profile__structure-empty { display: grid; gap: 4px; border: 1px dashed var(--profile-rule); }
.cc-profile__structure-empty strong { color: var(--cc-ink, #17211d); }

.cc-profile__archive-manager {
  margin-top: 18px;
  border-top: 1px solid var(--profile-rule);
  padding-top: 16px;
  scroll-margin-top: 112px;
}

.cc-profile__archive-manager > header,
.cc-profile__archive-grid > section > header,
.cc-profile__archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-profile__archive-manager > header h5 {
  margin: 0;
  color: var(--cc-ink, #17211d);
  font-size: 14px;
  letter-spacing: 0;
}

.cc-profile__archive-manager > header p {
  margin: 4px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.5;
}

.cc-profile__archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 12px;
}

.cc-profile__archive-grid > section {
  min-width: 0;
  border: 1px solid var(--profile-rule);
  background: var(--cc-surface, #fff);
}

.cc-profile__archive-grid > section > header {
  min-height: 42px;
  border-bottom: 1px solid var(--profile-rule);
  padding: 9px 11px;
}

.cc-profile__archive-grid > section > header strong {
  color: var(--cc-ink, #17211d);
  font-size: 12px;
}

.cc-profile__archive-grid > section > header span {
  color: var(--profile-emphasis);
  font-family: var(--cc-font-mono, monospace);
  font-size: 11px;
}

.cc-profile__archive-item {
  align-items: flex-start;
  min-width: 0;
  padding: 11px;
}

.cc-profile__archive-item + .cc-profile__archive-item {
  border-top: 1px solid var(--profile-rule);
}

.cc-profile__archive-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cc-profile__archive-copy strong {
  overflow-wrap: anywhere;
  color: var(--cc-ink, #17211d);
  font-size: 13px;
}

.cc-profile__archive-copy span,
.cc-profile__archive-copy small {
  overflow-wrap: anywhere;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.45;
}

.cc-profile__archive-copy small {
  color: var(--cc-ink-faint, #7b8781);
}

.cc-profile__archive-item .hud-button {
  flex: 0 0 auto;
  min-height: 36px;
}

.cc-profile__archive-empty {
  margin: 0;
  padding: 16px 11px;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 12px;
}

.cc-profile__saved-at {
  min-width: 180px;
  text-align: right;
}

.cc-profile__saved-at strong {
  display: block;
  margin-top: 6px;
  color: var(--cc-ink-soft, #52605a);
  font-family: var(--cc-font-mono, monospace);
  font-size: 12px;
  font-weight: 600;
}

.cc-profile__vault-notice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  border: 1px solid var(--cc-warning, #946100);
  border-radius: 8px;
  background: var(--cc-warning-soft, #fbf1d9);
  padding: 13px 14px;
  color: var(--cc-ink, #17211d);
}

.cc-profile__vault-notice[hidden] {
  display: none;
}

.cc-profile__vault-notice > svg {
  width: 20px;
  height: 20px;
  color: var(--cc-warning, #946100);
}

.cc-profile__vault-notice strong {
  font-size: 13px;
}

.cc-profile__vault-notice p {
  margin: 3px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.55;
}

.cc-profile__form {
  display: grid;
  gap: 10px;
}

.cc-profile__group {
  border: 1px solid var(--profile-rule);
  border-radius: 6px;
  background: var(--cc-surface, #fff);
}

.cc-profile__group > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.cc-profile__group > summary::-webkit-details-marker {
  display: none;
}

.cc-profile__group > summary::before {
  content: "+";
  grid-column: 2;
  grid-row: 1;
  width: 22px;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 20px;
  line-height: 1;
  text-align: right;
}

.cc-profile__group[open] > summary::before {
  content: "−";
}

.cc-profile__group > summary > span:first-child {
  grid-column: 1;
  grid-row: 1;
}

.cc-profile__group > summary strong,
.cc-profile__group > summary small {
  display: block;
}

.cc-profile__group > summary strong {
  color: var(--cc-ink, #17211d);
  font-size: 14px;
}

.cc-profile__group > summary small {
  margin-top: 3px;
  color: var(--cc-ink-faint, #7b8781);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.cc-profile__group-count {
  grid-column: 2;
  grid-row: 1;
  margin-right: 30px;
  color: var(--cc-ink-soft, #52605a);
  font-family: var(--cc-font-mono, monospace);
  font-size: 11px;
}

.cc-profile__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 16px;
  border-top: 1px solid var(--profile-rule);
  background: var(--profile-muted);
  padding: 16px;
}

.cc-profile__field {
  position: relative;
  display: grid;
  flex: 0 1 auto;
  box-sizing: border-box;
  width: calc(50% - 8px);
  min-width: 240px;
  max-width: 100%;
  min-height: 78px;
  grid-template-rows: auto minmax(38px, 1fr);
  gap: 6px;
  --profile-field-handle-size: 18px;
}

.cc-profile__resize-handle {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  width: var(--profile-field-handle-size);
  height: var(--profile-field-handle-size);
  border-right: 2px solid color-mix(in srgb, var(--profile-emphasis) 72%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--profile-emphasis) 72%, transparent);
  border-radius: 0 0 4px 0;
  cursor: nwse-resize;
  pointer-events: auto;
  background: linear-gradient(135deg, transparent 48%, color-mix(in srgb, var(--profile-emphasis) 18%, transparent) 49%, transparent 58%);
}

.cc-profile__resize-handle:hover,
.cc-profile__field:focus-within .cc-profile__resize-handle {
  border-color: var(--profile-emphasis);
  background: linear-gradient(135deg, transparent 42%, color-mix(in srgb, var(--profile-emphasis) 30%, transparent) 43%, transparent 60%);
}

.cc-profile__field--custom-inline {
  border: 1px dashed color-mix(in srgb, var(--profile-emphasis) 45%, var(--profile-rule));
  border-radius: 6px;
  background: color-mix(in srgb, var(--profile-emphasis) 6%, var(--cc-surface, #fff));
  padding: 10px;
}

.cc-profile__field--custom-inline label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.cc-profile__inline-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cc-profile__inline-field-actions .mini-action {
  min-height: 30px;
}

.cc-profile__inline-field-actions .mini-action.danger {
  border-color: color-mix(in srgb, var(--cc-danger, #ae3e4b) 45%, var(--profile-rule));
  color: var(--cc-danger, #ae3e4b);
}

.cc-profile__field > span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  font-weight: 600;
}

.cc-profile__field input,
.cc-profile__field textarea,
.cc-profile__group-add-field input,
.cc-profile__group-add-field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 5px;
  background: var(--cc-surface, #fff);
  padding: 9px 10px;
  color: var(--cc-ink, #17211d);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.cc-profile__field input {
  min-height: 38px;
}

@media (min-width: 761px) {
  .cc-profile__field {
    min-width: 240px;
    max-width: 100%;
    resize: both;
    overflow: auto;
    align-content: start;
  }

  .cc-profile__field input,
  .cc-profile__field textarea {
    box-sizing: border-box;
    height: 100%;
  }
}

.cc-profile__group-add-field {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.5fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--profile-rule);
  border-left: 3px solid var(--profile-emphasis);
  border-radius: 6px;
  background: var(--cc-surface, #fff);
  padding: 12px;
}

.cc-profile__group-add-field label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.cc-profile__group-add-field label > span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  font-weight: 650;
}

.cc-profile__group-add-field .hud-button {
  min-height: 38px;
}

.cc-profile__field textarea {
  min-height: 88px;
  line-height: 1.55;
  resize: both;
}

.cc-profile__field input:focus,
.cc-profile__field textarea:focus {
  border-color: var(--profile-emphasis);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--profile-emphasis) 20%, transparent);
  outline: none;
}

.cc-profile__actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 4px;
  border-top: 1px solid var(--profile-rule);
  background: var(--cc-surface, #fff);
  padding: 13px 0 2px;
}

.cc-profile__actions > div {
  display: flex;
  gap: 8px;
}

.cc-profile__actions .hud-button,
.cc-profile__overview-foot .hud-button,
.cc-profile__vault-notice .mini-action {
  min-height: 38px;
  letter-spacing: 0;
}

.cc-profile__status {
  min-width: 0;
  margin: 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.5;
}

.cc-profile__status[data-kind="saved"] {
  color: var(--cc-accent-strong, #0f573f);
}

.cc-profile__status[data-kind="error"],
.cc-profile__status[data-kind="blocked-sensitive"] {
  color: var(--cc-danger, #ae3e4b);
  font-weight: 700;
}

.cc-profile[data-profile-busy="true"] {
  cursor: progress;
}

@media (max-width: 900px) {
  .cc-profile__summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-profile__summary-grid > div:nth-child(2) {
    border-right: 0;
  }

  .cc-profile__summary-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--profile-rule);
  }
}

@media (max-width: 760px) {
  .cc-profile {
    padding-bottom: calc(var(--cc-mobile-nav-height, 64px) + 24px);
  }

  .cc-profile__editor {
    max-height: calc(100dvh - var(--cc-mobile-topbar-height, 104px) - var(--cc-mobile-tabs-height, 44px) - var(--cc-mobile-nav-height, 64px) - 24px);
  }

  .cc-profile__overview-head,
  .cc-profile__editor-head,
  .cc-profile__overview-foot,
  .cc-profile__structure-entry,
  .cc-profile__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .cc-profile__all-fields-head {
    gap: 12px;
    padding: 15px 13px;
  }

  .cc-profile__view-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-profile__view-group {
    padding-inline: 13px;
  }

  .cc-profile__view-group:nth-child(2n) {
    border-left: 0;
  }

  .cc-profile__view-group + .cc-profile__view-group {
    border-top: 1px solid var(--profile-rule);
  }

  .cc-profile__view-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
  }

  .cc-profile__structure-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-profile__structure-entry .hud-button {
    width: 100%;
    justify-content: center;
  }

  .cc-profile__editor-tools { align-items: stretch; flex-direction: column; gap: 10px; }
  .cc-profile__structure > header,
  .cc-profile__add-section,
  .cc-profile__structure-section-meta,
  .cc-profile__add-field,
  .cc-profile__group-add-field,
  .cc-profile__structure-field { grid-template-columns: minmax(0, 1fr); }
  .cc-profile__structure > header > span { justify-self: start; }
  .cc-profile__structure .cc-profile__row-actions { justify-content: flex-start; flex-wrap: wrap; }
  body.owner-shell-v1 .cc-profile__structure .hud-button,
  body.owner-shell-v1 .cc-profile__structure .cc-profile__icon-button { min-height: 44px; }
  .cc-profile__archive-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cc-profile__structure,
  .cc-profile__archive-manager { scroll-margin-top: calc(var(--cc-mobile-topbar-height, 104px) + var(--cc-mobile-tabs-height, 44px) + 8px); }
  .cc-profile__archive-item { align-items: stretch; flex-direction: column; }
  .cc-profile__archive-item .hud-button { width: 100%; justify-content: center; }

  .cc-profile__overview-head h3,
  .cc-profile__editor-head h3 {
    font-size: 19px;
  }

  .cc-profile__completion {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    justify-items: start;
    gap: 10px;
    border-left-width: 2px;
    padding-left: 12px;
  }

  .cc-profile__completion strong {
    font-size: 24px;
  }

  .cc-profile__summary-grid,
  .cc-profile__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-profile__summary-grid > div,
  .cc-profile__summary-grid > div:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--profile-rule);
    padding: 12px 0;
  }

  .cc-profile__summary-grid > div:last-child {
    border-bottom: 0;
  }

  body.owner-shell-v1 .cc-profile__overview-foot .hud-button,
  body.owner-shell-v1 .cc-profile__actions .hud-button,
  body.owner-shell-v1 .cc-profile__vault-notice .mini-action {
    height: auto;
    min-height: 44px;
  }

  .cc-profile__saved-at {
    min-width: 0;
    text-align: left;
  }

  .cc-profile__vault-notice {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .cc-profile__vault-notice .mini-action {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .cc-profile__group > summary {
    min-height: 64px;
    padding: 10px 12px;
  }

  .cc-profile__group > summary small {
    max-width: 250px;
  }

  .cc-profile__fields {
    padding: 13px 12px;
  }

  .cc-profile__field {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    resize: none;
    overflow: auto;
  }

  .cc-profile__field::after {
    display: none;
  }

  .cc-profile__actions {
    position: static;
    bottom: auto;
    padding: 10px 0;
  }

  .cc-profile__actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.cc-profile__life {
  min-width: 0;
}

.cc-profile__life-head,
.cc-profile__life-editor > header,
.cc-profile__life-event header > div,
.cc-profile__life-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cc-profile__life-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--profile-rule);
}

.cc-profile__life-head h3,
.cc-profile__life-editor h4 {
  margin: 3px 0 0;
}

.cc-profile__life-workbench {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  min-width: 0;
  padding-top: 18px;
}

.cc-profile__life-editor,
.cc-profile__life-browser {
  min-width: 0;
}

.cc-profile__life-editor {
  align-self: start;
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--profile-rule);
  border-top: 3px solid var(--profile-emphasis);
  background: var(--profile-muted);
}

.cc-profile__life-editor label,
.cc-profile__life-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--cc-muted, #64716b);
  font-size: 12px;
}

.cc-profile__life-editor input,
.cc-profile__life-editor select,
.cc-profile__life-editor textarea,
.cc-profile__life-filters input,
.cc-profile__life-filters select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cc-profile__life-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cc-profile__life-status {
  min-height: 18px;
  margin: 0;
  color: var(--cc-muted, #64716b);
  font-size: 12px;
}

/* Let the filter row wrap inside the right-hand canvas card. */
.cc-profile__life-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cc-profile__life-filters label:first-child {
  grid-column: span 2;
}

.cc-profile__life-filters {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) repeat(4, minmax(108px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 20%, var(--profile-rule));
  border-left: 3px solid var(--profile-emphasis);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--profile-emphasis) 10%, transparent) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 76%, color-mix(in srgb, var(--profile-emphasis) 8%, transparent) 0 1px, transparent 2px),
    color-mix(in srgb, var(--profile-muted) 78%, var(--cc-surface, #fff));
  background-size: 18px 18px, 23px 23px, auto;
}

/* The history browser is a distinct reading card, separate from the editor. */
.cc-profile__life-browser {
  position: relative;
  display: grid;
  min-height: 360px;
  max-height: 518px;
  gap: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 24%, var(--profile-rule));
  border-left: 4px solid var(--profile-emphasis);
  background:
    radial-gradient(circle at 14% 12%, color-mix(in srgb, var(--profile-emphasis) 9%, transparent) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 88%, color-mix(in srgb, var(--profile-emphasis) 7%, transparent) 0 1px, transparent 2px),
    color-mix(in srgb, var(--profile-muted) 62%, var(--cc-surface, #fff));
  background-size: 20px 20px, 26px 26px, auto;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--cc-ink, #17211c) 6%, transparent);
}

.cc-profile__life-archived-toggle {
  display: flex !important;
  align-items: center;
  gap: 7px;
  min-height: 34px;
}

.cc-profile__life-archived-toggle input {
  width: auto;
}

.cc-profile__life-timeline {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 14px 2px 4px 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border-top: 1px solid color-mix(in srgb, var(--profile-emphasis) 18%, var(--profile-rule));
}

.cc-profile__life-event {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-width: 0;
}

.cc-profile__life-event::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7px;
  border-left: 1px solid var(--profile-rule);
}

.cc-profile__life-marker {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 17px;
  border: 3px solid var(--cc-surface, #fff);
  background: var(--profile-emphasis);
}

.cc-profile__life-card {
  min-width: 0;
  margin-bottom: 12px;
  padding: 14px 15px;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 18%, var(--profile-rule));
  border-left: 3px solid color-mix(in srgb, var(--profile-emphasis) 58%, var(--profile-rule));
  background: color-mix(in srgb, var(--cc-surface, #fff) 86%, var(--profile-muted));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--cc-ink, #17211c) 5%, transparent);
}

.cc-profile__life-card header {
  display: grid;
  gap: 7px;
}

.cc-profile__life-card time,
.cc-profile__life-card header span {
  color: var(--cc-muted, #64716b);
  font-size: 12px;
}

.cc-profile__life-card header span::before {
  content: "/";
  margin-right: 10px;
}

.cc-profile__life-card p {
  margin: 9px 0;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.cc-profile__life-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cc-profile__life-tags span {
  padding: 3px 7px;
  border: 1px solid var(--profile-rule);
  color: var(--cc-muted, #64716b);
  font-size: 11px;
}

.cc-profile__life-detail {
  margin-top: 11px;
  padding: 10px 11px;
  border-left: 3px solid var(--profile-emphasis);
  background: color-mix(in srgb, var(--profile-emphasis) 5%, var(--cc-surface, #fff));
}

.cc-profile__life-detail.is-reflection {
  border-left-color: #b48a45;
}

.cc-profile__life-detail span {
  display: block;
  color: var(--cc-muted, #64716b);
  font-family: var(--cc-font-mono, monospace);
  font-size: 11px;
}

.cc-profile__life-detail p {
  margin: 5px 0 0;
}

.cc-profile__life-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.cc-profile__life-evidence span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 38%, var(--profile-rule));
  background: color-mix(in srgb, var(--profile-emphasis) 6%, var(--cc-surface, #fff));
  padding: 3px 7px;
  color: var(--profile-emphasis);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.cc-profile__life-evidence-input textarea {
  font-family: var(--cc-font-mono, monospace);
  font-size: 12px;
  line-height: 1.55;
}

.cc-profile__life-evidence-picker {
  min-width: 0;
  border: 1px solid var(--profile-rule);
  background: var(--cc-surface, #fff);
}

.cc-profile__life-evidence-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 11px;
  cursor: pointer;
  color: var(--cc-muted, #64716b);
  font-size: 12px;
  list-style: none;
}

.cc-profile__life-evidence-picker > summary::-webkit-details-marker {
  display: none;
}

.cc-profile__life-evidence-picker > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--profile-emphasis);
  font-family: var(--cc-font-mono, monospace);
  font-size: 16px;
}

.cc-profile__life-evidence-picker[open] > summary::after {
  content: "-";
}

.cc-profile__life-evidence-picker > summary span {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  margin-left: 4px;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 35%, var(--profile-rule));
  color: var(--profile-emphasis);
  font-family: var(--cc-font-mono, monospace);
}

.cc-profile__life-evidence-options {
  display: grid;
  gap: 6px;
  max-height: 236px;
  overflow: auto;
  padding: 0 9px 9px;
  border-top: 1px solid var(--profile-rule);
}

.cc-profile__life-evidence-option {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid transparent;
  background: var(--profile-muted);
  cursor: pointer;
}

.cc-profile__life-evidence-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--profile-emphasis) 48%, var(--profile-rule));
  background: color-mix(in srgb, var(--profile-emphasis) 7%, var(--cc-surface, #fff));
}

.cc-profile__life-evidence-option input {
  width: auto;
  margin: 0;
}

.cc-profile__life-evidence-option span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.cc-profile__life-evidence-option strong,
.cc-profile__life-evidence-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-profile__life-evidence-option strong {
  color: var(--cc-ink, #17211c);
  font-size: 12px;
}

.cc-profile__life-evidence-option small,
.cc-profile__life-evidence-option em,
.cc-profile__life-evidence-empty,
.cc-profile__life-evidence-error {
  color: var(--cc-muted, #64716b);
  font-size: 11px;
}

.cc-profile__life-evidence-option em {
  font-style: normal;
}

.cc-profile__life-evidence-empty,
.cc-profile__life-evidence-error {
  margin: 4px 0;
  line-height: 1.5;
}

.cc-profile__life-evidence-error {
  padding: 0 10px 9px;
  color: #b04a31;
}

.cc-profile__life-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.cc-profile__life-event.is-archived {
  opacity: 0.68;
}

.cc-profile__life-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px 18px;
  border: 1px dashed color-mix(in srgb, var(--profile-emphasis) 35%, var(--profile-rule));
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--profile-emphasis) 12%, transparent) 0 2px, transparent 3px),
    color-mix(in srgb, var(--profile-muted) 68%, var(--cc-surface, #fff));
  background-size: 22px 22px, auto;
  color: var(--cc-muted, #64716b);
  text-align: center;
}

.cc-profile__life-empty::before {
  content: "✦";
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--profile-emphasis) 45%, var(--profile-rule));
  color: var(--profile-emphasis);
  font-size: 16px;
}

/* Keep the right-hand history card contained when canvas utilities are layered on top. */
body.owner-shell-v1 .cc-profile__life-browser {
  box-sizing: border-box;
  border-left: 4px solid var(--profile-emphasis) !important;
}

body.owner-shell-v1 .cc-profile__life-filters {
  box-sizing: border-box;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
}

body.owner-shell-v1 .cc-profile__life-filters > * {
  min-width: 0;
}

/* The card title must be a real filter-grid row, not a browser grid pseudo-item. */
body.owner-shell-v1 .cc-profile__life-filters::before {
  content: "履历历史";
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--profile-emphasis) 22%, var(--profile-rule));
  color: var(--cc-ink, #17211c);
  font-family: var(--cc-font-mono, monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

@media (max-width: 760px) {
  .cc-profile__life-workbench {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .cc-profile__life-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-profile__life-browser {
    min-height: 300px;
    max-height: none;
  }

  .cc-profile__life-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-profile__life-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-profile__life-actions .mini-action {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .cc-profile__group > summary {
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 8px;
  }

  .cc-profile__group-count {
    grid-column: 1;
    grid-row: 2;
    margin-right: 0;
    justify-self: start;
  }

  .cc-profile__inline-field-actions,
  .cc-profile__actions > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .cc-profile__inline-field-actions .mini-action,
  .cc-profile__actions .hud-button,
  .cc-profile__structure-entry .hud-button {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-profile__field input,
  .cc-profile__field textarea {
    transition: none;
  }
}

/* Formal r6 module finish: one dense profile ledger, without nested cards. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-profile {
  --profile-rule: #c8d3cf;
  --profile-muted: #f1f4ec;
  --profile-emphasis: #246c69;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-profile {
  --profile-rule: #29434a;
  --profile-muted: #102a32;
  --profile-emphasis: #7dc8bc;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-profile > .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-profile > .panel {
  border-radius: 4px;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-profile > .panel {
  border: 1px solid #c6d1cd;
  border-top: 3px solid var(--profile-emphasis);
  background:
    linear-gradient(112deg, rgb(36 108 105 / 5%), transparent 42%),
    rgb(251 250 244 / 96%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-profile > .panel {
  border: 1px solid rgb(126 196 189 / 22%);
  border-top: 2px solid var(--profile-emphasis);
  border-left: 2px solid #d4ad67;
  background:
    repeating-linear-gradient(90deg, transparent 0 71px, rgb(126 196 189 / 2.5%) 71px 72px),
    rgb(10 29 36 / 92%);
  box-shadow: 0 16px 34px rgb(0 5 8 / 18%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-profile > .cc-profile__overview,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-profile > .cc-profile__overview {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1 .cc-profile__overview-canvas [data-module-canvas-block] {
  background: rgb(251 250 244 / 96%);
  box-shadow: 0 10px 24px rgb(30 56 51 / 9%);
}

html[data-theme="night"] body.owner-shell-v1 .cc-profile__overview-canvas [data-module-canvas-block] {
  border-color: rgb(126 196 189 / 22%);
  background: rgb(10 29 36 / 92%);
  box-shadow: 0 16px 34px rgb(0 5 8 / 18%);
}

body.owner-shell-v1 .cc-profile__overview-head h3 {
  font-family: var(--formal-serif, "Noto Serif SC", "Songti SC", SimSun, serif);
  font-size: 20px;
  font-weight: 650;
}

body.owner-shell-v1 .cc-profile__editor-head h3 {
  font-size: 18px;
}

body.owner-shell-v1 .cc-profile__eyebrow,
body.owner-shell-v1 .cc-profile__completion span,
body.owner-shell-v1 .cc-profile__saved-at strong,
body.owner-shell-v1 .cc-profile__structure > header > span,
body.owner-shell-v1 .cc-profile__archive-grid > section > header span {
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .cc-profile__summary-grid {
  margin-top: 18px;
}

body.owner-shell-v1 .cc-profile__summary-grid[data-module-canvas-block] {
  margin: 0;
}

body.owner-shell-v1 .cc-profile__summary-grid > div {
  min-height: 68px;
  padding-block: 12px;
}

body.owner-shell-v1 .cc-profile__structure-entry {
  margin-top: 16px;
  padding: 13px 14px;
  border: 0;
  border-block: 1px solid var(--profile-rule);
  border-left: 3px solid var(--profile-emphasis);
  border-radius: 0;
  background: color-mix(in srgb, var(--profile-emphasis) 5%, transparent);
}

body.owner-shell-v1 .cc-profile__structure-entry[data-module-canvas-block] {
  margin: 0;
  padding: 17px 18px;
  border: 1px solid var(--profile-rule);
  border-left: 3px solid var(--profile-emphasis);
  border-radius: 4px;
  background: color-mix(in srgb, var(--profile-emphasis) 5%, var(--cc-surface, #fff));
}

body.owner-shell-v1 .cc-profile__vault-notice,
body.owner-shell-v1 .cc-profile__group,
body.owner-shell-v1 .cc-profile__field--custom-inline,
body.owner-shell-v1 .cc-profile__group-add-field {
  border-radius: 4px;
}

body.owner-shell-v1 .cc-profile__field--custom-inline {
  border: 0;
  border-left: 3px solid color-mix(in srgb, var(--profile-emphasis) 62%, var(--profile-rule));
  background: color-mix(in srgb, var(--profile-emphasis) 5%, transparent);
}

body.owner-shell-v1 .cc-profile__structure-section,
body.owner-shell-v1 .cc-profile__archive-grid > section {
  border-radius: 0;
  background: color-mix(in srgb, var(--cc-surface, #fff) 84%, transparent);
}

html[data-theme="night"] body.owner-shell-v1 .cc-profile__actions {
  background: rgb(10 29 36 / 96%);
}

@media (max-width: 760px) {
  .cc-profile__overview-canvas {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  body.owner-shell-v1 .cc-profile__overview-canvas [data-module-canvas-block] {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px 13px;
    overflow: visible;
  }

  body.owner-shell-v1 .cc-profile__overview-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    align-items: start;
    gap: 12px;
  }

  body.owner-shell-v1 .cc-profile__overview-head h3,
  body.owner-shell-v1 .cc-profile__editor-head h3 {
    font-size: 18px;
  }

  body.owner-shell-v1 .cc-profile__completion {
    width: 84px;
    min-width: 84px;
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    justify-items: end;
    gap: 4px;
    padding-left: 10px;
  }

  body.owner-shell-v1 .cc-profile__completion strong {
    font-size: 23px;
  }

  body.owner-shell-v1 .cc-profile__completion span {
    margin-top: 0;
    font-size: 10px;
  }

  body.owner-shell-v1 .cc-profile__summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
  }

  body.owner-shell-v1 .cc-profile__summary-grid > div,
  body.owner-shell-v1 .cc-profile__summary-grid > div:first-child {
    min-height: 62px;
    padding: 10px 8px;
    border-right: 1px solid var(--profile-rule);
    border-bottom: 1px solid var(--profile-rule);
  }

  body.owner-shell-v1 .cc-profile__summary-grid > div:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1 .cc-profile__summary-grid > div:nth-child(n + 3) {
    border-bottom: 0;
  }

  body.owner-shell-v1 .cc-profile__summary-grid strong {
    font-size: 13px;
  }

  body.owner-shell-v1 .cc-profile__structure-entry {
    gap: 11px;
    margin-top: 14px;
    padding: 12px 10px;
  }

  body.owner-shell-v1 .cc-profile__overview-foot {
    gap: 11px;
    margin-top: 14px;
  }

  body.owner-shell-v1 .cc-profile__summary-grid[data-module-canvas-block] {
    margin: 0;
    padding: 0;
  }

  body.owner-shell-v1 .cc-profile__structure-entry[data-module-canvas-block],
  body.owner-shell-v1 .cc-profile__overview-foot[data-module-canvas-block] {
    margin: 0;
  }
}

@media (max-width: 390px) {
  body.owner-shell-v1 .cc-profile__overview-head {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 9px;
  }

  body.owner-shell-v1 .cc-profile__completion {
    width: 76px;
    min-width: 76px;
    padding-left: 8px;
  }
}

/* Keep the custom-section creator compact and distinct from the archive area. */
.cc-profile__add-section[data-profile-add-section-layout="compact"] {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(240px, 1.35fr) auto;
  gap: 14px;
  align-items: end;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--profile-rule);
  border-left: 3px solid var(--profile-emphasis);
  border-radius: 4px;
  background: color-mix(in srgb, var(--profile-emphasis) 5%, var(--cc-surface, #fff));
}

.cc-profile__add-section[data-profile-add-section-layout="compact"] label {
  gap: 6px;
}

.cc-profile__add-section[data-profile-add-section-layout="compact"] input {
  min-height: 42px;
}

.cc-profile__add-section[data-profile-add-section-layout="compact"] .hud-button {
  min-height: 42px;
  padding-inline: 14px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .cc-profile__add-section[data-profile-add-section-layout="compact"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .cc-profile__add-section[data-profile-add-section-layout="compact"] .hud-button {
    width: 100%;
  }
}


/* source: styles/custom-info-owner-v1.css */
.cc-custom-info {
  --ci-surface: color-mix(in srgb, var(--cc-surface, #ffffff) 96%, #dfe7e5);
  --ci-surface-subtle: color-mix(in srgb, var(--cc-surface, #ffffff) 88%, #d9e2e0);
  --ci-border: color-mix(in srgb, var(--cc-border, #cfd8d6) 84%, transparent);
  --ci-text: var(--cc-text, #17211f);
  --ci-muted: var(--cc-muted, #60706c);
  --ci-accent: #147d74;
  --ci-accent-soft: color-mix(in srgb, #147d74 12%, var(--ci-surface));
  --ci-amber: #a36312;
  --ci-rose: #b43c55;
  width: 100%;
  min-width: 0;
  letter-spacing: 0;
}

html[data-theme="night"] .cc-custom-info {
  --ci-surface: #151c1d;
  --ci-surface-subtle: #1b2526;
  --ci-border: #304041;
  --ci-text: #eef5f3;
  --ci-muted: #9fafab;
  --ci-accent: #55c9bb;
  --ci-accent-soft: #173331;
  --ci-amber: #e2a653;
  --ci-rose: #ed7e93;
}

.cc-custom-info__panel {
  overflow-x: clip;
  min-width: 0;
  color: var(--ci-text);
}

.cc-custom-info__panel.tab-focus:focus {
  outline: none;
}

/* A long record form participates in document flow. The shared canvas uses
   fixed 84px tracks and height:100% !important for resizable cards; retain
   that geometry while arranging the canvas, and let form content size the
   tracks when using it. Saved positions and column widths stay intact. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="custom-info"] .cc-custom-info.module-canvas-grid:not(.is-editing):has(> .module-canvas-widget > .cc-custom-info__panel [data-custom-info-record-form]) {
  grid-auto-rows: minmax(84px, max-content) !important;
  overflow: visible;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="custom-info"] .cc-custom-info.module-canvas-grid:not(.is-editing) > .module-canvas-widget:has(> .cc-custom-info__panel [data-custom-info-record-form]) {
  height: auto;
  min-height: max-content;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="custom-info"] .cc-custom-info.module-canvas-grid:not(.is-editing) > .module-canvas-widget > .cc-custom-info__panel:has([data-custom-info-record-form]) {
  height: auto !important;
  min-height: max-content !important;
  overflow: visible !important;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
}

.cc-custom-info__heading,
.cc-custom-info__heading > div,
.cc-custom-info__heading.is-compact {
  min-width: 0;
}

.cc-custom-info *,
.cc-custom-info *::before,
.cc-custom-info *::after {
  box-sizing: border-box;
}

.cc-custom-info__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ci-border);
}

.cc-custom-info__heading.is-compact {
  align-items: center;
  padding-bottom: 14px;
}

.cc-custom-info__heading h3,
.cc-custom-info__heading h4,
.cc-custom-info__heading p {
  margin: 0;
  letter-spacing: 0;
}

.cc-custom-info__heading h3 {
  font-size: 20px;
  line-height: 1.25;
}

.cc-custom-info__heading p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--ci-muted);
  font-size: 13px;
  line-height: 1.65;
}

.cc-custom-info__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--ci-accent);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.cc-custom-info .hud-button,
.cc-custom-info .mini-action,
.cc-custom-info button,
.cc-custom-info input,
.cc-custom-info textarea,
.cc-custom-info select {
  letter-spacing: 0;
}

.cc-custom-info .hud-button {
  flex: 0 0 auto;
  border-radius: 7px;
}

.cc-custom-info__notice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface-subtle);
  color: var(--ci-muted);
  font-size: 13px;
}

.cc-custom-info__notice.is-success {
  border-color: color-mix(in srgb, var(--ci-accent) 44%, var(--ci-border));
  color: var(--ci-accent);
}

.cc-custom-info__notice.is-error {
  border-color: color-mix(in srgb, var(--ci-rose) 50%, var(--ci-border));
  color: var(--ci-rose);
}

.cc-custom-info__notice svg,
.cc-custom-info__loading svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.cc-custom-info__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--ci-muted);
}

.cc-custom-info__loading svg {
  animation: ci-spin 0.9s linear infinite;
}

@keyframes ci-spin {
  to { transform: rotate(360deg); }
}

.cc-custom-info__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-border);
}

.cc-custom-info__metrics > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  background: var(--ci-surface);
}

.cc-custom-info__metrics span {
  color: var(--ci-muted);
  font-size: 12px;
}

.cc-custom-info__metrics strong {
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.2;
}

.cc-custom-info__metrics > div:last-child strong {
  font-size: 14px;
  font-weight: 650;
}

.cc-custom-info__overview-section {
  margin-top: 22px;
}

.cc-custom-info__record-mode {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: min(100%, 360px);
  margin-top: 14px;
  padding: 3px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface-subtle);
}

.cc-custom-info__record-mode button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ci-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cc-custom-info__record-mode button.is-active {
  background: var(--ci-surface);
  color: var(--ci-text);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ci-border) 64%, transparent);
}

.cc-custom-info__record-mode strong {
  color: var(--ci-accent);
  font-variant-numeric: tabular-nums;
}

.cc-custom-info__overview-section > header,
.cc-custom-info__fields > header,
.cc-custom-info__records > header,
.cc-custom-info__collection-list > header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.cc-custom-info__overview-section h4,
.cc-custom-info__overview-section p,
.cc-custom-info__fields h4,
.cc-custom-info__fields p {
  margin: 0;
}

.cc-custom-info__overview-section h4,
.cc-custom-info__fields h4 {
  font-size: 14px;
}

.cc-custom-info__overview-section p,
.cc-custom-info__fields p {
  margin-top: 3px;
  color: var(--ci-muted);
  font-size: 12px;
}

.cc-custom-info__collection-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cc-custom-info__collection-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface);
  color: var(--ci-text);
  text-align: left;
  cursor: pointer;
}

.cc-custom-info__collection-chip:hover,
.cc-custom-info__collection-chip:focus-visible {
  border-color: var(--ci-accent);
  background: var(--ci-accent-soft);
}

.cc-custom-info__collection-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-custom-info__collection-chip strong {
  color: var(--ci-accent);
  font-variant-numeric: tabular-nums;
}

.cc-custom-info__recent-list,
.cc-custom-info__records > div {
  display: grid;
  gap: 6px;
}

.cc-custom-info__record {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1.4fr) 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface);
  color: var(--ci-text);
  text-align: left;
  cursor: pointer;
}

.cc-custom-info__record:hover,
.cc-custom-info__record:focus-visible,
.cc-custom-info__record.is-selected {
  border-color: var(--ci-accent);
  background: var(--ci-accent-soft);
}

.cc-custom-info__record-main,
.cc-custom-info__record-preview {
  min-width: 0;
}

.cc-custom-info__record-main {
  display: grid;
  gap: 4px;
}

.cc-custom-info__record-main strong,
.cc-custom-info__record-main small,
.cc-custom-info__record-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-custom-info__record-main strong {
  font-size: 13px;
}

.cc-custom-info__record-main small,
.cc-custom-info__record-preview {
  color: var(--ci-muted);
  font-size: 11px;
}

.cc-custom-info__record > svg {
  width: 16px;
  height: 16px;
  color: var(--ci-muted);
}

.cc-custom-info__empty,
.cc-custom-info__error {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 30px 18px;
  border: 1px dashed var(--ci-border);
  border-radius: 7px;
  color: var(--ci-muted);
  text-align: center;
}

.cc-custom-info__error {
  border-style: solid;
  border-color: color-mix(in srgb, var(--ci-rose) 46%, var(--ci-border));
  background: color-mix(in srgb, var(--ci-rose) 7%, transparent);
}

.cc-custom-info__empty svg,
.cc-custom-info__error svg {
  width: 24px;
  height: 24px;
  color: var(--ci-accent);
}

.cc-custom-info__error > svg {
  color: var(--ci-rose);
}

.cc-custom-info__empty strong,
.cc-custom-info__error strong {
  color: var(--ci-text);
  font-size: 14px;
}

.cc-custom-info__empty p,
.cc-custom-info__error p {
  max-width: 460px;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.cc-custom-info__error .hud-button {
  min-height: 40px;
}

.cc-custom-info__toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 260px) 42px;
  align-items: end;
  gap: 10px;
  margin: 14px 0;
}

.cc-custom-info__toolbar label,
.cc-custom-info__form label,
.cc-custom-info__collection-form label,
.cc-custom-info__field-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--ci-muted);
  font-size: 11px;
  font-weight: 650;
}

.cc-custom-info__form-grid,
.cc-custom-info__records-layout,
.cc-custom-info__collections-layout,
.cc-custom-info__field-row,
.cc-custom-info__detail > header,
.cc-custom-info__form-actions,
.cc-custom-info__collection-form footer {
  width: 100%;
  max-width: 100%;
}

.cc-custom-info__toolbar label > div {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface);
}

.cc-custom-info__toolbar label > div:focus-within {
  border-color: var(--ci-accent);
}

.cc-custom-info__toolbar label > div svg {
  width: 16px;
  height: 16px;
}

.cc-custom-info input,
.cc-custom-info textarea,
.cc-custom-info select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  outline: none;
  background: var(--ci-surface);
  color: var(--ci-text);
  font: inherit;
}

.cc-custom-info input,
.cc-custom-info select {
  min-height: 42px;
  padding: 0 10px;
}

.cc-custom-info textarea {
  min-height: 74px;
  padding: 10px;
  resize: vertical;
}

.cc-custom-info input:focus,
.cc-custom-info textarea:focus,
.cc-custom-info select:focus {
  border-color: var(--ci-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ci-accent) 18%, transparent);
}

.cc-custom-info__toolbar label > div input {
  min-height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cc-custom-info__icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface);
  color: var(--ci-muted);
  cursor: pointer;
}

.cc-custom-info__icon-button:hover,
.cc-custom-info__icon-button:focus-visible {
  border-color: var(--ci-accent);
  color: var(--ci-accent);
}

.cc-custom-info__icon-button svg {
  width: 17px;
  height: 17px;
}

.cc-custom-info__records-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
  min-width: 0;
}

.cc-custom-info__records,
.cc-custom-info__detail-shell {
  min-width: 0;
}

.cc-custom-info__records > header,
.cc-custom-info__collection-list > header {
  color: var(--ci-muted);
  font-size: 11px;
}

.cc-custom-info__records > header strong,
.cc-custom-info__collection-list > header strong {
  color: var(--ci-text);
  font-size: 12px;
}

.cc-custom-info__records .cc-custom-info__record {
  grid-template-columns: minmax(0, 1fr) 18px;
}

.cc-custom-info__records .cc-custom-info__record-preview {
  grid-column: 1 / -1;
}

.cc-custom-info__detail-shell {
  min-height: 360px;
  padding-left: 16px;
  border-left: 1px solid var(--ci-border);
}

.cc-custom-info__detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ci-border);
}

.cc-custom-info__detail h3,
.cc-custom-info__detail p {
  margin: 0;
}

.cc-custom-info__detail header span {
  color: var(--ci-accent);
  font-size: 11px;
  font-weight: 700;
}

.cc-custom-info__detail h3 {
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cc-custom-info__detail header p {
  margin-top: 7px;
  color: var(--ci-muted);
  font-size: 12px;
  line-height: 1.65;
}

.cc-custom-info__detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cc-custom-info__detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 12px 0;
  color: var(--ci-muted);
  font-size: 11px;
}

.cc-custom-info__detail-meta em {
  padding: 3px 7px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  color: var(--ci-accent);
  font-style: normal;
}

.cc-custom-info__detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-border);
}

.cc-custom-info__detail-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  background: var(--ci-surface);
}

.cc-custom-info__detail-field span {
  color: var(--ci-muted);
  font-size: 11px;
}

.cc-custom-info__detail-field strong,
.cc-custom-info__detail-field a {
  color: var(--ci-text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.cc-custom-info__archive-warning {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--ci-rose) 54%, var(--ci-border));
  border-radius: 7px;
  color: var(--ci-rose);
  font-size: 12px;
}

.cc-custom-info__archive-warning.is-restore {
  border-color: color-mix(in srgb, var(--ci-accent) 50%, var(--ci-border));
  color: var(--ci-accent);
}

.cc-custom-info__form {
  margin-top: 16px;
}

/* The shared resizable-field grid owns the outer 12 columns. These are
   whole form sections; only the inner field rows divide their own width. */
body.owner-shell-v1 #moduleStage [data-custom-info-record-form] > :is(
  .cc-custom-info__form-grid,
  .cc-custom-info__vault-note,
  .cc-custom-info__fields,
  .cc-custom-info__form-actions
) {
  grid-column: 1 / -1;
  min-width: 0;
}

.cc-custom-info__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.cc-custom-info__form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cc-custom-info__form-grid .is-wide {
  grid-column: 1 / -1;
}

.cc-custom-info__vault-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--ci-amber) 42%, var(--ci-border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--ci-amber) 8%, var(--ci-surface));
}

.cc-custom-info__vault-note svg {
  width: 18px;
  height: 18px;
  color: var(--ci-amber);
}

.cc-custom-info__vault-note strong,
.cc-custom-info__vault-note p {
  margin: 0;
}

.cc-custom-info__vault-note strong {
  font-size: 12px;
}

.cc-custom-info__vault-note p {
  margin-top: 3px;
  color: var(--ci-muted);
  font-size: 11px;
  line-height: 1.5;
}

.cc-custom-info__vault-note a {
  color: var(--ci-amber);
  font-size: 12px;
  font-weight: 700;
}

.cc-custom-info__fields {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ci-border);
}

.cc-custom-info__field-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.72fr) minmax(170px, 1.5fr) minmax(104px, 120px) 42px;
  align-items: end;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ci-border);
}

.cc-custom-info__field-row:last-child {
  border-bottom: 0;
}

.cc-custom-info__field-row textarea {
  min-height: 62px;
}

.cc-custom-info__form-actions,
.cc-custom-info__collection-form footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--ci-border);
}

.cc-custom-info__form-actions p,
.cc-custom-info__collection-form footer p {
  margin: 0;
  color: var(--ci-muted);
  font-size: 12px;
}

.cc-custom-info__form-actions p[data-kind="error"],
.cc-custom-info__collection-form footer p[data-kind="error"] {
  color: var(--ci-rose);
}

.cc-custom-info__form-actions > div {
  display: flex;
  gap: 8px;
}

.cc-custom-info__collections-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  gap: 20px;
  margin-top: 16px;
}

.cc-custom-info__collection-form {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-right: 20px;
  border-right: 1px solid var(--ci-border);
}

.cc-custom-info__collection-form header h4,
.cc-custom-info__collection-form header p {
  margin: 0;
}

.cc-custom-info__collection-form header h4 {
  font-size: 15px;
}

.cc-custom-info__collection-form header p {
  margin-top: 5px;
  color: var(--ci-muted);
  font-size: 12px;
  line-height: 1.55;
}

.cc-custom-info__collection-form footer {
  align-items: flex-end;
}

.cc-custom-info__collection-form footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.cc-custom-info__collection-policy {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--ci-amber) 42%, var(--ci-border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--ci-amber) 7%, var(--ci-surface));
  color: var(--ci-muted);
  font-size: 12px;
  line-height: 1.55;
}

.cc-custom-info__collection-policy svg {
  width: 17px;
  height: 17px;
  color: var(--ci-amber);
}

.cc-custom-info__collection-groups {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

.cc-custom-info__collection-list > div {
  display: grid;
  gap: 7px;
}

.cc-custom-info__collection-list.is-archived {
  padding-top: 18px;
  border-top: 1px solid var(--ci-border);
}

.cc-custom-info__collection-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface);
}

.cc-custom-info__collection-item.is-archived {
  background: var(--ci-surface-subtle);
}

.cc-custom-info__collection-open {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 3px;
  border: 0;
  background: transparent;
  color: var(--ci-text);
  text-align: left;
  cursor: pointer;
}

.cc-custom-info__collection-open:not(:disabled):hover strong,
.cc-custom-info__collection-open:not(:disabled):focus-visible strong {
  color: var(--ci-accent);
}

.cc-custom-info__collection-open:disabled {
  cursor: default;
}

.cc-custom-info__collection-open > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cc-custom-info__collection-open strong,
.cc-custom-info__collection-open small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-custom-info__collection-open strong {
  font-size: 13px;
}

.cc-custom-info__collection-open small {
  color: var(--ci-muted);
  font-size: 11px;
}

.cc-custom-info__collection-open em {
  color: var(--ci-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.cc-custom-info__collection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.cc-custom-info__collection-actions .mini-action {
  min-height: 34px;
}

.cc-custom-info__collection-item > p {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid var(--ci-border);
  color: var(--ci-rose);
  font-size: 11px;
  line-height: 1.5;
}

.cc-custom-info__collection-list > div > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--ci-border);
  border-radius: 7px;
  background: var(--ci-surface);
  color: var(--ci-text);
  text-align: left;
  cursor: pointer;
}

.cc-custom-info__collection-list > div > button:hover,
.cc-custom-info__collection-list > div > button:focus-visible {
  border-color: var(--ci-accent);
  background: var(--ci-accent-soft);
}

.cc-custom-info__collection-list > div > button > span,
.cc-custom-info__collection-list > div > button > span > span {
  display: flex;
  align-items: center;
  min-width: 0;
}

.cc-custom-info__collection-list > div > button > span {
  gap: 10px;
}

.cc-custom-info__collection-list > div > button > span > span {
  display: grid;
  gap: 3px;
}

.cc-custom-info__collection-list svg {
  width: 17px;
  height: 17px;
  color: var(--ci-accent);
}

.cc-custom-info__collection-list strong,
.cc-custom-info__collection-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-custom-info__collection-list strong {
  font-size: 13px;
}

.cc-custom-info__collection-list small {
  color: var(--ci-muted);
  font-size: 11px;
}

.cc-custom-info__collection-list em {
  flex: 0 0 auto;
  color: var(--ci-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 980px) {
  .cc-custom-info__collection-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-custom-info__records-layout,
  .cc-custom-info__collections-layout {
    grid-template-columns: 1fr;
  }

  .cc-custom-info__detail-shell {
    min-height: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--ci-border);
    border-left: 0;
  }

  .cc-custom-info__collection-form {
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--ci-border);
  }

  .cc-custom-info__field-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(104px, 120px) 42px;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1 .cc-custom-info {
    padding-bottom: calc(var(--cc-mobile-nav-height, 64px) + 24px);
  }

  .cc-custom-info__heading,
  .cc-custom-info__heading.is-compact,
  .cc-custom-info__detail > header,
  .cc-custom-info__form-actions,
  .cc-custom-info__collection-form footer {
    align-items: stretch;
    flex-direction: column;
  }

  .cc-custom-info__collection-form footer > div,
  .cc-custom-info__collection-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .cc-custom-info__collection-form footer > div .hud-button,
  .cc-custom-info__collection-actions .mini-action {
    width: 100%;
    min-height: 44px;
  }

  .cc-custom-info__collection-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .cc-custom-info__collection-open {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .cc-custom-info__collection-open em {
    grid-column: 2;
    justify-self: start;
  }

  .cc-custom-info__heading .hud-button,
  .cc-custom-info__form-actions .hud-button,
  .cc-custom-info__collection-form footer .hud-button {
    width: 100%;
    min-height: 44px;
  }

  .cc-custom-info__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-custom-info__collection-strip,
  .cc-custom-info__detail-fields,
  .cc-custom-info__form-grid {
    grid-template-columns: 1fr;
  }

  .cc-custom-info__form-grid .is-wide {
    grid-column: auto;
  }

  .cc-custom-info__toolbar {
    grid-template-columns: minmax(0, 1fr) 42px;
  }

  .cc-custom-info__toolbar label:first-child {
    grid-column: 1 / -1;
  }

  .cc-custom-info__record,
  .cc-custom-info__records .cc-custom-info__record {
    grid-template-columns: minmax(0, 1fr) 18px;
    min-height: 62px;
  }

  .cc-custom-info__record-preview {
    grid-column: 1 / -1;
  }

  .cc-custom-info__detail-actions,
  .cc-custom-info__form-actions > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .cc-custom-info__detail-actions .hud-button {
    min-height: 44px;
  }

  .cc-custom-info__vault-note {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .cc-custom-info__vault-note a {
    grid-column: 2;
  }

  .cc-custom-info__fields > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .cc-custom-info__fields > header .hud-button {
    width: 100%;
    min-height: 44px;
  }

  .cc-custom-info__field-row {
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 12px 0;
  }

  .cc-custom-info__field-row label {
    grid-column: 1 / -1;
  }

  .cc-custom-info__field-row .cc-custom-info__icon-button {
    grid-column: 2;
    justify-self: end;
  }

  .cc-custom-info__collection-list > div > button {
    min-height: 64px;
  }
}

@media (max-width: 640px) {
  .cc-custom-info__record-mode {
    width: 100%;
  }

  .cc-custom-info__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .cc-custom-info__metrics,
  .cc-custom-info__collection-strip {
    grid-template-columns: 1fr;
  }

  .cc-custom-info__metrics > div:last-child {
    grid-column: auto;
  }

  .cc-custom-info__detail-actions,
  .cc-custom-info__form-actions > div,
  .cc-custom-info__collection-actions,
  .cc-custom-info__collection-form footer > div {
    grid-template-columns: 1fr;
  }

  .cc-custom-info__vault-note a,
  .cc-custom-info__field-row .cc-custom-info__icon-button,
  .cc-custom-info__collection-list em {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .cc-custom-info__field-row .cc-custom-info__icon-button {
    min-height: 42px;
  }

  .cc-custom-info__collection-list > div > button {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-custom-info__loading svg {
    animation: none;
  }
}

/* Formal r6 module finish: flat records, compact metrics, distinct day/night desks. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-custom-info {
  --ci-surface: rgb(251 250 244 / 96%);
  --ci-surface-subtle: rgb(241 244 236 / 94%);
  --ci-border: #c8d3cf;
  --ci-text: #1d363c;
  --ci-muted: #617577;
  --ci-accent: #246c69;
  --ci-accent-soft: #dce9e3;
  --ci-amber: #a7773f;
  --ci-rose: #b96255;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-custom-info {
  --ci-surface: rgb(10 29 36 / 92%);
  --ci-surface-subtle: rgb(14 39 46 / 90%);
  --ci-border: #29434a;
  --ci-text: #d7e5df;
  --ci-muted: #78999a;
  --ci-accent: #7dc8bc;
  --ci-accent-soft: rgb(35 78 75 / 58%);
  --ci-amber: #d4ad67;
  --ci-rose: #df7d6c;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-custom-info > .cc-custom-info__panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-custom-info > .cc-custom-info__panel {
  border-radius: 4px;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-custom-info > .cc-custom-info__panel {
  border: 1px solid #c6d1cd;
  border-top: 3px solid var(--ci-accent);
  background:
    linear-gradient(112deg, rgb(36 108 105 / 5%), transparent 42%),
    rgb(251 250 244 / 96%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-custom-info > .cc-custom-info__panel {
  border: 1px solid rgb(126 196 189 / 22%);
  border-top: 2px solid var(--ci-accent);
  border-left: 2px solid #d4ad67;
  background:
    repeating-linear-gradient(90deg, transparent 0 71px, rgb(126 196 189 / 2.5%) 71px 72px),
    rgb(10 29 36 / 92%);
  box-shadow: 0 16px 34px rgb(0 5 8 / 18%);
}

body.owner-shell-v1 .cc-custom-info__heading h3 {
  font-family: var(--formal-serif, "Noto Serif SC", "Songti SC", SimSun, serif);
  font-size: 19px;
  font-weight: 650;
}

body.owner-shell-v1 .cc-custom-info__eyebrow,
body.owner-shell-v1 .cc-custom-info__metrics strong,
body.owner-shell-v1 .cc-custom-info__record-mode strong,
body.owner-shell-v1 .cc-custom-info__collection-chip strong,
body.owner-shell-v1 .cc-custom-info__collection-open em {
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1 .cc-custom-info__metrics {
  gap: 0;
  margin-top: 14px;
  overflow: visible;
  border: 0;
  border-block: 1px solid var(--ci-border);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1 .cc-custom-info__metrics > div {
  min-height: 72px;
  padding: 12px 14px;
  border-right: 1px solid var(--ci-border);
  background: transparent;
}

body.owner-shell-v1 .cc-custom-info__metrics > div:last-child {
  border-right: 0;
}

body.owner-shell-v1 .cc-custom-info__metrics strong {
  color: var(--ci-text);
  font-size: 19px;
}

body.owner-shell-v1 .cc-custom-info__metrics > div:last-child strong {
  font-family: var(--formal-sans, "Microsoft YaHei UI", sans-serif);
  font-size: 13px;
  line-height: 1.35;
}

body.owner-shell-v1 .cc-custom-info__overview-section {
  margin-top: 18px;
}

body.owner-shell-v1 .cc-custom-info__recent-list,
body.owner-shell-v1 .cc-custom-info__records > div {
  gap: 0;
}

body.owner-shell-v1 .cc-custom-info__record {
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--ci-border);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1 .cc-custom-info__record:first-child {
  border-top: 1px solid var(--ci-border);
}

body.owner-shell-v1 .cc-custom-info__record.is-selected {
  box-shadow: inset 3px 0 0 var(--ci-accent);
}

body.owner-shell-v1 .cc-custom-info__record:hover,
body.owner-shell-v1 .cc-custom-info__record:focus-visible,
body.owner-shell-v1 .cc-custom-info__record.is-selected {
  border-bottom-color: color-mix(in srgb, var(--ci-accent) 58%, var(--ci-border));
  background: var(--ci-accent-soft);
}

body.owner-shell-v1 .cc-custom-info__empty,
body.owner-shell-v1 .cc-custom-info__error {
  min-height: 96px;
  padding: 18px 14px;
  border: 0;
  border-block: 1px solid var(--ci-border);
  border-left: 3px solid var(--ci-accent);
  border-radius: 0;
  background: color-mix(in srgb, var(--ci-accent) 4%, transparent);
}

body.owner-shell-v1 .cc-custom-info__error {
  border-left-color: var(--ci-rose);
}

body.owner-shell-v1 .cc-custom-info__collection-strip:has(> .cc-custom-info__empty:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

body.owner-shell-v1 .cc-custom-info__collection-chip,
body.owner-shell-v1 .cc-custom-info__record-mode,
body.owner-shell-v1 .cc-custom-info__notice,
body.owner-shell-v1 .cc-custom-info__toolbar label > div,
body.owner-shell-v1 .cc-custom-info input,
body.owner-shell-v1 .cc-custom-info textarea,
body.owner-shell-v1 .cc-custom-info select,
body.owner-shell-v1 .cc-custom-info__icon-button,
body.owner-shell-v1 .cc-custom-info__vault-note,
body.owner-shell-v1 .cc-custom-info__archive-warning,
body.owner-shell-v1 .cc-custom-info__collection-policy,
body.owner-shell-v1 .cc-custom-info__collection-item,
body.owner-shell-v1 .cc-custom-info__collection-list > div > button {
  border-radius: 4px;
}

body.owner-shell-v1 .cc-custom-info__detail-fields {
  gap: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--ci-border);
  border-left: 1px solid var(--ci-border);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1 .cc-custom-info__detail-field {
  border-right: 1px solid var(--ci-border);
  border-bottom: 1px solid var(--ci-border);
  background: transparent;
}

body.owner-shell-v1 .cc-custom-info__detail-fields > .cc-custom-info__empty,
body.owner-shell-v1 .cc-custom-info__detail-fields > .cc-custom-info__error {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  body.owner-shell-v1 .cc-custom-info__heading h3 {
    font-size: 18px;
  }

  body.owner-shell-v1 .cc-custom-info__heading {
    gap: 12px;
    padding-bottom: 14px;
  }

  body.owner-shell-v1 .cc-custom-info__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 .cc-custom-info__metrics > div {
    min-height: 66px;
    padding: 10px 11px;
    border-right: 1px solid var(--ci-border);
    border-bottom: 1px solid var(--ci-border);
  }

  body.owner-shell-v1 .cc-custom-info__metrics > div:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1 .cc-custom-info__metrics > div:nth-child(n + 3) {
    border-bottom: 0;
  }

  body.owner-shell-v1 .cc-custom-info__collection-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.owner-shell-v1 .cc-custom-info__overview-section {
    margin-top: 16px;
  }

  body.owner-shell-v1 .cc-custom-info__record {
    min-height: 60px;
    padding-inline: 8px;
  }

  body.owner-shell-v1 .cc-custom-info__empty,
  body.owner-shell-v1 .cc-custom-info__error {
    min-height: 88px;
    padding: 14px 10px;
  }
}

@media (max-width: 420px) {
  body.owner-shell-v1 .cc-custom-info__metrics,
  body.owner-shell-v1 .cc-custom-info__collection-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 .cc-custom-info__collection-strip:has(> .cc-custom-info__empty:only-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .cc-custom-info__collection-chip {
    min-height: 44px;
    padding-inline: 9px;
  }
}


/* source: styles/owner-tech-v2.css */
/* Owner Tech V2: dark personal-data cockpit skin. Layout stays owned by module CSS. */
html:has(body.owner-shell-v1) {
  background: #050b11;
  color-scheme: dark;
}

body.owner-shell-v1 {
  --cc-canvas: #071017;
  --cc-surface: #0d1a22;
  --cc-surface-muted: #11232d;
  --cc-surface-strong: #17303b;
  --cc-ink: #eef7f8;
  --cc-ink-soft: #a8bbc2;
  --cc-ink-faint: #718b95;
  --cc-line: #213b48;
  --cc-line-strong: #3e6573;
  --cc-nav: #050b11;
  --cc-nav-hover: #0c1b24;
  --cc-nav-active: #123142;
  --cc-accent: #2dd4bf;
  --cc-accent-strong: #70ead8;
  --cc-accent-soft: #0d2c31;
  --cc-blue: #60a5fa;
  --cc-blue-soft: #102844;
  --cc-danger: #fb7185;
  --cc-danger-soft: #321923;
  --cc-warning: #fbbf24;
  --cc-warning-soft: #332815;
  --cc-shadow-float: 0 20px 54px rgb(0 0 0 / 46%);

  --product-bg: var(--cc-canvas);
  --product-surface: var(--cc-surface);
  --product-surface-soft: var(--cc-surface-muted);
  --product-sidebar: var(--cc-nav);
  --product-sidebar-muted: #88a4ae;
  --product-text: var(--cc-ink);
  --product-muted: var(--cc-ink-soft);
  --product-line: var(--cc-line);
  --product-line-strong: var(--cc-line-strong);
  --product-accent: var(--cc-accent);
  --product-accent-soft: var(--cc-accent-soft);
  --product-red: var(--cc-danger);
  --product-amber: var(--cc-warning);
  --product-green: #4ade80;
  --product-blue: var(--cc-blue);
  --product-violet: #a5b4fc;

  --bg0: #040a0f;
  --bg1: #071119;
  --surface: rgb(13 26 34 / 97%);
  --surface-strong: rgb(17 35 45 / 98%);
  --surface-soft: rgb(8 20 27 / 94%);
  --line: var(--cc-line);
  --line-strong: var(--cc-line-strong);
  --line-soft: #17333f;
  --text: var(--cc-ink);
  --muted: var(--cc-ink-soft);
  --cyan: var(--cc-accent);
  --blue: var(--cc-blue);
  --green: #4ade80;
  --red: var(--cc-danger);
  --amber: var(--cc-warning);
  --violet: #a5b4fc;
  --panel-radius: 4px;
  --control-radius: 4px;
  --panel-shadow: 0 15px 38px rgb(0 0 0 / 28%);
  --glass-highlight: rgb(96 165 250 / 4%);

  background: var(--cc-canvas);
  color: var(--cc-ink);
  font-family: "Bahnschrift", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
}

body.owner-shell-v1 .shell,
body.owner-shell-v1 .main {
  background: var(--cc-canvas);
}

body.owner-shell-v1 .workspace {
  background-color: var(--cc-canvas);
  background-image:
    linear-gradient(rgb(78 151 176 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(78 151 176 / 6%) 1px, transparent 1px);
  background-size: 36px 36px;
}

body.owner-shell-v1 ::selection {
  background: #1c6c5f;
  color: #f4fffc;
}

body.owner-shell-v1 * {
  scrollbar-color: #397166 #091814;
}

body.owner-shell-v1 .sidebar {
  border-right-color: #203743;
  background: #050b11;
  box-shadow: inset -1px 0 0 rgb(45 212 191 / 8%);
}

body.owner-shell-v1 .brand {
  border-bottom-color: #203237;
}

body.owner-shell-v1 .mark {
  border-color: #3d6b73;
  border-radius: 3px;
  background: #10262a;
  box-shadow: inset 0 0 16px rgb(57 213 193 / 10%);
  color: #92f6e7;
}

body.owner-shell-v1 .brand h1 {
  color: #f0fbf7;
}

body.owner-shell-v1 .brand small,
body.owner-shell-v1 .cc-shell-nav__group-label {
  color: #7f989c;
}

body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
  color: #a9babd;
}

body.owner-shell-v1 #primaryNav .cc-shell-nav__item:hover {
  background: #0c1b24;
  color: #ecfaf6;
}

body.owner-shell-v1 #primaryNav .cc-shell-nav__item[aria-current="page"],
body.owner-shell-v1 #primaryNav .cc-shell-nav__item.active {
  background: #123142;
  box-shadow: inset 2px 0 0 var(--cc-accent);
  color: #dffff8;
}

body.owner-shell-v1 .pin-button,
body.owner-shell-v1 .nav.pinned a {
  border-color: #21463e;
  background: #071713;
  color: #8eafa5;
}

body.owner-shell-v1 .nav.pinned {
  border-top-color: #173a33;
}

body.owner-shell-v1 .pin-button:hover,
body.owner-shell-v1 .nav.pinned a:hover,
body.owner-shell-v1 .nav.pinned a:focus-visible {
  border-color: #397166;
  background: #0d2923;
  color: #e7f7f2;
}

body.owner-shell-v1 .topbar {
  border-bottom-color: #213b48;
  background: rgb(6 15 22 / 98%);
  box-shadow: 0 8px 28px rgb(0 0 0 / 24%);
}

body.owner-shell-v1 .title h2 {
  color: #eefaf6;
  font-size: 20px;
  text-shadow: none;
}

body.owner-shell-v1 .title > span:not(.mobile-app-label),
body.owner-shell-v1 .status {
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 .mobile-app-label {
  color: var(--cc-accent);
}

body.owner-shell-v1 .command {
  border-color: #315666;
  border-radius: 4px;
  background: #08171f;
  box-shadow: inset 3px 0 0 rgb(45 212 191 / 38%);
  color: #7ff2df;
}

body.owner-shell-v1 .command:focus-within {
  border-color: var(--cc-accent);
  box-shadow: inset 3px 0 0 var(--cc-accent), 0 0 0 2px rgb(57 213 193 / 12%);
}

body.owner-shell-v1 .command input,
body.owner-shell-v1 .command input:disabled {
  color: var(--cc-ink);
}

body.owner-shell-v1 .command input::placeholder,
body.owner-shell-v1 .ai-query-form input::placeholder {
  color: #698b81;
}

body.owner-shell-v1 .dot {
  background: #45d69b;
  box-shadow: 0 0 10px rgb(69 214 155 / 46%);
}

body.owner-shell-v1 .status-button,
body.owner-shell-v1 .ai-fab,
body.owner-shell-v1 .module-tabs-nav {
  border-color: #334d54;
  border-radius: 4px;
  background: #111a1d;
  color: #d8eee7;
}

body.owner-shell-v1 .status-button:hover,
body.owner-shell-v1 .ai-fab:hover,
body.owner-shell-v1 .module-tabs-nav:hover {
  border-color: var(--cc-accent);
  background: #12372f;
  color: #8ff4e4;
}

body.owner-shell-v1 .module-tabs-shell {
  border-color: #213b48;
  border-radius: 4px;
  background: #0a151c;
}

/* Information hierarchy: readable workbench controls without turning the page into a card wall. */
body.owner-shell-v1 .workspace {
  gap: 14px;
  padding: 16px 20px 24px;
}

body.owner-shell-v1 .grid {
  gap: 14px;
}

body.owner-shell-v1 .module-tabs-shell {
  min-height: 44px;
}

body.owner-shell-v1 .tabs {
  gap: 4px;
  padding: 4px;
}

body.owner-shell-v1 .tab {
  min-height: 36px;
  padding-inline: 14px;
  font-size: 13px;
}

body.owner-shell-v1 .tabs {
  border-bottom-color: #21463e;
  background: transparent;
}

body.owner-shell-v1 .tab {
  border-bottom-color: transparent;
  background: transparent;
  color: #8eaba2;
}

body.owner-shell-v1 .tab:hover {
  border-color: #3e6573;
  background: #122631;
  color: #e4f5ef;
}

body.owner-shell-v1 .tab.active {
  border-color: var(--cc-accent);
  background: #12303b;
  box-shadow: inset 0 -1px 0 var(--cc-accent);
  color: #77f1df;
}

/* Shared operational surfaces */
body.owner-shell-v1 .panel,
body.owner-shell-v1 .ai-panel {
  border-color: var(--cc-line);
  border-radius: 4px;
  background: var(--cc-surface);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgb(96 165 250 / 5%);
  color: var(--cc-ink);
  backdrop-filter: none;
}

body.owner-shell-v1 .panel::before,
body.owner-shell-v1 .panel::after,
body.owner-shell-v1 .ai-panel::before {
  display: none;
}

body.owner-shell-v1 .panel {
  padding: 18px;
}

body.owner-shell-v1 .panel h3 {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.35;
}

body.owner-shell-v1 .panel h4 {
  font-size: 14px;
  line-height: 1.4;
}

body.owner-shell-v1 .panel p,
body.owner-shell-v1 .row small,
body.owner-shell-v1 .field small {
  font-size: 12px;
  line-height: 1.5;
}

body.owner-shell-v1 .panel h3,
body.owner-shell-v1 .panel h4,
body.owner-shell-v1 .answer-card h4 {
  color: var(--cc-ink);
  letter-spacing: 0;
  text-shadow: none;
}

body.owner-shell-v1 .microcopy,
body.owner-shell-v1 .muted,
body.owner-shell-v1 .muted-row,
body.owner-shell-v1 .field small,
body.owner-shell-v1 .row small {
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 .kpis {
  border-color: var(--cc-line);
  background: #0a1c24;
}

body.owner-shell-v1 .kpi {
  border-color: var(--cc-line);
  border-radius: 3px;
  background: #102832;
  box-shadow: none;
}

body.owner-shell-v1 .kpi span {
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 .row {
  border-color: #183844;
  background: transparent;
  min-height: 50px;
  padding: 10px 12px;
}

body.owner-shell-v1 .row:hover {
  background: #102a34;
}

body.owner-shell-v1 .row strong:not(.cyan):not(.green):not(.red):not(.amber):not(.violet) {
  color: var(--cc-ink);
}

body.owner-shell-v1 .tag,
body.owner-shell-v1 .library-type-chip,
body.owner-shell-v1 .library-state-chip {
  border-color: #356575;
  background: #102a33;
  color: #b7d1c9;
}

body.owner-shell-v1 .cyan,
body.owner-shell-v1 .violet {
  color: var(--cc-blue);
}

body.owner-shell-v1 .green {
  color: #4ade80;
}

body.owner-shell-v1 .red {
  color: var(--cc-danger);
}

body.owner-shell-v1 .amber {
  color: var(--cc-warning);
}

body.owner-shell-v1 .hud-button,
body.owner-shell-v1 .mini-action,
body.owner-shell-v1 .workbench-actions a,
body.owner-shell-v1 .segmented-option,
body.owner-shell-v1 .settings-pin-reorder {
  border-color: #356575;
  border-radius: 4px;
  background: #0a1b23;
  box-shadow: none;
  color: #d6e9e3;
  min-height: 36px;
  padding-inline: 12px;
  font-size: 12px;
}

body.owner-shell-v1 .hud-button:hover,
body.owner-shell-v1 .mini-action:hover,
body.owner-shell-v1 .workbench-actions a:hover,
body.owner-shell-v1 .segmented-option:hover,
body.owner-shell-v1 .settings-pin-reorder:hover:not(:disabled) {
  border-color: var(--cc-accent);
  background: #113640;
  box-shadow: 0 0 0 1px rgb(57 213 193 / 8%);
  color: #8ff4e4;
  transform: none;
}

body.owner-shell-v1 .hud-button.primary,
body.owner-shell-v1 .mini-action.primary,
body.owner-shell-v1 .library-overview-actions .is-primary {
  border-color: #43ddc8;
  background: #0f766e;
  color: #f3fffc;
}

body.owner-shell-v1 .hud-button.danger,
body.owner-shell-v1 .mini-action.danger {
  border-color: #8a3d48;
  background: #2b171c;
  color: #ff9aa5;
}

body.owner-shell-v1 .segmented-control {
  border-color: #2e5865;
  background: #07171d;
}

body.owner-shell-v1 .segmented-option.active,
body.owner-shell-v1 .segmented-option[aria-pressed="true"] {
  border-color: #3c7582;
  background: #123640;
  box-shadow: inset 0 -2px 0 var(--cc-accent);
  color: #82f2e1;
}

body.owner-shell-v1 :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: #356575;
  background-color: #07171d;
  color: var(--cc-ink);
}

body.owner-shell-v1 :where(input, select, textarea):focus,
body.owner-shell-v1 :where(input, select, textarea):focus-visible,
body.owner-shell-v1 :where(button, a, summary):focus-visible {
  border-color: var(--cc-accent);
  outline: 2px solid rgb(57 213 193 / 38%);
  outline-offset: 1px;
  box-shadow: none;
}

body.owner-shell-v1 input::placeholder,
body.owner-shell-v1 textarea::placeholder {
  color: #67877e;
  opacity: 1;
}

body.owner-shell-v1 select option {
  background: #0b1d1a;
  color: var(--cc-ink);
}

body.owner-shell-v1 input[type="checkbox"],
body.owner-shell-v1 input[type="radio"] {
  accent-color: var(--cc-accent);
}

body.owner-shell-v1 input[type="file"]::file-selector-button {
  border-color: #315f56;
  background: #102823;
  color: #d6e9e3;
}

body.owner-shell-v1 .overview-signal-card,
body.owner-shell-v1 .finance-overview-signal,
body.owner-shell-v1 .answer-card,
body.owner-shell-v1 .system-strip,
body.owner-shell-v1 .library-signal-strip {
  border-color: var(--cc-line);
  background: var(--cc-surface-muted);
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 .overview-command-deck {
  border-color: #2c4e5d;
  background: #0b1921;
  box-shadow: 0 18px 44px rgb(0 0 0 / 26%), inset 0 1px 0 rgb(96 165 250 / 6%);
}

/* The topbar already owns quick capture when there is no draft or inbox item. */
body.owner-shell-v1 .command-panel[data-command-state="idle"] {
  display: none;
}

body.owner-shell-v1 .overview-home-head {
  padding-bottom: 16px;
  border-bottom: 1px solid #203d49;
}

body.owner-shell-v1 .overview-home-head h3 {
  font-size: 20px;
}

body.owner-shell-v1 .overview-focus-panel,
body.owner-shell-v1 .overview-change-panel {
  border-color: #203d49;
  background: #0a171e;
}

body.owner-shell-v1 .overview-signal-card {
  border-top: 2px solid var(--cc-accent);
  min-height: 82px;
  padding: 14px;
}

body.owner-shell-v1 [data-overview-signal="reminders"] {
  border-top-color: var(--cc-warning);
}

body.owner-shell-v1 [data-overview-signal="finance"] {
  border-top-color: var(--cc-danger);
}

body.owner-shell-v1 [data-overview-signal="people"] {
  border-top-color: var(--cc-blue);
}

body.owner-shell-v1 [data-overview-signal="activity"] {
  border-top-color: var(--cc-accent);
}

body.owner-shell-v1 .bar,
body.owner-shell-v1 .bar-track,
body.owner-shell-v1 .progress-track,
body.owner-shell-v1 .chart-track {
  background: #173642;
}

@media (min-width: 1081px) {
  body.owner-shell-v1 .topbar {
    grid-template-columns: minmax(260px, 0.92fr) minmax(320px, 1.08fr) minmax(280px, 340px);
  }

  body.owner-shell-v1 .status {
    width: 100%;
    max-width: 340px;
    justify-self: end;
  }

  body.owner-shell-v1 #workspaceStatus {
    max-width: 82px;
    font-size: 11px;
  }

  body.owner-shell-v1 #commandCenterShell[data-workspace-id]:not([data-workspace-id=""]) #workspaceStatus {
    max-width: none;
    overflow: visible;
    font-size: 0;
    text-overflow: clip;
  }

  body.owner-shell-v1 #commandCenterShell[data-workspace-id]:not([data-workspace-id=""]) #workspaceStatus::after {
    content: "在线";
    font-size: 11px;
  }
}

@media (min-width: 1400px) {
  body.owner-shell-v1 .topbar {
    grid-template-columns: minmax(320px, 0.92fr) minmax(390px, 1.08fr) minmax(320px, 360px);
  }

  body.owner-shell-v1 .status {
    max-width: 360px;
  }
}

/* Finance, FullCalendar and Tabulator */
body.owner-shell-v1 .finance-grid {
  --finance-tech-surface: var(--cc-surface);
  --finance-tech-muted: var(--cc-surface-muted);
  --finance-tech-line: var(--cc-line);
  --finance-tech-accent: var(--cc-accent);
}

body.owner-shell-v1 .finance-grid .panel,
body.owner-shell-v1 .finance-overview-summary,
body.owner-shell-v1 .finance-overview-assets,
body.owner-shell-v1 .finance-calendar-scroll,
body.owner-shell-v1 .category-chart,
body.owner-shell-v1 .chart-donut,
body.owner-shell-v1 .finance-record-row,
body.owner-shell-v1 .bar-row,
body.owner-shell-v1 .chart-bar-row,
body.owner-shell-v1 .budget-row {
  border-color: var(--cc-line);
  background: var(--cc-surface);
  background-image: none;
  box-shadow: none;
  color: var(--cc-ink);
}

body.owner-shell-v1 .finance-overview-filter-bar,
body.owner-shell-v1 .finance-overview-range-summary,
body.owner-shell-v1 .quick-category-strip,
body.owner-shell-v1 .finance-calendar-toolbar,
body.owner-shell-v1 [data-tab-panel="finance-ledger"] .workbench-actions,
body.owner-shell-v1 .chart-panel .workbench-actions {
  border-color: var(--cc-line);
  background: #0e2420;
}

body.owner-shell-v1 .finance-overview-kpis .kpi,
body.owner-shell-v1 .asset-balance-kpis .kpi,
body.owner-shell-v1 .asset-reference-kpis .kpi {
  background: #0d211d;
}

body.owner-shell-v1 .finance-ledger-v2,
body.owner-shell-v1 .finance-ledger-inspector {
  border-color: var(--cc-line);
  background: #091a16;
  color: var(--cc-ink);
}

body.owner-shell-v1 .finance-ledger-v2__table th,
body.owner-shell-v1 .finance-ledger-v2 .tabulator-col,
body.owner-shell-v1 .tabulator .tabulator-header,
body.owner-shell-v1 .tabulator .tabulator-header .tabulator-col {
  border-color: #315f56;
  background: #15302a;
  color: #b7d1c9;
}

body.owner-shell-v1 .finance-ledger-v2__table td,
body.owner-shell-v1 .finance-ledger-v2 .tabulator-cell,
body.owner-shell-v1 .tabulator-row .tabulator-cell {
  border-color: #193a33;
  color: var(--cc-ink);
}

body.owner-shell-v1 .tabulator,
body.owner-shell-v1 .tabulator-tableholder,
body.owner-shell-v1 .tabulator-table,
body.owner-shell-v1 .tabulator-row {
  background: #091a16;
  color: var(--cc-ink);
}

body.owner-shell-v1 .tabulator-row:nth-child(even) {
  background: #0c211c;
}

body.owner-shell-v1 .finance-ledger-v2__table tbody tr:hover td,
body.owner-shell-v1 .finance-ledger-v2 .tabulator-row:hover .tabulator-cell {
  background: #12372f;
}

body.owner-shell-v1 .finance-ledger-v2__table tbody tr.is-selected td,
body.owner-shell-v1 .finance-ledger-v2 .tabulator-row.tabulator-selected .tabulator-cell,
body.owner-shell-v1 .finance-ledger-v2 .tabulator-row.is-selected .tabulator-cell {
  background: #164238;
}

body.owner-shell-v1 .finance-calendar-v2.fc {
  --fc-page-bg-color: #0b1d1a;
  --fc-neutral-bg-color: #15302a;
  --fc-list-event-hover-bg-color: #12372f;
  --fc-border-color: #285249;
  --fc-button-text-color: #d9ece6;
  --fc-button-bg-color: #0b201c;
  --fc-button-border-color: #315f56;
  --fc-button-hover-bg-color: #12372f;
  --fc-button-hover-border-color: #39d5c1;
  --fc-button-active-bg-color: #147866;
  --fc-button-active-border-color: #43ddc8;
  --fc-today-bg-color: rgb(57 213 193 / 10%);
  color: var(--cc-ink);
}

body.owner-shell-v1 .finance-calendar-v2.fc .fc-scrollgrid,
body.owner-shell-v1 .finance-calendar-v2.fc td,
body.owner-shell-v1 .finance-calendar-v2.fc th {
  border-color: #285249;
}

body.owner-shell-v1 .finance-calendar-v2.fc .fc-col-header-cell,
body.owner-shell-v1 .finance-calendar-v2.fc .fc-daygrid-day {
  background: #0b1d1a;
}

body.owner-shell-v1 .finance-calendar-v2.fc .fc-day-other {
  background: #081612;
  color: #68877e;
}

body.owner-shell-v1 .finance-calendar-v2.fc .fc-day-today {
  background: rgb(57 213 193 / 10%);
}

body.owner-shell-v1 .finance-calendar-v2.fc .finance-calendar-event.is-expense {
  background: rgb(255 107 121 / 15%);
  color: #ff8e99;
}

body.owner-shell-v1 .finance-calendar-v2.fc .finance-calendar-event.is-income {
  background: rgb(69 214 155 / 15%);
  color: #72e6ad;
}

body.owner-shell-v1 .calendar .day,
body.owner-shell-v1 .day {
  border-color: var(--cc-line);
  background: #0b1d1a;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 .calendar .day.selected,
body.owner-shell-v1 .day.selected {
  border-color: var(--cc-accent);
  background: #14372f;
  box-shadow: inset 0 0 0 1px rgb(57 213 193 / 12%);
}

body.owner-shell-v1 .calendar .day b,
body.owner-shell-v1 .day b {
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-balance-head,
  .asset-capture-panel-v2,
  .asset-ledger-section,
  .asset-monthly-reconciliation,
  .asset-reconciliation-grid,
  .asset-reference-card,
  .asset-history-panel,
  .asset-history-list,
  .asset-reference-history-list,
  .asset-balance-column,
  .asset-save-preview,
  .asset-current-context,
  .asset-mode-note,
  .asset-flow-label
) {
  border-color: var(--cc-line);
  background: var(--cc-surface);
  background-image: none;
  box-shadow: none;
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-section-title,
  .asset-ledger-header,
  .asset-quick-presets,
  .asset-clearance-toolbar,
  .asset-reconciliation-controls,
  .asset-history-filter,
  .asset-workflow-strip
) {
  border-color: var(--cc-line);
  background: #102823;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-ledger-row,
  .asset-reconciliation-line,
  .asset-reference-row,
  .asset-history-row
) {
  border-color: #193a33;
  background: #0b1d1a;
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-ledger-row:nth-child(even),
  .asset-reconciliation-line:nth-child(even),
  .asset-history-row:hover,
  .asset-reference-row:hover
) {
  background: #0e2520;
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-section-title strong,
  .asset-flow-label strong,
  .asset-mode-note strong,
  .asset-current-context strong,
  .asset-save-preview strong,
  .asset-history-comparison strong,
  .asset-reference-row strong,
  .asset-reference-row b,
  .asset-history-row strong,
  .asset-history-row b,
  .asset-save-preview-grid b,
  .asset-reference-kpis b,
  .asset-history-summary strong,
  .asset-history-detail-head strong
) {
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-reference-row small,
  .asset-history-row small,
  .asset-save-preview-grid span,
  .asset-reference-kpis span,
  .asset-history-summary span,
  .asset-history-comparison span,
  .asset-history-comparison small,
  .asset-history-detail-head span
) {
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  input,
  select,
  textarea,
  .asset-reconciliation-name,
  .asset-reconciliation-amount,
  .asset-reconciliation-note,
  .asset-snapshot-name,
  .asset-snapshot-amount,
  .asset-snapshot-note
) {
  border-color: #315f56;
  background: #071713;
  color: var(--cc-ink);
  box-shadow: none;
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-save-preview-grid span,
  .asset-reference-kpis span,
  .asset-history-summary > div,
  .asset-history-comparison,
  .asset-history-detail
) {
  border-color: var(--cc-line);
  background: #0e2420;
}

body.owner-shell-v1 [data-asset-human-contract].asset-workbench-v2 :is(
  .asset-row-delete,
  [data-asset-reconciliation-delete]
) {
  border-color: #8a3d48;
  background: #2b171c;
  color: #ff9aa5;
}

/* V5 asset dark-theme authority: product-ui.css intentionally owns layout. */
body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-entry-reference-panel,
  .asset-human-ledger,
  .asset-ledger-rows,
  .asset-ledger-section,
  .asset-draft-totals,
  .asset-draft-delta,
  .asset-reconciliation-meta,
  .asset-reconciliation-actions,
  .asset-row-reference
) {
  border-color: var(--cc-line);
  background: #0e2420;
  background-image: none;
  box-shadow: none;
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-section-title,
  .asset-task-switcher
) {
  border-color: var(--cc-line);
  background: #102823;
  background-image: none;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-section-title strong,
body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-row-reference b {
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-row-reference span {
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide span {
  border-color: var(--cc-line);
  background: #0e2420;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 .asset-reconcile-guide b {
  border-color: #397166;
  background: #14372f;
  color: #82f2e1;
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-task-switcher a,
  .asset-clearance-toolbar .mini-action,
  .asset-clearance-toolbar .hud-button,
  .asset-quick-presets .mini-action
) {
  border-color: #315f56;
  background: #0a1b18;
  color: #d6e9e3;
}

body.owner-shell-v1 [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-task-switcher a:hover,
  .asset-task-switcher a.active,
  .asset-task-switcher a[aria-pressed="true"],
  .asset-clearance-toolbar .active,
  .asset-clearance-tools .mini-action[aria-pressed="true"],
  .asset-clearance-tools .mini-action.active,
  .asset-quick-presets .mini-action:hover
) {
  border-color: var(--cc-accent);
  background: #14372f;
  color: #82f2e1;
}
/* End V5 asset dark-theme authority. */

/* People, reminders, knowledge and items inherit the cockpit tokens. */
body.owner-shell-v1 .cc-people-v2 {
  --people-blue-soft: #102b38;
  --people-warning: var(--cc-warning);
  --people-warning-soft: var(--cc-warning-soft);
  --people-danger: var(--cc-danger);
  --people-danger-soft: var(--cc-danger-soft);
}

body.owner-shell-v1 .cc-people-v2 > .panel,
body.owner-shell-v1 [data-reminders-v2] > .panel {
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1 .cc-people-v2 .people-avatar {
  border-color: #397166;
  background: #12372f;
  color: #82f2e1;
}

body.owner-shell-v1 .cc-people-v2 .people-person-row:hover {
  background: #0f2924;
}

body.owner-shell-v1 .cc-people-v2 .people-person-row.active,
body.owner-shell-v1 .cc-people-v2 .people-person-row[aria-current="true"] {
  border-color: #397166;
  background: #14372f;
}

body.owner-shell-v1 .cc-people-v2 .people-overview-create,
body.owner-shell-v1 .cc-people-v2 .people-duplicate-candidate,
body.owner-shell-v1 .cc-people-v2 .people-archive-confirmation {
  border-color: var(--cc-line);
  background: #0e2420;
}

body.owner-shell-v1 [data-reminders-v2] {
  --reminder-red: var(--cc-danger);
  --reminder-amber: var(--cc-warning);
  --reminder-green: #45d69b;
  --reminder-blue: var(--cc-blue);
}

body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure > summary,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-count,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-more summary,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-more-menu,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-edit-fields {
  border-color: var(--cc-line);
  background: #0e2420;
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-reminders-v2] .reminder-v2-row:hover,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-duplicate-group[open] > summary,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-duplicate-items {
  background: #0f2924;
}

body.owner-shell-v1 .panel.knowledge-v2,
body.owner-shell-v1 .knowledge-v2__browser,
body.owner-shell-v1 .knowledge-v2__record {
  background: #14191f;
}

body.owner-shell-v1 .knowledge-v2__summary,
body.owner-shell-v1 .knowledge-v2__atlas,
body.owner-shell-v1 .knowledge-v2__capture,
body.owner-shell-v1 .knowledge-v2__readonly-archive,
body.owner-shell-v1 .knowledge-v2__search-row,
body.owner-shell-v1 .knowledge-v2__saved-views,
body.owner-shell-v1 .knowledge-v2__detail {
  border-color: var(--cc-line);
  background: #181d24;
}

body.owner-shell-v1 .knowledge-v2__command-bar,
body.owner-shell-v1 .knowledge-v2__cadence {
  border-color: var(--cc-line);
  background: #181d24 !important;
  color: var(--cc-ink);
}

body.owner-shell-v1 .knowledge-v2__command-context > [data-lucide] {
  border-color: var(--cc-line-strong);
  background: #1e2630;
}

body.owner-shell-v1 .knowledge-v2__browser-head,
body.owner-shell-v1 .knowledge-v2__record > summary:hover,
body.owner-shell-v1 .knowledge-v2__readonly-archive > summary:hover,
body.owner-shell-v1 .knowledge-v2__readonly-archive[open] > summary {
  background: #222b35;
}

body.owner-shell-v1 .knowledge-v2__record[open] > summary {
  background: #1d2b32;
}

body.owner-shell-v1 .knowledge-v2__source {
  background: #1b2733;
}

body.owner-shell-v1 .knowledge-v2__metric > [data-lucide],
body.owner-shell-v1 .knowledge-v2__coverage-row > [data-lucide] {
  background: #1e2630;
}

body.owner-shell-v1 .knowledge-v2__distribution-row > div,
body.owner-shell-v1 .knowledge-v2__coverage-row > div {
  background: #202b34;
}

body.owner-shell-v1 .knowledge-v2__distribution-row > div > i {
  background: var(--cc-blue);
}

body.owner-shell-v1 .knowledge-v2__coverage-row > div > i {
  background: var(--cc-accent);
}

body.owner-shell-v1 .knowledge-v2__focus-row > [data-lucide] {
  background: var(--cc-warning-soft);
}

body.owner-shell-v1 [data-items-v2="true"] > .panel {
  border-color: var(--cc-line);
  background: var(--cc-surface);
  box-shadow: none;
}

body.owner-shell-v1 [data-items-v2="true"] {
  --items-warning: var(--cc-warning);
  --items-warning-soft: var(--cc-warning-soft);
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__item-row[open] > .items-v2__item-summary,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__feedback.success {
  background: #14372f;
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__projection-note,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__readonly-notice,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__detail-grid div {
  border-color: var(--cc-line);
  background: #0e2420;
}

body.owner-shell-v1 [data-items-v2="true"] .items-v2__duplicate-count {
  border-color: #806832;
  background: var(--cc-warning-soft);
  color: #f3c873;
}

body.owner-shell-v1 .cc-import-v2 #importPreviewSubmit,
body.owner-shell-v1 .cc-import-v2 [data-import-v2-confirm="selected"] {
  border-color: #43ddc8;
  background: #147866;
  color: #f3fffc;
}

/* Library and Vault use hard-coded legacy whites, so this is their theme boundary. */
body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 {
  --library-line: var(--cc-line);
  --library-line-soft: #193a33;
  --library-ink: var(--cc-ink);
  --library-muted: var(--cc-ink-soft);
  --library-surface-soft: var(--cc-surface-muted);
  --library-accent: var(--cc-accent);
  --library-accent-soft: var(--cc-accent-soft);
  --library-amber: var(--cc-warning);
  --library-amber-soft: var(--cc-warning-soft);
}

body.owner-shell-v1 [data-command-library="vault"].library-owner-v1 > .panel,
body.owner-shell-v1 [data-command-library="vault"] :is(
  .library-record-detail,
  .library-search-row,
  .library-form input,
  .library-form select,
  .library-form textarea,
  .library-search-row input,
  .library-search-row select,
  .library-attachment-chip
) {
  border-color: var(--cc-line);
  background: var(--cc-surface);
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-command-library="vault"] :is(
  .library-record-summary:hover,
  .library-document-record:hover,
  .library-attachment-record:hover,
  .library-empty-state,
  .library-safety-callout
) {
  background: var(--cc-surface-muted);
}

body.owner-shell-v1 [data-command-library="vault"] .library-empty-state strong,
body.owner-shell-v1 [data-command-library="vault"] .library-form .field small {
  color: var(--cc-ink);
}

body.owner-shell-v1 [data-command-library="vault"] .library-state-chip.is-safe {
  border-color: #2e6f5e;
  background: #12372f;
  color: #7ce6ad;
}

body.owner-shell-v1 [data-command-library="vault"] .library-safety-callout {
  border-left-color: #9a742d;
  background: var(--cc-warning-soft);
  color: #f3c873;
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal[data-tone="preview"] [data-lucide] {
  color: var(--cc-blue);
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal[data-tone="incomplete"] [data-lucide] {
  color: var(--cc-warning);
}

body.owner-shell-v1 [data-command-library="vault"] .library-intelligence__signal[data-tone="unfiled"] [data-lucide] {
  color: var(--cc-danger);
}

body.owner-shell-v1 [data-command-library="vault"] .library-form .hud-button.primary {
  border-color: #43ddc8;
  background: #147866;
  color: #f3fffc;
}

body.owner-shell-v1 [data-command-library="vault"] .library-form input[type="file"]::file-selector-button {
  border-color: var(--cc-line);
  background: #102823;
  color: #d6e9e3;
}

/* Assistant and authentication remain first-class dark surfaces. */
body.owner-shell-v1 .ai-panel,
body.owner-shell-v1 .answer-card,
body.owner-shell-v1 .ai-result,
body.owner-shell-v1 .prompt {
  border-color: var(--cc-line);
  background: #091a16;
  color: var(--cc-ink);
}

body.owner-shell-v1 .ai-close,
body.owner-shell-v1 .ai-query-form input,
body.owner-shell-v1 .ai-query-form button {
  border-color: #315f56;
  background: #0e2420;
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required,
body.owner-shell-v1.auth-required .shell,
body.owner-shell-v1.auth-required .workspace,
body.owner-shell-v1.auth-required .sidebar {
  background-color: var(--cc-canvas);
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required .workspace {
  background-image:
    linear-gradient(rgb(67 221 200 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(67 221 200 / 4%) 1px, transparent 1px);
  background-size: 32px 32px;
}

body.owner-shell-v1.auth-required .login-required {
  position: relative;
  overflow: hidden;
  border-color: var(--cc-line);
  background: linear-gradient(115deg, #0b1d1a 0 52%, #091815 52% 100%);
  box-shadow: 0 24px 70px rgb(0 0 0 / 34%);
}

body.owner-shell-v1.auth-required .login-required::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cc-accent);
  content: "";
}

body.owner-shell-v1.auth-required .brand h1,
body.owner-shell-v1.auth-required .login-required h3,
body.owner-shell-v1.auth-required .login-required .row strong,
body.owner-shell-v1.auth-required .auth-form label {
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required .brand small,
body.owner-shell-v1.auth-required .login-required p:not(.eyebrow) {
  color: var(--cc-ink-soft);
}

body.owner-shell-v1.auth-required .auth-grid > div:first-child,
body.owner-shell-v1.auth-required .login-required .list,
body.owner-shell-v1.auth-required .login-required .list .row {
  border-color: var(--cc-line);
}

body.owner-shell-v1.auth-required .auth-form input {
  border-color: #315f56;
  background: #071713;
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required .auth-form button {
  border-color: #43ddc8;
  background: #147866;
  color: #f3fffc;
}

body.owner-shell-v1.auth-required .auth-form button:hover {
  background: #1a907a;
  box-shadow: 0 8px 24px rgb(67 221 200 / 12%);
}

body.owner-shell-v1.auth-required .login-required .tag {
  border-color: var(--cc-line);
  background: #102823;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1.auth-required .auth-message.error {
  border-color: #8a3d48;
  background: var(--cc-danger-soft);
  color: #ff9aa5;
}

body.owner-shell-v1.auth-required .auth-message.error:not(:empty) {
  border-color: #315f56;
  background: #0e2420;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1 .knowledge-v2__archive-action:hover,
body.owner-shell-v1 .knowledge-v2__archive-action:focus-visible {
  background: var(--cc-danger-soft);
}

@media (max-width: 760px) {
  body.owner-shell-v1 .library-signal-strip .compact-kpis > .kpi:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1 .workspace {
    gap: 8px;
    padding: 8px 9px 18px;
  }

  body.owner-shell-v1 .grid {
    gap: 10px;
  }

  body.owner-shell-v1 .panel {
    padding: 14px;
  }

  body.owner-shell-v1 .panel h3 {
    margin-bottom: 10px;
    font-size: 15px;
  }

  body.owner-shell-v1 .panel h4 {
    font-size: 13px;
  }

  body.owner-shell-v1 .row {
    min-height: 48px;
    padding: 9px 10px;
  }

  body.owner-shell-v1 .overview-home-head h3 {
    font-size: 17px;
  }

  body.owner-shell-v1 .overview-signal-card {
    min-height: 74px;
    padding: 11px;
  }

  body.owner-shell-v1 .sidebar {
    border-top-color: #2a5c52;
    background: #040d0c;
    box-shadow: 0 -8px 24px rgb(0 0 0 / 28%);
  }

  body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
    color: #73978c;
  }

  body.owner-shell-v1 #primaryNav .cc-shell-nav__item:hover {
    background: #0d2621;
    color: #aee9dc;
  }

  body.owner-shell-v1 #primaryNav .cc-shell-nav__item[aria-current="page"],
  body.owner-shell-v1 #primaryNav .cc-shell-nav__item.active {
    background: #12372f;
    box-shadow: inset 0 2px 0 var(--cc-accent);
    color: #8ff4e4;
  }

  body.owner-shell-v1 .topbar {
    background: #081815;
  }

  body.owner-shell-v1 .workspace {
    background-size: 24px 24px;
  }

  body.owner-shell-v1:has([data-command-settings="true"]) #moduleTabs .tab {
    flex: 0 0 auto;
    min-width: 88px;
    white-space: nowrap;
  }

  body.owner-shell-v1.ai-open .ai-panel:has(#aiAnswerCard > p.muted:last-child) {
    grid-template-rows: auto auto auto auto auto;
    height: auto;
  }

  body.owner-shell-v1 .answer-card:has(> p.muted:last-child) {
    max-height: none;
    overflow: visible;
  }

  body.owner-shell-v1.auth-required .sidebar,
  body.owner-shell-v1.auth-required .workspace,
  body.owner-shell-v1.auth-required .shell {
    background: var(--cc-canvas);
  }

  body.owner-shell-v1.auth-required .sidebar {
    padding-bottom: 4px;
  }

  body.owner-shell-v1.auth-required .workspace {
    padding-top: 6px;
    background-image: none;
  }

  body.owner-shell-v1.auth-required .login-required {
    background: #0b1d1a;
  }

  body.owner-shell-v1.auth-required .login-required::before {
    inset: 0 0 auto;
    width: auto;
    height: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1 *,
  body.owner-shell-v1 *::before,
  body.owner-shell-v1 *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Night work mode: a focused command deck, not a blacked-out day surface. */
html[data-theme="night"]:has(body.owner-shell-v1) {
  background: #111a20;
}

html[data-theme="night"] body.owner-shell-v1 {
  --cc-canvas: #111a20;
  --cc-surface: #18252e;
  --cc-surface-muted: #1d2d37;
  --cc-surface-strong: #263945;
  --cc-ink: #edf5f6;
  --cc-ink-soft: #a7bbc1;
  --cc-ink-faint: #718a95;
  --cc-line: #304752;
  --cc-line-strong: #51717c;
  --cc-nav: #10191f;
  --cc-nav-hover: #182832;
  --cc-nav-active: #203944;
  --cc-accent: #58b7aa;
  --cc-accent-strong: #a2e3d9;
  --cc-accent-soft: #183d42;
  --cc-blue: #8abbd7;
  --cc-danger: #ed887f;
  --cc-warning: #d8b16b;
  --cc-shadow-float: 0 18px 42px rgb(6 14 18 / 30%);
  --product-bg: var(--cc-canvas);
  --product-surface: var(--cc-surface);
  --product-surface-soft: var(--cc-surface-muted);
  --product-sidebar: var(--cc-nav);
  --product-text: var(--cc-ink);
  --product-muted: var(--cc-ink-soft);
  --product-line: var(--cc-line);
  --product-line-strong: var(--cc-line-strong);
  --product-accent: var(--cc-accent);
  --product-accent-soft: var(--cc-accent-soft);
  --product-red: var(--cc-danger);
  --product-amber: var(--cc-warning);
  --product-green: #79c9a6;
  --product-blue: var(--cc-blue);
  --product-violet: #a4bad2;
}

html[data-theme="night"] body.owner-shell-v1 .shell,
html[data-theme="night"] body.owner-shell-v1 .main {
  background: var(--cc-canvas);
}

html[data-theme="night"] body.owner-shell-v1 .workspace {
  background-color: #142028;
  background-image:
    linear-gradient(rgb(125 171 183 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(125 171 183 / 3%) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 31px, rgb(125 171 183 / 1.5%) 32px, transparent 33px 64px);
  background-size: 48px 48px, 48px 48px, 128px 128px;
}

html[data-theme="night"] body.owner-shell-v1 .sidebar {
  background: #10191f;
  border-right-color: #2c424c;
  box-shadow: inset -1px 0 0 rgb(138 187 215 / 7%);
}

html[data-theme="night"] body.owner-shell-v1 .topbar {
  border-bottom-color: #2d4550;
  background: rgb(17 26 32 / 93%);
  box-shadow: 0 8px 28px rgb(7 14 18 / 20%);
  backdrop-filter: blur(14px);
}

html[data-theme="night"] body.owner-shell-v1 .module-tabs-shell,
html[data-theme="night"] body.owner-shell-v1 .command,
html[data-theme="night"] body.owner-shell-v1 .segmented-control {
  border-color: #3a5460;
  background: rgb(23 36 44 / 92%);
}

html[data-theme="night"] body.owner-shell-v1 .panel,
html[data-theme="night"] body.owner-shell-v1 .ai-panel {
  border-color: var(--cc-line);
  background: var(--cc-surface);
  box-shadow: 0 16px 34px rgb(6 14 18 / 19%), inset 0 1px 0 rgb(214 240 243 / 5%);
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck {
  position: relative;
  overflow: hidden;
  border-color: #46616c;
  background: #1a2a33;
  box-shadow: 0 16px 36px rgb(6 14 18 / 28%), inset 0 1px 0 rgb(224 247 248 / 7%);
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck::before {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 4%, rgb(162 227 217 / 19%) 4% 17%, transparent 17% 100%),
    linear-gradient(90deg, rgb(138 187 215 / 6%) 1px, transparent 1px);
  background-position: left top, right top;
  background-repeat: no-repeat, repeat;
  background-size: 100% 2px, 44px 44px;
  content: "";
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck > * {
  position: relative;
  z-index: 1;
}

html[data-theme="night"] body.owner-shell-v1 .overview-focus-panel,
html[data-theme="night"] body.owner-shell-v1 .overview-change-panel {
  background: transparent;
}

html[data-theme="night"] body.owner-shell-v1 .overview-context-strip .overview-signal-card {
  background: transparent;
}

html[data-theme="night"] body.owner-shell-v1 .tab.active {
  border-color: #6fc4b9;
  background: #233b45;
  color: #b8eee6;
}

html[data-theme="night"] body.owner-shell-v1 .overview-home-head h3,
html[data-theme="night"] body.owner-shell-v1 .panel h3 {
  font-weight: 720;
}

html[data-theme="night"] body.owner-shell-v1 .row:hover {
  background: #20323c;
}

html[data-theme="night"] body.owner-shell-v1 .hud-button,
html[data-theme="night"] body.owner-shell-v1 .mini-action,
html[data-theme="night"] body.owner-shell-v1 .workbench-actions a,
html[data-theme="night"] body.owner-shell-v1 .segmented-option {
  border-color: #46636f;
  background: #1d3039;
  color: #d6e8e9;
}

html[data-theme="night"] body.owner-shell-v1 .hud-button.primary,
html[data-theme="night"] body.owner-shell-v1 .mini-action.primary {
  border-color: #72c8bc;
  background: #2d8278;
  color: #f4fffd;
}

@media (max-width: 760px) {
  html[data-theme="night"] body.owner-shell-v1 .workspace {
    background-size: 32px 32px, 32px 32px, 96px 96px;
  }

  html[data-theme="night"] body.owner-shell-v1 .topbar {
    background: rgb(17 26 32 / 96%);
  }
}

/* UI structural polish r1: low-contrast deep-space atmosphere behind readable work surfaces. */
html[data-theme="night"] body.owner-shell-v1 .workspace {
  position: relative;
  isolation: isolate;
  background-color: #0b161d;
  background-image:
    linear-gradient(180deg, rgb(6 14 19 / 68%) 0%, rgb(6 14 19 / 83%) 46%, rgb(6 14 19 / 95%) 100%),
    url("/static/command_center/assets/night-cosmos-r1.jpg"),
    linear-gradient(rgb(125 171 183 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(125 171 183 / 3%) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 31px, rgb(125 171 183 / 1.5%) 32px, transparent 33px 64px);
  background-position: center top, center top, left top, left top, left top;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
  background-size: cover, 100% auto, 48px 48px, 48px 48px, 128px 128px;
  background-attachment: scroll, fixed, scroll, scroll, scroll;
}

html[data-theme="night"] body.owner-shell-v1 .module-tabs-shell,
html[data-theme="night"] body.owner-shell-v1 .command {
  box-shadow: 0 8px 22px rgb(3 10 14 / 18%);
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck {
  background: rgb(19 37 45 / 87%);
  backdrop-filter: blur(2px);
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(5 14 19 / 20%), rgb(5 14 19 / 56%)),
    url("/static/command_center/assets/night-cosmos-r1.jpg") center top / cover no-repeat;
  opacity: 0.27;
  mix-blend-mode: screen;
  content: "";
}

html[data-theme="night"] body.owner-shell-v1 .overview-focus-panel,
html[data-theme="night"] body.owner-shell-v1 .overview-change-panel,
html[data-theme="night"] body.owner-shell-v1 .overview-context-strip .overview-signal-card {
  position: relative;
  z-index: 1;
}

html[data-theme="night"] body.owner-shell-v1 .panel {
  box-shadow: 0 18px 38px rgb(4 12 16 / 22%), inset 0 1px 0 rgb(214 240 243 / 6%);
}

@media (max-width: 760px) {
  html[data-theme="night"] body.owner-shell-v1 .workspace {
    background-position: center top, center top, left top, left top, left top;
    background-size: cover, auto 520px, 32px 32px, 32px 32px, 96px 96px;
    background-attachment: scroll, scroll, scroll, scroll, scroll;
  }

  /* Keep the mobile command deck crisp; the atmospheric image remains on the deck overlay. */
  html[data-theme="night"] body.owner-shell-v1 .overview-command-deck {
    background: rgb(19 37 45 / 94%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="night"] body.owner-shell-v1 .overview-command-deck::after {
    background-size: auto 520px;
  }
}

/* The night image is an atmosphere layer, not a hidden texture under opaque panels. */
html[data-theme="night"] body.owner-shell-v1 .workspace {
  background-image:
    linear-gradient(180deg, rgb(5 13 18 / 28%) 0%, rgb(5 13 18 / 54%) 48%, rgb(5 13 18 / 76%) 100%),
    url("/static/command_center/assets/night-cosmos-r1.jpg"),
    linear-gradient(rgb(125 171 183 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(125 171 183 / 3%) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 31px, rgb(125 171 183 / 1.5%) 32px, transparent 33px 64px);
  background-size: cover, cover, 48px 48px, 48px 48px, 128px 128px;
}

html[data-theme="night"] body.owner-shell-v1 .panel {
  background: rgb(16 31 39 / 79%);
  backdrop-filter: blur(7px) saturate(106%);
  -webkit-backdrop-filter: blur(7px) saturate(106%);
}

html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-overview,
html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-queue-panel {
  border-color: rgb(110 161 170 / 51%);
  background:
    linear-gradient(135deg, rgb(91 184 171 / 8%), transparent 40%),
    rgb(12 29 38 / 76%);
  box-shadow: 0 22px 44px rgb(3 11 16 / 26%), inset 0 1px 0 rgb(211 243 244 / 7%);
}

html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure > summary {
  border-color: rgb(92 153 162 / 58%);
  background: rgb(20 48 58 / 64%);
}

html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-notification-setting,
html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure {
  border-left-color: rgb(111 170 178 / 42%);
}

html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-kpis {
  border-color: rgb(111 170 178 / 42%);
  background: rgb(8 24 31 / 38%);
}

html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-kpis .kpi {
  background: transparent;
}

html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-row:hover,
html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-duplicate-group[open] > summary,
html[data-theme="night"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-duplicate-items {
  background: rgb(43 85 92 / 42%);
}

@media (max-width: 760px) {
  html[data-theme="night"] body.owner-shell-v1 .workspace {
    background-size: cover, auto 610px, 32px 32px, 32px 32px, 96px 96px;
  }

  html[data-theme="night"] body.owner-shell-v1 .panel {
    background: rgb(16 31 39 / 91%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}


/* source: styles/global-search.css */
.global-search-mount {
  display: flex;
  min-width: 0;
}

html.owner-global-search-open,
body.owner-global-search-open {
  overflow: hidden;
}

.owner-global-search-trigger {
  display: inline-flex;
  min-width: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 4px;
  border: 1px solid #334d54;
  border-radius: 4px;
  background: #0b1518;
  color: #d8eee7;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0;
  cursor: pointer;
}

.owner-global-search-trigger:hover,
.owner-global-search-trigger:focus-visible {
  border-color: var(--cc-accent, #35d6c2);
  outline: 0;
  background: #12372f;
  color: #eafff9;
}

.owner-global-search-trigger:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.owner-global-search-trigger svg,
.owner-global-search__header > svg,
.owner-global-search__close svg,
.owner-global-search__result > svg,
.owner-global-search__empty svg {
  flex: 0 0 auto;
}

.owner-global-search {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  height: min(680px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  border: 1px solid #42616a;
  border-radius: 6px;
  background: #0b1214;
  color: #edf5f4;
  box-shadow: 0 24px 70px rgb(0 0 0 / 58%);
  overflow: hidden;
}

.owner-global-search::backdrop {
  background: rgb(0 5 7 / 78%);
  backdrop-filter: blur(3px);
}

.owner-global-search__surface {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.owner-global-search__header {
  display: grid;
  min-width: 0;
  grid-template-columns: 24px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #293b40;
  background: #0d1719;
  color: #82f4e5;
}

.owner-global-search__input-wrap {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.owner-global-search__input-wrap > span {
  color: #7d9999;
  font-size: 10px;
  line-height: 1;
}

.owner-global-search__input-wrap input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f3fffc;
  font: inherit;
  font-size: 16px;
  letter-spacing: 0;
}

.owner-global-search__input-wrap input::placeholder {
  color: #68817f;
}

.owner-global-search__close {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #334d54;
  border-radius: 4px;
  background: #111a1d;
  color: #aababc;
  cursor: pointer;
}

.owner-global-search__close:hover,
.owner-global-search__close:focus-visible {
  border-color: #35d6c2;
  outline: 0;
  color: #eafff9;
}

.owner-global-search__status {
  min-height: 30px;
  padding: 7px 14px;
  border-bottom: 1px solid #1d3034;
  background: #081012;
  color: #7f989c;
  font-size: 11px;
}

.owner-global-search__results {
  min-width: 0;
  min-height: 0;
  padding: 8px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.owner-global-search__group {
  padding: 4px 0 8px;
}

.owner-global-search__group + .owner-global-search__group {
  border-top: 1px solid #1f3034;
}

.owner-global-search__group > header {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  color: #7d9999;
  font-size: 11px;
}

.owner-global-search__group > header strong {
  color: #8fdccc;
  font-weight: 700;
}

.owner-global-search__result {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  grid-template-columns: 26px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #d8e5e3;
  text-align: left;
  cursor: pointer;
}

.owner-global-search__result:hover,
.owner-global-search__result:focus-visible,
.owner-global-search__result[aria-selected="true"] {
  border-color: #315f56;
  outline: 0;
  background: #102823;
  color: #f3fffc;
}

.owner-global-search__result > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.owner-global-search__result strong,
.owner-global-search__result small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-global-search__result strong {
  color: inherit;
  font-size: 13px;
}

.owner-global-search__result small {
  color: #91a5a6;
  font-size: 11px;
}

.owner-global-search__result > svg:last-child {
  color: #597874;
}

.owner-global-search__empty {
  display: grid;
  min-height: 190px;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #78908f;
  font-size: 13px;
}

.owner-global-search__empty.is-error {
  color: #ff8d9d;
}

.owner-global-search__result--answer {
  border-color: color-mix(in srgb, var(--cc-accent, #35d6c2) 38%, transparent);
  background: color-mix(in srgb, var(--cc-accent-soft, #12372f) 42%, transparent);
}

/* The search surface follows the selected work mode.  The legacy dark modal
   made day mode unreadable because it bypassed the shell design tokens. */
html[data-theme="day"] .owner-global-search-trigger {
  border-color: var(--cc-line-strong, #829eaa);
  background: var(--cc-surface, #f1f6f7);
  color: var(--cc-ink, #162832);
}

html[data-theme="day"] .owner-global-search-trigger:hover,
html[data-theme="day"] .owner-global-search-trigger:focus-visible {
  border-color: var(--cc-accent, #176f7b);
  background: var(--cc-accent-soft, #d4e9eb);
  color: var(--cc-accent-strong, #0f515d);
}

html[data-theme="day"] .owner-global-search {
  border-color: var(--cc-line-strong, #829eaa);
  background: var(--cc-surface, #f1f6f7);
  color: var(--cc-ink, #162832);
  box-shadow: 0 24px 70px rgb(22 40 50 / 22%);
}

html[data-theme="day"] .owner-global-search::backdrop {
  background: rgb(22 40 50 / 24%);
  backdrop-filter: blur(4px);
}

html[data-theme="day"] .owner-global-search__header {
  border-bottom-color: var(--cc-line, #c1d0d5);
  background: var(--cc-surface-strong, #d5e0e4);
  color: var(--cc-accent-strong, #0f515d);
}

html[data-theme="day"] .owner-global-search__input-wrap > span,
html[data-theme="day"] .owner-global-search__status,
html[data-theme="day"] .owner-global-search__group > header {
  color: var(--cc-ink-soft, #526771);
}

html[data-theme="day"] .owner-global-search__input-wrap input {
  color: var(--cc-ink, #162832);
}

html[data-theme="day"] .owner-global-search__input-wrap input::placeholder {
  color: var(--cc-ink-faint, #778b94);
}

html[data-theme="day"] .owner-global-search__close {
  border-color: var(--cc-line-strong, #829eaa);
  background: var(--cc-surface, #f1f6f7);
  color: var(--cc-ink-soft, #526771);
}

html[data-theme="day"] .owner-global-search__status {
  border-bottom-color: var(--cc-line, #c1d0d5);
  background: var(--cc-surface-muted, #e7eef0);
}

html[data-theme="day"] .owner-global-search__group + .owner-global-search__group {
  border-top-color: var(--cc-line, #c1d0d5);
}

html[data-theme="day"] .owner-global-search__result {
  color: var(--cc-ink, #162832);
}

html[data-theme="day"] .owner-global-search__result:hover,
html[data-theme="day"] .owner-global-search__result:focus-visible,
html[data-theme="day"] .owner-global-search__result[aria-selected="true"] {
  border-color: var(--cc-accent, #176f7b);
  background: var(--cc-accent-soft, #d4e9eb);
  color: var(--cc-ink, #162832);
}

html[data-theme="day"] .owner-global-search__result small {
  color: var(--cc-ink-soft, #526771);
}

html[data-theme="day"] .owner-global-search__empty {
  color: var(--cc-ink-soft, #526771);
}

body.auth-required .global-search-mount {
  display: none;
}

@media (max-width: 1180px) {
  .owner-global-search-trigger {
    min-width: 38px;
    width: 38px;
    padding: 0;
  }

  .owner-global-search-trigger span {
    display: none;
  }
}

@media (max-width: 760px) {
  .global-search-mount {
    flex: 0 0 auto;
  }

  .owner-global-search-trigger {
    width: 36px;
    min-width: 36px;
    min-height: 34px;
  }

  .owner-global-search {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .owner-global-search__header {
    padding: max(10px, env(safe-area-inset-top)) 10px 10px;
  }

  .owner-global-search__result {
    min-height: 60px;
  }

  .owner-global-search__results {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .owner-global-search__result {
    scroll-behavior: auto;
  }
}

/* Compact icon fits the shared topbar grid at every desktop width. */
.owner-global-search-trigger span { display: none; }

/* Keep action hit areas independent of the current workspace name. The night
   desktop rail keeps its vertical layout; only horizontal headers use two columns. */
html[data-theme="day"] body.owner-shell-v1 #commandCenterShell .topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title status";
}

#commandCenterShell .topbar .title { min-width: 0; }

html[data-theme="day"] body.owner-shell-v1 #commandCenterShell .topbar .title { grid-area: title; }

html[data-theme="day"] body.owner-shell-v1 #commandCenterShell .topbar [data-header-controls="true"] {
  grid-area: status;
  width: auto;
  max-width: min(510px, 56vw);
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

#commandCenterShell .topbar [data-header-controls="true"] [data-theme-mode-toggle],
#commandCenterShell .topbar [data-header-controls="true"] #aiFab,
#commandCenterShell .topbar [data-header-controls="true"] .status-button,
#commandCenterShell .topbar [data-header-controls="true"] #globalSearchMount {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  box-sizing: border-box;
}

#commandCenterShell .topbar [data-header-controls="true"] .status-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
  white-space: nowrap;
  text-decoration: none;
}

#commandCenterShell .topbar [data-header-controls="true"] #globalSearchMount .owner-global-search-trigger {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  box-sizing: border-box;
}

html[data-theme] body.owner-shell-v1 #commandCenterShell .topbar .status[data-header-controls="true"] #workspaceStatus {
  min-width: 0;
  max-width: clamp(58px, 11vw, 160px);
  flex: 1 1 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme] body.owner-shell-v1 #commandCenterShell .topbar .status[data-header-controls="true"] #workspaceStatus::after {
  content: none;
}

@media (max-width: 1319px) {
  html[data-theme="night"] body.owner-shell-v1 #commandCenterShell .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title status";
  }
  html[data-theme="night"] body.owner-shell-v1 #commandCenterShell .topbar .title { grid-area: title; }
  html[data-theme="night"] body.owner-shell-v1 #commandCenterShell .topbar [data-header-controls="true"] {
    grid-area: status;
    width: auto;
    max-width: min(510px, 56vw);
    min-width: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }
}

@media (min-width: 1320px) {
  html[data-theme="night"] #commandCenterShell .topbar .status[data-header-controls="true"] #workspaceStatus {
    max-width: 100%;
    flex: 0 1 auto;
    white-space: normal;
  }
  html[data-theme="night"] #commandCenterShell .topbar [data-header-controls="true"] #globalSearchMount,
  html[data-theme="night"] #commandCenterShell .topbar [data-header-controls="true"] #globalSearchMount .owner-global-search-trigger {
    width: 100%;
  }
  html[data-theme="night"] #commandCenterShell .topbar [data-header-controls="true"] .topbar-install-link {
    order: 4;
    margin-top: 0;
    width: 100%;
  }
}

@media (max-width: 760px) {
  html[data-theme] body.owner-shell-v1 #commandCenterShell .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }
  html[data-theme] body.owner-shell-v1 #commandCenterShell .topbar .status[data-header-controls="true"] {
    max-width: none;
    gap: 3px;
  }
  html[data-theme] body.owner-shell-v1 #commandCenterShell .topbar .status[data-header-controls="true"] #workspaceStatus {
    display: none;
  }
  #commandCenterShell .topbar [data-header-controls="true"] [data-theme-mode-toggle],
  #commandCenterShell .topbar [data-header-controls="true"] #aiFab,
  #commandCenterShell .topbar [data-header-controls="true"] .status-button,
  #commandCenterShell .topbar [data-header-controls="true"] #globalSearchMount,
  #commandCenterShell .topbar [data-header-controls="true"] #globalSearchMount .owner-global-search-trigger {
    flex-basis: 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

.settings-app-install { min-width: 0; }
/* Installation instructions must remain readable outside canvas arrangement. */
html[data-theme] body.owner-shell-v1 #moduleStage[data-active-view="settings"][data-active-module-tab-panel="settings-install"] .module-canvas-grid:not(.is-editing) {
  grid-auto-rows: minmax(84px, max-content) !important;
}
html[data-theme] body.owner-shell-v1 #moduleStage[data-active-view="settings"][data-active-module-tab-panel="settings-install"] .module-canvas-grid:not(.is-editing) > .module-canvas-widget:has(> .settings-app-install) {
  height: auto;
  min-height: max-content;
}
html[data-theme] body.owner-shell-v1 #moduleStage[data-active-view="settings"][data-active-module-tab-panel="settings-install"] .module-canvas-grid:not(.is-editing) > .module-canvas-widget > .settings-app-install {
  height: auto !important;
  min-height: max-content !important;
  overflow: visible !important;
}
.settings-install-action { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.settings-install-action p { flex: 1 1 280px; margin: 0; overflow-wrap: anywhere; }
.settings-app-install [data-app-install-action] { min-height: 44px; }
.settings-app-install [data-app-install-action][hidden] { display: none; }
.settings-install-platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.settings-install-platforms article { min-width: 0; padding: 16px; border: 1px solid var(--cc-line, #334d54); border-radius: 8px; }
.settings-install-platforms h4 { margin: 0 0 10px; }
.settings-install-platforms ol { margin: 0; padding-left: 20px; line-height: 1.8; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .settings-install-platforms { grid-template-columns: minmax(0, 1fr); }
  .settings-app-install .settings-panel-heading { flex-wrap: wrap; }
}


/* source: styles/theme-mode-owner-v1.css */
:root {
  color-scheme: dark;
}

html[data-theme="day"] {
  color-scheme: light;
}

html[data-theme="night"] {
  color-scheme: dark;
}

:root:not([data-theme]) [data-theme-mode-toggle] {
  visibility: hidden;
}

[data-theme-mode-toggle] {
  display: inline-grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cc-line-strong, #3e6573);
  border-radius: var(--cc-radius-md, 6px);
  background: var(--cc-surface, #0d1a22);
  box-shadow: none;
  color: var(--cc-ink-soft, #a8bbc2);
  font: inherit;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

[data-theme-mode-toggle]:hover {
  border-color: var(--cc-accent, #2dd4bf);
  background: var(--cc-accent-soft, #0d2c31);
  color: var(--cc-accent-strong, #70ead8);
}

[data-theme-mode-toggle]:focus-visible {
  outline: 2px solid var(--cc-accent, #2dd4bf);
  outline-offset: 2px;
}

[data-theme-mode-toggle]:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

[data-theme-mode-icon] {
  display: none;
  width: 17px;
  height: 17px;
  pointer-events: none;
}

:root:not([data-theme]) [data-theme-mode-icon="day"],
html[data-theme="night"] [data-theme-mode-icon="day"],
html[data-theme="day"] [data-theme-mode-icon="night"] {
  display: block;
}

@media (forced-colors: active) {
  [data-theme-mode-toggle] {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-theme-mode-toggle] {
    transition: none;
  }
}

/* Day work mode: a paper-and-ledger desk, deliberately different from the night command deck. */
html[data-theme="day"]:has(body.owner-shell-v1) {
  background: #e7edf0;
}

html[data-theme="day"] body.owner-shell-v1 {
  --cc-canvas: #e4ebee;
  --cc-surface: #f1f6f7;
  --cc-surface-muted: #e7eef0;
  --cc-surface-strong: #d5e0e4;
  --cc-ink: #162832;
  --cc-ink-soft: #526771;
  --cc-ink-faint: #778b94;
  --cc-line: #c1d0d5;
  --cc-line-strong: #829eaa;
  --cc-nav: #172a35;
  --cc-nav-hover: #213946;
  --cc-nav-active: #2a4653;
  --cc-accent: #176f7b;
  --cc-accent-strong: #0f515d;
  --cc-accent-soft: #d4e9eb;
  --cc-blue: #356b97;
  --cc-danger: #af4d52;
  --cc-warning: #94661f;
  --product-bg: var(--cc-canvas);
  --product-surface: var(--cc-surface);
  --product-surface-soft: var(--cc-surface-muted);
  --product-sidebar: var(--cc-nav);
  --product-sidebar-muted: #64757c;
  --product-text: var(--cc-ink);
  --product-muted: var(--cc-ink-soft);
  --product-line: var(--cc-line);
  --product-line-strong: var(--cc-line-strong);
  --product-accent: var(--cc-accent);
  --product-accent-soft: var(--cc-accent-soft);
  --product-red: var(--cc-danger);
  --product-amber: var(--cc-warning);
  --product-green: #2e7d61;
  --product-blue: var(--cc-blue);
  --product-violet: #5c7195;
  background: var(--cc-canvas);
  color: var(--cc-ink);
  font-family: "Microsoft YaHei UI", "Noto Sans SC", "PingFang SC", sans-serif;
}

html[data-theme="day"] body.owner-shell-v1 .shell,
html[data-theme="day"] body.owner-shell-v1 .main {
  background: var(--cc-canvas);
}

html[data-theme="day"] body.owner-shell-v1 .workspace {
  background-color: #e4ebee;
  background-image:
    linear-gradient(rgb(47 90 108 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(47 90 108 / 4%) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 39px, rgb(47 90 108 / 1.5%) 40px, transparent 41px 80px);
  background-size: 48px 48px, 48px 48px, 160px 160px;
}

html[data-theme="day"] body.owner-shell-v1 .sidebar {
  border-right-color: #2c4853;
  background: #172a35;
  box-shadow: inset -1px 0 0 rgb(173 223 225 / 8%);
  color: #dbe8eb;
}

html[data-theme="day"] body.owner-shell-v1 .brand {
  border-bottom-color: #2d4a55;
}

html[data-theme="day"] body.owner-shell-v1 .mark {
  border-color: #577784;
  background: #203e49;
  box-shadow: inset 0 1px 0 rgb(208 242 242 / 12%);
  color: #b9e6e4;
}

html[data-theme="day"] body.owner-shell-v1 .brand h1 {
  color: #f1f7f8;
}

html[data-theme="day"] body.owner-shell-v1 .brand small,
html[data-theme="day"] body.owner-shell-v1 .cc-shell-nav__group-label {
  color: #8fa5ad;
}

html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
  color: #c2d1d5;
}

html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item:hover {
  background: #213a46;
  color: #f2f8f8;
}

html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item[aria-current="page"],
html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item.active {
  background: #2a4653;
  box-shadow: inset 3px 0 0 #77c4c5;
  color: #effafa;
}

html[data-theme="day"] body.owner-shell-v1 .pin-button,
html[data-theme="day"] body.owner-shell-v1 .nav.pinned a {
  border-color: #34535d;
  background: #1b323d;
  color: #b9ccd0;
}

html[data-theme="day"] body.owner-shell-v1 .nav.pinned {
  border-top-color: #2d4a55;
}

html[data-theme="day"] body.owner-shell-v1 .topbar {
  border-bottom-color: #c3d2d7;
  background: rgb(242 247 248 / 94%);
  box-shadow: 0 9px 24px rgb(28 54 66 / 8%);
  backdrop-filter: blur(14px);
}

html[data-theme="day"] body.owner-shell-v1 .module-tabs-shell,
html[data-theme="day"] body.owner-shell-v1 .command,
html[data-theme="day"] body.owner-shell-v1 .segmented-control {
  border-color: #b7c9cf;
  background: #e4edef;
}

html[data-theme="day"] body.owner-shell-v1 .command {
  box-shadow: inset 3px 0 0 rgb(27 113 128 / 42%);
}

html[data-theme="day"] body.owner-shell-v1 .panel,
html[data-theme="day"] body.owner-shell-v1 .ai-panel {
  border-color: #c2d1d6;
  background: #f1f6f7;
  box-shadow: 0 12px 26px rgb(26 49 60 / 8%), inset 0 1px 0 rgb(255 255 255 / 88%);
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck {
  position: relative;
  overflow: hidden;
  border-color: #b4c8ce;
  background: #f1f6f7;
  box-shadow: 0 15px 30px rgb(26 49 60 / 9%), inset 0 1px 0 rgb(255 255 255 / 92%);
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck::before {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  background:
    linear-gradient(90deg, #1b7180 0 14%, transparent 14% 100%),
    linear-gradient(90deg, rgb(57 105 120 / 4%) 1px, transparent 1px);
  background-position: left top, right top;
  background-repeat: no-repeat, repeat;
  background-size: 100% 3px, 52px 52px;
  content: "";
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck > * {
  position: relative;
  z-index: 1;
}

html[data-theme="day"] body.owner-shell-v1 .overview-focus-panel,
html[data-theme="day"] body.owner-shell-v1 .overview-change-panel,
html[data-theme="day"] body.owner-shell-v1 .overview-context-strip .overview-signal-card {
  background: transparent;
}

html[data-theme="day"] body.owner-shell-v1 .overview-change-panel {
  border-left-color: #ccd9dc;
}

html[data-theme="day"] body.owner-shell-v1 .command-panel[data-command-state="idle"] {
  display: none;
}

html[data-theme="day"] body.owner-shell-v1 .tab {
  color: #657981;
}

html[data-theme="day"] body.owner-shell-v1 .tab:hover {
  background: #ddebed;
  color: #15515d;
}

html[data-theme="day"] body.owner-shell-v1 .tab.active {
  border-color: #1b7180;
  background: #d9ebed;
  color: #15515d;
}

html[data-theme="day"] body.owner-shell-v1 .kpis,
html[data-theme="day"] body.owner-shell-v1 .overview-signal-card,
html[data-theme="day"] body.owner-shell-v1 .finance-overview-signal,
html[data-theme="day"] body.owner-shell-v1 .answer-card,
html[data-theme="day"] body.owner-shell-v1 .system-strip,
html[data-theme="day"] body.owner-shell-v1 .library-signal-strip {
  border-color: #c6d5d9;
  background: #e7eef0;
}

html[data-theme="day"] body.owner-shell-v1 .row {
  border-bottom-color: #d8e2e5;
}

html[data-theme="day"] body.owner-shell-v1 .row:hover {
  background: #e7f1f2;
}

html[data-theme="day"] body.owner-shell-v1 .hud-button,
html[data-theme="day"] body.owner-shell-v1 .mini-action,
html[data-theme="day"] body.owner-shell-v1 .workbench-actions a,
html[data-theme="day"] body.owner-shell-v1 .segmented-option,
html[data-theme="day"] body.owner-shell-v1 .status-button,
html[data-theme="day"] body.owner-shell-v1 .ai-fab {
  border-color: #adc3c9;
  background: #f0f5f6;
  color: #29414a;
}

html[data-theme="day"] body.owner-shell-v1 .hud-button:hover,
html[data-theme="day"] body.owner-shell-v1 .mini-action:hover,
html[data-theme="day"] body.owner-shell-v1 .workbench-actions a:hover,
html[data-theme="day"] body.owner-shell-v1 .segmented-option:hover,
html[data-theme="day"] body.owner-shell-v1 .status-button:hover,
html[data-theme="day"] body.owner-shell-v1 .ai-fab:hover {
  border-color: #4c8e9a;
  background: #dceef0;
  color: #124e5a;
}

html[data-theme="day"] body.owner-shell-v1 .hud-button.primary,
html[data-theme="day"] body.owner-shell-v1 .mini-action.primary {
  border-color: #1b7180;
  background: #1b7180;
  color: #f7ffff;
}

html[data-theme="day"] body.owner-shell-v1 :where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: #b4c8ce;
  background: #f6fafb;
  color: var(--cc-ink);
}

html[data-theme="day"] [data-theme-mode-toggle] {
  border-color: #8ba6af;
  background: #e6f0f2;
  color: #174f5b;
}

html[data-theme="day"] [data-theme-mode-toggle]:hover {
  border-color: #367e8c;
  background: #d9ebed;
  color: #124e5a;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1 .workspace {
    background-size: 32px 32px, 32px 32px, 104px 104px;
  }

  html[data-theme="day"] body.owner-shell-v1 .sidebar {
    border-top-color: #2c4853;
    background: #172a35;
    box-shadow: 0 -8px 20px rgb(20 37 46 / 18%);
  }

  html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
    color: #aebfc5;
  }

  html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item[aria-current="page"],
  html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item.active {
    background: #2a4653;
    box-shadow: inset 0 2px 0 #77c4c5;
    color: #effafa;
  }
}

/* UI structural polish r1: day is an archival desk, not a recolored night rail. */
html[data-theme="day"] body.owner-shell-v1 .sidebar {
  border-right-color: #c5d5d6;
  background: #edf3f1;
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 82%), 10px 0 24px rgb(46 75 82 / 5%);
  color: #1e3941;
}

html[data-theme="day"] body.owner-shell-v1 .brand {
  border-bottom-color: #cbd9d9;
}

html[data-theme="day"] body.owner-shell-v1 .brand h1 {
  color: #17323a;
}

html[data-theme="day"] body.owner-shell-v1 .brand small,
html[data-theme="day"] body.owner-shell-v1 .cc-shell-nav__group-label {
  color: #708488;
}

html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
  color: #4e666c;
}

html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item:hover {
  background: #dfecea;
  color: #173f47;
}

html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item[aria-current="page"],
html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item.active {
  background: #d4e7e5;
  box-shadow: inset 3px 0 0 #a7793b;
  color: #16454c;
}

html[data-theme="day"] body.owner-shell-v1 .pin-button,
html[data-theme="day"] body.owner-shell-v1 .nav.pinned a {
  border-color: #c2d3d3;
  background: #f7faf9;
  color: #496166;
}

html[data-theme="day"] body.owner-shell-v1 .nav.pinned {
  border-top-color: #cbd9d9;
}

html[data-theme="day"] body.owner-shell-v1 .workspace {
  position: relative;
  isolation: isolate;
  background-color: #e7eff0;
  background-blend-mode: normal, multiply, normal;
}

html[data-theme="day"] body.owner-shell-v1 .module-tabs-shell {
  box-shadow: 0 5px 16px rgb(42 70 77 / 5%);
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck {
  border-radius: 4px;
  background: rgb(247 250 249 / 94%);
  box-shadow: 0 18px 38px rgb(34 65 72 / 10%), inset 0 1px 0 rgb(255 255 255 / 96%);
}

html[data-theme="day"] body.owner-shell-v1 .overview-home-head h3,
html[data-theme="day"] body.owner-shell-v1 .panel h3 {
  letter-spacing: 0;
  font-weight: 650;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1 .sidebar {
    border-top-color: #c5d5d6;
    background: rgb(237 243 241 / 97%);
    box-shadow: 0 -10px 24px rgb(34 65 72 / 11%);
  }

  html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item {
    color: #4e666c;
  }

  html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item[aria-current="page"],
  html[data-theme="day"] body.owner-shell-v1 #primaryNav .cc-shell-nav__item.active {
    background: #d4e7e5;
    box-shadow: inset 0 2px 0 #a7793b;
    color: #16454c;
  }
}

/* Day work mode keeps the same information architecture but becomes an archival desk. */
html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-overview,
html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-queue-panel {
  border-color: #bdced1;
  background:
    linear-gradient(135deg, rgb(40 117 124 / 5%), transparent 42%),
    rgb(248 251 250 / 88%);
  box-shadow: 0 18px 34px rgb(37 64 70 / 9%), inset 0 1px 0 rgb(255 255 255 / 94%);
}

html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure > summary {
  border-color: #b9cbce;
  background: #edf4f2;
}

html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-kpis {
  border-color: #c4d4d6;
  background: rgb(228 238 238 / 74%);
}

html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-row:hover,
html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-duplicate-group[open] > summary,
html[data-theme="day"] body.owner-shell-v1 [data-reminders-v2] .reminder-v2-duplicate-items {
  background: rgb(219 235 232 / 64%);
}

/* Formal r6 parity: the two modes own different composition rules, not only colors. */
html[data-theme="day"] body.owner-shell-v1 .workspace {
  background-color: #e7eff0;
  background-image:
    linear-gradient(180deg, rgb(231 241 240 / 18%) 0%, rgb(231 241 240 / 60%) 46%, rgb(231 241 240 / 92%) 100%),
    url("/static/command_center/assets/day-archive-r1.jpg"),
    linear-gradient(rgb(47 90 108 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(47 90 108 / 4%) 1px, transparent 1px),
    repeating-linear-gradient(135deg, transparent 0 39px, rgb(47 90 108 / 1.5%) 40px, transparent 41px 80px);
  background-position: center top, center top, left top, left top, left top;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
  background-size: cover, 100% 360px, 48px 48px, 48px 48px, 160px 160px;
  background-attachment: scroll, scroll, scroll, scroll, scroll;
}

html[data-theme="day"] body.owner-shell-v1 .module-tabs-shell,
html[data-theme="day"] body.owner-shell-v1 .panel,
html[data-theme="day"] body.owner-shell-v1 .ai-panel {
  background-color: rgb(247 250 249 / 86%);
  backdrop-filter: blur(8px) saturate(104%);
  -webkit-backdrop-filter: blur(8px) saturate(104%);
}

@media (min-width: 1024px) {
  /* Night changes navigation ownership and reserves a real control rail. */
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
    --cc-night-rail-width: 224px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .shell {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    padding-right: var(--cc-night-rail-width);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .sidebar {
    position: fixed;
    inset: 0 var(--cc-night-rail-width) auto 0;
    z-index: 30;
    display: flex;
    width: auto;
    height: 72px;
    min-height: 72px;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    border-right: 0;
    border-bottom: 1px solid rgb(128 199 192 / 18%);
    background:
      linear-gradient(90deg, rgb(8 20 26 / 96%), rgb(10 28 34 / 88%) 64%, rgb(7 17 22 / 94%)),
      repeating-linear-gradient(90deg, transparent 0 72px, rgb(128 199 192 / 4%) 72px 73px);
    box-shadow: 0 10px 26px rgb(0 7 10 / 24%);
    overflow: hidden;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand {
    min-height: 72px;
    flex: 0 0 auto;
    padding: 0;
    border-bottom: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav::-webkit-scrollbar {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__links {
    display: flex;
    min-width: max-content;
    align-items: center;
    gap: 3px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__group {
    display: contents;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__group-label {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item {
    width: auto;
    min-width: max-content;
    height: 38px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #89a9aa;
    font-size: 11px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:hover,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:focus-visible {
    border-color: rgb(128 199 192 / 24%);
    background: rgb(38 77 82 / 46%);
    color: #dcebe6;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item[aria-current="page"],
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item.active {
    border-color: rgb(128 199 192 / 34%);
    background: rgb(41 86 91 / 70%);
    box-shadow: inset 0 -2px 0 #d5ae68;
    color: #f0f8f3;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .pin-button,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .nav.pinned {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-top: 72px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
    position: sticky;
    top: 72px;
    min-height: 68px;
    grid-template-columns: minmax(200px, 280px) minmax(320px, 1fr);
    padding: 9px 24px;
    border-bottom-color: rgb(128 199 192 / 18%);
    background: rgb(8 17 22 / 84%);
    box-shadow: 0 8px 24px rgb(0 6 9 / 18%);
    /* Keep the fixed signal rail viewport-bound; backdrop-filter would create a local containing block. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 35;
    display: flex;
    width: var(--cc-night-rail-width);
    min-width: var(--cc-night-rail-width);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    padding: 22px 18px 20px;
    border-left: 1px solid rgb(128 199 192 / 18%);
    background: rgb(7 18 23 / 86%);
    box-shadow: -12px 0 28px rgb(0 6 9 / 18%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    white-space: normal;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status > .dot {
    position: absolute;
    top: 31px;
    right: 19px;
    margin: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #clock {
    order: 0;
    margin-top: 16px;
    color: #e4eee8;
    font: 600 34px/1.05 Georgia, "Times New Roman", serif;
    letter-spacing: 0.02em;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #workspaceStatus {
    order: 1;
    max-width: none;
    padding-bottom: 13px;
    border-bottom: 1px solid rgb(128 199 192 / 17%);
    color: #789a98;
    font: 10px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
    letter-spacing: 0.08em;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-theme-mode-toggle],
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .owner-global-search-trigger,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-fab,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-theme-mode-toggle] {
    order: 2;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .global-search-mount {
    order: 3;
    display: flex;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-fab {
    order: 4;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    order: 5;
    margin-top: auto;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace {
    min-width: 0;
    gap: 14px;
    padding: 24px 26px 30px;
    background-color: #0b161d;
    background-image:
      linear-gradient(180deg, rgb(5 13 18 / 24%) 0%, rgb(5 13 18 / 50%) 52%, rgb(5 13 18 / 76%) 100%),
      url("/static/command_center/assets/night-cosmos-r1.jpg"),
      linear-gradient(rgb(125 171 183 / 3%) 1px, transparent 1px),
      linear-gradient(90deg, rgb(125 171 183 / 3%) 1px, transparent 1px),
      repeating-linear-gradient(135deg, transparent 0 31px, rgb(125 171 183 / 1.5%) 32px, transparent 33px 64px);
    background-position: center top, center top, left top, left top, left top;
    background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
    background-size: cover, cover, 48px 48px, 48px 48px, 128px 128px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
    border-color: rgb(128 199 192 / 22%);
    background: rgb(13 31 38 / 74%);
    box-shadow: 0 10px 28px rgb(0 6 9 / 18%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

@media (min-width: 1024px) {
  html[data-theme="night"] body.owner-shell-v1.ai-open .shell {
    padding-right: 380px;
  }
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1 .workspace {
    background-size: cover, auto 300px, 32px 32px, 32px 32px, 104px 104px;
  }

  html[data-theme="night"] body.owner-shell-v1 .workspace {
    background-size: cover, auto 610px, 32px 32px, 32px 32px, 96px 96px;
  }
}


/* source: styles/ai-workbench-v1.css */
.cc-ai-surface,
.cc-ai-surface * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.module-tabs-shell.is-ai-workbench-hidden {
  display: none !important;
}

.cc-ai-surface {
  min-width: 0;
  max-width: 100%;
  color: var(--cc-ink, #17211d);
  overflow-x: clip;
}

.ai-settings-stage.panel,
body.owner-shell-v1 .ai-settings-stage.panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-workbench-entry {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface-muted, #f8faf9);
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ai-workbench,
.ai-settings {
  width: 100%;
  background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 6px;
}

.ai-workbench__header,
.ai-settings__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__header h2,
.ai-settings__header h2,
.ai-workbench__pane-head h3,
.ai-settings__section-head h3,
.ai-settings__audit-group h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.ai-workbench__eyebrow,
.ai-settings__header > div > span {
  display: block;
  margin-bottom: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
}

.ai-settings__header p {
  max-width: 560px;
  margin: 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 13px;
  line-height: 1.55;
}

.ai-workbench__status-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-height: 28px;
}

.ai-workbench__status-rail > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 7px;
  color: var(--cc-ink-soft, #52605a);
  background: var(--cc-surface-muted, #f8faf9);
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}

.ai-workbench__status-rail svg,
.ai-settings__segments svg,
.ai-settings__section-head svg,
.ai-command-button svg,
.ai-secondary-button svg,
.ai-icon-button svg,
.ai-workbench__source-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.ai-workbench__status-rail .ai-workbench__draft-only {
  color: var(--cc-accent-strong, #0f573f);
  background: var(--cc-accent-soft, #e5f1ec);
  border-color: var(--cc-accent, #176b50);
}

.ai-workbench__view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 18px;
  background: var(--cc-surface-muted, #f8faf9);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__view-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 40px;
  padding: 7px 12px;
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ai-workbench__view-tabs button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.ai-workbench__view-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--cc-accent, #176b50);
  border-color: var(--cc-accent, #176b50);
  box-shadow: 0 4px 10px rgb(23 107 80 / 15%);
}

.ai-workbench[data-ai-active-view="qa"] [data-ai-workbench-section="write"]:not([data-ai-context-panel]),
.ai-workbench[data-ai-active-view="qa"] [data-ai-workbench-pane="write"]:not([data-ai-context-panel]),
.ai-workbench[data-ai-active-view="write"] [data-ai-workbench-section="qa"],
.ai-workbench[data-ai-active-view="write"] [data-ai-workbench-pane="qa"] {
  display: none !important;
}

.ai-workbench[data-ai-active-view="qa"] .module-canvas-widget:has([data-ai-workbench-pane="write"]),
.ai-workbench[data-ai-active-view="write"] .module-canvas-widget:has([data-ai-workbench-pane="qa"]) {
  display: none !important;
}

.ai-workbench__query {
  padding: 12px 18px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__archive-form {
  padding-block: 16px 18px;
}

.ai-workbench__archive-form textarea {
  min-height: 210px;
  max-height: 420px;
  line-height: 1.6;
}

.ai-workbench__query > label,
.ai-settings label > span:first-child,
.ai-workbench__unlock label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  font-weight: 700;
}

.ai-workbench__query > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.ai-workbench__archive-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}

.ai-workbench__archive-actions > button {
  flex: 1 1 180px;
}

.ai-workbench__input-hint {
  display: block;
  margin-top: 7px;
  color: var(--cc-muted, #6d665d);
  font-size: 12px;
  line-height: 1.5;
}

.ai-workbench textarea,
.ai-settings input,
.ai-settings select,
.ai-workbench__unlock input {
  width: 100%;
  min-width: 0;
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 3px;
  font: inherit;
}

.ai-workbench textarea {
  min-height: 58px;
  max-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 9px 10px;
  line-height: 1.45;
  resize: vertical;
}

.ai-settings input,
.ai-settings select,
.ai-workbench__unlock input {
  min-height: 36px;
  padding: 7px 9px;
}

.ai-workbench textarea:focus,
.ai-settings input:focus,
.ai-settings select:focus,
.ai-workbench__unlock input:focus {
  outline: 2px solid var(--cc-accent, #176b50);
  outline-offset: 1px;
}

.ai-command-button,
.ai-secondary-button,
.ai-text-button,
.ai-icon-button,
.ai-settings__segments button,
.ai-workbench__mobile-segments button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ai-command-button {
  color: #fff;
  background: var(--cc-accent, #176b50);
  border: 1px solid var(--cc-accent, #176b50);
}

.ai-secondary-button,
.ai-icon-button,
.ai-settings__segments button,
.ai-workbench__mobile-segments button {
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line-strong, #bac6c0);
}

.ai-text-button {
  color: var(--cc-accent-strong, #0f573f);
  background: transparent;
  border: 0;
}

.ai-command-button:disabled,
.ai-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ai-icon-button {
  min-width: 36px;
  padding-inline: 8px;
}

.ai-workbench__columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  min-width: 0;
  min-height: 410px;
}

.ai-workbench__columns:not(.has-context) {
  display: block;
  min-height: 360px;
}

/* The shared canvas grid adds a second track globally. AI owns its own
 * Codex-style responsive boundary: one full-width conversation until a
 * source, finance result, or proposal is explicitly opened. */
.ai-workbench__columns.module-canvas-grid:not(.has-context) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
}

.ai-workbench__columns.module-canvas-grid.has-context {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr) !important;
}

/* The shared canvas gives widgets 12-column geometry. In the normal Codex
 * state AI must opt out of those implicit tracks until a context pane opens. */
.ai-workbench__columns.ai-codex-full-bleed {
  display: block !important;
  grid-template-columns: none !important;
}

.ai-workbench__columns.ai-codex-full-bleed > .module-canvas-widget {
  display: block !important;
  grid-area: auto !important;
  min-width: 0;
}

/* The shared canvas wraps each AI pane in a generic `overflow:auto` panel.
 * Keep those wrappers from becoming a second vertical scroll host: the
 * conversation result and the active right-rail panel own scrolling below. */
.ai-workbench__columns.module-canvas-grid > .module-canvas-widget > [data-ai-pane] {
  overflow: hidden !important;
}

.ai-workbench__columns:not(.has-context) .ai-workbench__pane--answer {
  min-height: 360px;
}

.ai-workbench__context-pane[hidden] {
  display: none !important;
}

.ai-workbench__context-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  padding: 6px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  scrollbar-width: thin;
}

.ai-workbench__context-tab-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  max-width: 240px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.ai-workbench__context-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 220px;
  min-height: 32px;
  padding: 6px 10px;
  overflow: hidden;
  color: var(--cc-ink-soft, #52605a);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ai-workbench__context-tab span {
  opacity: .72;
  font-size: 11px;
}

.ai-workbench__context-tab.is-active {
  color: var(--cc-accent-strong, #0f573f);
  background: var(--cc-accent-soft, #e5f1ec);
  border-color: var(--cc-accent, #176b50);
}

.ai-workbench__context-tab-close {
  display: inline-grid;
  place-items: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  margin-left: -7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--cc-ink-soft, #52605a);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.ai-workbench__context-tab-close:hover,
.ai-workbench__context-tab-close:focus-visible {
  background: color-mix(in srgb, var(--cc-accent, #176b50) 16%, transparent);
  color: var(--cc-accent-strong, #0f573f);
}

.ai-workbench__document-preview {
  display: block;
  width: 100%;
  min-height: 520px;
  border: 0;
  background: #fff;
}

.ai-workbench__columns:not(.has-context) .ai-workbench__context-pane {
  display: none;
}

.ai-workbench__composer {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding-block: 12px 14px;
  background: color-mix(in srgb, var(--cc-surface, #fff) 94%, transparent);
  box-shadow: 0 -8px 20px rgb(23 33 29 / 7%);
  backdrop-filter: blur(10px);
}

.ai-workbench__composer > div {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "query attachment submit";
  align-items: center;
}

.ai-workbench__composer > div > textarea {
  grid-area: query;
}

.ai-workbench__composer-editor {
  grid-area: query;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 88px;
  padding: 8px 10px 6px;
  border: 1px solid var(--cc-line-strong, #8fa59b);
  border-radius: 8px;
  background: var(--cc-surface, #fff);
  box-shadow: inset 0 1px 2px rgb(23 33 29 / 5%);
}

.ai-workbench__composer-editor:focus-within {
  border-color: var(--cc-accent, #176b50);
  outline: 2px solid color-mix(in srgb, var(--cc-accent, #176b50) 22%, transparent);
  outline-offset: 1px;
}

.ai-workbench__composer-editor > textarea {
  width: 100%;
  min-height: 48px;
  padding: 6px 0 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
}

.ai-workbench__composer-editor > textarea:focus {
  outline: 0;
}

.ai-workbench__attachment-dropzone {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 4px;
  border: 1px dashed var(--cc-line-strong, #8fa59b);
  border-radius: 6px;
  background: var(--cc-surface-muted, #f8faf9);
  color: var(--cc-ink-soft, #52605a);
  transition: border-color .16s ease, background-color .16s ease;
}

.ai-workbench__attachment-dropzone:focus-within,
.ai-workbench__attachment-dropzone:focus-visible,
.ai-workbench__attachment-dropzone.is-dragover {
  border-color: var(--cc-accent, #176b50);
  background: var(--cc-accent-soft, #e5f1ec);
  outline: 2px solid color-mix(in srgb, var(--cc-accent, #176b50) 24%, transparent);
  outline-offset: 1px;
}

.ai-workbench__attachment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #176b50;
  border-radius: 5px;
  background: #176b50;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ai-workbench__attachment-button:hover,
.ai-workbench__attachment-button:focus-visible {
  background: #0f573f;
  border-color: #0f573f;
}

.ai-workbench__attachment-button svg {
  width: 16px;
  height: 16px;
}

.ai-workbench__attachment-hint {
  min-width: 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  white-space: nowrap;
}

.ai-workbench__composer > div > .ai-command-button {
  grid-area: submit;
  min-width: 88px;
}

.ai-workbench__attachment-dropzone {
  grid-area: attachment;
}

.ai-workbench__pending-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  order: -1;
  margin: 0 0 4px;
}

.ai-workbench__pending-attachment {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--cc-accent, #176b50);
  border-radius: 4px;
  background: var(--cc-accent-soft, #e5f1ec);
  color: var(--cc-accent-strong, #0f573f);
  font-size: 12px;
  font-weight: 650;
}

.ai-workbench__pending-attachment-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cc-surface, #fff);
  border-radius: 50%;
  background: #17211d;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgb(23 33 29 / 25%);
}

.ai-workbench__pending-attachment-remove:hover,
.ai-workbench__pending-attachment-remove:focus-visible {
  background: #a33131;
}

.ai-workbench__pending-attachment-preview {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgb(23 107 80 / 28%);
  background: #fff;
}

.ai-workbench__pending-attachment-name {
  max-width: min(280px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbench__pending-attachment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbench__message-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ai-workbench__source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  max-width: 100%;
  padding: 5px 9px;
  color: var(--cc-accent-strong, #0f573f);
  background: var(--cc-accent-soft, #e5f1ec);
  border: 1px solid var(--cc-accent, #176b50);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ai-workbench__source-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbench__source-preview {
  padding: 16px;
}

.ai-workbench__source-preview h4 {
  margin: 7px 0;
  font-size: 16px;
}

.ai-workbench__source-preview p {
  margin: 0 0 14px;
  color: var(--cc-ink-soft, #52605a);
  line-height: 1.6;
}

.ai-workbench__pane {
  min-width: 0;
  padding: 14px;
  border-left: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__pane:first-child {
  border-left: 0;
}

.ai-workbench__pane--write {
  grid-column: 1 / -1;
}

.ai-workbench__pane-head,
.ai-settings__section-head,
.ai-workbench__source-heading,
.ai-workbench__proposal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-workbench__pane-head {
  min-height: 28px;
  margin-bottom: 10px;
}

.ai-workbench__pane-head h3,
.ai-settings__section-head h3 {
  font-size: 14px;
}

.ai-workbench__pane-head > span,
.ai-settings__section-head > span,
.ai-workbench__proposal-meta > span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
}

.ai-workbench__result,
.ai-workbench__source-list,
.ai-workbench__proposal-list {
  min-width: 0;
  min-height: 320px;
}

/* Keep long conversations inside the workbench instead of pushing the
 * whole page below the fixed composer. The scrollbar is intentionally on the
 * primary answer surface so it remains discoverable on desktop and mobile. */
.ai-workbench__pane--answer .ai-workbench__result {
  height: clamp(320px, 58vh, 620px);
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 6px;
}

.ai-workbench__pane--write .ai-workbench__proposal-list {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 14px;
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable;
}

.ai-workbench__answer-copy {
  color: var(--cc-ink, #17211d);
  font-size: 14px;
  line-height: 1.72;
}

.ai-workbench__answer-copy p {
  margin: 0 0 12px;
}

.ai-workbench__state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 280px;
  padding: 20px;
  color: var(--cc-ink-soft, #52605a);
  text-align: center;
}

.ai-workbench__state svg {
  width: 24px;
  height: 24px;
  margin-bottom: 9px;
}

.ai-workbench__state strong {
  color: var(--cc-ink, #17211d);
}

.ai-workbench__state span {
  margin-top: 4px;
  font-size: 12px;
}

.ai-workbench__state--error {
  color: var(--cc-danger, #ae3e4b);
  background: var(--cc-danger-soft, #f9e9eb);
  border-radius: 3px;
}

.ai-workbench__source,
.ai-workbench__proposal {
  padding: 10px 0;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__proposal-group {
  flex: 0 0 clamp(320px, 38vw, 480px);
  min-width: 300px;
  margin: 0 0 12px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 4px;
  overflow: hidden;
  scroll-snap-align: start;
}

.ai-workbench__pane--write .ai-workbench__proposal-group {
  margin: 0;
}

.ai-workbench__proposal-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface-muted, #f8faf9);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__proposal-group h4 {
  margin: 0;
  font-size: 12px;
}

.ai-workbench__proposal-group > header > span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

.ai-workbench__proposal-group-list {
  padding: 0 10px;
}

.ai-workbench__source:first-child,
.ai-workbench__proposal:first-child {
  padding-top: 0;
}

.ai-workbench__source-heading {
  justify-content: flex-start;
}

.ai-workbench__source-heading > span:last-child,
.ai-workbench__proposal-select > span {
  min-width: 0;
}

.ai-workbench__source-heading strong,
.ai-workbench__source-heading small,
.ai-workbench__proposal-select strong,
.ai-workbench__proposal-select small {
  display: block;
  overflow-wrap: anywhere;
}

.ai-workbench__source-heading small,
.ai-workbench__proposal-select small {
  margin-top: 2px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.4;
}

.ai-workbench__citation {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: var(--cc-accent-strong, #0f573f);
  background: var(--cc-accent-soft, #e5f1ec);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

.ai-workbench__source p {
  margin: 7px 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ai-workbench__source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cc-accent-strong, #0f573f);
  font-size: 12px;
  text-decoration: none;
}

.ai-workbench__source-link--disabled {
  color: var(--cc-ink-soft, #52605a);
}

.ai-workbench__proposal-select {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.ai-workbench__proposal-select input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 2px;
  accent-color: var(--cc-accent, #176b50);
}

.ai-workbench__proposal-meta {
  margin-top: 7px;
}

.ai-workbench__proposal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: var(--cc-surface-muted, #f8faf9);
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 3px;
}

.ai-workbench__proposal-fields label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.ai-workbench__proposal-fields label:has(textarea) {
  grid-column: 1 / -1;
}

.ai-workbench__proposal-fields label > span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  font-weight: 700;
}

.ai-workbench__proposal-fields input {
  width: 100%;
  min-width: 0;
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
}

.ai-workbench__proposal-fields input { min-height: 32px; padding: 6px 8px; }
.ai-workbench__proposal-fields textarea {
  width: 100%;
  min-width: 0;
  color: var(--cc-ink, #17211d);
  background: var(--cc-surface, #fff);
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-radius: 3px;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  min-height: 68px;
  padding: 7px 8px;
  resize: vertical;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 640px) {
  .ai-workbench__proposal-fields { grid-template-columns: minmax(0, 1fr); }
  .ai-workbench__proposal-fields label:has(textarea) { grid-column: auto; }
}

.ai-workbench__proposal-actions {
  padding-top: 12px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
}

[data-ai-proposals-form] {
  margin: 0;
}

.ai-workbench__empty {
  min-height: 72px;
  padding: 18px 8px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  text-align: center;
}

.ai-workbench__archive-coverage {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-left: 3px solid var(--cc-accent, #176b50);
  border-radius: 5px;
  background: var(--cc-surface-muted, #f8faf9);
}

.ai-workbench__archive-coverage.is-incomplete {
  border-left-color: #b36b19;
  background: #fff8ed;
}

.ai-workbench__archive-coverage-head,
.ai-workbench__archive-coverage-stats {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ai-workbench__archive-coverage-head span,
.ai-workbench__archive-coverage-stats,
.ai-workbench__archive-coverage summary {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

.ai-workbench__archive-coverage-stats {
  justify-content: flex-start;
  gap: 14px;
  margin-top: 6px;
}

.ai-workbench__archive-coverage details {
  margin-top: 8px;
}

.ai-workbench__archive-coverage ul {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding-left: 18px;
}

.ai-workbench__archive-coverage li {
  display: grid;
  gap: 2px;
  font-size: 11px;
}

.ai-workbench__archive-coverage li span {
  color: #9a5b18;
}

.ai-workbench__archive-coverage li b {
  font-weight: 500;
  overflow-wrap: anywhere;
}

html[data-theme="night"] .ai-workbench__archive-coverage.is-incomplete {
  border-left-color: #e8a44f;
  background: #33291c;
}

.ai-workbench__unlock {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px 18px;
  background: var(--cc-warning-soft, #fbf1d9);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-workbench__unlock > div:first-child strong,
.ai-workbench__unlock > div:first-child span {
  display: block;
}

.ai-workbench__unlock--active {
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--cc-accent-soft, #e5f1ec);
}

.ai-workbench__unlock > div:first-child span {
  margin-top: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
}

.ai-workbench__inline-actions,
.ai-settings__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-workbench__feedback,
.ai-settings__feedback,
.ai-settings__test-result {
  min-height: 34px;
  padding: 8px 14px;
  color: var(--cc-ink-soft, #52605a);
  border-top: 1px solid var(--cc-line, #d9e0dc);
  font-size: 12px;
}

.ai-workbench__mobile-segments {
  display: none;
}

.ai-settings__segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 18px;
  background: var(--cc-surface-muted, #f8faf9);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-settings__segments button[aria-pressed="true"] {
  color: #fff;
  background: var(--cc-accent, #176b50);
  border-color: var(--cc-accent, #176b50);
}

.ai-settings__panel {
  min-width: 0;
  min-height: 410px;
  padding: 16px 18px;
}

.ai-settings__panel[hidden] {
  display: none;
}

.ai-settings__section-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.ai-settings__section-head p {
  margin: 3px 0 0;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
}

.ai-settings__form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-settings__field--wide {
  grid-column: 1 / -1;
}

.ai-settings__toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  background: var(--cc-surface-muted, #f8faf9);
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 3px;
}

.ai-settings__toggle input {
  width: 36px;
  min-height: 20px;
  height: 20px;
  flex: 0 0 36px;
  margin: 1px 0 0;
  accent-color: var(--cc-accent, #176b50);
}

.ai-settings__toggle span,
.ai-settings__toggle strong,
.ai-settings__toggle small {
  display: block;
}

.ai-settings__toggle small {
  margin-top: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  line-height: 1.45;
}

.ai-settings__key-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
  padding: 11px;
  background: var(--cc-accent-soft, #e5f1ec);
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 3px;
}

.ai-settings__key-summary > span strong,
.ai-settings__key-summary > span small {
  display: block;
}

.ai-settings__key-summary small {
  margin-top: 3px;
  color: var(--cc-ink-soft, #52605a);
}

.ai-settings__key-summary dl {
  display: flex;
  gap: 16px;
  margin: 0;
}

.ai-settings__key-summary dl div {
  min-width: 120px;
}

.ai-settings__key-summary dt,
.ai-settings__key-summary dd {
  margin: 0;
  font-size: 11px;
}

.ai-settings__key-summary dt {
  color: var(--cc-ink-soft, #52605a);
}

.ai-settings__key-summary dd {
  margin-top: 3px;
  font-family: var(--cc-font-mono, monospace);
  overflow-wrap: anywhere;
}

.ai-settings__actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.ai-settings__mode-field {
  display: block;
  max-width: 480px;
  margin-top: 14px;
}

.ai-settings__permission-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--cc-line, #d9e0dc);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-settings__permission-notes > div {
  display: flex;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border-left: 1px solid var(--cc-line, #d9e0dc);
}

.ai-settings__permission-notes > div:first-child {
  border-left: 0;
}

.ai-settings__permission-notes svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: var(--cc-accent, #176b50);
}

.ai-settings__permission-notes strong,
.ai-settings__permission-notes small {
  display: block;
}

.ai-settings__permission-notes small {
  margin-top: 3px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  line-height: 1.45;
}

.ai-settings__audit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 3px;
}

.ai-settings__audit-group {
  min-width: 0;
  border-left: 1px solid var(--cc-line, #d9e0dc);
}

.ai-settings__audit-group:first-child {
  border-left: 0;
}

.ai-settings__audit-group > header {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  background: var(--cc-surface-muted, #f8faf9);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
}

.ai-settings__audit-group > header svg {
  width: 16px;
  height: 16px;
  color: var(--cc-accent, #176b50);
}

.ai-settings__audit-group h4 {
  font-size: 13px;
}

.ai-settings__audit-group > header span {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

.ai-settings__audit-list {
  min-height: 280px;
}

.ai-settings__audit-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  font-size: 12px;
}

.ai-settings__audit-row strong,
.ai-settings__audit-row small {
  display: block;
  overflow-wrap: anywhere;
}

.ai-settings__audit-row small {
  margin-top: 2px;
  color: var(--cc-ink-soft, #52605a);
}

.ai-settings__audit-row > span:last-child {
  color: var(--cc-accent-strong, #0f573f);
  white-space: nowrap;
}

.ai-settings__empty {
  padding: 20px 10px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  text-align: center;
}

html[data-theme="night"] .ai-workbench,
html[data-theme="night"] .ai-settings {
  color: var(--cc-ink, #e8eeeb);
  background: var(--cc-surface, #17211d);
}

html[data-theme="night"] .ai-workbench textarea,
html[data-theme="night"] .ai-settings input,
html[data-theme="night"] .ai-settings select,
html[data-theme="night"] .ai-workbench__unlock input {
  color: var(--cc-ink, #e8eeeb);
  background: var(--cc-surface-muted, #202b27);
}

@media (max-width: 1080px) {
  .ai-workbench__columns {
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  }

  .ai-workbench__status-rail {
    justify-content: flex-start;
  }

  .ai-workbench__header {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1 .ai-panel {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .ai-workbench-entry {
    min-height: 44px;
  }

  .ai-workbench,
  .ai-settings {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .ai-workbench {
    padding-bottom: calc(var(--cc-mobile-nav-height, 104px) + 190px);
  }

  .ai-workbench__composer {
    position: fixed;
    inset-inline: 9px;
    bottom: var(--cc-mobile-nav-height, 104px);
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
    border: 1px solid var(--cc-line, #d9e0dc);
    border-radius: 8px;
  }

  .ai-workbench__header,
  .ai-settings__header {
    display: block;
    padding: 12px;
  }

  .ai-workbench__view-tabs {
    padding: 8px 12px;
  }

  .ai-settings__header p {
    margin-top: 7px;
  }

  .ai-workbench__status-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .ai-workbench__status-rail > span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ai-workbench__query {
    padding: 10px 12px;
  }

  .ai-workbench__archive-form {
    padding-block: 12px 14px;
  }

  .ai-workbench__archive-form textarea {
    min-height: 180px;
  }

  .ai-workbench__query > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-workbench__query .ai-command-button {
    min-height: 44px;
  }

  .ai-workbench__unlock {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .ai-workbench__unlock--active {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-workbench__inline-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-workbench__mobile-segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    position: sticky;
    top: var(--cc-viewbar-height, 46px);
    z-index: 4;
    padding: 8px 12px;
    background: var(--cc-surface, #fff);
    border-bottom: 1px solid var(--cc-line, #d9e0dc);
  }

  .ai-workbench__mobile-segments button {
    min-width: 0;
    min-height: 42px;
    padding-inline: 5px;
    font-size: 12px;
  }

  .ai-workbench__mobile-segments button[aria-pressed="true"] {
    color: #fff;
    background: var(--cc-accent, #176b50);
    border-color: var(--cc-accent, #176b50);
  }

  .ai-workbench[data-ai-active-view="qa"] .ai-workbench__mobile-segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-workbench[data-ai-active-view="write"] .ai-workbench__mobile-segments {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-workbench[data-ai-active-view="qa"] [data-ai-mobile-segment="proposals"],
  .ai-workbench[data-ai-active-view="write"] [data-ai-mobile-segment="answer"],
  .ai-workbench[data-ai-active-view="write"] [data-ai-mobile-segment="sources"] {
    display: none;
  }

  .ai-workbench__columns {
    display: block;
    min-height: 420px;
  }

  .ai-workbench__pane {
    display: none;
    min-height: 420px;
    padding: 12px;
    border-left: 0;
  }

  .ai-workbench[data-ai-mobile-active="answer"] [data-ai-pane="answer"],
  .ai-workbench[data-ai-mobile-active="sources"] [data-ai-pane="sources"],
  .ai-workbench[data-ai-mobile-active="proposals"] [data-ai-pane="proposals"] {
    display: block;
  }

  .ai-workbench__result,
  .ai-workbench__source-list,
  .ai-workbench__proposal-list {
    min-height: 300px;
  }

  .ai-workbench__pane--answer .ai-workbench__result {
    height: min(52vh, 460px);
    max-height: 460px;
    padding-bottom: calc(var(--cc-mobile-nav-height, 104px) + 24px);
  }

  .ai-workbench__pane--write .ai-workbench__proposal-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: visible;
    padding: 0;
  }

  .ai-workbench__proposal-group,
  .ai-workbench__pane--write .ai-workbench__proposal-group {
    width: 100%;
    min-width: 0;
    flex: none;
    margin: 0 0 12px;
  }

  .ai-workbench__pane--write {
    grid-column: auto;
  }

  .ai-settings__segments {
    padding: 8px 12px;
  }

  .ai-settings__segments button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 5px;
  }

  .ai-settings__panel {
    min-height: 460px;
    padding: 14px 12px calc(var(--cc-mobile-nav-height, 104px) + 24px);
  }

  .ai-settings__form-grid,
  .ai-settings__permission-notes,
  .ai-settings__audit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-settings__permission-notes > div,
  .ai-settings__audit-group {
    border-left: 0;
    border-top: 1px solid var(--cc-line, #d9e0dc);
  }

  .ai-settings__permission-notes > div:first-child,
  .ai-settings__audit-group:first-child {
    border-top: 0;
  }

  .ai-settings__key-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-settings__key-summary dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-settings__key-summary dl div {
    min-width: 0;
  }

  .ai-settings__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-settings__actions button {
    min-height: 44px;
  }

  .ai-settings__audit-list {
    min-height: 100px;
  }
}

/* Keep the conversation visible while reviewing write cards; the tabs now select
   the input mode, not whether the conversation disappears. */
.ai-workbench[data-ai-active-view="write"] [data-ai-workbench-pane="qa"] {
  display: block !important;
}

.ai-workbench[data-ai-active-view="write"] [data-ai-workbench-pane="write"]:not([data-ai-context-panel]) {
  display: block !important;
}

/* Reviewing a draft must not remove the Codex composer. Keep the same input
 * available at the bottom so the user can correct or continue the conversation
 * without switching away from the confirmation panel. */
.ai-workbench[data-ai-active-view="write"] .ai-workbench__query--qa {
  display: grid !important;
}

/* Pending model proposals remain reviewable beside the answer in the default
 * conversation view; the response action still provides the mobile focus path. */
.ai-workbench[data-ai-active-view="qa"] .ai-workbench__context-pane:not([hidden]) {
  display: block;
}

@media (max-width: 760px) {
  /* Keep pending drafts reachable from the default answer segment on mobile. */
  .ai-workbench[data-ai-active-view="qa"] .ai-workbench__mobile-segments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-workbench[data-ai-active-view="qa"] [data-ai-mobile-segment="proposals"] {
    display: block !important;
  }
}

@media (max-width: 520px) {
  .ai-workbench__status-rail,
  .ai-settings__key-summary dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-settings__section-head,
  .ai-workbench__pane-head,
  .ai-workbench__proposal-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-workbench__view-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-workbench__view-tabs button {
    justify-content: flex-start;
  }

  .ai-settings__section-head > span,
  .ai-workbench__pane-head > span,
  .ai-workbench__proposal-meta > span {
    align-self: flex-start;
  }

  .ai-settings__mode-field {
    max-width: none;
  }

  .ai-settings__segments {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-settings__segments button {
    justify-content: flex-start;
  }
}

/* Keep the three AI workbench surfaces readable after restoring older canvas layouts. */
@media (min-width: 761px) {
  .ai-workbench__columns.module-canvas-grid:not(.is-editing) {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr) !important;
  }

  .ai-workbench__columns.module-canvas-grid:not(.is-editing) > .module-canvas-widget {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .ai-workbench[data-ai-active-view="write"] .ai-workbench__columns.module-canvas-grid:not(.is-editing) > .module-canvas-widget:has([data-ai-workbench-pane="write"]) {
    grid-column: 1 / -1 !important;
  }
}

/* owner-shell-v1: composed archive desk for AI query, evidence and review. */
body.owner-shell-v1:not(.auth-required) .cc-ai-surface {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench,
body.owner-shell-v1:not(.auth-required) .ai-settings {
  overflow: hidden;
  border: 1px solid rgb(54 88 84 / 26%);
  border-radius: 8px;
  background: rgb(251 252 247 / 86%);
  box-shadow:
    0 24px 54px rgb(30 65 62 / 15%),
    0 5px 14px rgb(30 65 62 / 7%),
    inset 0 1px 0 rgb(255 255 255 / 92%);
  backdrop-filter: blur(18px) saturate(108%);
  -webkit-backdrop-filter: blur(18px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__header,
body.owner-shell-v1:not(.auth-required) .ai-settings__header {
  padding: 18px 20px;
  border-bottom-color: rgb(56 91 87 / 21%);
  background: rgb(255 255 252 / 58%);
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 62%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs {
  padding: 10px 20px;
  background: rgb(238 245 239 / 66%);
  border-bottom-color: rgb(56 91 87 / 18%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs button {
  min-height: 40px;
  border-color: rgb(73 105 101 / 30%);
  border-radius: 5px;
  background: rgb(255 255 252 / 78%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs button[aria-selected="true"] {
  color: #fff;
  border-color: #1d6a52;
  background: #1d7457;
  box-shadow: 0 5px 12px rgb(28 93 70 / 16%), inset 0 1px 0 rgb(255 255 255 / 16%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__header h2,
body.owner-shell-v1:not(.auth-required) .ai-settings__header h2 {
  color: #173d3b;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__header p,
body.owner-shell-v1:not(.auth-required) .ai-settings__header p,
body.owner-shell-v1:not(.auth-required) .ai-settings__section-head p {
  color: #587069;
  line-height: 1.5;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__status-rail > span {
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgb(60 108 96 / 20%);
  border-radius: 4px;
  background: rgb(228 241 234 / 68%);
  color: #3e6459;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__query,
body.owner-shell-v1:not(.auth-required) .ai-workbench__unlock {
  border-bottom-color: rgb(56 91 87 / 18%);
  background: rgb(245 248 243 / 48%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__query {
  padding: 16px 20px;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench textarea,
body.owner-shell-v1:not(.auth-required) .ai-workbench__unlock input,
body.owner-shell-v1:not(.auth-required) .ai-settings input,
body.owner-shell-v1:not(.auth-required) .ai-settings select {
  border-color: rgb(73 105 101 / 30%);
  border-radius: 5px;
  background: rgb(255 255 252 / 78%);
  box-shadow: inset 0 1px 2px rgb(26 63 60 / 4%), 0 1px 0 rgb(255 255 255 / 72%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench textarea:focus,
body.owner-shell-v1:not(.auth-required) .ai-workbench__unlock input:focus,
body.owner-shell-v1:not(.auth-required) .ai-settings input:focus,
body.owner-shell-v1:not(.auth-required) .ai-settings select:focus {
  border-color: rgb(32 117 92 / 68%);
  box-shadow: 0 0 0 3px rgb(32 117 92 / 11%), inset 0 1px 2px rgb(26 63 60 / 4%);
  outline: 0;
}

body.owner-shell-v1:not(.auth-required) .ai-command-button,
body.owner-shell-v1:not(.auth-required) .ai-secondary-button,
body.owner-shell-v1:not(.auth-required) .ai-text-button,
body.owner-shell-v1:not(.auth-required) .ai-icon-button {
  border-radius: 5px;
}

body.owner-shell-v1:not(.auth-required) .ai-command-button {
  min-height: 38px;
  border-color: #1d6a52;
  background: #1d7457;
  box-shadow: 0 7px 14px rgb(28 93 70 / 18%), inset 0 1px 0 rgb(255 255 255 / 18%);
}

body.owner-shell-v1:not(.auth-required) .ai-command-button:hover:not(:disabled) {
  background: #145942;
  box-shadow: 0 9px 18px rgb(28 93 70 / 24%), inset 0 1px 0 rgb(255 255 255 / 20%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__columns {
  gap: 0;
  background: rgb(232 240 234 / 34%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__pane {
  min-width: 0;
  padding: 18px 20px 20px;
  border-left-color: rgb(56 91 87 / 17%);
  background: rgb(255 255 252 / 34%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__pane:first-child {
  background: rgb(255 255 252 / 50%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__pane-head,
body.owner-shell-v1:not(.auth-required) .ai-settings__section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(68 103 98 / 18%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__pane-head h3,
body.owner-shell-v1:not(.auth-required) .ai-settings__section-head h3 {
  color: #204845;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__result,
body.owner-shell-v1:not(.auth-required) .ai-workbench__source-list,
body.owner-shell-v1:not(.auth-required) .ai-workbench__proposal-list,
body.owner-shell-v1:not(.auth-required) .ai-settings__audit-grid {
  border: 1px solid rgb(68 103 98 / 22%);
  border-radius: 6px;
  background: rgb(255 255 252 / 62%);
  box-shadow: 0 9px 22px rgb(28 63 60 / 6%), inset 0 1px 0 rgb(255 255 255 / 78%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__result {
  padding: 16px;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__answer-copy {
  color: #263f3a;
  line-height: 1.7;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__source,
body.owner-shell-v1:not(.auth-required) .ai-workbench__proposal {
  padding: 12px;
  border-bottom-color: rgb(68 103 98 / 15%);
  background: rgb(251 253 249 / 52%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__source:last-child,
body.owner-shell-v1:not(.auth-required) .ai-workbench__proposal:last-child {
  border-bottom: 0;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__citation {
  border-radius: 4px;
  background: rgb(219 239 229 / 90%);
  color: #1c6950;
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__proposal-actions,
body.owner-shell-v1:not(.auth-required) .ai-workbench__feedback,
body.owner-shell-v1:not(.auth-required) .ai-settings__feedback,
body.owner-shell-v1:not(.auth-required) .ai-settings__test-result {
  border-color: rgb(68 103 98 / 17%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__state {
  min-height: 126px;
  padding: 22px 16px;
  border: 1px dashed rgb(67 107 98 / 34%);
  border-radius: 6px;
  background: rgb(240 247 241 / 62%);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__unlock,
body.owner-shell-v1:not(.auth-required) .ai-workbench__unlock--active {
  border-bottom: 1px solid rgb(56 91 87 / 18%);
}

body.owner-shell-v1:not(.auth-required) .ai-settings__segments,
body.owner-shell-v1:not(.auth-required) .ai-workbench__mobile-segments {
  padding: 10px 20px;
  background: rgb(238 245 239 / 66%);
  border-bottom-color: rgb(56 91 87 / 18%);
}

body.owner-shell-v1:not(.auth-required) .ai-settings__segments button,
body.owner-shell-v1:not(.auth-required) .ai-workbench__mobile-segments button {
  min-height: 38px;
  border-radius: 5px;
}

body.owner-shell-v1:not(.auth-required) .ai-settings__segments button[aria-pressed="true"],
body.owner-shell-v1:not(.auth-required) .ai-workbench__mobile-segments button[aria-pressed="true"] {
  background: #1d7457;
  box-shadow: 0 5px 12px rgb(28 93 70 / 16%), inset 0 1px 0 rgb(255 255 255 / 16%);
}

body.owner-shell-v1:not(.auth-required) .ai-settings__panel {
  padding: 20px;
}

body.owner-shell-v1:not(.auth-required) .ai-settings__toggle,
body.owner-shell-v1:not(.auth-required) .ai-settings__key-summary {
  border-color: rgb(68 103 98 / 20%);
  border-radius: 6px;
  background: rgb(244 249 244 / 68%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 74%);
}

body.owner-shell-v1:not(.auth-required) .ai-settings__permission-notes {
  border-color: rgb(68 103 98 / 18%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings {
  border-color: rgb(130 184 175 / 24%);
  background: rgb(14 29 30 / 90%);
  box-shadow: 0 26px 60px rgb(0 5 7 / 38%), inset 0 1px 0 rgb(180 220 205 / 9%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__header,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__header,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__query,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__unlock,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__segments,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__mobile-segments {
  border-color: rgb(130 184 175 / 19%);
  background: rgb(19 39 40 / 64%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs {
  border-color: rgb(130 184 175 / 19%);
  background: rgb(19 39 40 / 64%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs button {
  border-color: rgb(130 184 175 / 24%);
  background: rgb(21 44 44 / 68%);
  color: #d4e7df;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs button[aria-selected="true"] {
  color: #fff;
  border-color: #2f8a6d;
  background: #25765d;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__header h2,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__header h2,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__pane-head h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__section-head h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__answer-copy {
  color: #e1eee7;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__header p,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__header p,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__section-head p {
  color: #9cb6ae;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__status-rail > span {
  border-color: rgb(130 184 175 / 24%);
  background: rgb(35 71 67 / 70%);
  color: #b8d0c7;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__columns {
  background: rgb(10 24 25 / 72%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__pane {
  border-left-color: rgb(130 184 175 / 17%);
  background: rgb(17 35 36 / 54%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__pane:first-child {
  background: rgb(18 39 39 / 70%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__result,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__source-list,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__proposal-list,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__audit-grid {
  border-color: rgb(130 184 175 / 22%);
  background: rgb(17 35 36 / 78%);
  box-shadow: 0 10px 24px rgb(0 5 7 / 24%), inset 0 1px 0 rgb(180 220 205 / 6%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__source,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__proposal,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__toggle,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-settings__key-summary {
  border-color: rgb(130 184 175 / 14%);
  background: rgb(21 44 44 / 68%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__state {
  border-color: rgb(130 184 175 / 32%);
  background: rgb(28 57 55 / 58%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .ai-workbench__header,
  body.owner-shell-v1:not(.auth-required) .ai-settings__header,
  body.owner-shell-v1:not(.auth-required) .ai-workbench__query,
  body.owner-shell-v1:not(.auth-required) .ai-workbench__pane,
  body.owner-shell-v1:not(.auth-required) .ai-settings__panel {
    padding-inline: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .ai-settings__segments,
  body.owner-shell-v1:not(.auth-required) .ai-workbench__mobile-segments,
  body.owner-shell-v1:not(.auth-required) .ai-workbench__view-tabs {
    padding-inline: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .ai-workbench__pane {
    border-left: 0;
  }
}

@media (max-width: 520px) {
  body.owner-shell-v1:not(.auth-required) .ai-workbench,
  body.owner-shell-v1:not(.auth-required) .ai-settings {
    border-radius: 7px;
  }

  body.owner-shell-v1:not(.auth-required) .ai-workbench__status-rail {
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) .ai-workbench__state {
    min-height: 110px;
    padding: 18px 12px;
  }
}
/* Split-workspace golden slice: conversation stays primary, context stays visible beside it. */
.ai-workbench__context-pane {
  display: grid;
  min-width: 0;
  gap: 12px;
  align-content: start;
}

.ai-workbench__conversation {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ai-workbench__message {
  max-width: 92%;
  padding: 12px 14px;
  border: 1px solid var(--cc-line, #d9e0dc);
  border-radius: 8px;
  background: var(--cc-surface, #fff);
}

.ai-workbench__message--user {
  justify-self: end;
  border-color: color-mix(in srgb, var(--cc-accent, #176b50) 32%, var(--cc-line, #d9e0dc));
  background: color-mix(in srgb, var(--cc-accent-soft, #e5f1ec) 72%, #fff);
}

.ai-workbench__message--loading {
  opacity: .78;
}

.ai-workbench__message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
}

.ai-workbench__message-meta strong {
  color: var(--cc-ink, #17211d);
  font-size: 12px;
}

.ai-workbench__message-body {
  color: var(--cc-ink, #17211d);
  line-height: 1.65;
  white-space: normal;
}

.ai-workbench__message-attachments {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.ai-workbench__message-attachment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--cc-accent, #176b50) 34%, var(--cc-line, #d9e0dc));
  border-radius: 5px;
  background: color-mix(in srgb, var(--cc-accent-soft, #e5f1ec) 62%, #fff);
  color: var(--cc-ink, #17211d);
}

.ai-workbench__message-attachment svg {
  width: 16px;
  height: 16px;
  color: var(--cc-accent-strong, #0f573f);
}

.ai-workbench__message-attachment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.ai-workbench__message-attachment small {
  color: var(--cc-ink-soft, #52605a);
  font-size: 11px;
  white-space: nowrap;
}

.ai-workbench__context-pane > .ai-workbench__pane {
  min-width: 0;
  max-height: 560px;
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 760px) {
  .ai-workbench__context-pane {
    gap: 10px;
  }

  .ai-workbench__message {
    max-width: 100%;
  }

  .ai-workbench__composer > div {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "query query" "attachment submit";
  }

  .ai-workbench__attachment-dropzone {
    width: 100%;
  }

  .ai-workbench__attachment-hint {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ai-workbench__context-pane > .ai-workbench__pane {
    max-height: none;
  }
}
/* Unified Codex-style response actions and right-side contextual finance view. */
.ai-legacy-compat { display: none !important; }
.ai-workbench__message-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-workbench__action-button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 1px solid rgb(35 111 82 / 38%); border-radius: 5px; background: rgb(235 247 238 / 90%); color: #176044; font-weight: 650; cursor: pointer; }
.ai-workbench__action-button:hover, .ai-workbench__action-button:focus-visible { border-color: #176044; background: #d9efdf; }
.ai-workbench__action-button svg { width: 15px; height: 15px; }
.ai-workbench__context-result { min-height: 180px; }
.ai-workbench__finance-context-meta { margin-bottom: 10px; color: var(--cc-text-muted, #63756d); font-size: .86rem; }
.ai-workbench__finance-context-table-wrap { overflow: auto; max-height: 420px; border: 1px solid rgb(45 85 68 / 16%); border-radius: 5px; }
.ai-workbench__finance-context table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: .84rem; }
.ai-workbench__finance-context th, .ai-workbench__finance-context td { padding: 8px 9px; border-bottom: 1px solid rgb(45 85 68 / 12%); text-align: left; white-space: nowrap; }
.ai-workbench__finance-context th { position: sticky; top: 0; background: rgb(239 247 240 / 96%); color: #31594b; }
@media (max-width: 760px) { .ai-workbench__finance-context-table-wrap { max-height: 340px; } .ai-workbench__action-button { width: 100%; justify-content: center; } }

/* UI polish 2026-09: keep the workbench a two-surface desk.  The answer and
 * active context panel own their content scroll; the page itself stays still
 * while the composer remains available for the next request. */
.ai-workbench__columns.has-context {
  align-items: stretch;
  min-height: clamp(460px, 68vh, 720px);
  max-height: min(720px, calc(100vh - 250px));
}

.ai-workbench__columns.has-context > .module-canvas-widget,
.ai-workbench__columns.has-context > .ai-workbench__pane,
.ai-workbench__columns.has-context > .ai-workbench__context-pane {
  min-height: 0;
}

.ai-workbench__pane--answer {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.ai-workbench__pane--answer .ai-workbench__pane-head {
  flex: 0 0 auto;
}

.ai-workbench__pane--answer .ai-workbench__result {
  height: auto;
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 8px 8px 2px;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 58%, transparent) transparent;
  scrollbar-width: thin;
}

.ai-workbench__context-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: none;
  gap: 0;
  overflow: hidden;
  border-left: 1px solid color-mix(in srgb, var(--cc-line, #d9e0dc) 82%, transparent);
  background: color-mix(in srgb, var(--cc-surface-muted, #f8faf9) 62%, transparent);
}

.ai-workbench__context-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  padding: 7px 8px 0;
  gap: 3px;
  align-items: stretch;
  background: color-mix(in srgb, var(--cc-surface, #fff) 94%, transparent);
  border-bottom: 1px solid var(--cc-line, #d9e0dc);
  box-shadow: 0 3px 10px rgb(23 33 29 / 6%);
  overscroll-behavior-inline: contain;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 42%, transparent) transparent;
}

.ai-workbench__context-tab-item {
  min-height: 36px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: color-mix(in srgb, var(--cc-surface-muted, #f8faf9) 72%, transparent);
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.ai-workbench__context-tab-item:has(.ai-workbench__context-tab.is-active) {
  border-color: var(--cc-line, #d9e0dc);
  background: var(--cc-surface, #fff);
  box-shadow: 0 -1px 0 var(--cc-surface, #fff), 0 2px 6px rgb(23 33 29 / 5%);
}

.ai-workbench__context-tab {
  min-height: 35px;
  padding: 7px 9px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 12px;
  letter-spacing: .01em;
}

.ai-workbench__context-tab:hover,
.ai-workbench__context-tab:focus-visible {
  color: var(--cc-accent-strong, #0f573f);
  background: color-mix(in srgb, var(--cc-accent-soft, #e5f1ec) 54%, transparent);
}

.ai-workbench__context-tab.is-active {
  border-color: transparent;
  color: var(--cc-accent-strong, #0f573f);
  background: transparent;
}

.ai-workbench__context-tab-close {
  width: 26px;
  min-width: 26px;
  height: 26px;
  margin: 4px 4px 0 0;
  border-radius: 4px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 15px;
}

.ai-workbench__context-tab-close:hover,
.ai-workbench__context-tab-close:focus-visible {
  color: var(--cc-danger, #a34136);
  background: color-mix(in srgb, var(--cc-danger, #a34136) 12%, transparent);
  outline: 2px solid color-mix(in srgb, var(--cc-danger, #a34136) 22%, transparent);
  outline-offset: -1px;
}

.ai-workbench__context-pane > [role="tabpanel"]:not([hidden]) {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.ai-workbench__context-pane > [role="tabpanel"]:not([hidden]) > .ai-workbench__pane-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 14px 10px;
}

.ai-workbench__context-pane > [role="tabpanel"][data-ai-pane="sources"]:not([hidden]) .ai-workbench__source-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 12px 14px;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 48%, transparent) transparent;
  scrollbar-width: thin;
}

.ai-workbench__context-pane > [role="tabpanel"][data-ai-context-panel="proposals"]:not([hidden]) .ai-workbench__proposal-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 12px 14px 14px;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 48%, transparent) transparent;
}

.ai-workbench__context-result:not([hidden]) {
  overflow-y: auto !important;
  scrollbar-color: color-mix(in srgb, var(--cc-accent, #176b50) 48%, transparent) transparent;
  scrollbar-width: thin;
}

.ai-workbench__composer {
  margin-top: 0;
  padding: 12px 16px 14px;
  border-top: 1px solid color-mix(in srgb, var(--cc-line, #d9e0dc) 76%, transparent);
}

.ai-workbench__composer > div {
  display: grid;
  gap: 10px;
}

.ai-workbench__attachment-dropzone {
  min-width: 148px;
  border-style: solid;
  background: color-mix(in srgb, var(--cc-surface-muted, #f8faf9) 82%, transparent);
}

@media (max-width: 1080px) and (min-width: 761px) {
  .ai-workbench__columns.has-context {
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr) !important;
    max-height: min(680px, calc(100vh - 270px));
  }

  .ai-workbench__context-tab {
    max-width: 180px;
  }
}

@media (max-width: 760px) {
  .ai-workbench__columns.has-context {
    min-height: 0;
    max-height: none;
  }

  .ai-workbench__pane--answer .ai-workbench__result {
    height: min(52vh, 460px);
    flex: 0 1 auto;
    padding: 4px 5px 8px 0;
  }

  .ai-workbench__context-pane {
    display: grid;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--cc-line, #d9e0dc);
  }

  .ai-workbench__context-tabs {
    position: sticky;
    top: var(--cc-viewbar-height, 46px);
    min-height: 45px;
    padding: 7px 10px 0;
  }

  .ai-workbench__context-pane > [role="tabpanel"]:not([hidden]) {
    min-height: 360px;
    max-height: min(62vh, 520px);
  }

  .ai-workbench__context-pane > [role="tabpanel"][data-ai-pane="sources"]:not([hidden]) .ai-workbench__source-list {
    max-height: none;
    padding-inline: 10px;
  }

  .ai-workbench__composer {
    padding-inline: 10px;
  }

  .ai-workbench__attachment-dropzone {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-workbench__context-tab-item {
    transition: none;
  }
}

/* Deep workbench pass: a quiet, high-density archive console. */
.ai-workbench {
  --ai-stage: #f4f7f5;
  --ai-panel: #ffffff;
  --ai-ink: #16211d;
  --ai-muted: #687770;
  --ai-line: #d7dfda;
  --ai-line-strong: #b5c3bc;
  --ai-accent: #176b50;
  --ai-accent-strong: #0d5039;
  --ai-accent-soft: #e7f2ed;
  overflow-x: hidden;
  display: flex;
  height: calc(100dvh - 154px);
  min-height: 560px;
  max-height: 880px;
  flex-direction: column;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: var(--ai-stage);
  box-shadow: 0 18px 48px rgb(20 36 29 / 9%);
}

.ai-workbench__header {
  flex: 0 0 auto;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 0;
  background: #18241f;
  color: #f6faf8;
}

.ai-workbench__header h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 720;
}

.ai-workbench__header .ai-workbench__eyebrow {
  color: #9fc9b8;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.ai-workbench__status-rail {
  max-width: min(62%, 760px);
  align-items: center;
  gap: 7px;
}

.ai-workbench__status-rail > span {
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid rgb(221 239 231 / 16%);
  border-radius: 4px;
  background: rgb(255 255 255 / 6%);
  color: #dce9e3;
  font-size: 11px;
}

.ai-workbench__status-rail > span svg {
  color: #72bd9e;
}

.ai-workbench__status-rail > .ai-workbench__draft-only {
  border-color: rgb(234 184 91 / 34%);
  color: #f1d696;
}

.ai-workbench__session-strip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) repeat(3, minmax(140px, 1fr));
  min-width: 0;
  border-bottom: 1px solid var(--ai-line);
  background: var(--ai-panel);
}

.ai-workbench__session-item {
  display: flex;
  min-width: 0;
  min-height: 66px;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-right: 1px solid var(--ai-line);
}

.ai-workbench__session-item:last-child {
  border-right: 0;
}

.ai-workbench__session-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid var(--ai-line);
  border-radius: 6px;
  background: #f7f9f8;
  color: #51615a;
}

.ai-workbench__session-icon svg {
  width: 16px;
  height: 16px;
}

.ai-workbench__session-item > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ai-workbench__session-item small {
  overflow: hidden;
  color: var(--ai-muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbench__session-item strong {
  overflow: hidden;
  color: var(--ai-ink);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbench__session-item--primary {
  box-shadow: inset 3px 0 0 var(--ai-accent);
}

.ai-workbench__session-item--primary .ai-workbench__session-icon {
  border-color: #a8cabd;
  background: var(--ai-accent-soft);
  color: var(--ai-accent-strong);
}

.ai-workbench__session-item--guard .ai-workbench__session-icon {
  border-color: #d6c596;
  background: #fcf5e3;
  color: #80601a;
}

.ai-workbench__columns {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--ai-stage);
}

.ai-workbench__columns.has-context {
  min-height: 0;
  max-height: none;
}

.ai-workbench__columns:not(.has-context) .ai-workbench__pane--answer {
  height: 100%;
  min-height: 0;
}

.ai-workbench__pane--answer {
  padding: 0;
  background: #fbfcfb;
}

.ai-workbench__pane--answer > .ai-workbench__pane-head {
  min-height: 45px;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ai-line);
  background: rgb(255 255 255 / 88%);
}

.ai-workbench__pane-head h3 {
  color: var(--ai-ink);
  font-size: 13px;
  font-weight: 740;
}

.ai-workbench__pane-head > span {
  padding: 3px 7px;
  border-radius: 3px;
  background: #edf1ef;
  color: #66766e;
  font-size: 10px;
  font-weight: 650;
}

.ai-workbench__pane--answer .ai-workbench__result {
  padding: 20px 22px 24px;
  background-color: #fbfcfb;
}

.ai-workbench__conversation {
  gap: 18px;
  max-width: 980px;
  margin-inline: auto;
}

.ai-workbench__message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  width: min(92%, 820px);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ai-workbench__message--user {
  grid-template-columns: minmax(0, 1fr) 30px;
  justify-self: end;
  border: 0;
  background: transparent;
}

.ai-workbench__message--user .ai-workbench__message-avatar {
  grid-column: 2;
  grid-row: 1;
}

.ai-workbench__message--user .ai-workbench__message-content {
  grid-column: 1;
  grid-row: 1;
  border-color: #bad4c9;
  background: #edf6f2;
}

.ai-workbench__message-avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #b8c7c0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ai-accent-strong);
  box-shadow: 0 2px 7px rgb(29 46 38 / 8%);
}

.ai-workbench__message-avatar svg {
  width: 15px;
  height: 15px;
}

.ai-workbench__message--assistant .ai-workbench__message-avatar {
  border-color: #2f6f58;
  background: #1b624a;
  color: #ffffff;
}

.ai-workbench__message-content {
  min-width: 0;
  padding: 12px 14px 13px;
  border: 1px solid var(--ai-line);
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgb(26 42 34 / 5%);
}

.ai-workbench__message-meta {
  margin-bottom: 7px;
}

.ai-workbench__message-meta strong {
  font-size: 11px;
  font-weight: 760;
}

.ai-workbench__message-body {
  font-size: 13px;
  line-height: 1.7;
}

.ai-workbench__message--loading .ai-workbench__message-content {
  border-style: dashed;
}

.ai-workbench__typing-dots {
  display: inline-flex;
  margin-left: 5px;
  gap: 3px;
  vertical-align: middle;
}

.ai-workbench__typing-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ai-accent);
  animation: ai-workbench-pulse 1.1s ease-in-out infinite;
}

.ai-workbench__typing-dots i:nth-child(2) { animation-delay: .14s; }
.ai-workbench__typing-dots i:nth-child(3) { animation-delay: .28s; }

@keyframes ai-workbench-pulse {
  0%, 70%, 100% { opacity: .25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-2px); }
}

.ai-workbench__context-pane {
  border-left-color: #cdd8d2;
  background: #f5f7f6;
  box-shadow: -10px 0 28px rgb(31 48 40 / 5%);
}

.ai-workbench__context-tabs {
  min-height: 45px;
  padding: 7px 8px 0;
  border-bottom-color: #cbd6d0;
  background: #e9eeeb;
  box-shadow: none;
}

.ai-workbench__context-tab-item {
  border-radius: 5px 5px 0 0;
  background: transparent;
}

.ai-workbench__context-tab-item:has(.ai-workbench__context-tab.is-active) {
  border-color: #c8d3cd;
  background: #ffffff;
  box-shadow: 0 -2px 0 var(--ai-accent), 0 1px 0 #ffffff;
}

.ai-workbench__context-tab {
  font-size: 11px;
}

.ai-workbench__context-pane > [role="tabpanel"]:not([hidden]) {
  background: #ffffff;
}

.ai-workbench__source {
  margin: 0 0 8px;
  padding: 11px 12px;
  border: 1px solid var(--ai-line);
  border-radius: 6px;
  background: #ffffff;
}

.ai-workbench__source:last-child {
  margin-bottom: 0;
}

.ai-workbench__source:hover {
  border-color: #9ebcad;
  box-shadow: 0 5px 14px rgb(24 58 43 / 6%);
}

.ai-workbench__citation {
  border-radius: 4px;
  background: #1d624a;
  color: #ffffff;
}

.ai-workbench__composer {
  flex: 0 0 auto;
  padding: 13px 18px 15px;
  border-top-color: #cfd9d4;
  background: rgb(248 250 249 / 96%);
  box-shadow: 0 -12px 30px rgb(22 39 31 / 8%);
}

.ai-workbench__composer > label {
  display: block;
  margin-bottom: 7px;
  color: #53625b;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.ai-workbench__composer-editor {
  min-height: 82px;
  padding: 8px 11px 7px;
  border-color: #aebdb6;
  background: #ffffff;
  box-shadow: 0 3px 12px rgb(27 44 36 / 5%);
}

.ai-workbench__composer-editor:focus-within {
  border-color: var(--ai-accent);
  outline: 3px solid rgb(23 107 80 / 13%);
  box-shadow: 0 5px 18px rgb(23 107 80 / 10%);
}

.ai-workbench__attachment-dropzone {
  min-height: 42px;
  border-color: #b6c4bd;
  background: #ffffff;
}

.ai-workbench__attachment-button {
  min-width: 106px;
  border-color: #9fb1a8;
  background: #ffffff;
  color: #30423a;
}

.ai-workbench__attachment-button:hover,
.ai-workbench__attachment-button:focus-visible {
  border-color: var(--ai-accent);
  background: var(--ai-accent-soft);
  color: var(--ai-accent-strong);
}

.ai-workbench__composer > div > .ai-command-button {
  min-width: 82px;
  min-height: 42px;
  border-radius: 6px;
  box-shadow: 0 5px 12px rgb(23 107 80 / 16%);
}

.ai-workbench__pending-attachment {
  min-height: 50px;
  padding: 5px 28px 5px 6px;
  border-color: #b8cfc5;
  border-radius: 6px;
  background: #f3f8f6;
}

.ai-workbench__pending-attachment-remove {
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #51615a;
  box-shadow: none;
}

.ai-workbench__pending-attachment-remove:hover,
.ai-workbench__pending-attachment-remove:focus-visible {
  background: #f7e8e8;
  color: #9c3030;
}

.ai-workbench__feedback {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 7px 16px;
  border-top-color: #d8e0dc;
  background: #f0f4f2;
  color: #617068;
  font-size: 11px;
}

.ai-workbench :where(button, textarea, input, select):focus-visible {
  outline: 2px solid #2b8063;
  outline-offset: 2px;
}

html[data-theme="night"] .ai-workbench {
  --ai-stage: #151b18;
  --ai-panel: #1c2420;
  --ai-ink: #eef5f1;
  --ai-muted: #9cafA5;
  --ai-line: #334139;
  --ai-line-strong: #526259;
  --ai-accent-soft: #203d32;
  border-color: #3a4941;
  background: var(--ai-stage);
}

html[data-theme="night"] .ai-workbench__session-strip,
html[data-theme="night"] .ai-workbench__session-item,
html[data-theme="night"] .ai-workbench__pane--answer,
html[data-theme="night"] .ai-workbench__pane--answer .ai-workbench__result,
html[data-theme="night"] .ai-workbench__context-pane > [role="tabpanel"]:not([hidden]),
html[data-theme="night"] .ai-workbench__message-content,
html[data-theme="night"] .ai-workbench__source,
html[data-theme="night"] .ai-workbench__composer-editor,
html[data-theme="night"] .ai-workbench__attachment-dropzone,
html[data-theme="night"] .ai-workbench__attachment-button {
  background: var(--ai-panel);
}

html[data-theme="night"] .ai-workbench__session-icon,
html[data-theme="night"] .ai-workbench__pane--answer > .ai-workbench__pane-head,
html[data-theme="night"] .ai-workbench__context-tabs,
html[data-theme="night"] .ai-workbench__composer,
html[data-theme="night"] .ai-workbench__feedback {
  background: #202a25;
}

html[data-theme="night"] .ai-workbench__message--user .ai-workbench__message-content {
  background: #203b31;
}

@media (max-width: 980px) {
  .ai-workbench__header {
    align-items: flex-start;
  }

  .ai-workbench__status-rail {
    max-width: 70%;
  }

  .ai-workbench__session-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-workbench__session-item:nth-child(2) {
    border-right: 0;
  }

  .ai-workbench__session-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--ai-line);
  }
}

@media (max-width: 760px) {
  .ai-workbench {
    height: auto;
    min-height: 0;
    max-height: none;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .ai-workbench__header {
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: 13px 12px;
  }

  .ai-workbench__status-rail {
    max-width: 100%;
    justify-content: flex-start;
  }

  .ai-workbench__status-rail > span:nth-child(n+4) {
    display: none;
  }

  .ai-workbench__session-item {
    min-height: 58px;
    padding: 9px 10px;
  }

  .ai-workbench__session-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .ai-workbench__pane--answer .ai-workbench__result {
    padding: 14px 10px 18px;
  }

  .ai-workbench__message,
  .ai-workbench__message--user {
    width: 100%;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 7px;
  }

  .ai-workbench__message--user .ai-workbench__message-avatar {
    grid-column: 1;
  }

  .ai-workbench__message--user .ai-workbench__message-content {
    grid-column: 2;
  }

  .ai-workbench__message-avatar {
    width: 26px;
    height: 26px;
    border-radius: 5px;
  }

  .ai-workbench__message-content {
    padding: 10px 11px;
  }

  .ai-workbench__context-pane {
    box-shadow: none;
  }

  .ai-workbench__composer {
    padding: 10px;
  }

  .ai-workbench__attachment-hint {
    display: none;
  }
}

@media (max-width: 440px) {
  .ai-workbench__session-item {
    gap: 7px;
  }

  .ai-workbench__session-item small {
    font-size: 9px;
  }

  .ai-workbench__session-item strong {
    font-size: 11px;
  }

  .ai-workbench__composer > div {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .ai-workbench__attachment-button {
    min-width: 0;
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-workbench__typing-dots i {
    animation: none;
  }
}

/* Structural polish 2026-09: one calm work surface with explicit state
   affordances. This final layer is intentionally token-based so the existing
   forest-green and night themes remain the source of truth. */
.ai-workbench[data-ai-phase="loading"] .ai-workbench__session-item--primary {
  box-shadow: inset 3px 0 0 #c48a27;
}

.ai-workbench[data-ai-phase="error"] .ai-workbench__session-item--primary {
  box-shadow: inset 3px 0 0 #a33131;
}

.ai-workbench[data-ai-context-state="closed"] .ai-workbench__columns {
  border-top: 1px solid var(--ai-line);
}

.ai-workbench__session-strip {
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px rgb(20 36 29 / 4%);
}

.ai-workbench__session-item {
  transition: background-color .16s ease, box-shadow .16s ease;
}

.ai-workbench__session-item:hover {
  background: #f7faf8;
}

.ai-workbench__columns.has-context {
  border-bottom: 1px solid var(--ai-line);
}

.ai-workbench__context-pane {
  border-left: 1px solid #bfcfc7;
}

.ai-workbench__context-tabs {
  min-width: 0;
  overscroll-behavior: contain;
}

.ai-workbench__context-tab-item {
  flex: 0 0 auto;
  max-width: min(220px, 42%);
}

.ai-workbench__context-tab {
  max-width: calc(100% - 30px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbench__pending-attachments {
  align-items: stretch;
  padding: 2px 2px 4px;
}

.ai-workbench__pending-attachment {
  min-width: 0;
  min-height: 50px;
  padding: 4px 30px 4px 5px;
  border-color: #9dbdaf;
  background: #f0f7f3;
  box-shadow: 0 2px 7px rgb(23 78 57 / 7%);
}

.ai-workbench__pending-attachment-preview {
  width: 40px;
  height: 40px;
  border-color: #8eb3a2;
}

.ai-workbench__pending-attachment-name {
  max-width: min(260px, 34vw);
  color: #20483a;
}

.ai-workbench[data-ai-attachment-count="0"] .ai-workbench__composer-editor {
  min-height: 78px;
}

.ai-workbench[data-ai-attachment-count]:not([data-ai-attachment-count="0"]) .ai-workbench__composer-editor {
  min-height: 104px;
}

html[data-theme="night"] .ai-workbench__session-item:hover {
  background: #24312b;
}

html[data-theme="night"] .ai-workbench__context-pane {
  border-left-color: #4b6257;
}

html[data-theme="night"] .ai-workbench__pending-attachment {
  border-color: #557e6b;
  background: #1d382d;
}

html[data-theme="night"] .ai-workbench__pending-attachment-name {
  color: #d7ebe1;
}

@media (max-width: 760px) {
  .ai-workbench__session-strip {
    box-shadow: none;
  }

  .ai-workbench__context-tab-item {
    max-width: 68%;
  }

  .ai-workbench__pending-attachment-name {
    max-width: min(220px, 56vw);
  }
}

/* Layout ownership: shell wrappers never scroll; each active pane has one
   content scroller, and the composer occupies its own normal-flow row. */
.ai-workbench[data-ai-workbench] [role="tabpanel"][hidden] {
  display: none !important;
}

.ai-workbench[data-ai-workbench] .ai-workbench__context-pane:not([hidden]) {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.ai-workbench[data-ai-workbench] .ai-workbench__context-pane > [role="tabpanel"]:not([hidden]) {
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.ai-workbench[data-ai-workbench] [data-ai-proposals-form] {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.ai-workbench[data-ai-workbench] .ai-workbench__context-pane .ai-workbench__proposal-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-snap-type: none;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.ai-workbench[data-ai-workbench] .ai-workbench__context-pane .ai-workbench__proposal-group {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage .ai-workbench[data-ai-workbench] .ai-workbench__proposal-group-list {
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
  scrollbar-gutter: auto !important;
}

.ai-workbench[data-ai-workbench] :is(input, select, textarea)[data-ai-proposal-field] {
  color: #17211d !important;
  -webkit-text-fill-color: #17211d !important;
  background: #fff !important;
}

.ai-workbench[data-ai-workbench] .ai-workbench__context-pane .ai-workbench__proposal-fields {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.ai-workbench[data-ai-workbench] .ai-workbench__proposal-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.ai-workbench[data-ai-workbench] .ai-workbench__composer {
  position: relative;
  inset: auto;
  z-index: 5;
  flex: 0 0 auto;
}

@media (min-width: 761px) {
  .ai-workbench[data-ai-workbench] {
    height: min(880px, calc(100dvh - 210px));
    min-height: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench[data-ai-workbench] .ai-workbench__columns {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    grid-template-rows: minmax(0, 1fr);
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__columns > .module-canvas-widget {
    display: flex;
    min-height: 0;
    overflow: hidden;
    flex-direction: column;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__columns > .module-canvas-widget > [data-ai-pane] {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-view="ai-workbench"]) .topbar {
    position: relative !important;
    top: auto !important;
  }

  .ai-workbench[data-ai-workbench] {
    height: auto;
    min-height: 0;
    padding-bottom: 0;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__columns {
    display: block !important;
    flex: 0 0 auto;
    min-height: 0;
    height: auto;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__columns > .module-canvas-widget {
    min-height: 0;
    overflow: hidden;
  }

  .ai-workbench[data-ai-workbench][data-ai-mobile-active="proposals"] [data-ai-pane="answer"],
  .ai-workbench[data-ai-workbench][data-ai-mobile-active="sources"] [data-ai-pane="answer"],
  .ai-workbench[data-ai-workbench][data-ai-mobile-active="answer"] .ai-workbench__context-pane,
  .ai-workbench[data-ai-workbench][data-ai-mobile-active="proposals"] .module-canvas-widget:has([data-ai-pane="answer"]),
  .ai-workbench[data-ai-workbench][data-ai-mobile-active="sources"] .module-canvas-widget:has([data-ai-pane="answer"]),
  .ai-workbench[data-ai-workbench][data-ai-mobile-active="answer"] .module-canvas-widget:has(.ai-workbench__context-pane) {
    display: none !important;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__context-pane:not([hidden]) {
    height: min(62dvh, 520px);
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__context-tabs {
    position: relative;
    top: auto;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__pane--answer {
    min-height: 0;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__pane--answer .ai-workbench__result {
    height: min(52dvh, 460px);
    flex: 0 0 auto;
    padding-bottom: 18px;
  }
}

/* Visual refinement 2026-09: treat the workbench as a calm command surface.
   The interaction model stays unchanged; hierarchy comes from surfaces,
   restrained emphasis and one clear draft rail. */
.ai-workbench[data-ai-workbench] {
  border-color: color-mix(in srgb, var(--cc-accent, #176b50) 24%, var(--cc-line, #d9e0dc));
  box-shadow: 0 10px 28px rgb(25 61 50 / 8%);
}

.ai-workbench[data-ai-workbench] .ai-workbench__header {
  background: var(--cc-surface-strong, #fff);
}

.ai-workbench[data-ai-workbench] .ai-workbench__header h2 {
  color: var(--cc-ink, #17211d);
}

.ai-workbench[data-ai-workbench] .ai-workbench__status-rail > span {
  background: var(--cc-surface, #fff);
  box-shadow: inset 0 1px rgb(255 255 255 / 55%);
}

.ai-workbench[data-ai-workbench] .ai-workbench__view-tabs {
  background: var(--cc-surface-muted, #f8faf9);
}

.ai-workbench[data-ai-workbench] .ai-workbench__view-tabs button[aria-selected="true"] {
  box-shadow: 0 3px 8px rgb(23 107 80 / 18%);
}

.ai-workbench[data-ai-workbench] .ai-workbench__pane-head {
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--cc-accent, #176b50) 18%, var(--cc-line, #d9e0dc));
}

.ai-workbench[data-ai-workbench] .ai-workbench__pane-head h3 {
  color: var(--cc-accent-strong, #0f573f);
}

.ai-workbench[data-ai-workbench] .ai-workbench__proposal-group {
  background: var(--cc-surface-strong, #fff);
  border-color: color-mix(in srgb, var(--cc-accent, #176b50) 20%, var(--cc-line, #d9e0dc));
  box-shadow: 0 4px 12px rgb(25 61 50 / 6%);
}

.ai-workbench[data-ai-workbench] .ai-workbench__proposal-group > header {
  background: var(--cc-accent-soft, #e5f1ec);
}

.ai-workbench[data-ai-workbench] .ai-workbench__composer {
  background: var(--cc-surface-strong, #fff);
  box-shadow: 0 8px 22px rgb(25 61 50 / 10%);
}

html[data-theme="night"] .ai-workbench[data-ai-workbench] {
  box-shadow: 0 14px 34px rgb(0 0 0 / 24%);
}

html[data-theme="night"] .ai-workbench[data-ai-workbench] .ai-workbench__proposal-group {
  box-shadow: 0 5px 16px rgb(0 0 0 / 20%);
}

@media (max-width: 760px) {
  .ai-workbench[data-ai-workbench] {
    box-shadow: none;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__composer {
    box-shadow: 0 6px 18px rgb(25 61 50 / 14%);
  }
}

/* Mobile action reachability: keep attachment, submit, and confirmation
   controls in normal flow instead of compressing the desktop three-column
   composer beyond the viewport. */
@media (max-width: 760px) {
  .ai-workbench[data-ai-workbench] .ai-workbench__composer > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "query"
      "attachment"
      "submit";
    gap: 8px;
    align-items: stretch;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__attachment-dropzone,
  .ai-workbench[data-ai-workbench] .ai-workbench__composer > div > .ai-command-button {
    width: 100%;
    min-width: 0;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__proposal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ai-workbench[data-ai-workbench] .ai-workbench__proposal-actions > button {
    flex: 1 1 140px;
    min-width: 0;
  }
}

/* Layout containment repair 2026-09: the work columns own the available
   height while the composer remains an in-flow, visible action surface. */
.ai-workbench__columns.has-context {
  flex: 1 1 0;
  height: auto;
  overflow: hidden;
}

.ai-workbench__composer {
  position: relative;
  z-index: 5;
}

.ai-workbench__context-pane > [role="tabpanel"][data-ai-context-panel="proposals"]:not([hidden]) .ai-workbench__proposal-group {
  flex: 0 0 auto;
  min-width: 0;
}

/* Model clarifications: separate from the answer, each with a reply shortcut. */
.ai-workbench__clarifications {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--cc-surface-muted, #f8faf9);
  border: 1px solid var(--cc-line-strong, #bac6c0);
  border-left: 3px solid var(--cc-accent, #176b50);
  border-radius: 8px;
}

.ai-workbench__clarifications > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cc-ink, #17211d);
  font-size: 13px;
}

.ai-workbench__clarifications ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-workbench__clarifications li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--cc-ink-soft, #52605a);
  font-size: 13px;
}

.ai-workbench__clarifications li.is-blocking {
  color: var(--cc-ink, #17211d);
  font-weight: 600;
}

.ai-workbench__clarifications li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-workbench__clarifications li > button {
  flex: 0 0 auto;
}


/* source: styles/formal-r6-workbench-v1.css */
/* Formal r6 presentation layer. Business renderers and interaction ownership stay unchanged. */

body.owner-shell-v1 {
  --formal-day-canvas: #e6ece8;
  --formal-day-paper: #fbfaf4;
  --formal-day-paper-soft: #f1f4ec;
  --formal-day-ink: #1d363c;
  --formal-day-muted: #617577;
  --formal-day-line: rgb(42 78 81 / 20%);
  --formal-day-teal: #246c69;
  --formal-day-brass: #a7773f;
  --formal-day-coral: #b96255;
  --formal-night-canvas: #071219;
  --formal-night-surface: rgb(10 29 36 / 88%);
  --formal-night-surface-strong: rgb(13 38 45 / 94%);
  --formal-night-ink: #d7e5df;
  --formal-night-muted: #78999a;
  --formal-night-line: rgb(126 196 189 / 20%);
  --formal-night-teal: #7dc8bc;
  --formal-night-brass: #d4ad67;
  --formal-night-coral: #df7d6c;
  --formal-serif: "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  --formal-sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --formal-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--formal-sans);
  letter-spacing: 0;
}

body.owner-shell-v1 .shell,
body.owner-shell-v1 .main,
body.owner-shell-v1 .workspace,
body.owner-shell-v1 .topbar,
body.owner-shell-v1 .sidebar,
body.owner-shell-v1 .status {
  box-sizing: border-box;
}

body.owner-shell-v1 .shell {
  isolation: isolate;
}

body.owner-shell-v1 .formal-rail-index,
body.owner-shell-v1 .formal-signal-head,
body.owner-shell-v1 .formal-signal-context,
body.owner-shell-v1 .formal-signal-meter {
  display: none;
}

body.owner-shell-v1 .formal-route-code,
body.owner-shell-v1 .formal-intro-eyebrow,
body.owner-shell-v1 .formal-intro-meta,
body.owner-shell-v1 .formal-archive-caption {
  font-family: var(--formal-mono);
  letter-spacing: 0;
}

body.owner-shell-v1 .formal-route-code {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

body.owner-shell-v1 .formal-workbench-intro {
  position: relative;
  z-index: 0;
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  overflow: hidden;
  border-radius: 0;
}

body.owner-shell-v1 .formal-intro-copy,
body.owner-shell-v1 .formal-intro-meta {
  position: relative;
  z-index: 2;
  min-width: 0;
}

body.owner-shell-v1 .formal-intro-eyebrow {
  display: block;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}

body.owner-shell-v1 .formal-intro-copy h1 {
  max-width: 760px;
  margin: 10px 0 7px;
  font-family: var(--formal-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0;
  text-wrap: balance;
}

body.owner-shell-v1 .formal-intro-copy p {
  max-width: 680px;
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

body.owner-shell-v1 .formal-intro-meta {
  display: grid;
  min-width: 142px;
  justify-items: end;
  align-content: end;
  gap: 3px;
  text-align: right;
}

body.owner-shell-v1 .formal-intro-date {
  font-family: var(--formal-serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}

body.owner-shell-v1 .formal-intro-day,
body.owner-shell-v1 .formal-intro-meta small {
  font-size: 9px;
  line-height: 1.4;
}

body.owner-shell-v1 .formal-intro-meta i {
  display: block;
  width: 72px;
  height: 1px;
  margin: 7px 0 4px;
}

body.owner-shell-v1 .formal-archive-caption {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 16px;
  display: none;
  justify-items: end;
  gap: 4px;
  padding: 9px 11px;
  text-align: right;
}

body.owner-shell-v1 .formal-archive-caption span {
  font-size: 8px;
  font-weight: 700;
}

body.owner-shell-v1 .formal-archive-caption strong {
  font-family: var(--formal-sans);
  font-size: 11px;
  font-weight: 700;
}

html[data-theme="day"] body.owner-shell-v1 [data-formal-mode-copy="night"],
html[data-theme="day"] body.owner-shell-v1 [data-formal-mode-label="night"],
html[data-theme="night"] body.owner-shell-v1 [data-formal-mode-copy="day"],
html[data-theme="night"] body.owner-shell-v1 [data-formal-mode-label="day"] {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .panel,
body.owner-shell-v1:not(.auth-required) .module-tabs-shell,
body.owner-shell-v1:not(.auth-required) .command,
body.owner-shell-v1:not(.auth-required) .ai-panel {
  border-radius: 4px;
}

body.owner-shell-v1:not(.auth-required) .panel {
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

body.owner-shell-v1:not(.auth-required) .grid {
  gap: 14px;
}

body.owner-shell-v1:not(.auth-required) .panel h3,
body.owner-shell-v1:not(.auth-required) .panel h4 {
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) .tab,
body.owner-shell-v1:not(.auth-required) button,
body.owner-shell-v1:not(.auth-required) input,
body.owner-shell-v1:not(.auth-required) select,
body.owner-shell-v1:not(.auth-required) textarea {
  letter-spacing: 0;
}

/* Day: vertical archive rail, photographic work surface, restrained paper layers. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) {
  --cc-canvas: var(--formal-day-canvas);
  --cc-surface: var(--formal-day-paper);
  --cc-surface-muted: var(--formal-day-paper-soft);
  --cc-surface-strong: #dce6df;
  --cc-ink: var(--formal-day-ink);
  --cc-ink-soft: var(--formal-day-muted);
  --cc-ink-faint: #839493;
  --cc-line: #c8d3cf;
  --cc-line-strong: #aebfba;
  --cc-nav: #e1e9e4;
  --cc-nav-hover: #d5e3dd;
  --cc-nav-active: #1d5152;
  --cc-accent: var(--formal-day-teal);
  --cc-accent-strong: #194e4e;
  --cc-accent-soft: #d9e8e2;
  --cc-danger: var(--formal-day-coral);
  --cc-warning: var(--formal-day-brass);
  background: var(--formal-day-canvas);
  color: var(--formal-day-ink);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .shell,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .main {
  background: var(--formal-day-canvas);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
  border-color: #c1d0ca;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 38%), transparent 26%),
    #e1e9e4;
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 74%), 9px 0 26px rgb(24 64 63 / 7%);
  color: var(--formal-day-ink);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand {
  border-color: rgb(41 80 78 / 17%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand h1 {
  color: #17393d;
  font-family: var(--formal-serif);
  font-size: 16px;
  font-weight: 700;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand small {
  color: #6d8280;
  font-family: var(--formal-mono);
  font-size: 8px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .mark {
  position: relative;
  overflow: hidden;
  border-color: #477c77;
  border-radius: 3px;
  background: #f6f4e9;
  color: #225b59;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .mark::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .mark::after {
  position: absolute;
  content: "";
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .mark::before {
  inset: 5px;
  border: 1px solid rgb(36 108 105 / 43%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .mark::after {
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  background: var(--formal-day-brass);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .mark span {
  position: relative;
  z-index: 1;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-route-code,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-eyebrow {
  color: #6a827f;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__group-label {
  color: #758a86;
  font-family: var(--formal-mono);
  font-size: 9px;
  font-weight: 700;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item {
  border: 1px solid transparent;
  border-radius: 3px;
  color: #4e6968;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:hover,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:focus-visible {
  border-color: rgb(50 104 100 / 14%);
  background: rgb(255 255 255 / 46%);
  color: #173e41;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item[aria-current="page"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item.active {
  border-color: rgb(38 92 89 / 28%);
  background: #1d5152;
  box-shadow: inset 3px 0 0 var(--formal-day-brass), 0 5px 15px rgb(28 72 72 / 10%);
  color: #f7f5eb;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .pin-button,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .nav.pinned a {
  border-color: #bacac5;
  background: rgb(255 255 255 / 43%);
  color: #45625f;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar {
  border-color: #c8d3cf;
  background: rgb(249 249 243 / 94%);
  box-shadow: 0 7px 22px rgb(27 63 62 / 7%);
  backdrop-filter: blur(16px) saturate(108%);
  -webkit-backdrop-filter: blur(16px) saturate(108%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .title h2 {
  color: #1b383d;
  font-family: var(--formal-serif);
  font-size: 18px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .command {
  border-color: #aebfba;
  background: rgb(255 255 251 / 82%);
  box-shadow: inset 3px 0 0 rgb(167 119 63 / 62%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
  position: relative;
  gap: 14px;
  background-color: var(--formal-day-canvas);
  background-image:
    linear-gradient(rgb(37 86 83 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(37 86 83 / 4%) 1px, transparent 1px);
  background-size: 48px 48px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  min-height: 210px;
  padding: 30px 34px 29px;
  border: 1px solid rgb(41 82 80 / 18%);
  background-color: #eef2eb;
  background-image:
    linear-gradient(90deg, #f5f6ef 0%, rgb(245 246 239 / 97%) 37%, rgb(245 246 239 / 65%) 56%, rgb(245 246 239 / 8%) 74%),
    url("/static/command_center/assets/day-archive-r1.jpg");
  background-position: center, right center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 66% auto;
  box-shadow: 0 18px 42px rgb(28 65 63 / 10%), inset 0 1px 0 rgb(255 255 255 / 84%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::before {
  position: absolute;
  z-index: 1;
  inset: 12px;
  border-top: 1px solid rgb(39 84 80 / 16%);
  border-left: 1px solid rgb(39 84 80 / 16%);
  pointer-events: none;
  content: "";
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-copy {
  align-self: center;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
  color: #17383d;
  text-shadow: 0 1px 0 rgb(255 255 255 / 72%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-copy p {
  color: #5b7171;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-meta {
  align-self: start;
  color: #5b7572;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-date {
  color: var(--formal-day-brass);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-intro-meta i {
  background: rgb(41 88 84 / 25%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-archive-caption {
  display: grid;
  border: 1px solid rgb(255 255 255 / 48%);
  background: rgb(20 54 53 / 73%);
  box-shadow: 0 8px 24px rgb(9 33 32 / 18%);
  color: #f5f1e6;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-archive-caption span {
  color: #d9bd86;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  border: 1px solid #c2ceca;
  background: rgb(250 250 245 / 92%);
  box-shadow: 0 7px 20px rgb(29 67 64 / 7%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .tab.active {
  border-color: var(--formal-day-brass);
  color: #174d4c;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .panel {
  border-color: #c6d1cd;
  background: rgb(251 250 244 / 94%);
  box-shadow: 0 12px 28px rgb(29 64 63 / 8%), inset 0 1px 0 rgb(255 255 255 / 88%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .panel:hover {
  border-color: #abbdb7;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .overview-command-deck,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) [data-reminders-v2] .reminder-v2-overview,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) [data-people-v2] .people-overview-primary {
  border-top: 3px solid var(--formal-day-teal);
  background:
    linear-gradient(120deg, rgb(36 108 105 / 6%), transparent 42%),
    rgb(251 250 244 / 96%);
}

/* Night: horizontal command strip, full cosmos field, fixed operational signal rail. */
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
  --cc-night-rail-width: 258px;
  --cc-desktop-topbar-height: 70px;
  --cc-canvas: var(--formal-night-canvas);
  --cc-surface: #0d2027;
  --cc-surface-muted: #102a32;
  --cc-surface-strong: #15343c;
  --cc-ink: var(--formal-night-ink);
  --cc-ink-soft: var(--formal-night-muted);
  --cc-ink-faint: #587577;
  --cc-line: #29434a;
  --cc-line-strong: #3e6668;
  --cc-nav: #081920;
  --cc-nav-hover: #12343a;
  --cc-nav-active: #1c4d51;
  --cc-accent: var(--formal-night-teal);
  --cc-accent-strong: #b8e3d8;
  --cc-accent-soft: #173b3e;
  --cc-danger: var(--formal-night-coral);
  --cc-warning: var(--formal-night-brass);
  background: var(--formal-night-canvas);
  color: var(--formal-night-ink);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .shell,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .main {
  background: var(--formal-night-canvas);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand h1 {
  color: #e5eee9;
  font-family: var(--formal-serif);
  font-size: 15px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand small,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-route-code {
  color: #678787;
  font-family: var(--formal-mono);
  font-size: 8px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .mark {
  position: relative;
  overflow: hidden;
  border-color: rgb(125 200 188 / 35%);
  border-radius: 3px;
  background: #102d34;
  color: #d4ad67;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .mark::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 7px;
  height: 7px;
  background: var(--formal-night-teal);
  box-shadow: 0 0 12px rgb(125 200 188 / 60%);
  content: "";
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .mark span {
  position: relative;
  z-index: 1;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
  border-color: var(--formal-night-line);
  background: rgb(7 19 25 / 91%);
  box-shadow: 0 10px 30px rgb(0 5 8 / 24%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .title h2 {
  color: #dce9e3;
  font-family: var(--formal-serif);
  font-size: 18px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .command {
  border-color: rgb(125 200 188 / 25%);
  background: rgb(15 40 47 / 72%);
  box-shadow: inset 3px 0 0 rgb(212 173 103 / 64%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .command input,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .command span {
  color: #b9d0cb;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace {
  position: relative;
  isolation: isolate;
  gap: 14px;
  background-color: #071219;
  background-image:
    linear-gradient(180deg, rgb(3 9 13 / 18%) 0%, rgb(3 9 13 / 58%) 62%, rgb(3 9 13 / 86%) 100%),
    url("/static/command_center/assets/night-cosmos-r1.jpg"),
    linear-gradient(rgb(126 196 189 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(126 196 189 / 3%) 1px, transparent 1px);
  background-position: center top, center top, left top, left top;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: cover, cover, 52px 52px, 52px 52px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0 67%, rgb(121 198 188 / 5%) 67% 67.1%, transparent 67.1%);
  content: "";
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  min-height: 168px;
  padding: 28px 32px 25px;
  border: 1px solid var(--formal-night-line);
  border-left: 3px solid var(--formal-night-brass);
  background:
    linear-gradient(90deg, rgb(7 22 28 / 91%), rgb(11 30 37 / 72%) 58%, rgb(8 22 29 / 44%)),
    repeating-linear-gradient(90deg, transparent 0 71px, rgb(126 196 189 / 4%) 71px 72px);
  box-shadow: 0 22px 46px rgb(0 4 7 / 28%), inset 0 1px 0 rgb(169 222 211 / 7%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::before,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::before {
  top: 0;
  right: 0;
  width: 164px;
  height: 62px;
  border-top: 1px solid rgb(125 200 188 / 32%);
  border-right: 1px solid rgb(125 200 188 / 32%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::after {
  right: 0;
  bottom: 18px;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(125 200 188 / 42%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-intro-eyebrow {
  color: #759b98;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
  color: #e0e9e4;
  text-shadow: 0 2px 22px rgb(0 0 0 / 44%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-intro-copy p {
  color: #7f9c9c;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-intro-meta {
  color: #6f9290;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-intro-date {
  color: var(--formal-night-brass);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-intro-meta i {
  background: rgb(125 200 188 / 30%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  border: 1px solid var(--formal-night-line);
  background: rgb(10 29 36 / 82%);
  box-shadow: 0 12px 30px rgb(0 5 8 / 22%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .tabs {
  border-color: rgb(126 196 189 / 16%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .tab {
  color: #708f90;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .tab:hover {
  border-color: rgb(126 196 189 / 31%);
  background: rgb(24 62 67 / 45%);
  color: #c2d9d3;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .tab.active {
  border-color: var(--formal-night-brass);
  color: #e2c587;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-panel {
  border-color: var(--formal-night-line);
  background: var(--formal-night-surface);
  box-shadow: 0 16px 34px rgb(0 4 7 / 25%), inset 0 1px 0 rgb(163 221 211 / 6%);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .panel:hover {
  border-color: rgb(126 196 189 / 31%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .overview-command-deck,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-reminders-v2] .reminder-v2-overview,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-people-v2] .people-overview-primary {
  border-top: 2px solid var(--formal-night-teal);
  border-left: 2px solid rgb(212 173 103 / 70%);
  background:
    linear-gradient(120deg, rgb(125 200 188 / 6%), transparent 46%),
    rgb(9 28 35 / 92%);
}

@media (min-width: 1024px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    height: 100dvh;
    min-height: 100dvh;
    padding: 0 15px 20px;
    overflow-y: auto;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand {
    min-height: 82px;
    padding-inline: 3px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-rail-index {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 7px 0;
    color: #7e908c;
    font-family: var(--formal-mono);
    font-size: 8px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav {
    margin-top: 20px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar {
    min-height: 76px;
    grid-template-columns: minmax(235px, 320px) minmax(300px, 1fr) auto;
    gap: 18px;
    padding: 10px 28px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
    padding: 18px 28px 36px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .shell {
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    padding-right: var(--cc-night-rail-width);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 var(--cc-night-rail-width) auto 0;
    display: flex;
    width: auto;
    height: 74px;
    min-height: 74px;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid var(--formal-night-line);
    background:
      linear-gradient(90deg, rgb(5 16 22 / 98%), rgb(9 29 35 / 94%) 62%, rgb(5 15 21 / 97%)),
      repeating-linear-gradient(90deg, transparent 0 72px, rgb(126 196 189 / 4%) 72px 73px);
    box-shadow: 0 12px 34px rgb(0 5 8 / 30%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand {
    min-height: 74px;
    flex: 0 0 218px;
    padding: 0;
    border: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav::-webkit-scrollbar {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__links {
    display: flex;
    min-width: max-content;
    align-items: center;
    gap: 3px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__group {
    display: contents;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__group-label {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item {
    width: auto;
    min-width: max-content;
    height: 38px;
    min-height: 38px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #769496;
    font-family: var(--formal-mono);
    font-size: 10px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:hover,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:focus-visible {
    border-color: rgb(126 196 189 / 24%);
    background: rgb(29 72 76 / 48%);
    color: #d3e5de;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item[aria-current="page"],
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item.active {
    border-color: rgb(126 196 189 / 35%);
    background: rgb(31 78 81 / 72%);
    box-shadow: inset 0 -2px 0 var(--formal-night-brass);
    color: #eef5f0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .pin-button,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .nav.pinned,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-rail-index {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-top: 74px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
    position: sticky;
    top: 74px;
    min-height: 70px;
    grid-template-columns: minmax(220px, 310px) minmax(320px, 1fr);
    gap: 20px;
    padding: 10px 30px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status {
    position: fixed;
    z-index: 45;
    inset: 0 0 0 auto;
    display: flex;
    width: var(--cc-night-rail-width);
    min-width: var(--cc-night-rail-width);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 13px;
    padding: 25px 21px 22px;
    overflow: hidden;
    border: 0;
    border-left: 1px solid var(--formal-night-line);
    background:
      linear-gradient(180deg, rgb(7 20 26 / 91%), rgb(5 16 22 / 96%)),
      repeating-linear-gradient(0deg, transparent 0 47px, rgb(126 196 189 / 3%) 47px 48px);
    box-shadow: -14px 0 36px rgb(0 4 7 / 26%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #8cacaa;
    white-space: normal;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-head {
    order: -5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 15px;
    border-bottom: 1px solid rgb(126 196 189 / 16%);
    color: #789b98;
    font-family: var(--formal-mono);
    font-size: 9px;
    font-weight: 700;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-head i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--formal-night-teal);
    box-shadow: 0 0 0 4px rgb(125 200 188 / 10%), 0 0 16px rgb(125 200 188 / 54%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status > .dot {
    position: absolute;
    top: 87px;
    right: 22px;
    margin: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #clock {
    order: -4;
    display: block;
    margin-top: 5px;
    color: #e4ebe6;
    font-family: var(--formal-serif);
    font-size: 39px;
    font-weight: 600;
    line-height: 1;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #workspaceStatus {
    order: -3;
    display: -webkit-box;
    max-width: none;
    max-height: 3em;
    padding-bottom: 14px;
    overflow: hidden;
    border-bottom: 1px solid rgb(126 196 189 / 16%);
    color: #799896;
    font-family: var(--formal-mono);
    font-size: 9px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-context {
    order: -2;
    display: grid;
    gap: 5px;
    padding: 13px 0 15px;
    border-bottom: 1px solid rgb(126 196 189 / 16%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-context span,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-context small,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-meter span,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-meter small {
    color: #668584;
    font-family: var(--formal-mono);
    font-size: 8px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-context strong {
    color: #c8d9d3;
    font-family: var(--formal-serif);
    font-size: 15px;
    font-weight: 600;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-meter {
    order: -1;
    display: grid;
    gap: 8px;
    padding: 3px 0 14px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-meter i {
    display: block;
    height: 3px;
    overflow: hidden;
    background: rgb(126 196 189 / 10%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-meter b {
    display: block;
    width: 68%;
    height: 100%;
    background: linear-gradient(90deg, var(--formal-night-teal), var(--formal-night-brass));
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-theme-mode-toggle],
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .owner-global-search-trigger,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-fab,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    justify-content: center;
    border-color: rgb(126 196 189 / 21%);
    border-radius: 3px;
    background: rgb(15 43 48 / 56%);
    color: #b6cfca;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-theme-mode-toggle] {
    order: 2;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .global-search-mount {
    order: 3;
    display: flex;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-fab {
    order: 4;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    order: 5;
    margin-top: auto;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace {
    padding: 24px 30px 40px;
  }

  html[data-theme="night"] body.owner-shell-v1.ai-open .shell {
    padding-right: 380px;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .shell {
    grid-template-columns: 184px minmax(0, 1fr);
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
    padding-inline: 12px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand {
    padding-inline: 0;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand h1 {
    font-size: 14px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .brand small {
    font-size: 6px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-rail-index {
    font-size: 7px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-rail-index {
    padding-inline: 2px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar {
    grid-template-columns: minmax(190px, 300px) minmax(260px, 1fr) auto;
    gap: 12px;
    padding-inline: 20px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
    padding: 16px 20px 32px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
    --cc-night-rail-width: 0px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .sidebar {
    gap: 10px;
    padding-inline: 12px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand {
    min-width: 154px;
    flex-basis: 154px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand > div:last-child {
    min-width: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand h1 {
    font-size: 14px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand small {
    font-size: 6px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav {
    overflow-x: hidden;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__links {
    gap: 2px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item {
    width: 44px;
    min-width: 44px;
    height: 50px;
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px;
    font-size: 8px;
    line-height: 1;
    text-align: center;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__label {
    max-width: 100%;
    font-size: 8px;
    line-height: 1;
    text-align: center;
    text-overflow: clip;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
    grid-template-columns: minmax(220px, 310px) minmax(280px, 1fr) auto;
    gap: 12px;
    padding-inline: 18px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status {
    position: static;
    display: flex;
    width: auto;
    min-width: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-head,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-context,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-signal-meter,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status > .dot,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #workspaceStatus,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #clock {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) [data-theme-mode-toggle],
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .owner-global-search-trigger,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-fab,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .owner-global-search-trigger span {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    width: 48px;
    min-width: 48px;
    margin-top: 0;
  }
}

@media (min-width: 761px) and (max-width: 1023px) {
  body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    min-height: 178px;
    padding: 25px 26px;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
    font-size: 29px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    background-size: 100% 100%, 76% auto;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .formal-route-code {
    margin: 0 0 2px;
    font-size: 8px;
  }

  body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    min-height: 170px;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 12px;
    padding: 19px 17px 18px;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
    max-width: 100%;
    margin: 7px 0 5px;
    font-size: 25px;
    line-height: 1.25;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-copy p {
    font-size: 11px;
    line-height: 1.55;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-items: start;
    justify-content: flex-start;
    gap: 7px;
    text-align: left;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-date {
    font-family: var(--formal-mono);
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-meta i,
  body.owner-shell-v1:not(.auth-required) .formal-intro-meta small,
  body.owner-shell-v1:not(.auth-required) .formal-archive-caption,
  body.owner-shell-v1:not(.auth-required) .formal-signal-head,
  body.owner-shell-v1:not(.auth-required) .formal-signal-context,
  body.owner-shell-v1:not(.auth-required) .formal-signal-meter {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .workspace {
    gap: 9px;
    padding: 9px 9px var(--cc-mobile-content-bottom-clearance);
  }

  body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
    border-radius: 3px;
  }

  body.owner-shell-v1:not(.auth-required) .panel {
    padding: 14px;
    border-radius: 3px;
  }

  body.owner-shell-v1:not(.auth-required) .grid {
    gap: 10px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    border-color: rgb(41 82 80 / 18%);
    background-image:
      linear-gradient(180deg, rgb(245 246 239 / 24%) 0%, rgb(245 246 239 / 92%) 48%, #f5f6ef 100%),
      url("/static/command_center/assets/day-archive-r1.jpg");
    background-position: center, center top;
    background-size: 100% 100%, 100% auto;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav {
    border-top: 1px solid #b8c9c3;
    background: rgb(244 246 239 / 96%);
    box-shadow: 0 -12px 30px rgb(25 59 58 / 14%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav__item.active,
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav__item[aria-current="page"] {
    background: rgb(36 108 105 / 11%);
    box-shadow: inset 0 3px 0 var(--formal-day-brass);
    color: #174e4e;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    min-height: 158px;
    border-left-width: 2px;
    background: rgb(7 24 30 / 79%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace {
    background-size: auto 620px, auto 620px, 38px 38px, 38px 38px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav {
    border-top: 1px solid rgb(126 196 189 / 22%);
    background: rgb(7 23 29 / 95%);
    box-shadow: 0 -14px 34px rgb(0 4 7 / 42%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav__item {
    color: #668888;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav__item.active,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .cc-mobile-nav__item[aria-current="page"] {
    background: rgb(45 104 99 / 17%);
    box-shadow: inset 0 3px 0 var(--formal-night-brass);
    color: #e0c181;
  }
}

@media (max-width: 390px) {
  body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
    font-size: 23px;
  }

  body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    padding-inline: 15px;
  }
}

/* Day r7: photographic canvas and elevated work cards across every module. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) {
  --formal-day-canvas: #dbe5e0;
  --formal-day-paper: #fcfbf6;
  --formal-day-paper-soft: #f0f4ef;
  --cc-shadow-float: 0 22px 54px rgb(29 61 60 / 16%);
  background: #dbe5e0;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .shell,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .main {
  background: transparent;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
  isolation: isolate;
  gap: 18px;
  background-color: #dbe5e0;
  background-image:
    linear-gradient(100deg, rgb(224 234 229 / 96%) 0%, rgb(224 234 229 / 88%) 50%, rgb(216 227 222 / 72%) 100%),
    url("/static/command_center/assets/day-archive-r1.jpg"),
    linear-gradient(rgb(37 86 83 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(37 86 83 / 5%) 1px, transparent 1px);
  background-attachment: scroll, fixed, scroll, scroll;
  background-position: center, center top, left top, left top;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: 100% 100%, cover, 46px 46px, 46px 46px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 64%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 58%), transparent 28%),
    linear-gradient(135deg, #e8efeb, #dce7e2);
  box-shadow: inset -1px 0 0 rgb(255 255 255 / 86%), 12px 0 34px rgb(22 58 56 / 10%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar {
  border-color: rgb(73 105 101 / 24%);
  background: rgb(250 250 246 / 86%);
  box-shadow: 0 12px 32px rgb(26 62 60 / 11%), inset 0 1px 0 rgb(255 255 255 / 92%);
  backdrop-filter: blur(20px) saturate(112%);
  -webkit-backdrop-filter: blur(20px) saturate(112%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .command,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  border-color: rgb(62 98 94 / 25%);
  border-radius: 8px;
  background: rgb(252 251 247 / 88%);
  box-shadow: 0 10px 26px rgb(31 66 64 / 10%), inset 0 1px 0 rgb(255 255 255 / 92%);
  backdrop-filter: blur(16px) saturate(108%);
  -webkit-backdrop-filter: blur(16px) saturate(108%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  border-color: rgb(49 85 82 / 28%);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgb(25 59 57 / 16%), inset 0 1px 0 rgb(255 255 255 / 86%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .ai-panel {
  border: 1px solid rgb(58 91 88 / 26%);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgb(255 255 252 / 94%), rgb(247 249 244 / 87%));
  box-shadow:
    0 22px 50px rgb(31 62 61 / 14%),
    0 4px 12px rgb(31 62 61 / 7%),
    inset 0 1px 0 rgb(255 255 255 / 96%);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel:hover {
  border-color: rgb(42 87 83 / 38%);
  box-shadow:
    0 26px 58px rgb(31 62 61 / 17%),
    0 5px 14px rgb(31 62 61 / 8%),
    inset 0 1px 0 rgb(255 255 255 / 98%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel.tab-focus {
  border-color: rgb(36 108 105 / 52%);
  box-shadow:
    0 28px 60px rgb(31 62 61 / 18%),
    0 0 0 2px rgb(36 108 105 / 9%),
    inset 0 1px 0 rgb(255 255 255 / 98%);
}

@media (min-width: 1024px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
    padding: 22px 34px 48px;
  }
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
    gap: 11px;
    background-attachment: scroll;
    background-position: center, center top, left top, left top;
    background-size: 100% 100%, auto 680px, 38px 38px, 38px 38px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
    border-radius: 7px;
    box-shadow: 0 14px 32px rgb(31 62 61 / 13%), inset 0 1px 0 rgb(255 255 255 / 94%);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1:not(.auth-required) .panel {
    transition: none;
  }
}

@media (forced-colors: active) {
  body.owner-shell-v1:not(.auth-required) .formal-workbench-intro,
  body.owner-shell-v1:not(.auth-required) .panel,
  body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}


/* source: styles/overview-canvas-v1.css */
/* Overview canvas: a restrained workbench layer over the existing command-center panels. */
.overview-canvas-shell {
  position: relative;
  min-width: 0;
  isolation: isolate;
}

.overview-canvas-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--product-line, #4a6870) 80%, transparent);
  background: color-mix(in srgb, var(--product-surface, #10242d) 86%, transparent);
}

.overview-canvas-toolbar-title,
.overview-canvas-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.overview-canvas-toolbar-title strong {
  color: var(--product-text, #d9e9e5);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.overview-canvas-kicker,
.overview-canvas-status {
  color: var(--product-muted, #82a29f);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}

.overview-canvas-status {
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  letter-spacing: .02em;
}

.overview-canvas-status[data-status="editing"] { color: #d5ad68; }
.overview-canvas-status[data-status="saved"] { color: #79c7ae; }
.overview-canvas-status[data-status="error"] { color: #e29b87; }

.overview-canvas-toolbar-actions .mini-action {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--product-line, #4a6870) 78%, transparent);
  background: color-mix(in srgb, var(--product-surface, #10242d) 72%, transparent);
  color: var(--product-muted, #9bb6b1);
  font-size: 11px;
  white-space: nowrap;
}

.overview-canvas-toolbar-actions .mini-action:hover:not(:disabled),
.overview-canvas-toolbar-actions .mini-action:focus-visible {
  border-color: color-mix(in srgb, #d5ad68 74%, var(--product-line, #4a6870));
  color: #f0d49c;
}

.overview-canvas-toolbar-actions .overview-canvas-edit {
  border-color: color-mix(in srgb, #d5ad68 58%, var(--product-line, #4a6870));
  color: #e2bf7d;
}

.overview-canvas-toolbar-actions .overview-canvas-edit[aria-pressed="true"] {
  background: #c69d5c;
  color: #13252a;
}

.overview-canvas-toolbar-actions .mini-action:disabled {
  cursor: not-allowed;
  opacity: .44;
}

.overview-canvas-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  /* Keep row height under canvas control so compact cards expose their own
     scroll area instead of forcing every grid row to grow with content. */
  grid-auto-rows: 88px !important;
  align-items: stretch;
  gap: 12px !important;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
}

.overview-canvas-grid::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

html[data-theme="night"] .overview-canvas-grid::before {
  background:
    linear-gradient(180deg, rgb(5 14 19 / 4%), rgb(5 14 19 / 34%)),
    url("/static/command_center/assets/night-cosmos-r1.jpg") center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: .36;
}

html[data-theme="day"] .overview-canvas-grid::before {
  background: linear-gradient(90deg, rgb(224 234 227 / 62%), rgb(248 247 239 / 30%), rgb(224 234 227 / 62%));
  opacity: .55;
}

[data-overview-canvas-widget] {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  transition: opacity .2s ease, transform .2s ease;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget].is-tab-hidden { display: none; }
[data-overview-canvas-widget].is-dragging,
[data-overview-canvas-widget].is-resizing { z-index: 10; opacity: .92; }

.overview-canvas-grid.is-editing { padding-bottom: 50vh !important; }

html[data-theme] body.owner-shell-v1 #moduleStage[data-active-view="overview"] .overview-canvas-grid.is-editing [data-overview-canvas-widget] > .panel {
  box-sizing: border-box;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
}

[data-overview-canvas-widget] > .panel {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  margin: 0;
  flex: 0 0 auto;
  overflow-x: clip;
  overflow-y: auto;
  grid-column: auto !important;
  grid-row: auto !important;
}

/* All overview tabs use the same canvas geometry. */

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] {
  display: flex;
  isolation: isolate;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel {
  border-width: 1px !important;
  border-style: solid !important;
  box-shadow: 0 0 0 1px rgb(238 248 242 / 13%), 0 16px 28px rgb(3 31 35 / 16%);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  overflow-y: scroll !important;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel::-webkit-scrollbar {
  width: 8px;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel::-webkit-scrollbar-track {
  background: rgb(5 45 48 / 10%);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgb(79 150 140 / 58%);
  background-clip: padding-box;
}

[data-overview-canvas-grid].is-editing {
  outline: 1px solid color-mix(in srgb, #8bcfc1 42%, transparent);
  outline-offset: 7px;
  background-image:
    repeating-linear-gradient(90deg, rgb(112 196 182 / 8%) 0 1px, transparent 1px 8.333%),
    repeating-linear-gradient(0deg, rgb(112 196 182 / 7%) 0 1px, transparent 1px 88px);
}

[data-overview-canvas-grid].is-editing [data-overview-canvas-widget] > .panel {
  border-style: dashed;
  border-color: color-mix(in srgb, #8bcfc1 60%, var(--product-line, #4a6870));
}

[data-overview-canvas-widget].is-selected > .panel {
  border-color: #d5ad68;
  box-shadow: 0 0 0 2px rgb(213 173 104 / 18%), 0 16px 30px rgb(0 0 0 / 18%);
}

.overview-canvas-drag-handle,
.overview-canvas-resize-handle {
  position: absolute;
  z-index: 4;
  display: none;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, #8bcfc1 54%, transparent);
  color: #9fd2c5;
  background: rgb(8 29 36 / 90%);
  cursor: pointer;
}

[data-overview-canvas-grid].is-editing .overview-canvas-drag-handle,
[data-overview-canvas-grid].is-editing .overview-canvas-resize-handle { display: block; }

.overview-canvas-drag-handle {
  touch-action: none;
  user-select: none;
  top: 7px;
  right: 32px;
  width: 28px;
  height: 20px;
  font: 14px/12px ui-monospace, Consolas, monospace;
  letter-spacing: 2px;
}

.overview-canvas-drag-handle:active { cursor: grabbing; }

.overview-canvas-resize-handle {
  right: 5px;
  bottom: 5px;
  width: 17px;
  height: 17px;
  border-top: 0;
  border-left: 0;
  cursor: nwse-resize;
  touch-action: none;
}

.overview-canvas-resize-handle::before,
.overview-canvas-resize-handle::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 1px;
  content: "";
  transform: rotate(-45deg);
  background: currentColor;
}

.overview-canvas-resize-handle::after { right: 2px; bottom: 7px; width: 5px; }

html[data-theme="night"] .overview-canvas-toolbar {
  border-color: rgb(128 199 192 / 24%);
  background: rgb(9 25 32 / 82%);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%);
}

html[data-theme="night"] #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel {
  background: color-mix(in srgb, var(--product-surface, #10242d) 74%, transparent);
  backdrop-filter: blur(4px);
}

/* Long isolated markers and real-world titles must wrap inside the canvas cells. */
.overview-canvas-grid .overview-home-layout,
.overview-canvas-grid .overview-focus-panel,
.overview-canvas-grid .overview-change-panel,
.overview-canvas-grid .overview-task-list,
.overview-canvas-grid .overview-change-list,
.overview-canvas-grid .overview-task-row,
.overview-canvas-grid .overview-change-row,
.overview-canvas-grid .overview-context-strip,
.overview-canvas-grid .overview-signal-card {
  min-width: 0;
  max-width: 100%;
}

.overview-canvas-grid .overview-task-row > span,
.overview-canvas-grid .overview-change-row > span,
.overview-canvas-grid .overview-task-row strong,
.overview-canvas-grid .overview-task-row small,
.overview-canvas-grid .overview-change-row strong,
.overview-canvas-grid .overview-change-row small,
.overview-canvas-grid .overview-signal-card small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

html[data-theme="day"] .overview-canvas-toolbar {
  border-color: rgb(47 89 89 / 19%);
  background: rgb(248 250 246 / 82%);
}

html[data-theme="day"] .overview-canvas-toolbar-title strong { color: #23484a; }
html[data-theme="day"] .overview-canvas-kicker,
html[data-theme="day"] .overview-canvas-status { color: #6b8581; }
html[data-theme="day"] .overview-canvas-toolbar-actions .mini-action {
  border-color: rgb(47 89 89 / 22%);
  color: #426668;
  background: rgb(255 255 255 / 62%);
}
html[data-theme="day"] .overview-canvas-drag-handle,
html[data-theme="day"] .overview-canvas-resize-handle {
  border-color: rgb(70 127 119 / 42%);
  color: #3f8178;
  background: rgb(246 249 243 / 94%);
}

@media (max-width: 760px) {
  .overview-canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 11px;
  }

  .overview-canvas-toolbar-title { width: 100%; flex-wrap: wrap; gap: 7px; }
  .overview-canvas-toolbar-actions { display: flex; flex-wrap: wrap; }
  .overview-canvas-grid:not(.is-editing),
  html[data-theme="night"] .overview-canvas-grid:not(.is-editing) {
    display: flex !important;
    flex-direction: column;
    gap: 10px !important;
    min-height: 0;
  }
  #moduleStage[data-active-view="overview"] [data-overview-canvas-widget],
  [data-overview-canvas-widget] > .panel {
    height: auto;
    min-height: 0;
  }
  [data-overview-canvas-widget] > .panel { overflow: visible; }
  [data-overview-canvas-widget].is-tab-hidden { display: none; }
  [data-overview-canvas-grid].is-editing .overview-canvas-resize-handle { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .overview-canvas-toolbar,
  [data-overview-canvas-widget] { transition: none; }
}

/* Resized card content follows its container, independently of the viewport theme. */
#moduleStage [data-overview-canvas-widget="focus"] {
  container: overview-focus / inline-size;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="focus"] .overview-command-deck {
  grid-template-rows: repeat(3, max-content) !important;
  align-content: start;
}

#moduleStage [data-overview-canvas-widget="focus"] :is(h3, h4, strong, small) {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

#moduleStage [data-overview-canvas-widget="focus"] :is(.overview-task-row, .overview-change-row) :is(strong, small),
#moduleStage [data-overview-canvas-widget="focus"] .overview-signal-card small {
  display: block !important;
  overflow: visible !important;
  -webkit-line-clamp: unset;
}

#moduleStage [data-overview-canvas-widget="focus"] .overview-signal-card small {
  grid-column: 1 / -1;
  grid-row: 2;
}

#moduleStage [data-overview-canvas-widget="focus"] .overview-signal-card strong {
  grid-row: 1;
}

@container overview-focus (max-width: 560px) {
  #moduleStage [data-overview-canvas-widget="focus"] .overview-home-head {
    display: block !important;
    padding: 14px 12px !important;
  }

  #moduleStage [data-overview-canvas-widget="focus"] .overview-home-head h3 {
    font-size: 19px !important;
  }

  #moduleStage [data-overview-canvas-widget="focus"] .overview-primary-actions {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 64px), 1fr)) !important;
    width: 100% !important;
    margin: 12px 0 0 !important;
  }

  #moduleStage [data-overview-canvas-widget="focus"] .overview-home-layout {
    display: block !important;
    padding: 0 12px 12px !important;
    min-height: min-content;
  }

  #moduleStage [data-overview-canvas-widget="focus"] :is(.overview-focus-panel, .overview-change-panel) {
    padding: 12px 0 0 !important;
    border-left: 0 !important;
  }

  #moduleStage [data-overview-canvas-widget="focus"] .overview-section-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  #moduleStage [data-overview-canvas-widget="focus"] :is(.overview-task-row, .overview-change-row) {
    display: block !important;
    padding-left: 0 !important;
  }

  #moduleStage [data-overview-canvas-widget="focus"] .overview-task-row::before {
    display: none;
  }

  #moduleStage [data-overview-canvas-widget="focus"] .overview-context-strip {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto;
  }
}

/* R7 Overview command field: archive observatory, not another equal-card grid. */
#moduleStage[data-active-view="overview"] .overview-canvas-shell {
  --overview-r7-brass: #c59a52;
  --overview-r7-teal: #4aa79f;
  --overview-r7-coral: #cb6f61;
  --overview-r7-blue: #5e95bd;
  --overview-r7-line: color-mix(in srgb, var(--product-line, #45636b) 82%, transparent);
}

#moduleStage[data-active-view="overview"] .overview-canvas-toolbar {
  min-height: 46px;
  margin-bottom: 14px;
  padding: 7px 10px 7px 13px;
  border-radius: 2px;
  box-shadow: 0 9px 24px rgb(4 18 22 / 8%);
}

#moduleStage[data-active-view="overview"] .overview-canvas-toolbar::before {
  width: 3px;
  align-self: stretch;
  flex: 0 0 3px;
  background: var(--overview-r7-brass);
  content: "";
}

#moduleStage[data-active-view="overview"] .overview-canvas-toolbar-title {
  margin-right: auto;
}

#moduleStage[data-active-view="overview"] .overview-canvas-status {
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 999px;
}

#moduleStage[data-active-view="overview"] .overview-canvas-grid {
  grid-auto-rows: 92px !important;
  padding: 2px 0 22px;
  gap: 14px !important;
}

#moduleStage[data-active-view="overview"] .overview-canvas-grid::before {
  inset: 0;
  opacity: 1;
  mix-blend-mode: normal;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] {
  --overview-r7-widget-accent: var(--overview-r7-teal);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="reminders"] {
  --overview-r7-widget-accent: var(--overview-r7-coral);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="finance"] {
  --overview-r7-widget-accent: var(--overview-r7-brass);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="people"] {
  --overview-r7-widget-accent: var(--overview-r7-blue);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="activity"] {
  --overview-r7-widget-accent: #55b9b0;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel {
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 3px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="focus"] {
  z-index: 2;
}

#moduleStage[data-active-view="overview"] .overview-command-deck {
  --overview-r7-layer: command-field;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(158px, 23%, 198px);
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "head signals"
    "work signals";
  min-height: 100%;
  padding: 0 !important;
  overflow: clip !important;
  border-width: 1px 1px 1px 3px !important;
  border-top-width: 1px !important;
  border-left-color: var(--overview-r7-brass) !important;
  box-shadow: 0 26px 52px rgb(3 16 20 / 18%), inset 0 1px rgb(255 255 255 / 4%) !important;
}

#moduleStage[data-active-view="overview"] .overview-command-deck > .overview-home-head {
  grid-area: head;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  min-width: 0;
  min-height: 106px;
  margin: 0;
  padding: 20px 20px 17px;
}

#moduleStage[data-active-view="overview"] .overview-home-head h3 {
  max-width: 26ch;
  margin: 4px 0 5px;
  font-family: var(--formal-serif, Georgia, serif);
  font-size: 22px;
  font-weight: 680;
  line-height: 1.25;
}

#moduleStage[data-active-view="overview"] .overview-home-head p {
  max-width: 58ch;
  line-height: 1.55;
}

#moduleStage[data-active-view="overview"] .overview-primary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 264px);
  gap: 6px;
  margin-left: auto;
}

#moduleStage[data-active-view="overview"] .overview-primary-actions a {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding-inline: 9px;
  border-radius: 2px;
  white-space: nowrap;
}

#moduleStage[data-active-view="overview"] .overview-primary-actions a:first-child {
  border-color: color-mix(in srgb, var(--overview-r7-teal) 76%, var(--overview-r7-line));
  background: color-mix(in srgb, var(--overview-r7-teal) 18%, transparent);
}

#moduleStage[data-active-view="overview"] .overview-command-deck > .overview-home-layout {
  grid-area: work;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 0 20px 20px;
  border: 0;
}

#moduleStage[data-active-view="overview"] .overview-focus-panel,
#moduleStage[data-active-view="overview"] .overview-change-panel {
  min-width: 0;
  padding-top: 15px;
  border-top: 1px solid var(--overview-r7-line);
  background: transparent !important;
}

#moduleStage[data-active-view="overview"] .overview-focus-panel {
  padding-right: 18px;
  padding-bottom: 0;
}

#moduleStage[data-active-view="overview"] .overview-change-panel {
  margin: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 18px;
  border-left: 1px solid var(--overview-r7-line);
}

#moduleStage[data-active-view="overview"] .overview-task-list,
#moduleStage[data-active-view="overview"] .overview-change-list {
  max-height: none;
  overflow: visible;
}

#moduleStage[data-active-view="overview"] .overview-task-list {
  counter-reset: overview-r7-task;
}

#moduleStage[data-active-view="overview"] .overview-task-row {
  position: relative;
  min-height: 58px;
  padding-left: 34px;
  overflow: hidden;
}

#moduleStage[data-active-view="overview"] .overview-task-row::before {
  position: absolute;
  top: 13px;
  left: 0;
  width: 24px;
  color: var(--overview-r7-widget-accent);
  counter-increment: overview-r7-task;
  content: counter(overview-r7-task, decimal-leading-zero);
  font: 9px/1 var(--formal-mono, Consolas, monospace);
}

#moduleStage[data-active-view="overview"] .overview-change-list {
  position: relative;
  padding-left: 12px;
  border-left: 1px solid color-mix(in srgb, var(--overview-r7-teal) 30%, transparent);
}

#moduleStage[data-active-view="overview"] .overview-change-row {
  position: relative;
  min-height: 58px;
  padding-left: 10px;
  overflow: hidden;
}

#moduleStage[data-active-view="overview"] .overview-task-row strong,
#moduleStage[data-active-view="overview"] .overview-change-row strong,
#moduleStage[data-active-view="overview"] .overview-task-row small,
#moduleStage[data-active-view="overview"] .overview-change-row small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#moduleStage[data-active-view="overview"] .overview-change-row::before {
  position: absolute;
  top: 17px;
  left: -16px;
  width: 7px;
  height: 7px;
  border: 2px solid color-mix(in srgb, var(--overview-r7-teal) 52%, transparent);
  border-radius: 50%;
  background: var(--product-surface, #10242d);
  content: "";
}

#moduleStage[data-active-view="overview"] .overview-command-deck > .overview-context-strip {
  grid-area: signals;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
  border-left: 1px solid var(--overview-r7-line);
  background: color-mix(in srgb, var(--product-surface-soft, #122b33) 86%, transparent);
}

#moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  gap: 5px 9px;
  min-height: 0;
  align-content: center;
  padding: 14px 13px 13px 16px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--overview-r7-line);
  border-radius: 0;
  background: transparent !important;
}

#moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card:last-child {
  border-bottom: 0;
}

#moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 2px;
  background: var(--overview-r7-teal);
  content: "";
}

#moduleStage[data-active-view="overview"] .overview-context-strip [data-overview-signal="reminders"]::before {
  background: var(--overview-r7-coral);
}

#moduleStage[data-active-view="overview"] .overview-context-strip [data-overview-signal="finance"]::before {
  background: var(--overview-r7-brass);
}

#moduleStage[data-active-view="overview"] .overview-context-strip [data-overview-signal="people"]::before {
  background: var(--overview-r7-blue);
}

#moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card > span {
  align-self: end;
  font: 9px/1.25 var(--formal-mono, Consolas, monospace);
  text-transform: uppercase;
}

#moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  font-family: var(--formal-serif, Georgia, serif);
  font-size: 25px;
  line-height: 1;
}

#moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card small {
  display: -webkit-box;
  align-self: start;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.4;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) {
  gap: 8px;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  position: relative;
  height: auto;
  flex: 1 1 0;
  border-top: 2px solid var(--overview-r7-widget-accent);
  box-shadow: 0 14px 30px rgb(3 16 20 / 11%);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel > h3:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 14px;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel > h3:first-child::before {
  width: 16px;
  height: 2px;
  flex: 0 0 16px;
  background: var(--overview-r7-widget-accent);
  content: "";
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="reminders"] > .panel {
  border-top-width: 1px;
  border-left: 2px solid var(--overview-r7-widget-accent);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="finance"] > .panel {
  background-image: repeating-linear-gradient(90deg, transparent 0 79px, color-mix(in srgb, var(--overview-r7-widget-accent) 5%, transparent) 80px);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="activity"] .row {
  position: relative;
  padding-left: 15px;
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="activity"] .row::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--overview-r7-widget-accent);
  content: "";
  transform: translateY(-50%);
}

#moduleStage[data-active-view="overview"] [data-overview-canvas-widget="footer"] > .panel {
  min-height: 74px;
  border-top-width: 1px;
  border-left: 3px solid var(--overview-r7-widget-accent);
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1 .overview-canvas-grid::before {
  background:
    repeating-linear-gradient(0deg, rgb(52 92 87 / 3%) 0 1px, transparent 1px 32px),
    linear-gradient(90deg, rgb(246 246 239 / 72%), rgb(228 237 232 / 38%));
}

html[data-theme="day"] body.owner-shell-v1 .overview-canvas-toolbar {
  border-color: #bdcbc5;
  background: rgb(249 249 244 / 95%);
  box-shadow: 0 10px 24px rgb(35 70 67 / 7%);
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck {
  border-color: #b7c7c0 !important;
  border-left-color: var(--overview-r7-brass) !important;
  background:
    repeating-linear-gradient(0deg, rgb(42 79 75 / 2.5%) 0 1px, transparent 1px 34px),
    #fbfaf4 !important;
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck::before {
  display: block;
  background: linear-gradient(90deg, var(--overview-r7-teal) 0 21%, var(--overview-r7-brass) 21% 38%, transparent 38% 100%);
  background-repeat: no-repeat;
  background-size: 100% 2px;
  opacity: .86;
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck::after {
  display: none;
}

html[data-theme="day"] body.owner-shell-v1 .overview-command-deck > .overview-context-strip {
  background: #edf2ed;
}

html[data-theme="day"] body.owner-shell-v1 [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  border-color: #c3cec9;
  border-top-color: var(--overview-r7-widget-accent);
  background-color: rgb(250 249 243 / 95%);
  box-shadow: 0 13px 28px rgb(37 70 67 / 7%);
}

html[data-theme="day"] body.owner-shell-v1 [data-overview-canvas-widget="reminders"] > .panel {
  border-left-color: var(--overview-r7-widget-accent);
}

html[data-theme="night"] body.owner-shell-v1 .overview-canvas-grid::before {
  background:
    linear-gradient(180deg, rgb(5 16 21 / 16%), rgb(5 16 21 / 54%)),
    repeating-linear-gradient(90deg, rgb(92 159 158 / 3%) 0 1px, transparent 1px 48px);
  opacity: 1;
}

html[data-theme="night"] body.owner-shell-v1 .overview-canvas-toolbar {
  border-color: #29464d;
  background: rgb(8 25 31 / 95%);
  box-shadow: 0 12px 28px rgb(0 5 8 / 24%);
  backdrop-filter: none;
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck {
  border-color: #315159 !important;
  border-left-color: var(--overview-r7-brass) !important;
  background: #0a1d23 !important;
  box-shadow: 0 28px 58px rgb(0 4 7 / 34%), inset 0 1px rgb(173 226 218 / 4%) !important;
  backdrop-filter: none !important;
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck::before {
  display: block;
  background:
    linear-gradient(90deg, var(--overview-r7-teal) 0 18%, var(--overview-r7-brass) 18% 34%, transparent 34% 100%),
    repeating-linear-gradient(90deg, transparent 0 47px, rgb(103 172 170 / 5%) 48px);
  background-repeat: no-repeat, repeat;
  background-size: 100% 2px, 48px 100%;
  opacity: .9;
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck::after {
  display: none;
}

html[data-theme="night"] body.owner-shell-v1 .overview-command-deck > .overview-context-strip {
  background: #071820;
}

html[data-theme="night"] body.owner-shell-v1 .overview-change-row::before {
  background: #0a1d23;
}

html[data-theme="night"] body.owner-shell-v1 [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  border-color: #29454d;
  border-top-color: var(--overview-r7-widget-accent);
  background-color: rgb(10 29 35 / 94%);
  box-shadow: 0 16px 34px rgb(0 4 7 / 26%);
  backdrop-filter: none;
}

html[data-theme="night"] body.owner-shell-v1 [data-overview-canvas-widget="reminders"] > .panel {
  border-left-color: var(--overview-r7-widget-accent);
}

@media (max-width: 1180px) {
  #moduleStage[data-active-view="overview"] .overview-command-deck {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "head"
      "work"
      "signals";
  }

  #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-context-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 1fr;
    border-top: 1px solid var(--overview-r7-line);
    border-left: 0;
  }

  #moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card {
    border-right: 1px solid var(--overview-r7-line);
    border-bottom: 0;
  }

  #moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card:last-child {
    border-right: 0;
  }
}

/* R7 mobile composition */
@media (max-width: 760px) {
  #moduleStage[data-active-view="overview"] .overview-canvas-toolbar {
    display: grid;
    grid-template-columns: 3px minmax(0, 1fr);
    gap: 10px;
    min-height: 44px;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  #moduleStage[data-active-view="overview"] .overview-canvas-toolbar::before {
    width: 3px;
  }

  #moduleStage[data-active-view="overview"] .overview-canvas-toolbar-title {
    gap: 6px 8px;
  }

  #moduleStage[data-active-view="overview"] .overview-canvas-toolbar-actions {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  #moduleStage[data-active-view="overview"] .overview-canvas-toolbar-actions .mini-action {
    min-width: 0;
    min-height: 36px;
    padding: 6px 4px;
    font-size: 12px;
    white-space: normal;
  }

  #moduleStage[data-active-view="overview"] .overview-canvas-kicker {
    width: 100%;
  }

  #moduleStage[data-active-view="overview"] .overview-canvas-grid {
    padding-bottom: 8px;
  }

  #moduleStage[data-active-view="overview"] .overview-command-deck {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "head"
        "work"
        "signals";
    overflow: hidden !important;
  }

  #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-home-head {
    display: block;
    min-height: 0;
    padding: 16px 15px 14px;
  }

  #moduleStage[data-active-view="overview"] .overview-home-head h3 {
    max-width: none;
    font-size: 19px;
  }

  #moduleStage[data-active-view="overview"] .overview-primary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 13px 0 0;
  }

  #moduleStage[data-active-view="overview"] .overview-primary-actions a {
    min-height: 36px;
    padding-inline: 5px;
  }

  #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-home-layout {
    display: block;
    padding: 0 15px 14px;
  }

  #moduleStage[data-active-view="overview"] .overview-focus-panel {
    padding: 13px 0 0;
  }

  #moduleStage[data-active-view="overview"] .overview-change-panel {
    margin-top: 13px;
    padding: 13px 0 0;
    border-top: 1px solid var(--overview-r7-line);
    border-left: 0;
  }

  #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-context-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(76px, auto));
    border-top: 1px solid var(--overview-r7-line);
    border-left: 0;
  }

  #moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card {
    min-height: 76px;
    padding: 12px 11px 11px 14px;
    border-right: 1px solid var(--overview-r7-line);
    border-bottom: 1px solid var(--overview-r7-line);
  }

  #moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card:nth-child(2n) {
    border-right: 0;
  }

  #moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  #moduleStage[data-active-view="overview"] .overview-context-strip .overview-signal-card strong {
    font-size: 22px;
  }

  #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) {
    gap: 10px;
  }

  #moduleStage[data-active-view="overview"] [data-overview-canvas-widget],
  #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel {
    overflow-x: clip;
  }

  #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
    flex-basis: auto;
    overflow-y: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel {
    transition: none;
  }
}


/* source: styles/module-canvas-v1.css */
/* MODULE CANVAS V1: one restrained layout language for every command-center module. */
.module-canvas-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin: 0 0 12px;
  padding: 8px 11px 8px 13px;
  border: 1px solid color-mix(in srgb, var(--product-line, #4a6870) 72%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--product-surface, #10242d) 84%, transparent);
  box-shadow: 0 10px 24px rgb(4 18 22 / 8%);
}

.module-canvas-toolbar-title,
.module-canvas-toolbar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.module-canvas-toolbar-title strong {
  color: var(--product-text, #d9e9e5);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.module-canvas-kicker,
.module-canvas-status {
  color: var(--product-muted, #82a29f);
  font: 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}

.module-canvas-status {
  padding-left: 9px;
  border-left: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  letter-spacing: .01em;
}

.module-canvas-status[data-status="editing"] { color: #d5ad68; }
.module-canvas-status[data-status="saved"] { color: #79c7ae; }
.module-canvas-status[data-status="error"] { color: #e29b87; }

.module-canvas-toolbar-actions .mini-action {
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--product-line, #4a6870) 72%, transparent);
  background: color-mix(in srgb, var(--product-surface, #10242d) 68%, transparent);
  color: var(--product-muted, #9bb6b1);
  font-size: 11px;
  white-space: nowrap;
}

.module-canvas-toolbar-actions .mini-action:hover:not(:disabled),
.module-canvas-toolbar-actions .mini-action:focus-visible {
  border-color: color-mix(in srgb, #d5ad68 72%, var(--product-line, #4a6870));
  color: #f0d49c;
}

.module-canvas-toolbar-actions .module-canvas-edit {
  border-color: color-mix(in srgb, #d5ad68 58%, var(--product-line, #4a6870));
  color: #e2bf7d;
}

.module-canvas-toolbar-actions .module-canvas-edit[aria-pressed="true"] {
  background: #c69d5c;
  color: #13252a;
}

.module-canvas-toolbar-actions .mini-action:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.module-canvas-grid {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  /* A row must stay pointer-sized; card content scrolls instead of silently
     expanding the track and defeating a user's shrink gesture. */
  grid-auto-rows: 84px !important;
  align-items: stretch;
  gap: 12px !important;
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
}

.module-canvas-grid::before {
  position: absolute;
  z-index: -1;
  inset: -5px 0 0;
  content: "";
  pointer-events: none;
  border-top: 1px solid color-mix(in srgb, var(--product-line, #4a6870) 36%, transparent);
  opacity: .56;
}

html[data-theme="night"] .module-canvas-toolbar {
  border-color: rgb(128 199 192 / 25%);
  background: rgb(9 25 32 / 84%);
  box-shadow: inset 0 1px rgb(255 255 255 / 3%), 0 14px 30px rgb(0 5 8 / 18%);
}

html[data-theme="night"] .module-canvas-grid::before {
  border-top-color: rgb(116 200 232 / 26%);
}

html[data-theme="day"] .module-canvas-toolbar {
  border-color: rgb(47 89 89 / 22%);
  background: rgb(250 252 247 / 88%);
  box-shadow: 0 10px 22px rgb(43 72 67 / 8%);
}

html[data-theme="day"] .module-canvas-toolbar-title strong { color: #23484a; }
html[data-theme="day"] .module-canvas-kicker,
html[data-theme="day"] .module-canvas-status { color: #6b8581; }
html[data-theme="day"] .module-canvas-toolbar-actions .mini-action {
  border-color: rgb(47 89 89 / 22%);
  color: #426668;
  background: rgb(255 255 255 / 68%);
}
html[data-theme="day"] .module-canvas-toolbar-actions .module-canvas-edit {
  border-color: rgb(153 113 47 / 50%);
  color: #87631f;
}

.module-canvas-widget {
  position: relative;
  display: flex;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  transition: opacity .2s ease, transform .2s ease;
}

.module-canvas-widget > .panel,
.module-canvas-widget > [data-ai-pane],
.module-canvas-widget > [data-module-canvas-block] {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (min-width: 761px) {
  /* The canvas owns its direct card's scroll boundary, not the later theme
     decoration rules that make ordinary panels overflow visibly. */
  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view]:not([data-active-view="ai-workbench"]) .module-canvas-widget > :is(.panel, [data-module-canvas-block]) {
    box-sizing: border-box;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
  }
}

.ai-workbench__columns.module-canvas-grid > .module-canvas-widget:not(:first-child) > [data-ai-pane] {
  border-left: 1px solid var(--cc-line, #d9e0dc);
}

body.owner-shell-v1:not(.auth-required) .ai-workbench__columns.module-canvas-grid > .module-canvas-widget:not(:first-child) > [data-ai-pane] {
  background: rgb(255 255 252 / 34%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .ai-workbench__columns.module-canvas-grid > .module-canvas-widget:not(:first-child) > [data-ai-pane] {
  border-left-color: rgb(130 184 175 / 17%);
  background: rgb(17 35 36 / 54%);
}

.module-canvas-widget.is-dragging,
.module-canvas-widget.is-resizing {
  z-index: 10;
  opacity: .92;
}

.module-canvas-grid.is-editing {
  padding-bottom: 50vh !important;
  outline: 1px solid color-mix(in srgb, #8bcfc1 42%, transparent);
  outline-offset: 7px;
  background-image:
    repeating-linear-gradient(90deg, rgb(112 196 182 / 8%) 0 1px, transparent 1px 8.333%),
    repeating-linear-gradient(0deg, rgb(112 196 182 / 7%) 0 1px, transparent 1px 84px);
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .module-canvas-grid.is-editing .module-canvas-widget > :is(.panel, [data-module-canvas-block]) {
  box-sizing: border-box;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
}

.module-canvas-grid.is-editing .module-canvas-widget > .panel,
.module-canvas-grid.is-editing .module-canvas-widget > [data-ai-pane],
.module-canvas-grid.is-editing .module-canvas-widget > [data-module-canvas-block] {
  border-style: dashed;
  border-color: color-mix(in srgb, #8bcfc1 60%, var(--product-line, #4a6870));
}

.module-canvas-widget.is-selected > .panel,
.module-canvas-widget.is-selected > [data-ai-pane],
.module-canvas-widget.is-selected > [data-module-canvas-block] {
  border-color: #d5ad68;
  box-shadow: 0 0 0 2px rgb(213 173 104 / 18%), 0 16px 30px rgb(0 0 0 / 18%);
}

[data-module-canvas-drag-handle],
[data-module-canvas-resize-handle] {
  position: absolute;
  z-index: 4;
  display: none;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, #8bcfc1 54%, transparent);
  color: #9fd2c5;
  background: rgb(8 29 36 / 90%);
}

.module-canvas-grid.is-editing [data-module-canvas-drag-handle],
.module-canvas-grid.is-editing [data-module-canvas-resize-handle] { display: block; }

[data-module-canvas-drag-handle] {
  touch-action: none;
  user-select: none;
  top: 7px;
  right: 32px;
  width: 28px;
  height: 20px;
  font: 14px/12px ui-monospace, Consolas, monospace;
  letter-spacing: 2px;
  cursor: grab;
}

[data-module-canvas-drag-handle]:active { cursor: grabbing; }

[data-module-canvas-resize-handle] {
  right: 5px;
  bottom: 5px;
  width: 17px;
  height: 17px;
  border-top: 0;
  border-left: 0;
  cursor: nwse-resize;
  touch-action: none;
}

[data-module-canvas-resize-handle]::before,
[data-module-canvas-resize-handle]::after {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 1px;
  content: "";
  transform: rotate(-45deg);
  background: currentColor;
}

[data-module-canvas-resize-handle]::after { right: 2px; bottom: 7px; width: 5px; }

@media (max-width: 1180px) {
  .module-canvas-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .module-canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 9px 10px;
  }

  .module-canvas-toolbar-title {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .module-canvas-toolbar-actions { display: flex; flex-wrap: wrap; }

  .module-canvas-grid:not(.is-editing),
  html[data-theme="night"] .module-canvas-grid:not(.is-editing),
  html[data-theme="day"] .module-canvas-grid:not(.is-editing) {
    display: flex !important;
    flex-direction: column;
    gap: 10px !important;
    min-height: 0;
  }

  .module-canvas-grid:not(.is-editing) .module-canvas-widget,
  .module-canvas-grid:not(.is-editing) .module-canvas-widget > .panel:not(.items-v2__update-panel),
  .module-canvas-grid:not(.is-editing) .module-canvas-widget > [data-ai-pane],
  .module-canvas-grid:not(.is-editing) .module-canvas-widget > [data-module-canvas-block]:not(.items-v2__update-panel) {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
  }

  .module-canvas-grid:not(.is-editing) .module-canvas-widget > .panel:not(.items-v2__update-panel),
  .module-canvas-grid:not(.is-editing) .module-canvas-widget > [data-ai-pane],
  .module-canvas-grid:not(.is-editing) .module-canvas-widget > [data-module-canvas-block]:not(.items-v2__update-panel) { overflow: visible; }

  .ai-workbench__columns.module-canvas-grid > .module-canvas-widget:not(:first-child) > [data-ai-pane] {
    border-left: 0;
  }

  .module-canvas-grid.is-editing [data-module-canvas-resize-handle] { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .module-canvas-toolbar,
  .module-canvas-widget { transition: none; }
}


/* source: styles/art-system-r8.css */
/* PERSONAL HUB ART SYSTEM R8: reversible visual boundary for shell, work surfaces and auth. */
body.owner-shell-v1 {
  --r8-brass: #b48645;
  --r8-coral: #bf665a;
  --r8-cyan: #357f91;
  --r8-focus: #146f78;
  --r8-radius: 4px;
  --r8-surface-primary: rgb(255 255 252 / 94%);
  --r8-surface-secondary: rgb(238 243 240 / 92%);
  --r8-surface-elevated: #fffefa;
  --r8-line: rgb(43 82 78 / 21%);
  --r8-line-strong: rgb(43 82 78 / 34%);
  --r8-shadow-rest: 0 1px 0 rgb(255 255 255 / 88%), 0 10px 26px rgb(27 61 57 / 9%), 0 2px 7px rgb(27 61 57 / 6%);
  --r8-shadow-hover: 0 1px 0 rgb(255 255 255 / 92%), 0 16px 34px rgb(27 61 57 / 13%), 0 4px 10px rgb(27 61 57 / 7%);
}

html[data-theme="night"] body.owner-shell-v1 {
  --r8-brass: #d5ad68;
  --r8-coral: #df7d6c;
  --r8-cyan: #72b7c4;
  --r8-focus: #8adbd4;
  --r8-surface-primary: rgb(9 27 34 / 94%);
  --r8-surface-secondary: rgb(14 37 43 / 94%);
  --r8-surface-elevated: #102b32;
  --r8-line: rgb(126 196 189 / 20%);
  --r8-line-strong: rgb(126 196 189 / 34%);
  --r8-shadow-rest: inset 0 1px rgb(255 255 255 / 3%), 0 12px 28px rgb(0 5 8 / 28%), 0 3px 8px rgb(0 5 8 / 18%);
  --r8-shadow-hover: inset 0 1px rgb(255 255 255 / 4%), 0 18px 38px rgb(0 5 8 / 38%), 0 5px 12px rgb(0 5 8 / 24%);
}

body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar) {
  border-color: var(--r8-line);
  border-radius: var(--r8-radius);
  background: var(--r8-surface-primary);
  box-shadow: var(--r8-shadow-rest);
  backdrop-filter: blur(15px) saturate(112%);
  -webkit-backdrop-filter: blur(15px) saturate(112%);
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
  min-height: 48px;
  border-left: 3px solid color-mix(in srgb, var(--cc-accent) 76%, var(--r8-brass));
}

body.owner-shell-v1:not(.auth-required) .module-canvas-kicker,
body.owner-shell-v1:not(.auth-required) .formal-route-code,
body.owner-shell-v1:not(.auth-required) .cc-profile__eyebrow {
  color: color-mix(in srgb, var(--cc-accent) 68%, var(--cc-ink-soft));
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-widget > :is(.panel, [data-ai-pane], [data-module-canvas-block]),
body.owner-shell-v1:not(.auth-required) .grid > .panel {
  border-color: var(--r8-line);
  border-radius: var(--r8-radius);
  box-shadow: var(--r8-shadow-rest);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .module-canvas-widget > :is(.panel, [data-ai-pane], [data-module-canvas-block]) {
  background-color: var(--r8-surface-primary);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .module-canvas-widget > :is(.panel, [data-ai-pane], [data-module-canvas-block]) {
  background-color: var(--r8-surface-primary);
}

@media (hover: hover) {
  body.owner-shell-v1:not(.auth-required) .module-canvas-widget > :is(.panel, [data-ai-pane], [data-module-canvas-block]):hover {
    border-color: color-mix(in srgb, var(--cc-accent) 40%, var(--r8-line));
    box-shadow: var(--r8-shadow-hover);
  }
}

body.owner-shell-v1:not(.auth-required) :is(.mini-action, .hud-button, .tab, button) {
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) :is(.mini-action, .hud-button):focus-visible,
body.owner-shell-v1:not(.auth-required) .tab:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--cc-accent) 58%, transparent);
  outline-offset: 2px;
}

body.owner-shell-v1:not(.auth-required) .tab.active,
body.owner-shell-v1:not(.auth-required) .tab[aria-selected="true"] {
  box-shadow: inset 0 -2px 0 var(--r8-brass);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) :is(.kpi strong, .finance-kpi strong, .library-summary strong, .cc-profile__completion strong) {
  font-variant-numeric: tabular-nums;
  text-rendering: geometricPrecision;
}

body.owner-shell-v1:not(.auth-required) :is(input, select, textarea) {
  border-color: var(--r8-line-strong);
  border-radius: 3px;
  background: color-mix(in srgb, var(--r8-surface-elevated) 92%, transparent);
}

body.owner-shell-v1:not(.auth-required) :is(input, select, textarea):focus {
  border-color: var(--cc-accent);
  outline: 3px solid color-mix(in srgb, var(--cc-accent) 14%, transparent);
  outline-offset: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc-accent) 20%, transparent);
}

body.owner-shell-v1:not(.auth-required) :is(.library-empty-state, .library-group-empty, .knowledge-empty, .empty-state) {
  border-color: var(--r8-line);
  background: var(--r8-surface-secondary);
}

/* Authentication becomes one focused access composition. */
body.owner-shell-v1.auth-required .formal-workbench-intro {
  display: none;
}

body.owner-shell-v1.auth-required .workspace {
  position: relative;
  isolation: isolate;
  padding: 88px 48px 48px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.owner-shell-v1.auth-required .workspace::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
}

html[data-theme="day"] body.owner-shell-v1.auth-required .workspace {
  background-image: url("/static/command_center/assets/day-archive-r1.jpg");
}

html[data-theme="day"] body.owner-shell-v1.auth-required .workspace::before {
  background: rgb(229 237 232 / 72%);
  backdrop-filter: saturate(92%);
}

html[data-theme="night"] body.owner-shell-v1.auth-required .workspace {
  background-image: url("/static/command_center/assets/night-cosmos-r1.jpg");
}

html[data-theme="night"] body.owner-shell-v1.auth-required .workspace::before {
  background: rgb(3 12 17 / 30%);
}

body.owner-shell-v1.auth-required .module-stage {
  align-self: center;
}

body.owner-shell-v1.auth-required .login-required {
  width: min(1040px, 100%);
  min-height: 500px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--r8-line-strong);
  border-radius: 5px;
  background: var(--r8-surface-primary);
  box-shadow: 0 28px 72px rgb(5 21 24 / 26%), 0 6px 18px rgb(5 21 24 / 16%);
  backdrop-filter: blur(22px) saturate(114%);
  -webkit-backdrop-filter: blur(22px) saturate(114%);
}

body.owner-shell-v1.auth-required .login-required::before {
  display: none;
}

body.owner-shell-v1.auth-required .auth-grid {
  display: grid;
  min-height: 500px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 0;
}

body.owner-shell-v1.auth-required .auth-grid > .auth-intro {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: center;
  padding: 54px 58px;
  border-right: 1px solid var(--r8-line);
  background: color-mix(in srgb, var(--r8-surface-secondary) 64%, transparent);
}

body.owner-shell-v1.auth-required .auth-grid > .auth-intro::after {
  position: absolute;
  left: 58px;
  bottom: 42px;
  width: 84px;
  height: 3px;
  content: "";
  background: var(--r8-brass);
}

body.owner-shell-v1.auth-required .login-required .eyebrow {
  margin-bottom: 16px;
  color: var(--cc-accent);
  font-family: var(--formal-mono, Consolas, monospace);
  font-size: 10px;
}

body.owner-shell-v1.auth-required .login-required h3 {
  max-width: 430px;
  margin-bottom: 14px;
  font-family: var(--formal-serif, "Songti SC", SimSun, serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.22;
}

body.owner-shell-v1.auth-required .login-required p:not(.eyebrow) {
  max-width: 430px;
  font-size: 13px;
  line-height: 1.75;
}

body.owner-shell-v1.auth-required .login-required .list {
  margin-top: 30px;
  border-color: var(--r8-line);
}

body.owner-shell-v1.auth-required .login-required .list .row {
  border-color: var(--r8-line);
}

body.owner-shell-v1.auth-required .login-required .tag {
  border-color: var(--r8-line-strong);
  background: var(--r8-surface-secondary);
  color: var(--cc-ink-soft);
}

body.owner-shell-v1.auth-required .auth-stack {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 18px;
  padding: 44px 42px;
}

body.owner-shell-v1.auth-required .auth-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--r8-line);
  border-radius: 4px;
  background: var(--r8-surface-secondary);
}

body.owner-shell-v1.auth-required .auth-mode-switch button {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--cc-ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

body.owner-shell-v1.auth-required .auth-mode-switch button[aria-selected="true"] {
  background: var(--r8-surface-elevated);
  box-shadow: 0 4px 12px rgb(12 41 40 / 10%), inset 0 -2px 0 var(--r8-brass);
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required .auth-mode-switch button:focus-visible {
  outline: 2px solid var(--r8-focus);
  outline-offset: 2px;
}

body.owner-shell-v1.auth-required .auth-form[hidden],
body.owner-shell-v1.auth-required #authRegisterForm[hidden] {
  display: none !important;
}

body.owner-shell-v1.auth-required .auth-form {
  display: grid;
  gap: 14px;
}

body.owner-shell-v1.auth-required .auth-form label {
  gap: 7px;
  color: var(--cc-ink-soft);
  font-size: 11px;
}

body.owner-shell-v1.auth-required .auth-form input {
  min-height: 46px;
  border-color: var(--r8-line-strong);
  border-radius: 3px;
  background: color-mix(in srgb, var(--r8-surface-elevated) 88%, transparent);
  color: var(--cc-ink);
}

body.owner-shell-v1.auth-required .auth-form input:focus {
  border-color: var(--cc-accent);
  outline: 3px solid color-mix(in srgb, var(--cc-accent) 16%, transparent);
}

body.owner-shell-v1.auth-required .auth-form button[type="submit"] {
  min-height: 46px;
  border-color: color-mix(in srgb, var(--cc-accent) 82%, #102b2a);
  border-radius: 3px;
  background: var(--cc-accent);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--cc-accent) 22%, transparent);
  color: #fff;
  font-weight: 700;
}

body.owner-shell-v1.auth-required .auth-form button[type="submit"]:hover,
body.owner-shell-v1.auth-required .auth-form button[type="submit"]:focus-visible {
  background: var(--cc-accent-strong);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--cc-accent) 28%, transparent);
}

body.owner-shell-v1.auth-required .auth-message {
  min-height: 20px;
  color: var(--cc-ink-faint);
  font-size: 11px;
}

body.owner-shell-v1.auth-required .auth-message.error {
  color: var(--r8-coral);
}

@media (max-width: 760px) {
  body.owner-shell-v1.auth-required .workspace {
    padding: 78px 12px 24px;
  }

  body.owner-shell-v1.auth-required .login-required {
    width: 100%;
    min-height: 0;
  }

  body.owner-shell-v1.auth-required .auth-grid {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1.auth-required .auth-grid > .auth-intro {
    padding: 24px 22px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--r8-line);
  }

  body.owner-shell-v1.auth-required .auth-grid > .auth-intro::after,
  body.owner-shell-v1.auth-required .login-required .list,
  body.owner-shell-v1.auth-required .login-required .auth-intro p:not(.eyebrow) {
    display: none;
  }

  body.owner-shell-v1.auth-required .login-required .eyebrow {
    margin-bottom: 8px;
  }

  body.owner-shell-v1.auth-required .login-required h3 {
    margin: 0;
    font-size: 24px;
  }

  body.owner-shell-v1.auth-required .auth-stack {
    gap: 14px;
    padding: 20px 18px 22px;
  }

  body.owner-shell-v1:not(.auth-required) .module-canvas-widget > :is(.panel, [data-ai-pane], [data-module-canvas-block]) {
    box-shadow: 0 5px 16px rgb(18 48 45 / 9%);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1 *,
  body.owner-shell-v1 *::before,
  body.owner-shell-v1 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* source: styles/bulk-actions-r1.css */
.bulk-actions-r1 {
  grid-column: 1 / -1;
  margin: 0 0 12px;
  border: 1px solid color-mix(in srgb, var(--line, #34444f) 72%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel, #152128) 92%, transparent);
  box-shadow: 0 10px 30px rgb(0 0 0 / 12%);
}

.bulk-actions-r1__bar {
  min-height: 52px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-actions-r1__bar > strong {
  font-size: 14px;
  letter-spacing: 0;
}

.bulk-actions-r1__scope,
.bulk-actions-r1__selected {
  color: var(--muted, #9aabb4);
  font-size: 12px;
  letter-spacing: 0;
}

.bulk-actions-r1__selected {
  min-width: 88px;
  color: var(--text, #eef4f6);
  font-weight: 700;
}

.bulk-actions-r1 [data-bulk-operation="purge"] {
  border-color: #d95151;
  background: #b62f37;
  color: #fff;
  box-shadow: none;
}

.bulk-actions-r1 [data-bulk-operation="purge"]:hover:not(:disabled) {
  background: #cf3841;
}

.bulk-actions-r1 button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.bulk-actions-r1__notice {
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid color-mix(in srgb, var(--line, #34444f) 64%, transparent);
  color: var(--muted, #9aabb4);
  font-size: 12px;
  letter-spacing: 0;
}

.bulk-actions-r1__notice.is-success {
  color: #60c59b;
}

.bulk-actions-r1__notice.is-warning,
.bulk-actions-r1__notice.is-error {
  color: #f2b46d;
}

.bulk-actions-r1__selector {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  align-self: center;
  cursor: pointer;
  z-index: 2;
}

.bulk-actions-r1__selector input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bulk-actions-r1__selector span {
  width: 18px;
  height: 18px;
  display: block;
  border: 1px solid color-mix(in srgb, var(--muted, #9aabb4) 82%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--panel, #152128) 86%, transparent);
}

.bulk-actions-r1__selector input:checked + span {
  border-color: #34bda3;
  background: #168a79;
  box-shadow: inset 0 0 0 4px #168a79;
}

.bulk-actions-r1__selector input:checked + span::after {
  content: "";
  width: 8px;
  height: 4px;
  display: block;
  margin: 4px 0 0 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.bulk-actions-r1__selector input:focus-visible + span {
  outline: 2px solid #5cd6c1;
  outline-offset: 2px;
}

.bulk-actions-r1__record-shell {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: stretch;
  gap: 4px;
}

.bulk-actions-r1__record-shell > button {
  width: 100%;
  min-width: 0;
}

[data-items-v2="true"] .items-v2__item-summary.bulk-actions-r1__selection-host {
  grid-template-columns: 34px 18px minmax(0, 1fr);
}

.bulk-actions-r1__confirm {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line, #34444f) 82%, transparent);
  border-radius: 6px;
  background: var(--panel, #152128);
  color: var(--text, #eef4f6);
  box-shadow: 0 24px 70px rgb(0 0 0 / 38%);
}

.bulk-actions-r1__confirm::backdrop {
  background: rgb(3 8 11 / 68%);
}

.bulk-actions-r1__confirm form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.bulk-actions-r1__confirm header,
.bulk-actions-r1__confirm footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bulk-actions-r1__confirm header span,
.bulk-actions-r1__confirm p {
  color: var(--muted, #9aabb4);
  font-size: 13px;
  letter-spacing: 0;
}

.bulk-actions-r1__confirm p {
  margin: 0;
  line-height: 1.65;
}

.bulk-actions-r1__confirm.is-danger {
  border-color: #b93d46;
}

.bulk-actions-r1__confirm.is-danger header strong {
  color: #ff8e96;
}

[data-bulk-selector] + .reminder-v2-priority {
  margin-left: 0;
}

@media (max-width: 760px) {
  .bulk-actions-r1 {
    position: sticky;
    top: 0;
    z-index: 18;
    margin-bottom: 10px;
  }

  .bulk-actions-r1__bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .bulk-actions-r1__bar > strong,
  .bulk-actions-r1__scope,
  .bulk-actions-r1__selected,
  .bulk-actions-r1__notice {
    grid-column: 1 / -1;
  }

  .bulk-actions-r1__bar button {
    width: 100%;
    min-width: 0;
  }

  .bulk-actions-r1__record-shell {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .bulk-actions-r1__confirm footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bulk-actions-r1__confirm footer button {
    width: 100%;
    min-width: 0;
  }
}


/* source: styles/art-system-r9.css */
/* R9 art direction: preserve the proven dual-mode shell and deepen its material system. */

body.owner-shell-v1 {
  --r9-teal: #2f7773;
  --r9-teal-bright: #79c9bd;
  --r9-brass: #b48645;
  --r9-coral: #c96558;
  --r9-ocean: #367fa0;
  --r9-focus: #2b7e84;
  --r9-radius: 4px;
  --r9-day-glass: rgb(255 254 248 / 82%);
  --r9-day-glass-soft: rgb(239 244 239 / 76%);
  --r9-day-line: rgb(37 79 77 / 22%);
  --r9-day-line-strong: rgb(37 79 77 / 36%);
  --r9-night-glass: rgb(7 27 35 / 72%);
  --r9-night-glass-soft: rgb(12 40 47 / 66%);
  --r9-night-line: rgb(126 196 189 / 22%);
  --r9-night-line-strong: rgb(126 196 189 / 38%);
  --r9-shadow-day: 0 1px 0 rgb(255 255 255 / 80%), 0 14px 34px rgb(22 57 53 / 11%), 0 3px 9px rgb(22 57 53 / 7%);
  --r9-shadow-night: inset 0 1px rgb(255 255 255 / 4%), 0 18px 40px rgb(0 5 8 / 34%), 0 4px 12px rgb(0 5 8 / 22%);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) :is(button, input, select, textarea, .tab, .mini-action, .hud-button) {
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--r9-focus);
  outline-offset: 2px;
}

body.owner-shell-v1:not(.auth-required) :is(.panel, .module-tabs-shell, .module-canvas-toolbar, .command, .ai-panel) {
  border-radius: var(--r9-radius);
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
}

body.owner-shell-v1:not(.auth-required) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
) {
  min-height: 40px;
  border-radius: 3px;
}

/* Day is a light archival desk: photographic depth, translucent paper, quiet teal navigation. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) {
  --cc-canvas: #dfe8e3;
  --cc-surface: var(--r9-day-glass);
  --cc-surface-muted: var(--r9-day-glass-soft);
  --cc-surface-strong: rgb(255 254 249 / 91%);
  --cc-ink: #19363a;
  --cc-ink-soft: #5e7272;
  --cc-ink-faint: #7e918e;
  --cc-line: var(--r9-day-line);
  --cc-line-strong: var(--r9-day-line-strong);
  --cc-nav: rgb(225 234 229 / 91%);
  --cc-nav-hover: rgb(255 255 251 / 60%);
  --cc-nav-active: #1f5656;
  --cc-accent: var(--r9-teal);
  --cc-accent-strong: #194f50;
  --cc-accent-soft: rgb(215 233 226 / 86%);
  --cc-danger: var(--r9-coral);
  --cc-warning: var(--r9-brass);
  --r9-control-bg: linear-gradient(180deg, rgb(255 255 252 / 96%), rgb(247 249 244 / 90%));
  --r9-control-bg-hover: linear-gradient(180deg, rgb(255 255 254 / 100%), rgb(250 251 247 / 96%));
  --r9-control-edge: rgb(43 82 78 / 31%);
  --r9-control-label: #617975;
  --r9-control-placeholder: #91a29f;
  --r9-control-ring: rgb(47 119 115 / 16%);
  --r9-control-shadow: inset 0 1px 0 rgb(255 255 255 / 92%), inset 0 -1px 0 rgb(34 74 68 / 4%), 0 2px 5px rgb(28 61 57 / 5%);
  --r9-button-bg: linear-gradient(180deg, rgb(250 252 249 / 92%), rgb(231 239 235 / 88%));
  min-height: 100dvh;
  background-color: #dfe8e3;
  background-image:
    linear-gradient(115deg, rgb(232 239 234 / 58%) 0%, rgb(232 239 234 / 36%) 48%, rgb(214 226 220 / 48%) 100%),
    url("/static/command_center/assets/day-archive-r1.jpg");
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--cc-ink);
}

/* R9 overview art: visible archival patterns and a background that participates in the layout. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck {
  background: rgb(250 250 244 / 84%) !important;
  box-shadow: 0 26px 52px rgb(3 16 20 / 15%), inset 0 1px rgb(255 255 255 / 66%) !important;
  backdrop-filter: blur(20px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(108%) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck > .overview-home-head {
  border-bottom: 1px solid rgb(224 240 234 / 17%);
  background: linear-gradient(116deg, rgb(14 52 55 / 97%), rgb(27 82 79 / 92%));
  color: #f5faf6;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-home-head :is(h3, p, span, small) {
  color: inherit;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-primary-actions a {
  border-color: rgb(232 245 239 / 22%);
  background: rgb(255 255 255 / 8%);
  color: #f4faf6;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck > .overview-context-strip {
  background: rgb(237 242 237 / 72%);
  backdrop-filter: blur(18px) saturate(106%);
  -webkit-backdrop-filter: blur(18px) saturate(106%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  position: relative;
  overflow: hidden;
  border-color: rgb(74 108 102 / 30%);
  border-top-color: var(--overview-r7-widget-accent);
  background-color: rgb(250 249 243 / 78%);
  background-image: linear-gradient(112deg, rgb(255 255 251 / 20%), transparent 54%);
  box-shadow: inset 0 1px rgb(255 255 255 / 72%), 0 15px 31px rgb(37 70 67 / 10%);
  backdrop-filter: blur(18px) saturate(106%);
  -webkit-backdrop-filter: blur(18px) saturate(106%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel::after,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 58px;
  height: 24px;
  border-left: 1px solid color-mix(in srgb, var(--overview-r7-widget-accent) 30%, transparent);
  background: radial-gradient(ellipse 44px 20px at 100% 0, transparent 68%, color-mix(in srgb, var(--overview-r7-widget-accent) 24%, transparent) 69% 71%, transparent 72%);
  pointer-events: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-canvas-grid::before {
  background: linear-gradient(90deg, rgb(246 246 239 / 48%), rgb(228 237 232 / 18%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck {
  background: rgb(5 25 32 / 70%) !important;
  box-shadow: 0 28px 58px rgb(0 4 7 / 31%), inset 0 1px rgb(173 226 218 / 5%) !important;
  backdrop-filter: blur(18px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(115%) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck > .overview-home-head {
  background: linear-gradient(116deg, rgb(5 25 32 / 82%), rgb(18 62 65 / 68%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck > .overview-context-strip {
  background: rgb(4 21 28 / 62%);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  position: relative;
  overflow: hidden;
  border-color: rgb(126 196 189 / 25%);
  border-top-color: var(--overview-r7-widget-accent);
  background-color: rgb(5 27 34 / 66%);
  background-image: linear-gradient(112deg, rgb(110 196 183 / 3%), transparent 54%);
  box-shadow: inset 0 1px rgb(226 255 249 / 5%), 0 18px 38px rgb(0 4 7 / 25%);
  backdrop-filter: blur(17px) saturate(114%);
  -webkit-backdrop-filter: blur(17px) saturate(114%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-canvas-toolbar {
  background: rgb(5 25 32 / 70%);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
    background-color: rgb(250 249 243 / 72%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
    background-color: rgb(5 27 34 / 61%);
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .library-owner-v1 .library-entity-workspace .vault-library-list-panel {
    min-height: 0 !important;
    height: auto !important;
    max-height: min(68vh, 760px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) :is(.shell, .main) {
  background: transparent;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
  background-color: rgb(222 232 227 / 34%);
  background-image:
    linear-gradient(rgb(37 86 83 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(37 86 83 / 4%) 1px, transparent 1px);
  background-size: 48px 48px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
  border-color: rgb(39 78 75 / 22%);
  background:
    linear-gradient(180deg, rgb(255 255 251 / 76%), rgb(225 235 230 / 83%)),
    url("/static/command_center/assets/day-archive-r1.jpg") left center / auto 100% no-repeat;
  box-shadow: inset -1px 0 rgb(255 255 255 / 76%), 12px 0 34px rgb(24 62 59 / 10%);
  backdrop-filter: blur(22px) saturate(104%);
  -webkit-backdrop-filter: blur(22px) saturate(104%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar {
  border-color: var(--r9-day-line);
  background: rgb(252 252 247 / 82%);
  box-shadow: 0 10px 28px rgb(22 57 53 / 9%);
  backdrop-filter: blur(22px) saturate(108%);
  -webkit-backdrop-filter: blur(22px) saturate(108%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .command {
  border-color: var(--r9-day-line-strong);
  background: rgb(255 255 251 / 70%);
  box-shadow: inset 3px 0 rgb(180 134 69 / 66%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar, .panel) {
  border-color: var(--r9-day-line);
  background: var(--r9-day-glass);
  box-shadow: var(--r9-shadow-day);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
  border-left: 3px solid color-mix(in srgb, var(--r9-teal) 72%, var(--r9-brass));
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item[aria-current="page"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item.active {
  border-color: rgb(31 86 86 / 34%);
  background: #1f5656;
  box-shadow: inset 3px 0 var(--r9-brass), 0 8px 18px rgb(24 68 66 / 14%);
  color: #fffdf7;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  min-height: 150px;
  padding: 22px 28px;
  border-color: rgb(39 80 78 / 24%);
  background-color: rgb(247 247 240 / 62%);
  background-image:
      linear-gradient(96deg, rgb(248 248 241 / 98%) 0%, rgb(248 248 241 / 98%) 38%, rgb(248 248 241 / 90%) 54%, rgb(248 248 241 / 70%) 68%, rgb(248 248 241 / 40%) 82%, rgb(248 248 241 / 12%) 94%, transparent 100%),
    url("/static/command_center/assets/day-archive-r1.jpg");
  box-shadow: var(--r9-shadow-day);
  backdrop-filter: blur(5px) saturate(106%);
  -webkit-backdrop-filter: blur(5px) saturate(106%);
}

/* Night returns to the proven command deck: horizontal icon rail, visible cosmos, signal console. */
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
  --cc-canvas: #061118;
  --cc-surface: var(--r9-night-glass);
  --cc-surface-muted: var(--r9-night-glass-soft);
  --cc-surface-strong: rgb(12 40 48 / 86%);
  --cc-ink: #dce9e3;
  --cc-ink-soft: #86a3a0;
  --cc-ink-faint: #668483;
  --cc-line: var(--r9-night-line);
  --cc-line-strong: var(--r9-night-line-strong);
  --cc-nav: rgb(5 18 24 / 86%);
  --cc-nav-hover: rgb(24 62 67 / 54%);
  --cc-nav-active: rgb(31 78 81 / 76%);
  --cc-accent: var(--r9-teal-bright);
  --cc-accent-strong: #a8e4d8;
  --cc-accent-soft: rgb(23 65 67 / 64%);
  --cc-danger: #e18172;
  --cc-warning: #d8b16d;
  --r9-control-bg: linear-gradient(180deg, rgb(13 42 49 / 84%), rgb(5 25 32 / 74%));
  --r9-control-bg-hover: linear-gradient(180deg, rgb(18 51 58 / 92%), rgb(8 31 38 / 86%));
  --r9-control-edge: rgb(126 196 189 / 30%);
  --r9-control-label: #88aaa5;
  --r9-control-placeholder: #607f7d;
  --r9-control-ring: rgb(121 201 189 / 18%);
  --r9-control-shadow: inset 0 1px 0 rgb(226 255 249 / 7%), inset 0 -1px 0 rgb(0 0 0 / 22%), 0 5px 14px rgb(0 5 8 / 13%);
  --r9-button-bg: linear-gradient(180deg, rgb(20 53 60 / 82%), rgb(7 29 36 / 76%));
  min-height: 100dvh;
  background-color: #061118;
  background-image:
    linear-gradient(180deg, rgb(2 9 14 / 10%) 0%, rgb(2 9 14 / 26%) 50%, rgb(2 9 14 / 57%) 100%),
    url("/static/command_center/assets/night-cosmos-r1.jpg");
  background-attachment: fixed;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--cc-ink);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(.shell, .main) {
  background: transparent;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace {
  background-color: rgb(2 12 18 / 14%);
  background-image: none;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .sidebar {
  border-color: var(--r9-night-line);
  background: linear-gradient(90deg, rgb(4 15 22 / 90%), rgb(7 28 34 / 82%) 58%, rgb(4 15 22 / 88%));
  box-shadow: 0 14px 38px rgb(0 5 8 / 34%);
  backdrop-filter: blur(22px) saturate(114%);
  -webkit-backdrop-filter: blur(22px) saturate(114%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:hover,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item:focus-visible {
  border-color: rgb(126 196 189 / 30%);
  background: rgb(29 72 76 / 54%);
  color: #e2eee8;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item[aria-current="page"],
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item.active {
  border-color: rgb(126 196 189 / 38%);
  background: rgb(31 78 81 / 76%);
  box-shadow: inset 0 -2px var(--r9-brass), 0 8px 20px rgb(0 5 8 / 18%);
  color: #f2f7f3;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__icon {
  color: #83a9a6;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
  border-color: var(--r9-night-line);
  background: rgb(5 18 25 / 72%);
  box-shadow: 0 12px 34px rgb(0 5 8 / 28%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .command {
  border-color: var(--r9-night-line-strong);
  background: rgb(12 40 47 / 62%);
  box-shadow: inset 3px 0 rgb(212 173 103 / 72%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status {
  border-color: var(--r9-night-line);
  background: linear-gradient(180deg, rgb(5 19 26 / 76%), rgb(3 13 19 / 86%));
  box-shadow: -16px 0 42px rgb(0 4 7 / 30%);
  backdrop-filter: blur(24px) saturate(112%);
  -webkit-backdrop-filter: blur(24px) saturate(112%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar, .panel) {
  border-color: var(--r9-night-line);
  background: var(--r9-night-glass);
  box-shadow: var(--r9-shadow-night);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
  border-left: 3px solid color-mix(in srgb, var(--r9-teal-bright) 68%, var(--r9-brass));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  min-height: 150px;
  padding: 22px 28px;
  border-color: var(--r9-night-line);
  border-left-color: var(--r9-brass);
  background: linear-gradient(100deg, rgb(5 22 29 / 54%), rgb(8 32 39 / 34%) 57%, rgb(4 17 24 / 16%));
  box-shadow: 0 24px 52px rgb(0 4 7 / 34%), inset 0 1px rgb(180 231 220 / 7%);
  backdrop-filter: blur(5px) saturate(110%);
  -webkit-backdrop-filter: blur(5px) saturate(110%);
}

body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
  max-width: 760px;
  font-size: 33px;
  line-height: 1.12;
}

body.owner-shell-v1:not(.auth-required) .formal-intro-meta i,
body.owner-shell-v1:not(.auth-required) .formal-intro-meta small {
  display: none;
}

/* Shared work surfaces keep hierarchy without turning every section into an opaque card. */
body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  min-height: 46px;
}

body.owner-shell-v1:not(.auth-required) .tabs {
  min-height: 44px;
  align-items: stretch;
  gap: 2px;
  padding-inline: 5px;
}

body.owner-shell-v1:not(.auth-required) .tab {
  min-height: 40px;
  padding-inline: 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 2px 2px 0 0;
  background: transparent;
  color: var(--cc-ink-soft);
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) .tab:hover,
body.owner-shell-v1:not(.auth-required) .tab:focus-visible {
  background: color-mix(in srgb, var(--cc-surface-muted) 76%, transparent);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .tab.active,
body.owner-shell-v1:not(.auth-required) .tab[aria-selected="true"] {
  border-bottom-color: var(--r9-brass);
  background: color-mix(in srgb, var(--cc-accent-soft) 78%, transparent);
  color: var(--cc-ink);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
  min-height: 48px;
  padding: 7px 11px;
}

body.owner-shell-v1:not(.auth-required) .formal-route-code,
body.owner-shell-v1:not(.auth-required) .formal-intro-eyebrow,
body.owner-shell-v1:not(.auth-required) .formal-intro-copy > p,
body.owner-shell-v1:not(.auth-required) .formal-archive-caption,
body.owner-shell-v1:not(.auth-required) .module-canvas-kicker,
body.owner-shell-v1:not(.auth-required) .module-canvas-status[data-status="ready"] {
  display: none;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) :is(
  .brand small,
  .formal-rail-index,
  .formal-archive-caption,
  .topbar .title p
) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-title {
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-status:not([data-status="ready"]) {
  padding-left: 8px;
  border-left: 1px solid var(--cc-line-strong);
  color: var(--cc-warning);
  font-size: 10px;
  font-weight: 700;
}

/* Knowledge already exposes counts in its metric rail; remove duplicated narration. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .knowledge-v2__atlas-head > div > span,
  .knowledge-v2__atlas-meta > p,
  .knowledge-v2__section-head > div > span,
  .knowledge-v2__browser-head > span,
  .knowledge-v2__cadence-head > span
) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions .mini-action {
  min-height: 34px;
  border-radius: 3px;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 48%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-toolbar-actions .mini-action {
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-toolbar-actions .mini-action:last-child {
  border-right: 0;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #pinnedNav {
  gap: 0;
  border-top: 1px solid var(--cc-line);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #pinnedNav a {
  min-height: 33px;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #pinnedNav a:hover,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #pinnedNav a:focus-visible {
  background: var(--cc-nav-hover);
  color: var(--cc-nav-active);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .pin-button {
  border-color: var(--cc-line);
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) :is(.module-canvas-widget > .panel, #moduleStage > .panel, #moduleStage .panel) {
  border-color: var(--cc-line);
  border-radius: var(--r9-radius);
  background: var(--cc-surface);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

@media (hover: hover) {
  body.owner-shell-v1:not(.auth-required) :is(.module-canvas-widget > .panel, #moduleStage .panel):hover {
    border-color: var(--cc-line-strong);
  }
}

body.owner-shell-v1:not(.auth-required) :is(.module-canvas-widget > .panel, #moduleStage .panel).tab-focus {
  border-color: var(--r9-ocean);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--r9-ocean) 18%, transparent), var(--r9-shadow-day);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(.module-canvas-widget > .panel, #moduleStage .panel).tab-focus {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--r9-teal-bright) 18%, transparent), var(--r9-shadow-night);
}

body.owner-shell-v1:not(.auth-required) :is(.hud-button, .mini-action, .status-button, .ai-fab, [data-theme-mode-toggle], .owner-global-search-trigger) {
  min-height: 38px;
  border-radius: 3px;
}

/* R9 control language: layered labels, quiet material inputs and explicit actions. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
) {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--r9-control-edge);
  border-radius: 4px;
  outline: 0;
  background: var(--r9-control-bg);
  color: var(--cc-ink);
  box-shadow: var(--r9-control-shadow);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) #moduleStage textarea {
  min-height: 92px;
  line-height: 1.55;
  resize: vertical;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
):hover {
  border-color: color-mix(in srgb, var(--r9-control-edge) 62%, var(--cc-accent));
  background: var(--r9-control-bg-hover);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
):focus {
  border-color: var(--cc-accent);
  background: var(--r9-control-bg-hover);
  box-shadow: 0 0 0 3px var(--r9-control-ring), var(--r9-control-shadow);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, textarea)::placeholder {
  color: var(--r9-control-placeholder);
  opacity: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, select, textarea):disabled,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, textarea)[readonly] {
  border-color: color-mix(in srgb, var(--r9-control-edge) 62%, transparent);
  background: color-mix(in srgb, var(--cc-surface-muted) 64%, transparent);
  color: var(--cc-ink-faint);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .76;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.field, .cc-profile__field):has(> :is(input, select, textarea)) {
  min-width: 0;
  min-height: 0;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .field > small,
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__field > span:first-child {
  margin: 0 0 0 1px;
  color: var(--r9-control-label);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  transition: color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.field, .cc-profile__field):focus-within > :is(small, span:first-child) {
  color: var(--cc-accent-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button) {
  border: 1px solid var(--r9-control-edge);
  background: var(--r9-button-bg);
  color: var(--cc-ink-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%), 0 2px 6px rgb(19 53 48 / 6%);
  font-weight: 700;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button):hover {
  transform: translateY(-1px);
  border-color: var(--cc-accent);
  background: var(--r9-control-bg-hover);
  color: var(--cc-accent-strong);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 6px 14px rgb(19 53 48 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button):active {
  transform: translateY(0);
  box-shadow: inset 0 2px 5px rgb(6 37 34 / 16%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button.primary, .mini-action.primary, .status-button.primary) {
  border-color: color-mix(in srgb, var(--r9-teal) 76%, white);
  background: linear-gradient(135deg, #267c78, #1d5963);
  color: #f4fffd;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 7px 16px rgb(19 82 78 / 16%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button.primary, .mini-action.primary, .status-button.primary):hover {
  border-color: color-mix(in srgb, var(--r9-teal-bright) 70%, white);
  background: linear-gradient(135deg, #2d8a84, #226978);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 9px 20px rgb(19 82 78 / 22%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button.danger, .mini-action.danger, .status-button.danger) {
  border-color: color-mix(in srgb, var(--cc-danger) 58%, transparent);
  background: color-mix(in srgb, var(--cc-danger) 11%, var(--cc-surface));
  color: var(--cc-danger);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group {
  border-color: var(--cc-line);
  background: color-mix(in srgb, var(--cc-surface) 72%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group[open] > summary {
  border-bottom: 1px solid var(--cc-line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc-accent-soft) 58%, transparent), transparent 62%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__fields {
  background: color-mix(in srgb, var(--cc-surface-muted) 50%, transparent);
}

/* Profile archive: compact masonry-like groups with readable field hierarchy. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields {
  margin-top: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head {
  min-height: 48px;
  align-items: center;
  padding: 9px 13px;
  border: 1px solid var(--cc-line);
  border-left: 3px solid var(--r9-teal);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 82%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head :is(.cc-profile__eyebrow, p) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head h3 {
  margin: 0;
  font-size: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head > strong {
  padding-left: 10px;
  border-left: 1px solid var(--cc-line);
  color: var(--cc-ink-soft);
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-groups {
  display: block;
  margin-top: 10px;
  border: 0;
  column-count: 2;
  column-gap: 12px;
  column-fill: balance;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin: 0 0 12px;
  padding: 0 13px 10px;
  break-inside: avoid;
  border: 1px solid var(--cc-line);
  border-left: 3px solid var(--r9-teal);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface) 91%, transparent);
  box-shadow: var(--r9-shadow-day);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(2n) {
  border-left: 3px solid var(--r9-ocean);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(3n) {
  border-left-color: var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(4n) {
  border-left-color: var(--r9-coral);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
  box-shadow: var(--r9-shadow-night);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group > header {
  min-height: 42px;
  border-bottom: 1px solid var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group h4 {
  color: var(--cc-ink);
  font-size: 14px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group > header span {
  color: var(--cc-ink-faint);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field {
  grid-template-columns: minmax(112px, .34fr) minmax(0, 1fr);
  gap: 14px;
  padding: 9px 2px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field + .cc-profile__view-field {
  border-top: 1px solid color-mix(in srgb, var(--cc-line) 72%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field dt {
  color: var(--cc-ink-faint);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field dd {
  color: var(--cc-ink);
  font-size: 13px;
  line-height: 1.65;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field:focus-within {
  background: color-mix(in srgb, var(--cc-accent-soft) 42%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__group summary small,
  .cc-profile__structure-entry p
) {
  display: none;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, select, textarea) {
  color-scheme: dark;
}

body.owner-shell-v1:not(.auth-required) :is(.kpi strong, .finance-kpi strong, .library-summary strong, .cc-profile__completion strong) {
  font-variant-numeric: tabular-nums;
  text-rendering: geometricPrecision;
}

body.owner-shell-v1.ai-open .ai-panel {
  border-left: 1px solid var(--cc-line-strong);
  border-radius: 0;
  box-shadow: -18px 0 46px rgb(0 5 8 / 28%);
}

@media (max-width: 1279px) and (min-width: 1024px) {
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
    background: rgb(5 18 25 / 82%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .status > :is(.dot, #workspaceStatus) {
    display: none;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount {
    flex: 0 0 96px;
    min-width: 96px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount .owner-global-search-trigger {
    width: 96px;
    min-width: 96px;
  }
}

@media (max-width: 1319px) and (min-width: 1024px) {
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .sidebar {
    gap: 10px;
    padding-inline: 12px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand {
    min-width: 150px;
    flex: 0 0 150px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .brand > div:last-child,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav {
    min-width: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav {
    overflow-x: clip;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav,
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__links {
    gap: 2px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__item {
    width: 44px;
    min-width: 44px;
    height: 50px;
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 3px 2px;
    font-size: 8px;
    line-height: 1;
    text-align: center;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__icon {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #primaryNav .cc-shell-nav__label {
    max-width: 100%;
    font-size: 8px;
    line-height: 1;
    text-align: center;
    text-overflow: clip;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .status > :is(.dot, #workspaceStatus) {
    display: none;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount {
    flex: 0 0 96px;
    min-width: 96px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount .owner-global-search-trigger {
    width: 96px;
    min-width: 96px;
  }
}

@media (max-width: 1119px) and (min-width: 1024px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .status > #clock {
    display: none;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount,
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount .owner-global-search-trigger {
    flex-basis: 88px;
    width: 88px;
    min-width: 88px;
  }
}

@media (max-width: 1023px) and (min-width: 761px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
    background: rgb(229 237 232 / 92%);
  }

  body.owner-shell-v1:not(.auth-required) .workspace {
    padding-inline: 14px;
  }
}

@media (max-width: 760px) {
  html[data-theme] body.owner-shell-v1:not(.auth-required) {
    background-attachment: scroll;
    background-position: center top;
  }

  body.owner-shell-v1:not(.auth-required) .workspace {
    gap: 7px;
    padding: 7px 9px var(--cc-mobile-content-bottom-clearance, 86px);
  }

  body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-copy h1 {
    margin-block: 0 4px;
    font-size: 23px;
    line-height: 1.08;
  }

  body.owner-shell-v1:not(.auth-required) .formal-intro-copy > p,
  body.owner-shell-v1:not(.auth-required) .formal-intro-meta {
    display: none;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .workspace {
    background-color: rgb(229 237 232 / 52%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .workspace {
    background-color: rgb(2 12 18 / 28%);
  }

  body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
    min-height: 40px;
    overflow: hidden;
  }

  body.owner-shell-v1:not(.auth-required) #moduleTabs {
    min-height: 38px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--cc-line-strong) transparent;
    scroll-snap-type: x proximity;
  }

  body.owner-shell-v1:not(.auth-required) .tabs {
    width: max-content;
    min-width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) .tab {
    min-height: 36px;
    min-width: 72px;
    padding-inline: 10px;
    font-size: 11px;
    scroll-margin-inline: 38px;
    scroll-snap-align: nearest;
  }

  body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
    min-height: 42px;
    padding-block: 5px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-groups {
    column-count: 1;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
    margin-bottom: 9px;
    padding-inline: 11px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding-block: 8px;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar, .panel) {
    background: rgb(255 254 249 / 88%);
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar, .panel) {
    background: rgb(7 27 35 / 84%);
  }

  body.owner-shell-v1:not(.auth-required) .cc-mobile-nav,
  body.owner-shell-v1:not(.auth-required) .cc-mobile-more {
    backdrop-filter: blur(22px) saturate(112%);
    -webkit-backdrop-filter: blur(22px) saturate(112%);
  }
}

/* R9 profile art pass: an open archive desk, not a white card stack. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas {
  gap: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas > [data-module-canvas-block] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 12px 28px rgb(20 52 49 / 9%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
  min-height: 176px;
  padding: 24px 26px;
  border: 1px solid rgb(17 62 63 / 76%);
  border-left: 4px solid var(--r9-brass);
  background: linear-gradient(118deg, rgb(14 52 55 / 98%), rgb(28 82 80 / 94%));
  color: #f4f7f1;
  box-shadow: inset 0 1px rgb(255 255 255 / 10%), 0 16px 34px rgb(18 54 51 / 18%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block]::after {
  content: "";
  position: absolute;
  inset: auto 22px 19px auto;
  z-index: -1;
  width: 78px;
  height: 1px;
  background: var(--r9-brass);
  box-shadow: 0 -7px rgb(255 255 255 / 11%), 0 7px rgb(255 255 255 / 7%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head :is(.cc-profile__eyebrow, p) {
  color: rgb(221 235 228 / 72%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__eyebrow {
  margin-bottom: 10px;
  color: #d5b87d;
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head h3 {
  color: #fffef8;
  font-size: 25px;
  font-weight: 760;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion {
  width: 126px;
  min-width: 126px;
  min-height: 92px;
  border-left-color: rgb(213 184 125 / 78%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion strong {
  color: #e4c88c;
  font-size: 32px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion span {
  color: rgb(230 240 235 / 68%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] {
  border: 1px solid var(--cc-line-strong);
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 46%), 0 12px 28px rgb(20 52 49 / 8%);
  backdrop-filter: blur(22px) saturate(112%);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div {
  position: relative;
  min-height: 82px;
  padding: 17px 17px 15px;
  transition: background 150ms ease;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div:hover {
  background: color-mix(in srgb, var(--cc-accent-soft) 35%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div:hover::before {
  background: var(--r9-teal);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid span {
  color: var(--cc-ink-faint);
  font-size: 10px;
  font-weight: 750;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid strong {
  margin-top: 7px;
  color: var(--cc-ink);
  font-size: 14px;
  font-weight: 760;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry[data-module-canvas-block],
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-foot[data-module-canvas-block] {
  min-height: 142px;
  border: 1px solid var(--cc-line-strong);
  backdrop-filter: blur(22px) saturate(108%);
  -webkit-backdrop-filter: blur(22px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry[data-module-canvas-block] {
  border-left: 4px solid var(--r9-teal);
  background: linear-gradient(104deg, color-mix(in srgb, var(--r9-teal) 11%, var(--cc-surface-strong)), color-mix(in srgb, var(--cc-surface) 72%, transparent));
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-foot[data-module-canvas-block] {
  border-top: 1px solid var(--cc-line-strong);
  border-left: 4px solid var(--r9-brass);
  background: linear-gradient(104deg, color-mix(in srgb, var(--r9-brass) 9%, var(--cc-surface-strong)), color-mix(in srgb, var(--cc-surface) 72%, transparent));
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry .cc-profile__eyebrow,
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-foot > div > span {
  margin-bottom: 8px;
  color: var(--cc-ink-faint);
  font-size: 10px;
  font-weight: 750;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry .hud-button {
  min-height: 42px;
  padding-inline: 16px;
  border-color: color-mix(in srgb, var(--r9-teal) 66%, transparent);
  background: #1c5d5c;
  color: #f4fffb;
  box-shadow: inset 0 1px rgb(255 255 255 / 15%), 0 9px 20px rgb(22 82 79 / 17%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__missing {
  gap: 5px 12px;
  margin-top: 2px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__missing span {
  position: relative;
  padding: 2px 0 2px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cc-ink-soft);
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__missing span::before {
  content: "";
  position: absolute;
  inset: 8px auto auto 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-foot .hud-button {
  align-self: stretch;
  min-height: 38px;
  border: 0;
  border-top: 1px solid var(--cc-line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cc-accent-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head {
  min-height: 54px;
  padding: 11px 15px;
  border: 1px solid rgb(17 62 63 / 72%);
  border-left: 4px solid var(--r9-brass);
  background: rgb(16 57 59 / 94%);
  box-shadow: inset 0 1px rgb(255 255 255 / 9%), 0 11px 24px rgb(17 55 53 / 13%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head h3 {
  color: #f7faf5;
  font-size: 15px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head > strong {
  border-left-color: rgb(233 244 238 / 18%);
  color: #ddc185;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-groups {
  margin-top: 10px;
  column-gap: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
  position: relative;
  margin-bottom: 10px;
  padding: 0 15px 11px;
  border: 1px solid var(--cc-line-strong);
  border-left: 1px solid var(--cc-line-strong);
  border-top: 3px solid var(--r9-teal);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 74%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 46%), 0 12px 26px rgb(20 52 49 / 10%);
  backdrop-filter: blur(22px) saturate(108%);
  -webkit-backdrop-filter: blur(22px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(2n) {
  border-left: 1px solid var(--cc-line-strong);
  border-top-color: var(--r9-ocean);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(3n) {
  border-left-color: var(--cc-line-strong);
  border-top-color: var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(4n) {
  border-left-color: var(--cc-line-strong);
  border-top-color: var(--r9-coral);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group > header {
  min-height: 46px;
  border-bottom-color: var(--cc-line-strong);
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc-accent-soft) 31%, transparent), transparent 68%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group h4 {
  font-size: 14px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group > header span {
  min-width: 26px;
  padding-left: 9px;
  border-left: 1px solid var(--cc-line);
  color: var(--cc-ink-faint);
  text-align: right;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field {
  grid-template-columns: minmax(118px, .33fr) minmax(0, 1fr);
  padding: 10px 4px;
  border-radius: 2px;
  transition: background 140ms ease;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field:focus-within {
  background: color-mix(in srgb, var(--cc-accent-soft) 29%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field dt {
  color: var(--cc-ink-faint);
  font-size: 10px;
  font-weight: 750;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field dd {
  color: var(--cc-ink);
  font-size: 13px;
  font-weight: 520;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile :is(input, select, textarea) {
  border-bottom-color: color-mix(in srgb, var(--cc-accent) 52%, var(--r9-control-edge));
  background: color-mix(in srgb, var(--r9-control-bg-hover) 88%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile :is(input, select, textarea):focus {
  box-shadow: inset 0 -2px var(--cc-accent), 0 0 0 3px var(--r9-control-ring), var(--r9-control-shadow);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
  border-color: rgb(121 201 189 / 28%);
  border-left-color: #d0a85f;
  background: linear-gradient(118deg, rgb(5 25 32 / 88%), rgb(16 58 63 / 78%));
  box-shadow: inset 0 1px rgb(216 255 247 / 7%), 0 18px 38px rgb(0 5 8 / 30%);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block],
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry[data-module-canvas-block],
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-foot[data-module-canvas-block],
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
  background: rgb(6 28 35 / 64%);
  box-shadow: inset 0 1px rgb(226 255 249 / 5%), 0 18px 36px rgb(0 5 8 / 26%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head {
  border-color: rgb(121 201 189 / 26%);
  border-left-color: #d0a85f;
  background: rgb(5 30 37 / 82%);
  box-shadow: inset 0 1px rgb(226 255 249 / 6%), 0 16px 34px rgb(0 5 8 / 28%);
  backdrop-filter: blur(20px) saturate(118%);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
}

@media (max-width: 900px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .bulk-actions-r1__bar {
    display: grid;
    min-height: 54px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
    padding: 7px 9px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .bulk-actions-r1__bar > .hud-button {
    min-height: 36px;
    padding-inline: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .bulk-actions-r1__bar .bulk-actions-r1__scope {
    min-width: 0;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas {
    gap: 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
    min-height: 138px;
    padding: 18px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head h3 {
    font-size: 21px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion {
    width: 86px;
    min-width: 86px;
    min-height: 70px;
    padding-left: 13px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion strong {
    font-size: 27px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div {
    min-height: 70px;
    padding: 13px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry[data-module-canvas-block],
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-foot[data-module-canvas-block] {
    min-height: 0;
    padding: 14px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-groups {
    column-count: 1;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field {
    grid-template-columns: minmax(88px, .31fr) minmax(0, 1fr);
    gap: 10px;
  }
}

/* R9 cross-module art pass: shared workbench material for knowledge, items and reminders. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .knowledge-v2__overview-panel,
  .task-workbench-panel.items-v2__overview
) {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .bulk-actions-r1__bar {
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 78%, transparent);
  border-left: 4px solid var(--r9-brass);
  border-radius: 4px;
  background: rgb(20 45 50 / 94%);
  box-shadow: inset 0 1px rgb(255 255 255 / 7%), 0 12px 26px rgb(13 43 41 / 13%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .bulk-actions-r1__bar :is(.bulk-actions-r1__scope, .bulk-actions-r1__selected) {
  color: rgb(230 240 235 / 68%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .bulk-actions-r1__bar > .hud-button {
  border-color: rgb(231 242 237 / 18%);
  background: rgb(255 255 255 / 8%);
  color: #f1f7f3;
  box-shadow: none;
}

/* Items: replace the large white sheet with an indexed inventory surface. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__header {
  min-height: 92px;
  align-items: center;
  padding: 17px 18px;
  border: 1px solid rgb(18 64 64 / 72%);
  border-left: 4px solid var(--r9-teal);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(112deg, rgb(15 57 59 / 96%), rgb(25 76 76 / 91%));
  box-shadow: inset 0 1px rgb(255 255 255 / 9%), 0 13px 28px rgb(18 55 52 / 15%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__header :is(h3, .items-v2__truth-line) {
  color: #f7faf5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__header p:not(.items-v2__truth-line) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__jumps {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgb(234 245 240 / 20%);
  border-radius: 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__jumps .mini-action {
  border: 0;
  border-right: 1px solid rgb(234 245 240 / 18%);
  border-radius: 0;
  background: rgb(255 255 255 / 7%);
  color: rgb(241 248 244 / 88%);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__jumps .mini-action:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__summary {
  margin-top: 0;
  border-color: var(--cc-line-strong);
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 45%), 0 12px 26px rgb(20 52 49 / 8%);
  backdrop-filter: blur(20px) saturate(108%);
  -webkit-backdrop-filter: blur(20px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__summary > div {
  min-height: 78px;
  padding: 14px 16px;
  border-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__summary > div:nth-child(1) {
  box-shadow: inset 0 3px var(--r9-teal);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__summary > div:nth-child(2) {
  box-shadow: inset 0 3px var(--r9-ocean);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__summary > div:nth-child(3) {
  box-shadow: inset 0 3px var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__workspace {
  margin-top: 10px;
  border: 1px solid var(--cc-line-strong);
  background: color-mix(in srgb, var(--cc-surface-strong) 70%, transparent);
  box-shadow: 0 12px 26px rgb(20 52 49 / 8%);
  backdrop-filter: blur(20px) saturate(106%);
  -webkit-backdrop-filter: blur(20px) saturate(106%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__workspace-section {
  padding: 15px 16px;
  border-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__workspace-section h4 {
  margin-bottom: 9px;
  color: var(--cc-ink-faint);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__overview > .items-v2__projection-note {
  display: none;
}

/* Reminders: a focused queue beside a quieter creation desk. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-overview {
  border: 1px solid var(--cc-line-strong);
  background: color-mix(in srgb, var(--cc-surface-strong) 71%, transparent);
  box-shadow: 0 16px 34px rgb(20 52 49 / 10%);
  backdrop-filter: blur(22px) saturate(108%);
  -webkit-backdrop-filter: blur(22px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-overview-head {
  padding: 15px 16px;
  border: 1px solid rgb(18 64 64 / 72%);
  border-left: 4px solid var(--r9-brass);
  border-radius: 4px;
  background: linear-gradient(112deg, rgb(15 57 59 / 96%), rgb(25 76 76 / 91%));
  box-shadow: inset 0 1px rgb(255 255 255 / 9%), 0 12px 26px rgb(18 55 52 / 14%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-overview-head h3 {
  color: #f7faf5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-overview-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-jumps {
  border-color: rgb(234 245 240 / 20%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-jump {
  border-right-color: rgb(234 245 240 / 18%);
  background: rgb(255 255 255 / 7%);
  color: rgb(241 248 244 / 88%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-search {
  padding: 12px;
  border: 1px solid var(--cc-line);
  border-left: 3px solid var(--r9-teal);
  background: color-mix(in srgb, var(--cc-surface-muted) 56%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-kpis {
  border-color: var(--cc-line-strong);
  background: color-mix(in srgb, var(--cc-surface-muted) 62%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-kpis .kpi {
  min-height: 58px;
  padding: 10px 12px;
  border-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-kpis .kpi:nth-child(1) {
  box-shadow: inset 0 3px var(--r9-teal);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-kpis .kpi:nth-child(2) {
  box-shadow: inset 0 3px var(--r9-coral);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-kpis .kpi:nth-child(3) {
  box-shadow: inset 0 3px var(--r9-ocean);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-kpis .kpi:nth-child(4) {
  box-shadow: inset 0 3px var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-notification-setting,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-create-disclosure {
  background: color-mix(in srgb, var(--r9-brass) 6%, var(--cc-surface-muted));
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-create-disclosure > summary {
  border: 1px solid var(--cc-line-strong);
  border-left: 3px solid var(--r9-brass);
  background: color-mix(in srgb, var(--cc-surface-strong) 72%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-create-disclosure > summary small {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-row {
  border-left: 3px solid var(--r9-brass);
  background: color-mix(in srgb, var(--cc-surface) 52%, transparent);
  transition: background 140ms ease, border-color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-row:hover {
  border-left-color: var(--r9-teal);
  background: color-mix(in srgb, var(--cc-accent-soft) 28%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-actions :is(button, summary) {
  border-radius: 2px;
  box-shadow: none;
}

/* Knowledge: continuous metric and atlas surfaces with quieter narration. */
body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__summary {
  border: 1px solid var(--cc-line-strong);
  background: color-mix(in srgb, var(--cc-surface-strong) 74%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 44%), 0 12px 26px rgb(20 52 49 / 8%);
  backdrop-filter: blur(20px) saturate(108%);
  -webkit-backdrop-filter: blur(20px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__metric {
  min-height: 78px;
  border-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__command-bar {
  min-height: 58px;
  border: 1px solid rgb(18 64 64 / 72%);
  border-left: 4px solid var(--r9-teal);
  background: rgb(17 57 60 / 94%) !important;
  box-shadow: inset 0 1px rgb(255 255 255 / 8%), 0 12px 26px rgb(18 55 52 / 13%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__command-context :is(strong, [data-lucide]) {
  color: #f4faf6;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__command-context small {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__command-actions .mini-action {
  border-color: rgb(234 245 240 / 18%);
  background: rgb(255 255 255 / 7%);
  color: rgb(241 248 244 / 88%);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__atlas {
  border: 1px solid var(--cc-line-strong);
  border-top: 3px solid var(--r9-ocean);
  background: color-mix(in srgb, var(--cc-surface-strong) 70%, transparent);
  box-shadow: 0 14px 30px rgb(20 52 49 / 9%);
  backdrop-filter: blur(20px) saturate(108%);
  -webkit-backdrop-filter: blur(20px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__atlas-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__atlas-grid > section {
  background: color-mix(in srgb, var(--cc-surface-muted) 34%, transparent);
}

/* Recycle: archival index surfaces keep empty panels intentional instead of flat. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] {
  --recycle-r9-surface: rgb(249 250 245 / 78%);
  --recycle-r9-surface-soft: rgb(237 244 239 / 64%);
  --recycle-r9-rule: rgb(38 83 78 / 7%);
  --recycle-r9-grid: rgb(38 83 78 / 4%);
  --recycle-r9-head: rgb(15 55 58 / 96%);
  --recycle-r9-head-end: rgb(27 80 78 / 92%);
  gap: 14px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] {
  --recycle-r9-surface: rgb(5 27 34 / 66%);
  --recycle-r9-surface-soft: rgb(9 40 46 / 54%);
  --recycle-r9-rule: rgb(128 200 190 / 8%);
  --recycle-r9-grid: rgb(128 200 190 / 5%);
  --recycle-r9-head: rgb(5 28 35 / 92%);
  --recycle-r9-head-end: rgb(14 59 63 / 84%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--cc-line-strong) 86%, transparent);
  background:
    linear-gradient(112deg, rgb(255 255 251 / 18%), transparent 48%),
    var(--recycle-r9-surface);
  box-shadow: inset 0 1px rgb(255 255 255 / 48%), 0 16px 34px rgb(15 50 46 / 11%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel {
  box-shadow: inset 0 1px rgb(220 255 247 / 6%), 0 18px 38px rgb(0 5 8 / 29%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: 92px;
  height: 92px;
  background:
    radial-gradient(ellipse 92px 44px at 100% 100%, transparent 69%, color-mix(in srgb, var(--r9-brass) 34%, transparent) 70% 71%, transparent 72%),
    radial-gradient(ellipse 54px 88px at 100% 100%, transparent 69%, color-mix(in srgb, var(--r9-brass) 22%, transparent) 70% 71%, transparent 72%);
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 0 100%);
  opacity: .42;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel > h3 {
  position: relative;
  overflow: hidden;
  margin: -16px -16px 14px;
  padding: 13px 78px 12px 18px;
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--recycle-r9-head), var(--recycle-r9-head-end));
  box-shadow: inset 4px 0 var(--r9-brass), inset 0 1px rgb(255 255 255 / 8%);
  color: #f4faf6;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel > h3::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 66px;
  height: 100%;
  border-left: 1px solid rgb(235 246 240 / 10%);
  background:
    radial-gradient(ellipse 66px 32px at 100% 0, transparent 68%, rgb(232 198 137 / 24%) 69% 71%, transparent 72%),
    radial-gradient(ellipse 38px 62px at 100% 0, transparent 68%, rgb(232 198 137 / 15%) 69% 71%, transparent 72%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) {
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-radius: 3px;
  background: var(--recycle-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi {
  min-height: 72px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:nth-child(4n + 1) {
  box-shadow: inset 0 3px var(--r9-ocean);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:nth-child(4n + 2) {
  box-shadow: inset 0 3px var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:nth-child(4n + 3) {
  box-shadow: inset 0 3px var(--r9-teal);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:nth-child(4n) {
  box-shadow: inset 0 3px var(--r9-coral);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .list {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 72%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--recycle-r9-surface-soft) 66%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .list > .row {
  min-height: 54px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--cc-line);
  border-left: 3px solid color-mix(in srgb, var(--r9-teal) 42%, transparent);
  border-radius: 0;
  background: rgb(255 255 255 / 4%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .list > .row:last-child {
  border-bottom: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .list > .row.muted-row {
  border-left-color: color-mix(in srgb, var(--r9-brass) 56%, transparent);
  background: color-mix(in srgb, var(--r9-brass) 5%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.tag, .mini-action) {
  border-radius: 2px;
}

@media (max-width: 900px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] {
    gap: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel::after {
    width: 58px;
    height: 58px;
    opacity: .28;
  }
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel > h3 {
    margin: -12px -12px 11px;
    padding: 12px 64px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) .kpi:not(:last-child) {
    border-bottom: 1px solid var(--cc-line);
  }
}

/* R10.5 scroll ownership: restore the canvas behavior hidden by ornamental clipping. */
@media (min-width: 761px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas > [data-module-canvas-block] {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .library-overview-column[data-module-canvas-block] {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .panel {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .panel > :is(h3, .kpis, .compact-kpis, .bulk-actions-r1__bar, .workbench-actions) {
    flex: 0 0 auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .panel > .list {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] :is(.overview-task-row, .overview-change-row),
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] :is(.overview-task-row, .overview-change-row) :is(strong, small) {
    overflow: visible;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] :is(.overview-task-row, .overview-change-row) :is(strong, small) {
    display: block;
    -webkit-line-clamp: unset;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget,
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > :is(.panel:not(.people-canvas-editor-panel):not(.items-v2__update-panel):not(.items-v2__list-panel), [data-ai-pane]:not(.items-v2__update-panel), [data-module-canvas-block]:not(.people-canvas-editor-panel):not(.items-v2__update-panel)),
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas > [data-module-canvas-block],
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .panel,
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .panel > .list,
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-command-deck {
    height: auto !important;
    max-height: none !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    scrollbar-gutter: auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__actions {
    position: static !important;
    bottom: auto !important;
    z-index: auto;
  }
}

/* R10.4 scroll containment: keep dense desktop cards complete without moving their actions. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel > :is(h3, .kpis, .compact-kpis, .stacked-kpis, .workbench-actions) {
  flex: 0 0 auto;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel > :is(.list, .bar-list),
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) .overview-finance-recent > .list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) .overview-finance-recent {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .module-canvas-widget > .panel,
  .module-canvas-widget > [data-ai-pane],
  .module-canvas-widget > [data-module-canvas-block],
  [data-overview-canvas-widget] > .panel > .list,
  [data-overview-canvas-widget] > .panel > .bar-list,
  [data-overview-canvas-widget] .overview-finance-recent > .list
) {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--r9-brass, #b68a45) 66%, var(--cc-ink-faint, #71817d)) color-mix(in srgb, var(--cc-surface-muted, #eef1ec) 56%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .module-canvas-widget > .panel,
  .module-canvas-widget > [data-ai-pane],
  .module-canvas-widget > [data-module-canvas-block],
  [data-overview-canvas-widget] > .panel > .list,
  [data-overview-canvas-widget] > .panel > .bar-list,
  [data-overview-canvas-widget] .overview-finance-recent > .list
)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .module-canvas-widget > .panel,
  .module-canvas-widget > [data-ai-pane],
  .module-canvas-widget > [data-module-canvas-block],
  [data-overview-canvas-widget] > .panel > .list,
  [data-overview-canvas-widget] > .panel > .bar-list,
  [data-overview-canvas-widget] .overview-finance-recent > .list
)::-webkit-scrollbar-track {
  border-radius: 2px;
  background: color-mix(in srgb, var(--cc-surface-muted, #eef1ec) 56%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .module-canvas-widget > .panel,
  .module-canvas-widget > [data-ai-pane],
  .module-canvas-widget > [data-module-canvas-block],
  [data-overview-canvas-widget] > .panel > .list,
  [data-overview-canvas-widget] > .panel > .bar-list,
  [data-overview-canvas-widget] .overview-finance-recent > .list
)::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid transparent;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--r9-brass, #b68a45) 72%, var(--cc-ink-faint, #71817d)),
    color-mix(in srgb, var(--cc-accent, #2f7774) 70%, var(--cc-ink-faint, #71817d))
  ) padding-box;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .module-canvas-widget > .panel,
  .module-canvas-widget > [data-ai-pane],
  .module-canvas-widget > [data-module-canvas-block],
  [data-overview-canvas-widget] > .panel > .list,
  [data-overview-canvas-widget] > .panel > .bar-list,
  [data-overview-canvas-widget] .overview-finance-recent > .list
)::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--cc-accent, #2f7774) 82%, var(--r9-brass, #b68a45)) padding-box;
}

@media (max-width: 760px) {
  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]),
  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
    height: auto !important;
    max-height: none !important;
  }

  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel > :is(.list, .bar-list),
  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) .overview-finance-recent,
  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) .overview-finance-recent > .list {
    max-height: none;
    flex-basis: auto;
    overflow-x: clip;
    overflow-y: visible;
    scrollbar-gutter: auto;
  }
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__summary,
  [data-items-v2="true"] .items-v2__workspace,
  [data-reminders-v2] .reminder-v2-overview,
  .knowledge-v2__summary,
  .knowledge-v2__atlas
) {
  background: rgb(6 28 35 / 62%);
  box-shadow: inset 0 1px rgb(226 255 249 / 5%), 0 18px 36px rgb(0 5 8 / 25%);
}

@media (max-width: 900px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__header {
    min-height: 0;
    align-items: stretch;
    padding: 14px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__jumps {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__jumps .mini-action {
    min-width: 0;
    padding-inline: 5px;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-items-v2="true"] .items-v2__jumps .mini-action:last-child:nth-child(odd) {
    grid-column: auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-overview-head {
    padding: 13px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-jumps {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-jump {
    min-width: 0;
    min-height: 34px;
    padding-inline: 5px;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-reminders-v2] .reminder-v2-feedback {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 11px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__command-bar {
    padding: 10px;
  }
}

/* R9.5 maturity pass: precision controls and a quieter archival hierarchy. */
body.owner-shell-v1:not(.auth-required) {
  --r95-surface-day: rgb(252 252 247 / 84%);
  --r95-surface-night: rgb(5 25 32 / 72%);
  --r95-hairline-day: rgb(39 78 73 / 18%);
  --r95-hairline-night: rgb(128 201 190 / 18%);
  --r95-engraving-day: rgb(36 78 72 / 4.5%);
  --r95-engraving-night: rgb(128 201 190 / 4.5%);
  --r95-button-ink: #f5fbf7;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) {
  --r95-surface: var(--r95-surface-day);
  --r95-hairline: var(--r95-hairline-day);
  --r95-engraving: var(--r95-engraving-day);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
  --r95-surface: var(--r95-surface-night);
  --r95-hairline: var(--r95-hairline-night);
  --r95-engraving: var(--r95-engraving-night);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
) {
  min-height: 43px;
  padding: 10px 12px;
  border-width: 1px;
  border-color: color-mix(in srgb, var(--r9-control-edge) 78%, transparent);
  border-bottom-color: color-mix(in srgb, var(--cc-accent) 52%, var(--r9-control-edge));
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 48%),
    var(--r9-control-bg);
  box-shadow: inset 0 1px rgb(255 255 255 / 34%), 0 1px 2px rgb(12 43 40 / 4%);
  font-size: 13px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
):hover {
  border-color: color-mix(in srgb, var(--cc-accent) 58%, var(--r9-control-edge));
  border-bottom-color: var(--cc-accent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
):focus {
  border-color: var(--cc-accent);
  background: var(--r9-control-bg-hover);
  box-shadow: inset 0 -2px var(--cc-accent), 0 0 0 3px var(--r9-control-ring), 0 6px 16px rgb(20 67 62 / 8%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
) {
  border-color: rgb(121 191 182 / 24%);
  border-bottom-color: rgb(121 201 189 / 46%);
  background:
    linear-gradient(180deg, rgb(203 250 240 / 4%), transparent 52%),
    rgb(4 23 30 / 66%);
  box-shadow: inset 0 1px rgb(218 255 248 / 5%), 0 3px 10px rgb(0 5 8 / 12%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
):focus {
  border-color: var(--r9-teal-bright);
  background: rgb(6 31 38 / 86%);
  box-shadow: inset 0 -2px var(--r9-teal-bright), 0 0 0 3px rgb(121 201 189 / 13%), 0 9px 22px rgb(0 5 8 / 23%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.field, .cc-profile__field) > :is(small, span:first-child),
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure label > span {
  color: var(--r9-control-label);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.3;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button) {
  min-height: 38px;
  gap: 7px;
  padding: 8px 13px;
  border-color: color-mix(in srgb, var(--r9-control-edge) 74%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--cc-surface-strong) 74%, transparent);
  color: var(--cc-ink-soft);
  box-shadow: inset 0 1px rgb(255 255 255 / 34%), 0 2px 6px rgb(17 52 48 / 5%);
  font-size: 12px;
  font-weight: 720;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button) :is(svg, [data-lucide]) {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke-width: 1.8;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button):hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--cc-accent) 72%, transparent);
  background: color-mix(in srgb, var(--cc-accent-soft) 52%, var(--cc-surface-strong));
  color: var(--cc-accent-strong);
  box-shadow: inset 0 1px rgb(255 255 255 / 32%), 0 7px 16px rgb(17 64 58 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button.primary, .mini-action.primary, .status-button.primary) {
  border-color: rgb(14 73 70 / 82%);
  background: linear-gradient(120deg, #1a6663, #174e59);
  color: var(--r95-button-ink);
  box-shadow: inset 3px 0 var(--r9-brass), inset 0 1px rgb(255 255 255 / 14%), 0 7px 16px rgb(13 72 68 / 16%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button.primary, .mini-action.primary, .status-button.primary):hover:not(:disabled) {
  border-color: rgb(36 117 111 / 88%);
  background: linear-gradient(120deg, #217771, #1b5e69);
  color: #fff;
  box-shadow: inset 3px 0 #d1aa68, inset 0 1px rgb(255 255 255 / 18%), 0 10px 22px rgb(13 72 68 / 22%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button):not(.primary):not(.danger) {
  border-color: rgb(128 201 190 / 23%);
  background: rgb(8 34 41 / 72%);
  color: rgb(226 241 236 / 82%);
  box-shadow: inset 0 1px rgb(226 255 249 / 5%), 0 5px 14px rgb(0 5 8 / 17%);
}

body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  border-color: color-mix(in srgb, var(--cc-line-strong) 80%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-strong) 78%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 35%), 0 8px 20px rgb(20 52 49 / 7%);
}

body.owner-shell-v1:not(.auth-required) .tab {
  min-height: 39px;
  padding-inline: 14px;
  border-right: 1px solid color-mix(in srgb, var(--cc-line) 68%, transparent);
  border-radius: 0;
  color: var(--cc-ink-faint);
  font-size: 11px;
  font-weight: 720;
}

body.owner-shell-v1:not(.auth-required) .tab:hover,
body.owner-shell-v1:not(.auth-required) .tab:focus-visible {
  background: color-mix(in srgb, var(--cc-accent-soft) 42%, transparent);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .tab.active,
body.owner-shell-v1:not(.auth-required) .tab[aria-selected="true"] {
  background: color-mix(in srgb, var(--cc-surface-strong) 88%, transparent);
  color: var(--cc-accent-strong);
  box-shadow: inset 0 -3px var(--r9-brass), inset 0 1px rgb(255 255 255 / 34%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  background: rgb(5 25 32 / 78%);
  box-shadow: inset 0 1px rgb(218 255 248 / 5%), 0 12px 28px rgb(0 5 8 / 24%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .tab.active,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .tab[aria-selected="true"] {
  background: rgb(15 54 59 / 68%);
  color: #e8f8f3;
}

body.owner-shell-v1:not(.auth-required) #pageSub {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
  border-color: color-mix(in srgb, var(--cc-line-strong) 80%, transparent);
  background: color-mix(in srgb, var(--cc-surface-strong) 80%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 36%), 0 8px 20px rgb(20 52 49 / 7%);
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions {
  border-color: color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--cc-surface-muted) 68%, transparent);
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions .mini-action {
  min-height: 34px;
  padding-inline: 12px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 720;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions .mini-action:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar-actions .module-canvas-edit[aria-pressed="true"] {
  background: color-mix(in srgb, var(--cc-accent-soft) 54%, transparent);
  color: var(--cc-accent-strong);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar {
  background: rgb(5 25 32 / 78%);
  box-shadow: inset 0 1px rgb(218 255 248 / 5%), 0 12px 28px rgb(0 5 8 / 24%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) {
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 74%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) > .kpi {
  border: 0;
  border-right: 1px solid var(--r95-hairline);
  border-radius: 0;
  background: transparent;
  box-shadow: inset 0 2px color-mix(in srgb, var(--r9-teal) 68%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) > .kpi:nth-child(4n + 2) {
  box-shadow: inset 0 2px color-mix(in srgb, var(--r9-ocean) 72%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) > .kpi:nth-child(4n + 3) {
  box-shadow: inset 0 2px color-mix(in srgb, var(--r9-brass) 76%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) > .kpi:nth-child(4n) {
  box-shadow: inset 0 2px color-mix(in srgb, var(--r9-coral) 68%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) > .kpi:last-child {
  border-right: 0;
}

/* Keep the finance quick-read widget readable when the canvas row is short. */
html[data-theme] body.owner-shell-v1:not(.auth-required)
  #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget="finance"] > .panel:first-child {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-bottom: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .empty-state,
  .library-empty-state,
  .library-group-empty,
  .knowledge-empty,
  .knowledge-v2__empty,
  .knowledge-v2__atlas-empty,
  .items-v2__empty,
  .reminder-v2-empty,
  .cc-custom-info__empty,
  .cc-profile__view-empty,
  .cc-profile__structure-empty,
  .cc-profile__archive-empty
) {
  border: 1px dashed color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 58%, transparent);
  color: var(--cc-ink-faint);
}

/* Profile becomes one identity desk followed by a dense, readable archive. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas {
  gap: 8px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
  min-height: 142px;
  padding: 21px 24px;
  background: linear-gradient(118deg, rgb(12 48 52 / 98%), rgb(25 78 77 / 94%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head h3 {
  max-width: 22ch;
  font-size: 24px;
  line-height: 1.16;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head p {
  max-width: 48ch;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion {
  min-height: 76px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] {
  gap: 0;
  background: color-mix(in srgb, var(--cc-surface-strong) 78%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div {
  min-height: 70px;
  padding: 13px 15px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid strong {
  overflow: visible;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  line-height: 1.42;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__structure-entry[data-module-canvas-block],
  .cc-profile__overview-foot[data-module-canvas-block]
) {
  min-height: 108px;
  padding: 14px 16px;
  background-image: linear-gradient(104deg, color-mix(in srgb, var(--cc-accent-soft) 42%, transparent), transparent 68%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry > div > p,
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head :is(.cc-profile__eyebrow, p),
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor-head p,
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group summary small,
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure > header p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head {
  min-height: 48px;
  padding: 9px 14px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
  padding: 0 14px 8px;
  border-top-width: 2px;
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 38%), 0 8px 20px rgb(20 52 49 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group > header {
  min-height: 41px;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field {
  grid-template-columns: minmax(104px, .31fr) minmax(0, 1fr);
  padding: 8px 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field dt {
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field dd {
  font-size: 12px;
  line-height: 1.58;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid strong {
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__overview-head h3,
  .cc-profile__group > summary > span:first-child,
  .cc-profile__view-group h4
) {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor {
  padding: 18px;
  border-top: 3px solid var(--r9-teal);
  background: color-mix(in srgb, var(--cc-surface-strong) 82%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 44%), 0 16px 36px rgb(20 52 49 / 10%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor {
  background: rgb(5 25 32 / 68%);
  box-shadow: inset 0 1px rgb(219 255 248 / 5%), 0 20px 42px rgb(0 5 8 / 29%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor-head {
  min-height: 52px;
  align-items: center;
  padding: 0 0 12px;
  border-bottom-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor-head h3 {
  font-size: 18px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__saved-at {
  min-width: 92px;
  padding-left: 12px;
  border-left: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__vault-notice {
  margin-block: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--r9-brass) 42%, var(--cc-line));
  border-left: 3px solid var(--r9-brass);
  border-radius: 2px;
  background: color-mix(in srgb, var(--r9-brass) 6%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__vault-notice p {
  display: block;
  margin: 3px 0 0;
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__archive-manager > header p {
  display: block;
  margin: 3px 0 0;
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--cc-line-strong);
  border-radius: 2px;
  background: color-mix(in srgb, var(--cc-surface) 68%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group + .cc-profile__group {
  margin-top: 8px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group > summary {
  min-height: 43px;
  padding: 9px 12px;
  border-left: 3px solid var(--r9-teal);
  background: color-mix(in srgb, var(--cc-surface-muted) 72%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group:nth-child(2n) > summary {
  border-left-color: var(--r9-ocean);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group:nth-child(3n) > summary {
  border-left-color: var(--r9-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group[open] > summary {
  border-bottom: 1px solid rgb(229 242 236 / 15%);
  background: linear-gradient(108deg, rgb(15 57 59 / 96%), rgb(25 76 76 / 91%));
  color: #f4faf6;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group[open] > summary :is(strong, .cc-profile__group-count) {
  color: inherit;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__fields {
  gap: 13px 12px;
  padding: 13px;
  background: color-mix(in srgb, var(--cc-surface-muted) 48%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__actions {
  position: sticky;
  z-index: 3;
  bottom: var(--cc-mobile-content-bottom-clearance, 0px);
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--cc-line-strong);
  border-left: 3px solid var(--r9-brass);
  background: color-mix(in srgb, var(--cc-surface-strong) 91%, transparent);
  box-shadow: 0 -8px 22px rgb(17 52 48 / 9%);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__status {
  color: var(--cc-ink-faint);
  font-size: 11px;
}

@media (max-width: 900px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
    min-height: 120px;
    padding: 16px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div {
    min-height: 62px;
    padding: 11px 12px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .cc-profile__structure-entry[data-module-canvas-block],
    .cc-profile__overview-foot[data-module-canvas-block]
  ) {
    min-height: 0;
    padding: 12px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor-head {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile {
    padding-bottom: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button) {
    min-height: 36px;
    padding: 7px 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile :is(.hud-button, .mini-action, .cc-profile__icon-button) {
    min-height: 44px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile .cc-profile__icon-button {
    width: 44px;
    height: 44px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__inline-field-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-canvas {
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
    min-height: 108px;
    padding: 14px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head h3 {
    font-size: 20px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head p,
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__eyebrow {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion {
    width: 74px;
    min-width: 74px;
    min-height: 58px;
    padding-left: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head .cc-profile__completion strong {
    font-size: 25px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid[data-module-canvas-block] > div {
    min-height: 56px;
    padding: 9px 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry[data-module-canvas-block] {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__structure-entry .hud-button {
    width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__all-fields-head {
    min-height: 44px;
    padding: 8px 11px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group {
    margin-bottom: 7px;
    padding-inline: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 1px;
    padding-block: 7px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor {
    padding: 12px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor-head,
  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__editor-tools {
    display: grid;
    width: 100%;
    gap: 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__saved-at {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__vault-notice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__vault-notice .mini-action {
    grid-column: 1 / -1;
    justify-content: center;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__fields {
    padding: 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__actions {
    display: grid;
    bottom: calc(var(--cc-mobile-content-bottom-clearance, 86px) - 1px);
    gap: 7px;
    padding: 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__actions .hud-button {
    justify-content: center;
  }
}

/* R9.6 filigree pass: curved brass engraving replaces ledger stripes. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) {
  --r96-gold-line: rgb(153 112 48 / 38%);
  --r96-gold-line-soft: rgb(153 112 48 / 21%);
  --r96-gold-point: rgb(167 126 56 / 52%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
  --r96-gold-line: rgb(220 176 97 / 31%);
  --r96-gold-line-soft: rgb(220 176 97 / 17%);
  --r96-gold-point: rgb(228 187 111 / 50%);
}

body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar),
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) {
  background-image:
    radial-gradient(ellipse 76px 36px at 100% 0, transparent 70%, var(--r96-gold-line-soft) 71% 72%, transparent 73%),
    radial-gradient(ellipse 52px 74px at 100% 0, transparent 70%, var(--r96-gold-line-soft) 71% 72%, transparent 73%);
  background-color: color-mix(in srgb, var(--cc-surface-strong) 78%, transparent);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(.module-tabs-shell, .module-canvas-toolbar),
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis, .stacked-kpis) {
  background-color: rgb(5 25 32 / 76%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .empty-state,
  .library-empty-state,
  .library-group-empty,
  .knowledge-empty,
  .knowledge-v2__empty,
  .knowledge-v2__atlas-empty,
  .items-v2__empty,
  .reminder-v2-empty,
  .cc-custom-info__empty,
  .cc-profile__view-empty,
  .cc-profile__structure-empty,
  .cc-profile__archive-empty,
  .ai-workbench__empty,
  .ai-settings__empty,
  .finance-ledger-inspector__empty,
  .library-intelligence__empty
) {
  background-image:
    radial-gradient(ellipse 108px 52px at 100% 100%, transparent 70%, var(--r96-gold-line) 71% 72%, transparent 73%),
    radial-gradient(ellipse 70px 104px at 100% 100%, transparent 70%, var(--r96-gold-line-soft) 71% 72%, transparent 73%),
    radial-gradient(circle at calc(100% - 42px) calc(100% - 34px), var(--r96-gold-point) 0 2px, transparent 3px);
  background-color: color-mix(in srgb, var(--cc-surface-muted) 58%, transparent);
}

/* Overview panels use corner scrollwork, leaving the working area quiet. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image: linear-gradient(112deg, rgb(255 255 255 / 14%), transparent 58%) !important;
  background-color: color-mix(in srgb, var(--cc-surface-strong) 80%, transparent);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  background-image: linear-gradient(112deg, rgb(193 240 232 / 3%), transparent 58%) !important;
  background-color: rgb(5 25 32 / 66%);
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -18px;
  bottom: -14px;
  width: 250px !important;
  height: 150px !important;
  border: 0;
  background-image:
    radial-gradient(ellipse 118px 58px at 100% 100%, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 82px 124px at 100% 100%, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 34px at 72% 72%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 32px 62px at 72% 72%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 72% 72%, var(--r96-gold-point) 0 2px, transparent 3px) !important;
  background-color: transparent !important;
  clip-path: none;
  opacity: .84 !important;
  pointer-events: none;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel > * {
  position: relative;
  z-index: 1;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-home-footer::after {
  right: 18px;
  bottom: 8px;
  width: min(42%, 360px) !important;
  height: 190px !important;
  opacity: 1;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="footer"]:not([data-overview-canvas-widget="focus"]) > .panel.overview-home-footer::after {
  right: 24px;
  bottom: -4px;
  width: 390px !important;
  max-width: 54%;
  height: 190px !important;
  background-image:
    radial-gradient(ellipse 156px 72px at 100% 100%, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 104px 154px at 100% 100%, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 92px 42px at 63% 70%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 42px 88px at 63% 70%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 50px 24px at 37% 78%, transparent 64%, var(--r96-gold-line-soft) 65% 66%, transparent 67%),
    radial-gradient(circle at 63% 70%, var(--r96-gold-point) 0 2px, transparent 3px),
    radial-gradient(circle at 37% 78%, var(--r96-gold-point) 0 1.5px, transparent 2.5px) !important;
  filter: drop-shadow(0 3px 8px color-mix(in srgb, var(--r9-brass) 14%, transparent));
  opacity: 1 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-home-footer .overview-section-head {
  border-bottom: 1px solid color-mix(in srgb, var(--r96-gold-line) 58%, transparent);
}

/* Overview paper ornament: broad, quiet botanical curves stay behind readable content. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-focus-panel,
  .overview-change-panel,
  .overview-signal-card
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: rgb(250 247 226 / 88%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-focus-panel,
  .overview-change-panel,
  .overview-signal-card
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: rgb(7 27 35 / 72%);
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-focus-panel,
  .overview-change-panel,
  .overview-signal-card
)::after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  opacity: 1;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-focus-panel,
  .overview-change-panel,
  .overview-signal-card
)::after {
  background-image:
    radial-gradient(ellipse 86% 148% at 106% -18%, transparent 0 58%, rgb(149 108 42 / 16%) 58.3% 58.75%, transparent 59.1% 100%),
    radial-gradient(ellipse 62% 106% at 94% 8%, transparent 0 58%, rgb(149 108 42 / 13%) 58.35% 58.8%, transparent 59.15% 100%),
    radial-gradient(ellipse 38% 66% at 78% 24%, transparent 0 54%, rgb(149 108 42 / 11%) 54.4% 54.9%, transparent 55.3% 100%),
    radial-gradient(ellipse 76% 126% at -8% 114%, transparent 0 61%, rgb(149 108 42 / 14%) 61.35% 61.8%, transparent 62.15% 100%),
    radial-gradient(ellipse 52% 88% at 12% 92%, transparent 0 58%, rgb(149 108 42 / 12%) 58.4% 58.9%, transparent 59.3% 100%),
    radial-gradient(ellipse 31% 51% at 36% 67%, transparent 0 60%, rgb(149 108 42 / 9%) 60.4% 60.9%, transparent 61.3% 100%),
    radial-gradient(ellipse 28% 46% at 62% 46%, transparent 0 61%, rgb(149 108 42 / 8%) 61.4% 61.9%, transparent 62.3% 100%),
    radial-gradient(circle at 87% 17%, rgb(149 108 42 / 18%) 0 2px, transparent 3px),
    radial-gradient(circle at 13% 84%, rgb(149 108 42 / 16%) 0 2px, transparent 3px),
    radial-gradient(circle at 54% 54%, rgb(149 108 42 / 11%) 0 1.5px, transparent 2.5px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-focus-panel,
  .overview-change-panel,
  .overview-signal-card
)::after {
  background-image:
    radial-gradient(ellipse 86% 148% at 106% -18%, transparent 0 58%, rgb(220 176 97 / 12%) 58.3% 58.75%, transparent 59.1% 100%),
    radial-gradient(ellipse 62% 106% at 94% 8%, transparent 0 58%, rgb(220 176 97 / 10%) 58.35% 58.8%, transparent 59.15% 100%),
    radial-gradient(ellipse 38% 66% at 78% 24%, transparent 0 54%, rgb(220 176 97 / 8%) 54.4% 54.9%, transparent 55.3% 100%),
    radial-gradient(ellipse 76% 126% at -8% 114%, transparent 0 61%, rgb(220 176 97 / 11%) 61.35% 61.8%, transparent 62.15% 100%),
    radial-gradient(ellipse 52% 88% at 12% 92%, transparent 0 58%, rgb(220 176 97 / 9%) 58.4% 58.9%, transparent 59.3% 100%),
    radial-gradient(ellipse 31% 51% at 36% 67%, transparent 0 60%, rgb(220 176 97 / 7%) 60.4% 60.9%, transparent 61.3% 100%),
    radial-gradient(ellipse 28% 46% at 62% 46%, transparent 0 61%, rgb(220 176 97 / 6%) 61.4% 61.9%, transparent 62.3% 100%),
    radial-gradient(circle at 87% 17%, rgb(220 176 97 / 14%) 0 2px, transparent 3px),
    radial-gradient(circle at 13% 84%, rgb(220 176 97 / 12%) 0 2px, transparent 3px),
    radial-gradient(circle at 54% 54%, rgb(220 176 97 / 9%) 0 1.5px, transparent 2.5px);
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-focus-panel,
  .overview-change-panel,
  .overview-signal-card
) > * {
  position: relative;
  z-index: 1;
}

/* Profile swaps ruled paper for restrained curved engraving. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
  background:
    radial-gradient(ellipse 152px 76px at 100% 0, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 98px 148px at 100% 0, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 54px) 44px, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(12 48 52 / 98%), rgb(25 78 77 / 94%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__overview-head[data-module-canvas-block] {
  background:
    radial-gradient(ellipse 152px 76px at 100% 0, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 98px 148px at 100% 0, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 54px) 44px, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(5 25 32 / 90%), rgb(16 58 63 / 80%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__summary-grid[data-module-canvas-block],
  .cc-profile__structure-entry[data-module-canvas-block],
  .cc-profile__overview-foot[data-module-canvas-block],
  .cc-profile__view-group,
  .cc-profile__editor,
  .cc-profile__fields
) {
  background-image:
    radial-gradient(ellipse 92px 44px at 100% 100%, transparent 70%, var(--r96-gold-line-soft) 71% 72%, transparent 73%),
    radial-gradient(ellipse 60px 88px at 100% 100%, transparent 70%, var(--r96-gold-line-soft) 71% 72%, transparent 73%),
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 60%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__group[open] > summary {
  background:
    radial-gradient(ellipse 74px 34px at 100% 50%, transparent 68%, var(--r96-gold-line) 69% 70%, transparent 71%),
    radial-gradient(ellipse 42px 68px at 100% 50%, transparent 68%, var(--r96-gold-line-soft) 69% 70%, transparent 71%),
    linear-gradient(108deg, rgb(15 57 59 / 96%), rgb(25 76 76 / 91%));
}

/* Dark command headers keep depth without ruler-line repetition. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar,
  [data-command-recycle="true"] > .panel > h3
) {
  background:
    radial-gradient(ellipse 96px 44px at 100% 0, transparent 68%, var(--r96-gold-line) 69% 70%, transparent 71%),
    radial-gradient(ellipse 58px 92px at 100% 0, transparent 68%, var(--r96-gold-line-soft) 69% 70%, transparent 71%),
    linear-gradient(112deg, rgb(15 57 59 / 97%), rgb(25 76 76 / 92%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar,
  [data-command-recycle="true"] > .panel > h3
) {
  background:
    radial-gradient(ellipse 96px 44px at 100% 0, transparent 68%, var(--r96-gold-line) 69% 70%, transparent 71%),
    radial-gradient(ellipse 58px 92px at 100% 0, transparent 68%, var(--r96-gold-line-soft) 69% 70%, transparent 71%),
    linear-gradient(112deg, rgb(5 27 34 / 94%), rgb(15 61 65 / 86%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] > .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] :is(.kpis, .compact-kpis) {
  background-image:
    radial-gradient(ellipse 112px 54px at 100% 100%, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 72px 108px at 100% 100%, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 251 / 12%), transparent 54%);
  background-color: var(--recycle-r9-surface);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button):disabled,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.hud-button, .mini-action, .status-button)[aria-disabled="true"] {
  transform: none;
  border-color: color-mix(in srgb, var(--cc-line) 72%, transparent);
  background: color-mix(in srgb, var(--cc-surface-muted) 54%, transparent);
  color: var(--cc-ink-faint);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .48;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, select, textarea):disabled,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, textarea)[readonly] {
  border-color: color-mix(in srgb, var(--cc-line) 72%, transparent);
  border-bottom-color: color-mix(in srgb, var(--cc-line-strong) 68%, transparent);
  background: color-mix(in srgb, var(--cc-surface-muted) 60%, transparent);
  color: var(--cc-ink-faint);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .72;
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) .tab {
    min-width: 72px;
    min-height: 36px;
    padding-inline: 10px;
    font-size: 11px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis) > .kpi:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.kpis, .compact-kpis) > .kpi:not(:nth-last-child(-n + 2)) {
    border-bottom: 1px solid var(--r95-hairline);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel::after {
    right: -52px;
    bottom: -38px;
    width: 190px !important;
    height: 116px !important;
    opacity: .62;
  }
}

/* R10 ornament library: four curved motifs, assigned by surface hierarchy. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-overview-actions,
  [data-command-library="vault"] .library-section-head,
  .knowledge-v2__atlas-head,
  [data-reminders-v2] .reminder-v2-search
) {
  background-image:
    radial-gradient(ellipse 16px 7px at 50% 100%, transparent 62%, var(--r96-gold-line) 64% 67%, transparent 69%),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 62%);
  background-position: left bottom, 0 0;
  background-repeat: repeat-x, no-repeat;
  background-size: 34px 12px, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-summary,
  .knowledge-v2__summary,
  [data-items-v2="true"] .items-v2__summary,
  [data-reminders-v2] .reminder-v2-kpis
) {
  background-image:
    radial-gradient(ellipse 112px 54px at 100% 0, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 72px 108px at 100% 0, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 34px at 0 100%, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 42px) 34px, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 9%), transparent 62%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-intelligence,
  .cc-profile__editor,
  .knowledge-v2__atlas,
  [data-items-v2="true"] .items-v2__workspace,
  [data-reminders-v2] .reminder-v2-overview
) {
  background-image:
    radial-gradient(circle at 88% 18%, transparent 0 31px, var(--r96-gold-line) 32px 33px, transparent 34px 42px, var(--r96-gold-line-soft) 43px 44px, transparent 45px),
    radial-gradient(ellipse 56px 28px at 88% 18%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 28px 54px at 88% 18%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 88% 18%, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(255 255 255 / 7%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
  [data-command-library="vault"] .library-editor-panel,
  [data-command-library="vault"] .library-group-panel,
  [data-command-library="vault"] .library-search-panel,
  [data-command-library="vault"] .library-attachments-panel,
  .cc-profile__group,
  .knowledge-v2__atlas-grid > section,
  [data-items-v2="true"] .items-v2__workspace-section
) {
  background-image:
    radial-gradient(ellipse 8px 17px at 100% 50%, transparent 61%, var(--r96-gold-line-soft) 63% 67%, transparent 69%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: right top, 0 0;
  background-repeat: repeat-y, no-repeat;
  background-size: 13px 36px, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(4n + 1) {
  background-image:
    radial-gradient(ellipse 86px 40px at 100% 100%, transparent 68%, var(--r96-gold-line) 69% 70%, transparent 71%),
    radial-gradient(ellipse 48px 82px at 100% 100%, transparent 68%, var(--r96-gold-line-soft) 69% 70%, transparent 71%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(4n + 2) {
  background-image:
    radial-gradient(circle at 92% 16%, transparent 0 20px, var(--r96-gold-line-soft) 21px 22px, transparent 23px 29px, var(--r96-gold-line-soft) 30px 31px, transparent 32px),
    radial-gradient(circle at 92% 16%, var(--r96-gold-point) 0 1.5px, transparent 2.5px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(4n + 3) {
  background-image:
    radial-gradient(ellipse 15px 7px at 50% 100%, transparent 62%, var(--r96-gold-line-soft) 64% 67%, transparent 69%);
  background-position: left bottom;
  background-repeat: repeat-x;
  background-size: 32px 11px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__view-group:nth-child(4n) {
  background-image:
    radial-gradient(ellipse 7px 15px at 100% 50%, transparent 62%, var(--r96-gold-line-soft) 64% 67%, transparent 69%);
  background-position: right top;
  background-repeat: repeat-y;
  background-size: 11px 32px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-recycle="true"] .list,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.row, .library-record, .knowledge-v2__record):hover {
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--r96-gold-line-soft) 46%, transparent), transparent 18%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-summary,
  [data-command-library="vault"] .library-intelligence,
  [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
  .knowledge-v2__summary,
  .knowledge-v2__atlas,
  [data-items-v2="true"] .items-v2__summary,
  [data-items-v2="true"] .items-v2__workspace,
  [data-reminders-v2] .reminder-v2-overview
) {
  background-color: rgb(5 25 32 / 66%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    [data-command-library="vault"] .library-intelligence,
    .cc-profile__editor,
    .knowledge-v2__atlas,
    [data-items-v2="true"] .items-v2__workspace,
    [data-reminders-v2] .reminder-v2-overview
  ) {
    background-position: 130% -16px, 130% -16px, 130% -16px, 130% -16px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    [data-command-library="vault"] .library-overview-column[data-module-canvas-block],
    [data-command-library="vault"] .library-editor-panel,
    [data-command-library="vault"] .library-group-panel,
    [data-command-library="vault"] .library-search-panel,
    [data-command-library="vault"] .library-attachments-panel,
    .cc-profile__group,
    .knowledge-v2__atlas-grid > section,
    [data-items-v2="true"] .items-v2__workspace-section
  ) {
    background-size: 10px 30px, auto;
  }
}

/* Canvas-wide ornament distribution: each successive panel gets a distinct motif. */
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n + 1) > .panel:not(.overview-command-deck) {
  background-image:
    radial-gradient(ellipse 112px 52px at 100% 0, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 108px at 100% 0, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 64px 30px at 0 100%, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 7%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n + 2) > .panel:not(.overview-command-deck) {
  background-image:
    radial-gradient(ellipse 16px 7px at 50% 100%, transparent 62%, var(--r96-gold-line) 64% 67%, transparent 69%),
    radial-gradient(circle at 90% 18%, transparent 0 24px, var(--r96-gold-line-soft) 25px 26px, transparent 27px 34px, var(--r96-gold-line-soft) 35px 36px, transparent 37px),
    linear-gradient(118deg, rgb(255 255 255 / 6%), transparent 58%);
  background-position: left bottom, center, 0 0;
  background-repeat: repeat-x, no-repeat, no-repeat;
  background-size: 34px 12px, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n + 3) > .panel:not(.overview-command-deck) {
  background-image:
    radial-gradient(circle at 88% 18%, transparent 0 31px, var(--r96-gold-line) 32px 33px, transparent 34px 42px, var(--r96-gold-line-soft) 43px 44px, transparent 45px),
    radial-gradient(ellipse 56px 28px at 88% 18%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 28px 54px at 88% 18%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 88% 18%, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(255 255 255 / 6%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n) > .panel:not(.overview-command-deck) {
  background-image:
    radial-gradient(ellipse 8px 17px at 100% 50%, transparent 61%, var(--r96-gold-line-soft) 63% 67%, transparent 69%),
    radial-gradient(ellipse 72px 34px at 0 100%, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: right top, center, 0 0;
  background-repeat: repeat-y, no-repeat, no-repeat;
  background-size: 13px 36px, auto, auto;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
  background-color: rgb(5 25 32 / 66%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .library-owner-v1 .library-entity-workspace .vault-library-list-panel {
    min-height: 0 !important;
    height: auto !important;
    max-height: min(68vh, 760px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n + 1) > .panel:not(.overview-command-deck),
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n + 3) > .panel:not(.overview-command-deck) {
    background-position: 130% -18px, 130% -18px, 130% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n + 2) > .panel:not(.overview-command-deck) {
    background-size: 30px 10px, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget:nth-child(4n) > .panel:not(.overview-command-deck) {
    background-size: 10px 30px, auto, auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1 *,
  body.owner-shell-v1 *::before,
  body.owner-shell-v1 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* R10.1 ornament density: broader filigree distribution with distinct motif families. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) {
  --r101-gold-strong: rgb(151 108 42 / 46%);
  --r101-gold-mid: rgb(151 108 42 / 31%);
  --r101-gold-soft: rgb(151 108 42 / 18%);
  --r101-gold-glow: rgb(190 143 67 / 11%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
  --r101-gold-strong: rgb(229 184 103 / 38%);
  --r101-gold-mid: rgb(229 184 103 / 27%);
  --r101-gold-soft: rgb(229 184 103 / 15%);
  --r101-gold-glow: rgb(229 184 103 / 9%);
}

body.owner-shell-v1:not(.auth-required) :is(.module-canvas-toolbar, .bulk-actions-r1__bar) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) :is(.module-canvas-toolbar, .bulk-actions-r1__bar) > * {
  position: relative;
  z-index: 1;
}

/* Interlaced scrollwork anchors the shared canvas toolbar without competing with controls. */
body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: -54px;
  bottom: -58px;
  width: 210px;
  height: 112px;
  border: 0;
  background:
    radial-gradient(ellipse 104px 50px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 66px 102px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 74px 34px at 42% 78%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 42% 78%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px);
  transform: none;
  opacity: .82;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -34px;
  top: -46px;
  width: 176px;
  height: 112px;
  border: 0;
  background:
    radial-gradient(ellipse 96px 46px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 60px 94px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 64px 30px at 58% 28%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 34% 70%, var(--r101-gold-strong) 0 2px, transparent 3px),
    radial-gradient(circle at 58% 48%, var(--r101-gold-mid) 0 1.5px, transparent 2.5px);
  transform: none;
  opacity: .84;
  pointer-events: none;
}

/* Cloud-scroll motif distinguishes the transient bulk-action rail. */
body.owner-shell-v1:not(.auth-required) .bulk-actions-r1__bar::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -42px;
  bottom: -76px;
  width: 238px;
  height: 142px;
  border: 0;
  background:
    radial-gradient(ellipse 126px 60px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 78px 120px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 72px 34px at 58% 74%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 36% 24%, transparent 0 15px, var(--r101-gold-soft) 16px 17px, transparent 18px),
    radial-gradient(circle at 52% 18%, var(--r101-gold-strong) 0 2px, transparent 3px);
  transform: none;
  opacity: .78;
  pointer-events: none;
}

/* Paired corner arcs make module tabs feel framed while preserving horizontal scrolling. */
body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  background-image:
    radial-gradient(ellipse 112px 52px at 0 100%, transparent 68%, var(--r101-gold-mid) 69% 70%, transparent 71%),
    radial-gradient(ellipse 68px 104px at 0 100%, transparent 68%, var(--r101-gold-soft) 69% 70%, transparent 71%),
    radial-gradient(ellipse 112px 52px at 100% 0, transparent 68%, var(--r101-gold-mid) 69% 70%, transparent 71%),
    radial-gradient(ellipse 68px 104px at 100% 0, transparent 68%, var(--r101-gold-soft) 69% 70%, transparent 71%);
  background-repeat: no-repeat;
}

/* Vault and knowledge surfaces use a fan, seal and vine vocabulary instead of one repeated corner. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-overview-actions,
  .knowledge-v2__atlas-head,
  [data-reminders-v2] .reminder-v2-search
) {
  background-image:
    conic-gradient(from 183deg at 0 100%, transparent 0 8deg, var(--r101-gold-soft) 8deg 10deg, transparent 10deg 20deg, var(--r101-gold-mid) 20deg 22deg, transparent 22deg 34deg, var(--r101-gold-soft) 34deg 36deg, transparent 36deg 50deg, var(--r101-gold-mid) 50deg 52deg, transparent 52deg 66deg),
    radial-gradient(ellipse 98px 46px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 60px 94px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 62%);
  background-position: left bottom, right bottom, right bottom, 0 0;
  background-repeat: no-repeat;
  background-size: 118px 72px, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .library-summary {
  background-image:
    radial-gradient(ellipse 118px 56px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 114px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 96px 44px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 58px 90px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 44px) 34px, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 9%), transparent 62%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-intelligence,
  [data-command-library="vault"] .library-overview-column,
  .knowledge-v2__atlas,
  .cc-profile__editor,
  [data-items-v2="true"] .items-v2__workspace
) {
  position: relative;
  isolation: isolate;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-intelligence,
  [data-command-library="vault"] .library-overview-column,
  .knowledge-v2__atlas,
  .cc-profile__editor,
  [data-items-v2="true"] .items-v2__workspace
) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-command-library="vault"] .library-intelligence,
  .knowledge-v2__atlas,
  .cc-profile__editor,
  [data-items-v2="true"] .items-v2__workspace
)::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -72px;
  bottom: -64px;
  width: 292px;
  height: 166px;
  border: 0;
  background:
    radial-gradient(ellipse 142px 66px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 88px 136px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 88px 40px at 56% 70%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(ellipse 40px 84px at 56% 70%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 30% 22%, transparent 0 24px, var(--r101-gold-soft) 25px 26px, transparent 27px 34px, var(--r101-gold-soft) 35px 36px, transparent 37px),
    radial-gradient(circle at 56% 70%, var(--r101-gold-strong) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 18%, var(--r101-gold-strong) 0 2px, transparent 3px);
  transform: none;
  opacity: .74;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .library-overview-column::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -38px;
  bottom: -42px;
  width: 176px;
  height: 106px;
  border: 0;
  background:
    radial-gradient(ellipse 86px 40px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 52px 82px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 54px 24px at 58% 72%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 58% 72%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px);
  transform: none;
  opacity: .66;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .library-section-head {
  background-image:
    radial-gradient(circle at calc(100% - 24px) 50%, transparent 0 9px, var(--r101-gold-mid) 10px 11px, transparent 12px 16px, var(--r101-gold-soft) 17px 18px, transparent 19px),
    radial-gradient(circle at calc(100% - 24px) 50%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(90deg, rgb(255 255 255 / 4%), transparent 58%);
  background-repeat: no-repeat;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar::before {
    left: 0;
    bottom: 0;
    transform: scale(.54);
    transform-origin: left bottom;
  }

  body.owner-shell-v1:not(.auth-required) .module-canvas-toolbar::after {
    right: 0;
    top: 0;
    transform: scale(.54);
    transform-origin: right top;
  }
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) .bulk-actions-r1__bar::after {
    right: 0;
    bottom: 0;
    transform: scale(.66) rotate(-8deg);
    transform-origin: right bottom;
    opacity: .58;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    [data-command-library="vault"] .library-intelligence,
    .knowledge-v2__atlas,
    .cc-profile__editor,
    [data-items-v2="true"] .items-v2__workspace
  )::after {
    right: 0;
    bottom: 0;
    transform: scale(.48) rotate(-9deg);
    transform-origin: right bottom;
    opacity: .52;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .library-overview-column::after {
    right: 0;
    bottom: 0;
    transform: scale(.52) rotate(-10deg);
    transform-origin: right bottom;
    opacity: .48;
  }
}

/* R10.2 semantic motifs: ornament follows the job of the surface, not DOM order. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-import-v2__head {
  background-image:
    conic-gradient(from 186deg at 0 100%, transparent 0 9deg, var(--r101-gold-soft) 9deg 11deg, transparent 11deg 23deg, var(--r101-gold-mid) 23deg 25deg, transparent 25deg 39deg, var(--r101-gold-soft) 39deg 41deg, transparent 41deg 57deg),
    radial-gradient(ellipse 118px 56px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 74px 112px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 42px) 34px, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 62%);
  background-position: left bottom, center, center, center, 0 0;
  background-repeat: no-repeat;
  background-size: 120px 72px, auto, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-import-v2__source {
  background-image:
    radial-gradient(ellipse 104px 48px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 64px 100px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 58px 26px at 76% 72%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 76% 72%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-import-v2__actions {
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 9deg, var(--r101-gold-soft) 9deg 11deg, transparent 11deg 24deg, var(--r101-gold-mid) 24deg 26deg, transparent 26deg 41deg, var(--r101-gold-soft) 41deg 43deg, transparent 43deg 58deg),
    radial-gradient(circle at calc(100% - 24px) 50%, transparent 0 9px, var(--r101-gold-mid) 10px 11px, transparent 12px 16px, var(--r101-gold-soft) 17px 18px, transparent 19px),
    radial-gradient(circle at calc(100% - 24px) 50%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 66%);
  background-position: left bottom, right center, right center, 0 0;
  background-repeat: no-repeat;
  background-size: 112px 68px, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .ai-workbench__query {
  background-image:
    radial-gradient(ellipse 112px 52px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 108px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 62px 28px at 72% 30%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 72% 30%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 60%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .ai-workbench__pane-head {
  background-image:
    radial-gradient(circle at calc(100% - 22px) 50%, transparent 0 8px, var(--r101-gold-mid) 9px 10px, transparent 11px 15px, var(--r101-gold-soft) 16px 17px, transparent 18px),
    radial-gradient(circle at calc(100% - 22px) 50%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(90deg, rgb(255 255 255 / 4%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .ai-workbench__state {
  background-image:
    radial-gradient(circle at calc(100% - 38px) calc(100% - 32px), transparent 0 22px, var(--r101-gold-mid) 23px 24px, transparent 25px 31px, var(--r101-gold-soft) 32px 33px, transparent 34px),
    radial-gradient(ellipse 46px 22px at calc(100% - 38px) calc(100% - 32px), transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 22px 44px at calc(100% - 38px) calc(100% - 32px), transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at calc(100% - 38px) calc(100% - 32px), var(--r101-gold-strong) 0 2px, transparent 3px);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-custom-info__heading {
  background-image:
    radial-gradient(ellipse 112px 52px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 108px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 68px 31px at 70% 30%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 70% 30%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 60%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-custom-info__overview-section:nth-of-type(odd) {
  background-image:
    radial-gradient(ellipse 98px 46px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 60px 94px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-custom-info__overview-section:nth-of-type(even) {
  background-image:
    radial-gradient(circle at 92% 18%, transparent 0 24px, var(--r101-gold-mid) 25px 26px, transparent 27px 34px, var(--r101-gold-soft) 35px 36px, transparent 37px),
    radial-gradient(ellipse 48px 23px at 92% 18%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 23px 46px at 92% 18%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 92% 18%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 4%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-settings="true"] > .panel {
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-settings="true"] > [data-tab-panel="settings-workspace"] {
  background-image:
    radial-gradient(circle at 91% 18%, transparent 0 28px, var(--r101-gold-mid) 29px 30px, transparent 31px 38px, var(--r101-gold-soft) 39px 40px, transparent 41px),
    radial-gradient(ellipse 54px 26px at 91% 18%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 26px 52px at 91% 18%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 91% 18%, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 6%), transparent 58%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-settings="true"] > [data-tab-panel="settings-sidebar"] {
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 9deg, var(--r101-gold-soft) 9deg 11deg, transparent 11deg 24deg, var(--r101-gold-mid) 24deg 26deg, transparent 26deg 41deg, var(--r101-gold-soft) 41deg 43deg, transparent 43deg 58deg),
    radial-gradient(ellipse 98px 46px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 60px 94px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: left bottom, center, center, 0 0;
  background-size: 110px 66px, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-settings="true"] > [data-tab-panel="settings-export"] {
  background-image:
    radial-gradient(ellipse 126px 60px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 78px 120px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 72px 34px at 67% 72%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 67% 72%, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-settings="true"] > [data-tab-panel="settings-privacy"] {
  background-image:
    radial-gradient(circle at calc(100% - 38px) calc(100% - 34px), transparent 0 22px, var(--r101-gold-mid) 23px 24px, transparent 25px 31px, var(--r101-gold-soft) 32px 33px, transparent 34px),
    radial-gradient(circle at calc(100% - 38px) calc(100% - 34px), var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 4%), transparent 58%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-settings="true"] > [data-tab-panel="settings-boundary"] {
  background-image:
    radial-gradient(ellipse 110px 52px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 68px 106px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 90px 42px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 54px 86px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-import-v2__head,
  .cc-import-v2__source,
  .cc-import-v2__actions,
  .ai-workbench__query,
  .ai-workbench__pane-head,
  .ai-workbench__state,
  .cc-custom-info__heading,
  .cc-custom-info__overview-section,
  [data-command-settings="true"] > .panel
) {
  background-color: rgb(5 25 32 / 66%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .cc-import-v2__head,
    .cc-import-v2__source,
    .ai-workbench__query,
    .cc-custom-info__heading,
    .cc-custom-info__overview-section,
    [data-command-settings="true"] > .panel
  ) {
    background-position: 140% -18px, 140% -18px, 140% -18px, 140% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.cc-import-v2__actions, .ai-workbench__pane-head) {
    background-size: 84px 52px, auto, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .ai-workbench__state {
    background-position: 136% 128%, 136% 128%, 136% 128%, 136% 128%;
  }
}

/* R10.3 bookplate accents close the remaining flat knowledge and profile surfaces. */
body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__summary {
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 9deg, var(--r101-gold-soft) 9deg 11deg, transparent 11deg 24deg, var(--r101-gold-mid) 24deg 26deg, transparent 26deg 41deg, var(--r101-gold-soft) 41deg 43deg, transparent 43deg 58deg),
    radial-gradient(circle at calc(100% - 32px) 28px, transparent 0 15px, var(--r101-gold-mid) 16px 17px, transparent 18px 23px, var(--r101-gold-soft) 24px 25px, transparent 26px),
    radial-gradient(ellipse 38px 18px at calc(100% - 32px) 28px, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 18px 36px at calc(100% - 32px) 28px, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at calc(100% - 32px) 28px, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 6%), transparent 58%) !important;
  background-position: left bottom, right top, right top, right top, right top, 0 0;
  background-repeat: no-repeat;
  background-size: 104px 64px, auto, auto, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__atlas {
  background-image:
    radial-gradient(ellipse 124px 58px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 118px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 106px 50px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 64px 102px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 44px) 34px, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%) !important;
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__summary-grid[data-module-canvas-block],
  .cc-profile__structure-entry[data-module-canvas-block],
  .cc-profile__overview-foot[data-module-canvas-block]
) {
  background-image:
    radial-gradient(ellipse 94px 44px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 56px 90px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 62px 28px at 72% 72%, transparent 67%, var(--r101-gold-soft) 68% 69%, transparent 70%),
    radial-gradient(circle at 72% 72%, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%) !important;
  background-repeat: no-repeat;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .knowledge-v2__summary,
  .knowledge-v2__atlas,
  .cc-profile__summary-grid[data-module-canvas-block],
  .cc-profile__structure-entry[data-module-canvas-block],
  .cc-profile__overview-foot[data-module-canvas-block]
) {
  background-color: rgb(5 25 32 / 66%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__summary {
    background-position: -36px 112%, 132% -14px, 132% -14px, 132% -14px, 132% -14px, 0 0;
    background-size: 82px 50px, auto, auto, auto, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__atlas {
    background-position: 142% -18px, 142% -18px, -58px 112%, -58px 112%, 142% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .cc-profile__summary-grid[data-module-canvas-block],
    .cc-profile__structure-entry[data-module-canvas-block],
    .cc-profile__overview-foot[data-module-canvas-block]
  ) {
    background-position: 142% 112%, 142% 112%, 142% 112%, 142% 112%, 0 0;
  }
}

/* R10.6 compact desktop truth: 1280px keeps night controls in the top bar. */
@media (min-width: 1024px) and (max-width: 1319px) {
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
    --cc-night-rail-width: 0px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .topbar {
    grid-template-columns: minmax(220px, 310px) minmax(280px, 1fr) auto;
    gap: 12px;
    padding-inline: 18px;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status {
    position: static;
    display: flex;
    width: auto;
    min-width: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(
    .formal-signal-head,
    .formal-signal-context,
    .formal-signal-meter,
    #clock
  ) {
    display: none;
  }

  html[data-theme] body.owner-shell-v1:not(.auth-required) .status > .dot {
    display: block;
    width: 7px;
    min-width: 7px;
    height: 7px;
  }

  html[data-theme] body.owner-shell-v1:not(.auth-required) #workspaceStatus {
    display: block;
    max-width: 112px;
    overflow: hidden;
    color: var(--cc-ink-soft);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(
    [data-theme-mode-toggle],
    .owner-global-search-trigger,
    .ai-fab,
    .status-button
  ) {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .owner-global-search-trigger span {
    display: none;
  }

  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .status-button {
    width: 48px;
    min-width: 48px;
    margin-top: 0;
  }
}

/* R10.6 profile readability: long personal text remains available, not silently clamped. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__summary-grid strong[data-profile-summary="interests"] {
  display: block;
  max-height: none;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
  -webkit-line-clamp: unset;
}


/* source: styles/finance-r9.css */
/* R9 Finance surface. Visual hierarchy only; data and interaction ownership stay unchanged. */

body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-blue: #367fa0;
  --finance-r9-blue-soft: rgb(221 237 242 / 82%);
  --finance-r9-green: #24775f;
  --finance-r9-green-soft: rgb(220 238 228 / 82%);
  --finance-r9-coral: #c96558;
  --finance-r9-coral-soft: rgb(248 226 220 / 82%);
  --finance-r9-copper: #a97843;
  --finance-r9-copper-soft: rgb(240 229 214 / 82%);
  --finance-r9-gold: #b58a38;
  --finance-r9-surface: var(--cc-surface);
  --finance-r9-surface-soft: color-mix(in srgb, var(--cc-surface-muted) 82%, transparent);
  --finance-r9-control-bg: rgb(255 254 247 / 84%);
  --finance-r9-control-bg-hover: rgb(255 255 252 / 94%);
  --finance-r9-control-edge: rgb(43 82 78 / 30%);
  --finance-r9-control-focus: rgb(36 119 95 / 22%);
  --finance-r9-action-start: #176f72;
  --finance-r9-action-end: #155664;
  --finance-r9-action-ink: #f4fffd;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-blue: #72b7c4;
  --finance-r9-blue-soft: rgb(38 91 105 / 55%);
  --finance-r9-green: #67c69b;
  --finance-r9-green-soft: rgb(29 88 70 / 52%);
  --finance-r9-coral: #e18172;
  --finance-r9-coral-soft: rgb(104 52 48 / 52%);
  --finance-r9-copper: #d5ad68;
  --finance-r9-copper-soft: rgb(100 76 42 / 48%);
  --finance-r9-gold: #e0bb75;
  --finance-r9-control-bg: rgb(7 26 32 / 68%);
  --finance-r9-control-bg-hover: rgb(11 36 43 / 82%);
  --finance-r9-control-edge: rgb(123 184 180 / 34%);
  --finance-r9-control-focus: rgb(103 198 155 / 24%);
  --finance-r9-action-start: #2b8d86;
  --finance-r9-action-end: #1f6573;
  --finance-r9-action-ink: #f1fffb;
}

body.owner-shell-v1:not(.auth-required) .finance-grid {
  gap: 12px;
  align-items: start;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel {
  min-width: 0;
  border: 1px solid var(--cc-line);
  border-radius: 4px;
  background: var(--finance-r9-surface);
  box-shadow: var(--r9-shadow, 0 12px 30px rgba(21, 38, 31, 0.08));
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel::before,
body.owner-shell-v1:not(.auth-required) .finance-grid .panel::after {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .command-console-head {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .command-console-head h3 {
  margin: 0;
  color: var(--cc-ink);
  font-size: 17px;
  line-height: 1.3;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .command-console-head p {
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

/* Quick entry is a compact financial instrument, not a generic admin form. */
body.owner-shell-v1:not(.auth-required) .finance-quick-panel:not(.tab-panel-hidden) {
  overflow: hidden;
  padding: 0 16px 12px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head {
  align-items: center;
  margin: 0 -16px 14px;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: linear-gradient(90deg, var(--finance-r9-copper-soft), transparent 42%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head p {
  margin: 2px 0 0;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .command-actions {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel :is(#financeQuickSubmit, #financeRefresh) {
  min-height: 40px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeQuickSubmit {
  padding-inline: 17px;
  border-color: color-mix(in srgb, var(--finance-r9-action-start) 78%, white);
  background: linear-gradient(135deg, var(--finance-r9-action-start), var(--finance-r9-action-end));
  color: var(--finance-r9-action-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 6px 14px rgb(18 77 79 / 18%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeRefresh {
  padding-inline: 12px;
  border-color: var(--finance-r9-control-edge);
  background: color-mix(in srgb, var(--finance-r9-control-bg) 56%, transparent);
  color: var(--cc-ink-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeQuickSubmit:hover {
  border-color: color-mix(in srgb, var(--finance-r9-action-start) 64%, white);
  background: linear-gradient(135deg, color-mix(in srgb, var(--finance-r9-action-start) 90%, white), var(--finance-r9-action-end));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 24%), 0 8px 18px rgb(18 77 79 / 24%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeRefresh:hover {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-control-bg-hover);
  color: var(--finance-r9-blue);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel :is(#financeQuickSubmit, #financeRefresh):focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus), inset 0 1px 0 rgb(255 255 255 / 20%);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row {
  grid-template-columns:
    minmax(132px, 1fr)
    minmax(104px, .8fr)
    minmax(220px, 2fr)
    minmax(132px, 1fr)
    minmax(150px, 1.15fr)
    minmax(104px, .8fr);
  align-items: start;
  gap: 8px 10px;
  margin: 0 0 2px;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field small {
  margin: 0 0 0 1px;
  color: var(--cc-ink-faint);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  transition: color 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:focus-within small {
  color: var(--finance-r9-green);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--finance-r9-control-edge);
  border-radius: 4px;
  outline: 0;
  background: var(--finance-r9-control-bg);
  color: var(--cc-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 34%), 0 1px 2px rgb(14 49 43 / 5%);
  font-size: 13px;
  line-height: 1.3;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select):hover {
  border-color: color-mix(in srgb, var(--finance-r9-control-edge) 65%, var(--finance-r9-blue));
  background: var(--finance-r9-control-bg-hover);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select):focus {
  border-color: var(--finance-r9-green);
  background: var(--finance-r9-control-bg-hover);
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus), inset 0 1px 0 rgb(255 255 255 / 30%);
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row input::placeholder {
  color: color-mix(in srgb, var(--cc-ink-faint) 72%, transparent);
  opacity: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row :is(#financeEntryDate, #financeEntryAmount) {
  font-family: var(--cc-font-mono, "Cascadia Mono", monospace);
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) .finance-entry-row #financeEntryAmount {
  font-size: 15px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip {
  display: flex;
  min-height: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 3px;
  padding: 9px 0 8px;
  border: 0;
  border-top: 1px solid var(--cc-line);
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset {
  min-width: 0;
  min-height: 30px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--finance-r9-control-edge);
  border-radius: 3px;
  background: color-mix(in srgb, var(--finance-r9-control-bg) 72%, transparent);
  color: var(--cc-ink-soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset:hover,
body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset:focus-visible {
  transform: translateY(-1px);
  border-color: var(--finance-r9-copper);
  outline: 0;
  background: var(--finance-r9-copper-soft);
  color: var(--finance-r9-copper);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 18%), 0 4px 10px rgb(67 50 30 / 10%);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row {
  min-height: 30px;
  margin: 0;
  padding: 7px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cc-ink-faint);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row > .tag {
  min-height: 22px;
  padding: 2px 7px;
  border-color: var(--cc-line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--cc-ink-faint);
  font-size: 9px;
}

@media (min-width: 921px) and (max-width: 1180px) {
  body.owner-shell-v1:not(.auth-required) .finance-entry-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  body.owner-shell-v1:not(.auth-required) .finance-entry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(3),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(5),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(6) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-quick-panel:not(.tab-panel-hidden) {
    padding: 0 10px 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head {
    margin-inline: -10px;
    padding: 11px 10px 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head .command-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel #financeQuickSubmit {
    width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 8px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(3),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(5),
  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field:nth-child(6) {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select) {
    padding-inline: 9px;
    font-size: 12px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-entry-row #financeEntryAmount {
    font-size: 14px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip {
    flex-wrap: nowrap;
    margin-top: 11px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip::-webkit-scrollbar {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel .quick-category-strip .category-preset {
    flex: 0 0 auto;
    min-height: 38px;
    height: 38px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }
}

/* Final visibility guard after legacy finance rules. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-delta,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-draft-delta],
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-human-ledger,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-save-preview {
  display: none !important;
}

/* ASSET-NET-CARD-DAY-CONTRAST-R1: the summary rail is a light ledger surface;
   do not let the retired dark workbench header bleed through the net card. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .asset-workbench-v2 .asset-balance-head {
  background: rgb(247 250 246 / 84%) !important;
  box-shadow: 0 8px 20px rgb(35 62 55 / 10%) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .asset-workbench-v2 .ring.asset-net-ring {
  background:
    linear-gradient(135deg, rgb(255 252 241 / 86%), rgb(225 211 170 / 62%)),
    url("/static/command_center/assets/paper-fibers-open.png") center / 124px 124px repeat !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .asset-workbench-v2 .ring.asset-net-ring :is(span, b) {
  color: var(--cc-ink, #183b3f) !important;
}

/* The ledger is the task. Put its two cards ahead of secondary controls. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: flex !important;
  flex-direction: column;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head { order: 1; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-editor-controls { order: 2; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals { order: 3; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-sheet] { order: 4; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions { order: 5; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar { order: 6; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-note-field { order: 7; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-paste-assist { order: 8; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] #assetSnapshotLookupResult { order: 9; }

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] > .asset-capture-actions-bottom {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: flex !important;
  flex-direction: column;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head { order: 1; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-editor-controls { order: 2; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals { order: 3; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-sheet] { order: 4; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions { order: 5; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar { order: 6; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-note-field { order: 7; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-paste-assist { order: 8; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] #assetSnapshotLookupResult { order: 9; }

/* Asset / liability is a workbench, not a decorated report. */
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 {
  display: grid;
  gap: 16px;
  padding: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-balance-head {
  border: 0;
  border-radius: 6px;
  background: linear-gradient(115deg, #0d3f43, #14655f 70%, #1d756d);
  box-shadow: 0 14px 32px rgb(10 48 48 / 22%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .ring.asset-net-ring,
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-balance-kpis .kpi {
  min-height: 110px;
  border-color: rgb(224 245 234 / 18%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .ring.asset-net-ring {
  box-shadow: inset 4px 0 #d3a553;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 :is(.ring.asset-net-ring b, .asset-balance-kpis .kpi strong) {
  color: #fffdf5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 :is(.ring.asset-net-ring span, .asset-balance-kpis .kpi span) {
  color: var(--cc-ink-soft);
}

/* Final readable-label override: the asset workbench stylesheet has an older
   !important rule loaded later than this module's base theme. */
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2.asset-workbench-v2 :is(.ring.asset-net-ring span, .asset-balance-kpis .kpi span) {
  color: var(--cc-ink-soft) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-inherited-note {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 12px 16px;
  border-left: 3px solid #c79a55;
  border-radius: 3px;
  background: rgb(255 253 247 / 78%);
  color: #35504e;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-inherited-note strong {
  color: #173d3d;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .82fr) !important;
  gap: 20px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: block !important;
  padding: 24px !important;
  border: 1px solid rgb(41 89 82 / 20%) !important;
  border-radius: 6px !important;
  background: rgb(255 253 247 / 94%) !important;
  box-shadow: 0 12px 28px rgb(25 63 57 / 10%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 > * + * {
  margin-top: 16px;
}

/* Keep the first viewport for the actual ledger. Totals already explain the math. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-human-ledger, .asset-draft-delta, [data-asset-draft-delta], .asset-save-preview) {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head {
  grid-template-columns: minmax(0, 1fr) 170px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgb(41 89 82 / 16%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head :is(.section-kicker, p) {
  display: block;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head h4 {
  margin: 3px 0 0;
  color: #163d3d;
  font-size: 24px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head p {
  margin: 5px 0 0;
  color: #617674;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls .mini-action {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls .mini-action.primary {
  border-color: #12635c;
  background: #12635c;
  color: #fff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-editor-controls span {
  width: 100%;
  color: #70817e;
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgb(41 89 82 / 16%);
  border-radius: 4px;
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) > span {
  min-height: 58px;
  padding: 10px 12px;
  border-right: 1px solid rgb(41 89 82 / 14%);
  background: rgb(246 250 247 / 70%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) > span:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-save-preview {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgb(41 89 82 / 16%);
  border-radius: 4px;
  background: #f3f7f3;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgb(41 89 82 / 14%);
  border-radius: 4px;
  background: #f8faf7;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(41 89 82 / 14%);
  border-radius: 4px;
  background: #f8faf7;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar > .tag {
  grid-column: 1 / -1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-section {
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgb(41 89 82 / 18%) !important;
  border-radius: 6px !important;
  background: #fffdf8 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-section[data-asset-clearance-section="liability"] {
  border-color: rgb(170 81 70 / 26%) !important;
  background: #fffafa !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid rgb(41 89 82 / 14%);
  background: #f4f8f5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-section="liability"] .asset-section-title {
  border-color: rgb(170 81 70 / 16%);
  background: #fcf5f3;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-quick-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgb(41 89 82 / 12%);
  background: rgb(248 251 249 / 80%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-header {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-rows {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(126px, .65fr) auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgb(41 89 82 / 16%);
  border-radius: 4px;
  background: #fff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-row-reference {
  grid-column: 1;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 3px;
  background: #f4f8f5;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-note {
  grid-column: 2 / 4;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-amount {
    grid-column: 1;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-row-reference,
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-note {
    grid-column: 1 / -1;
  }
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card {
  padding: 18px;
  border: 1px solid rgb(41 89 82 / 18%);
  border-radius: 6px;
  background: rgb(255 253 247 / 94%);
  box-shadow: 0 10px 24px rgb(25 63 57 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card .asset-column-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgb(41 89 82 / 14%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel {
    position: static;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-draft-totals, .asset-draft-delta) > span {
    border-right: 0;
    border-bottom: 1px solid rgb(41 89 82 / 14%);
  }
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-entry-row .field :is(input, select) {
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 5px 14px rgb(0 0 0 / 10%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head {
  background: linear-gradient(90deg, var(--finance-r9-copper-soft), rgb(7 25 31 / 28%) 42%, transparent 78%);
}

/* Overview summary: make the first business action visible without a hero wall. */
body.owner-shell-v1:not(.auth-required) .finance-overview-summary {
  padding: 14px 16px 16px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
  display: flex;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions::-webkit-scrollbar {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions :is(a, button) {
  min-height: 36px;
  padding-inline: 10px;
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: var(--finance-r9-surface-soft);
  color: var(--cc-ink-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions :is(a, button):hover,
body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions :is(a, button):focus-visible {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-blue-soft);
  color: var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  margin: 0 0 11px;
  padding: 9px 10px;
  border: 1px solid var(--cc-line);
  border-radius: 5px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-month-picker {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-month-picker .field,
body.owner-shell-v1:not(.auth-required) .finance-month-picker input,
body.owner-shell-v1:not(.auth-required) #financeMonthSelect,
body.owner-shell-v1:not(.auth-required) #financeMonthSelect-chart,
body.owner-shell-v1:not(.auth-required) #financeCalendarMonthSelect {
  width: 156px;
  min-width: 156px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-control {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-control-label {
  display: block;
  margin-bottom: 5px;
  color: var(--cc-ink-soft);
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .finance-range-control {
  display: flex;
  min-height: 40px;
  align-items: stretch;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--finance-r9-surface) 88%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-range-control button {
  min-width: 56px;
  min-height: 32px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--cc-ink-soft);
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) .finance-range-control button[aria-pressed="true"],
body.owner-shell-v1:not(.auth-required) .finance-range-control button.active {
  background: var(--finance-r9-blue-soft);
  color: var(--finance-r9-blue);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 72%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 6%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi {
  position: relative;
  min-height: 82px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  width: 2px;
  height: 38px;
  background: var(--kpi-tone, var(--finance-r9-blue));
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(1) { --kpi-tone: var(--finance-r9-coral); }
body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(2) { --kpi-tone: var(--finance-r9-green); }
body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(3) { --kpi-tone: var(--finance-r9-copper); }
body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(4) { --kpi-tone: var(--finance-r9-blue); }

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi span {
  display: block;
  color: var(--cc-ink-soft);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--kpi-tone);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary > span {
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid var(--cc-line);
  color: var(--cc-ink-soft);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary > span:last-child {
  border-right: 0;
}

/* Overview secondary blocks become readable rails instead of equal-weight cards. */
body.owner-shell-v1:not(.auth-required) :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) {
  padding: 13px 14px;
}

body.owner-shell-v1:not(.auth-required) :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) h3 {
  margin: 0;
  color: var(--cc-ink);
  font-size: 15px;
}

body.owner-shell-v1:not(.auth-required) :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) > p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-summary,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 52%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action {
  min-height: 34px;
  padding-inline: 11px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cc-ink-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:focus-visible {
  background: var(--finance-r9-blue-soft);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-record-row,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row,
body.owner-shell-v1:not(.auth-required) .finance-overview-anomaly-list > .row,
body.owner-shell-v1:not(.auth-required) .finance-overview-asset-list > .row {
  min-height: 44px;
  padding: 7px 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .finance-record-row:hover,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row:hover {
  background: var(--finance-r9-surface-soft);
  box-shadow: inset 3px 0 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-record-actions {
  gap: 5px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action {
  min-height: 30px;
  padding-inline: 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:focus-visible {
  border: 0;
  background: var(--finance-r9-blue-soft);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action.danger {
  border: 0;
  background: transparent;
  color: var(--finance-r9-coral);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .tag {
  min-height: 30px;
  padding-inline: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) > .command-console-head .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action {
  min-height: 32px;
  padding-inline: 7px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: inset 0 -1px var(--cc-line-strong);
  color: var(--cc-accent);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom {
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 94%, transparent);
  box-shadow: 0 -12px 30px color-mix(in srgb, var(--cc-ink) 10%, transparent);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom {
  background: rgb(7 27 35 / 94%);
  box-shadow: 0 -16px 34px rgb(0 4 7 / 38%);
}

/* Asset workbench: remove decorative charts and card piles in favor of scan-ready bands. */
body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-head {
  grid-template-columns: minmax(210px, .72fr) minmax(0, 2.28fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line-strong);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring {
  display: flex;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 92px;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 18px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: inset 3px 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring::before {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring span {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring b {
  overflow: hidden;
  color: var(--cc-ink);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi {
  display: grid;
  min-width: 0;
  min-height: 92px;
  align-content: center;
  gap: 6px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(3) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi span {
  color: var(--cc-ink-soft);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi strong {
  overflow: hidden;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 56%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) a {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cc-ink-soft);
  text-decoration: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) a:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-task-switcher, .asset-view-tabs) a:is(.active, [aria-pressed="true"]) {
  background: var(--finance-r9-blue-soft);
  box-shadow: inset 0 -2px var(--finance-r9-copper);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-capture-panel-v2,
  .asset-entry-reference-panel,
  .asset-view-panel-v2,
  .asset-history-panel
) {
  border-color: var(--cc-line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cc-surface) 90%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-human-ledger,
  .asset-ledger-section,
  .asset-save-preview,
  .asset-current-context,
  .asset-monthly-reconciliation,
  .asset-reference-card,
  .asset-status-card,
  .asset-history-filter,
  .asset-history-comparison
) {
  border-radius: 2px;
  background: color-mix(in srgb, var(--cc-surface-muted) 54%, transparent);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(.asset-flow-label, .asset-mode-note, .asset-reconcile-guide),
body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom .tag {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-capture-head p,
  .asset-capture-head .section-kicker,
  .asset-current-context > strong,
  .asset-human-ledger > small,
  .asset-reference-hint
) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 :is(
  .asset-clearance-toolbar .mini-action,
  .asset-clearance-toolbar .hud-button,
  .asset-quick-presets .mini-action,
  .asset-section-title .mini-action,
  .asset-capture-actions .hud-button,
  .asset-capture-actions .mini-action
) {
  border-radius: 2px;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-muted) 48%, transparent);
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-workflow-strip > .tag:first-child {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-workflow-strip > .tag:not(:first-child) {
  grid-column: 1 / -1;
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-workflow-strip .mini-action {
  min-height: 38px;
  padding-inline: 8px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-workflow-strip .mini-action:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-current-context {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .tag {
  border-radius: 2px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 > .asset-capture-actions-bottom .hud-button {
  min-height: 40px;
  border-radius: 2px;
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 > .asset-capture-actions-bottom .hud-button.danger {
  border-color: var(--finance-r9-coral);
  background: var(--finance-r9-coral);
  color: #fff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 > .asset-capture-actions-bottom .hud-button:not(.danger) {
  border-color: var(--cc-line-strong);
  background: transparent;
  color: var(--cc-ink);
}

/* Calendar surface. Existing FullCalendar/fallback markup remains the source of truth. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden),
body.owner-shell-v1:not(.auth-required) :is(.finance-calendar-detail-panel, .finance-calendar-detail-records-panel):not(.tab-panel-hidden) {
  height: auto;
  align-self: start;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
  overflow: hidden;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto minmax(0, auto);
  gap: 7px;
  align-items: end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(156px, 220px);
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cc-ink-soft);
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field > span {
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
  width: 156px;
  min-width: 156px;
  border: 1px solid var(--cc-line-strong);
  background: color-mix(in srgb, var(--finance-r9-surface) 90%, transparent);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
  align-self: center;
  color: var(--cc-ink-faint);
  font-size: 10px;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) .finance-calendar-scroll {
  min-width: 0;
  overflow: visible;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
  min-width: 0;
  padding: 9px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc {
  color: var(--cc-ink);
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-toolbar {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-number {
  padding: 6px 7px;
  color: var(--cc-ink-soft);
  font-size: 11px;
  text-decoration: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
  min-height: 76px;
  background: color-mix(in srgb, var(--finance-r9-surface) 84%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today {
  background: rgba(35, 131, 101, 0.08);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today .fc-daygrid-day-number {
  color: var(--finance-r9-green);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:focus-within,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[aria-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[data-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.is-selected,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.selected {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--finance-r9-blue);
  outline-offset: -2px;
  background: var(--finance-r9-blue-soft);
  box-shadow: inset 0 0 0 1px rgba(47, 99, 213, 0.32);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[aria-selected="true"]::after,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[data-selected="true"]::after,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.is-selected::after,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.selected::after {
  content: "已选";
  position: absolute;
  top: 4px;
  right: 5px;
  padding: 2px 4px;
  background: var(--finance-r9-blue);
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.1;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event {
  margin: 2px 3px;
  border: 0;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-expense {
  background: var(--finance-r9-coral-soft);
  color: var(--finance-r9-coral);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-income {
  background: var(--finance-r9-green-soft);
  color: var(--finance-r9-green);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
  padding: 14px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) > .command-console-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-day-list {
  min-height: 0;
  max-height: none;
  overflow: visible;
}

body.owner-shell-v1:not(.auth-required) :is(.finance-calendar-detail-panel, .finance-calendar-detail-records-panel):not(.tab-panel-hidden) .finance-calendar-detail-records__list {
  max-height: clamp(240px, 42vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-record-row {
  min-height: 48px;
}

/* Chart view: a deliberate set of visual reading tracks, not a single donut. */
body.owner-shell-v1:not(.auth-required) .finance-chart-overview-panel {
  padding: 15px 16px;
  border-top: 3px solid var(--finance-r9-copper);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-head {
  grid-template-columns: minmax(230px, .7fr) minmax(330px, 1.3fr);
  gap: 14px;
  align-items: end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-range-actions {
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--cc-line);
  border-radius: 5px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
  gap: 8px;
  margin-top: 12px;
  border: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div {
  min-height: 68px;
  padding: 9px 11px;
  border: 1px solid var(--cc-line);
  border-top: 3px solid var(--kpi-tone, var(--finance-r9-blue));
  border-radius: 3px;
  background: color-mix(in srgb, var(--cc-surface-strong) 76%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(1) { --kpi-tone: var(--finance-r9-green); }
body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(2) { --kpi-tone: var(--finance-r9-coral); }
body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(3) { --kpi-tone: var(--finance-r9-copper); }
body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(4) { --kpi-tone: var(--finance-r9-blue); }

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis strong {
  color: var(--kpi-tone);
  font-size: 20px;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-structure {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 14px;
  margin-top: 14px;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition {
  padding-right: 14px;
  border-right: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition .category-chart {
  min-height: 220px;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition .chart-bar-row {
  min-height: 38px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-composition .chart-donut {
  border-color: var(--cc-line-strong);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-drilldown {
  min-width: 0;
}

/* Desktop two-column calendar/detail composition. */
@media (min-width: 1181px) {
  body.owner-shell-v1:not(.auth-required) .finance-grid:has(.finance-calendar-panel:not(.tab-panel-hidden)) {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
    grid-column: span 8;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    grid-column: span 4;
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis,
  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-filter-bar {
    grid-template-columns: minmax(170px, 1fr) auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-range-control {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-grid {
    gap: 9px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-summary,
  body.owner-shell-v1:not(.auth-required) .finance-chart-overview-panel {
    padding: 11px 10px 12px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head,
  body.owner-shell-v1:not(.auth-required) .finance-chart-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
    justify-content: flex-start;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-month-picker .field,
  body.owner-shell-v1:not(.auth-required) .finance-month-picker input,
  body.owner-shell-v1:not(.auth-required) #financeMonthSelect,
  body.owner-shell-v1:not(.auth-required) #financeMonthSelect-chart,
  body.owner-shell-v1:not(.auth-required) #financeCalendarMonthSelect {
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-range-control {
    width: 100%;
    overflow-x: auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-range-control button {
    flex: 1 0 64px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis,
  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi {
    min-height: 68px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi strong,
  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis strong {
    font-size: 17px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-range-summary > span:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
    grid-column: 1 / -1;
    padding-top: 3px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field > span {
    display: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll {
    overflow-x: clip !important;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
    width: 100%;
    min-width: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 64px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event .fc-event-title {
    width: 100%;
    overflow: visible;
    font-size: 9px;
    line-height: 1.05;
    text-align: center;
    text-indent: 0;
    text-overflow: clip;
    white-space: normal;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event {
    margin: 1px;
    padding: 1px 2px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-structure {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-composition {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--cc-line);
    padding-bottom: 12px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 {
    padding-bottom: calc(var(--cc-mobile-nav-height, 58px) + 24px);
    scroll-margin-bottom: var(--cc-mobile-content-bottom-clearance, 82px);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring {
    min-height: 76px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .ring.asset-net-ring b {
    font-size: 24px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi {
    min-height: 70px;
    padding: 10px 12px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(2) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line);
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 .asset-balance-kpis .kpi:nth-child(4) {
    grid-column: 1 / -1;
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom {
    bottom: calc(var(--cc-mobile-nav-height, 58px) + 8px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    border-radius: 4px;
  }

  body.owner-shell-v1:not(.auth-required) .asset-workbench-v2 > .asset-capture-actions-bottom > :last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1:not(.auth-required) .finance-grid * {
    transition-duration: 0.01ms !important;
  }
}

/* R9.2 art pass: indexed ledger material, quieter copy and deliberate controls. */
body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-surface: rgb(248 250 245 / 76%);
  --finance-r9-surface-soft: rgb(241 246 241 / 60%);
  --finance-r9-ledger-line: rgb(35 82 76 / 8%);
  --finance-r9-command: rgb(16 57 59 / 96%);
  --finance-r9-command-end: rgb(25 78 75 / 92%);
  --finance-r9-command-ink: #f5faf5;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required):has(#moduleStage[data-active-module-tab-panel^="finance-"]) {
  --finance-r9-surface: rgb(5 27 34 / 64%);
  --finance-r9-surface-soft: rgb(9 39 45 / 52%);
  --finance-r9-ledger-line: rgb(137 205 193 / 8%);
  --finance-r9-command: rgb(5 30 36 / 88%);
  --finance-r9-command-end: rgb(14 58 62 / 84%);
  --finance-r9-command-ink: #eef8f3;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel {
  border-color: color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  background: linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-surface) 96%, transparent), var(--finance-r9-surface));
  box-shadow:
    inset 0 1px rgb(255 255 255 / 42%),
    0 16px 34px rgb(15 50 46 / 10%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-grid .panel {
  box-shadow:
    inset 0 1px rgb(220 255 247 / 6%),
    0 18px 38px rgb(0 5 8 / 28%);
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel) {
  position: relative;
  isolation: isolate;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel)::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 58px;
  height: 58px;
  pointer-events: none;
  background: none;
  clip-path: polygon(38% 0, 100% 0, 100% 100%);
  opacity: .34;
}

body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head,
body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head {
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--finance-r9-command), var(--finance-r9-command-end));
  box-shadow: inset 4px 0 var(--finance-r9-copper), inset 0 1px rgb(255 255 255 / 8%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head {
  margin: -14px 0 12px;
  padding: 13px 15px 12px 18px;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head {
  margin: -13px 0 10px;
  padding: 11px 12px 10px 16px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head h3,
body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head h3 {
  color: var(--finance-r9-command-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 6%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action {
  border-right-color: rgb(231 243 237 / 16%);
  color: rgb(239 247 243 / 84%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions .mini-action:focus-visible {
  background: rgb(255 255 255 / 12%);
  color: #ffffff;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis {
  border-color: color-mix(in srgb, var(--cc-line-strong) 86%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--finance-r9-surface) 86%, white 5%), var(--finance-r9-surface));
  box-shadow: inset 0 1px rgb(255 255 255 / 48%), 0 10px 24px rgb(17 53 49 / 7%);
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi::before {
  top: 13px;
  width: 3px;
  height: 44px;
}

body.owner-shell-v1:not(.auth-required) .finance-overview-kpis .kpi span {
  color: var(--cc-ink-faint);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border-color: var(--finance-r9-control-edge);
  border-radius: 2px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-green) 8%, transparent), transparent 16px),
    var(--finance-r9-control-bg);
  box-shadow: inset 3px 0 color-mix(in srgb, var(--finance-r9-green) 34%, transparent), inset 0 1px rgb(255 255 255 / 28%);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):hover {
  border-color: color-mix(in srgb, var(--finance-r9-blue) 62%, var(--finance-r9-control-edge));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-blue) 9%, transparent), transparent 18px),
    var(--finance-r9-control-bg-hover);
}

body.owner-shell-v1:not(.auth-required) .finance-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  outline: 0;
  border-color: var(--finance-r9-green);
  background: var(--finance-r9-control-bg-hover);
  box-shadow: inset 3px 0 var(--finance-r9-green), 0 0 0 3px var(--finance-r9-control-focus), 0 8px 18px rgb(17 74 67 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-grid .workbench-actions .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage #financeBudgetSubmit {
  min-height: 32px;
  padding-inline: 10px;
  border: 1px solid color-mix(in srgb, var(--finance-r9-control-edge) 86%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--finance-r9-control-bg) 72%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 14%);
  color: var(--cc-ink-soft);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-grid .workbench-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-grid .workbench-actions .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-hot-day-row > .mini-action:focus-visible,
body.owner-shell-v1:not(.auth-required) #moduleStage #financeBudgetSubmit:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage #financeBudgetSubmit:focus-visible {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-blue-soft);
  box-shadow: inset 0 1px rgb(255 255 255 / 18%), 0 6px 14px rgb(20 77 73 / 10%);
  color: var(--cc-ink);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head .workbench-actions .mini-action {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 7%);
  box-shadow: none;
  color: rgb(239 247 243 / 86%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head .workbench-actions .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head .workbench-actions .mini-action:focus-visible {
  border-color: rgb(231 243 237 / 32%);
  background: rgb(255 255 255 / 14%);
  box-shadow: none;
  color: #ffffff;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-record-actions .mini-action.danger {
  border-color: color-mix(in srgb, var(--finance-r9-coral) 54%, transparent);
  background: color-mix(in srgb, var(--finance-r9-coral-soft) 68%, transparent);
  color: var(--finance-r9-coral);
}

body.owner-shell-v1:not(.auth-required) .finance-record-row,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row,
body.owner-shell-v1:not(.auth-required) .finance-overview-anomaly-list > .row,
body.owner-shell-v1:not(.auth-required) .finance-overview-asset-list > .row {
  padding-inline: 6px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1:not(.auth-required) .finance-record-row:hover,
body.owner-shell-v1:not(.auth-required) .finance-hot-day-row:hover {
  background: color-mix(in srgb, var(--finance-r9-blue-soft) 42%, transparent);
  box-shadow: inset 3px 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .command-console-head p,
body.owner-shell-v1:not(.auth-required) .finance-quick-panel > .row.muted-row,
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel > .command-console-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:focus-within,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[aria-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day[data-selected="true"],
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.is-selected,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day.selected {
  outline-color: var(--finance-r9-blue);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--finance-r9-blue) 76%, transparent), 0 0 18px var(--finance-r9-control-focus);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-grid {
    padding-bottom: calc(var(--cc-mobile-nav-height, 58px) + 28px);
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-summary > .command-console-head {
    margin: -11px -10px 10px;
    padding: 12px 10px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets
  ) > .command-console-head {
    margin: -13px -14px 9px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body.owner-shell-v1:not(.auth-required) .finance-overview-primary-actions::after {
    content: "";
    flex: 0 0 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-grid .panel:not(.chart-panel):not(.finance-calendar-panel)::after {
    width: 42px;
    height: 42px;
    opacity: .24;
  }
}

/* R9.3 cross-tab header system: every Finance workflow reads as one instrument. */
body.owner-shell-v1:not(.auth-required) :is(
  .finance-quick-panel,
  .finance-calendar-detail-panel,
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head {
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--finance-r9-command), var(--finance-r9-command-end));
  box-shadow: inset 4px 0 var(--finance-r9-copper), inset 0 1px rgb(255 255 255 / 8%);
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head {
  margin: -15px -16px 12px;
  padding: 13px 15px 12px 18px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel > .command-console-head {
  margin: -14px -14px 11px;
  padding: 12px 13px 11px 17px;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-quick-panel,
  .finance-calendar-detail-panel,
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head h3 {
  color: var(--finance-r9-command-ink);
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head :is(.section-kicker, .finance-overview-control-label, .field > small, .tag) {
  color: rgb(222 238 231 / 68%);
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-quick-panel,
  .finance-calendar-detail-panel,
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head p {
  display: none;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head .workbench-actions,
body.owner-shell-v1:not(.auth-required) .finance-chart-head .finance-chart-range-actions {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 6%);
  box-shadow: none;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-chart-overview-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) > .command-console-head .workbench-actions .mini-action {
  border-color: rgb(231 243 237 / 18%);
  background: rgb(255 255 255 / 7%);
  box-shadow: none;
  color: rgb(239 247 243 / 86%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel > h3 {
  margin: -16px -16px 0;
  padding: 13px 15px 12px 18px;
  border-bottom: 1px solid rgb(226 242 235 / 16%);
  background: linear-gradient(112deg, var(--finance-r9-command), var(--finance-r9-command-end));
  box-shadow: inset 4px 0 var(--finance-r9-copper), inset 0 1px rgb(255 255 255 / 8%);
  color: var(--finance-r9-command-ink);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
  border-color: color-mix(in srgb, var(--cc-line-strong) 84%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--finance-r9-surface-soft) 88%, white 4%), var(--finance-r9-surface-soft));
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 84%, transparent);
  border-radius: 4px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div {
  min-height: 76px;
  border: 0;
  border-right: 1px solid var(--cc-line);
  border-top: 3px solid var(--kpi-tone, var(--finance-r9-blue));
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-trends-shell,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel,
  .finance-quick-context,
  [data-tab-panel="finance-ledger"],
  [data-tab-panel="finance-budget"]
) {
  background: linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-surface) 96%, transparent), var(--finance-r9-surface));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-grid :is(.row.muted-row, .empty-state, .finance-ledger-inspector__empty) {
  color: #9bb7b2;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-grid :is(.row.muted-row, .empty-state, .finance-ledger-inspector__empty) small {
  color: #8ca9a5;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) :is(
    .finance-chart-overview-panel,
    .finance-budget-visual-panel,
    .finance-chart-reading-panel,
    [data-tab-panel="finance-ledger"],
    [data-tab-panel="finance-budget"]
  ) > .command-console-head {
    margin: -11px -10px 10px;
    padding: 12px 10px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-panel > h3 {
    margin: -16px -16px 0;
    padding: 12px 10px 11px 14px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(2n) {
    border-right: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-chart-kpis > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--cc-line);
  }
}

/* R9.4 calendar instrument: richer date states, measured ornament and a stable detail rail. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
  position: relative;
  isolation: isolate;
  border-color: color-mix(in srgb, var(--cc-line-strong) 92%, transparent);
  background: var(--finance-r9-surface);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden)::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 76px;
  height: 52px;
  background: none;
  clip-path: polygon(38% 0, 100% 0, 100% 100%);
  opacity: .44;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
  grid-template-columns: 44px minmax(190px, 1fr) auto 44px;
  gap: 8px;
  align-items: center;
  padding: 11px 13px 9px;
  border-bottom-color: color-mix(in srgb, var(--cc-line-strong) 72%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--finance-r9-surface-soft) 90%, white 4%), var(--finance-r9-surface-soft));
  box-shadow: inset 0 1px rgb(255 255 255 / 28%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav {
  width: 44px;
  min-width: 44px;
  min-height: 40px;
  padding: 0;
  border-radius: 2px;
  border-color: color-mix(in srgb, var(--finance-r9-control-edge) 94%, transparent);
  background: color-mix(in srgb, var(--finance-r9-control-bg) 76%, transparent);
  color: var(--cc-ink-soft);
  font-size: 18px;
  box-shadow: inset 0 1px rgb(255 255 255 / 18%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav:hover,
body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav:focus-visible {
  border-color: var(--finance-r9-blue);
  background: var(--finance-r9-blue-soft);
  color: var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
  grid-template-columns: auto minmax(156px, 230px);
  gap: 9px;
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
  width: 100%;
  min-width: 156px;
  border-left: 3px solid var(--finance-r9-copper);
  border-radius: 2px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage #financeCalendarMonthApply {
  min-height: 40px;
  padding-inline: 17px;
  border-radius: 2px;
  border-color: color-mix(in srgb, var(--finance-r9-action-start) 78%, white);
  background: linear-gradient(135deg, var(--finance-r9-action-start), var(--finance-r9-action-end));
  color: var(--finance-r9-action-ink);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%), 0 7px 16px rgb(18 77 79 / 18%);
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
  grid-column: 1 / -1;
  padding: 1px 0 0 52px;
  color: var(--cc-ink-faint);
  font-size: 10px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
  padding: 10px 12px 12px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-scrollgrid {
  overflow: hidden;
  border-color: color-mix(in srgb, var(--cc-line-strong) 92%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--finance-r9-surface) 78%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 22%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell {
  border-color: rgb(222 239 233 / 13%);
  background: linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-command) 96%, transparent), var(--finance-r9-command-end));
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion {
  padding: 9px 7px;
  color: rgb(239 248 243 / 88%);
  font-size: 11px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc :is(.fc-day-sat, .fc-day-sun) .fc-daygrid-day-frame {
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-copper-soft) 28%, transparent), transparent 54%),
    color-mix(in srgb, var(--finance-r9-surface) 84%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
  min-height: 84px;
  background:
    linear-gradient(112deg, rgb(255 255 255 / 6%), transparent 48%),
    color-mix(in srgb, var(--finance-r9-surface) 84%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background:
    linear-gradient(112deg, color-mix(in srgb, var(--finance-r9-blue-soft) 52%, transparent), transparent 72%),
    var(--finance-r9-surface-soft);
  box-shadow: inset 3px 0 var(--finance-r9-blue);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-number {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  margin: 4px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--cc-ink-soft);
  font-size: 11px;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today {
  background: color-mix(in srgb, var(--finance-r9-green-soft) 48%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--finance-r9-green) 36%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-today .fc-daygrid-day-number {
  border-color: var(--finance-r9-green);
  background: var(--finance-r9-green);
  color: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--finance-r9-green) 16%, transparent);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-day-other {
  opacity: .42;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event {
  margin: 2px 4px;
  border-left: 3px solid currentColor;
  border-radius: 2px;
  padding: 3px 5px;
  box-shadow: inset 0 1px rgb(255 255 255 / 12%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-expense {
  background: linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-coral-soft) 94%, transparent), color-mix(in srgb, var(--finance-r9-coral-soft) 58%, transparent));
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .finance-calendar-event.is-income {
  background: linear-gradient(90deg, color-mix(in srgb, var(--finance-r9-green-soft) 94%, transparent), color-mix(in srgb, var(--finance-r9-green-soft) 58%, transparent));
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
  overflow: hidden;
  min-width: 0;
  container-name: finance-calendar-detail;
  container-type: inline-size;
  background:
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 48%),
    var(--finance-r9-surface);
}

/* The day's ledger is a distinct card with one predictable scroll rail. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records {
  display: flex;
  width: 100%;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-top: 3px solid var(--finance-r9-copper);
  border-radius: 4px;
  background: color-mix(in srgb, var(--finance-r9-surface-soft) 78%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 18%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records-panel:not(.tab-panel-hidden) {
  align-self: start;
  margin-top: 0;
  overflow: hidden;
  padding: 14px;
  border-top: 3px solid var(--finance-r9-copper);
  background:
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 48%),
    var(--finance-r9-surface);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records-panel:not(.tab-panel-hidden) .finance-calendar-detail-records__list {
  flex: 1 1 auto;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
}

/* The shared art frame marks nested lists as clipped; the ledger card owns its scroll rail. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .finance-calendar-detail-records-panel:not(.tab-panel-hidden) > .finance-calendar-detail-records__list[data-art-frame-owner="true"][data-art-tier="nested"] {
  overflow-y: scroll !important;
  overflow-x: hidden !important;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records__head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records__head h3 {
  margin: 2px 0 0;
  color: var(--cc-ink);
  font-size: 14px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-records__list {
  min-height: 0;
  max-height: clamp(240px, 42vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) :is(div, form, header, label, span, strong, small, p, button) {
  min-width: 0;
  writing-mode: horizontal-tb;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .stacked-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-radius: 3px;
  background: var(--finance-r9-surface-soft);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .stacked-kpis .kpi {
  min-height: 76px;
  border: 0;
  border-top: 3px solid var(--finance-r9-coral);
  border-right: 1px solid var(--cc-line);
  border-radius: 0;
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .stacked-kpis .kpi:last-child {
  border-top-color: var(--finance-r9-green);
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor {
  width: 100%;
  margin: 12px 0;
  padding: 12px;
  border-color: color-mix(in srgb, var(--cc-line-strong) 82%, transparent);
  border-left: 3px solid var(--finance-r9-copper);
  border-radius: 3px;
  background: color-mix(in srgb, var(--finance-r9-surface-soft) 86%, transparent);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--cc-line);
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header > div > small,
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor__status:not([data-kind]) {
  display: none;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header .hud-button {
  width: auto;
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 2px;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
  width: 100%;
  margin-top: 1px;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor__status[data-kind] {
  margin: 0;
  padding: 8px 9px;
  border-left: 3px solid var(--finance-r9-blue);
  background: color-mix(in srgb, var(--finance-r9-blue-soft) 46%, transparent);
  font-size: 10px;
}

@media (min-width: 1181px) and (max-width: 1380px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-panel:not(.tab-panel-hidden) {
    grid-column: span 7;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    grid-column: span 5;
  }
}

@media (min-width: 761px) and (max-width: 1380px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) {
    display: block;
    grid-template-columns: none;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel:not(.tab-panel-hidden) > :is(.command-console-head, .kpis, .finance-day-editor, .finance-day-list) {
    width: 100%;
    grid-column: auto;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container finance-calendar-detail (max-width: 460px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header,
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header .hud-button {
    width: 100%;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    padding: 9px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav {
    width: 40px;
    min-width: 40px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage #financeCalendarMonthApply {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
    padding-left: 0;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-scroll .finance-calendar-v2 {
    padding: 8px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-frame {
    min-height: 60px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion {
    padding: 7px 2px;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-daygrid-day-number {
    min-width: 23px;
    height: 23px;
    margin: 2px;
    font-size: 10px;
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header,
  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-entry-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel .finance-day-editor header .hud-button {
    width: 100%;
  }
}

/* R10 finance ornaments: varied curved motifs without obscuring ledger data. */
body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-kpis,
  .asset-workbench-v2 .asset-balance-kpis,
  .finance-chart-kpis
) {
  background-image:
    radial-gradient(ellipse 118px 56px at 100% 0, transparent 69%, var(--r96-gold-line) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 114px at 100% 0, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 36px at 0 100%, transparent 69%, var(--r96-gold-line-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 44px) 34px, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 62%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-summary,
  .finance-chart-overview-panel,
  .finance-calendar-panel,
  .asset-workbench-v2
) {
  background-image:
    radial-gradient(circle at 92% 13%, transparent 0 34px, var(--r96-gold-line) 35px 36px, transparent 37px 45px, var(--r96-gold-line-soft) 46px 47px, transparent 48px),
    radial-gradient(ellipse 62px 30px at 92% 13%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 30px 60px at 92% 13%, transparent 66%, var(--r96-gold-line-soft) 67% 68%, transparent 69%),
    radial-gradient(circle at 92% 13%, var(--r96-gold-point) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(255 255 255 / 6%), transparent 58%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .finance-calendar-detail-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel
) {
  background-image:
    radial-gradient(ellipse 8px 17px at 100% 50%, transparent 61%, var(--r96-gold-line-soft) 63% 67%, transparent 69%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: right top, 0 0;
  background-repeat: repeat-y, no-repeat;
  background-size: 13px 36px, auto;
}

body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-primary-actions,
  .finance-overview-range-control,
  .asset-workbench-v2 .asset-task-switcher,
  .asset-workbench-v2 .asset-view-tabs,
  .finance-chart-range-actions
) {
  background-image:
    radial-gradient(ellipse 16px 7px at 50% 100%, transparent 62%, var(--r96-gold-line) 64% 67%, transparent 69%),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 62%);
  background-position: left bottom, 0 0;
  background-repeat: repeat-x, no-repeat;
  background-size: 34px 12px, auto;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-panel > h3,
body.owner-shell-v1:not(.auth-required) .finance-calendar-detail-panel > .command-console-head {
  background-image:
    radial-gradient(ellipse 98px 44px at 100% 0, transparent 68%, var(--r96-gold-line) 69% 70%, transparent 71%),
    radial-gradient(ellipse 58px 94px at 100% 0, transparent 68%, var(--r96-gold-line-soft) 69% 70%, transparent 71%),
    linear-gradient(112deg, rgb(15 57 59 / 97%), rgb(25 76 76 / 92%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(
  .finance-overview-summary,
  .finance-chart-overview-panel,
  .finance-calendar-panel,
  .asset-workbench-v2,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .finance-calendar-detail-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel
) {
  background-color: rgb(5 25 32 / 68%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) :is(
    .finance-overview-summary,
    .finance-chart-overview-panel,
    .finance-calendar-panel,
    .asset-workbench-v2
  ) {
    background-position: 135% -20px, 135% -20px, 135% -20px, 135% -20px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets,
    .finance-calendar-detail-panel,
    .finance-budget-visual-panel,
    .finance-chart-reading-panel
  ) {
    background-size: 10px 30px, auto;
  }
}

/* R10.1 finance filigree: fan, braided arc and double-corner motifs by workflow. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 8deg, var(--r101-gold-soft) 8deg 10deg, transparent 10deg 20deg, var(--r101-gold-mid) 20deg 22deg, transparent 22deg 34deg, var(--r101-gold-soft) 34deg 36deg, transparent 36deg 50deg, var(--r101-gold-mid) 50deg 52deg, transparent 52deg 68deg),
    radial-gradient(ellipse 118px 56px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 76px 114px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 44px) 34px, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(112deg, rgb(255 255 255 / 8%), transparent 62%);
  background-position: left bottom, center, center, center, 0 0;
  background-repeat: no-repeat;
  background-size: 128px 78px, auto, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-summary,
  .finance-chart-overview-panel,
  .asset-workbench-v2
) {
  background-image:
    radial-gradient(circle at 91% 14%, transparent 0 34px, var(--r101-gold-mid) 35px 36px, transparent 37px 45px, var(--r101-gold-soft) 46px 47px, transparent 48px),
    radial-gradient(ellipse 66px 31px at 91% 14%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 31px 64px at 91% 14%, transparent 66%, var(--r101-gold-soft) 67% 68%, transparent 69%),
    radial-gradient(ellipse 116px 54px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 72px 110px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at 91% 14%, var(--r101-gold-strong) 0 2px, transparent 3px),
    linear-gradient(118deg, rgb(255 255 255 / 7%), transparent 58%) !important;
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .finance-calendar-detail-panel,
  .finance-budget-visual-panel,
  .finance-chart-reading-panel
) {
  background-image:
    radial-gradient(ellipse 112px 52px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 70px 108px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 94px 44px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 56px 90px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 40px) 31px, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%) !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-primary-actions,
  .finance-overview-range-control,
  .asset-workbench-v2 .asset-task-switcher,
  .asset-workbench-v2 .asset-view-tabs,
  .finance-chart-range-actions
) {
  background-image:
    conic-gradient(from 183deg at 0 100%, transparent 0 8deg, var(--r101-gold-soft) 8deg 10deg, transparent 10deg 20deg, var(--r101-gold-mid) 20deg 22deg, transparent 22deg 34deg, var(--r101-gold-soft) 34deg 36deg, transparent 36deg 50deg, var(--r101-gold-mid) 50deg 52deg, transparent 52deg 66deg),
    radial-gradient(ellipse 98px 46px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 60px 94px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(circle at calc(100% - 24px) 50%, transparent 0 9px, var(--r101-gold-mid) 10px 11px, transparent 12px 16px, var(--r101-gold-soft) 17px 18px, transparent 19px),
    linear-gradient(180deg, rgb(255 255 255 / 5%), transparent 62%);
  background-position: left bottom, right bottom, right bottom, right center, 0 0;
  background-repeat: no-repeat;
  background-size: 116px 70px, auto, auto, auto, auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-v2.fc {
  background-image:
    radial-gradient(ellipse 132px 62px at 100% 0, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 82px 126px at 100% 0, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    radial-gradient(ellipse 112px 52px at 0 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 68px 106px at 0 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%);
  background-repeat: no-repeat;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-panel > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-detail-panel > .command-console-head {
  background-image:
    radial-gradient(ellipse 104px 48px at 100% 0, transparent 68%, var(--r101-gold-mid) 69% 70%, transparent 71%),
    radial-gradient(ellipse 62px 100px at 100% 0, transparent 68%, var(--r101-gold-soft) 69% 70%, transparent 71%),
    radial-gradient(circle at 18px 50%, transparent 0 8px, var(--r101-gold-soft) 9px 10px, transparent 11px 15px, var(--r101-gold-soft) 16px 17px, transparent 18px),
    linear-gradient(112deg, rgb(15 57 59 / 97%), rgb(25 76 76 / 92%));
  background-repeat: no-repeat;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-panel > h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-detail-panel > .command-console-head {
  background-image:
    radial-gradient(ellipse 104px 48px at 100% 0, transparent 68%, var(--r101-gold-mid) 69% 70%, transparent 71%),
    radial-gradient(ellipse 62px 100px at 100% 0, transparent 68%, var(--r101-gold-soft) 69% 70%, transparent 71%),
    radial-gradient(circle at 18px 50%, transparent 0 8px, var(--r101-gold-soft) 9px 10px, transparent 11px 15px, var(--r101-gold-soft) 16px 17px, transparent 18px),
    linear-gradient(112deg, rgb(5 27 34 / 94%), rgb(15 61 65 / 86%));
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis) {
    background-position: -30px 110%, 145% -22px, 145% -22px, 145% -22px, 0 0;
    background-size: 100px 62px, auto, auto, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-summary,
    .finance-chart-overview-panel,
    .asset-workbench-v2
  ) {
    background-position: 138% -18px, 138% -18px, 138% -18px, -54px 112%, -54px 112%, 138% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets,
    .finance-calendar-detail-panel,
    .finance-budget-visual-panel,
    .finance-chart-reading-panel
  ) {
    background-position: 142% -18px, 142% -18px, -52px 112%, -52px 112%, 142% -18px, 0 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-primary-actions,
    .finance-overview-range-control,
    .asset-workbench-v2 .asset-task-switcher,
    .asset-workbench-v2 .asset-view-tabs,
    .finance-chart-range-actions
  ) {
    background-size: 88px 54px, auto, auto, auto, auto;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-calendar-v2.fc {
    background-position: 145% -20px, 145% -20px, -62px 112%, -62px 112%;
  }
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel {
  border-top: 3px solid var(--finance-r9-green);
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel > .command-console-head {
  margin: -14px -16px 0;
  padding: 13px 16px 12px;
  border-bottom: 1px solid var(--cc-line);
  background: linear-gradient(90deg, var(--finance-r9-green-soft), transparent 48%);
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel :is(input, select) {
  border-color: var(--finance-r9-control-edge);
  background: var(--finance-r9-control-bg);
}

body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel :is(input, select):focus {
  border-color: var(--finance-r9-green);
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel {
  background: color-mix(in srgb, var(--finance-r9-surface) 90%, transparent);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) .finance-category-manager-panel > .command-console-head {
    align-items: flex-start;
  }
}

/* R10.2 keeps the filter workflow clean while framing it with two distinct motifs. */
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-filter-bar {
  background-image:
    conic-gradient(from 184deg at 0 100%, transparent 0 9deg, var(--r101-gold-soft) 9deg 11deg, transparent 11deg 24deg, var(--r101-gold-mid) 24deg 26deg, transparent 26deg 41deg, var(--r101-gold-soft) 41deg 43deg, transparent 43deg 58deg),
    radial-gradient(circle at calc(100% - 28px) 26px, transparent 0 11px, var(--r101-gold-mid) 12px 13px, transparent 14px 19px, var(--r101-gold-soft) 20px 21px, transparent 22px),
    radial-gradient(circle at calc(100% - 28px) 26px, var(--r101-gold-strong) 0 1.5px, transparent 2.5px),
    radial-gradient(ellipse 106px 50px at 100% 100%, transparent 69%, var(--r101-gold-mid) 70% 71%, transparent 72%),
    radial-gradient(ellipse 66px 102px at 100% 100%, transparent 69%, var(--r101-gold-soft) 70% 71%, transparent 72%),
    linear-gradient(112deg, rgb(255 255 255 / 5%), transparent 58%);
  background-position: left bottom, right top, right top, center, center, 0 0;
  background-repeat: no-repeat;
  background-size: 112px 68px, auto, auto, auto, auto, auto;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-filter-bar {
  background-color: rgb(5 25 32 / 68%);
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-filter-bar {
    background-position: -38px 112%, 132% -8px, 132% -8px, 140% 116%, 140% 116%, 0 0;
    background-size: 88px 54px, auto, auto, auto, auto, auto;
  }
}

/* R10.4: narrow cards keep their content inside the real card boundary. */
/* The base panel uses two-axis auto scrolling. In these overview cards the
 * vertical scrollbar gutter otherwise creates a false 16px horizontal track. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-summary,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) {
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-summary > .command-console-head,
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-ledger,
    .finance-overview-hot-days,
    .finance-overview-anomalies,
    .finance-overview-assets
  ) > .command-console-head {
    margin-inline: 0;
  }
}

/* R10.5 amount legibility: reserve a real numeric column in every finance composition bar. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row {
  grid-template-columns: minmax(72px, 112px) minmax(72px, 1fr) minmax(96px, max-content);
  gap: 12px;
  min-width: 0;
  padding: 7px 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--cc-ink-soft, #536a67);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > .bar-track {
  min-width: 0;
  border-color: color-mix(in srgb, var(--cc-accent, #2f7774) 24%, var(--cc-line, #d7dfdb));
  background: color-mix(in srgb, var(--cc-accent, #2f7774) 8%, var(--cc-surface-muted, #edf2ef));
  box-shadow: inset 0 1px 2px rgb(14 44 43 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > strong {
  min-width: 96px;
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, var(--cc-line-strong, #bdcbc5) 78%, transparent);
  color: var(--cc-ink, #173c3e) !important;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-grid,
  [data-overview-canvas-widget="finance"]
) .bar-row > strong {
  border-left-color: rgb(137 187 181 / 24%);
  color: #eef8f5 !important;
}

@media (max-width: 640px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-grid,
    [data-overview-canvas-widget="finance"]
  ) .bar-row {
    grid-template-columns: minmax(62px, .8fr) minmax(64px, 1.25fr) minmax(82px, max-content);
    gap: 7px;
    padding: 7px 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-grid,
    [data-overview-canvas-widget="finance"]
  ) .bar-row > strong {
    min-width: 82px;
    padding-left: 7px;
    font-size: 12px;
  }
}

/* R10.7 responsive truth: one page scroll, readable history, and deliberate danger states. */
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-panel,
  .asset-history-filter,
  .asset-history-summary > div,
  .asset-history-comparison,
  .asset-history-detail,
  .asset-history-list,
  .asset-history-row
) {
  border-color: rgb(126 196 189 / 22%);
  background: rgb(5 25 32 / 72%);
  color: #eaf5f1;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-summary span,
  .asset-history-comparison span,
  .asset-history-comparison small,
  .asset-history-detail-head span,
  .asset-history-row small
) {
  color: #9db9b4;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-summary strong,
  .asset-history-comparison strong,
  .asset-history-detail-head strong,
  .asset-history-row strong,
  .asset-history-row b
) {
  color: #eef8f5;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
  .asset-history-row:hover,
  .asset-history-row.active,
  .asset-history-row[data-asset-history-active="true"]
) {
  border-color: rgb(121 201 189 / 42%);
  background: rgb(17 58 62 / 82%);
  box-shadow: inset 3px 0 0 var(--r9-brass, #b48645);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-void-confirmation [data-finance-void-phrase-input] {
  border-color: color-mix(in srgb, var(--cc-danger, #c96558) 58%, var(--cc-line-strong));
  border-bottom-color: var(--cc-danger, #c96558);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-void-confirmation [data-finance-void-phrase-input]:focus {
  border-color: var(--cc-danger, #c96558);
  box-shadow: inset 0 -2px var(--cc-danger, #c96558), 0 0 0 3px rgb(201 101 88 / 16%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"].asset-workbench-v2 :is(
    .asset-history-list,
    .asset-view-panel-v2 .asset-detail-list
  ) {
    max-height: none;
    overflow: visible;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-ledger-v2__actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .finance-ledger-v2__action {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 11px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-cashflow-column > small,
    .finance-net-labels,
    .finance-category-trend-labels
  ) {
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
  }
}

/* Final specificity layer for the selected date and narrow inspector. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc :is(
  .fc-daygrid-day[aria-selected="true"],
  .fc-daygrid-day[data-selected="true"],
  .fc-daygrid-day.is-selected,
  .fc-daygrid-day.selected
) .fc-daygrid-day-frame {
  background: color-mix(in srgb, var(--finance-r9-blue-soft) 76%, var(--finance-r9-surface) 24%) !important;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--finance-r9-blue) 82%, transparent) !important;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc :is(
  .fc-daygrid-day[aria-selected="true"],
  .fc-daygrid-day[data-selected="true"],
  .fc-daygrid-day.is-selected,
  .fc-daygrid-day.selected
) .fc-daygrid-day-number {
  border-color: var(--finance-r9-blue) !important;
  background: var(--finance-r9-blue) !important;
  color: #ffffff !important;
  font-weight: 900;
}

body.owner-shell-v1:not(.auth-required) .finance-calendar-v2-fallback button[data-selected="true"] {
  border: 2px solid var(--finance-r9-blue);
  background: var(--finance-r9-blue);
  color: #ffffff;
  box-shadow: 0 0 0 3px var(--finance-r9-control-focus);
  font-weight: 900;
}

html:not([data-theme="night"]) body.owner-shell-v1:not(.auth-required) :is(
  .finance-month-picker input[type="month"],
  .finance-calendar-month-field input
) {
  color-scheme: light !important;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__edit .finance-entry-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__edit .command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__edit .command-actions .hud-button {
  flex: 1 1 112px;
  min-width: 112px;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__footer {
  width: 100%;
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__footer .finance-ledger-v2__actions {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

body.owner-shell-v1:not(.auth-required) .finance-ledger-inspector__footer .finance-ledger-v2__action {
  flex: 1 1 88px;
  min-width: 88px;
  min-height: 36px;
  padding: 6px 10px;
  white-space: nowrap;
}

/* Single-editor balance sheet: keep the editable form readable beside history. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr) !important;
  align-items: start;
  gap: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

/* Long-history reference card: show more periods without stretching the page. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card[data-asset-reference-history="true"] {
  min-height: 300px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--finance-r9-copper, #b48645) rgb(41 89 82 / 10%);
  padding-right: 4px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list::-webkit-scrollbar {
  width: 8px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--finance-r9-copper, #b48645);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list::-webkit-scrollbar-track {
  border-radius: 8px;
  background: rgb(41 89 82 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-row small b {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-asset-amount {
  color: #16735d;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-liability-amount {
  color: #b0473e;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card[data-asset-reference-history="true"] {
    min-height: 0;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-history-list {
    max-height: 280px;
  }
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-view-panel-v2 {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 16px;
  align-items: end;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head h4 {
  max-width: none;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-human-ledger {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-capture-panel-v2, .asset-entry-reference-panel, .asset-view-panel-v2) {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head h4 {
    white-space: normal;
  }
}

/* Keep comparison metadata out of the editing flow. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-delta,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-draft-delta],
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-human-ledger,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-save-preview {
  display: none !important;
}


/* source: styles/personal-preferences-r1.css */
/* Personal settings: visual values are scoped to the authenticated shell. */
body.owner-shell-v1 .settings-action-grid { align-items: stretch; }
body.owner-shell-v1 .settings-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
body.owner-shell-v1 .settings-panel-heading h3 { margin: 4px 0 5px; }
body.owner-shell-v1 .settings-panel-heading p { margin: 0; color: var(--cc-muted, #71808a); }
body.owner-shell-v1 .eyebrow { color: var(--cc-accent, #1c756d); font-size: 10px; letter-spacing: .08em; }
body.owner-shell-v1 .settings-action-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid color-mix(in srgb, var(--cc-border, #d5dedb) 70%, transparent); }
body.owner-shell-v1 .settings-action-row > span:first-child { display: grid; gap: 4px; min-width: 180px; }
body.owner-shell-v1 .settings-action-row small, body.owner-shell-v1 .settings-export-card small { color: var(--cc-muted, #71808a); }
body.owner-shell-v1 .settings-inline-form { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
body.owner-shell-v1 .settings-inline-form input, body.owner-shell-v1 .settings-preferences-form select { min-height: 38px; }
body.owner-shell-v1 .settings-password-inline input { max-width: 190px; }
body.owner-shell-v1 .settings-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
body.owner-shell-v1 .settings-preferences-section-label { margin: 16px 0 8px; color: var(--cc-accent, #1c756d); font-size: 12px; font-weight: 700; }
body.owner-shell-v1 .settings-form-grid label:not(.settings-toggle) { display: grid; gap: 6px; }
body.owner-shell-v1 .settings-toggle { display: flex; align-items: center; gap: 10px; padding-top: 22px; }
body.owner-shell-v1 .settings-toggle span { display: grid; gap: 3px; }
body.owner-shell-v1 .settings-form-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
body.owner-shell-v1 .settings-inline-result { color: var(--cc-accent, #1c756d); min-height: 1.2em; }
body.owner-shell-v1 .settings-export-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid color-mix(in srgb, var(--cc-border, #d5dedb) 85%, transparent); background: color-mix(in srgb, var(--cc-panel, #fff) 82%, var(--cc-accent, #1c756d)); }
body.owner-shell-v1 .settings-export-card > span { display: grid; gap: 5px; }
@media (max-width: 760px) {
  body.owner-shell-v1 .settings-action-row, body.owner-shell-v1 .settings-export-card { align-items: stretch; flex-direction: column; }
  body.owner-shell-v1 .settings-inline-form { justify-content: stretch; }
  body.owner-shell-v1 .settings-inline-form input, body.owner-shell-v1 .settings-inline-form button, body.owner-shell-v1 .settings-export-card .mini-action { width: 100%; max-width: none; }
  body.owner-shell-v1 .settings-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.owner-shell-v1 .settings-toggle { padding-top: 0; }
}
@media (max-width: 480px) { body.owner-shell-v1 .settings-form-grid { grid-template-columns: minmax(0, 1fr); } }
html[data-font-size="small"] body.owner-shell-v1 { font-size: 14px; }
html[data-font-size="medium"] body.owner-shell-v1 { font-size: 16px; }
html[data-font-size="large"] body.owner-shell-v1 { font-size: 18px; }

html[data-font-family="sans"] body.owner-shell-v1 { font-family: "Microsoft YaHei UI", "Noto Sans SC", sans-serif; }
html[data-font-family="serif"] body.owner-shell-v1 { font-family: "Noto Serif SC", "Songti SC", serif; }

html[data-density="compact"] body.owner-shell-v1 {
  --cc-density-row-gap: 6px;
  --cc-density-panel-padding: 12px;
}
html[data-density="comfortable"] body.owner-shell-v1 {
  --cc-density-row-gap: 12px;
  --cc-density-panel-padding: 18px;
}
html[data-density="compact"] body.owner-shell-v1 .panel { padding: var(--cc-density-panel-padding); }
html[data-density="compact"] body.owner-shell-v1 .list { gap: var(--cc-density-row-gap); }
html[data-reduce-motion="true"] body.owner-shell-v1 *,
html[data-reduce-motion="true"] body.owner-shell-v1 *::before,
html[data-reduce-motion="true"] body.owner-shell-v1 *::after {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
  scroll-behavior: auto !important;
}

@media (max-width: 600px) {
  body.owner-shell-v1 .tabs { padding-bottom: 3px; }
  body.owner-shell-v1 .tab { min-height: 40px; }
}

/* PEOPLE-MOBILE-EDITOR-BOUNDARY-R1: canvas resets must not expand editor cards. */
@media (max-width: 600px) {
  body.owner-shell-v1 #moduleStage .cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
    height: min(62vh, 520px) !important;
    max-height: min(62vh, 520px) !important;
    overflow-y: auto !important;
  }
}

body.owner-shell-v1 .is-resizing-form-field,
body.owner-shell-v1 .is-resizing-form-field * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

body.owner-shell-v1 #moduleStage :is(
  .cc-profile__field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
) {
  position: relative;
}

body.owner-shell-v1 #moduleStage :is(
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
)::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 11px;
  height: 11px;
  border-right: 2px solid color-mix(in srgb, var(--cc-accent, #1c756d) 72%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--cc-accent, #1c756d) 72%, transparent);
  pointer-events: none;
}

@media (max-width: 760px) {
  body.owner-shell-v1 #moduleStage :is(
    .cc-profile__field,
    [data-command-library="vault"] .vault-library-entry-form > .field,
    [data-reminders-v2] .field
  )::after {
    display: none;
  }
}

/* Library dense editors keep their own bounded scroll range. Profile is an
   exception: its outer editor is the single scroll owner so collapsed groups
   below the first viewport can be reached by browser, keyboard and pointer. */
body.owner-shell-v1 .knowledge-v2__current-notes,
body.owner-shell-v1 .knowledge-v2__records,
body.owner-shell-v1 .knowledge-v2__capture-body {
  max-height: min(72vh, 860px);
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1 .cc-profile__field textarea,
body.owner-shell-v1 .knowledge-v2__capture textarea,
body.owner-shell-v1 .knowledge-v2__custom-field-row textarea {
  min-width: min(100%, 16rem);
  min-height: 5.5rem;
  max-width: 100%;
  resize: vertical;
  overflow: auto;
}

body.owner-shell-v1 .cc-profile__field textarea {
  resize: none !important;
}

@media (min-width: 761px) {
  body.owner-shell-v1 #moduleStage .field:has(> input:not([type="checkbox"]):not([type="radio"])),
  body.owner-shell-v1 #moduleStage .field:has(> textarea) {
    box-sizing: border-box;
    max-width: 100%;
    resize: both;
    overflow: auto;
    align-content: start;
  }
}

@media (min-width: 601px) {
  body.owner-shell-v1 .knowledge-v2__capture .library-form:has(textarea:focus) {
    align-items: start;
  }

  body.owner-shell-v1 .knowledge-v2__capture .field:has(> textarea:focus) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  body.owner-shell-v1 .knowledge-v2__current-notes,
  body.owner-shell-v1 .knowledge-v2__records,
  body.owner-shell-v1 .knowledge-v2__capture-body {
    max-height: 62vh;
    overscroll-behavior: auto;
  }

  body.owner-shell-v1 .cc-profile__field textarea,
  body.owner-shell-v1 .knowledge-v2__capture textarea,
  body.owner-shell-v1 .knowledge-v2__custom-field-row textarea {
    min-width: 0;
    width: 100%;
  }

  body.owner-shell-v1 #moduleStage .field:has(> input:not([type="checkbox"]):not([type="radio"])),
  body.owner-shell-v1 #moduleStage .field:has(> textarea) {
    width: 100%;
    max-width: 100%;
    resize: vertical;
    overflow: auto;
  }
}

/* Give dense editable grids a temporary full-row editor without changing their data model. */
@media (min-width: 601px) {
  body.owner-shell-v1 .form-grid:has(> label > input:not([type="checkbox"]):not([type="radio"]):not([type="date"]):not([type="datetime-local"]):focus),
  body.owner-shell-v1 .form-grid:has(> label > textarea:focus) {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  body.owner-shell-v1 .form-grid > label:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="date"]):not([type="datetime-local"]):focus),
  body.owner-shell-v1 .form-grid > label:has(> textarea:focus),
  body.owner-shell-v1 .cc-people-v2 .people-form > .field:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="date"]):not([type="datetime-local"]):focus),
  body.owner-shell-v1 .cc-people-v2 .people-form > .field:has(> textarea:focus),
  body.owner-shell-v1 .cc-custom-info__form-grid > label:has(> input:not([type="checkbox"]):not([type="radio"]):focus),
  body.owner-shell-v1 .cc-custom-info__form-grid > label:has(> textarea:focus),
  body.owner-shell-v1 .cc-people-v2 .people-full-edit-grid > [data-people-edit-field-row]:has(> input:not([type="checkbox"]):not([type="radio"]):focus),
  body.owner-shell-v1 .cc-people-v2 .people-full-edit-grid > [data-people-edit-field-row]:has(> textarea:focus),
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__crud-form > .field:has(> input:not([type="checkbox"]):not([type="radio"]):not([type="date"]):focus),
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__crud-form > .field:has(> textarea:focus) {
    grid-column: 1 / -1;
  }

}

/* Freeform values may grow vertically; structured controls stay stable and predictable. */
body.owner-shell-v1 .form-grid textarea,
body.owner-shell-v1 #moduleStage textarea,
body.owner-shell-v1 .cc-custom-info__form-grid textarea,
body.owner-shell-v1 .knowledge-v2__custom-field-row textarea,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__crud-form textarea,
body.owner-shell-v1 .cc-people-v2 .people-full-edit-grid textarea,
body.owner-shell-v1 [data-reminders-v2] textarea {
  min-height: 5.5rem;
  max-width: 100%;
  resize: vertical !important;
  overflow: auto;
}

/* Wrapper resize owns these layouts. Do not let an inner textarea steal the drag handle. */
body.owner-shell-v1 #moduleStage .cc-profile__field textarea,
body.owner-shell-v1 #moduleStage [data-command-library="vault"] .vault-library-entry-form > .field > textarea {
  resize: none !important;
}

@media (max-width: 600px) {
  body.owner-shell-v1 #moduleStage [data-command-library="vault"] .vault-library-entry-form > .field::after {
    display: none;
  }
}

/* These panels already have bounded heights. Reserve the scrollbar instead of hiding records. */
body.owner-shell-v1 .cc-people-v2 .people-canvas-editor-panel,
body.owner-shell-v1 .cc-people-v2 .people-list,
body.owner-shell-v1 .cc-people-v2 .people-timeline,
body.owner-shell-v1 [data-reminders-v2] .reminder-v2-list,
body.owner-shell-v1 [data-items-v2="true"] .items-v2__list,
body.owner-shell-v1 .knowledge-v2__records {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

/* Dense record and editor surfaces keep their own vertical working area. */
body.owner-shell-v1 :is(
  .cc-profile__all-fields,
  .cc-profile__view-groups,
  .cc-profile__life-editor,
  .cc-profile__life-browser,
  .cc-profile__life-timeline,
  .knowledge-v2__capture-body,
  .knowledge-v2__category-form,
  .knowledge-v2__records,
  .knowledge-v2__category-results,
  [data-items-v2="true"] .items-v2__detail-pane,
  [data-items-v2="true"] .items-v2__crud-form,
  [data-items-v2="true"] .items-v2__history,
  .cc-people-v2 .people-full-edit-form,
  [data-reminders-v2] .reminder-v2-form,
  [data-reminders-v2] .reminder-v2-edit-fields,
  .cc-custom-info__records,
  .cc-custom-info__detail-shell,
  .cc-custom-info__form,
  .cc-custom-info__collection-form,
  .cc-custom-info__collection-list,
  [data-settings-activation-form],
  [data-settings-password-form],
  [data-settings-preferences-form],
  [data-admin-code-form],
  .ai-settings__connection-form,
  [data-ai-settings-permissions-form],
  [data-command-library="vault"] .library-editor-body,
  [data-command-library="vault"] .vault-library-list-panel,
  [data-command-library="vault"] .vault-library-secret-list
) {
  min-height: 0;
  max-height: min(72vh, 760px);
  overflow-y: scroll; /* overflow-y: auto remains the fallback contract for older renderers. */
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

body.owner-shell-v1 [data-reminders-v2] .reminder-v2-create-disclosure[open] .reminder-v2-form {
  overflow-y: scroll;
}

/* SETTINGS-PASSWORD-LAYOUT-R1: labels and password inputs stay in separate rows. */
body.owner-shell-v1 .settings-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

body.owner-shell-v1 .settings-password-form > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

body.owner-shell-v1 .settings-password-form > label > :is(span, input) {
  width: 100%;
  min-width: 0;
}

body.owner-shell-v1 .settings-password-form > .mini-action {
  justify-self: start;
}

@media (max-width: 600px) {
  body.owner-shell-v1 .cc-people-v2 .people-canvas-editor-panel,
  body.owner-shell-v1 .cc-people-v2 .people-list,
  body.owner-shell-v1 .cc-people-v2 .people-timeline,
  body.owner-shell-v1 [data-reminders-v2] .reminder-v2-list,
  body.owner-shell-v1 [data-items-v2="true"] .items-v2__list,
  body.owner-shell-v1 .knowledge-v2__records {
    overscroll-behavior: auto;
  }

  body.owner-shell-v1 :is(
    .cc-profile__all-fields,
    .cc-profile__view-groups,
    .cc-profile__life-editor,
    .cc-profile__life-browser,
    .cc-profile__life-timeline,
    .knowledge-v2__capture-body,
    .knowledge-v2__category-form,
    .knowledge-v2__records,
    .knowledge-v2__category-results,
    [data-items-v2="true"] .items-v2__detail-pane,
    [data-items-v2="true"] .items-v2__crud-form,
    [data-items-v2="true"] .items-v2__history,
    .cc-people-v2 .people-full-edit-form,
    [data-reminders-v2] .reminder-v2-form,
    [data-reminders-v2] .reminder-v2-edit-fields,
    .cc-custom-info__records,
    .cc-custom-info__detail-shell,
    .cc-custom-info__form,
    .cc-custom-info__collection-form,
    .cc-custom-info__collection-list,
    [data-settings-activation-form],
    [data-settings-password-form],
    [data-settings-preferences-form],
    [data-admin-code-form],
    .ai-settings__connection-form,
    [data-ai-settings-permissions-form],
    [data-command-library="vault"] .library-editor-body,
    [data-command-library="vault"] .vault-library-list-panel,
    [data-command-library="vault"] .vault-library-secret-list
  ) {
    max-height: 62vh;
    overscroll-behavior: auto;
  }
}


/* source: styles/record-editor-core.css */
/* Shared field editor contract: stable columns, readable values, and one local scroll boundary. */
body.owner-shell-v1 :is(.cc-record-editor__field-rows, .knowledge-v2__custom-field-rows) {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  max-height: min(58vh, 620px);
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1 :is(.cc-record-editor__field-row, .knowledge-v2__custom-field-row) {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(280px, 2fr) minmax(130px, .55fr) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* The shared editor owns its geometry. A field must not jump to a different
   column model merely because it gains focus. */
body.owner-shell-v1 .knowledge-v2__custom-field-row:focus-within {
  grid-template-columns: minmax(150px, .8fr) minmax(280px, 2fr) minmax(130px, .55fr) auto;
}

body.owner-shell-v1 :is(.cc-record-editor__field-row, .knowledge-v2__custom-field-row) > * {
  min-width: 0;
}

body.owner-shell-v1 :is(.cc-record-editor__field-row, .knowledge-v2__custom-field-row) :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.owner-shell-v1 :is(.cc-record-editor__field-row, .knowledge-v2__custom-field-row) textarea {
  min-height: 5.5rem;
  resize: both;
  overflow: auto;
}

body.owner-shell-v1 :is(.cc-record-editor__field-value, .knowledge-v2__custom-field-value) {
  min-width: 0;
  width: 100%;
}

/* Detail views keep long custom-field values readable instead of forcing them
   into the narrow second column used for compact metadata. */
body.owner-shell-v1 .knowledge-v2__metadata > .knowledge-v2__metadata-row--custom {
  grid-column: 1 / -1;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
}

body.owner-shell-v1 .knowledge-v2__metadata > .knowledge-v2__metadata-row--custom dd {
  text-align: left;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  body.owner-shell-v1 :is(.cc-record-editor__field-rows, .knowledge-v2__custom-field-rows) {
    max-height: 62vh;
  }

  body.owner-shell-v1 :is(.cc-record-editor__field-row, .knowledge-v2__custom-field-row) {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .knowledge-v2__custom-field-row:focus-within {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 :is(.cc-record-editor__field-row, .knowledge-v2__custom-field-row) > :is(.cc-record-editor__remove, .knowledge-v2__remove-field) {
    width: 100%;
  }

  body.owner-shell-v1 .knowledge-v2__metadata > .knowledge-v2__metadata-row--custom {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* source: styles/tag-picker-r1.css */
.cc-tag-picker {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cc-tag-picker__trigger {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--line, #5f7d78) 68%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface, #f8fbf8) 88%, transparent);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.cc-tag-picker > [data-tag-picker-input][type="hidden"] {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.cc-tag-picker__trigger > span {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.35;
}

.cc-tag-picker__trigger > small {
  color: var(--muted, #5f706d);
}

.cc-tag-picker__trigger > i {
  font-style: normal;
  transition: transform 160ms ease;
}

.cc-tag-picker.is-open .cc-tag-picker__trigger {
  border-color: var(--accent, #1e6c67);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #1e6c67) 18%, transparent);
}

.cc-tag-picker.is-open .cc-tag-picker__trigger > i {
  transform: rotate(180deg);
}

.cc-tag-picker__panel {
  position: absolute;
  z-index: 80;
  inset: calc(100% + 6px) 0 auto;
  width: min(100%, 440px);
  max-width: 100%;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line, #58736e) 76%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface, #f7faf7) 94%, transparent);
  box-shadow: 0 16px 38px rgb(16 36 33 / 20%);
  backdrop-filter: blur(18px) saturate(118%);
}

.cc-tag-picker__panel[hidden] {
  display: none;
}

.cc-tag-picker__panel-head {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cc-tag-picker__panel-head > strong {
  font-size: 13px;
}

.cc-tag-picker__panel-head > button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line, #58736e) 64%, transparent);
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.cc-tag-picker__panel-head > button:hover,
.cc-tag-picker__panel-head > button:focus-visible {
  border-color: var(--accent, #1e6c67);
  background: color-mix(in srgb, var(--accent, #1e6c67) 9%, transparent);
}

.cc-tag-picker__panel-head svg {
  width: 16px;
  height: 16px;
}

.cc-tag-picker__search input,
.cc-tag-picker__create input {
  width: 100%;
  min-width: 0;
}

.cc-tag-picker__options {
  display: grid;
  gap: 4px;
  max-height: min(240px, 32vh);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 8px 0;
  padding: 2px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.cc-tag-picker__option {
  min-width: 0;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
}

.cc-tag-picker__option:hover,
.cc-tag-picker__option:has(input:focus-visible) {
  background: color-mix(in srgb, var(--accent, #1e6c67) 10%, transparent);
}

.cc-tag-picker__option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent, #1e6c67);
}

.cc-tag-picker__option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cc-tag-picker__option > i {
  font-style: normal;
  opacity: 0;
  color: var(--accent, #1e6c67);
}

.cc-tag-picker__option:has(input:checked) > i {
  opacity: 1;
}

.cc-tag-picker__create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--line, #58736e) 42%, transparent);
}

.cc-tag-picker__create button {
  min-height: 38px;
  border: 1px solid var(--accent, #1e6c67);
  border-radius: 5px;
  padding: 0 12px;
  background: var(--accent, #1e6c67);
  color: #fff;
  cursor: pointer;
}

.cc-tag-picker__status,
.cc-tag-picker__empty {
  margin: 6px 2px 0;
  color: var(--muted, #5f706d);
  font-size: 12px;
}

/* A picker is an input surface: module button themes must not darken it in day mode. */
html[data-theme="day"] body.owner-shell-v1 .cc-tag-picker__trigger {
  border-color: #8db7b1;
  background: rgb(255 255 255 / 94%);
  color: #173e42;
}

html[data-theme="day"] body.owner-shell-v1 .cc-tag-picker__trigger > small,
html[data-theme="day"] body.owner-shell-v1 .cc-tag-picker__status,
html[data-theme="day"] body.owner-shell-v1 .cc-tag-picker__empty {
  color: #55736f;
}

html[data-theme="day"] body.owner-shell-v1 .cc-tag-picker__panel {
  border-color: #8db7b1;
  background: rgb(250 253 252 / 98%);
  color: #173e42;
}

html[data-theme="night"] body.owner-shell-v1 .cc-tag-picker__trigger {
  border-color: #587d79;
  background: rgb(19 43 45 / 94%);
  color: #e4f2ed;
}

@media (max-width: 760px) {
  .cc-tag-picker__panel {
    position: fixed;
    inset: auto 12px max(12px, env(safe-area-inset-bottom)) 12px;
    width: auto;
    max-width: calc(100vw - 24px);
    max-height: min(68vh, 560px);
    overflow: hidden;
  }

  .cc-tag-picker__options {
    max-height: min(38vh, 300px);
  }
}

/* 可删除标签：每项右侧一个“×” */
.cc-tag-picker--deletable .cc-tag-picker__option {
  grid-template-columns: 18px minmax(0, 1fr) 18px 30px;
}

.cc-tag-picker__delete {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8a5a4d;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cc-tag-picker__delete:hover,
.cc-tag-picker__delete:focus-visible {
  background: color-mix(in srgb, #b4523a 14%, transparent);
  color: #9b3b26;
}

.cc-tag-picker__delete:disabled {
  opacity: 0.4;
  cursor: progress;
}


/* source: styles/form-field-grid-resize-r2.css */
/* Shared field geometry: width is an intent (grid span), never a frozen pixel value. */
body.owner-shell-v1 #moduleStage :is(
  .cc-profile__fields,
  .knowledge-v2__capture .library-form,
  .knowledge-v2__capture .knowledge-v2__advanced-grid,
  .knowledge-v2__editor-body,
  .items-v2__crud-form,
  .items-v2__custom-field-row,
  .library-editor-panel .library-form,
  [data-command-library="vault"] .vault-library-entry-form,
  [data-custom-info-record-form],
  [data-reminders-v2] .reminder-v2-form,
  [data-reminders-v2] .reminder-v2-form-row,
  [data-reminders-v2] .reminder-v2-repeat-control
) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 12px;
}

body.owner-shell-v1 #moduleStage :is(
  .cc-profile__field,
  .cc-record-editor__field-row,
  .knowledge-v2__capture .library-form > .field,
  .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
  .knowledge-v2__editor-body > .field,
  .knowledge-v2__custom-field-row,
  .items-v2__crud-form > .field,
  .items-v2__custom-field-row > .field,
  .library-editor-panel .library-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-custom-info-record-form] > .field,
  [data-custom-info-field-list] .cc-record-editor__field-row,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
) {
  min-width: 0;
  width: auto !important;
  flex-basis: auto !important;
  grid-column: span var(--form-field-grid-span, 6);
  order: var(--form-field-grid-order, initial);
}

body.owner-shell-v1 #moduleStage .is-reordering-form-field :is(
  .cc-profile__field,
  .cc-record-editor__field-row,
  .knowledge-v2__capture .library-form > .field,
  .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
  .knowledge-v2__editor-body > .field,
  .knowledge-v2__custom-field-row,
  .items-v2__crud-form > .field,
  .items-v2__custom-field-row > .field,
  .library-editor-panel .library-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-custom-info-record-form] > .field,
  [data-custom-info-field-list] .cc-record-editor__field-row,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
) {
  cursor: grab;
}

body.owner-shell-v1 #moduleStage .is-reordering-form-field .is-reordering {
  opacity: .68;
  outline: 2px dashed var(--cc-accent, #248b7a);
  outline-offset: 3px;
  cursor: grabbing;
}

body.owner-shell-v1 #moduleStage [data-command-library="vault"] .library-editor-panel {
  min-width: 0;
}

body.owner-shell-v1 #moduleStage [data-command-library="vault"] .library-field-editor-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

body.owner-shell-v1 #moduleStage [data-command-library="vault"] .vault-library-entry-form > .field:has(.library-field-editor-row),
body.owner-shell-v1 #moduleStage [data-command-library="vault"] .vault-library-entry-form > .field:has(textarea),
body.owner-shell-v1 #moduleStage [data-command-library="vault"] .vault-library-entry-form > .field.library-attachment-picker {
  grid-column: 1 / -1;
}

body.owner-shell-v1 #moduleStage [data-command-library="vault"] .library-field-editor-row > .field {
  min-width: 0;
  width: auto !important;
}

body.owner-shell-v1 #moduleStage [data-command-library="vault"] .library-editor-body {
  overflow-x: hidden;
}

body.owner-shell-v1 #moduleStage :is(
  .cc-profile__field,
  .cc-record-editor__field-row,
  .knowledge-v2__capture .library-form > .field,
  .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
  .knowledge-v2__editor-body > .field,
  .knowledge-v2__custom-field-row,
  .items-v2__crud-form > .field,
  .items-v2__custom-field-row > .field,
  .library-editor-panel .library-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-custom-info-record-form] > .field,
  [data-custom-info-field-list] .cc-record-editor__field-row,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.owner-shell-v1 #moduleStage :is(
  .cc-profile__field,
  .cc-record-editor__field-row,
  .knowledge-v2__capture .library-form > .field,
  .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
  .knowledge-v2__editor-body > .field,
  .knowledge-v2__custom-field-row,
  .items-v2__crud-form > .field,
  .items-v2__custom-field-row > .field,
  .library-editor-panel .library-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-custom-info-record-form] > .field,
  [data-custom-info-field-list] .cc-record-editor__field-row,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
) textarea {
  min-height: 72px;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (min-width: 761px) {
  body.owner-shell-v1 #moduleStage :is(
    .cc-profile__field,
    .cc-record-editor__field-row,
    .knowledge-v2__capture .library-form > .field,
    .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
    .knowledge-v2__editor-body > .field,
    .knowledge-v2__custom-field-row,
    .items-v2__crud-form > .field,
    .items-v2__custom-field-row > .field,
    .library-editor-panel .library-form > .field,
    [data-command-library="vault"] .vault-library-entry-form > .field,
    [data-custom-info-record-form] > .field,
    [data-custom-info-field-list] .cc-record-editor__field-row,
    [data-reminders-v2] .reminder-v2-form > .field,
    [data-reminders-v2] .reminder-v2-form-row > .field,
    [data-reminders-v2] .reminder-v2-repeat-control > .field
  ) textarea {
    resize: both !important;
  }
}

body.owner-shell-v1 #moduleStage :is(
  .knowledge-v2__capture .library-form > .knowledge-v2__wide-field,
  .knowledge-v2__editor-body > .knowledge-v2__editor-content,
  .items-v2__crud-form > .items-v2__field-full,
  .items-v2__crud-form > .items-v2__field-wide,
  .items-v2__custom-field-row > .items-v2__field-full,
  [data-custom-info-record-form] > .cc-record-editor__field-rows,
  [data-command-library="vault"] .vault-library-entry-form > .field:has(textarea)
) {
  grid-column: 1 / -1;
}

/* Keep reminder creation on its own full row: it is a form, not a side note. */
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-create-disclosure {
  grid-column: 1 / -1 !important;
  min-width: 0;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form {
  max-height: none !important;
  overflow: visible !important;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form > .field:has(textarea),
body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form > .hud-button {
  grid-column: 1 / -1;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form-row {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-column: 1 / -1 !important;
  gap: 12px;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form-row > .field {
  grid-column: span 4;
  min-width: 0;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-repeat-control {
  display: contents !important;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form .reminder-v2-repeat-summary {
  grid-column: 1 / -1 !important;
  min-width: 0;
  width: auto;
}

body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-repeat-control > .field {
  grid-column: span 4 !important;
  min-width: 0;
}

body.owner-shell-v1 #moduleStage :is(
  .cc-profile__field,
  .cc-record-editor__field-row,
  .knowledge-v2__capture .library-form > .field,
  .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
  .knowledge-v2__editor-body > .field,
  .knowledge-v2__custom-field-row,
  .items-v2__crud-form > .field,
  .items-v2__custom-field-row > .field,
  .library-editor-panel .library-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-custom-info-record-form] > .field,
  [data-custom-info-field-list] .cc-record-editor__field-row,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
)[data-field-grid-span="3"] { --form-field-grid-span: 3; }
body.owner-shell-v1 #moduleStage :is(
  .cc-profile__field,
  .cc-record-editor__field-row,
  .knowledge-v2__capture .library-form > .field,
  .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
  .knowledge-v2__editor-body > .field,
  .knowledge-v2__custom-field-row,
  .items-v2__crud-form > .field,
  .items-v2__custom-field-row > .field,
  .library-editor-panel .library-form > .field,
  [data-command-library="vault"] .vault-library-entry-form > .field,
  [data-custom-info-record-form] > .field,
  [data-custom-info-field-list] .cc-record-editor__field-row,
  [data-reminders-v2] .reminder-v2-form > .field,
  [data-reminders-v2] .reminder-v2-form-row > .field,
  [data-reminders-v2] .reminder-v2-repeat-control > .field
)[data-field-grid-span="12"] { --form-field-grid-span: 12; }

@media (max-width: 760px) {
  body.owner-shell-v1 #moduleStage :is(
    .cc-profile__field,
    .cc-record-editor__field-row,
    .knowledge-v2__capture .library-form > .field,
    .knowledge-v2__capture .knowledge-v2__advanced-grid > .field,
    .knowledge-v2__editor-body > .field,
    .knowledge-v2__custom-field-row,
    .items-v2__crud-form > .field,
    .items-v2__custom-field-row > .field,
    .library-editor-panel .library-form > .field,
    [data-command-library="vault"] .vault-library-entry-form > .field,
    [data-custom-info-record-form] > .field,
    [data-custom-info-field-list] .cc-record-editor__field-row,
    [data-reminders-v2] .reminder-v2-form > .field,
    [data-reminders-v2] .reminder-v2-form-row > .field,
    [data-reminders-v2] .reminder-v2-repeat-control > .field
  ) {
    grid-column: 1 / -1;
    order: initial;
  }

  body.owner-shell-v1 #moduleStage [data-command-library="vault"] .module-canvas-widget:has(.library-editor-panel) {
    grid-column: 1 / -1 !important;
    min-width: 0;
  }

  body.owner-shell-v1 #moduleStage [data-command-library="vault"] .module-canvas-widget:has(.vault-library-list-panel) {
    grid-column: 1 / -1 !important;
  }

  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-create-disclosure {
    grid-column: 1 / -1 !important;
  }

  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form-row > .field,
  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-repeat-control > .field {
    grid-column: 1 / -1;
  }

  /* The desktop repeat-control span is !important; keep it full-width on mobile. */
  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form-row > .reminder-v2-repeat-control > .field {
    grid-column: 1 / -1 !important;
  }

  body.owner-shell-v1 #moduleStage [data-reminders-v2] .reminder-v2-form > .reminder-v2-section-title {
    grid-column: 1 / -1 !important;
    width: auto;
    min-width: 0;
  }

  body.owner-shell-v1 #moduleStage [data-command-library="vault"] .library-field-editor-row {
    grid-template-columns: 1fr auto;
  }
}

/* 2026-08-15 visible audit fix:
   Editable controls should read as pale glass/paper, not black boxes.  This
   final layer intentionally covers page-specific finance/AI/reminder styles. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
) {
  color-scheme: light;
  background:
    linear-gradient(180deg, rgb(255 255 252 / 94%), rgb(246 249 245 / 88%)) !important;
  border-color: rgb(66 108 102 / 28%) !important;
  color: #17363a !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 86%),
    0 6px 16px rgb(4 28 32 / 7%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage input[type="file"] {
  color-scheme: light;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgb(66 108 102 / 28%) !important;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgb(255 255 252 / 94%), rgb(246 249 245 / 88%)) !important;
  color: #17363a !important;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 86%),
    0 6px 16px rgb(4 28 32 / 7%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid rgb(47 119 115 / 34%);
  border-radius: 4px;
  background: rgb(232 242 237 / 92%);
  color: #17363a;
  font: inherit;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(input, textarea)::placeholder {
  color: rgb(92 116 113 / 72%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea
):is(:hover, :focus, :focus-visible) {
  background:
    linear-gradient(180deg, rgb(255 255 255 / 98%), rgb(250 252 248 / 94%)) !important;
  border-color: rgb(47 119 115 / 48%) !important;
}

body.owner-shell-v1:not(.auth-required) .brand > div:last-child {
  display: none !important;
}

body.owner-shell-v1:not(.auth-required) .brand {
  min-width: 0 !important;
  width: auto !important;
  padding-right: 4px;
}


/* source: styles/admin.css */
body.owner-shell-v1 [data-admin-console] {
  --admin-line: color-mix(in srgb, var(--cc-line, #96aaa4) 62%, transparent);
  --admin-risk: #c54b45;
  align-items: start;
}

body.owner-shell-v1 [data-admin-console] .panel {
  min-width: 0;
  overflow: hidden;
}

body.owner-shell-v1 [data-admin-console] .workbench-form,
body.owner-shell-v1 [data-admin-console] .ai-settings-stage {
  display: grid;
  gap: 12px;
}

body.owner-shell-v1 [data-admin-console] .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.owner-shell-v1 [data-admin-console] .form-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-picker {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--cc-surface, #f7faf8) 88%, transparent);
}

body.owner-shell-v1 [data-admin-console] .admin-duration-picker legend {
  padding: 0 6px;
  color: var(--cc-text-muted, #53645f);
  font-size: 13px;
  font-weight: 650;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options span {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 7px 8px;
  border: 1px solid var(--admin-line);
  border-radius: 5px;
  background: color-mix(in srgb, var(--cc-surface, #ffffff) 92%, transparent);
  color: var(--cc-text, #263731);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options input:checked + span {
  border-color: color-mix(in srgb, #187451 72%, var(--admin-line));
  background: color-mix(in srgb, #187451 14%, var(--cc-surface, #ffffff));
  color: color-mix(in srgb, #0d5b3d 86%, var(--cc-text, #263731));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, #b58b2a 74%, transparent);
}

body.owner-shell-v1 [data-admin-console] .admin-duration-options input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, #187451 58%, transparent);
  outline-offset: 2px;
}

body.owner-shell-v1 [data-admin-console] .admin-custom-days {
  display: grid;
  grid-template-columns: minmax(100px, auto) minmax(0, 180px);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

body.owner-shell-v1 [data-admin-console] .admin-custom-days[hidden] {
  display: none;
}

body.owner-shell-v1 [data-admin-code-output] {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  font-family: var(--formal-mono, "Cascadia Mono", Consolas, monospace);
}

body.owner-shell-v1 [data-admin-users-list],
body.owner-shell-v1 [data-admin-code-list] {
  max-height: min(52vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.owner-shell-v1 .admin-user-row,
body.owner-shell-v1 .admin-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--admin-line);
}

body.owner-shell-v1 .admin-user-row small,
body.owner-shell-v1 .admin-code-row small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

body.owner-shell-v1 .admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

body.owner-shell-v1 [data-admin-console] .mini-action.danger {
  border-color: color-mix(in srgb, var(--admin-risk) 62%, transparent);
  color: var(--admin-risk);
}

@media (max-width: 700px) {
  body.owner-shell-v1 [data-admin-console] .form-grid,
  body.owner-shell-v1 .admin-user-row,
  body.owner-shell-v1 .admin-code-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 .admin-user-actions {
    justify-content: flex-start;
  }

  body.owner-shell-v1 [data-admin-console] .admin-duration-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.owner-shell-v1 [data-admin-console] .admin-custom-days {
    grid-template-columns: minmax(0, 1fr);
  }

  body.owner-shell-v1 [data-admin-users-list],
  body.owner-shell-v1 [data-admin-code-list] {
    max-height: 60vh;
    overscroll-behavior: auto;
  }
}


/* source: styles/login-surface-r1.css */
/* Login-only archival linework layered over the existing photographic scene. */
body.owner-shell-v1.auth-required .brand {
  display: none;
}

body.owner-shell-v1.auth-required .workspace::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 19%, transparent 0 74px, rgb(51 99 91 / 7%) 75px 76px, transparent 77px),
    radial-gradient(circle at 12% 19%, transparent 0 96px, rgb(51 99 91 / 4%) 97px 98px, transparent 99px),
    linear-gradient(90deg, transparent 0 7%, rgb(51 99 91 / 5%) 7% calc(7% + 1px), transparent calc(7% + 1px) 31%, rgb(51 99 91 / 4%) 31% calc(31% + 1px), transparent calc(31% + 1px)),
    linear-gradient(0deg, transparent 0 13%, rgb(51 99 91 / 5%) 13% calc(13% + 1px), transparent calc(13% + 1px) 77%, rgb(51 99 91 / 4%) 77% calc(77% + 1px), transparent calc(77% + 1px)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgb(51 99 91 / 3%) 46px 47px, transparent 47px 94px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgb(51 99 91 / 3%) 46px 47px, transparent 47px 94px);
  background-position: center;
  background-size: cover;
  opacity: 0.9;
}

html[data-theme="night"] body.owner-shell-v1.auth-required .workspace::after {
  background-image:
    radial-gradient(circle at 12% 19%, transparent 0 74px, rgb(160 207 197 / 8%) 75px 76px, transparent 77px),
    radial-gradient(circle at 12% 19%, transparent 0 96px, rgb(160 207 197 / 5%) 97px 98px, transparent 99px),
    linear-gradient(90deg, transparent 0 7%, rgb(160 207 197 / 6%) 7% calc(7% + 1px), transparent calc(7% + 1px) 31%, rgb(160 207 197 / 4%) 31% calc(31% + 1px), transparent calc(31% + 1px)),
    linear-gradient(0deg, transparent 0 13%, rgb(160 207 197 / 6%) 13% calc(13% + 1px), transparent calc(13% + 1px) 77%, rgb(160 207 197 / 4%) 77% calc(77% + 1px), transparent calc(77% + 1px)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgb(160 207 197 / 3%) 46px 47px, transparent 47px 94px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgb(160 207 197 / 3%) 46px 47px, transparent 47px 94px);
}

body.owner-shell-v1.auth-required .login-required {
  position: relative;
}

body.owner-shell-v1.auth-required .login-required::after {
  position: absolute;
  inset: 14px;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--cc-accent) 12%, transparent);
  content: "";
  pointer-events: none;
}

body.owner-shell-v1.auth-required .auth-grid {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  body.owner-shell-v1.auth-required .workspace {
    padding-top: 24px;
  }

  body.owner-shell-v1.auth-required .workspace::after {
    background-position: 35% center;
    background-size: auto 100%;
    opacity: 0.68;
  }

  body.owner-shell-v1.auth-required .login-required::after {
    inset: 8px;
  }
}


/* source: styles/archive-command-v2.css */
/* Personal archive + command desk visual language.
   This is intentionally a final, presentation-only layer. */
:root {
  --archive-ink: #19362f;
  --archive-paper: #fbfaf4;
  --archive-olive: #647763;
  --archive-brass: #b78b43;
  --archive-brass-soft: rgb(183 139 67 / 20%);
  --archive-teal: #2f8777;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--archive-ink) 24%, transparent);
  border-radius: 6px;
  background-color: var(--archive-paper);
  background-image:
    linear-gradient(90deg, transparent 0 27px, rgb(183 139 67 / 13%) 27px 28px, transparent 28px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgb(25 54 47 / 4%) 30px 31px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%), 0 8px 24px rgb(18 46 39 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > :is(h3, .command-console-head, .overview-section-head, .people-section-head) {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .command-console-head {
  margin-bottom: 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--archive-brass-soft);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3 {
  color: var(--archive-ink);
  font-size: 16px;
  font-weight: 800;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:has(form) {
  border-top: 3px solid var(--archive-teal);
  background-image:
    linear-gradient(90deg, rgb(47 135 119 / 8%), transparent 34%),
    linear-gradient(90deg, transparent 0 27px, rgb(183 139 67 / 13%) 27px 28px, transparent 28px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgb(25 54 47 / 4%) 30px 31px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-finance="true"] .panel {
  border-top: 3px solid var(--archive-brass);
  background-image:
    linear-gradient(90deg, transparent 0 18px, rgb(183 139 67 / 24%) 18px 19px, transparent 19px),
    repeating-linear-gradient(90deg, transparent 0 126px, rgb(25 54 47 / 4%) 126px 127px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgb(25 54 47 / 4%) 30px 31px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-people="true"] .panel {
  border-left: 3px solid var(--archive-olive);
  background-image:
    radial-gradient(circle at 28px 28px, rgb(100 119 99 / 22%) 0 2px, transparent 2.5px),
    linear-gradient(90deg, transparent 0 27px, rgb(100 119 99 / 14%) 27px 28px, transparent 28px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgb(25 54 47 / 4%) 30px 31px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-knowledge="true"] .panel {
  border-style: solid;
  border-color: color-mix(in srgb, var(--archive-olive) 44%, transparent);
  background-image:
    linear-gradient(135deg, transparent 0 12px, rgb(100 119 99 / 12%) 12px 13px, transparent 13px),
    repeating-linear-gradient(0deg, transparent 0 30px, rgb(25 54 47 / 4%) 30px 31px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:hover {
  border-color: color-mix(in srgb, var(--archive-brass) 72%, var(--archive-ink));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%), 0 12px 30px rgb(18 46 39 / 12%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.overview-signal-card, .asset-reference-card, .asset-status-card, .answer-card) {
  border: 1px solid var(--archive-brass-soft);
  border-radius: 4px;
  background: rgb(255 253 245 / 76%);
}

/* Vault credentials: the shared resizable-field grid must keep the safety
   notice and actions across the full form width. */
body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form > .field {
  grid-column: span 6;
  min-width: 0;
  width: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form > .library-safety-callout,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form > .finance-record-actions,
body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form-status {
  grid-column: 1 / -1;
  min-width: 0;
  width: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-safety-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  writing-mode: horizontal-tb;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .finance-record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .finance-record-actions :is(button, a) {
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

/* The shell mark reads as a small archival seal instead of a placeholder. */
body.owner-shell-v1:not(.auth-required) .mark {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--archive-brass) 72%, #ffffff);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgb(255 255 255 / 38%) 0 4px, transparent 5px),
    linear-gradient(145deg, #2c786b, #163b37 72%);
  box-shadow: 0 0 0 3px rgb(183 139 67 / 13%), inset 0 1px 0 rgb(255 255 255 / 34%), 0 5px 14px rgb(12 41 35 / 24%);
}

body.owner-shell-v1:not(.auth-required) .mark::before {
  position: absolute;
  z-index: -1;
  inset: 5px;
  border: 1px solid rgb(232 207 151 / 72%);
  border-radius: 50%;
  content: "";
}

body.owner-shell-v1:not(.auth-required) .mark::after {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border: 1px solid #f5dfaa;
  border-radius: 2px;
  background: var(--archive-brass);
  box-shadow: 0 1px 4px rgb(12 41 35 / 24%);
  content: "";
  transform: rotate(18deg);
}

body.owner-shell-v1:not(.auth-required) .mark span {
  position: relative;
  z-index: 1;
  color: #f5e6bd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgb(0 0 0 / 35%);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
    background-image:
      linear-gradient(90deg, transparent 0 18px, rgb(183 139 67 / 11%) 18px 19px, transparent 19px),
      repeating-linear-gradient(0deg, transparent 0 30px, rgb(25 54 47 / 3%) 30px 31px);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3 {
    font-size: 15px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .library-form > .field {
    grid-column: 1 / -1;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage [data-command-library="vault"] [data-tab-panel="vault-secrets"] .finance-record-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
    transition: none;
  }
}


/* source: styles/card-material-polish-r1.css */
/* Final material pass: quiet archive-paper cards with a concise operational title rail. */
:root {
  --card-polish-ink: #173d3b;
  --card-polish-teal: #2d7268;
  --card-polish-teal-soft: #dcece7;
  --card-polish-brass: #b48a47;
  --card-polish-line: #aec8c0;
  --card-polish-paper: #fdfcf7;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__timeline,
  .cc-profile__structure,
  .cc-profile__archive-manager,
  .knowledge-v2__canvas-card,
  .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  border-color: var(--card-polish-line);
  background-color: color-mix(in srgb, var(--card-polish-paper) 94%, transparent);
  background-image: url("/static/command_center/assets/archive-crest-watermark.svg");
  background-position: right 18px bottom 16px;
  background-repeat: no-repeat;
  background-size: min(23%, 205px);
  box-shadow: inset 0 1px rgb(255 255 255 / 82%), 0 10px 24px rgb(22 64 55 / 8%);
}

/* Keep card headers readable without a heavy full-width dark bar. */
body.owner-shell-v1:not(.auth-required) #moduleStage .panel > .command-console-head,
body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header,
  .reminder-v2-section-title
) {
  position: relative;
  min-height: 46px;
  margin: -1px -1px 15px;
  padding: 11px 16px 11px 20px;
  border: 1px solid color-mix(in srgb, var(--card-polish-line) 76%, white);
  border-left: 4px solid var(--card-polish-teal);
  border-radius: 5px 5px 0 0;
  background-color: rgb(243 249 246 / 95%);
  background-image: url("/static/command_center/assets/archive-crest-watermark.svg");
  background-position: right 17px center;
  background-repeat: no-repeat;
  background-size: 82px;
  box-shadow: inset 0 -1px rgb(180 138 71 / 20%);
  color: var(--card-polish-ink);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > .command-console-head::before,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header,
  .reminder-v2-section-title
)::before {
  content: "";
  position: absolute;
  top: 0;
  right: 14px;
  width: 36px;
  height: 2px;
  background: var(--card-polish-brass);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel > h3 {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 16px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > .command-console-head,
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header
) :is(h3, h4, strong) {
  color: var(--card-polish-ink) !important;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head {
  min-height: 42px;
  margin-bottom: 10px;
  padding-block: 9px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) > .command-console-head::before {
  width: 22px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__timeline,
  .cc-profile__structure,
  .cc-profile__archive-manager,
  .knowledge-v2__canvas-card,
  .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  border-color: rgb(127 185 171 / 46%);
  background-color: rgb(8 33 38 / 86%);
  background-image: url("/static/command_center/assets/archive-crest-watermark.svg");
  box-shadow: inset 0 1px rgb(199 244 229 / 7%), 0 15px 30px rgb(0 0 0 / 23%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > .command-console-head,
  .panel > h3,
  .cc-profile__editor-head,
  .cc-profile__life-head,
  .cc-profile__life-editor > header,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header,
  .reminder-v2-section-title
) {
  border-color: rgb(127 185 171 / 42%);
  border-left-color: #74bcae;
  background-color: rgb(11 51 57 / 91%);
  background-image: url("/static/command_center/assets/archive-crest-watermark.svg");
  box-shadow: inset 0 -1px rgb(218 178 97 / 28%);
  color: #dff0e9;
}

/* Large browser/empty areas carry a quiet crest so they read as intentional work surfaces. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__life-timeline,
  .knowledge-v2__browser,
  .knowledge-v2__records,
  .knowledge-v2__current-notes,
  .cc-profile__view-empty,
  .cc-profile__life-empty,
  .knowledge-v2__empty
) {
  background-color: color-mix(in srgb, var(--card-polish-paper) 93%, transparent);
  background-image: url("/static/command_center/assets/archive-crest-watermark.svg");
  background-position: center 58%;
  background-repeat: no-repeat;
  background-size: min(31%, 248px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__life-timeline,
  .knowledge-v2__browser,
  .knowledge-v2__records,
  .knowledge-v2__current-notes,
  .cc-profile__view-empty,
  .cc-profile__life-empty,
  .knowledge-v2__empty
) {
  background-color: rgb(8 33 38 / 58%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > .command-console-head,
  .cc-profile__editor-head,
  .cc-profile__timeline > header,
  .cc-profile__structure > header,
  .knowledge-v2__editor-head,
  .knowledge-v2__current-notes > header
) :is(h3, h4, strong) {
  color: #e5f5ee !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__life-head h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-profile__life-editor > header h4 {
  color: #effaf4 !important;
}

@media (max-width: 700px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .panel > .command-console-head,
    .panel > h3,
    .cc-profile__editor-head,
    .cc-profile__life-head,
    .cc-profile__life-editor > header,
    .cc-profile__timeline > header,
    .cc-profile__structure > header,
    .knowledge-v2__editor-head,
    .knowledge-v2__browser-head,
    .knowledge-v2__current-notes > header,
    .reminder-v2-section-title
  ) {
    min-height: 42px;
    padding: 9px 12px 9px 15px;
  }
}


/* source: styles/art-material-premium-r1.css */
/* Approved premium material system: archive paper, frosted glass, and focus glass. */
:root {
  --premium-teal: #2e7772;
  --premium-teal-bright: #83cfc1;
  --premium-brass: #c79a55;
  --premium-paper: rgb(248 246 237 / 94%);
  --premium-paper-line: rgb(47 86 80 / 28%);
  --premium-night: rgb(7 34 40 / 83%);
  --premium-night-line: rgb(128 199 187 / 37%);
  --premium-focus: linear-gradient(135deg, rgb(7 38 44 / 96%), rgb(15 75 73 / 89%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--premium-paper-line);
  border-radius: 5px;
  background-color: var(--premium-paper);
  background-image:
    radial-gradient(circle at 96% 8%, transparent 0 28px, rgb(46 119 114 / 12%) 29px 30px, transparent 31px 42px, rgb(46 119 114 / 8%) 43px 44px, transparent 45px),
    repeating-linear-gradient(0deg, rgb(28 74 68 / 2.4%) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 1px rgb(255 255 255 / 85%), 0 16px 30px rgb(20 58 52 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel::after {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 46px;
  height: 3px;
  background: var(--premium-brass);
  opacity: .8;
  pointer-events: none;
}

/* Summary and state cards use translucent glass so the library background remains visible. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-context-strip,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .reminder-v2__list-card,
  .knowledge-v2__browser,
  .knowledge-v2__records,
  .ai-workbench-shell,
  .ai-workbench-v6
) {
  background-color: rgb(20 94 89 / 40%);
  background-image: linear-gradient(135deg, rgb(181 239 221 / 7%), transparent 54%), radial-gradient(circle at 95% 8%, transparent 0 26px, rgb(199 237 219 / 15%) 27px 28px, transparent 29px 41px, rgb(199 237 219 / 8%) 42px 43px, transparent 44px);
  border-color: rgb(205 240 226 / 48%);
  box-shadow: inset 0 1px rgb(255 255 255 / 20%), 0 18px 36px rgb(2 25 28 / 20%);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

/* Primary conclusions are dark focus glass with a restrained brass perimeter. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-workbench,
  .overview-home-head,
  .ai-workbench__hero,
  .ai-workbench__composer
) {
  background: var(--premium-focus);
  border-color: var(--premium-brass);
  box-shadow: inset 0 1px rgb(232 255 245 / 12%), inset 0 0 0 1px rgb(199 154 85 / 23%), 0 22px 44px rgb(2 20 24 / 29%);
  color: #f4f1e6;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-workbench,
  .overview-home-head,
  .ai-workbench__hero,
  .ai-workbench__composer
)::after {
  width: 74px;
  height: 4px;
  opacity: 1;
}

/* Shared focus edge: selected/focus states read as crafted objects, warnings remain semantic. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.tab-focus, [data-state="selected"], .is-focus, .is-primary) {
  box-shadow: inset 3px 0 var(--premium-brass), inset 0 1px rgb(255 255 255 / 12%), 0 20px 38px rgb(5 31 33 / 20%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
  border-color: var(--premium-night-line);
  background-color: var(--premium-night);
  background-image: linear-gradient(135deg, rgb(99 190 173 / 5%), transparent 54%), radial-gradient(circle at 95% 8%, transparent 0 27px, rgb(121 209 190 / 13%) 28px 29px, transparent 30px 43px, rgb(121 209 190 / 7%) 44px 45px, transparent 46px);
  box-shadow: inset 0 1px rgb(221 255 245 / 6%), 0 18px 38px rgb(0 5 8 / 30%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-context-strip,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets,
  .reminder-v2__list-card,
  .knowledge-v2__browser,
  .knowledge-v2__records,
  .ai-workbench-shell,
  .ai-workbench-v6
) {
  background-color: rgb(7 47 53 / 72%);
  border-color: rgb(123 201 188 / 42%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-workbench,
  .overview-home-head,
  .ai-workbench__hero,
  .ai-workbench__composer
) {
  background: var(--premium-focus);
  color: #f4f1e6;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .panel { border-radius: 4px; }
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-workbench, .cc-profile__editor, .cc-profile__structure, .ai-workbench__hero, .ai-workbench__composer) { box-shadow: inset 2px 0 var(--premium-brass), 0 14px 28px rgb(2 20 24 / 20%); }
}

/* Cascade lock: legacy module sheets use material shorthands with higher priority. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
  background:
    radial-gradient(circle at 96% 8%, transparent 0 28px, rgb(46 119 114 / 12%) 29px 30px, transparent 31px 42px, rgb(46 119 114 / 8%) 43px 44px, transparent 45px),
    repeating-linear-gradient(0deg, rgb(28 74 68 / 2.4%) 0 1px, transparent 1px 5px),
    var(--premium-paper) !important;
  border-color: var(--premium-paper-line) !important;
}

/* Profile editing is a work surface, not a focus hero. Remove the leftover
   premium marker that previously crossed the editor and archive controls. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__structure,
  .cc-profile__archive-manager
)::before,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__structure,
  .cc-profile__archive-manager
)::after {
  content: none !important;
  display: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="focus"] > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-workbench,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="focus"] > .panel,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-workbench {
  background:
    radial-gradient(circle at 96% 8%, transparent 0 32px, rgb(203 166 98 / 25%) 33px 34px, transparent 35px 48px, rgb(203 166 98 / 13%) 49px 50px, transparent 51px),
    linear-gradient(135deg, rgb(7 38 44 / 97%), rgb(15 75 73 / 91%)) !important;
  border-color: var(--premium-brass) !important;
  box-shadow: inset 4px 0 var(--premium-brass), inset 0 0 0 1px rgb(199 154 85 / 24%), 0 24px 48px rgb(2 20 24 / 30%) !important;
  color: #f4f1e6 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="focus"] > .panel :is(h2, h3, h4, strong, p, span, small, time),
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-workbench :is(h2, h3, h4) {
  color: inherit !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="focus"] > .panel > :is(.overview-home-head, .overview-home-layout, .overview-context-strip) {
  background: transparent !important;
  color: #f4f1e6 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="focus"] > .panel :is(a, button, .overview-home-chip) {
  border-color: rgb(208 230 220 / 30%) !important;
  background: rgb(255 255 255 / 7%) !important;
  color: #f4f1e6 !important;
}

/* Finance summaries use actual glass; reading and edit cards stay archive paper. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="finance"] > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) {
  background:
    linear-gradient(135deg, rgb(232 249 241 / 38%), rgb(255 255 255 / 13%)),
    rgb(23 98 93 / 62%) !important;
  border-color: rgb(213 241 228 / 62%) !important;
  box-shadow: inset 0 1px rgb(255 255 255 / 26%), 0 18px 38px rgb(3 29 31 / 21%) !important;
  color: #f5faf5 !important;
  backdrop-filter: blur(20px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(118%) !important;
}

/* Composition pass: archive field with a deliberate focus / frost / reading-card hierarchy. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-canvas-shell {
  position: relative;
  padding: 16px;
  border: 1px solid rgb(203 166 98 / 22%);
  background: linear-gradient(180deg, rgb(255 255 255 / 18%), rgb(255 255 255 / 8%));
  box-shadow: inset 0 1px rgb(255 255 255 / 38%), 0 18px 38px rgb(20 58 52 / 12%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-canvas-shell {
  background: linear-gradient(180deg, rgb(5 38 43 / 48%), rgb(5 38 43 / 28%));
  box-shadow: inset 0 1px rgb(221 255 245 / 8%), 0 20px 42px rgb(0 5 8 / 22%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-canvas-grid {
  padding: 0 0 24px;
  gap: 16px !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget] > .panel {
  border-radius: 2px;
  box-shadow: 0 18px 34px rgb(0 19 22 / 30%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel {
  border: 1px solid var(--premium-brass) !important;
  border-left-width: 4px !important;
  background:
    radial-gradient(circle at 92% 10%, transparent 0 32px, rgb(214 175 96 / 22%) 33px 34px, transparent 35px 49px, rgb(214 175 96 / 10%) 50px 51px, transparent 52px),
    linear-gradient(135deg, rgb(4 37 42 / 96%), rgb(11 81 76 / 88%)) !important;
  box-shadow: inset 0 1px rgb(241 255 244 / 11%), inset 0 0 0 1px rgb(199 154 85 / 18%), 0 24px 48px rgb(0 17 20 / 44%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance-category"] > .panel {
  border: 1px solid rgb(210 239 227 / 64%) !important;
  border-left: 3px solid var(--premium-teal-bright) !important;
  background:
    linear-gradient(135deg, rgb(238 252 244 / 16%), transparent 48%),
    radial-gradient(circle at 94% 8%, transparent 0 27px, rgb(221 241 222 / 15%) 28px 29px, transparent 30px 43px, rgb(221 241 222 / 8%) 44px 45px, transparent 46px),
    rgb(23 96 91 / 66%) !important;
  color: #f4fbf5 !important;
  backdrop-filter: blur(20px) saturate(116%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(116%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] :is([data-overview-canvas-widget="reminders"], [data-overview-canvas-widget="reminder-status"], [data-overview-canvas-widget="finance-queue"], [data-overview-canvas-widget="people"], [data-overview-canvas-widget="people-interactions"], [data-overview-canvas-widget="activity"], [data-overview-canvas-widget="activity-library"], [data-overview-canvas-widget="footer"]) > .panel {
  border: 1px solid rgb(38 78 73 / 32%) !important;
  border-left: 3px solid var(--premium-teal) !important;
  background:
    radial-gradient(circle at 94% 9%, transparent 0 29px, rgb(46 119 114 / 13%) 30px 31px, transparent 32px 44px, rgb(199 154 85 / 10%) 45px 46px, transparent 47px),
    repeating-linear-gradient(0deg, rgb(21 65 60 / 2.6%) 0 1px, transparent 1px 5px),
    rgb(248 246 237 / 96%) !important;
  color: #183f40 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] :is([data-overview-canvas-widget="reminders"], [data-overview-canvas-widget="reminder-status"], [data-overview-canvas-widget="finance-queue"], [data-overview-canvas-widget="people"], [data-overview-canvas-widget="people-interactions"], [data-overview-canvas-widget="activity"], [data-overview-canvas-widget="activity-library"], [data-overview-canvas-widget="footer"]) > .panel :is(h2, h3, h4, strong, p, span, small, time) {
  color: inherit !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] :is([data-overview-canvas-widget="finance"], [data-overview-canvas-widget="finance-category"]) > .panel :is(h2, h3, h4, strong, p, span, small, time) {
  color: inherit !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-home-head {
  padding: 22px 24px 15px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-home-head h3 {
  font-size: 25px;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-command-deck {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  grid-template-areas:
    "head"
    "work"
    "signals" !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-home-head {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-home-head h3 {
  max-width: none;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-context-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(72px, auto);
  border-top: 1px solid rgb(213 239 226 / 21%);
  border-left: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-context-strip .overview-signal-card {
  padding: 10px 12px 9px;
  border-right: 1px solid rgb(213 239 226 / 18%);
  border-bottom: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-context-strip .overview-signal-card:last-child {
  border-right: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-context-strip .overview-signal-card strong {
  font-size: 22px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] .overview-context-strip {
  background: rgb(3 30 34 / 38%) !important;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] .overview-canvas-shell { padding: 10px; }
}

/* Overview canvas cards are resizable surfaces: the panel must occupy the full grid cell. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget] > .panel {
  height: 100% !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  scrollbar-color: rgb(199 154 85 / 72%) transparent;
  scrollbar-width: thin;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel {
  overflow-y: scroll !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/* Never leave legacy muted ink on the new materials. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel {
  color: #19363a !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel :is(h2, h3, h4, strong, p, span, small, time) {
  color: inherit !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel {
  color: #f8f4e8 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel :is(p, span, small, time) {
  color: rgb(236 244 235 / 88%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel :is(h2, h3, h4, strong) {
  color: #fffaf0 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel {
  color: #f8fdf8 !important;
  background-image:
    linear-gradient(135deg, rgb(255 255 255 / 11%), transparent 46%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgb(244 224 177 / 7%) 80px) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel :is(h2, h3, h4, strong) {
  color: #fffaf0 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel :is(p, span, small, time) {
  color: rgb(241 250 244 / 91%) !important;
}

/* Finance stays one continuous glass surface; legacy paper strips caused pale-on-pale text. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel .kpis {
  background:
    linear-gradient(135deg, rgb(6 53 57 / 78%), rgb(16 96 88 / 64%)) !important;
  border-color: rgb(194 233 215 / 38%) !important;
  box-shadow: inset 0 1px rgb(255 255 255 / 12%), inset 0 -1px rgb(3 31 35 / 28%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel .kpi {
  border-color: rgb(194 233 215 / 25%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel .overview-finance-recent,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel .list,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel .row {
  background: transparent !important;
  border-color: rgb(194 233 215 / 23%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="finance"] > .panel .muted-row,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel .muted-row {
  color: inherit !important;
  opacity: .76;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-canvas-widget="finance"] > .panel :is(h2, h3, h4, strong, p, span, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(.finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) :is(h2, h3, h4, strong, p, span, small) {
  color: inherit !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel {
  background:
    linear-gradient(135deg, rgb(99 190 173 / 5%), transparent 54%),
    radial-gradient(circle at 95% 8%, transparent 0 27px, rgb(121 209 190 / 13%) 28px 29px, transparent 30px 43px, rgb(121 209 190 / 7%) 44px 45px, transparent 46px),
    var(--premium-night) !important;
  border-color: var(--premium-night-line) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-overview-canvas-widget="finance"] > .panel,
  .finance-overview-ledger,
  .finance-overview-hot-days,
  .finance-overview-anomalies,
  .finance-overview-assets
) {
  background: linear-gradient(135deg, rgb(16 83 80 / 78%), rgb(5 38 45 / 78%)) !important;
  border-color: rgb(123 201 188 / 48%) !important;
  backdrop-filter: blur(20px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(118%) !important;
}


/* source: styles/finance-asset-workbench-r1.css */
/* Isolated final layer for the asset and liability workbench. */
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 {
  display: grid !important;
  gap: 16px !important;
  padding: 0 !important;
  background: transparent !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-balance-head {
  border: 0 !important;
  border-radius: 6px !important;
  background: linear-gradient(115deg, #0d3f43, #14655f 70%, #1d756d) !important;
  box-shadow: 0 14px 32px rgb(10 48 48 / 22%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .ring.asset-net-ring,
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-balance-kpis .kpi {
  min-height: 110px !important;
  border-color: rgb(224 245 234 / 18%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 :is(.ring.asset-net-ring span, .asset-balance-kpis .kpi span) {
  color: rgb(224 243 233 / 68%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 :is(.ring.asset-net-ring b, .asset-balance-kpis .kpi strong) {
  color: #fffdf5 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-inherited-note {
  display: flex !important;
  gap: 10px;
  align-items: baseline;
  padding: 12px 16px;
  border-left: 3px solid #c79a55;
  background: rgb(255 253 247 / 78%);
  color: #35504e;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .82fr) !important;
  gap: 20px !important;
  align-items: start !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 {
  display: flex !important;
  flex-direction: column !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  padding: 24px !important;
  border: 1px solid rgb(41 89 82 / 20%) !important;
  border-radius: 6px !important;
  background: rgb(255 253 247 / 94%) !important;
  box-shadow: 0 12px 28px rgb(25 63 57 / 10%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-panel-v2 > * + * { margin-top: 16px !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head { order: 1 !important; display: grid !important; grid-template-columns: minmax(0, 1fr) 170px !important; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid rgb(41 89 82 / 16%); }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-editor-controls { order: 2 !important; display: flex !important; flex-wrap: wrap; gap: 8px; align-items: center; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals { order: 3 !important; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; border: 1px solid rgb(41 89 82 / 16%); border-radius: 4px; overflow: hidden; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals > span { min-height: 58px; padding: 10px 12px; border-right: 1px solid rgb(41 89 82 / 14%); background: rgb(246 250 247 / 70%); }

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-human-ledger, .asset-draft-delta, [data-asset-draft-delta], .asset-save-preview, .asset-capture-actions-bottom) { display: none !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage .asset-workbench-v2 .asset-capture-actions-bottom { display: none !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-capture-actions-bottom] { display: none !important; visibility: hidden !important; height: 0 !important; min-height: 0 !important; overflow: hidden !important; }

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-sheet] { order: 4 !important; display: grid !important; width: 100% !important; min-width: 0 !important; grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-actions { order: 5 !important; display: flex !important; flex-wrap: wrap; gap: 8px; padding: 12px; border: 1px solid rgb(41 89 82 / 14%); border-radius: 4px; background: #f8faf7; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-clearance-toolbar { order: 6 !important; display: grid !important; grid-template-columns: minmax(200px, 1fr) auto; gap: 10px; padding: 12px; border: 1px solid rgb(41 89 82 / 14%); border-radius: 4px; background: #f8faf7; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-note-field { order: 7 !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-paste-assist { order: 8 !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] #assetSnapshotLookupResult { order: 9 !important; }

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel { grid-column: 2 !important; grid-row: 1 !important; position: sticky !important; top: 18px; display: grid !important; gap: 14px; padding: 0 !important; border: 0 !important; background: transparent !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-reference-card { padding: 18px; border: 1px solid rgb(41 89 82 / 18%); border-radius: 6px; background: rgb(255 253 247 / 94%); box-shadow: 0 10px 24px rgb(25 63 57 / 8%); }

body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-section { width: 100% !important; min-width: 0 !important; padding: 0 !important; overflow: hidden; border: 1px solid rgb(41 89 82 / 18%) !important; border-radius: 6px !important; background: #fffdf8 !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] [data-asset-clearance-section="liability"] { border-color: rgb(170 81 70 / 26%) !important; background: #fffafa !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-section-title { display: flex !important; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 18px; border-bottom: 1px solid rgb(41 89 82 / 14%); background: #f4f8f5; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-quick-presets { display: flex !important; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-bottom: 1px solid rgb(41 89 82 / 12%); background: rgb(248 251 249 / 80%); }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-header { display: none !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-rows { display: grid !important; gap: 10px; padding: 14px 18px 18px; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row { display: grid !important; grid-template-columns: minmax(0, 1.35fr) minmax(126px, .65fr) auto !important; gap: 8px; padding: 12px; border: 1px solid rgb(41 89 82 / 16%); border-radius: 4px; background: #fff; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-row-reference { grid-column: 1; min-height: 34px; padding: 7px 9px; border-radius: 3px; background: #f4f8f5; }
body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-snapshot-note { grid-column: 2 / 4; }

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-body-grid-v2 { grid-template-columns: minmax(0, 1fr) !important; }
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-capture-panel-v2, .asset-entry-reference-panel) { grid-column: 1 !important; grid-row: auto !important; }
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-entry-reference-panel { position: static !important; }
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-capture-head { grid-template-columns: minmax(0, 1fr) !important; }
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-draft-totals { grid-template-columns: minmax(0, 1fr) !important; }
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row { grid-template-columns: minmax(0, 1fr) auto !important; }
  body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] :is(.asset-row-reference, .asset-snapshot-note) { grid-column: 1 / -1; }
}


/* source: styles/overview-density-polish-r1.css */
/* Overview density polish: keep high-volume lists readable and independently scrollable. */
#moduleStage[data-active-module-tab="0"] .overview-command-deck {
  min-height: 0;
  scrollbar-gutter: stable;
}

#moduleStage[data-active-module-tab="0"] .overview-home-layout {
  min-height: 0;
  height: auto;
}

#moduleStage[data-active-module-tab="0"] .overview-focus-panel,
#moduleStage[data-active-module-tab="0"] .overview-change-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

#moduleStage[data-active-module-tab="0"] .overview-task-list,
#moduleStage[data-active-module-tab="0"] .overview-change-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row,
#moduleStage[data-active-module-tab="0"] .overview-change-row {
  min-width: 0;
  min-height: 68px;
  align-items: flex-start;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row > span:first-child,
#moduleStage[data-active-module-tab="0"] .overview-change-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row .overview-task-kind,
#moduleStage[data-active-module-tab="0"] .overview-change-row .tag,
#moduleStage[data-active-module-tab="0"] .overview-task-row > span > small:first-child {
  color: #e3bd6b !important;
  font-size: 10px;
  letter-spacing: .05em;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row strong,
#moduleStage[data-active-module-tab="0"] .overview-change-row strong {
  color: #fffaf0 !important;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row > span:first-child > small:last-child,
#moduleStage[data-active-module-tab="0"] .overview-change-row > span:first-child > small {
  color: #c4d3cc !important;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row > .tag,
#moduleStage[data-active-module-tab="0"] .overview-change-row > .tag {
  flex: 0 0 auto;
  margin-top: 2px;
  white-space: normal;
  text-align: right;
  line-height: 1.25;
}

/* Keep long records on their own grid tracks instead of stretching every
   row to the same short height. The parent list remains scrollable. */
#moduleStage[data-active-module-tab="0"] .overview-task-list,
#moduleStage[data-active-module-tab="0"] .overview-change-list,
#moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="people-interactions"] > .panel > .list {
  grid-template-rows: none;
  grid-auto-rows: max-content;
  row-gap: 6px;
  align-content: start;
}

#moduleStage[data-active-module-tab="0"] .overview-task-row,
#moduleStage[data-active-module-tab="0"] .overview-change-row,
#moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="people-interactions"] > .panel > .list > .row {
  box-sizing: border-box;
  height: auto;
}

#moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="people-interactions"] > .panel > .list > .row > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 7px 10px;
  padding-top: 13px;
  padding-bottom: 13px;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > :is(span, strong, small) {
  position: static;
  min-width: 0;
  width: auto;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > span {
  color: #c4d3cc !important;
  letter-spacing: 0;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* Ledger rows must reserve the space used by wrapped descriptions. */
body.owner-shell-v1 #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] .list {
  grid-template-rows: none !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
}

body.owner-shell-v1 #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] .list > .row {
  height: auto !important;
  min-height: max-content !important;
  flex-shrink: 0;
  align-items: start;
}

body.owner-shell-v1 #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] .list > .row > span:first-child {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > small {
  color: #b5c7bf !important;
  line-height: 1.35;
}

html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row strong,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-change-row strong {
  color: #fffaf0 !important;
}

html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row > span:first-child > small:last-child,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-change-row > span:first-child > small,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > small {
  color: #c4d3cc !important;
}

html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row .overview-task-kind,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-change-row .tag,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-task-row > span > small:first-child,
html[data-theme="night"] #moduleStage[data-active-module-tab="0"] .overview-context-strip .overview-signal-card > span {
  color: #e3bd6b !important;
}

/* The premium material layer intentionally uses a strong inherited-text rule;
   match that scope so semantic colors remain visible on the finished surface. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row .overview-task-kind,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row .tag,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span > small:first-child {
  color: #e3bd6b !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row strong,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row strong {
  color: #fffaf0 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span:first-child > small:last-child,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row > span:first-child > small {
  color: #c4d3cc !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row .overview-task-kind,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row .tag,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span > small:first-child {
  color: #e3bd6b !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row strong,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row strong {
  color: #fffaf0 !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-task-row > span:first-child > small:last-child,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget="focus"] > .panel .overview-change-row > span:first-child > small {
  color: #c4d3cc !important;
}

@media (max-width: 760px) {
  #moduleStage[data-active-module-tab="0"] .overview-command-deck {
    height: min(78vh, 680px) !important;
    max-height: min(78vh, 680px) !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
  }

  #moduleStage[data-active-module-tab="0"] .overview-home-layout {
    height: auto;
    min-height: 0;
  }

  #moduleStage[data-active-module-tab="0"] .overview-focus-panel,
  #moduleStage[data-active-module-tab="0"] .overview-change-panel {
    min-height: 0;
  }

  #moduleStage[data-active-module-tab="0"] .overview-task-list,
  #moduleStage[data-active-module-tab="0"] .overview-change-list {
    max-height: min(38vh, 320px);
    overflow-y: auto !important;
  }

  #moduleStage[data-active-module-tab="0"] .overview-task-row,
  #moduleStage[data-active-module-tab="0"] .overview-change-row {
    min-height: 64px;
  }
}

/* Finance calendar headers use a dark material gradient; keep the weekday
   labels bright even when later card-art rules set inherited ink colors. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion,
body.owner-shell-v1:not(.auth-required) .finance-calendar-v2.fc .fc-col-header-cell-cushion * {
  color: #f4f0df !important;
  text-shadow: 0 1px 2px rgba(4, 31, 31, 0.42);
}


/* source: styles/card-art-polish-r1.css */
/* Shared card art: one quiet hierarchy across every business module. */
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 30%, transparent) !important;
  border-radius: 10px;
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--product-accent, #2f8f87) 10%, transparent) 0 1px, transparent 2px 34px),
    linear-gradient(135deg, color-mix(in srgb, var(--product-surface-soft, #f7faf5) 94%, transparent), color-mix(in srgb, var(--product-surface, #ffffff) 92%, transparent));
  box-shadow: 0 10px 24px rgb(27 69 67 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck)::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #c49a4b, var(--product-accent, #2f8f87));
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4 {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: -2px 0 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 22%, transparent);
  border-radius: 7px;
  background:
    radial-gradient(circle at 90% 50%, transparent 0 16px, color-mix(in srgb, #c49a4b 18%, transparent) 17px 18px, transparent 19px 30px),
    color-mix(in srgb, var(--product-surface-soft, #f7faf5) 82%, transparent);
  color: var(--product-text, #173b3e) !important;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: .01em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3::after,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  width: 46px;
  height: 2px;
  background: #c49a4b;
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > .list,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > [data-list],
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > .table-wrap {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row {
  min-width: 0;
  gap: 10px;
  padding: 10px 2px;
  border-bottom-color: color-mix(in srgb, var(--product-accent, #2f8f87) 18%, transparent) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row strong {
  color: var(--product-text, #173b3e) !important;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row small {
  color: var(--product-muted, #6e7d7c) !important;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row .tag {
  flex: 0 0 auto;
  border-color: color-mix(in srgb, #c49a4b 38%, transparent);
  color: #8b6427 !important;
  font-variant-numeric: tabular-nums;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) button {
  min-height: 32px;
  padding-inline: 11px;
  border-radius: 6px;
  letter-spacing: .01em;
}

/* Compact KPI cards keep numbers visible even when the surrounding dashboard is narrow. */
body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 22%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--product-surface-soft, #f7faf5) 76%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi > span {
  color: var(--product-muted, #6e7d7c);
  font-size: 10px;
  line-height: 1.2;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--product-text, #173b3e) !important;
  font-size: clamp(15px, 1.45vw, 18px) !important;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-tab-panel="overview-finance"] .stacked-kpis .kpi > strong {
  max-width: 100%;
  overflow: hidden !important;
  text-overflow: ellipsis;
  font-size: clamp(15px, 1.45vw, 18px) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel .stacked-kpis .kpi > strong {
  max-width: 100%;
  overflow: hidden !important;
  text-overflow: ellipsis;
  font-size: clamp(15px, 1.45vw, 18px) !important;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent > strong {
  color: var(--product-text, #173b3e) !important;
  font-size: 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent > .list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi {
  background: rgb(12 54 58 / 66%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .stacked-kpis .kpi > strong,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel .overview-finance-recent > strong {
  color: #f4f0e6 !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
  border-color: color-mix(in srgb, #79c8bd 32%, transparent) !important;
  background:
    radial-gradient(circle at 92% 8%, rgb(196 154 75 / 13%) 0 1px, transparent 2px 34px),
    linear-gradient(135deg, rgb(8 39 44 / 92%), rgb(7 28 35 / 88%));
  box-shadow: 0 12px 26px rgb(0 0 0 / 20%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4 {
  color: #f4f0e6 !important;
  background: rgb(12 54 58 / 78%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row strong {
  color: #f4f0e6 !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) .row small {
  color: #b6c7c0 !important;
}

/* The overview canvas uses a sibling widget class; keep it on the same art system. */
body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 30%, transparent) !important;
  border-radius: 10px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--product-surface-soft, #f7faf5) 94%, transparent), color-mix(in srgb, var(--product-surface, #fff) 92%, transparent));
  box-shadow: 0 10px 24px rgb(27 69 67 / 8%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck)::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #c49a4b, var(--product-accent, #2f8f87));
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) > h4 {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: -2px 0 12px;
  padding: 10px 12px 10px 14px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 22%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--product-surface-soft, #f7faf5) 82%, transparent);
  color: var(--product-text, #173b3e) !important;
  font-size: 15px;
  font-weight: 760;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) > .list {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) .row strong {
  color: var(--product-text, #173b3e) !important;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) .row small {
  color: var(--product-muted, #6e7d7c) !important;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage [data-overview-expense-breakdown="true"] {
  min-height: 0;
  max-height: min(300px, 42vh);
  display: grid;
  gap: 8px;
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(112px, 160px) minmax(0, 1fr) minmax(74px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 18%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--product-surface, #fff) 90%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-name {
  min-width: 0;
  color: var(--product-text, #173b3e);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-amount {
  color: var(--product-text, #173b3e);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row .bar-track {
  min-width: 0;
  height: 8px;
  border: 1px solid color-mix(in srgb, var(--product-accent, #2f8f87) 20%, transparent);
  background: color-mix(in srgb, var(--product-accent, #2f8f87) 8%, transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row .bar-track > i {
  background: linear-gradient(90deg, #2f9c93, #70bca5 62%, #c49a4b);
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget [data-overview-expense-breakdown="true"] {
    max-height: min(260px, 38vh);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-expense-category-row .bar-track {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .overview-canvas-widget > .panel:not(.overview-command-deck) {
    padding: 13px 12px 12px;
    border-radius: 8px;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
    padding: 13px 12px 12px;
    border-radius: 8px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h3,
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) > h4 {
    min-height: 38px;
    margin-bottom: 9px;
    padding: 8px 10px 8px 11px;
    font-size: 14px;
  }
}


/* source: styles/card-art-fine-r1.css */
/* Fine art pass: typography, state visualization and action choreography. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.people-overview-primary,.people-overview-create,.people-index-panel,.people-list-panel,.people-selection-panel,.people-full-edit-panel,.people-canvas-editor-panel) {
  position: relative;
  min-width: 0;
  border-color: color-mix(in srgb, #2f8f87 30%, transparent) !important;
  border-radius: 10px;
  background:
    radial-gradient(circle at 94% 7%, transparent 0 17px, rgb(196 154 75 / 14%) 18px 19px, transparent 20px 37px),
    linear-gradient(135deg, rgb(252 250 241 / 94%), rgb(245 249 245 / 92%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.people-overview-primary,.people-overview-create,.people-index-panel,.people-list-panel,.people-selection-panel,.people-full-edit-panel) > h3,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-section-head h3 {
  margin: 0 0 12px;
  color: #19464a !important;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: .01em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgb(47 143 135 / 22%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-header h3 {
  margin: 2px 0 6px;
  color: #19464a !important;
  font-family: var(--formal-serif, Georgia, serif);
  font-size: 22px;
  letter-spacing: .015em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: #71817e;
  font-size: 11px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-metrics strong {
  color: #b07b2d !important;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-top-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(160px, .75fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-top-toolbar .field small,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-query-field small {
  color: #71817e !important;
  font-size: 10px;
  letter-spacing: .05em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.people-index-panel,.people-list-panel,.people-selection-panel) > .list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 58px;
  padding: 9px 6px;
  border-bottom: 1px solid rgb(47 143 135 / 16%);
  background: transparent;
  text-align: left;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row strong,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-field-row strong,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-interaction-row strong {
  color: #204b4e !important;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row small,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-field-row small,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-interaction-row small {
  color: #71817e !important;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row.active {
  background: linear-gradient(90deg, rgb(47 143 135 / 12%), transparent);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row-trailing,
body.owner-shell-v1:not(.auth-required) #moduleStage .people-interaction-actions,
body.owner-shell-v1:not(.auth-required) #moduleStage .workbench-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-vitals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-vitals > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid rgb(47 143 135 / 20%);
  border-radius: 7px;
  background: rgb(246 250 246 / 86%);
  text-align: center;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-vitals small {
  color: #71817e !important;
  font-size: 9px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .people-vitals strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.progress,.progress-bar,.meter,[role="progressbar"]) {
  min-height: 7px;
  overflow: hidden;
  border: 1px solid rgb(47 143 135 / 22%);
  border-radius: 99px;
  background: rgb(47 143 135 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.progress,.progress-bar,.meter,[role="progressbar"]) > * {
  border-radius: inherit;
  background: linear-gradient(90deg, #3cc8d5, #54c9a2 68%, #d6ae59);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .mini-action,
body.owner-shell-v1:not(.auth-required) #moduleStage button.mini-action {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgb(47 143 135 / 22%);
  border-radius: 6px;
  color: #28575a !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 3px 8px rgb(27 69 67 / 7%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .mini-action:hover,
body.owner-shell-v1:not(.auth-required) #moduleStage button.mini-action:hover {
  border-color: rgb(196 154 75 / 60%);
  color: #8a6227 !important;
  transform: translateY(-1px);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(.people-overview-primary,.people-overview-create,.people-index-panel,.people-list-panel,.people-selection-panel,.people-full-edit-panel) {
  background: radial-gradient(circle at 94% 7%, transparent 0 17px, rgb(220 176 97 / 14%) 18px 19px, transparent 20px 37px), linear-gradient(135deg, rgb(8 39 44 / 94%), rgb(7 28 35 / 92%));
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-header h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(.people-index-panel,.people-list-panel,.people-selection-panel) > h3,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .people-person-row strong,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .people-field-row strong,
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .people-interaction-row strong {
  color: #f4f0e6 !important;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .people-top-toolbar {
    grid-template-columns: 1fr;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .people-overview-header {
    flex-direction: column;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .people-vitals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* source: styles/card-pattern-library-r1.css */
/* Full-card botanical fields for read-only parchment and information cards. */

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel, .module-canvas-widget > .panel,
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus,
  .reminder-v2-card, .items-v2-card, .profile-owner-card, .custom-info-card
):not(.tab-panel-hidden):not(.overview-command-deck) {
  position: relative;
  isolation: isolate;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel, .module-canvas-widget > .panel,
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus,
  .reminder-v2-card, .items-v2-card, .profile-owner-card, .custom-info-card
):not(.tab-panel-hidden):not(.overview-command-deck)::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background-image:
    radial-gradient(ellipse at 18px 18px, rgb(42 82 119 / 12%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 38px 33px, rgb(174 124 39 / 11%) 0 4px, transparent 5px),
    radial-gradient(ellipse at 54px 53px, rgb(42 82 119 / 9%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 17px 70px, rgb(174 124 39 / 9%) 0 4px, transparent 5px),
    radial-gradient(ellipse at 3px 42px, transparent 0 27px, rgb(46 91 127 / 9%) 28px 29px, transparent 30px);
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  background-repeat: repeat;
  background-size: 84px 84px;
  opacity: .82;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel, .module-canvas-widget > .panel,
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus,
  .reminder-v2-card, .items-v2-card, .profile-owner-card, .custom-info-card
):not(.tab-panel-hidden):not(.overview-command-deck) > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget:nth-child(4n + 2) > .panel,
  .module-canvas-widget:nth-child(4n + 2) > .panel,
  .work-column:nth-child(4n + 2),
  .people-v2-card:nth-child(4n + 2),
  .knowledge-v2-card:nth-child(4n + 2),
  .knowledge-v2__canvas-card:nth-child(4n + 2),
  .vault-card:nth-child(4n + 2),
  .reminder-v2-card:nth-child(4n + 2),
  .items-v2-card:nth-child(4n + 2),
  .profile-owner-card:nth-child(4n + 2),
  .custom-info-card:nth-child(4n + 2)
)::after {
  background-image:
    radial-gradient(ellipse at 25px 22px, transparent 0 18px, rgb(48 88 126 / 12%) 19px 20px, transparent 21px),
    radial-gradient(ellipse at 73px 44px, transparent 0 22px, rgb(171 120 38 / 11%) 23px 24px, transparent 25px),
    radial-gradient(ellipse at 112px 18px, transparent 0 17px, rgb(48 88 126 / 10%) 18px 19px, transparent 20px),
    radial-gradient(ellipse at 142px 60px, transparent 0 25px, rgb(171 120 38 / 9%) 26px 27px, transparent 28px);
  background-position: 0 0, 0 0, 0 0, 0 0;
  background-size: 168px 82px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget:nth-child(4n + 3) > .panel,
  .module-canvas-widget:nth-child(4n + 3) > .panel,
  .work-column:nth-child(4n + 3),
  .people-v2-card:nth-child(4n + 3),
  .knowledge-v2-card:nth-child(4n + 3),
  .knowledge-v2__canvas-card:nth-child(4n + 3),
  .vault-card:nth-child(4n + 3),
  .reminder-v2-card:nth-child(4n + 3),
  .items-v2-card:nth-child(4n + 3),
  .profile-owner-card:nth-child(4n + 3),
  .custom-info-card:nth-child(4n + 3)
)::after {
  background-image:
    radial-gradient(ellipse at 50% 7px, rgb(48 88 126 / 12%) 0 12px, transparent 13px),
    radial-gradient(ellipse at 37% 27px, rgb(174 124 39 / 10%) 0 10px, transparent 11px),
    radial-gradient(ellipse at 63% 27px, rgb(174 124 39 / 10%) 0 10px, transparent 11px),
    radial-gradient(ellipse at 23% 47px, rgb(48 88 126 / 9%) 0 9px, transparent 10px),
    radial-gradient(ellipse at 77% 47px, rgb(48 88 126 / 9%) 0 9px, transparent 10px),
    radial-gradient(ellipse at 50% -18px, transparent 0 52px, rgb(174 124 39 / 9%) 53px 54px, transparent 55px);
  background-position: 0 0;
  background-size: 132px 74px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget:nth-child(4n) > .panel,
  .module-canvas-widget:nth-child(4n) > .panel,
  .work-column:nth-child(4n),
  .people-v2-card:nth-child(4n),
  .knowledge-v2-card:nth-child(4n),
  .knowledge-v2__canvas-card:nth-child(4n),
  .vault-card:nth-child(4n),
  .reminder-v2-card:nth-child(4n),
  .items-v2-card:nth-child(4n),
  .profile-owner-card:nth-child(4n),
  .custom-info-card:nth-child(4n)
)::after {
  background-image:
    radial-gradient(ellipse at 14px 20px, rgb(42 92 134 / 10%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 42px 48px, rgb(174 124 39 / 11%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 71px 20px, rgb(48 88 126 / 11%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 99px 48px, rgb(174 124 39 / 9%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 127px 20px, rgb(42 92 134 / 9%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 28px 75px, transparent 0 35px, rgb(48 88 126 / 9%) 36px 37px, transparent 38px),
    radial-gradient(ellipse at 98px -7px, transparent 0 35px, rgb(174 124 39 / 9%) 36px 37px, transparent 38px);
  background-position: 0 0;
  background-size: 140px 96px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel, .module-canvas-widget > .panel,
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus,
  .reminder-v2-card, .items-v2-card, .profile-owner-card, .custom-info-card
):not(.tab-panel-hidden):not(.overview-command-deck)::after {
  filter: brightness(1.28) saturate(.82);
  opacity: .64;
}

/* Knowledge papers use two denser blue-and-gold botanical fields. */
body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__workspace .module-canvas-widget > .knowledge-v2__canvas-card--editor::after {
  background-image:
    radial-gradient(ellipse at 18px 20px, rgb(39 91 137 / 15%) 0 6px, transparent 7px),
    radial-gradient(ellipse at 43px 42px, rgb(181 132 42 / 14%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 70px 65px, rgb(39 91 137 / 12%) 0 6px, transparent 7px),
    radial-gradient(ellipse at 98px 88px, rgb(181 132 42 / 12%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 124px 110px, rgb(39 91 137 / 10%) 0 6px, transparent 7px),
    radial-gradient(ellipse at -12px 63px, transparent 0 53px, rgb(43 94 137 / 12%) 54px 56px, transparent 57px),
    radial-gradient(ellipse at 76px 148px, transparent 0 60px, rgb(181 132 42 / 11%) 61px 63px, transparent 64px) !important;
  background-position: 0 0;
  background-size: 150px 150px !important;
  opacity: .86 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__workspace .module-canvas-widget > .knowledge-v2__current-notes::after {
  background-image:
    radial-gradient(ellipse at 50% 10px, rgb(41 91 137 / 14%) 0 13px, transparent 14px),
    radial-gradient(ellipse at 35% 31px, rgb(181 132 42 / 13%) 0 10px, transparent 11px),
    radial-gradient(ellipse at 65% 31px, rgb(181 132 42 / 13%) 0 10px, transparent 11px),
    radial-gradient(ellipse at 18% 52px, rgb(41 91 137 / 11%) 0 8px, transparent 9px),
    radial-gradient(ellipse at 82% 52px, rgb(41 91 137 / 11%) 0 8px, transparent 9px),
    radial-gradient(ellipse at 50% -25px, transparent 0 63px, rgb(181 132 42 / 11%) 64px 66px, transparent 67px),
    radial-gradient(ellipse at 50% 95px, transparent 0 63px, rgb(41 91 137 / 10%) 64px 66px, transparent 67px) !important;
  background-position: 0 0;
  background-size: 144px 120px !important;
  opacity: .78 !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__canvas-card :is(
  input:not([type="checkbox"]):not([type="radio"]), textarea, select,
  .knowledge-v2__record, .knowledge-v2__browser-row, .tag-picker-r1
) {
  background-color: color-mix(in srgb, var(--cc-paper, #fbfaf2) 94%, transparent);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .knowledge-v2__canvas-card :is(
  input:not([type="checkbox"]):not([type="radio"]), textarea, select,
  .knowledge-v2__record, .knowledge-v2__browser-row, .tag-picker-r1
) {
  background-color: rgb(8 34 40 / 94%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > :is(.command-console-head, .list) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 6px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: min(420px, 76%);
  aspect-ratio: 1;
  right: -86px;
  top: 50%;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list > * { position: relative; z-index: 1; }

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list::after {
  position: absolute;
  z-index: 0;
  right: 7%;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(159 105 27 / 10%);
  font: 700 clamp(92px, 12vw, 176px)/1 Georgia, "Times New Roman", serif;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-ledger > .list::after { content: "\0050"; }
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-hot-days > .list::after { content: "\25C8"; }
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-anomalies > .list::after { content: "\2726"; }
body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-assets > .list::after { content: "\00A7"; }

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-ledger > .list::before {
  border: 1px solid rgb(30 111 91 / 16%);
  border-radius: 50%;
  background-image:
    radial-gradient(circle, transparent 0 19%, rgb(174 119 35 / 18%) 19.5% 20.5%, transparent 21% 31%, rgb(42 92 134 / 15%) 31.5% 32.5%, transparent 33% 46%, rgb(174 119 35 / 14%) 46.5% 47.5%, transparent 48%),
    conic-gradient(from 22.5deg, transparent 0 8%, rgb(42 92 134 / 11%) 8.5% 10%, transparent 10.5% 23%, rgb(174 119 35 / 12%) 23.5% 25%, transparent 25.5% 40%, rgb(42 92 134 / 11%) 40.5% 42%, transparent 42.5% 56%, rgb(174 119 35 / 12%) 56.5% 58%, transparent 58.5% 73%, rgb(42 92 134 / 11%) 73.5% 75%, transparent 75.5% 90%, rgb(174 119 35 / 12%) 90.5% 92%, transparent 92.5%);
  box-shadow: inset 0 0 0 22px rgb(255 255 255 / 4%), inset 0 0 0 23px rgb(174 119 35 / 11%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-hot-days > .list::before {
  width: min(360px, 92%);
  right: -104px;
  border: 1px solid rgb(174 119 35 / 17%);
  transform: translateY(-50%) rotate(45deg);
  background-image:
    linear-gradient(135deg, transparent 0 32%, rgb(42 92 134 / 12%) 32.5% 34%, transparent 34.5% 65%, rgb(174 119 35 / 13%) 65.5% 67%, transparent 67.5%),
    radial-gradient(circle, transparent 0 21%, rgb(174 119 35 / 16%) 21.5% 23%, transparent 23.5% 41%, rgb(42 92 134 / 12%) 41.5% 43%, transparent 43.5%);
  box-shadow: inset 0 0 0 28px rgb(255 255 255 / 4%), inset 0 0 0 29px rgb(42 92 134 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-anomalies > .list::before {
  width: min(310px, 72%);
  right: -54px;
  border: 1px solid rgb(42 92 134 / 14%);
  border-radius: 50% 50% 44% 44%;
  background-image:
    radial-gradient(ellipse at 50% 20%, rgb(174 119 35 / 17%) 0 5%, transparent 5.5% 20%),
    radial-gradient(ellipse at 20% 50%, rgb(42 92 134 / 13%) 0 5%, transparent 5.5% 20%),
    radial-gradient(ellipse at 80% 50%, rgb(42 92 134 / 13%) 0 5%, transparent 5.5% 20%),
    radial-gradient(circle, transparent 0 27%, rgb(174 119 35 / 15%) 27.5% 29%, transparent 29.5%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-assets > .list::before {
  width: min(320px, 74%);
  right: -64px;
  clip-path: polygon(50% 0, 88% 16%, 96% 58%, 50% 100%, 4% 58%, 12% 16%);
  border: 1px solid rgb(174 119 35 / 16%);
  background-image:
    radial-gradient(circle, transparent 0 23%, rgb(174 119 35 / 18%) 23.5% 25%, transparent 25.5% 42%, rgb(42 92 134 / 13%) 42.5% 44%, transparent 44.5%),
    conic-gradient(from 30deg, rgb(42 92 134 / 7%), transparent 17%, rgb(174 119 35 / 9%) 18% 33%, transparent 34% 50%, rgb(42 92 134 / 7%) 51% 66%, transparent 67% 83%, rgb(174 119 35 / 9%) 84%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .command-console-head {
  color: #153b32;
  background: linear-gradient(105deg, rgb(231 244 238 / 96%), rgb(248 248 243 / 92%));
  box-shadow: inset 3px 0 #237c67, inset 0 0 0 1px rgb(27 108 89 / 16%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list {
  color: #172f29;
  background: rgb(246 249 246 / 94%);
  box-shadow: inset 0 0 0 1px rgb(27 108 89 / 13%);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list :is(small, time, p, .muted) { color: #566d65 !important; }

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > :is(.command-console-head, .list) {
  color: #e7f3ee;
  background: rgb(6 39 42 / 92%);
  box-shadow: inset 3px 0 #58aa91, inset 0 0 0 1px rgb(102 181 154 / 18%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list :is(small, time, p, .muted) { color: #a9c3ba !important; }

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list::before { filter: brightness(1.22) saturate(.8); opacity: .72; }

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-overview-ledger, .finance-overview-hot-days,
  .finance-overview-anomalies, .finance-overview-assets
) > .list::after { color: rgb(218 177 102 / 12%); }

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .finance-overview-ledger, .finance-overview-hot-days,
    .finance-overview-anomalies, .finance-overview-assets
  ) > .list::before { right: -110px; opacity: .62; }
}

/* People overview: three full parchment fields, each with its own botanical rhythm. */
body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 :is(
  .people-overview-list-column,
  .people-overview-profile,
  .people-overview-interactions
) {
  position: relative;
  isolation: isolate;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 :is(
  .people-overview-list-column,
  .people-overview-profile,
  .people-overview-interactions
)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background-repeat: repeat;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 :is(
  .people-overview-list-column,
  .people-overview-profile,
  .people-overview-interactions
) > * { position: relative; z-index: 1; }

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 .people-overview-list-column::before {
  background-image:
    radial-gradient(ellipse at 16px 18px, rgb(48 88 126 / 13%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 42px 34px, rgb(174 124 39 / 12%) 0 4px, transparent 5px),
    radial-gradient(ellipse at 69px 53px, rgb(48 88 126 / 10%) 0 5px, transparent 6px),
    radial-gradient(ellipse at 94px 27px, rgb(174 124 39 / 10%) 0 4px, transparent 5px),
    radial-gradient(ellipse at 2px 48px, transparent 0 31px, rgb(48 88 126 / 9%) 32px 33px, transparent 34px);
  background-size: 112px 78px;
  opacity: .8;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 .people-overview-profile::before {
  background-image:
    radial-gradient(ellipse at 50% 8px, rgb(48 88 126 / 13%) 0 12px, transparent 13px),
    radial-gradient(ellipse at 35% 28px, rgb(174 124 39 / 11%) 0 10px, transparent 11px),
    radial-gradient(ellipse at 65% 28px, rgb(174 124 39 / 11%) 0 10px, transparent 11px),
    radial-gradient(ellipse at 18% 48px, rgb(48 88 126 / 9%) 0 8px, transparent 9px),
    radial-gradient(ellipse at 82% 48px, rgb(48 88 126 / 9%) 0 8px, transparent 9px),
    radial-gradient(ellipse at 50% -20px, transparent 0 54px, rgb(174 124 39 / 9%) 55px 56px, transparent 57px);
  background-size: 138px 76px;
  opacity: .82;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 .people-overview-interactions::before {
  background-image:
    radial-gradient(ellipse at 22px 20px, transparent 0 18px, rgb(48 88 126 / 12%) 19px 20px, transparent 21px),
    radial-gradient(ellipse at 74px 48px, transparent 0 24px, rgb(174 124 39 / 11%) 25px 26px, transparent 27px),
    radial-gradient(ellipse at 128px 20px, transparent 0 18px, rgb(48 88 126 / 10%) 19px 20px, transparent 21px),
    radial-gradient(ellipse at 154px 54px, rgb(42 92 134 / 8%) 0 5px, transparent 6px);
  background-size: 176px 86px;
  opacity: .84;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .cc-people-v2 :is(
  .people-overview-list-column,
  .people-overview-profile,
  .people-overview-interactions
)::before { filter: brightness(1.25) saturate(.8); opacity: .5; }


/* source: styles/system-art-finish-r1.css */
/* System-wide finishing layer: restrained editorial cards with clear data rhythm. */
body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) {
  --finish-ink: #204b4e;
  --finish-muted: #71817e;
  --finish-accent: #2f8f87;
  --finish-brass: #b07b2d;
  position: relative;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 22%, transparent) !important;
  border-radius: 10px;
  background:
    radial-gradient(circle at 96% 4%, transparent 0 14px, rgb(176 123 45 / 10%) 15px 16px, transparent 17px 31px),
    linear-gradient(140deg, rgb(252 250 242 / 95%), rgb(245 249 246 / 92%));
  box-shadow: 0 9px 22px rgb(27 69 67 / 7%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck)::after {
  position: absolute;
  z-index: 0;
  inset: 10px 10px auto auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(176 123 45 / 16%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) > :is(h2,h3,h4,.panel-title,[data-card-title]) {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 11px;
  padding: 8px 11px 8px 13px;
  border-bottom: 1px solid color-mix(in srgb, var(--finish-accent) 22%, transparent);
  color: var(--finish-ink) !important;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: .01em;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) > :is(h2,h3,h4,.panel-title,[data-card-title])::before {
  width: 3px;
  height: 20px;
  margin-right: 9px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--finish-brass), var(--finish-accent));
  content: "";
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(label.field > small,.field-label,.eyebrow,.overview-eyebrow) {
  color: var(--finish-muted) !important;
  font-size: 10px;
  letter-spacing: .055em;
  line-height: 1.2;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.metric,.kpi,.stat,.summary-value) strong {
  color: var(--finish-brass) !important;
  font-size: clamp(17px, 1.8vw, 25px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.metric,.kpi,.stat,.summary-value) {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 17%, transparent);
  border-radius: 7px;
  background: rgb(247 250 246 / 78%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.progress,.progress-bar,.meter,.bar-track,[role="progressbar"]) {
  min-height: 7px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 20%, transparent);
  border-radius: 99px;
  background: rgb(47 143 135 / 10%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.progress,.progress-bar,.meter,.bar-track,[role="progressbar"]) > * {
  min-height: inherit;
  border-radius: inherit;
  background: linear-gradient(90deg, #3cc8d5 0%, #52caa2 72%, #d6ae59 100%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.visualization,.chart,.chart-card,.sparkline,.bar-chart) {
  position: relative;
  min-width: 0;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 16%, transparent);
  border-radius: 8px;
  background: linear-gradient(180deg, rgb(248 251 247 / 90%), rgb(239 247 244 / 72%));
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.workbench-actions,.actions,.button-row) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(button.mini-action,.mini-action,.icon-button) {
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--finish-accent) 25%, transparent);
  border-radius: 6px;
  color: var(--finish-ink) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 3px 8px rgb(27 69 67 / 6%);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(button.mini-action,.mini-action,.icon-button):hover {
  border-color: color-mix(in srgb, var(--finish-brass) 64%, transparent);
  color: #8a6227 !important;
  transform: translateY(-1px);
}

body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) .lucide {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
  vertical-align: -3px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) {
  --finish-ink: #f4f0e6;
  --finish-muted: #b6c7c0;
  --finish-accent: #72c7bc;
  --finish-brass: #e0b86b;
  background:
    radial-gradient(circle at 96% 4%, transparent 0 14px, rgb(220 176 97 / 12%) 15px 16px, transparent 17px 31px),
    linear-gradient(140deg, rgb(8 39 44 / 94%), rgb(7 28 35 / 92%));
  box-shadow: 0 11px 24px rgb(0 0 0 / 18%);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.metric,.kpi,.stat,.summary-value) {
  background: rgb(12 54 58 / 68%);
}

/* Reminder rows have a three-column grid. Keep the copy column wide enough for
   real long titles instead of allowing the action column to squeeze it into
   one-character vertical text. */
body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row {
  grid-template-columns: 4px minmax(0, 1fr) !important;
  align-items: start;
  gap: 10px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-copy {
  min-width: 0;
  width: auto;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-title-line {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-edit-target {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-edit-target strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions {
  grid-column: 2;
  width: auto;
  min-width: 0;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row {
    grid-template-columns: 4px minmax(0, 1fr) !important;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) {
    border-radius: 8px;
    box-shadow: 0 6px 16px rgb(27 69 67 / 6%);
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) > :is(h2,h3,h4,.panel-title,[data-card-title]) {
    min-height: 35px;
    margin-bottom: 9px;
    padding: 7px 9px 7px 10px;
    font-size: 14px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.workbench-actions,.actions,.button-row) {
    justify-content: stretch;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .panel:not(.tab-panel-hidden):not(.overview-command-deck) :is(.workbench-actions,.actions,.button-row) > :is(button,.mini-action,.icon-button) {
    flex: 1 1 auto;
  }
}


/* source: styles/contrast-repair-r1.css */
/* Day-theme contrast repair: light overview cards must never inherit focus-card white ink. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel {
  color: #19363a !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel
  :is(h2, h3, h4, strong, p, span, small, time, .overview-task-kind, .tag) {
  color: inherit !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel
  :is(.overview-task-kind, .tag) {
  color: #8a6227 !important;
}

/* Keep intentional white type only on the two dark glass surfaces. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  :is([data-overview-canvas-widget="focus"], [data-overview-canvas-widget="finance"]) > .panel
  :is(h2, h3, h4, strong, p, span, small, time) {
  color: inherit !important;
}

/* Finance stays a dark feature panel, but its nested KPI cards use a light paper surface. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget="finance"] .stacked-kpis .kpi {
  color: #19363a !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget="finance"] .stacked-kpis .kpi :is(span, strong) {
  color: inherit !important;
}

/* Keep decorative linework behind the actual reminder copy. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget="focus"] .overview-task-row > span:first-child {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(8, 50, 51, 0.78);
  box-shadow: 0 1px 0 rgba(215, 180, 95, 0.2);
}

/* Recent amounts use a light pill, so pin the foreground instead of inheriting white panel ink. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget="finance"] > .panel .finance-recent-row > .tag {
  color: #17383b !important;
  background: rgba(248, 251, 247, 0.96) !important;
  border-color: rgba(190, 147, 65, 0.68) !important;
  font-weight: 800;
  text-shadow: none !important;
}

/* Priority and follow-up pills are light surfaces inside the dark Today card. */
html body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
  [data-overview-canvas-widget="focus"] > .panel .overview-task-row > .tag {
  color: #17383b !important;
  background: rgba(248, 251, 247, 0.96) !important;
  border-color: rgba(190, 147, 65, 0.68) !important;
  font-weight: 800;
  text-shadow: none !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"]
    [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) > .panel {
    color: #19363a !important;
  }
}


/* source: styles/card-visual-production-r1.css */
/* Production card visual layer: varied archival borders with quiet operational contrast. */
:root {
  --cv-ink: #173d3b;
  --cv-muted: #60746f;
  --cv-line: #bfd0ca;
  --cv-paper: #fbfaf4;
  --cv-teal: #2f776c;
  --cv-blue: #557c94;
  --cv-brass: #b28a4d;
  --cv-sage: #789b86;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus, .reminder-v2-card,
  .items-v2-card, .profile-owner-card, .custom-info-card,
  .cc-profile__editor, .cc-profile__timeline, .cc-profile__structure,
  .cc-profile__archive-manager, .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  --cv-accent: var(--cv-teal);
  position: relative;
  isolation: isolate;
  min-width: 0;
  border: 0 !important;
  border-radius: 10px;
  background-color: color-mix(in srgb, var(--cv-paper) 96%, transparent);
  background-color: var(--cv-paper);
  background-image: url("/static/command_center/assets/botanical-paper-r1.svg");
  background-position: center;
  background-size: cover;
  box-shadow: 0 12px 28px rgb(59 45 28 / 14%);
}

/* A fine inset keyline echoes the supplied framed reference without becoming ornate. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus, .reminder-v2-card,
  .items-v2-card, .profile-owner-card, .custom-info-card,
  .cc-profile__editor, .cc-profile__timeline, .cc-profile__structure,
  .cc-profile__archive-manager, .reminder-v2__editor-card,
  .reminder-v2__list-card
)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 5px;
  border: 0;
  border-radius: 0;
  background: url("/static/command_center/assets/ornate-gold-frame-r1.svg") center / 100% 100% no-repeat;
  opacity: .98;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus, .reminder-v2-card,
  .items-v2-card, .profile-owner-card, .custom-info-card,
  .cc-profile__editor, .cc-profile__timeline, .cc-profile__structure,
  .cc-profile__archive-manager, .reminder-v2__editor-card,
  .reminder-v2__list-card
)::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  width: 22px;
  height: 22px;
  border: 1px solid #c49a4b;
  border-radius: 50%;
  background: radial-gradient(circle, #f2d18a 0 18%, #a8772e 20% 33%, #f6df9e 35% 42%, transparent 44%);
  box-shadow: 0 0 0 3px rgb(255 248 220 / 60%), 0 1px 4px rgb(82 53 14 / 25%);
  pointer-events: none;
}

/* Semantic variations keep the system expressive without random decoration. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget:nth-child(4n + 2) > .panel,
  .module-canvas-widget:nth-child(4n + 2) > .panel,
  .reminder-v2-card, .work-column
) { --cv-accent: var(--cv-brass); }

body.owner-shell-v1:not(.auth-required) #moduleStage :is(.panel, .work-column, .people-v2-card, .knowledge-v2-card, .vault-card, .reminder-v2-card) :is(.amount, .metric-value, .stat-value, .number, [data-value]) {
  color: #8b5f22;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 760;
  letter-spacing: .02em;
  text-shadow: 0 1px 0 #fff4d0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget:nth-child(4n + 3) > .panel,
  .module-canvas-widget:nth-child(4n + 3) > .panel,
  .people-v2-card, .profile-owner-card, .custom-info-card
) {
  --cv-accent: var(--cv-sage);
  background-image:
    linear-gradient(135deg, rgb(255 255 255 / 48%), transparent 42%),
    repeating-linear-gradient(118deg, transparent 0 17px, rgb(120 155 134 / 7%) 18px 19px, transparent 20px 35px);
  background-size: auto, 96px 96px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget:nth-child(4n) > .panel,
  .module-canvas-widget:nth-child(4n) > .panel,
  .knowledge-v2-card, .vault-card, .knowledge-v2__canvas-card
) {
  --cv-accent: var(--cv-blue);
  background-image:
    linear-gradient(135deg, rgb(255 255 255 / 48%), transparent 42%),
    repeating-linear-gradient(0deg, transparent 0 20px, rgb(85 124 148 / 7%) 21px 22px, transparent 23px 42px);
  background-size: auto, 100% 42px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > h3, .panel > .command-console-head,
  .cc-profile__editor-head, .cc-profile__life-head,
  .cc-profile__timeline > header, .cc-profile__structure > header,
  .knowledge-v2__editor-head, .knowledge-v2__browser-head,
  .knowledge-v2__current-notes > header, .reminder-v2-section-title
) {
  position: relative;
  z-index: 1;
  color: var(--cv-ink) !important;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.35;
  letter-spacing: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > p, .panel > small, .panel .muted,
  .card-meta, .record-meta, .module-subtitle
) { color: var(--cv-muted); font-size: 12px; line-height: 1.55; }

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel, .work-column, .people-v2-card, .knowledge-v2-card,
  .vault-card, .reminder-v2-card, .items-v2-card, .profile-owner-card,
  .custom-info-card
) :is(input, textarea, select, table, .tabulator, .list, .record-list, .form-grid) {
  position: relative;
  z-index: 2;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus, .reminder-v2-card,
  .items-v2-card, .profile-owner-card, .custom-info-card,
  .cc-profile__editor, .cc-profile__timeline, .cc-profile__structure,
  .cc-profile__archive-manager, .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  --cv-ink: #e2f1eb;
  --cv-muted: #a8c1b8;
  --cv-line: #37655f;
  --cv-paper: #092e32;
  background-color: rgb(8 38 42 / 92%);
  background-image: linear-gradient(135deg, rgb(255 255 255 / 4%), transparent 42%);
  box-shadow: inset 0 1px rgb(210 245 230 / 7%), 0 10px 22px rgb(0 0 0 / 18%);
}

/* The primary overview card gets the full reference treatment rather than the legacy dark deck surface. */
body.owner-shell-v1:not(.auth-required) #moduleStage .overview-command-deck {
  position: relative;
  isolation: isolate;
  border: 0 !important;
  border-radius: 12px;
  color: #2e3a31 !important;
  background: #f7f1e4 url("/static/command_center/assets/botanical-paper-r1.svg") center / cover no-repeat !important;
  box-shadow: 0 12px 28px rgb(59 45 28 / 14%), inset 0 0 0 4px rgb(255 251 236 / 68%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-command-deck::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 10px;
  border: 2px solid rgb(210 164 76 / 88%);
  border-radius: 8px;
  background: none;
  box-shadow: inset 0 0 0 1px rgb(246 216 139 / 72%), 0 0 0 1px rgb(111 75 22 / 55%);
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-command-deck::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 14px;
  border-radius: 5px;
  background:
    radial-gradient(circle at 0 0, #e6bd68 0 4px, transparent 5px),
    radial-gradient(circle at 100% 0, #e6bd68 0 4px, transparent 5px),
    radial-gradient(circle at 0 100%, #e6bd68 0 4px, transparent 5px),
    radial-gradient(circle at 100% 100%, #e6bd68 0 4px, transparent 5px);
  background-repeat: no-repeat;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-command-deck > * {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) #moduleStage .overview-command-deck :is(h1, h2, h3, strong, .metric-value, .number) {
  color: #734d1a !important;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  text-shadow: 0 1px 0 #fff7dc;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .overview-command-deck {
  background: #f7f1e4 url("/static/command_center/assets/botanical-paper-r1.svg") center / cover no-repeat !important;
  color: #2e3a31 !important;
}

#moduleStage .overview-command-deck {
  background: #f7f1e4 url("/static/command_center/assets/botanical-paper-r1.svg") center / cover no-repeat !important;
  color: #2e3a31 !important;
}

/* Apply the supplied material treatment to every functional card, not only the overview deck. */
#moduleStage :is(
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
  .knowledge-v2__canvas-card, .knowledge-v2__distribution,
  .knowledge-v2__coverage, .knowledge-v2__focus, .reminder-v2-card,
  .items-v2-card, .profile-owner-card, .custom-info-card,
  .cc-profile__editor, .cc-profile__timeline, .cc-profile__structure,
  .cc-profile__archive-manager, .reminder-v2__editor-card,
  .reminder-v2__list-card
) {
  background-image:
    url("/static/command_center/assets/ornate-gold-frame-r1.svg"),
    url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center, center !important;
  background-size: 100% 100%, cover !important;
  background-repeat: no-repeat, no-repeat !important;
  box-shadow: 0 10px 24px rgb(59 45 28 / 12%), inset 0 0 0 3px rgb(255 251 236 / 45%) !important;
}

/* Profile editing uses its own quiet form hierarchy. The shared frame layer
   was never intended for the editor, structure manager, or archive lists and
   left a large gold outline over their controls. Keep the paper texture only. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__structure,
  .cc-profile__archive-manager
) {
  background-image: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 10px 24px rgb(59 45 28 / 12%) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__structure,
  .cc-profile__archive-manager
)::before,
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .cc-profile__editor,
  .cc-profile__structure,
  .cc-profile__archive-manager
)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* Dark overview copy must stay crisp: the old warm shadow created a doubled glyph edge. */
#moduleStage .overview-command-deck :is(
  h1, h2, h3, h4, h5, h6, strong, b, p, span, a, li, dt, dd, button
) {
  text-shadow: none !important;
  filter: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
#moduleStage .overview-command-deck > *,
#moduleStage .overview-command-deck > * > *,
#moduleStage .overview-command-deck > * > * > * {
  position: relative;
  z-index: 2;
}

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .overview-canvas-widget > .panel:not(.overview-command-deck),
    .module-canvas-widget > .panel:not(.overview-command-deck),
    .work-column, .people-v2-card, .knowledge-v2-card, .vault-card,
    .knowledge-v2__canvas-card, .reminder-v2-card, .items-v2-card,
    .profile-owner-card, .custom-info-card
  ) { border-radius: 7px; box-shadow: inset 0 1px rgb(255 255 255 / 62%); }
}

/* r13 correction: target the real Work/Knowledge shells and keep fills intact. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-overview-shell,
  .knowledge-v2,
  .knowledge-v2__distribution,
  .knowledge-v2__coverage,
  .knowledge-v2__focus,
  .knowledge-v2__canvas-card,
  .people-v2-card,
  .vault-card,
  .reminder-v2-card,
  .items-v2-card,
  .profile-owner-card,
  .custom-info-card
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgb(193 154 85 / 68%) !important;
  box-shadow: 0 10px 24px rgb(59 45 28 / 12%), inset 0 0 0 1px rgb(255 251 236 / 48%), inset 0 0 0 4px rgb(193 154 85 / 10%) !important;
  background-image: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-overview-shell,
  .knowledge-v2,
  .knowledge-v2__distribution,
  .knowledge-v2__coverage,
  .knowledge-v2__focus,
  .knowledge-v2__canvas-card,
  .people-v2-card,
  .vault-card,
  .reminder-v2-card,
  .items-v2-card,
  .profile-owner-card,
  .custom-info-card
)::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 5px;
  border: 1px solid rgb(222 188 116 / 82%);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgb(111 75 22 / 36%);
  background: none !important;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck,
  .overview-canvas-widget > .panel:not(.overview-command-deck),
  .module-canvas-widget > .panel:not(.overview-command-deck),
  .work-overview-shell,
  .knowledge-v2,
  .knowledge-v2__distribution,
  .knowledge-v2__coverage,
  .knowledge-v2__focus,
  .knowledge-v2__canvas-card,
  .people-v2-card,
  .vault-card,
  .reminder-v2-card,
  .items-v2-card,
  .profile-owner-card,
  .custom-info-card
)::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: url("/static/command_center/assets/botanical-paper-r1.svg") center / cover no-repeat !important;
  opacity: .22;
  mix-blend-mode: multiply;
  pointer-events: none;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-command-deck, .work-overview-shell, .knowledge-v2
) > * { position: relative; z-index: 2; }

/* Work columns are layout rails, not cards: remove the oversized nested frame. */
body.owner-shell-v1:not(.auth-required) #moduleStage .work-column {
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background-image: none !important;
  background-color: transparent !important;
}
body.owner-shell-v1:not(.auth-required) #moduleStage .work-column::before,
body.owner-shell-v1:not(.auth-required) #moduleStage .work-column::after {
  content: none !important;
  display: none !important;
}
#moduleStage .work-column::before,
#moduleStage .work-column::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
}

/* Put the botanical paper on the actual content cards, with their own fills intact. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .work-project-row,
  .work-overview-metrics > article,
  .work-overview-brief,
  .work-overview-timeline,
  .work-empty
) {
  background-image: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center !important;
  background-size: cover !important;
  background-blend-mode: soft-light;
  box-shadow: inset 0 0 0 1px rgb(193 154 85 / 18%);
}

/* Same treatment for compact cards that previously inherited a plain white fill. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .overview-action-panel,
  .overview-command-deck .metric-card,
  .finance-v2-card,
  .people-v2-card,
  .vault-card,
  .items-v2-card,
  .reminder-v2-card
) {
  background-image: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center !important;
  background-size: cover !important;
  background-blend-mode: soft-light;
}


/* source: styles/mobile-scroll-touch-r1.css */
/* Mobile touch contract: cards are part of the page flow, not nested vertical scrollers. */
@media (max-width: 760px) {
  html,
  body.owner-shell-v1,
  body.owner-shell-v1 .main,
  body.owner-shell-v1 #moduleStage {
    touch-action: pan-y;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget] > .panel,
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-module-tab="0"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel,
  body.owner-shell-v1:not(.auth-required) #moduleStage .module-canvas-widget > .panel:not(.overview-command-deck) {
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
    scrollbar-gutter: auto !important;
    touch-action: pan-y;
  }

  /* Keep deliberately bounded lists and editors independently scrollable. */
  body.owner-shell-v1 #moduleStage :is(.list, [data-list], .table-wrap, .knowledge-v2__records, .knowledge-v2__capture-body, .cc-tag-picker__options) {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  body.owner-shell-v1 #moduleStage :is(.overview-canvas-drag-handle, .overview-canvas-resize-handle, .module-canvas-drag-handle, .module-canvas-resize-handle)::before,
  body.owner-shell-v1 #moduleStage :is(.overview-canvas-drag-handle, .overview-canvas-resize-handle, .module-canvas-drag-handle, .module-canvas-resize-handle)::after {
    pointer-events: none;
  }
}


/* source: styles/visual-upgrade-v1.css */
/* VIS-B001: one visual owner for the 8788-inspired archive direction. */
:root {
  --vu-ink: #143b39;
  --vu-ink-soft: #54736d;
  --vu-brass: #bd8a38;
  --vu-brass-hi: #e8c878;
  --vu-brass-deep: #815a1f;
  --vu-paper: #f5f0df;
  --vu-paper-soft: rgba(250, 248, 237, .86);
  --vu-teal: #0c4b49;
  --vu-teal-soft: #1e756b;
  --vu-shadow: rgba(12, 42, 39, .22);
}

body.owner-shell-v1:not(.auth-required) {
  color: var(--vu-ink);
  background-color: #0b3c38;
  background-image: linear-gradient(120deg, rgba(4, 38, 35, .7), rgba(10, 66, 60, .38)), url("/static/command_center/assets/day-archive-r1.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

body.owner-shell-v1:not(.auth-required) #commandCenterShell {
  position: relative;
  isolation: isolate;
  margin: 14px;
  min-height: calc(100dvh - 28px);
  border: 3px solid var(--vu-brass);
  border-radius: 18px 5px 18px 5px;
  box-shadow: inset 0 0 0 3px rgba(236, 205, 130, .84), inset 0 0 0 9px rgba(115, 79, 25, .74), 0 22px 58px rgba(0, 18, 17, .3);
}

body.owner-shell-v1:not(.auth-required) #commandCenterShell::before,
body.owner-shell-v1:not(.auth-required) #commandCenterShell::after {
  position: absolute;
  z-index: 3;
  width: 86px;
  height: 18px;
  content: "";
  pointer-events: none;
  background: var(--vu-brass);
  box-shadow: 0 0 0 3px var(--vu-brass-deep), 0 0 0 6px rgba(240, 212, 143, .72);
}

body.owner-shell-v1:not(.auth-required) #commandCenterShell::before { top: -9px; left: 15%; transform: translateX(-50%) rotate(-1deg); }
body.owner-shell-v1:not(.auth-required) #commandCenterShell::after { right: 13%; bottom: -9px; transform: translateX(50%) rotate(1deg); }

body.owner-shell-v1:not(.auth-required) .sidebar {
  position: relative;
  z-index: 1;
  margin: 10px;
  border: 2px solid var(--vu-brass);
  border-radius: 16px 4px 16px 4px;
  background: linear-gradient(160deg, rgba(5, 50, 46, .96), rgba(6, 39, 38, .9)), url("/static/command_center/assets/black-linen-open.png");
  background-blend-mode: normal, soft-light;
  box-shadow: inset 0 0 0 2px rgba(232, 200, 120, .35), inset 0 0 0 6px rgba(118, 79, 24, .35), 12px 0 28px rgba(0, 24, 21, .22);
}

body.owner-shell-v1:not(.auth-required) .sidebar .brand,
body.owner-shell-v1:not(.auth-required) .sidebar .nav,
body.owner-shell-v1:not(.auth-required) .sidebar .pin-button,
body.owner-shell-v1:not(.auth-required) .sidebar .pinned {
  position: relative;
  z-index: 1;
}

body.owner-shell-v1:not(.auth-required) .sidebar .mark {
  border: 3px solid var(--vu-brass);
  border-radius: 50%;
  background: rgba(5, 41, 39, .8);
  box-shadow: 0 0 0 4px rgba(232, 200, 120, .2), inset 0 0 0 1px rgba(255, 240, 185, .5);
}

body.owner-shell-v1:not(.auth-required) .sidebar .brand h1,
body.owner-shell-v1:not(.auth-required) .sidebar .brand small { color: #f1d38b; }
body.owner-shell-v1:not(.auth-required) .sidebar .nav a { color: #e6eee3; }
body.owner-shell-v1:not(.auth-required) .sidebar .nav a[aria-current="page"] {
  border: 1px solid var(--vu-brass-hi);
  background: linear-gradient(135deg, var(--vu-teal-soft), #125c57);
  box-shadow: inset 0 0 0 2px rgba(243, 212, 135, .18), 0 7px 16px rgba(0, 20, 18, .25);
}

body.owner-shell-v1:not(.auth-required) .main { position: relative; z-index: 1; background: transparent; }
body.owner-shell-v1:not(.auth-required) .topbar {
  margin: 10px 10px 0;
  border: 1px solid rgba(222, 191, 113, .68);
  border-radius: 8px 2px 8px 2px;
  background: rgba(245, 241, 226, .9);
  box-shadow: 0 8px 20px rgba(13, 44, 40, .16), inset 0 0 0 2px rgba(255, 255, 255, .55);
  backdrop-filter: blur(12px) saturate(108%);
}

body.owner-shell-v1:not(.auth-required) .workspace {
  background: transparent;
}

body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  margin: 18px 18px 10px;
  padding: 20px 24px;
  border: 1px solid rgba(230, 198, 119, .55);
  border-radius: 10px 3px 10px 3px;
  background: linear-gradient(120deg, rgba(6, 49, 46, .9), rgba(19, 86, 77, .72)), url("/static/command_center/assets/arches-open.png");
  background-blend-mode: normal, soft-light;
  box-shadow: inset 0 0 0 2px rgba(240, 211, 142, .18), 0 14px 28px var(--vu-shadow);
}

body.owner-shell-v1:not(.auth-required) .formal-workbench-intro h1,
body.owner-shell-v1:not(.auth-required) .formal-workbench-intro p,
body.owner-shell-v1:not(.auth-required) .formal-workbench-intro span { color: #f7f0d9; }
body.owner-shell-v1:not(.auth-required) .formal-workbench-intro h1 { font-family: "STKaiti", "KaiTi", Georgia, serif; letter-spacing: .035em; }

/* The frame is built from borders and inset rings, never content-crossing pseudo artwork. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel::before,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel::after {
  display: none !important;
  content: none !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--vu-brass) !important;
  border-radius: 10px 3px 10px 3px !important;
  background-color: var(--vu-paper-soft) !important;
  background-image: linear-gradient(135deg, rgba(255, 253, 245, .72), rgba(229, 216, 177, .34)), url("/static/command_center/assets/paper-fibers-open.png") !important;
  background-blend-mode: normal, multiply !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .62), inset 0 0 0 6px rgba(189, 138, 56, .17), inset 0 0 0 10px rgba(129, 90, 31, .12), 0 16px 30px var(--vu-shadow) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .module-canvas-widget > .panel[data-tab-panel="finance-calendar"] {
  background-color: #102c30 !important;
  background-image: none !important;
}

/* Paper-backed overview rows keep their existing dark ink on interaction. */
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="activity"] .row:is(:hover, :focus-within) {
  background: #e3ddc8;
}

/* The month toolbar responds to its card width, including resized canvases. */
body.owner-shell-v1:not(.auth-required) .finance-calendar-panel {
  container: finance-calendar / inline-size;
}

@container finance-calendar (max-width: 550px) {
  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    padding: 8px;
    gap: 6px;
  }
  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav {
    width: 36px;
    min-width: 36px;
    grid-row: 1;
  }
  body.owner-shell-v1:not(.auth-required) .finance-calendar-toolbar .finance-month-nav:last-of-type {
    grid-column: 3;
  }
  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
  }
  body.owner-shell-v1:not(.auth-required) .finance-calendar-month-field input {
    min-width: 0;
    max-width: 100%;
  }
  body.owner-shell-v1:not(.auth-required) #moduleStage #financeCalendarMonthApply {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  body.owner-shell-v1:not(.auth-required) .finance-calendar-range {
    padding-left: 0;
  }
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  border-width: 4px !important;
  border-style: double !important;
  border-color: var(--vu-brass) !important;
  border-radius: 16px 5px 16px 5px !important;
  background-image: linear-gradient(120deg, rgba(7, 48, 45, .96), rgba(22, 91, 81, .88)), url("/static/command_center/assets/arabesque-open.png") !important;
  background-blend-mode: normal, soft-light !important;
  box-shadow: inset 0 0 0 3px rgba(238, 204, 124, .72), inset 0 0 0 8px rgba(122, 83, 27, .5), 0 22px 44px rgba(7, 28, 26, .3) !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > * { position: relative; z-index: 1; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(h3, h4, p, strong, small, span) { text-shadow: none; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(h3, h4, p, strong, small, span) { color: #f7f0d9 !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head { background: transparent; border-bottom: 1px solid rgba(238, 204, 124, .5); }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-context-strip { background: rgba(3, 34, 33, .54); border-top: 1px solid rgba(238, 204, 124, .55); }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-signal-card { background: rgba(244, 238, 214, .94); border: 1px solid var(--vu-brass); color: var(--vu-ink); }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-signal-card * { color: var(--vu-ink) !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:not(:first-child) strong,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:not(:first-child) strong,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:not(:first-child) small,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:not(:first-child) small { color: #f4ead0 !important; -webkit-text-fill-color: #f4ead0 !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:first-child,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-change-row > span:first-child,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-task-row > span:first-child strong,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-change-row > span:first-child strong,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-task-row > span:first-child small,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-change-row > span:first-child small { color: #f4ead0 !important; -webkit-text-fill-color: #f4ead0 !important; }

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget] > .panel {
  border-color: rgba(189, 138, 56, .86) !important;
  background-image: linear-gradient(135deg, rgba(255, 253, 245, .8), rgba(235, 224, 189, .5)), url("/static/command_center/assets/paper-fibers-open.png") !important;
}
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="timeline"] > .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="recent"] > .panel {
  background-image: linear-gradient(135deg, rgba(7, 56, 52, .96), rgba(20, 86, 77, .9)), url("/static/command_center/assets/black-linen-open.png") !important;
  background-blend-mode: normal, soft-light !important;
  color: #f7f0d9 !important;
}
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="timeline"] > .panel * { color: #f7f0d9 !important; }

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { border-color: #b98232 !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { border-color: #9b6b86 !important; background-image: linear-gradient(135deg, rgba(255, 250, 243, .83), rgba(237, 218, 224, .5)), url("/static/command_center/assets/arches-open.png") !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { border-color: #c68b3b !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { background-image: linear-gradient(135deg, rgba(255, 252, 241, .84), rgba(225, 230, 216, .5)), url("/static/command_center/assets/black-linen-open.png") !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { border-left-width: 5px !important; border-left-color: var(--vu-teal-soft) !important; }
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { border-style: double !important; border-width: 3px !important; }

/* AI workbench: bring the live assistant surface into the same archive family. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
  position: relative;
  overflow: hidden;
  border: 3px double var(--vu-brass) !important;
  border-radius: 14px 4px 14px 4px !important;
  background-image: linear-gradient(135deg, rgba(248, 245, 232, .96), rgba(224, 232, 218, .86)), url("/static/command_center/assets/paper-fibers-open.png") !important;
  background-blend-mode: normal, multiply !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .74), inset 0 0 0 7px rgba(189, 138, 56, .16), 0 18px 36px rgba(12, 42, 39, .24) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__header {
  background: linear-gradient(120deg, rgba(7, 52, 49, .98), rgba(20, 91, 81, .93)), url("/static/command_center/assets/arabesque-open.png") !important;
  background-blend-mode: normal, soft-light !important;
  border-bottom: 2px solid rgba(189, 138, 56, .74) !important;
  box-shadow: inset 0 -3px 0 rgba(238, 204, 124, .22) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__header :is(h2, .ai-workbench__eyebrow, .ai-workbench__status-rail span) { color: #f7f0d9 !important; -webkit-text-fill-color: #f7f0d9 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__status-rail span { border-color: rgba(232, 200, 120, .5) !important; background: rgba(255, 250, 229, .12) !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__result {
  border: 2px solid rgba(189, 138, 56, .52) !important;
  border-radius: 9px 3px 9px 3px !important;
  background-image: linear-gradient(135deg, rgba(255, 253, 246, .9), rgba(232, 224, 197, .52)), url("/static/command_center/assets/arches-open.png") !important;
  background-blend-mode: normal, soft-light !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .72), inset 0 0 0 6px rgba(189, 138, 56, .12) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__state { border-color: rgba(189, 138, 56, .48) !important; background: rgba(7, 52, 49, .08) !important; }

body.owner-shell-v1:not(.auth-required) :is(button, .mini-action, .hud-button, .tab, input, select, textarea) { border-radius: 4px; }
body.owner-shell-v1:not(.auth-required) :is(button, .mini-action, .hud-button):not(.nav a) { border-color: rgba(166, 119, 45, .5); box-shadow: inset 0 1px rgba(255, 255, 255, .55), 0 3px 8px rgba(20, 48, 42, .1); }

@media (max-width: 760px) {
  body.owner-shell-v1:not(.auth-required) #commandCenterShell { margin: 6px; min-height: calc(100dvh - 12px); border-radius: 10px 3px 10px 3px; }
  body.owner-shell-v1:not(.auth-required) .sidebar {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
  body.owner-shell-v1:not(.auth-required) .topbar { margin: 6px 6px 0; }
  body.owner-shell-v1:not(.auth-required) .formal-workbench-intro { margin: 10px 10px 8px; padding: 14px; }
  body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), inset 0 0 0 5px rgba(189, 138, 56, .15), 0 8px 18px rgba(12, 42, 39, .16) !important; }
}

/* VIS-R20-B2 FINAL CASCADE GUARD (must remain last): never stretch a full-page frame into card content. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  background-image: linear-gradient(135deg, rgba(255, 252, 241, .94), rgba(231, 223, 195, .76)), url("/static/command_center/assets/paper-grid.png") !important;
  background-position: center, center !important;
  background-size: auto, 180px 180px !important;
  background-repeat: no-repeat, repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  background-image: linear-gradient(135deg, rgba(255, 250, 243, .94), rgba(239, 218, 226, .8)), url("/static/command_center/assets/linen-gold.png") !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
 background-image: linear-gradient(135deg, rgba(245, 241, 222, .94), rgba(214, 225, 214, .76)), url("/static/command_center/assets/gold-scale-open.png") !important;
  background-position: center, center !important;
  background-size: auto, 160px 160px !important;
  background-repeat: no-repeat, repeat !important;
}

/* VIS-R20-B2 r26: mount the downloaded artwork as real perimeter borders via nine-slice, never as a tiled fill. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 18px solid transparent !important;
  border-image-source: url("/static/command_center/assets/methode-cover-border.svg") !important;
  border-image-slice: 520 fill !important;
  border-image-width: 18px !important;
  border-image-outset: 3px !important;
  border-image-repeat: stretch !important;
}
/* VIS-R20-B2 r27: actual module panels are direct descendants of moduleStage in several routes. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel {
  border: 16px solid transparent !important;
  border-image-source: url("/static/command_center/assets/methode-cover-border.svg") !important;
  border-image-slice: 520 fill !important;
  border-image-width: 16px !important;
  border-image-outset: 2px !important;
  border-image-repeat: stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel {
  border: 14px solid transparent !important;
  border-image-source: url("/static/command_center/assets/rit-yearbook-border-1922.svg") !important;
  border-image-slice: 520 fill !important;
  border-image-width: 14px !important;
  border-image-outset: 2px !important;
  border-image-repeat: stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel {
  border: 12px solid transparent !important;
  border-image-source: url("/static/command_center/assets/de-arithmetica-borders.svg") !important;
  border-image-slice: 70 fill !important;
  border-image-width: 12px !important;
  border-image-outset: 2px !important;
  border-image-repeat: stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 16px solid transparent !important;
  border-image-source: url("/static/command_center/assets/rit-yearbook-border-1922.svg") !important;
  border-image-slice: 520 fill !important;
  border-image-width: 16px !important;
  border-image-outset: 3px !important;
  border-image-repeat: stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
  border: 14px solid transparent !important;
  border-image-source: url("/static/command_center/assets/de-arithmetica-borders.svg") !important;
  border-image-slice: 70 fill !important;
  border-image-width: 14px !important;
  border-image-outset: 2px !important;
  border-image-repeat: stretch !important;
}

/* VIS-R20-B2 correction: full-page ornamental SVGs are reference assets, not tiled card fills. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  background-image: linear-gradient(135deg, rgba(255, 252, 241, .94), rgba(231, 223, 195, .76)), url("/static/command_center/assets/paper-grid.png") !important;
  background-position: center, center !important;
  background-size: auto, 180px 180px !important;
  background-repeat: no-repeat, repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 3px double #a87427 !important;
  box-shadow: inset 0 0 0 3px rgba(255, 247, 216, .88), inset 0 0 0 8px rgba(168, 116, 39, .2), 0 14px 28px rgba(74, 48, 21, .2) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  background-image: linear-gradient(135deg, rgba(255, 250, 243, .94), rgba(239, 218, 226, .8)), url("/static/command_center/assets/linen-gold.png") !important;
  border: 2px solid #a86d82 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 3px solid #c58a35 !important;
  border-radius: 12px 4px 12px 4px !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel {
  border: 2px solid #8b6b3e !important;
  box-shadow: inset 0 0 0 3px rgba(139, 107, 62, .18), inset 0 0 0 8px rgba(255, 249, 222, .65), 0 14px 28px rgba(74, 48, 21, .16) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 2px solid #9b702e !important;
  box-shadow: inset 0 0 0 3px rgba(155, 112, 46, .18), inset 0 0 0 8px rgba(255, 249, 222, .65), 0 14px 28px rgba(74, 48, 21, .16) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
 background-image: linear-gradient(135deg, rgba(245, 241, 222, .94), rgba(214, 225, 214, .76)), url("/static/command_center/assets/gold-scale-open.png") !important;
  background-position: center, center !important;
  background-size: auto, 160px 160px !important;
  background-repeat: no-repeat, repeat !important;
}

/* GOLD-B001: intentional card dialects layered over the existing archive base. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  background-image: linear-gradient(120deg, rgba(7, 48, 45, .97), rgba(22, 91, 81, .9)), url("/static/command_center/assets/arabesque-open.png") !important;
  background-size: auto, 420px 420px !important;
  border-width: 5px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 239, 180, .84), inset 0 0 0 8px rgba(126, 82, 25, .62), inset 0 0 0 12px rgba(232, 200, 120, .2), 0 24px 50px rgba(4, 29, 26, .38) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel {
  border: 3px double #b98232 !important;
  background-image: linear-gradient(rgba(255, 252, 239, .88), rgba(244, 234, 205, .74)), url("/static/command_center/assets/paper-fibers-open.png") !important;
  background-size: auto, 260px 260px !important;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), inset 0 0 0 7px rgba(185,130,50,.16), 0 14px 28px rgba(58,40,18,.18) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel :is(.metric,.kpi,.stat,.summary-value) strong { color: #7c4e16 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel {
  border: 3px solid #8b6c3a !important;
  border-radius: 3px 12px 3px 12px !important;
  background-image: linear-gradient(135deg, rgba(255, 253, 245, .9), rgba(223, 229, 213, .72)), url("/static/command_center/assets/arches-open.png") !important;
  background-size: auto, 340px 340px !important;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.78), inset 0 0 0 8px rgba(117,91,44,.12), 0 14px 28px rgba(31,56,46,.16) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel > :is(h2,h3,h4,.panel-title,[data-card-title]) { font-family: Georgia, "Times New Roman", serif !important; letter-spacing: .02em; color: #385449 !important; }

/* GOLD-B002: licensed texture overlays add material depth without replacing the original scene. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  background-image: linear-gradient(120deg, rgba(7, 48, 45, .94), rgba(22, 91, 81, .86)), url("/static/command_center/assets/gold-damask.png"), url("/static/command_center/assets/arabesque-open.png") !important;
  background-size: auto, 220px 220px, 420px 420px !important;
  background-blend-mode: normal, soft-light, soft-light !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel {
  background-image: linear-gradient(rgba(255, 252, 239, .86), rgba(244, 234, 205, .68)), url("/static/command_center/assets/paper-grid.png"), url("/static/command_center/assets/paper-fibers-open.png") !important;
  background-size: auto, 180px 180px, 260px 260px !important;
  background-blend-mode: normal, multiply, multiply !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel {
  background-image: linear-gradient(135deg, rgba(255, 253, 245, .88), rgba(223, 229, 213, .68)), url("/static/command_center/assets/paper-grid.png"), url("/static/command_center/assets/arches-open.png") !important;
  background-size: auto, 210px 210px, 340px 340px !important;
  background-blend-mode: normal, soft-light, soft-light !important;
}

/* Priority repair: these rules intentionally outrank the legacy art layers. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar {
  border: 2px solid var(--vu-brass) !important;
  background: linear-gradient(160deg, rgba(5, 50, 46, .96), rgba(6, 39, 38, .92)), url("/static/command_center/assets/black-linen-open.png") !important;
  background-blend-mode: normal, soft-light !important;
  box-shadow: inset 0 0 0 2px rgba(232, 200, 120, .35), inset 0 0 0 6px rgba(118, 79, 24, .35), 12px 0 28px rgba(0, 24, 21, .22) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar {
  border: 1px solid rgba(230, 198, 119, .62) !important;
  background: rgba(7, 52, 49, .9) !important;
  color: #f7f0d9 !important;
  box-shadow: 0 10px 24px rgba(0, 24, 21, .22), inset 0 0 0 2px rgba(240, 211, 142, .12) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar :is(h2, span, button, .status) { color: #f7f0d9 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar :is(button, .global-search-mount button, .ai-fab, .status-button) {
  border: 1px solid rgba(232, 200, 120, .78) !important;
  background: rgba(245, 240, 221, .94) !important;
  color: var(--vu-ink) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 3px 8px rgba(0, 22, 20, .16) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar :is(button, .global-search-mount button, .ai-fab, .status-button) svg,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar :is(button, .global-search-mount button, .ai-fab, .status-button) i { color: var(--vu-ink) !important; }

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .nav a,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .nav a span,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .nav a svg,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .nav a i,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .pin-button,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .pinned a {
  color: #f0e7c9 !important;
  -webkit-text-fill-color: #f0e7c9 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .sidebar .nav a[aria-current="page"] {
  color: #fff3c4 !important;
  -webkit-text-fill-color: #fff3c4 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro {
  border: 3px double var(--vu-brass) !important;
  background-image: linear-gradient(115deg, rgba(248, 244, 229, .97), rgba(231, 222, 192, .86)), url("/static/command_center/assets/paper-fibers-open.png") !important;
  background-blend-mode: normal, multiply !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .68), inset 0 0 0 6px rgba(189, 138, 56, .16), 0 18px 34px rgba(12, 42, 39, .2) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro :is(h1, p, span, small) { color: var(--vu-ink) !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro h1 { text-shadow: 0 1px 0 rgba(255, 255, 255, .72) !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .formal-workbench-intro::after { display: none !important; content: none !important; }

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  border: 4px double var(--vu-brass) !important;
  border-radius: 16px 5px 16px 5px !important;
  background-image: linear-gradient(120deg, rgba(7, 48, 45, .97), rgba(22, 91, 81, .9)), url("/static/command_center/assets/arabesque-open.png") !important;
  background-blend-mode: normal, soft-light !important;
  box-shadow: inset 0 0 0 3px rgba(238, 204, 124, .72), inset 0 0 0 8px rgba(122, 83, 27, .5), 0 22px 44px rgba(7, 28, 26, .3) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row::before {
  display: none !important;
  content: none !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .muted-row > span:first-child,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .muted-row > span:first-child strong,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .muted-row > span:first-child small {
  color: #f4ead0 !important;
  -webkit-text-fill-color: #f4ead0 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:first-child > small:last-child,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-change-row > span:first-child > small:last-child {
  color: #f4ead0 !important;
  -webkit-text-fill-color: #f4ead0 !important;
}
/* GOLD-B002 final cascade */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck { background-image: linear-gradient(120deg, rgba(7,48,45,.94), rgba(22,91,81,.86)), url("/static/command_center/assets/gold-damask.png"), url("/static/command_center/assets/arabesque-open.png") !important; background-size: auto, 220px 220px, 420px 420px !important; background-blend-mode: normal, soft-light, soft-light !important; border-width: 5px !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel { background-image: linear-gradient(rgba(255,252,239,.86), rgba(244,234,205,.68)), url("/static/command_center/assets/paper-grid.png"), url("/static/command_center/assets/paper-fibers-open.png") !important; background-size: auto, 180px 180px, 260px 260px !important; background-blend-mode: normal, multiply, multiply !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel { background-image: linear-gradient(135deg, rgba(255,253,245,.88), rgba(223,229,213,.68)), url("/static/command_center/assets/paper-grid.png"), url("/static/command_center/assets/arches-open.png") !important; background-size: auto, 210px 210px, 340px 340px !important; background-blend-mode: normal, soft-light, soft-light !important; }

/* GOLD-B003: make the imported ornament visibly present while preserving text contrast. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck { background-image: linear-gradient(120deg, rgba(5,42,39,.9), rgba(15,78,69,.78)), url("/static/command_center/assets/gold-damask.png") !important; background-size: auto, 150px 150px !important; background-blend-mode: normal, screen !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > * { position: relative; z-index: 2; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(h1,h2,h3,h4,p,strong,small,span,a,button) { position: relative; z-index: 3; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel { background-image: linear-gradient(rgba(255,252,239,.82), rgba(244,234,205,.62)), url("/static/command_center/assets/paper-grid.png") !important; background-size: auto, 140px 140px !important; background-blend-mode: normal, multiply !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel { background-image: linear-gradient(135deg, rgba(255,253,245,.84), rgba(223,229,213,.62)), url("/static/command_center/assets/paper-grid.png") !important; background-size: auto, 160px 160px !important; background-blend-mode: normal, multiply !important; }

/* LUX-B001: visible corner ornaments and a framed title plaque, kept behind content. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck { isolation: isolate; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after { display: block !important; content: "" !important; position: absolute; z-index: 1; pointer-events: none; width: 84px; height: 84px; border: 3px solid rgba(238,204,124,.72); opacity: .9; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; box-shadow: 10px 10px 0 -7px rgba(189,138,56,.8); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after { right: 10px; bottom: 10px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; box-shadow: -10px -10px 0 -7px rgba(189,138,56,.8); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head { position: relative; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head::after { content: "PERSONAL ARCHIVE"; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 4px 18px; border: 2px solid #c28a35; background: #f2d58b; color: #173f3b; font: 700 10px/1.1 Georgia, serif; letter-spacing: .16em; box-shadow: inset 0 0 0 2px rgba(255,250,220,.8), 0 4px 8px rgba(0,25,22,.25); }

/* Contrast pass: explicit readable ink for every text role on dark feature cards. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(.overview-eyebrow,.overview-label,.overview-caption,.muted,.muted-row,.empty-state,.overview-task-row,.overview-change-row) { color: #f6ecd2 !important; -webkit-text-fill-color: #f6ecd2 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(a,button) { color: #173f3b !important; -webkit-text-fill-color: #173f3b !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(button,.mini-action) { background: rgba(246, 237, 205, .94) !important; border-color: rgba(232, 200, 120, .86) !important; color: #173f3b !important; -webkit-text-fill-color: #173f3b !important; }

/* FRAME-B001: a deliberate multi-ring luxury frame, not a single outline. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  border: 7px solid #a87427 !important;
  outline: 2px solid #f0cf79;
  outline-offset: -11px;
  background-image: linear-gradient(120deg, rgba(5,42,39,.9), rgba(15,78,69,.78)), url("/static/command_center/assets/gold-damask.png") !important;
  background-size: auto, 120px 120px !important;
  box-shadow: inset 0 0 0 2px #f7dfa0, inset 0 0 0 5px #6f4818, inset 0 0 0 9px rgba(238,204,124,.95), inset 0 0 0 13px rgba(111,72,24,.72), inset 0 0 0 17px rgba(247,223,160,.34), 0 0 0 1px #4e3212, 0 18px 42px rgba(3,24,22,.42) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after {
  width: 112px !important; height: 112px !important; border: 0 !important; opacity: 1 !important; z-index: 1 !important;
  background: radial-gradient(circle at center, transparent 0 27px, rgba(242,213,139,.95) 28px 30px, transparent 31px 40px, rgba(126,82,25,.9) 41px 44px, transparent 45px), conic-gradient(from 45deg, transparent 0 8deg, rgba(239,203,116,.95) 9deg 13deg, transparent 14deg 28deg, rgba(126,82,25,.9) 29deg 34deg, transparent 35deg 52deg) !important;
  filter: drop-shadow(0 2px 1px rgba(41,25,7,.55));
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before { top: 8px !important; left: 8px !important; border-radius: 0 100% 0 0 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after { right: 8px !important; bottom: 8px !important; transform: rotate(180deg); border-radius: 0 100% 0 0 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head::after { top: 8px !important; padding: 5px 24px !important; border: 3px double #8c5d1e !important; background: linear-gradient(#f8e5a8,#d9a94a) !important; box-shadow: inset 0 0 0 2px #fff2c7, 0 3px 0 #6d4618, 0 6px 12px rgba(0,20,16,.3) !important; }

/* ORN-B001: use the supplied palace reference as a real four-sided frame asset. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before { inset: 0 !important; width: auto !important; height: auto !important; border: 0 !important; border-radius: 0 !important; background: url("/static/command_center/assets/ornate-frame-top-tight.png") top center / 100% 54px no-repeat, url("/static/command_center/assets/ornate-frame-bottom-tight.png") bottom center / 100% 54px no-repeat, url("/static/command_center/assets/ornate-frame-left-tight.png") center left / 38px 100% no-repeat, url("/static/command_center/assets/ornate-frame-right-tight.png") center right / 38px 100% no-repeat !important; opacity: .98 !important; filter: drop-shadow(0 1px 1px rgba(48,30,7,.55)); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after { inset: 0 !important; width: auto !important; height: auto !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; transform: none !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > * { position: relative; z-index: 3 !important; }

/* ORN-B001 cleanup: the ornate asset is the frame owner; remove every older metal ring. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  border: 0 !important;
  outline: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 42px rgba(3,24,22,.34) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after {
  inset: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* ORN-B001 safety geometry: ornament stays in a narrow perimeter, content starts inside it. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before {
  inset: 0 !important;
  background-size: 100% 54px, 100% 54px, 38px 100%, 38px 100% !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::after { inset: 0 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head { padding: 52px 38px 18px !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head::after { top: 12px !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-home-head::after { z-index: 5 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck :is(.overview-context-strip,.overview-command-body,.overview-command-grid) { padding-left: 38px !important; padding-right: 38px !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="timeline"] > .panel :is(p,small,span,strong,dt,dd) { color: #f8efd8 !important; -webkit-text-fill-color: #f8efd8 !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget="recent"] > .panel :is(p,small,span,strong,dt,dd) { color: #173f3b !important; -webkit-text-fill-color: #173f3b !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel :is(.muted,.helper-text,.empty-state,.field-help,.subtitle) { color: #31534d !important; -webkit-text-fill-color: #31534d !important; }

/* ORN-B001 perimeter correction: let the supplied frame wrap the card edge. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck {
  overflow: hidden !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before {
  inset: 10px !important;
  background-size: 100% 32px, 100% 32px, 24px 100%, 24px 100% !important;
  z-index: 4 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > * {
  z-index: 3 !important;
}

/* ORN-B001 final direction: the frame belongs outside the green card. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck::before {
  display: none !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-canvas-widget {
  position: relative !important;
  overflow: visible !important;
  z-index: 1 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-canvas-widget::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  inset: -16px !important;
  pointer-events: none !important;
  z-index: 4 !important;
  background: url("/static/command_center/assets/ornate-frame-top-tight.png") top center / 100% 32px no-repeat, url("/static/command_center/assets/ornate-frame-bottom-tight.png") bottom center / 100% 32px no-repeat, url("/static/command_center/assets/ornate-frame-side-tight.png") center left / 32px 100% no-repeat, url("/static/command_center/assets/ornate-frame-side-mirror-tight.png") center right / 32px 100% no-repeat !important;
  filter: drop-shadow(0 1px 1px rgba(48,30,7,.55));
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-canvas-widget:not(:has(> .overview-command-deck))::before {
  display: none !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-canvas-widget:not(:has(> .overview-command-deck)) {
  z-index: auto !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-canvas-widget > .overview-command-deck {
  position: relative !important;
  z-index: 2 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-context-strip,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-signal-card {
  color: #f7f0d9 !important;
  text-shadow: 0 1px 2px rgba(0, 19, 17, .9) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck .overview-context-strip {
  margin: 0 !important;
  width: auto !important;
}

/* ORN-B001 r20: keep the frame centered on the card edge and make both side rails visually complete. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-canvas-widget:has(> .overview-command-deck)::before {
  inset: -12px !important;
  background-image: url("/static/command_center/assets/ornate-frame-top-tight.png"), url("/static/command_center/assets/ornate-frame-bottom-tight.png"), url("/static/command_center/assets/ornate-frame-side-tight.png"), url("/static/command_center/assets/ornate-frame-side-mirror-tight.png") !important;
  background-position: top center, bottom center, center left, center right !important;
  background-size: 100% 58px, 100% 64px, 52px 100%, 52px 100% !important;
  background-repeat: no-repeat !important;
  filter: contrast(1.12) saturate(1.08) drop-shadow(0 2px 1px rgba(48, 30, 7, .58)) !important;
}

/* The four summary tiles need their own opaque reading surface over the patterned card. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-context-strip {
  position: relative !important;
  z-index: 6 !important;
  padding: 0 52px 18px !important;
  background: transparent !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-context-strip .overview-signal-card {
  background: rgba(248, 239, 211, .97) !important;
  border: 1px solid rgba(196, 145, 55, .95) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 252, 236, .76), 0 5px 12px rgba(0, 31, 27, .22) !important;
  opacity: 1 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck > .overview-context-strip .overview-signal-card :is(span, strong, small) {
  color: #123f3a !important;
  -webkit-text-fill-color: #123f3a !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* VIS-R20-B2: module-specific material dialects. The homepage r20 rules above remain untouched. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 3px double #a87427 !important;
  background-image: linear-gradient(135deg, rgba(255, 248, 224, .9), rgba(236, 213, 164, .68)), url("/static/command_center/assets/methode-cover-border.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  font-family: Georgia, "Times New Roman", serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 2px solid #a86d82 !important;
  box-shadow: inset 0 0 0 4px rgba(168, 109, 130, .2), inset 0 0 0 8px rgba(255, 244, 237, .7), 0 14px 28px rgba(74, 32, 54, .18) !important;
  background-image: linear-gradient(135deg, rgba(255, 250, 243, .94), rgba(241, 220, 228, .75)), url("/static/command_center/assets/rit-yearbook-border-1922.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 3px solid #c58a35 !important;
  border-radius: 12px 4px 12px 4px !important;
  box-shadow: inset 0 0 0 3px rgba(255, 247, 216, .9), inset 0 0 0 7px rgba(197, 138, 53, .28), 0 14px 28px rgba(67, 41, 12, .2) !important;
  background-image: linear-gradient(135deg, rgba(255, 252, 240, .94), rgba(239, 220, 171, .7)), url("/static/command_center/assets/de-arithmetica-borders.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  font-family: Georgia, "Times New Roman", serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 2px solid #7c5d38 !important;
  background-image: linear-gradient(135deg, rgba(250, 246, 230, .92), rgba(221, 211, 179, .65)), url("/static/command_center/assets/de-arithmetica-borders.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  font-family: Georgia, "Times New Roman", serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 2px solid #9b702e !important;
  background-image: linear-gradient(135deg, rgba(247, 240, 216, .92), rgba(212, 198, 158, .62)), url("/static/command_center/assets/methode-cover-border.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  font-family: Georgia, "Times New Roman", serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  border: 3px double #b47a2d !important;
  background-image: linear-gradient(135deg, rgba(245, 241, 222, .9), rgba(214, 225, 214, .7)), url("/static/command_center/assets/arches-open.png") !important;
  background-position: center, center !important;
  background-size: auto, 180px 180px !important;
  background-repeat: no-repeat, repeat !important;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel {
  border: 2px solid #7c5d38 !important;
  background-image: linear-gradient(135deg, rgba(250, 246, 230, .94), rgba(221, 211, 179, .7)), url("/static/command_center/assets/de-arithmetica-borders.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  box-shadow: inset 0 0 0 4px rgba(124, 93, 56, .16), 0 14px 28px rgba(74, 48, 21, .16) !important;
  font-family: Georgia, "Times New Roman", serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel {
  border: 3px double #9b702e !important;
  background-image: linear-gradient(135deg, rgba(247, 240, 216, .94), rgba(212, 198, 158, .68)), url("/static/command_center/assets/methode-cover-border.svg") !important;
  background-position: center, center !important;
  background-size: auto, 100% 100% !important;
  background-repeat: no-repeat !important;
  box-shadow: inset 0 0 0 4px rgba(155, 112, 46, .18), 0 14px 28px rgba(56, 38, 15, .2) !important;
  font-family: Georgia, "Times New Roman", serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
  border: 3px double #b47a2d !important;
  background-image: linear-gradient(135deg, rgba(245, 241, 222, .94), rgba(214, 225, 214, .76)), url("/static/command_center/assets/arches-open.png") !important;
  background-position: center, center !important;
  background-size: auto, 180px 180px !important;
  background-repeat: no-repeat, repeat !important;
  box-shadow: inset 0 0 0 3px rgba(255, 251, 229, .8), inset 0 0 0 8px rgba(180, 122, 45, .18), 0 18px 36px rgba(12, 42, 39, .22) !important;
  font-family: "STKaiti", "KaiTi", Georgia, serif;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel :is(h1, h2, h3, h4, .panel-title, .section-title) {
  font-family: "STKaiti", "KaiTi", Georgia, serif;
  letter-spacing: .025em;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel :is(p, small, label, td, th, input, select, textarea, button) {
  font-size: clamp(13px, .88rem, 15px);
}
@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
    background-size: auto, 100% 100% !important;
  }
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.module-canvas-widget, .overview-canvas-widget) > .panel :is(p, small, label, td, th, input, select, textarea, button) {
    font-size: 13px;
  }
}

/* VIS-R20-B2 r24 hard stop: keep full-page SVG candidates out of card fills. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  background-image: linear-gradient(135deg, rgba(255, 252, 241, .94), rgba(231, 223, 195, .76)), url("/static/command_center/assets/paper-grid.png") !important;
  background-position: center, center !important;
  background-size: auto, 180px 180px !important;
  background-repeat: no-repeat, repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel {
  background-image: linear-gradient(135deg, rgba(255, 250, 243, .94), rgba(239, 218, 226, .8)), url("/static/command_center/assets/linen-gold.png") !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] :is(.module-canvas-widget, .overview-canvas-widget) > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
  background-image: linear-gradient(135deg, rgba(245, 241, 222, .94), rgba(214, 225, 214, .76)), url("/static/command_center/assets/gold-damask.png") !important;
  background-position: center, center !important;
  background-size: auto, 160px 160px !important;
  background-repeat: no-repeat, repeat !important;
}

/* VIS-R20-B2 r27 last-word: bind the perimeter to actual module panels. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel {
  border: 16px solid transparent !important;
  border-image: url("/static/command_center/assets/methode-cover-border.svg") 520 fill / 16px / 2px stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel {
  border: 14px solid transparent !important;
  border-image: url("/static/command_center/assets/rit-yearbook-border-1922.svg") 520 fill / 14px / 2px stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel {
  border: 12px solid transparent !important;
  border-image: url("/static/command_center/assets/de-arithmetica-borders.svg") 70 fill / 12px / 2px stretch !important;
}
/* VIS-R20-B2 r29: visible main cards own the frame; hidden tab panels stay untouched. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel:not(.tab-panel-hidden) {
  border: 12px solid transparent !important;
  border-image: url("/static/command_center/assets/de-arithmetica-borders.svg") 70 fill / 12px / 2px stretch !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .finance-overview-workbench {
  border-image: url("/static/command_center/assets/methode-cover-border.svg") 520 fill / 16px / 2px stretch !important;
  background-image: linear-gradient(135deg, rgba(255, 252, 241, .94), rgba(231, 223, 195, .76)), url("/static/command_center/assets/paper-grid.png") !important;
  background-size: auto, 180px 180px !important;
  background-repeat: no-repeat, repeat !important;
}
/* VIS-R20-B2 r31: information cards inside each workbench get their own readable perimeter. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.kpi, .metric, .summary-card, .finance-overview-filter-bar, .finance-overview-range-control, .workbench-actions, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets, .people-overview-card, .reminder-card, .knowledge-v2__metric, .library-overview-actions) {
  position: relative !important;
  border: 1px solid rgba(176, 126, 47, .72) !important;
  border-radius: 8px 3px 8px 3px !important;
  background-image: linear-gradient(135deg, rgba(255, 252, 241, .94), rgba(235, 226, 198, .74)), url("/static/command_center/assets/paper-grid.png") !important;
  background-position: center, center !important;
  background-size: auto, 120px 120px !important;
  background-repeat: no-repeat, repeat !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .72), inset 0 0 0 4px rgba(176, 126, 47, .14), 0 4px 10px rgba(43, 34, 16, .12) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.kpi, .metric, .summary-card, .finance-overview-filter-bar, .finance-overview-range-control, .workbench-actions, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets, .people-overview-card, .reminder-card, .knowledge-v2__metric, .library-overview-actions)::after {
  content: "" !important;
  position: absolute !important;
  inset: 5px !important;
  pointer-events: none !important;
  border: 1px solid rgba(189, 138, 56, .32) !important;
  border-radius: 5px 2px 5px 2px !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.kpi, .metric, .summary-card, .finance-overview-filter-bar, .finance-overview-range-control, .workbench-actions, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets, .people-overview-card, .reminder-card, .knowledge-v2__metric, .library-overview-actions) > * {
  position: relative !important;
  z-index: 1 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] :is(.people-overview-card, .metric)::after {
  border-color: rgba(168, 109, 130, .38) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__result, .ai-workbench__state)::after {
  content: "" !important;
  position: absolute !important;
  inset: 5px !important;
  border: 1px solid rgba(180, 122, 45, .3) !important;
  pointer-events: none !important;
}
/* VIS-R20-B2 r30: use the proven gold four-side PNG frame for visible module cards. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
  position: relative !important;
  overflow: visible !important;
  border: 0 !important;
  border-image: none !important;
  isolation: isolate;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  inset: -7px !important;
  pointer-events: none !important;
  z-index: 8 !important;
  background: url("/static/command_center/assets/ornate-frame-top-tight.png") top center / 100% 26px no-repeat, url("/static/command_center/assets/ornate-frame-bottom-tight.png") bottom center / 100% 26px no-repeat, url("/static/command_center/assets/ornate-frame-side-tight.png") center left / 26px 100% no-repeat, url("/static/command_center/assets/ornate-frame-side-mirror-tight.png") center right / 26px 100% no-repeat !important;
  filter: drop-shadow(0 1px 1px rgba(48, 30, 7, .58)) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden) > *,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench > * {
  position: relative !important;
  z-index: 2 !important;
}


/* source: styles/visual-card-system-v2.css */
/* CARD-ART-R49: stronger material contrast with one ornate rail owner per hierarchy. */
:root {
  --card-art-brass: #9d6d27;
  --card-art-gold: #d6ad58;
  --card-art-paper: rgba(255, 252, 241, .96);
  --card-watermark: url("/static/command_center/assets/archive-crest-watermark.svg");
}

/* Retire legacy decoration on card hosts before the single-owner layer is applied. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel,
  .kpi,
  .metric,
  .summary-card,
  .module-canvas-toolbar,
  .finance-overview-kpis,
  .finance-overview-filter-bar,
  .finance-overview-range-control,
  .workbench-actions,
  .asset-capture-panel,
  .asset-reference-card,
  .ai-workbench
)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel,
  .kpi,
  .metric,
  .summary-card,
  .module-canvas-toolbar,
  .finance-overview-kpis,
  .finance-overview-filter-bar,
  .finance-overview-range-control,
  .workbench-actions,
  .asset-capture-panel,
  .asset-reference-card,
  .ai-workbench
)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel,
  .kpi,
  .metric,
  .summary-card,
  .finance-overview-filter-bar,
  .finance-overview-range-control,
  .workbench-actions,
  .asset-capture-panel,
  .asset-reference-card
) {
  border-image: none !important;
}

/* This inherited conic/radial layer was the large circular ornament behind finance metrics. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .asset-balance-kpis,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage .finance-overview-kpis {
  background-image: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"] {
  --card-frame-top: url("/static/command_center/assets/ornate-frame-top-tight.png");
  --card-frame-bottom: url("/static/command_center/assets/ornate-frame-bottom-tight.png");
  --card-frame-left: url("/static/command_center/assets/ornate-frame-side-tight.png");
  --card-frame-right: url("/static/command_center/assets/ornate-frame-side-mirror-tight.png");
  --card-texture: url("/static/command_center/assets/paper-grid.png");
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  border: 1px solid rgba(157, 109, 39, .62) !important;
  border-radius: 6px !important;
  background:
    linear-gradient(135deg, var(--card-art-paper), rgba(232, 223, 193, .68)) center / auto no-repeat,
    var(--card-texture) center / 148px 148px repeat,
    var(--card-watermark) right 18px top 18px / 168px 168px no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .84),
    inset 0 0 0 5px rgba(157, 109, 39, .13),
    0 8px 18px rgba(55, 39, 16, .12) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"]::after {
  content: none !important;
  display: none !important;
}

/* Small corner accents deepen the material treatment without becoming a second frame. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 7px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  opacity: .9;
  background:
    var(--card-watermark) right 10px top 10px / 132px 132px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top left / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top left / 1px 34px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top right / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top right / 1px 34px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom left / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom left / 1px 34px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom right / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom right / 1px 34px no-repeat !important;
  filter: drop-shadow(0 1px 1px rgba(48, 30, 7, .34));
}

/* Ornate rails stay inside the card edge, so adjacent cards cannot paint over one another. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: var(--card-frame-top) top center / 100% 14px no-repeat,
    var(--card-frame-bottom) bottom center / 100% 14px no-repeat,
    var(--card-frame-left) center left / 14px 100% no-repeat,
    var(--card-frame-right) center right / 14px 100% no-repeat !important;
  filter: contrast(1.08) saturate(1.02) drop-shadow(0 1px 1px rgba(48, 30, 7, .38));
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"] > * {
  position: relative;
  z-index: 2;
}

/* Metrics use a restrained inset double rule, not a second four-rail image frame. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"][data-art-tier="metric"] {
  border-width: 1px !important;
  background-size: auto, 96px 96px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .9),
    inset 0 0 0 4px rgba(157, 109, 39, .24),
    0 5px 12px rgba(55, 39, 16, .1) !important;
}

/* Cards inside an ornate hero keep texture and a crisp inset rule, not another full rail set. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"][data-art-tier="nested"] {
  border: 1px solid rgba(157, 109, 39, .48) !important;
  background-size: auto, 112px 112px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .88),
    inset 0 0 0 4px rgba(157, 109, 39, .18),
    0 5px 14px rgba(55, 39, 16, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck.overview-home [data-art-tier="nested"] .overview-section-head > div > span,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .overview-command-deck.overview-home [data-art-tier="nested"] .overview-section-head h4 {
  color: #19363a !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-variant="teal"] {
  --card-texture: url("/static/command_center/assets/gold-scale-open.png");
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg");
  --card-art-paper: rgba(226, 239, 230, .9);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-variant="rose"] {
  --card-texture: url("/static/command_center/assets/linen-gold.png");
  --card-watermark: url("/static/command_center/assets/arabesque-open.png");
  --card-art-paper: rgba(255, 247, 243, .9);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-variant="archive"] {
  --card-texture: url("/static/command_center/assets/paper-fibers-open.png");
  --card-watermark: url("/static/command_center/assets/archive-crest-watermark.svg");
  --card-art-paper: rgba(249, 244, 226, .9);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-variant="damask"] {
  --card-texture: url("/static/command_center/assets/arabesque-open.png");
  --card-watermark: url("/static/command_center/assets/arches-open.png");
  --card-art-paper: rgba(244, 240, 221, .9);
}

/* Archive modules: keep the page panel as a material boundary while giving
   each semantic work surface a crisp inset tier instead of a second rail. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .items-v2__overview {
  --card-art-paper: rgba(244, 240, 221, .96);
  --card-texture: url("/static/command_center/assets/paper-fibers-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .knowledge-v2__canvas-card,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-overview-column,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .items-v2__workspace-section {
  border: 1px solid rgba(157, 109, 39, .5) !important;
  background: linear-gradient(135deg, rgba(255, 252, 241, .9), rgba(232, 223, 193, .66)), url("/static/command_center/assets/gold-scale-open.png") center / 112px 112px repeat !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .9), inset 0 0 0 4px rgba(157, 109, 39, .18), 0 5px 14px rgba(55, 39, 16, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .items-v2__overview {
  color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .items-v2__overview :is(h1,h2,h3,h4,p,span,strong,button) {
  color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .library-intelligence {
  background: linear-gradient(135deg, rgba(248, 244, 229, .9), rgba(229, 222, 197, .62)), url("/static/command_center/assets/gold-scale-open.png") center / 132px 132px repeat !important;
}

/* AI is a separate shell: one outer archive frame, restrained nested panes. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench {
  --card-texture: url("/static/command_center/assets/black-linen-open.png");
  --card-art-paper: rgba(241, 239, 222, .97);
  color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__pane,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__result {
  border: 1px solid rgba(157, 109, 39, .45) !important;
  background: linear-gradient(135deg, rgba(255, 252, 241, .9), rgba(232, 223, 193, .66)), url("/static/command_center/assets/paper-fibers-open.png") center / 112px 112px repeat !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .86), inset 0 0 0 4px rgba(157, 109, 39, .16), 0 5px 14px rgba(55, 39, 16, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench__state {
  border: 1px solid rgba(157, 109, 39, .38) !important;
  background: rgba(255, 252, 241, .78) !important;
  color: #19363a !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
    background-size: 100% 11px, 100% 11px, 11px 100%, 11px 100% !important;
  }

  /* The mobile reminder grid resolves its two cards 2px into each other. Keep
     the second outer rail visually separated without changing form behavior. */
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .reminder-v2-list-card[data-art-frame-owner="true"] {
    transform: translateY(3px) !important;
  }
}

/* Final cascade for material-only panels. Keep this after the legacy reset so
   ordinary cards visibly retain their texture and inset edge. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel[data-card-material="true"] {
  --card-material-paper: rgba(248, 244, 226, .9);
  --card-material-edge: rgba(157, 109, 39, .36);
  --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png");
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  border: 1px solid var(--card-material-edge) !important;
  border-radius: 5px !important;
  background: linear-gradient(135deg, var(--card-material-paper), rgba(226, 215, 181, .68)), var(--card-material-texture) center / 118px 118px repeat !important;
  background-blend-mode: normal, multiply !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .76), inset 0 0 22px rgba(136, 94, 34, .08), 0 7px 16px rgba(52, 39, 22, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .panel[data-card-material="true"] { --card-material-paper: rgba(224, 239, 228, .9); --card-material-edge: rgba(36, 100, 88, .42); --card-material-texture: url("/static/command_center/assets/gold-scale-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel[data-card-material="true"] { --card-material-paper: rgba(249, 242, 218, .92); --card-material-edge: rgba(163, 111, 33, .42); --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel[data-card-material="true"] { --card-material-paper: rgba(255, 243, 239, .92); --card-material-edge: rgba(151, 91, 73, .4); --card-material-texture: url("/static/command_center/assets/linen-gold.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel[data-card-material="true"] { --card-material-paper: rgba(243, 239, 218, .92); --card-material-edge: rgba(132, 101, 45, .42); --card-material-texture: url("/static/command_center/assets/arabesque-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel[data-card-material="true"] { --card-material-paper: rgba(247, 239, 213, .92); --card-material-edge: rgba(134, 94, 32, .4); --card-material-texture: url("/static/command_center/assets/paper-grid.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel[data-card-material="true"] { --card-material-paper: rgba(239, 240, 221, .92); --card-material-edge: rgba(67, 101, 88, .42); --card-material-texture: url("/static/command_center/assets/arabesque-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel[data-card-material="true"] { --card-material-paper: rgba(228, 241, 229, .92); --card-material-edge: rgba(42, 105, 90, .42); --card-material-texture: url("/static/command_center/assets/paper-grid.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-card-material="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] { --card-material-paper: rgba(236, 238, 220, .92); --card-material-edge: rgba(55, 91, 81, .42); --card-material-texture: url("/static/command_center/assets/black-linen-open.png"); }

/* R063 tail override: legacy panel resets must never erase the visible edge. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"] {
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .72) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  inset: 1px !important;
  background-size: 100% 13px, 100% 13px, 13px 100%, 13px 100% !important;
  border-radius: inherit;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="metric"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="nested"] {
  border-color: rgba(157, 109, 39, .58) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-art-frame-owner="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] {
  --card-texture: url("/static/command_center/assets/black-linen-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-image: linear-gradient(135deg, var(--card-art-paper, rgba(241, 239, 222, .97)), rgba(224, 210, 167, .58)), url("/static/command_center/assets/black-linen-open.png"), url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center, center, right 16px top 16px !important;
  background-size: auto, 124px 124px, 156px 156px !important;
  background-repeat: no-repeat, repeat, no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-variant="damask"] {
  --card-texture: url("/static/command_center/assets/arches-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-art-variant="teal"] {
  --card-texture: url("/static/command_center/assets/gold-scale-open.png") !important;
}
@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
    background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100% !important;
  }
}

/* CARD-MATERIAL-B006 finance: the functional tabs use generic panel classes,
   so their top-level work surfaces must be explicitly owned by the finance
   material system instead of inheriting the legacy pale gradient. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel[data-art-frame-owner="true"] {
  --card-frame-top: url("/static/command_center/assets/ornate-frame-top-tight.png");
  --card-frame-bottom: url("/static/command_center/assets/ornate-frame-bottom-tight.png");
  --card-frame-left: url("/static/command_center/assets/ornate-frame-side-tight.png");
  --card-frame-right: url("/static/command_center/assets/ornate-frame-side-mirror-tight.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] [data-art-frame-owner="true"][data-art-tier="nested"] {
  --finance-nested-paper: rgba(255, 252, 241, .9);
  --finance-nested-edge: rgba(157, 109, 39, .48);
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  border: 1px solid var(--finance-nested-edge) !important;
  border-radius: 4px !important;
  background:
    linear-gradient(135deg, var(--finance-nested-paper), rgba(225, 211, 170, .62)),
    var(--card-texture) center / 88px 88px repeat !important;
  background-blend-mode: normal, multiply !important;
  box-shadow:
    inset 0 0 0 2px rgba(255, 253, 237, .86),
    inset 0 0 0 4px rgba(157, 109, 39, .16),
    0 4px 10px rgba(55, 39, 16, .09) !important;
}

/* Deliberate material variation within finance keeps the page from becoming
   a repeated card grid while preserving one restrained hierarchy. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.finance-chart-range-actions, .finance-budget-signals)[data-art-frame-owner="true"] {
  --card-texture: url("/static/command_center/assets/gold-scale-open.png");
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.asset-reference-card, .finance-trend-panel)[data-art-frame-owner="true"] {
  --card-texture: url("/static/command_center/assets/cloth-alike-open.png");
  --finance-nested-paper: rgba(247, 239, 213, .9);
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(.finance-day-list, .finance-chart-reading-list, .budget-list)[data-art-frame-owner="true"] {
  --card-texture: url("/static/command_center/assets/lyonnette-open.png");
  --finance-nested-paper: rgba(244, 240, 221, .92);
}

/* CARD-MATERIAL-B006: restore the ornate owner on the remaining overview
   action card after the legacy overview-canvas gradient wins the cascade. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel.overview-action-panel[data-art-frame-owner="true"][data-art-variant] {
  --card-art-paper: rgba(226, 239, 230, .9);
  --card-texture: url("/static/command_center/assets/gold-scale-open.png");
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg");
  background-color: var(--card-art-paper) !important;
  background-image: linear-gradient(135deg, var(--card-art-paper), rgba(224, 210, 167, .58)), var(--card-texture), var(--card-watermark) !important;
  background-position: center, center, right 16px top 16px !important;
  background-size: auto, 124px 124px, 156px 156px !important;
  background-repeat: no-repeat, repeat, no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
  border: 1px solid rgba(157, 109, 39, .62) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 237, .84), inset 0 0 0 5px rgba(157, 109, 39, .13), 0 8px 18px rgba(55, 39, 16, .12) !important;
}

/* Nested metric cards use the same material vocabulary without a second full
   rail, keeping the hierarchy readable on dense operational panels. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.reminder-v2-stat, .settings-panel .kpi, .settings-panel-heading + .kpis .kpi)[data-art-frame-owner="true"] {
  border: 1px solid rgba(157, 109, 39, .48) !important;
  background-image: linear-gradient(135deg, rgba(255, 252, 241, .86), rgba(225, 211, 170, .62)), var(--card-texture) !important;
  background-size: auto, 96px 96px !important;
  background-repeat: no-repeat, repeat !important;
  background-blend-mode: normal, multiply !important;
}

/* CARD-MATERIAL-R58: the overview canvas has a higher-specificity legacy
   gradient rule. Reassert the material surface after that rule so every
   visible information panel keeps its own texture and inset ornament. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel[data-card-material="true"] {
  --card-material-paper: rgba(224, 239, 228, .82);
  --card-material-edge: rgba(36, 100, 88, .5);
  --card-material-texture: url("/static/command_center/assets/lyonnette-open.png");
  background-color: var(--card-material-paper) !important;
  background-image: linear-gradient(135deg, rgba(255, 255, 248, .68), rgba(214, 194, 140, .3)), var(--card-material-texture) !important;
  background-position: center, center !important;
  background-size: auto, 118px 118px !important;
  background-repeat: no-repeat, repeat !important;
  background-blend-mode: normal, multiply !important;
  border: 1px solid var(--card-material-edge) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 5px rgba(157, 109, 39, .14), 0 7px 16px rgba(52, 39, 22, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel[data-card-material="true"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 7px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  border: 1px solid rgba(157, 109, 39, .28) !important;
  border-radius: 3px !important;
  background: linear-gradient(var(--card-art-gold), var(--card-art-gold)) top left / 30px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top left / 1px 30px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top right / 30px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top right / 1px 30px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom left / 30px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom left / 1px 30px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom right / 30px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom right / 1px 30px no-repeat !important;
  opacity: .78;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel[data-card-material="true"]::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 14px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: var(--card-watermark) right 8px top 8px / 96px 96px no-repeat !important;
  opacity: .28;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-overview-canvas-widget]:not([data-overview-canvas-widget="focus"]) > .panel[data-card-material="true"] > * {
  position: relative;
  z-index: 2;
}

/* R57 sourced texture accents: letter-free textile, scale, floral and fine
   geometric patterns are assigned to different semantic modules. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/lyonnette-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/gold-scale-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/flower-trail-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/cloth-alike-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/lyonnette-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/cloth-alike-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/gold-scale-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-card-material="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] { --card-material-texture: url("/static/command_center/assets/lyonnette-open.png"); }

/* The light material treatment needs dark operational text on hero cards. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="hero"] :is(h1,h2,h3,h4,p,span,strong,a,button) { color: #17383b !important; }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] [data-art-frame-owner="true"][data-art-tier="hero"] :is(h1,h2,h3,h4,p,span,strong,a,button) { color: #17383b !important; }

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel[data-card-material="true"] { background-size: auto, 92px 92px !important; box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .7), 0 5px 12px rgba(52, 39, 22, .09) !important; }
}

/* The legacy panel reset has the same structural specificity; this panel
   override restores the material surface after that reset without touching
   frame-owner rails. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel[data-card-material="true"] {
  --card-material-paper: rgba(248, 244, 226, .9);
  --card-material-edge: rgba(157, 109, 39, .36);
  --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png");
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  border: 1px solid var(--card-material-edge) !important;
  border-radius: 5px !important;
  background: linear-gradient(135deg, var(--card-material-paper), rgba(226, 215, 181, .68)), var(--card-material-texture) center / 118px 118px repeat !important;
  background-blend-mode: normal, multiply !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .76), inset 0 0 22px rgba(136, 94, 34, .08), 0 7px 16px rgba(52, 39, 22, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(224, 239, 228, .9);
  --card-material-edge: rgba(36, 100, 88, .42);
--card-material-texture: url("/static/command_center/assets/gold-scale-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(249, 242, 218, .92);
  --card-material-edge: rgba(163, 111, 33, .42);
  --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(255, 243, 239, .92);
  --card-material-edge: rgba(151, 91, 73, .4);
  --card-material-texture: url("/static/command_center/assets/linen-gold.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(243, 239, 218, .92);
  --card-material-edge: rgba(132, 101, 45, .42);
  --card-material-texture: url("/static/command_center/assets/arabesque-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(247, 239, 213, .92);
  --card-material-edge: rgba(134, 94, 32, .4);
  --card-material-texture: url("/static/command_center/assets/paper-grid.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(239, 240, 221, .92);
  --card-material-edge: rgba(67, 101, 88, .42);
  --card-material-texture: url("/static/command_center/assets/arabesque-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(228, 241, 229, .92);
  --card-material-edge: rgba(42, 105, 90, .42);
  --card-material-texture: url("/static/command_center/assets/paper-grid.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-card-material="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] {
  --card-material-paper: rgba(236, 238, 220, .92);
  --card-material-edge: rgba(55, 91, 81, .42);
  --card-material-texture: url("/static/command_center/assets/black-linen-open.png");
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel[data-card-material="true"] {
    background-size: auto, 92px 92px !important;
    box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .7), 0 5px 12px rgba(52, 39, 22, .09) !important;
  }
}

/* CARD-MATERIAL-R063: final visible boundary and non-letter texture contract.
   The legacy visual-upgrade layer once painted a literal logo texture. Keep one crisp boundary per card and move ornate
   rails one pixel inward so the edge belongs to the card, never its contents. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"] {
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .72) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  inset: 1px !important;
  background-size: 100% 13px, 100% 13px, 13px 100%, 13px 100% !important;
  border-radius: inherit;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="metric"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="nested"] {
  border-color: rgba(157, 109, 39, .58) !important;
}

/* Replace every legacy logo-bearing texture, including cards that are not
   currently selected by the JS owner pass. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-art-frame-owner="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] {
  --card-texture: url("/static/command_center/assets/black-linen-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-image: linear-gradient(135deg, var(--card-art-paper, rgba(241, 239, 222, .97)), rgba(224, 210, 167, .58)), url("/static/command_center/assets/black-linen-open.png"), url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center, center, right 16px top 16px !important;
  background-size: auto, 124px 124px, 156px 156px !important;
  background-repeat: no-repeat, repeat, no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-variant="damask"] {
  --card-texture: url("/static/command_center/assets/arches-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-art-variant="teal"] {
  --card-texture: url("/static/command_center/assets/gold-scale-open.png") !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
    background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100% !important;
  }
}

/* R063 final cascade: this block intentionally remains last in the file so
   legacy panel resets cannot erase the visible card boundary. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"] {
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .72) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  inset: 1px !important;
  background-size: 100% 13px, 100% 13px, 13px 100%, 13px 100% !important;
  border-radius: inherit;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="metric"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="nested"] {
  border-color: rgba(157, 109, 39, .58) !important;
}

/* No card may load the legacy logo artwork. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-art-frame-owner="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] {
  --card-texture: url("/static/command_center/assets/black-linen-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-image: linear-gradient(135deg, var(--card-art-paper, rgba(241, 239, 222, .97)), rgba(224, 210, 167, .58)), url("/static/command_center/assets/black-linen-open.png"), url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center, center, right 16px top 16px !important;
  background-size: auto, 124px 124px, 156px 156px !important;
  background-repeat: no-repeat, repeat, no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-variant="damask"] {
  --card-texture: url("/static/command_center/assets/arches-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-art-variant="teal"] {
  --card-texture: url("/static/command_center/assets/gold-scale-open.png") !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
    background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100% !important;
  }
}

/* R33 cascade boundary: neutralize the old full-panel frame selectors that load before this layer. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden)::after,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .module-canvas-widget > .panel:not(.overview-command-deck)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .overview-canvas-widget > .panel:not(.overview-command-deck)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .overview-canvas-widget::before {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Old finance KPI/list ornament backgrounds are decorative container layers, not card content. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(.finance-overview-kpis, .asset-workbench-v2 .asset-balance-kpis, .finance-chart-kpis, .finance-overview-ledger-list, .finance-overview-anomaly-list, .finance-overview-asset-list) {
  background-image: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .finance-overview-ledger-list::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .finance-overview-anomaly-list::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .finance-overview-asset-list::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not([data-art-frame-owner]) .list:not([data-art-frame-owner])::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not([data-art-frame-owner]) .list:not([data-art-frame-owner])::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

/* Layout panels are not frame owners; their old inset shadows were the outer rails seen in the screenshot. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not([data-art-frame-owner]) {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Restore the sole frame owner after the legacy panel reset above. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: var(--card-frame-top) top center / 100% 14px no-repeat,
    var(--card-frame-bottom) bottom center / 100% 14px no-repeat,
    var(--card-frame-left) center left / 14px 100% no-repeat,
    var(--card-frame-right) center right / 14px 100% no-repeat !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden)[data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: var(--card-frame-top) top center / 100% 14px no-repeat,
    var(--card-frame-bottom) bottom center / 100% 14px no-repeat,
    var(--card-frame-left) center left / 14px 100% no-repeat,
    var(--card-frame-right) center right / 14px 100% no-repeat !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 7px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  opacity: .9;
  background:
    var(--card-watermark) right 10px top 10px / 132px 132px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top left / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top left / 1px 34px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top right / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) top right / 1px 34px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom left / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom left / 1px 34px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom right / 34px 1px no-repeat,
    linear-gradient(var(--card-art-gold), var(--card-art-gold)) bottom right / 1px 34px no-repeat !important;
}

/* Final material boundary: win the older card-system cascade without adding
   another rail owner. Texture and watermark stay behind content. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-variant] {
  background:
    linear-gradient(135deg, var(--card-art-paper), rgba(224, 210, 167, .58)) center / auto no-repeat,
    var(--card-texture) center / 124px 124px repeat,
    var(--card-watermark) right 16px top 16px / 156px 156px no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-variant]:is([data-art-tier="metric"], [data-art-tier="nested"]) {
  background:
    linear-gradient(135deg, rgba(255, 252, 241, .86), rgba(225, 211, 170, .62)),
    var(--card-texture) center / 96px 96px repeat !important;
  background-blend-mode: normal, multiply !important;
}

/* CARD-MATERIAL-R50: give unframed information cards a real material surface
   without creating another ornate rail owner. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-card-material="true"] {
  --card-material-paper: rgba(248, 244, 226, .9);
  --card-material-edge: rgba(157, 109, 39, .36);
  --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png");
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  border: 1px solid var(--card-material-edge) !important;
  border-radius: 5px !important;
  background:
    linear-gradient(135deg, var(--card-material-paper), rgba(226, 215, 181, .68)),
    var(--card-material-texture) center / 118px 118px repeat !important;
  background-blend-mode: normal, multiply !important;
  box-shadow:
    inset 0 0 0 2px rgba(255, 253, 241, .76),
    inset 0 0 22px rgba(136, 94, 34, .08),
    0 7px 16px rgba(52, 39, 22, .1) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-card-material="true"] {
  --card-material-paper: rgba(224, 239, 228, .9);
  --card-material-edge: rgba(36, 100, 88, .42);
  --card-material-texture: url("/static/command_center/assets/gold-damask.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] [data-card-material="true"] {
  --card-material-paper: rgba(249, 242, 218, .92);
  --card-material-edge: rgba(163, 111, 33, .42);
  --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] [data-card-material="true"] {
  --card-material-paper: rgba(255, 243, 239, .92);
  --card-material-edge: rgba(151, 91, 73, .4);
  --card-material-texture: url("/static/command_center/assets/linen-gold.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] [data-card-material="true"] {
  --card-material-paper: rgba(243, 239, 218, .92);
  --card-material-edge: rgba(132, 101, 45, .42);
  --card-material-texture: url("/static/command_center/assets/arabesque-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] [data-card-material="true"] {
  --card-material-paper: rgba(247, 239, 213, .92);
  --card-material-edge: rgba(134, 94, 32, .4);
  --card-material-texture: url("/static/command_center/assets/paper-grid.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] [data-card-material="true"] {
  --card-material-paper: rgba(239, 240, 221, .92);
  --card-material-edge: rgba(67, 101, 88, .42);
  --card-material-texture: url("/static/command_center/assets/arabesque-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] [data-card-material="true"] {
  --card-material-paper: rgba(228, 241, 229, .92);
  --card-material-edge: rgba(42, 105, 90, .42);
  --card-material-texture: url("/static/command_center/assets/paper-grid.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] [data-card-material="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] [data-card-material="true"] {
  --card-material-paper: rgba(236, 238, 220, .92);
  --card-material-edge: rgba(55, 91, 81, .42);
  --card-material-texture: url("/static/command_center/assets/black-linen-open.png");
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-card-material="true"] > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-card-material="true"] {
    background-size: auto, 92px 92px !important;
    box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .7), 0 5px 12px rgba(52, 39, 22, .09) !important;
  }
}

/* Last-word panel material override: this intentionally follows the legacy
   transparent-panel reset in the same stylesheet. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel[data-card-material="true"] {
  --card-material-paper: rgba(248, 244, 226, .9);
  --card-material-edge: rgba(157, 109, 39, .36);
  --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png");
  background: linear-gradient(135deg, var(--card-material-paper), rgba(226, 215, 181, .68)), var(--card-material-texture) center / 118px 118px repeat !important;
  background-blend-mode: normal, multiply !important;
  border: 1px solid var(--card-material-edge) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .76), inset 0 0 22px rgba(136, 94, 34, .08), 0 7px 16px rgba(52, 39, 22, .1) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] .panel[data-card-material="true"] { --card-material-paper: rgba(224, 239, 228, .9); --card-material-edge: rgba(36, 100, 88, .42); --card-material-texture: url("/static/command_center/assets/gold-scale-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] .panel[data-card-material="true"] { --card-material-paper: rgba(249, 242, 218, .92); --card-material-edge: rgba(163, 111, 33, .42); --card-material-texture: url("/static/command_center/assets/paper-fibers-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .panel[data-card-material="true"] { --card-material-paper: rgba(255, 243, 239, .92); --card-material-edge: rgba(151, 91, 73, .4); --card-material-texture: url("/static/command_center/assets/linen-gold.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="reminders"] .panel[data-card-material="true"] { --card-material-paper: rgba(243, 239, 218, .92); --card-material-edge: rgba(132, 101, 45, .42); --card-material-texture: url("/static/command_center/assets/arabesque-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="knowledge"] .panel[data-card-material="true"] { --card-material-paper: rgba(247, 239, 213, .92); --card-material-edge: rgba(134, 94, 32, .4); --card-material-texture: url("/static/command_center/assets/paper-grid.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="vault"] .panel[data-card-material="true"] { --card-material-paper: rgba(239, 240, 221, .92); --card-material-edge: rgba(67, 101, 88, .42); --card-material-texture: url("/static/command_center/assets/arabesque-open.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="items"] .panel[data-card-material="true"] { --card-material-paper: rgba(228, 241, 229, .92); --card-material-edge: rgba(42, 105, 90, .42); --card-material-texture: url("/static/command_center/assets/paper-grid.png"); }
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-card-material="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] { --card-material-paper: rgba(236, 238, 220, .92); --card-material-edge: rgba(55, 91, 81, .42); --card-material-texture: url("/static/command_center/assets/black-linen-open.png"); }


/* source: styles/visual-card-system-r63-tail.css */
/* R063 tail layer. Loaded after every legacy art stylesheet so one boundary
   owner remains visible and logo-bearing textures cannot return. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"] {
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .72) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel[data-art-frame-owner="true"]:not(.tab-panel-hidden) {
  border: 1px solid rgba(157, 109, 39, .72) !important;
  border-image: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  inset: 1px !important;
  background-size: 100% 13px, 100% 13px, 13px 100%, 13px 100% !important;
  border-radius: inherit;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="metric"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="nested"] {
  border-color: rgba(157, 109, 39, .58) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .ai-workbench,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="settings"] .panel[data-art-frame-owner="true"],
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="ai-workbench"] .panel[data-card-material="true"] {
  --card-texture: url("/static/command_center/assets/black-linen-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-image: linear-gradient(135deg, var(--card-art-paper, rgba(241, 239, 222, .97)), rgba(224, 210, 167, .58)), url("/static/command_center/assets/black-linen-open.png"), url("/static/command_center/assets/botanical-paper-r1.svg") !important;
  background-position: center, center, right 16px top 16px !important;
  background-size: auto, 124px 124px, 156px 156px !important;
  background-repeat: no-repeat, repeat, no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-variant="damask"] {
  --card-texture: url("/static/command_center/assets/arches-open.png") !important;
  --card-watermark: url("/static/command_center/assets/botanical-paper-r1.svg") !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="overview"] [data-art-variant="teal"] {
  --card-texture: url("/static/command_center/assets/gold-scale-open.png") !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
    background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100% !important;
  }
}

/* R065 final cascade position: keep the overscan rule after all R064
   pseudo-element restores so no earlier block can shrink the artwork back. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]::before {
  background-position: center top, center bottom, left center, right center !important;
  background-size: 104% 16px, 104% 16px, 16px 102%, 16px 102% !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  background-size: 104% 12px, 104% 12px, 12px 102%, 12px 102% !important;
  opacity: .94 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]::before {
    background-size: 104% 13px, 104% 13px, 13px 102%, 13px 102% !important;
  }
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
    background-size: 104% 10px, 104% 10px, 10px 102%, 10px 102% !important;
  }
}

/* R067 final cascade: the production shell may omit data-active-view. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar,
  [data-command-recycle="true"] > .panel > h3
) {
  color: #f7faf5 !important;
  -webkit-text-fill-color: #f7faf5 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar
) :is(h2, h3, h4, p, span, strong, small, label, a, button, i, svg) {
  color: #f7faf5 !important;
  -webkit-text-fill-color: #f7faf5 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar
) :is(.mini-action, button, a) {
  background: rgb(255 255 255 / 12%) !important;
  border-color: rgb(255 255 255 / 34%) !important;
  color: #f7faf5 !important;
  -webkit-text-fill-color: #f7faf5 !important;
}

/* R066 contrast repair: dark teal title/action bands must own a light
   foreground. Earlier visual layers restored the dark background after the
   module-specific ink variables, leaving labels and controls unreadable. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar,
  [data-command-recycle="true"] > .panel > h3
) {
  color: #f7faf5 !important;
  -webkit-text-fill-color: #f7faf5 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar
) :is(h2, h3, h4, p, span, strong, small, label, a, button, i, svg) {
  color: #f7faf5 !important;
  -webkit-text-fill-color: #f7faf5 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar
) :is(.mini-action, button, a) {
  background: rgb(255 255 255 / 12%) !important;
  border-color: rgb(255 255 255 / 34%) !important;
  color: #f7faf5 !important;
  -webkit-text-fill-color: #f7faf5 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar
) :is(.mini-action, button, a):hover,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar
) :is(.mini-action, button, a):focus-visible {
  background: rgb(255 255 255 / 22%) !important;
  border-color: rgb(255 255 255 / 58%) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
}

/* R065 edge coverage: the horizontal source has about 2% transparent space
   at its right edge. Overscan and center-crop the rails so wide cards remain
   fully enclosed on all four sides. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden)[data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  background-position: center top, center bottom, left center, right center !important;
  background-size: 104% 16px, 104% 16px, 16px 102%, 16px 102% !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  background-position: center top, center bottom, left center, right center !important;
  background-size: 104% 12px, 104% 12px, 12px 102%, 12px 102% !important;
  opacity: .94 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before,
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] .panel:not(.tab-panel-hidden)[data-art-frame-owner="true"]:not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
    background-size: 104% 13px, 104% 13px, 13px 102%, 13px 102% !important;
  }

  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
    background-size: 104% 10px, 104% 10px, 10px 102%, 10px 102% !important;
  }
}

/* R064 visible material mount: the legacy cascade hid frame artwork on
   metric/nested cards, leaving only a faint 1px rule in the live page. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background-image: var(--card-frame-top), var(--card-frame-bottom), var(--card-frame-left), var(--card-frame-right) !important;
  background-position: top center, bottom center, left center, right center !important;
  background-size: 100% 16px, 100% 16px, 16px 100%, 16px 100% !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"] > * {
  position: relative !important;
  z-index: 2 !important;
}

/* Metrics and nested cards use the same artwork at a quieter scale so the
   material reads as a mounted boundary without covering labels or icons. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="metric"]::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="nested"]::before {
  background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100% !important;
  opacity: .88 !important;
}

/* Match the older :is(metric,nested) selector's specificity; otherwise its
   content:none rule wins even though this file loads last. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background-image: var(--card-frame-top), var(--card-frame-bottom), var(--card-frame-left), var(--card-frame-right) !important;
  background-position: top center, bottom center, left center, right center !important;
  background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100% !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
  opacity: .88 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]::before {
    background-size: 100% 12px, 100% 12px, 12px 100%, 12px 100% !important;
  }
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="metric"]::before,
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"][data-art-tier="nested"]::before {
    background-size: 100% 8px, 100% 8px, 8px 100%, 8px 100% !important;
  }
}

/* R065 final cascade override. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]::before {
  background-position: center top, center bottom, left center, right center !important;
  background-size: 104% 16px, 104% 16px, 16px 102%, 16px 102% !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  background-size: 104% 12px, 104% 12px, 12px 102%, 12px 102% !important;
  opacity: .94 !important;
}
@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]::before {
    background-size: 104% 13px, 104% 13px, 13px 102%, 13px 102% !important;
  }
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
    background-size: 104% 10px, 104% 10px, 10px 102%, 10px 102% !important;
  }
}


/* source: styles/visual-card-system-r68-final.css */
/* R068 authoritative visual boundary. Loaded after legacy and historical
   tail layers so card material has one final, inspectable owner. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"] {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .64) !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, rgba(249, 244, 229, .96), rgba(228, 215, 177, .82)), url("/static/command_center/assets/paper-fibers-open.png") center / 118px 118px repeat !important;
  color: #183b3f !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 4px rgba(157, 109, 39, .18), 0 8px 18px rgba(55, 39, 16, .14) !important;
}

/* R072 semantic contrast contract: action intent owns its foreground. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  text-shadow: 0 1px 1px rgba(83, 24, 20, .4) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  [data-items-v2="true"] .items-v2__header,
  [data-reminders-v2] .reminder-v2-overview-head,
  .knowledge-v2__command-bar,
  [data-command-recycle="true"] > .panel > h3
) :is(.hud-button, .mini-action, .status-button, a) {
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"]::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border: 1px solid rgba(189, 138, 56, .5) !important;
  border-radius: 4px !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"] > * {
  position: relative !important;
  z-index: 1 !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"] :is(h3, h4, p, span, strong, small, label, a, button, .muted-row, .tag) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2) {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .64) !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, rgba(248, 244, 226, .96), rgba(226, 215, 181, .82)), url("/static/command_center/assets/cloth-alike-open.png") center / 112px 112px repeat !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 4px rgba(157, 109, 39, .16), 0 8px 18px rgba(55, 39, 16, .14) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2)::before {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  z-index: 0 !important;
  pointer-events: none !important;
  border: 1px solid rgba(189, 138, 56, .46) !important;
  border-radius: 4px !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2) > * {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel[data-tab-panel="overview-finance"][data-card-material="true"],
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="import"] :is(.task-workbench-panel.import-v2-host, .cc-import-v2) {
    border-radius: 5px !important;
  }
}

/* Finance cards use a light paper surface; never inherit the shell's light
   foreground on these panels. Dark action bands opt back into white below. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.panel, .finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) :is(h2, h3, h4, p, span, strong, small, label, a, button, li, .muted-row, .tag):not(.finance-chart-tooltip),
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-chart-structure, .finance-trend-panel) :is(h2, h3, h4, p, span, strong, small, label, a, button, li, .muted-row, .tag):not(.finance-chart-tooltip) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

/* Finance action controls own a dark surface/white-ink pair after the paper rule. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-trend-window-controls .mini-action, .finance-trend-panel .mini-action[data-finance-category-filter]) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-cashflow-column.is-gap, .finance-net-labels > .is-gap) {
  opacity: 1;
}
/* Paper-side navigation/status controls need their own pair, not shell ink. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-trend-window-controls .mini-action, .finance-trend-panel .tag) {
  background: #e3ece7 !important;
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-chart-kpis > div {
  background: #e3ece7 !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-chart-kpis :is(span, strong) {
  color: #183b3f !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-chart-kpis strong.green {
  color: #17633e !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-chart-kpis strong.red {
  color: #962f26 !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-chart-kpis strong:is(.cyan, .amber) {
  color: #17536d !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-chart-tooltip {
  color: var(--finance-tooltip-ink, #fffdf5) !important;
  -webkit-text-fill-color: currentColor !important;
}
/* The plot owns tooltip placement so edge columns cannot push text off-screen. */
body.owner-shell-v1 #moduleStage[data-active-view="finance"] .finance-cashflow-columns {
  position: relative;
}
body.owner-shell-v1 #moduleStage[data-active-view="finance"] .finance-cashflow-column {
  position: static;
}
body.owner-shell-v1 #moduleStage[data-active-view="finance"] .finance-cashflow-column:is(:hover, :focus) {
  opacity: 1;
}
body.owner-shell-v1 #moduleStage[data-active-view="finance"] .finance-cashflow-column > .finance-chart-tooltip {
  top: 0;
  bottom: auto;
  left: 50%;
  max-width: min(220px, calc(100% - 16px));
  white-space: normal;
  overflow-wrap: anywhere;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) :is(.mini-action, button, a) {
  background: rgba(255, 252, 241, .82) !important;
  border-color: rgba(157, 109, 39, .5) !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
}

/* Knowledge follows its theme; paper attachment panels do not inherit shell ink. */
html[data-theme="day"] body.owner-shell-v1 #moduleStage[data-active-view="knowledge"] {
  --knowledge-readable-muted: #465f5b;
}
html[data-theme="night"] body.owner-shell-v1 #moduleStage[data-active-view="knowledge"] {
  --knowledge-readable-muted: #b5cbc4;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__metric > span, .knowledge-v2__atlas-label > span, .knowledge-v2__section-head > span, .knowledge-v2__capture .field > small, .knowledge-v2__capture .field small, .knowledge-v2__capture .field-label) {
  color: var(--knowledge-readable-muted) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] .knowledge-v2__browser-head {
  background: #21474b !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] .knowledge-v2__browser-head :is(strong, span) {
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
  text-shadow: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-attachments-panel .library-section-head :is(h3, p) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-empty-state {
  background: #edf1ec !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-empty-state :is(strong, p, span, small) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-attachments-panel .library-head-actions .mini-action {
  background: #21474b !important;
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
  text-shadow: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-attachments-panel .library-head-actions .mini-action span {
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
}

/* R069 boundary refactor: each module owns one outer material surface. The
   historical layers remain available for rollback, while this terminal layer
   gives every visible workbench a distinct, inspectable texture. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] :is(.people-overview-primary, .people-overview-create),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-overview-panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] :is(.reminder-v2-editor-card, .reminder-v2-list-card),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] .knowledge-v2,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="items"] .items-v2__overview,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="recycle"] [data-command-recycle="true"] > .module-canvas-widget > .panel,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="settings"] .settings-action-grid > .module-canvas-widget > .panel {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  box-sizing: border-box !important;
  border: 1px solid rgba(157, 109, 39, .64) !important;
  border-radius: 6px !important;
  box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .82), inset 0 0 0 4px rgba(157, 109, 39, .16), 0 8px 18px rgba(55, 39, 16, .14) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] :is(.people-overview-primary, .people-overview-create) {
  background: linear-gradient(135deg, rgba(255, 247, 243, .92), rgba(224, 210, 167, .62)), url("/static/command_center/assets/linen-gold.png") center / 124px 124px repeat, url("/static/command_center/assets/arabesque-open.png") right 16px top 16px / 164px 164px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="vault"] .library-overview-panel {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(226, 215, 181, .7)), url("/static/command_center/assets/paper-fibers-open.png") center / 118px 118px repeat, url("/static/command_center/assets/botanical-paper-r1.svg") right 18px top 16px / 154px 154px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] :is(.reminder-v2-editor-card, .reminder-v2-list-card) {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(224, 210, 167, .62)), url("/static/command_center/assets/paper-fibers-open.png") center / 118px 118px repeat, url("/static/command_center/assets/archive-crest-watermark.svg") right 18px top 16px / 150px 150px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] .knowledge-v2 {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(226, 215, 181, .7)), url("/static/command_center/assets/paper-grid.png") center / 118px 118px repeat, url("/static/command_center/assets/botanical-paper-r1.svg") right 18px top 16px / 154px 154px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="items"] .items-v2__overview {
  background: linear-gradient(135deg, rgba(249, 244, 226, .94), rgba(224, 210, 167, .62)), url("/static/command_center/assets/paper-fibers-open.png") center / 118px 118px repeat, url("/static/command_center/assets/gold-scale-open.png") right 18px top 16px / 154px 154px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="recycle"] [data-command-recycle="true"] > .module-canvas-widget > .panel {
  background: linear-gradient(135deg, rgba(248, 244, 226, .94), rgba(226, 215, 181, .7)), url("/static/command_center/assets/cloth-alike-open.png") center / 112px 112px repeat, url("/static/command_center/assets/archive-crest-watermark.svg") right 18px top 16px / 150px 150px no-repeat !important;
}
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="settings"] .settings-action-grid > .module-canvas-widget > .panel {
  background: linear-gradient(135deg, rgba(244, 240, 221, .94), rgba(224, 210, 167, .62)), url("/static/command_center/assets/black-linen-open.png") center / 124px 124px repeat, url("/static/command_center/assets/botanical-paper-r1.svg") right 18px top 16px / 154px 154px no-repeat !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .people-overview-primary,
  .people-overview-create,
  .library-overview-panel,
  .reminder-v2-editor-card,
  .reminder-v2-list-card,
  .knowledge-v2,
  .items-v2__overview,
  [data-command-recycle="true"] > .module-canvas-widget > .panel,
  .settings-action-grid > .module-canvas-widget > .panel
):not([data-art-frame-owner="true"])::after {
  content: "" !important;
  position: absolute !important;
  inset: 3px !important;
  pointer-events: none !important;
  z-index: 0 !important;
  border: 1px solid rgba(189, 138, 56, .46) !important;
  border-radius: 4px !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .people-overview-primary,
  .people-overview-create,
  .library-overview-panel,
  .reminder-v2-editor-card,
  .reminder-v2-list-card,
  .knowledge-v2,
  .items-v2__overview,
  [data-command-recycle="true"] > .module-canvas-widget > .panel,
  .settings-action-grid > .module-canvas-widget > .panel
) > * {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 760px) {
  html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
    .people-overview-primary,
    .people-overview-create,
    .library-overview-panel,
    .reminder-v2-editor-card,
    .reminder-v2-list-card,
    .knowledge-v2,
    .items-v2__overview,
    [data-command-recycle="true"] > .module-canvas-widget > .panel,
    .settings-action-grid > .module-canvas-widget > .panel
  ) {
    border-radius: 5px !important;
    box-shadow: inset 0 0 0 2px rgba(255, 253, 241, .76), inset 0 0 0 4px rgba(157, 109, 39, .14), 0 6px 14px rgba(55, 39, 16, .12) !important;
  }
}

/* R072 terminal semantic contrast and finance frame-fit contract.
   This block is intentionally the final cascade owner: action intent keeps a
   light foreground on dark controls, while nested finance lists use a crisp
   contained rail instead of a clipped full-frame artwork layer. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .52) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  background: linear-gradient(120deg, #b45245, #8f3935) !important;
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  border-color: rgba(255, 249, 244, .56) !important;
  text-shadow: 0 1px 1px rgba(83, 24, 20, .4) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(
  .finance-overview-ledger-list,
  .finance-overview-anomaly-list,
  .finance-overview-asset-list,
  .finance-day-list
)[data-art-tier="nested"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 3px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: none !important;
  border: 1px solid rgba(189, 138, 56, .54) !important;
  border-radius: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .64) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(
  .finance-overview-ledger-list,
  .finance-overview-anomaly-list,
  .finance-overview-asset-list,
  .finance-day-list
)[data-art-tier="nested"] {
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* R073 optimization: finance-specific rules are more specific than the
   generic action contract, so give these controls an explicit high-contrast
   material treatment at the same module specificity. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  background: linear-gradient(120deg, #b45245, #8f3935) !important;
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  border-color: rgba(255, 249, 244, .58) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-overview-hot-days > .list[data-art-frame-owner="true"][data-art-tier="nested"]::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 3px !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: none !important;
  border: 1px solid rgba(189, 138, 56, .54) !important;
  border-radius: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .64) !important;
}

/* R074 shared cascade: module-specific action rules must not restore dark ink
   on dark primary/danger controls outside finance. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .hud-button.primary,
  .mini-action.primary,
  .status-button.primary
) {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] :is(
  .hud-button.danger,
  .mini-action.danger,
  .status-button.danger
) {
  background: linear-gradient(120deg, #b45245, #8f3935) !important;
  color: #fff9f4 !important;
  -webkit-text-fill-color: #fff9f4 !important;
  border-color: rgba(255, 249, 244, .58) !important;
}

/* People editor repair: both cards own one vertical scroll surface. The
   generic preferences layer otherwise creates a clipped nested form, hiding
   the profile and interaction save actions below the card viewport. */
body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-bottom: 28px !important;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 .people-full-edit-form {
  max-height: none !important;
  overflow: visible !important;
  padding-bottom: 18px;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 :is(
  .people-full-edit-actions,
  .people-interaction-entry-in-editor .people-form
) {
  min-width: 0;
}

body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="people"] .cc-people-v2 #peopleInteractionSubmit {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
}

/* R075 final contrast owner: the finance module's broad paper-ink rule is
   intentionally overridden for calendar chrome, whose teal header can be
   dark enough to swallow the inherited ink color. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc :is(
  .fc-col-header-cell-cushion,
  .fc-daygrid-day-number,
  .fc-event-title,
  .fc-list-event-title,
  .fc-list-event-time
) {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
  text-shadow: 0 1px 2px rgba(4, 31, 31, .48) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc .fc-daygrid-day-number {
  font-weight: 700 !important;
}

/* R076 homepage contrast repair: the legacy ornamental theme targets the
   first text span with stronger selectors than the density layer. Keep the
   dark task chips light, and keep the pale timeline surface dark-inked. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:first-child :is(strong, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-task-row > span:first-child {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
  text-shadow: 0 1px 1px rgba(4, 31, 31, .36) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:first-child :is(strong, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:first-child {
  color: #17383b !important;
  -webkit-text-fill-color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:not(:first-child) :is(strong, small),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck .overview-change-row > span:not(:first-child) {
  color: #17383b !important;
  -webkit-text-fill-color: #17383b !important;
}

/* Final finance control override: the later paper-side tag rule must not
   recolor dark action buttons. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-trend-window-controls .mini-action {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}

/* The editor shell is the scroll owner. Always show a stable rail so the
   lower fields and save actions remain discoverable on desktop. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas .people-canvas-editor-panel {
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 109, 39, .72) rgba(224, 210, 167, .34) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas > .people-canvas-editor-panel::-webkit-scrollbar {
  width: 12px;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] .cc-people-v2 .people-contact-editor-canvas > .people-canvas-editor-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(157, 109, 39, .88), rgba(189, 138, 56, .66)) !important;
  border: 2px solid rgba(255, 253, 241, .72) !important;
  border-radius: 8px;
}

/* R077 finance readability repair: only the teal weekday rail is a light-ink
   surface. Calendar cells and their income/expense chips stay dark-inked on
   paper, while the save action gets an explicit filled treatment. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc .fc-col-header-cell-cushion {
  color: #fffaf0 !important;
  -webkit-text-fill-color: #fffaf0 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc :is(.fc-daygrid-day-number, .fc-event-title, .fc-list-event-title, .fc-list-event-time) {
  color: #17383b !important;
  -webkit-text-fill-color: #17383b !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-v2.fc .fc-daygrid-event {
  color: #17383b !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-day-editor .hud-button.primary,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] [data-finance-day-entry-submit="true"] {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border: 1px solid rgba(255, 253, 244, .58) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}

/* R078 detail-card scroll owner. The generic nested-art rule is loaded before
   this file and forces overflow hidden, so the dedicated ledger card takes
   ownership again at the terminal cascade boundary. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-calendar-detail-panel:not(.tab-panel-hidden) .finance-calendar-detail-records__list {
  max-height: clamp(240px, 42vh, 560px) !important;
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 109, 39, .72) rgba(224, 210, 167, .34) !important;
}

/* Emergency rendering containment: dozens of legacy visual layers still
   request live backdrop blurs on large nested panels. Keep the authored
   textures, borders and shadows, but remove the repeated GPU blur passes. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(.panel, [data-module-canvas-block], [data-overview-canvas-widget], .module-canvas-widget) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* R080 root-cause guard: class selectors are intentional fallbacks for
   moments before visual-card-system-v2.js can stamp data-art-scroll-owner.
   A behavior owner must keep its scroll rail even if a legacy layer left an
   art-frame marker behind. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__records, .knowledge-v2__capture-body),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__pane--answer, .ai-workbench__result) {
  box-sizing: border-box !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(157, 109, 39, .72) rgba(224, 210, 167, .34) !important;
  border: 1px solid rgba(157, 109, 39, .36) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .66) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__records, .knowledge-v2__capture-body)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(.knowledge-v2__records, .knowledge-v2__capture-body)::after,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__pane--answer, .ai-workbench__result)::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__pane--answer, .ai-workbench__result)::after,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-scroll-owner="true"]::before,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-scroll-owner="true"]::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* R080 also removes the historical 104% artwork expansion.  The ornate rail
   belongs to the card edge, so it is inset and sized to the real box rather
   than painted beyond the box and clipped by overflow:hidden. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-frame-owner="true"]:not([data-art-scroll-owner="true"]):not([data-art-tier="metric"]):not([data-art-tier="nested"])::before {
  inset: 1px !important;
  background-position: center top, center bottom, left center, right center !important;
  background-size: 100% 16px, 100% 16px, 16px 100%, 16px 100% !important;
}

/* Metric and nested elements get a contained rule only.  They do not paint a
   second four-sided artwork frame over the parent card or its scrollbar. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"]),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-scroll-owner="true"] {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border: 1px solid rgba(157, 109, 39, .36) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 237, .66) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view] [data-art-frame-owner="true"]:is([data-art-tier="metric"], [data-art-tier="nested"])::before {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

/* R081 shared behavior boundary. Every renderer marks a growing list with
   data-scroll-owner; the runtime mirror is accepted for surfaces discovered
   after render. One contract covers both themes so legacy art layers cannot
   turn a list into a clipped, unreadable card again. */
:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"]) {
  box-sizing: border-box !important;
  min-height: 0 !important;
  max-height: min(60vh, 560px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: var(--cc-accent, #c49a4b) color-mix(in srgb, var(--cc-surface-muted, #202b27) 72%, transparent) !important;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::before,
:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::after {
  content: none !important;
  display: none !important;
  background: none !important;
  border: 0 !important;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:is(html[data-theme="day"], html[data-theme="night"]) body.owner-shell-v1:not(.auth-required) #moduleStage :is([data-scroll-owner="true"], [data-art-scroll-owner="true"])::-webkit-scrollbar-thumb {
  background: var(--cc-accent, #c49a4b) !important;
  border: 2px solid color-mix(in srgb, var(--cc-surface-muted, #202b27) 78%, transparent) !important;
  border-radius: 8px;
}

/* Geometry belongs to the canvas; overflowing content belongs to its scroll
   surface. Legacy artwork must not paint growing content over the next card. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-command-deck {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: none !important;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

/* These cards keep their light material in both themes. Shell ink must not
   override their local foreground; dark action bands have a separate pair. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] :is(.panel > h3, .panel > .muted-row, .overview-signal-card > span, .overview-signal-card > strong, .overview-signal-card > small),
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] :is(.reminder-v2-card-head, .reminder-v2-form > .field, .reminder-v2-form-row, .reminder-v2-search, .reminder-v2-empty) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] :is(.panel > h3, .panel > .muted-row, .overview-signal-card > span, .overview-signal-card > strong, .overview-signal-card > small),
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-section-title :is(strong, span) {
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .panel > h3 {
  background: #edf3f0 !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-section-title {
  background: #21474b !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-section-title :is(strong, span) {
  background: transparent !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-eyebrow {
  color: #365c5b !important;
  -webkit-text-fill-color: #365c5b !important;
}

/* Action and status ink is local to its surface, including text-fill inherited
   from the decorative theme. A container foreground cannot color both pairs. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-task-row > .tag,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #globalSearchMount :is(.owner-global-search-trigger, .owner-global-search-trigger span) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(.overview-canvas-toolbar-actions, .module-canvas-toolbar-actions, .reminder-v2-search-controls) button:not(:disabled) {
  background: #21474b !important;
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
  text-shadow: none !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage:is([data-active-view="overview"], [data-active-view="reminders"]) .kpi {
  background: #173b3f !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage:is([data-active-view="overview"], [data-active-view="reminders"]) .kpi > span {
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
  text-shadow: none !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-canvas-widget:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) .panel .list {
  background: #edf1ec !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-canvas-widget:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) .panel .list .row > span:not(.tag),
html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="overview"] .overview-canvas-widget:not([data-overview-canvas-widget="focus"]):not([data-overview-canvas-widget="finance"]) .panel .list .row > span:not(.tag) :is(strong, small) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

/* The sticky title and tabs share one height/offset contract. Opaque chrome
   prevents scrolled content from showing through the navigation labels. */
html[data-theme] body.owner-shell-v1:not(.auth-required) {
  --ui-title-height: 70px;
  --ui-nav-offset: 0px;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) .topbar {
  top: var(--ui-nav-offset) !important;
  height: var(--ui-title-height) !important;
  min-height: var(--ui-title-height) !important;
  box-sizing: border-box;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) .module-tabs-shell {
  top: calc(var(--ui-nav-offset) + var(--ui-title-height)) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) :is(.topbar, .module-tabs-shell) {
  background: #0e2024 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) :is(.topbar, .module-tabs-shell) {
  background: #f2f6f4 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) .topbar :is(#pageTitle, #pageSub, #workspaceStatus, #clock, .mobile-app-label, .formal-route-code) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

@media (min-width: 1024px) {
  html[data-theme="night"] body.owner-shell-v1:not(.auth-required) {
    --ui-nav-offset: 84px;
  }
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="people"] :is(.people-overview-primary, .people-overview-create) :is(h3, h4, p, small, label, .muted-row, .overview-eyebrow) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] :is(.reminder-v2-card-head, .reminder-v2-form > .field, .reminder-v2-form-row, .reminder-v2-search, .reminder-v2-empty) :is(h3, h4, p, span, small, label) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] [data-reminder-edit-cancel][hidden] {
  display: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-list-card[data-art-frame-owner="true"] {
  transform: none !important;
}

/* Reminder rows sit on paper in both themes, independently of the shell ink. */
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-row {
  background: #edf1ec !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-row:hover {
  background: #dbe8e2 !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-copy :is(strong, .reminder-v2-meta, .reminder-v2-meta span, p),
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-queue-head :is(h3, p) {
  color: #183b3f !important;
  -webkit-text-fill-color: #183b3f !important;
  text-shadow: none !important;
}

html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-actions :is(button, summary),
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="reminders"] .reminder-v2-title-line .tag {
  background: #21474b !important;
  color: #edf4f1 !important;
  -webkit-text-fill-color: #edf4f1 !important;
  text-shadow: none !important;
}

/* Keep finance action buttons on their dark surface after all shared paper rules. */
html[data-theme] body.owner-shell-v1:not(.auth-required) .finance-month-picker [data-finance-month-apply],
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(.panel, .finance-overview-workbench, .finance-overview-ledger, .finance-overview-hot-days, .finance-overview-anomalies, .finance-overview-assets) .finance-month-picker [data-finance-month-apply],
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-trend-window-controls .mini-action,
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-trend-panel .mini-action[data-finance-category-filter] {
  background: linear-gradient(120deg, #1a6663, #174e59) !important;
  color: #fffdf4 !important;
  -webkit-text-fill-color: #fffdf4 !important;
  border-color: rgba(255, 253, 244, .56) !important;
  text-shadow: 0 1px 1px rgba(7, 35, 34, .42) !important;
}

/* REQ-007 reference sage material boundary. Keep the legacy variable names so
   older module styles inherit the new material without another cascade fork. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage {
  --card-cyan-start: #e0e5d3;
  --card-cyan-end: #d9dfcc;
  --card-cyan-edge: rgba(92, 108, 72, .4);
  --card-cyan-inner: rgba(130, 145, 101, .2);
  --card-cyan-highlight: rgba(250, 252, 243, .82);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage:is(
  [data-active-view="finance"],
  [data-active-view="reminders"],
  [data-active-view="knowledge"],
  [data-active-view="vault"],
  [data-active-view="settings"],
  [data-active-view="ai-workbench"]
) .panel[data-card-material="true"] {
  --card-material-paper: var(--card-cyan-start);
  --card-material-edge: var(--card-cyan-edge);
  background:
    linear-gradient(135deg, var(--card-cyan-start), var(--card-cyan-end)),
    var(--card-material-texture, url("/static/command_center/assets/paper-fibers-open.png")) center / 118px 118px repeat !important;
  background-blend-mode: normal, multiply !important;
  border-color: var(--card-cyan-edge) !important;
  box-shadow:
    inset 0 0 0 2px var(--card-cyan-highlight),
    inset 0 0 0 4px var(--card-cyan-inner),
    0 8px 18px rgba(55, 65, 42, .13) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  [data-art-frame-owner="true"][data-art-variant="archive"],
  [data-art-frame-owner="true"][data-art-variant="damask"]
) {
  --card-art-paper: var(--card-cyan-start);
  --card-art-brass: #66744f;
  --card-art-gold: #9ba67a;
  background:
    linear-gradient(135deg, var(--card-cyan-start), var(--card-cyan-end)) center / auto no-repeat,
    var(--card-texture, url("/static/command_center/assets/paper-fibers-open.png")) center / 148px 148px repeat,
    var(--card-watermark, none) right 18px top 18px / 168px 168px no-repeat !important;
  background-blend-mode: normal, multiply, normal !important;
  border-color: var(--card-cyan-edge) !important;
  box-shadow:
    inset 0 0 0 2px var(--card-cyan-highlight),
    inset 0 0 0 5px var(--card-cyan-inner),
    0 8px 18px rgba(55, 65, 42, .13) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .panel[data-tab-panel="overview-finance"][data-card-material="true"],
  .task-workbench-panel.import-v2-host,
  .cc-import-v2,
  [data-active-view="vault"] .library-overview-panel,
  [data-active-view="reminders"] .reminder-v2-editor-card,
  [data-active-view="reminders"] .reminder-v2-list-card,
  [data-active-view="knowledge"] .knowledge-v2,
  [data-active-view="ai-workbench"] .ai-workbench__pane,
  [data-active-view="recycle"] [data-command-recycle="true"] > .module-canvas-widget > .panel,
  [data-active-view="settings"] .settings-action-grid > .module-canvas-widget > .panel
) {
  background:
    linear-gradient(135deg, var(--card-cyan-start), var(--card-cyan-end)),
    var(--card-texture, url("/static/command_center/assets/paper-fibers-open.png")) center / 118px 118px repeat !important;
  background-blend-mode: normal, multiply !important;
  border-color: var(--card-cyan-edge) !important;
  box-shadow:
    inset 0 0 0 2px var(--card-cyan-highlight),
    inset 0 0 0 4px var(--card-cyan-inner),
    0 8px 18px rgba(55, 65, 42, .13) !important;
}

/* R082 local surface/ink pairs. Legacy art layers can still darken nested
   knowledge cards after their module CSS, so the final boundary owns both the
   paper color and its foreground. Navigation and deliberate dark headers are
   excluded. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(
  .knowledge-v2__summary,
  .knowledge-v2__atlas,
  .knowledge-v2__atlas-grid > section,
  .knowledge-v2__cadence,
  .knowledge-v2__workspace > .knowledge-v2__canvas-card,
  .knowledge-v2__capture,
  .knowledge-v2__capture > summary,
  .knowledge-v2__readonly-archive,
  .knowledge-v2__progressive,
  .knowledge-v2__browser,
  .knowledge-v2__search-row,
  .knowledge-v2__saved-views,
  .knowledge-v2__record,
  .knowledge-v2__record > summary,
  .knowledge-v2__record[open] > summary,
  .knowledge-v2__detail,
  .knowledge-v2__editor,
  .knowledge-v2__source
) {
  background: color-mix(in srgb, var(--card-cyan-start) 82%, #f8faef) !important;
  color: #253226 !important;
  -webkit-text-fill-color: #253226 !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(
  .knowledge-v2__capture > summary,
  .knowledge-v2__record > summary,
  .knowledge-v2__detail
) :is(h3, h4, p, span, strong, small, label, dt, dd) {
  color: #253226 !important;
  -webkit-text-fill-color: #253226 !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(
  .knowledge-v2__capture input,
  .knowledge-v2__capture select,
  .knowledge-v2__capture textarea,
  .knowledge-v2__editor input,
  .knowledge-v2__editor select,
  .knowledge-v2__editor textarea
) {
  background: #f7f9ef !important;
  color: #253226 !important;
  -webkit-text-fill-color: #253226 !important;
  border-color: rgba(92, 108, 72, .42) !important;
}

/* Dark pills and compact commands need light ink after the light-paper rule. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(
  .knowledge-v2__capture > summary .mini-action,
  .knowledge-v2__capture > summary .tag,
  .knowledge-v2__record > summary .tag,
  .knowledge-v2__record > summary .knowledge-note-tags
),
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .finance-overview-assets,
  .finance-overview-anomalies,
  .finance-overview-ledger,
  .finance-overview-hot-days
) .row > .tag {
  background: #294b3e !important;
  color: #f7f8ef !important;
  -webkit-text-fill-color: #f7f8ef !important;
  border-color: rgba(238, 242, 222, .56) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="knowledge"] :is(
  .knowledge-v2__capture > summary .mini-action,
  .knowledge-v2__capture > summary .tag,
  .knowledge-v2__record > summary .tag,
  .knowledge-v2__record > summary .knowledge-note-tags
) *,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .finance-overview-assets,
  .finance-overview-anomalies,
  .finance-overview-ledger,
  .finance-overview-hot-days
) .row > .tag * {
  color: #f7f8ef !important;
  -webkit-text-fill-color: #f7f8ef !important;
}

/* R083 cross-module contrast boundary. Day mode owns foreground and surface
   together here so legacy dark cockpit rules cannot leak one half of a color
   pair into the light paper theme. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage {
  --cc-day-content-surface: #f7f9f3;
  --cc-day-content-surface-alt: #e0e5d3;
  --cc-day-content-ink: #183b3f;
  --cc-day-muted-ink: #3e5656;
  --cc-day-accent-surface: #21474b;
  --cc-day-on-accent: #f7f9f3;
  --cc-day-danger-surface: #963e36;
  --cc-day-on-danger: #fff8f4;
  --cc-ink-soft: var(--cc-day-muted-ink);
  --cc-ink-faint: var(--cc-day-muted-ink);
  --r9-control-label: var(--cc-day-muted-ink);
  --ci-muted: var(--cc-day-muted-ink);
  --formal-day-muted: var(--cc-day-muted-ink);
  --items-ink-soft: var(--cc-day-muted-ink);
  --people-ink-soft: var(--cc-day-muted-ink);
  --finish-muted: var(--cc-day-muted-ink);
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  text-shadow: none !important;
}

/* Light content is the day-mode default. The explicit element list also
   clears inherited -webkit-text-fill-color left by the legacy dark skin. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  span,
  strong,
  small,
  label,
  legend,
  summary,
  dt,
  dd,
  th,
  td,
  li,
  a
) {
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  small,
  .muted,
  .muted-row,
  .hint,
  .meta,
  [class*="__meta"],
  [class*="__hint"],
  [class*="__eyebrow"],
  [class*="__kicker"],
  [class*="__status"]
) {
  color: var(--cc-day-muted-ink) !important;
  -webkit-text-fill-color: var(--cc-day-muted-ink) !important;
}

/* Legacy tables, inspectors, calendar cells and detail grids used dark
   surfaces even in day mode. They are content surfaces, not accent chrome. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .finance-ledger-v2__table tbody tr,
  .finance-ledger-v2__table tbody td,
  .finance-ledger-v2-host .tabulator-row,
  .finance-ledger-v2-host .tabulator-cell,
  .finance-ledger-inspector,
  .finance-ledger-inspector__facts > div,
  .fc .fc-daygrid-day,
  .fc .fc-daygrid-day-frame,
  .asset-history-detail,
  .asset-entry-reference-panel,
  .asset-reference-card,
  .asset-reference-row,
  .asset-reference-kpis > span,
  .items-v2__readonly-notice,
  .items-v2__detail-grid div,
  input,
  select,
  textarea
) {
  background: var(--cc-day-content-surface) !important;
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  border-color: rgba(73, 96, 77, .36) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .finance-ledger-v2__table tbody tr:nth-child(even),
  .finance-ledger-v2-host .tabulator-row.tabulator-row-even,
  .fc .fc-day-other,
  .asset-reference-row.muted,
  .items-v2__detail-grid div:nth-child(even)
) {
  background: var(--cc-day-content-surface-alt) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .finance-ledger-v2__table tbody tr,
  .finance-ledger-v2-host .tabulator-row,
  .finance-ledger-inspector,
  .finance-ledger-inspector__facts > div,
  .fc .fc-daygrid-day,
  .asset-history-detail,
  .asset-entry-reference-panel,
  .asset-reference-card,
  .asset-reference-row,
  .asset-reference-kpis > span,
  .items-v2__readonly-notice,
  .items-v2__detail-grid div
) :is(h3, h4, p, span, strong, small, label, dt, dd, a) {
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  text-shadow: none !important;
}

/* Compact status and command controls are deliberate dark accents. Owning
   their descendants prevents card-level text rules from recoloring them. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .tag,
  .mini-action,
  .hud-button.primary,
  button.primary,
  button[type="submit"],
  .bulk-actions-r1__bar,
  .reminder-v2-section-title
) {
  background: var(--cc-day-accent-surface) !important;
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  border-color: rgba(238, 244, 232, .52) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .tag,
  .mini-action,
  .hud-button.primary,
  button.primary,
  button[type="submit"],
  .bulk-actions-r1__bar,
  .reminder-v2-section-title
) :is(span, strong, small, b, i, svg) {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .mini-action.danger,
  .hud-button.danger,
  button.danger,
  [data-action="delete"]
) {
  background: var(--cc-day-danger-surface) !important;
  color: var(--cc-day-on-danger) !important;
  -webkit-text-fill-color: var(--cc-day-on-danger) !important;
  border-color: rgba(255, 235, 229, .62) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .mini-action.danger,
  .hud-button.danger,
  button.danger,
  [data-action="delete"]
) :is(span, strong, small, b, i, svg) {
  color: var(--cc-day-on-danger) !important;
  -webkit-text-fill-color: var(--cc-day-on-danger) !important;
}

/* These summary surfaces intentionally remain dark in the day composition. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(
  .cc-profile__overview-head,
  .library-readiness-ring > span,
  .library-attachment-donut > span
) :is(h2, h3, h4, p, span, strong, small) {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

/* Semantic ink remains distinguishable on light content while meeting the
   normal-text contrast threshold. Accent descendants are reset above. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(.green, .income, [data-tone="success"]) {
  color: #1f603f !important;
  -webkit-text-fill-color: #1f603f !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(.red, .expense, [data-tone="danger"]) {
  color: #8a312d !important;
  -webkit-text-fill-color: #8a312d !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(.amber, .warning, [data-tone="warning"]) {
  color: #704806 !important;
  -webkit-text-fill-color: #704806 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(.cyan, .info, [data-tone="info"]) {
  color: #15575c !important;
  -webkit-text-fill-color: #15575c !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage :is(.tag, .mini-action, .hud-button.primary, button.primary, button[type="submit"]) :is(
  .green,
  .income,
  .red,
  .expense,
  .amber,
  .warning,
  .cyan,
  .info,
  [data-tone]
) {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
}

/* Final ownership beats high-specificity legacy module skins. The repeated
   stage id is intentional: this compatibility boundary loads last and must
   own both halves of every retained dark accent pair. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .tag.tag,
  .mini-action.mini-action,
  .hud-button.primary,
  button.primary,
  button[type="submit"][type="submit"]
) {
  background: var(--cc-day-accent-surface) !important;
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  border-color: rgba(238, 244, 232, .52) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .tag.tag,
  .mini-action.mini-action,
  .hud-button.primary,
  button.primary,
  button[type="submit"][type="submit"]
) * {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .bulk-actions-r1__bar,
  .items-v2__header,
  .reminder-v2-overview-head,
  .reminder-v2-queue-head,
  .cc-profile__group > summary,
  .cc-profile__all-fields-head,
  .knowledge-v2__command-bar
) {
  background: var(--cc-day-accent-surface) !important;
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .bulk-actions-r1__bar,
  .items-v2__header,
  .reminder-v2-overview-head,
  .reminder-v2-queue-head,
  .cc-profile__group > summary,
  .cc-profile__all-fields-head,
  .knowledge-v2__command-bar
) :is(h2, h3, h4, p, span, strong, small, b, i, svg) {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .people-avatar,
  .library-state-chip,
  .library-readiness-ring > span,
  .library-attachment-donut > span
) {
  background: var(--cc-day-accent-surface) !important;
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .people-avatar,
  .library-state-chip,
  .library-readiness-ring > span,
  .library-attachment-donut > span
) :is(span, strong, small, b, i, svg) {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .finance-ledger-v2-host .tabulator-header,
  .finance-ledger-v2-host .tabulator-headers,
  .finance-ledger-v2-host .tabulator-col,
  .finance-ledger-v2-host .tabulator-col-content,
  .finance-ledger-v2-host .tabulator-col-title-holder,
  .finance-ledger-v2-host .tabulator-col-title
) {
  background: var(--cc-day-accent-surface) !important;
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .finance-ledger-v2-host .tabulator-row,
  .finance-ledger-v2-host .tabulator-cell,
  .finance-ledger-inspector,
  .finance-ledger-inspector__facts > div,
  .asset-entry-reference-panel,
  .asset-reference-card,
  .asset-reference-row,
  .asset-reference-kpis > span
) {
  background: var(--cc-day-content-surface) !important;
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .finance-ledger-v2-host .tabulator-row,
  .finance-ledger-v2-host .tabulator-cell,
  .finance-ledger-inspector,
  .finance-ledger-inspector__facts > div,
  .asset-entry-reference-panel,
  .asset-reference-card,
  .asset-reference-row,
  .asset-reference-kpis > span
) :is(h3, h4, p, span, strong, small, b, label, dt, dd, a) {
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage .fc .fc-daygrid-day.fc-day-today {
  background: #245f79 !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage .fc .fc-daygrid-day.fc-day-today :is(a, span) {
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .finance-ledger-v2__type--income,
  .finance-ledger-v2__type--expense
) {
  background: var(--cc-day-accent-surface) !important;
  color: var(--cc-day-on-accent) !important;
  -webkit-text-fill-color: var(--cc-day-on-accent) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .mini-action.danger,
  .hud-button.danger,
  button.danger,
  [data-action="delete"]
) {
  background: var(--cc-day-danger-surface) !important;
  color: var(--cc-day-on-danger) !important;
  -webkit-text-fill-color: var(--cc-day-on-danger) !important;
  border-color: rgba(255, 235, 229, .62) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .mini-action.danger,
  .hud-button.danger,
  button.danger,
  [data-action="delete"]
) * {
  color: var(--cc-day-on-danger) !important;
  -webkit-text-fill-color: var(--cc-day-on-danger) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .cc-profile__structure-entry .cc-profile__eyebrow,
  .cc-custom-info__heading .cc-custom-info__eyebrow
) {
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
}

/* Module-specific controls with inline or id-level ink keep a light surface
   in day mode, so even their strongest legacy foreground remains readable. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage .fc .fc-daygrid-day.fc-day-today :is(
  .fc-daygrid-day-frame,
  .fc-daygrid-day-top,
  .fc-daygrid-day-number
) {
  background: #d9e9ef !important;
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .finance-ledger-v2__type.finance-ledger-v2__type--income,
  .finance-ledger-v2__type.finance-ledger-v2__type--expense,
  .asset-column-head .tag.tag
) {
  background: #dbe9e1 !important;
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  border-color: rgba(73, 96, 77, .42) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  #importPreviewSubmit,
  .cc-import-v2__actions button
) {
  background: #d5e8de !important;
  color: var(--cc-day-content-ink) !important;
  -webkit-text-fill-color: var(--cc-day-content-ink) !important;
  border-color: rgba(73, 96, 77, .46) !important;
  text-shadow: none !important;
}


/* source: styles/visual-card-system-r84-polish.css */
/* R084 restrained visual polish boundary.
   This file loads after the R083 contrast owner and deliberately avoids
   layout, overflow, drag/resize, and application-state properties. */

body.owner-shell-v1:not(.auth-required) #moduleStage {
  --r84-income-ink: #195f3f;
  --r84-income-wash: rgba(46, 126, 82, .105);
  --r84-expense-ink: #8d302c;
  --r84-expense-wash: rgba(157, 62, 54, .095);
  --r84-balance-ink: #15566a;
  --r84-balance-wash: rgba(29, 105, 121, .095);
  --r84-reserve-ink: #76500c;
  --r84-reserve-wash: rgba(163, 113, 28, .105);
  --r84-card-rule: rgba(49, 86, 76, .22);
  --r84-card-glow: rgba(255, 255, 255, .42);
  --r84-pattern-dot: rgba(43, 91, 77, .105);
  --r84-pattern-line: rgba(136, 104, 52, .055);
}

/* Quiet hierarchy: headings stay compact while section labels and financial
   figures become easier to scan. No viewport-scaled typography is used. */
body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel > h3,
  .overview-section-head h4,
  .command-console-head h3,
  .finance-trend-head h3,
  .knowledge-v2__browser-head strong,
  .items-v2__header h3
) {
  letter-spacing: 0;
  text-wrap: balance;
}

body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .kpi strong,
  .finance-trend-kpis b,
  .finance-trend-row b,
  .asset-history-summary strong,
  .asset-history-comparison strong,
  .asset-reference-kpis strong,
  .finance-ledger-v2__amount
) {
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 760;
  letter-spacing: 0;
}

/* Financial semantics own both ink and a restrained wash. The wash carries
   meaning without turning an operational screen into a field of bright pills. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .kpi,
  .finance-trend-kpis,
  .finance-trend-row,
  .asset-history-summary,
  .asset-history-comparison,
  .asset-reference-kpis,
  .asset-reference-row,
  .finance-ledger-v2-host
) :is(strong, b).green,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-ledger-v2__type--income {
  color: var(--r84-income-ink) !important;
  -webkit-text-fill-color: var(--r84-income-ink) !important;
  background-color: var(--r84-income-wash) !important;
  box-shadow: inset 0 -1px 0 rgba(46, 126, 82, .22);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .kpi,
  .finance-trend-kpis,
  .finance-trend-row,
  .asset-history-summary,
  .asset-history-comparison,
  .asset-reference-kpis,
  .asset-reference-row,
  .finance-ledger-v2-host
) :is(strong, b).red,
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] .finance-ledger-v2__type--expense {
  color: var(--r84-expense-ink) !important;
  -webkit-text-fill-color: var(--r84-expense-ink) !important;
  background-color: var(--r84-expense-wash) !important;
  box-shadow: inset 0 -1px 0 rgba(157, 62, 54, .2);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .kpi,
  .finance-trend-kpis,
  .finance-trend-row,
  .asset-history-summary,
  .asset-history-comparison,
  .asset-reference-kpis,
  .asset-reference-row
) :is(strong, b).cyan {
  color: var(--r84-balance-ink) !important;
  -webkit-text-fill-color: var(--r84-balance-ink) !important;
  background-color: var(--r84-balance-wash) !important;
  box-shadow: inset 0 -1px 0 rgba(29, 105, 121, .2);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .kpi,
  .finance-trend-kpis,
  .finance-trend-row,
  .asset-history-summary,
  .asset-history-comparison,
  .asset-reference-kpis,
  .asset-reference-row
) :is(strong, b).amber {
  color: var(--r84-reserve-ink) !important;
  -webkit-text-fill-color: var(--r84-reserve-ink) !important;
  background-color: var(--r84-reserve-wash) !important;
  box-shadow: inset 0 -1px 0 rgba(163, 113, 28, .22);
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage[data-active-view="finance"] :is(
  .kpi,
  .finance-trend-kpis,
  .finance-trend-row,
  .asset-history-summary,
  .asset-history-comparison,
  .asset-reference-kpis,
  .asset-reference-row
) :is(strong, b):is(.green, .red, .cyan, .amber) {
  display: inline-block;
  padding: .08rem .34rem .1rem;
  border-radius: 4px;
}

/* Ledger type chips need separate semantic pairs after R083's compatibility
   boundary had intentionally normalized both to the same neutral style. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage[data-active-view="finance"] .finance-ledger-v2__type.finance-ledger-v2__type--income {
  color: var(--r84-income-ink) !important;
  -webkit-text-fill-color: var(--r84-income-ink) !important;
  background: rgba(225, 240, 231, .96) !important;
  border-color: rgba(46, 126, 82, .38) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage[data-active-view="finance"] .finance-ledger-v2__type.finance-ledger-v2__type--expense {
  color: var(--r84-expense-ink) !important;
  -webkit-text-fill-color: var(--r84-expense-ink) !important;
  background: rgba(247, 229, 225, .96) !important;
  border-color: rgba(157, 62, 54, .36) !important;
}

/* Sparse and empty content receives a nearly invisible archival dot-and-rule
   texture. Only explicit empty surfaces and one-row empty lists are targeted. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .ai-workbench__empty,
  .cc-custom-info__empty,
  .items-v2__empty,
  .items-v2__compact-empty,
  .items-v2__trash-empty,
  .knowledge-v2__empty,
  .library-empty-state,
  .finance-budget-visual.empty,
  .finance-category-trend-chart.is-empty,
  .category-chart.empty,
  .list > .muted-row:only-child
) {
  border-color: var(--r84-card-rule) !important;
  background-color: rgba(247, 249, 243, .88) !important;
  background-image:
    radial-gradient(circle at 13px 13px, var(--r84-pattern-dot) 1px, transparent 1.25px),
    repeating-linear-gradient(135deg, transparent 0 18px, var(--r84-pattern-line) 18px 19px, transparent 19px 36px) !important;
  background-size: 26px 26px, 100% 100% !important;
  box-shadow: inset 0 1px 0 var(--r84-card-glow), 0 4px 12px rgba(39, 60, 51, .045);
}

/* Give frequently scanned KPI cards a little depth without changing their
   dimensions, placement, drag handles, or resize behavior. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .kpi,
  .overview-signal-card,
  .asset-reference-kpis > span,
  .asset-history-summary > div
) {
  border-color: rgba(49, 86, 76, .2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .54), 0 5px 14px rgba(35, 65, 54, .055);
}

/* R84.1 calm paper treatment for spacious content surfaces. This is a
   paint-only layer: it intentionally avoids sizing, positioning, and overflow
   so existing card movement and responsive contracts remain untouched. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel,
  .overview-signal-card,
  .finance-trend-panel,
  .finance-ledger-v2-host,
  .knowledge-v2__browser,
  .library-attachments-panel,
  .items-v2__panel,
  .reminder-v2-editor-card,
  .cc-custom-info__panel,
  .profile-owner-card
) {
  background-color: rgba(250, 251, 247, .94);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, .48), transparent 42%),
    repeating-linear-gradient(0deg, rgba(72, 104, 89, .025) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .68), inset 0 0 0 1px rgba(49, 86, 76, .06), 0 6px 18px rgba(35, 65, 54, .045);
}

/* Keep the treatment quiet on dense tables and nested controls. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .finance-ledger-v2-host,
  .knowledge-v2__browser,
  .library-attachments-panel
) :is(table, .tabulator, input, select, textarea, button) {
  background-image: none;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .panel,
  .overview-signal-card,
  .finance-trend-panel,
  .finance-ledger-v2-host,
  .knowledge-v2__browser,
  .library-attachments-panel,
  .items-v2__panel,
  .reminder-v2-editor-card,
  .cc-custom-info__panel,
  .profile-owner-card
) {
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, .055), transparent 42%),
    repeating-linear-gradient(0deg, rgba(164, 207, 190, .018) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(164, 207, 190, .06), 0 6px 18px rgba(0, 0, 0, .14);
}

/* Fast, quiet feedback. Only true controls move; canvas cards never do. */
body.owner-shell-v1:not(.auth-required) :is(
  .mini-action,
  .hud-button,
  .status-button,
  .module-tab-button,
  .overview-canvas-toolbar button,
  .module-canvas-toolbar button
) {
  transition-property: transform, box-shadow, border-color, background-color, color;
  transition-duration: 135ms;
  transition-timing-function: ease-out;
}

body.owner-shell-v1:not(.auth-required) :is(
  .mini-action,
  .hud-button,
  .status-button,
  .module-tab-button,
  .overview-canvas-toolbar button,
  .module-canvas-toolbar button
):not(:disabled):hover {
  transform: translateY(-1px);
}

body.owner-shell-v1:not(.auth-required) :is(
  .mini-action,
  .hud-button,
  .status-button,
  .module-tab-button,
  .overview-canvas-toolbar button,
  .module-canvas-toolbar button
):not(:disabled):active {
  transform: translateY(0);
  transition-duration: 70ms;
}

body.owner-shell-v1:not(.auth-required) :is(
  .mini-action,
  .hud-button,
  .status-button,
  .module-tab-button
):focus-visible {
  outline: 2px solid #2c7776;
  outline-offset: 2px;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage {
  --r84-income-ink: #8ed6ad;
  --r84-expense-ink: #f0a49e;
  --r84-balance-ink: #8fd2df;
  --r84-reserve-ink: #e7c67b;
  --r84-pattern-dot: rgba(164, 207, 190, .09);
  --r84-pattern-line: rgba(213, 188, 128, .045);
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(strong, b).green {
  color: var(--r84-income-ink) !important;
  -webkit-text-fill-color: var(--r84-income-ink) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(strong, b).red {
  color: var(--r84-expense-ink) !important;
  -webkit-text-fill-color: var(--r84-expense-ink) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(strong, b).cyan {
  color: var(--r84-balance-ink) !important;
  -webkit-text-fill-color: var(--r84-balance-ink) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage[data-active-view="finance"] :is(strong, b).amber {
  color: var(--r84-reserve-ink) !important;
  -webkit-text-fill-color: var(--r84-reserve-ink) !important;
}

html[data-theme="night"] body.owner-shell-v1:not(.auth-required) #moduleStage :is(
  .ai-workbench__empty,
  .cc-custom-info__empty,
  .items-v2__empty,
  .items-v2__compact-empty,
  .items-v2__trash-empty,
  .knowledge-v2__empty,
  .library-empty-state,
  .finance-budget-visual.empty,
  .finance-category-trend-chart.is-empty,
  .category-chart.empty,
  .list > .muted-row:only-child
) {
  background-image:
    radial-gradient(circle at 13px 13px, var(--r84-pattern-dot) 1px, transparent 1.25px),
    repeating-linear-gradient(135deg, transparent 0 18px, var(--r84-pattern-line) 18px 19px, transparent 19px 36px) !important;
  background-size: 26px 26px, 100% 100% !important;
}

@media (prefers-reduced-motion: reduce) {
  body.owner-shell-v1:not(.auth-required) :is(
    .mini-action,
    .hud-button,
    .status-button,
    .module-tab-button,
    .overview-canvas-toolbar button,
    .module-canvas-toolbar button
  ) {
    transition-duration: .001ms !important;
  }

  body.owner-shell-v1:not(.auth-required) :is(
    .mini-action,
    .hud-button,
    .status-button,
    .module-tab-button,
    .overview-canvas-toolbar button,
    .module-canvas-toolbar button
  ):is(:hover, :active) {
    transform: none !important;
  }
}

/* R085 shared day-theme contrast boundary.
   The legacy owner skin defines dark native options and several module skins
   own only one half of a foreground/surface pair. This final paint-only layer
   keeps day controls and overlays on an explicit light scheme while preserving
   the established dark accent and danger pairs. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage {
  --r85-day-control-surface: #f7f9f3;
  --r85-day-control-surface-muted: #e1e8dc;
  --r85-day-control-ink: #183b3f;
  --r85-day-control-ink-muted: #31494b;
  --r85-day-control-line: rgba(73, 96, 77, .42);
  --r85-day-accent-surface: #21474b;
  --r85-day-on-accent: #f7f9f3;
  --r85-day-danger-surface: #963e36;
  --r85-day-on-danger: #fff8f4;
  color-scheme: light;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  select,
  option,
  optgroup,
  input:not([type="checkbox"]):not([type="radio"]),
  textarea
) {
  color-scheme: light;
  background-color: var(--r85-day-control-surface) !important;
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
  border-color: var(--r85-day-control-line) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  input,
  select,
  textarea,
  option,
  optgroup
):disabled {
  background-color: var(--r85-day-control-surface-muted) !important;
  color: var(--r85-day-control-ink-muted) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink-muted) !important;
  opacity: 1;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  input::placeholder,
  textarea::placeholder
) {
  color: var(--r85-day-control-ink-muted) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink-muted) !important;
  opacity: 1;
}

/* Native and custom popup surfaces use one neutral pair. Explicit role
   selectors cover module-owned menus without coupling this layer to markup
   creation logic. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .cc-tag-picker__panel,
  .owner-global-search__results,
  .reminder-v2-snooze-menu,
  .reminder-v2-more-menu,
  .items-v2__archive-dialog,
  .library-preview-dialog,
  .qq-activation-modal,
  .cc-mobile-more,
  .ai-panel,
  [role="dialog"],
  [role="menu"],
  [role="listbox"]
) {
  background-color: var(--r85-day-control-surface) !important;
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
  border-color: var(--r85-day-control-line) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .cc-tag-picker__panel,
  .owner-global-search__results,
  .reminder-v2-snooze-menu,
  .reminder-v2-more-menu,
  .items-v2__archive-dialog,
  .library-preview-dialog,
  .qq-activation-modal,
  .cc-mobile-more,
  .ai-panel,
  [role="dialog"],
  [role="menu"],
  [role="listbox"]
) :is(h2, h3, h4, p, span, strong, small, label, summary, li, a) {
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
  text-shadow: none !important;
}

/* Ordinary buttons stay light. Primary, compact command, and destructive
   controls are paired separately below. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  button:not(.primary):not(.danger):not([type="submit"]),
  .hud-button:not(.primary):not(.danger),
  .status-button,
  .segmented-option
):not(.mini-action) {
  background-color: var(--r85-day-control-surface-muted) !important;
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
  border-color: var(--r85-day-control-line) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  button:not(.primary):not(.danger):not([type="submit"]),
  .hud-button:not(.primary):not(.danger),
  .status-button,
  .segmented-option
):not(.mini-action) :is(span, strong, small, b, i, svg) {
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
}

/* Repeated chips are neutral information surfaces unless they are an
   established command tag. Owning descendants prevents the broad R83 text
   reset from separating the chip ink from its surface. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .ai-workbench__source-chip,
  .cc-custom-info__collection-chip,
  .knowledge-v2__filter-chip,
  .library-type-chip,
  .library-state-chip,
  .library-attachment-chip
) {
  background-color: var(--r85-day-control-surface-muted) !important;
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
  border-color: var(--r85-day-control-line) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .ai-workbench__source-chip,
  .cc-custom-info__collection-chip,
  .knowledge-v2__filter-chip,
  .library-type-chip,
  .library-state-chip,
  .library-attachment-chip
) :is(span, strong, small, b, i, svg) {
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
}

/* Cards and empty states remain light even when an older module contributes
   dark surface variables. Background images from the visual system remain. */
html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .panel,
  .answer-card,
  .system-strip,
  .overview-signal-card,
  .ai-workbench__empty,
  .cc-custom-info__empty,
  .items-v2__empty,
  .items-v2__compact-empty,
  .items-v2__trash-empty,
  .knowledge-v2__empty,
  .library-empty-state
) {
  background-color: var(--r85-day-control-surface) !important;
  color: var(--r85-day-control-ink) !important;
  -webkit-text-fill-color: var(--r85-day-control-ink) !important;
  border-color: var(--r85-day-control-line) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .tag,
  .mini-action,
  .hud-button.primary,
  button.primary,
  button[type="submit"]
) {
  background-color: var(--r85-day-accent-surface) !important;
  color: var(--r85-day-on-accent) !important;
  -webkit-text-fill-color: var(--r85-day-on-accent) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .tag,
  .mini-action,
  .hud-button.primary,
  button.primary,
  button[type="submit"]
) :is(span, strong, small, b, i, svg) {
  color: var(--r85-day-on-accent) !important;
  -webkit-text-fill-color: var(--r85-day-on-accent) !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .mini-action.danger,
  .hud-button.danger,
  button.danger,
  [data-action="delete"]
) {
  background-color: var(--r85-day-danger-surface) !important;
  color: var(--r85-day-on-danger) !important;
  -webkit-text-fill-color: var(--r85-day-on-danger) !important;
  text-shadow: none !important;
}

html[data-theme="day"] body.owner-shell-v1:not(.auth-required) #moduleStage#moduleStage#moduleStage :is(
  .mini-action.danger,
  .hud-button.danger,
  button.danger,
  [data-action="delete"]
) :is(span, strong, small, b, i, svg) {
  color: var(--r85-day-on-danger) !important;
  -webkit-text-fill-color: var(--r85-day-on-danger) !important;
}


/* Layered on purpose: layered !important beats every unlayered !important above,
   so this final design system wins without a specificity arms race. */
/* source: styles/design-refresh-2026.css */
@layer design-refresh {
/*
 * Design refresh 2026 — final visual layer.
 * Loaded last in command-center.bundle.css (layer design-refresh).
 * Night: cosmos/aurora backdrop, frosted-glass panels, indigo→violet accent.
 * Day (default): "heritage luxury" — ivory paper, gold ornament frames,
 * serif display titles, emerald accent (see the Day theme section).
 * Scoped under #commandCenterShell (and the floating dialogs) with
 * !important because earlier layers rely on !important heavily.
 */

/* ---------- Tokens ---------- */
html[data-theme] {
  --r-font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --r-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", Consolas, monospace;
  --r-radius-sm: 6px;
  --r-radius: 8px;
  --r-radius-md: 10px;
  --r-radius-lg: 14px;
  --r-ease: cubic-bezier(.2, .7, .2, 1);
}

html[data-theme="night"] {
  --r-bg: #06070c;
  --r-surface: rgba(16, 19, 29, .68);
  --r-surface-2: rgba(255, 255, 255, .045);
  --r-elev: rgba(26, 30, 44, .96);
  --r-input: rgba(6, 8, 14, .55);
  --r-line: rgba(255, 255, 255, .08);
  --r-line-strong: rgba(255, 255, 255, .14);
  --r-text: #eef0f6;
  --r-muted: #a9b0c2;
  --r-faint: #8e96aa;
  --r-accent: #8f9cff;
  --r-accent-strong: #b7c0ff;
  --r-accent-contrast: #ffffff;
  --r-accent-soft: rgba(143, 156, 255, .14);
  --r-ring: rgba(143, 156, 255, .5);
  --r-accent-grad: linear-gradient(135deg, #4f46e5 0%, #6d4ef0 50%, #7c3aed 100%);
  --r-glow: 0 8px 28px -8px rgba(109, 78, 240, .65);
  --r-highlight: inset 0 1px 0 rgba(255, 255, 255, .07);
  --r-backdrop:
    radial-gradient(1200px 680px at 10% -10%, rgba(99, 102, 241, .42), transparent 62%),
    radial-gradient(950px 600px at 94% 2%, rgba(168, 85, 247, .30), transparent 60%),
    radial-gradient(1100px 720px at 55% 115%, rgba(14, 165, 233, .22), transparent 62%),
    linear-gradient(180deg, rgba(6, 7, 12, .30) 0%, rgba(6, 7, 12, .62) 50%, rgba(6, 7, 12, .80) 100%),
    url("/static/command_center/assets/night-cosmos-r1.jpg") center / cover no-repeat;
  --r-green: #34d399;
  --r-red: #f87171;
  --r-amber: #fbbf24;
  --r-green-soft: rgba(52, 211, 153, .12);
  --r-red-soft: rgba(248, 113, 113, .12);
  --r-amber-soft: rgba(251, 191, 36, .12);
  --r-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .3), 0 18px 48px -18px rgba(0, 0, 0, .7);
  --r-shadow-pop: inset 0 1px 0 rgba(255, 255, 255, .08), 0 28px 64px -12px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

html[data-theme="day"] {
  --r-bg: #eef0f7;
  --r-surface: rgba(255, 255, 255, .78);
  --r-surface-2: rgba(246, 247, 252, .85);
  --r-elev: #ffffff;
  --r-input: rgba(255, 255, 255, .92);
  --r-line: rgba(30, 27, 75, .08);
  --r-line-strong: rgba(30, 27, 75, .15);
  --r-text: #111827;
  --r-muted: #4b5563;
  --r-faint: #5f6675;
  --r-accent: #4f46e5;
  --r-accent-strong: #4338ca;
  --r-accent-contrast: #ffffff;
  --r-accent-soft: rgba(79, 70, 229, .09);
  --r-ring: rgba(79, 70, 229, .35);
  --r-accent-grad: linear-gradient(135deg, #4f46e5 0%, #6d4ef0 50%, #7c3aed 100%);
  --r-glow: 0 8px 24px -8px rgba(79, 70, 229, .5);
  --r-highlight: inset 0 1px 0 rgba(255, 255, 255, .9);
  --r-backdrop:
    radial-gradient(1000px 600px at 8% -10%, rgba(129, 140, 248, .28), transparent 60%),
    radial-gradient(900px 560px at 95% 0%, rgba(244, 114, 182, .16), transparent 60%),
    radial-gradient(1100px 700px at 50% 115%, rgba(56, 189, 248, .16), transparent 62%),
    linear-gradient(180deg, #f4f5fb 0%, #eceef6 100%);
  --r-green: #047857;
  --r-red: #b91c1c;
  --r-amber: #954708;
  --r-green-soft: rgba(4, 120, 87, .08);
  --r-red-soft: rgba(220, 38, 38, .07);
  --r-amber-soft: rgba(180, 83, 9, .08);
  --r-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(30, 27, 75, .05), 0 16px 40px -18px rgba(30, 27, 75, .22);
  --r-shadow-pop: 0 24px 56px -12px rgba(30, 27, 75, .28);
  color-scheme: light;
}

/* ---------- Base ---------- */
html[data-theme] body,
html[data-theme] body.owner-shell-v1 {
  background: var(--r-backdrop), var(--r-bg) !important;
  background-attachment: fixed !important;
  color: var(--r-text) !important;
  font-family: var(--r-font) !important;
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[data-theme] { background: var(--r-bg) !important; }
html[data-theme] body::before,
html[data-theme] body::after { background: none !important; background-image: none !important; }
/* Legacy gold corner tabs on the shell: removed. */
html[data-theme] #commandCenterShell::before,
html[data-theme] #commandCenterShell::after { content: none !important; display: none !important; }
/* Legacy gold/coral accent ticks → the shared accent gradient. */
html[data-theme] #commandCenterShell :is(.overview-canvas-toolbar, .command-console-head, .overview-signal-card, h3)::before {
  background: var(--r-accent-grad) !important;
}
html[data-theme] .brand .mark::after { background: #fff !important; box-shadow: 0 0 8px rgba(183,192,255,.8) !important; }
/* The ambient backdrop must show through the shell. */
html[data-theme] #commandCenterShell > .main,
html[data-theme] #commandCenterShell .main { background: transparent !important; background-image: none !important; }

html[data-theme] #commandCenterShell,
html[data-theme] #commandCenterShell *,
html[data-theme] #aiPanel, html[data-theme] #aiPanel *,
html[data-theme] #ownerGlobalSearch, html[data-theme] #ownerGlobalSearch *,
html[data-theme] #mobileNavMore, html[data-theme] #mobileNavMore * {
  font-family: var(--r-font) !important;
  letter-spacing: normal;
}
html[data-theme] #commandCenterShell :is(code, pre, kbd, samp, .mono, [class*="code"] code) { font-family: var(--r-mono) !important; }
html[data-theme] #commandCenterShell :is(h1, h2, h3, h4) {
  font-family: var(--r-font) !important;
  letter-spacing: -.01em !important;
  font-weight: 650 !important;
  color: var(--r-text) !important;
  text-shadow: none !important;
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme] #commandCenterShell h2 { font-size: 1.15rem !important; }
html[data-theme] #commandCenterShell h3 { font-size: 1rem !important; }
html[data-theme] #commandCenterShell :is(p, small, .muted, .hint, [class*="__meta"], [class*="-meta"]) { color: var(--r-muted); }

/* Decorative-only "archive" chrome: gone. Content is untouched. */
html[data-theme] #commandCenterShell :is(
  .formal-workbench-intro, .formal-archive-caption, .formal-rail-index, .formal-route-code,
  .formal-signal-head, .formal-signal-context, .formal-signal-meter
) { display: none !important; }
html[data-theme] #commandCenterShell :is(.workspace, .grid, .overview-grid, .panel, [class*="-panel"], [class*="-card"], .row)::before,
html[data-theme] #commandCenterShell :is(.workspace, .grid, .overview-grid, .panel, [class*="-panel"], [class*="-card"])::after {
  background-image: none !important;
}
html[data-theme] #commandCenterShell :is(.workspace, .grid, .overview-grid)::before,
html[data-theme] #commandCenterShell :is(.panel, [class*="-panel"], [class*="-card"])::after { content: none !important; }

/* ---------- Shell: top navigation bar ---------- */
html[data-theme] #commandCenterShell > .sidebar {
  background: color-mix(in srgb, var(--r-bg) 58%, transparent) !important;
  backdrop-filter: saturate(170%) blur(22px);
  -webkit-backdrop-filter: saturate(170%) blur(22px);
  border: 0 !important;
  border-bottom: 1px solid var(--r-line) !important;
  border-radius: 0 !important;
  box-shadow: var(--r-highlight), 0 12px 32px -20px rgba(0, 0, 0, .6) !important;
}
html[data-theme] #commandCenterShell .brand .mark {
  background: var(--r-accent-grad) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), var(--r-glow) !important;
}
html[data-theme] #commandCenterShell .brand h1 { font-size: .95rem !important; font-weight: 650 !important; }
html[data-theme] #commandCenterShell .brand small { color: var(--r-faint) !important; font-size: .72rem !important; }

html[data-theme] #commandCenterShell .cc-shell-nav__item,
html[data-theme] #commandCenterShell #primaryNav a,
html[data-theme] #commandCenterShell #primaryNav button {
  font-size: .84rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--r-muted) !important;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  border-radius: var(--r-radius) !important;
  box-shadow: none !important;
  transition: background-color .15s var(--r-ease), color .15s var(--r-ease);
}
html[data-theme] #commandCenterShell .cc-shell-nav__item:hover,
html[data-theme] #commandCenterShell #primaryNav a:hover {
  color: var(--r-text) !important;
  background: var(--r-surface-2) !important;
}
html[data-theme] #commandCenterShell .cc-shell-nav__item.active,
html[data-theme] #commandCenterShell #primaryNav a.active,
html[data-theme] #commandCenterShell #primaryNav [aria-current="page"] {
  color: var(--r-text) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(124, 58, 237, .14)) !important;
  border-color: color-mix(in srgb, var(--r-accent) 38%, transparent) !important;
  box-shadow: var(--r-highlight), 0 6px 20px -10px rgba(109, 78, 240, .7) !important;
}
html[data-theme] #commandCenterShell .cc-shell-nav__item.active .cc-shell-nav__icon { color: var(--r-accent-strong) !important; }

/* ---------- Shell: page header ---------- */
html[data-theme] #commandCenterShell .topbar {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-inline: 0 !important;
}
html[data-theme] #commandCenterShell .topbar #pageTitle {
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
  background-image: linear-gradient(100deg, var(--r-text) 30%, var(--r-accent-strong) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
html[data-theme] #commandCenterShell .topbar #pageSub { color: var(--r-muted) !important; }
html[data-theme] #commandCenterShell .topbar .status {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell .topbar :is(#workspaceStatus, #clock) { color: var(--r-muted) !important; font-size: .8rem !important; }
html[data-theme] #commandCenterShell .topbar #statusDot { background: var(--r-green) !important; box-shadow: 0 0 0 3px var(--r-green-soft) !important; }

html[data-theme] #commandCenterShell.shell,
html[data-theme] #commandCenterShell { border-radius: 0 !important; background: transparent !important; background-image: none !important; box-shadow: none !important; border: 0 !important; }

/* ---------- Text colour reset ----------
 * Legacy layers hard-coded ink colours per theme (dark ink for their light "paper" cards
 * even in night mode). Reset inline text to inherit from its surface, with zero extra
 * specificity so component rules below (tags, buttons, semantic tones) still win. */
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore) :where(span, strong, b, em, h1, h2, h3, h4, h5, dt, dd, li, td, th, time, label) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
/* Containers also carried legacy ink; let them inherit so the whole subtree follows the surface. */
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore) :where(div, section, article, aside, main, header, footer, nav, fieldset, legend, form, ul, ol, dl, table, tr, thead, tbody) {
  color: inherit !important;
}
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore) :where(p, small, figcaption, .muted, .hint) {
  color: var(--r-muted) !important;
  text-shadow: none !important;
}
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch) :where(button, .mini-action, .button, .tag, .chip, .badge) :where(p, small) { color: inherit !important; }
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch) :where(a:not([class])) { color: var(--r-accent-strong) !important; }
/* Semantic tones (re-applied after the reset). */
html[data-theme] :where(#commandCenterShell, #aiPanel) :where(.green, .income, .success, .positive) { color: var(--r-green) !important; }
html[data-theme] :where(#commandCenterShell, #aiPanel) :where(.red, .danger, .error, .is-error, .expense, .negative, .overdue) { color: var(--r-red) !important; }
html[data-theme] :where(#commandCenterShell, #aiPanel) :where(.amber, .warning, .is-warning) { color: var(--r-amber) !important; }
html[data-theme] :where(#commandCenterShell, #aiPanel) :where(.cyan) { color: var(--r-accent-strong) !important; }

/* Sub-containers inside cards: flatten decorative gradients so the card surface shows through. */
html[data-theme] #commandCenterShell #moduleStage :is(
  [class*="__header"], [class*="__head"]:not(input), [class*="-head"]:not(input), [class*="__summary"], [class*="__browser"],
  [class*="__records"], [class*="__source"], [class*="__actions"], [class*="-actions"], [class*="__search"], [class*="-search"]:not(input),
  [class*="__workspace-section"], [class*="__state"], [class*="__pane-head"], [class*="overview-column"], [class*="__atlas"], details, summary
):not(button):not(input):not(select):not(textarea) {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell #moduleStage :is([class*="__empty"], [class*="-empty"]):not(button) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px dashed var(--r-line-strong) !important;
  border-radius: var(--r-radius-md) !important;
  box-shadow: none !important;
  color: var(--r-muted) !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(p, span)[class*="-empty"],
html[data-theme] #commandCenterShell #moduleStage :is(p, span)[class*="__empty"] { border: 0 !important; background: transparent !important; }
html[data-theme] #commandCenterShell #moduleStage form[class*="__query"] {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius-lg) !important;
  box-shadow: none !important;
}
/* Inner cards (export cards, settings cards, editor cards …) */
html[data-theme] #commandCenterShell #moduleStage :is([class*="-card"], [class*="__card"]):not(.panel):not(button):not(a) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius-md) !important;
  box-shadow: none !important;
  color: var(--r-text) !important;
}
/* Legacy "paper" sub-sections (asset capture, work editor panes, custom field groups, chart KPIs). */
html[data-theme] #commandCenterShell #moduleStage :is(
  [class*="asset-capture-panel"], [class*="asset-ledger-section"], [class*="asset-clearance-toolbar"],
  [class*="asset-quick-presets"], [class*="-pane"]:not(button), fieldset, .finance-chart-kpis
) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius-md) !important;
  box-shadow: none !important;
  color: var(--r-text) !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(
  [class*="asset-ledger-row"], [class*="asset-section-title"], [class*="asset-inherited-note"], [class*="asset-row-reference"],
  .finance-chart-kpis > div, .module-canvas-toolbar
) {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: inherit !important;
}
html[data-theme] #commandCenterShell #moduleStage :is([class*="asset-ledger-row"], .finance-chart-kpis > div) {
  border: 0 !important;
  border-bottom: 1px solid var(--r-line) !important;
  border-radius: 0 !important;
}
html[data-theme] #commandCenterShell #moduleStage [class*="asset-section-title"] { color: var(--r-faint) !important; font-weight: 600 !important; }
html[data-theme] #commandCenterShell .module-canvas-toolbar { background: transparent !important; border: 0 !important; box-shadow: none !important; color: var(--r-text) !important; }
html[data-theme] #commandCenterShell .module-canvas-toolbar :is(strong, span, small) { color: inherit !important; }
html[data-theme] #commandCenterShell .module-canvas-toolbar small { color: var(--r-muted) !important; }
/* Work status / priority / progress badges → pills. */
html[data-theme] #commandCenterShell #moduleStage :is(.work-status, .work-progress-count, .work-project-row em, [class*="work-priority"]) {
  display: inline-flex !important;
  align-items: center !important;
  padding: 1px 8px !important;
  border-radius: 999px !important;
  border: 1px solid var(--r-line) !important;
  background: var(--r-surface-2) !important;
  background-image: none !important;
  color: var(--r-muted) !important;
  font-style: normal !important;
  font-size: .74rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
/* Metric strips that used light chips: tiles on surface-2. */
html[data-theme] #commandCenterShell #moduleStage :is(.work-overview-metrics > article, .asset-draft-totals > span, .asset-human-ledger) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius-md) !important;
  box-shadow: none !important;
  color: var(--r-muted) !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(.work-overview-metrics > article, .asset-human-ledger) strong { color: var(--r-text) !important; font-variant-numeric: tabular-nums; }
html[data-theme] #commandCenterShell #moduleStage :is(.work-overview-summary, .work-overview-brief, .work-column__scroll, .asset-balance-kpis, .asset-draft-totals, .finance-overview-filter-bar, .finance-overview-range-control, .finance-calendar-toolbar, .finance-ledger-v2-host, .calendar, .fc-daygrid-day-frame) {
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(.work-overview-summary, .work-column__scroll, .asset-balance-kpis, .asset-draft-totals, .finance-ledger-v2-host, .fc-daygrid-day-frame) { background-color: transparent !important; }
html[data-theme] #commandCenterShell #moduleStage summary { color: var(--r-text) !important; }
html[data-theme] #commandCenterShell #moduleStage summary span { color: var(--r-muted) !important; }
/* Row-style buttons (category rows, project rows): flat rows, readable ink. */
html[data-theme] #commandCenterShell #moduleStage .finance-trend-category,
html[data-theme] #commandCenterShell #moduleStage .finance-trend-category *,
html[data-theme] #commandCenterShell #moduleStage .finance-trend-category.active { color: var(--r-text) !important; }
html[data-theme] #commandCenterShell #moduleStage .finance-trend-category small { color: var(--r-muted) !important; }
html[data-theme] #commandCenterShell #moduleStage button:is([class*="-row"], [class*="__row"]) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius-sm) !important;
  box-shadow: none !important;
  color: var(--r-text) !important;
}
html[data-theme] #commandCenterShell #moduleStage button:is([class*="-row"], [class*="__row"]):hover { background: var(--r-surface-2) !important; }
html[data-theme] #commandCenterShell #moduleStage button:is([class*="-row"], [class*="__row"]):is(.is-active, [aria-pressed="true"], [aria-current]) {
  background: var(--r-accent-soft) !important;
  box-shadow: inset 2px 0 0 var(--r-accent) !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(.work-overview-brief dl > div, dl > div) {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--r-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell #moduleStage dt { color: var(--r-faint) !important; }
html[data-theme] #commandCenterShell #moduleStage :is(.section-kicker, [class*="__eyebrow"]) { color: var(--r-muted) !important; }
/* Third-party grids (Tabulator ledger, FullCalendar header) follow the theme. */
html[data-theme] #commandCenterShell #moduleStage .tabulator :is(.tabulator-header, .tabulator-col, .tabulator-col-content, .tabulator-col-title-holder, .tabulator-col-title) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  color: var(--r-muted) !important;
  border-color: var(--r-line) !important;
  font-weight: 600 !important;
}
html[data-theme] #commandCenterShell #moduleStage .tabulator :is(.tabulator-tableholder, .tabulator-table) { background: var(--r-surface) !important; }
html[data-theme] #commandCenterShell #moduleStage .tabulator .tabulator-row { background: var(--r-surface) !important; color: var(--r-text) !important; border-color: var(--r-line) !important; }
html[data-theme] #commandCenterShell #moduleStage .tabulator .tabulator-row:hover { background: var(--r-surface-2) !important; }
html[data-theme] #commandCenterShell #moduleStage .tabulator .tabulator-cell { border-color: var(--r-line) !important; }
html[data-theme] #commandCenterShell .fc :is(th, .fc-col-header, .fc-col-header-cell) { background: var(--r-surface-2) !important; }
html[data-theme] #commandCenterShell .fc :is(.fc-scrollgrid, .fc-daygrid-body, .fc-scrollgrid-section > td) { background: transparent !important; }
html[data-theme] #commandCenterShell #moduleStage :is(.finance-calendar-scroll, .finance-calendar-v2) { background: transparent !important; background-image: none !important; }
/* Avatars, state chips, counters: accent tints instead of legacy dark teal. */
html[data-theme] #commandCenterShell #moduleStage :is(.people-avatar, [class*="avatar"]:not(img)) {
  background: var(--r-accent-soft) !important;
  background-image: none !important;
  color: var(--r-accent-strong) !important;
  border: 1px solid var(--r-line) !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(.library-state-chip, [class*="-count"]:is(strong, span, b)) {
  display: inline-flex !important;
  align-items: center !important;
  padding: 1px 8px !important;
  border-radius: 999px !important;
  border: 1px solid var(--r-line) !important;
  background: var(--r-surface-2) !important;
  background-image: none !important;
  color: var(--r-muted) !important;
  font-size: .74rem !important;
  font-weight: 600 !important;
}
html[data-theme] #commandCenterShell #moduleStage .library-state-chip.is-safe { background: var(--r-green-soft) !important; color: var(--r-green) !important; }
html[data-theme] #commandCenterShell #moduleStage :is(.reminder-v2-section-title, [class*="section-title"]) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--r-text) !important;
}
/* Readiness rings / donuts: inner label sits on the card surface. */
html[data-theme] #commandCenterShell #moduleStage :is(.library-readiness-ring, .library-attachment-donut, .ring) > span {
  background: var(--r-surface) !important;
  background-image: none !important;
  color: var(--r-text) !important;
}
html[data-theme] #commandCenterShell #moduleStage :is(.library-readiness-ring, .library-attachment-donut, .ring) > span :is(small, span) { color: var(--r-muted) !important; }
/* Overview focus "nothing to do" line */
html[data-theme] #commandCenterShell #moduleStage .overview-focus-panel span:has(> strong) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  color: var(--r-text) !important;
}
/* Knowledge command bar and its icon tiles */
html[data-theme] #commandCenterShell #moduleStage .knowledge-v2__command-bar {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell #moduleStage .knowledge-v2__command-bar svg { background: transparent !important; color: var(--r-accent-strong) !important; }
/* Sidebar pin button */
html[data-theme] #commandCenterShell .pin-button {
  background: transparent !important;
  background-image: none !important;
  border: 1px dashed var(--r-line-strong) !important;
  border-radius: var(--r-radius) !important;
  color: var(--r-muted) !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell .pin-button:hover { color: var(--r-text) !important; border-color: var(--r-accent) !important; }
/* Login screen */
html[data-theme] body.auth-required #commandCenterShell .login-required {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 40%), var(--r-surface) !important;
  backdrop-filter: saturate(160%) blur(28px);
  -webkit-backdrop-filter: saturate(160%) blur(28px);
  border: 1px solid var(--r-line-strong) !important;
  border-radius: 22px !important;
  box-shadow: var(--r-shadow-pop), 0 0 0 1px rgba(143, 156, 255, .06), 0 40px 120px -40px rgba(109, 78, 240, .45) !important;
}
html[data-theme] body.auth-required #commandCenterShell .login-required h2 {
  font-size: 1.9rem !important;
  letter-spacing: -.03em !important;
  background-image: linear-gradient(100deg, var(--r-text) 20%, var(--r-accent-strong) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
html[data-theme] body.auth-required #commandCenterShell .auth-intro {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-right: 1px solid var(--r-line) !important;
  box-shadow: none !important;
}
html[data-theme] body.auth-required #commandCenterShell .auth-mode-switch {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius) !important;
  padding: 3px !important;
  box-shadow: none !important;
}
html[data-theme] body.auth-required #commandCenterShell .auth-mode-switch [role="tab"] {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--r-muted) !important;
  box-shadow: none !important;
  font-weight: 550 !important;
}
html[data-theme] body.auth-required #commandCenterShell .auth-mode-switch [role="tab"][aria-selected="true"] {
  background: var(--r-elev) !important;
  color: var(--r-text) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18) !important;
}
/* Status text in pane heads (e.g. "等待查询") */
html[data-theme] #commandCenterShell #moduleStage [class*="pane-head"] > span {
  background: var(--r-surface-2) !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 999px !important;
  padding: 1px 10px !important;
  color: var(--r-muted) !important;
  font-size: .75rem !important;
}
html[data-theme] #commandCenterShell #moduleStage .ai-workbench__attachment-button,
html[data-theme] #commandCenterShell #moduleStage .ai-workbench__attachment-button * { color: var(--r-text) !important; }
html[data-theme] #commandCenterShell .fc :is(.fc-daygrid-day-number, .fc-col-header-cell-cushion) { color: var(--r-muted) !important; background: transparent !important; }
html[data-theme] #commandCenterShell .fc .fc-day-today .fc-daygrid-day-number { background: var(--r-accent-grad) !important; border-color: var(--r-accent) !important; color: var(--r-accent-contrast) !important; box-shadow: none !important; font-weight: 700 !important; }
html[data-theme] #commandCenterShell .fc :is(.fc-scrollgrid, td, th) { border-color: var(--r-line) !important; }
html[data-theme] #commandCenterShell .fc .fc-day-today { background: var(--r-accent-soft) !important; }

/* ---------- Module tabs: segmented underline ---------- */
html[data-theme] #commandCenterShell .module-tabs-shell {
  background: var(--r-surface) !important;
  background-image: none !important;
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border: 1px solid var(--r-line) !important;
  border-radius: 999px !important;
  padding: 4px !important;
  box-shadow: var(--r-highlight) !important;
}
html[data-theme] #commandCenterShell #moduleTabs :is(.tab, button, a) {
  font-size: .86rem !important;
  font-weight: 500 !important;
  color: var(--r-muted) !important;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background-color .15s var(--r-ease), color .15s var(--r-ease);
}
html[data-theme] #commandCenterShell #moduleTabs :is(.tab, button, a):hover { color: var(--r-text) !important; background: var(--r-surface-2) !important; }
html[data-theme] #commandCenterShell #moduleTabs :is(.tab, button, a):is(.active, [aria-selected="true"]) {
  color: var(--r-text) !important;
  background: linear-gradient(135deg, rgba(99, 102, 241, .24), rgba(124, 58, 237, .16)) !important;
  border-color: color-mix(in srgb, var(--r-accent) 40%, transparent) !important;
  box-shadow: var(--r-highlight), 0 4px 16px -8px rgba(109, 78, 240, .8) !important;
}
html[data-theme] #commandCenterShell .module-tabs-nav {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--r-faint) !important;
}

/* ---------- Surfaces: panels & cards ---------- */
html[data-theme] #commandCenterShell :is(.overview-canvas-shell, .module-stage, .workspace, .command-panel) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell :is(
  .panel, .work-column, .overview-signal-card, .overview-focus-panel, .overview-change-panel,
  .overview-action-panel, .overview-canvas-widget > .panel
) {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 38%), var(--r-surface) !important;
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border: 1px solid var(--r-line) !important;
  border-radius: 16px !important;
  box-shadow: var(--r-shadow) !important;
  color: var(--r-text) !important;
  transition: border-color .2s var(--r-ease), box-shadow .2s var(--r-ease);
}
html[data-theme] #commandCenterShell :is(.panel, .work-column):hover { border-color: var(--r-line-strong) !important; }
/* Nested panels should not stack borders/shadows/blur. */
html[data-theme] #commandCenterShell .panel .panel {
  background: var(--r-surface-2) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none !important;
  border-radius: var(--r-radius-md) !important;
}
html[data-theme] #commandCenterShell .overview-canvas-toolbar {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell :is(.overview-canvas-kicker, .eyebrow, [class*="eyebrow"], [class*="kicker"]) {
  font-size: .72rem !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
  color: var(--r-faint) !important;
  background: none !important;
  border: 0 !important;
}

/* ---------- KPI tiles ---------- */
html[data-theme] #commandCenterShell :is(.kpis, .stacked-kpis, .compact-kpis) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell .kpi {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(143, 156, 255, .09), rgba(143, 156, 255, 0) 55%), var(--r-surface-2) !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 12px !important;
  box-shadow: var(--r-highlight) !important;
  color: var(--r-text) !important;
}
html[data-theme] #commandCenterShell .kpi * { color: inherit; text-shadow: none !important; }
html[data-theme] #commandCenterShell .kpi :is(span, small, label, p) { color: var(--r-muted) !important; }
html[data-theme] #commandCenterShell .kpi :is(strong, b, .value, [class*="value"]) {
  color: var(--r-text) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700 !important;
  letter-spacing: -.02em !important;
  background-image: none !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme] #commandCenterShell :is(.green, .tone-green, [data-tone="green"]) :is(strong, b) { color: var(--r-green) !important; }
html[data-theme] #commandCenterShell :is(.red, .tone-red, [data-tone="red"]) :is(strong, b) { color: var(--r-red) !important; }
html[data-theme] #commandCenterShell :is(.amber, .tone-amber, [data-tone="amber"]) :is(strong, b) { color: var(--r-amber) !important; }
html[data-theme] #commandCenterShell :is(.cyan, .tone-cyan, [data-tone="cyan"]) :is(strong, b) { color: var(--r-accent-strong) !important; }

/* ---------- List rows ---------- */
html[data-theme] #commandCenterShell .row {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid var(--r-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell :is(.list, .workbench-actions, .overview-section-head, .library-section-head) {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell .list > .row:last-child { border-bottom: 0 !important; }
html[data-theme] #commandCenterShell .row:hover { background: var(--r-surface-2) !important; }
html[data-theme] #commandCenterShell .row.muted-row { color: var(--r-muted) !important; }
html[data-theme] #commandCenterShell .row.muted-row::before { content: none !important; }

/* Progress / bar tracks */
html[data-theme] #commandCenterShell .bar-track { background: var(--r-surface-2) !important; border: 0 !important; border-radius: 999px !important; box-shadow: none !important; }
html[data-theme] #commandCenterShell .bar-track > * { background: var(--r-accent-grad) !important; border-radius: 999px !important; box-shadow: 0 0 12px -2px rgba(109, 78, 240, .6) !important; }

/* ---------- Buttons ---------- */
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) :is(.mini-action, .button, .status-button, .secondary) {
  font-size: .82rem !important;
  font-weight: 550 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--r-text) !important;
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line-strong) !important;
  border-radius: var(--r-radius) !important;
  box-shadow: none !important;
  transition: background-color .15s var(--r-ease), border-color .15s var(--r-ease), color .15s var(--r-ease);
}
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) :is(.mini-action, .button, .status-button, .secondary):hover:not(:disabled) {
  background: var(--r-elev) !important;
  border-color: color-mix(in srgb, var(--r-accent) 45%, var(--r-line-strong)) !important;
}
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(.button.primary, button.primary, .primary-action, .ai-fab, .ai-command-button, button[type="submit"]:not(.mini-action):not(.secondary):not(.button):not(.danger):not([class*="-row"])) {
  color: #ffffff !important;
  background: var(--r-accent-grad) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: var(--r-radius) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--r-glow) !important;
  transition: filter .15s var(--r-ease), transform .15s var(--r-ease), box-shadow .15s var(--r-ease);
}
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(.button.primary, button.primary, .primary-action, .ai-fab, .ai-command-button):hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
html[data-theme] :is(#commandCenterShell, #aiPanel) :is(.danger, .button.danger, .mini-action.danger) {
  color: var(--r-red) !important;
  background: var(--r-red-soft) !important;
  border-color: color-mix(in srgb, var(--r-red) 30%, transparent) !important;
}
html[data-theme] :is(#commandCenterShell, #aiPanel) :is(button, .mini-action, .button):disabled,
html[data-theme] :is(#commandCenterShell, #aiPanel) .mini-action.disabled { opacity: .5 !important; cursor: not-allowed !important; }
html[data-theme] #commandCenterShell .owner-global-search-trigger {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: var(--r-radius) !important;
  color: var(--r-muted) !important;
  box-shadow: none !important;
}

/* ---------- Tags / chips ---------- */
html[data-theme] #commandCenterShell :is(.tag, .chip, .badge, .pill) {
  background: var(--r-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  color: var(--r-muted) !important;
  font-weight: 550 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
html[data-theme] #commandCenterShell :is(.tag, .badge, .chip).green { color: var(--r-green) !important; background: var(--r-green-soft) !important; border-color: transparent !important; }
html[data-theme] #commandCenterShell :is(.tag, .badge, .chip).red { color: var(--r-red) !important; background: var(--r-red-soft) !important; border-color: transparent !important; }
html[data-theme] #commandCenterShell :is(.tag, .badge, .chip).amber { color: var(--r-amber) !important; background: var(--r-amber-soft) !important; border-color: transparent !important; }
html[data-theme] #commandCenterShell :is(.tag, .badge, .chip).cyan { color: var(--r-accent-strong) !important; background: var(--r-accent-soft) !important; border-color: transparent !important; }

/* ---------- Form controls ---------- */
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), textarea) {
  background: var(--r-input) !important;
  background-image: none !important;
}
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea) {
  color: var(--r-text) !important;
  border: 1px solid var(--r-line-strong) !important;
  border-radius: var(--r-radius) !important;
  box-shadow: none !important;
  transition: border-color .15s var(--r-ease), box-shadow .15s var(--r-ease);
}
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) select { background-color: var(--r-input) !important; }
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(input, textarea)::placeholder { color: var(--r-faint) !important; opacity: 1; }
html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(input, select, textarea):focus {
  outline: none !important;
  border-color: var(--r-accent) !important;
  box-shadow: 0 0 0 3px var(--r-ring) !important;
}
html[data-theme] :is(#commandCenterShell, #aiPanel) :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--r-accent); }

html[data-theme] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore) :is(a, button, [role="tab"], summary, [tabindex]):focus-visible {
  outline: 2px solid var(--r-accent) !important;
  outline-offset: 2px !important;
}

/* ---------- Floating layers ---------- */
html[data-theme] :is(#aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) {
  background-color: var(--r-elev) !important;
  background-image: linear-gradient(180deg, rgba(143, 156, 255, .07), transparent 30%) !important;
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  color: var(--r-text) !important;
  border-color: var(--r-line-strong) !important;
  box-shadow: var(--r-shadow-pop) !important;
}
html[data-theme] #ownerGlobalSearch::backdrop { background: rgba(5, 7, 12, .55); backdrop-filter: blur(4px); }
html[data-theme] #commandCenterShell .action-feedback:not(:empty) {
  background: var(--r-elev) !important;
  background-image: none !important;
  color: var(--r-text) !important;
  border: 1px solid var(--r-line-strong) !important;
  border-radius: var(--r-radius-md) !important;
  box-shadow: var(--r-shadow-pop) !important;
}

/* Mobile bottom navigation */
html[data-theme] #commandCenterShell .cc-mobile-nav {
  background: color-mix(in srgb, var(--r-surface) 92%, transparent) !important;
  background-image: none !important;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border: 0 !important;
  border-top: 1px solid var(--r-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html[data-theme] #commandCenterShell .cc-mobile-nav__item { color: var(--r-faint) !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
html[data-theme] #commandCenterShell .cc-mobile-nav__item.active { color: var(--r-accent) !important; }

/* =====================================================================
 * Display face (self-hosted subset of Noto Serif SC 600, OFL).
 * ===================================================================== */
/* 700KB 的标题字体在页面完全加载后才由 index.html 注入 @font-face，避免拖慢首屏。 */
html[data-theme] {
  --r-display: "Hub Display", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
}

/* Legacy layers forced -webkit-text-fill-color (pale cream) on many nodes, which
 * overrides `color` and made text unreadable. Paint every node with its colour;
 * the two deliberate gradient titles re-declare their fill with higher specificity. */
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal),
html[data-theme] :where(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) * {
  -webkit-text-fill-color: currentColor !important;
}

/* Icon tiles (both themes; tone colours per theme below). */
html[data-theme] .ds-icon-tile {
  display: inline-grid !important;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ds-tone-bg, var(--r-surface-2));
  color: var(--ds-tone-ink, var(--r-accent)) !important;
  box-shadow: inset 0 0 0 1px var(--ds-tone-ring, var(--r-line));
  vertical-align: middle;
}
html[data-theme] .ds-icon-tile svg { width: 16px; height: 16px; stroke: currentColor !important; }
html[data-theme] #moduleStage :is(h2, h3).ds-has-icon { display: flex !important; align-items: center !important; gap: 10px !important; }
html[data-theme] .ds-page-head { display: grid !important; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
html[data-theme] .ds-page-head > :not(.ds-page-icon):not(#pageTitle) { grid-column: 1 / -1; }
html[data-theme] .ds-page-icon { width: 44px !important; height: 44px !important; border-radius: 13px !important; }
html[data-theme] .ds-page-icon svg { width: 22px !important; height: 22px !important; }
html[data-theme="night"] { --ds-violet: #b7c0ff; --ds-green: #6ee7b7; --ds-teal: #5eead4; --ds-sky: #7dd3fc; --ds-amber: #fcd34d; --ds-rose: #fda4af; --ds-gray: #cbd5e1; }
html[data-theme="night"] .ds-icon-tile { --ds-tone-bg: color-mix(in srgb, var(--ds-tone) 14%, transparent); --ds-tone-ink: var(--ds-tone); --ds-tone-ring: color-mix(in srgb, var(--ds-tone) 30%, transparent); }
html[data-theme] .ds-tone-violet { --ds-tone: var(--ds-violet); }
html[data-theme] .ds-tone-green { --ds-tone: var(--ds-teal, var(--ds-green)); }
html[data-theme] .ds-tone-sky { --ds-tone: var(--ds-sky); }
html[data-theme] .ds-tone-amber { --ds-tone: var(--ds-amber); }
html[data-theme] .ds-tone-rose { --ds-tone: var(--ds-rose); }
html[data-theme] .ds-tone-gray { --ds-tone: var(--ds-gray); }
/* Sidebar icons take their module tone. */
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone="violet"] { --ds-tone: var(--ds-violet); }
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone="green"] { --ds-tone: var(--ds-teal, var(--ds-green)); }
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone="sky"] { --ds-tone: var(--ds-sky); }
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone="amber"] { --ds-tone: var(--ds-amber); }
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone="rose"] { --ds-tone: var(--ds-rose); }
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone="gray"] { --ds-tone: var(--ds-gray); }
html[data-theme] #primaryNav .cc-shell-nav__item[data-ds-tone] .cc-shell-nav__icon { color: var(--ds-tone) !important; opacity: 1 !important; }

/* Display face on titles and large numerals (both themes). */
html[data-theme] #commandCenterShell :is(#pageTitle, .brand h1, #moduleStage h2, #moduleStage h3, .login-required h2),
html[data-theme] #commandCenterShell .kpi :is(strong, b, .value, [class*="value"]) {
  font-family: var(--r-display) !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
}

/* =====================================================================
 * Day theme — "Heritage luxury" (default theme).
 * Ivory paper with a champagne glow, gold silk lines and a faint lattice;
 * cards framed by a double gold hairline with engraved corner flourishes;
 * serif display titles with a gold rule. Gold is ornament only: all text
 * is deep ink / emerald / bronze with AA contrast on ivory.
 * ===================================================================== */
html[data-theme="day"] {
  --r-bg: #edf3f0;
  --r-surface: #fffdf8;
  --r-surface-2: #f5f8f4;
  --r-elev: #fffdf8;
  --r-input: #fffefb;
  --r-line: rgba(122, 92, 44, .16);
  --r-line-strong: rgba(122, 92, 44, .28);
  --r-gold: #c29a52;
  --r-gold-soft: rgba(194, 154, 82, .42);
  --r-text: #2a2419;
  --r-muted: #5a5043;
  --r-faint: #6b5f4d;
  --r-bronze: #7a5520;
  --r-accent: #17707a;
  --r-accent-strong: #115a63;
  --r-accent-contrast: #fffdf8;
  --r-accent-soft: #e2f0f0;
  --r-ring: rgba(23, 112, 122, .25);
  --r-accent-grad: linear-gradient(135deg, #17707a, #115a63);
  --r-glow: 0 1px 2px rgba(17, 90, 99, .25), 0 6px 16px -6px rgba(17, 90, 99, .45);
  --r-highlight: none;
  --r-green: #1f6b3f;
  --r-red: #a8322b;
  --r-amber: #8a5300;
  --r-green-soft: #e8f1e7;
  --r-red-soft: #f8e7e2;
  --r-amber-soft: #f7ecd6;
  --ds-violet: #6b4aa0; --ds-green: #1d6b52; --ds-teal: #17707a; --ds-sky: #245f8f; --ds-amber: #8a5a12; --ds-rose: #a2394f; --ds-gray: #5a5043;
  --r-shadow: 0 1px 2px rgba(90, 64, 24, .06), 0 10px 28px -14px rgba(90, 64, 24, .28);
  --r-shadow-hover: 0 2px 4px rgba(90, 64, 24, .08), 0 18px 40px -16px rgba(90, 64, 24, .34);
  --r-shadow-pop: 0 20px 48px -12px rgba(90, 64, 24, .32);
  --r-backdrop:
    url("/static/command_center/assets/ornament-lattice.svg") 0 0 / 96px 96px repeat,
    url("/static/command_center/assets/day-celadon-r5.webp?v=20261015") center / cover no-repeat;
  color-scheme: light;
}
html[data-theme="day"] .ds-icon-tile {
  --ds-tone-bg: radial-gradient(circle at 30% 25%, #fffdf8, color-mix(in srgb, var(--ds-tone) 10%, #faf5ea));
  --ds-tone-ink: var(--ds-tone);
  background: var(--ds-tone-bg) !important;
  box-shadow: inset 0 0 0 1px var(--r-gold-soft), 0 0 0 3px #fffdf8, 0 0 0 4px rgba(194, 154, 82, .22), 0 3px 8px -3px rgba(90, 64, 24, .3) !important;
  border-radius: 999px !important;
}
html[data-theme="day"] body { line-height: 1.6; }

/* Sidebar: ivory vellum with a double gold rule on its edge. */
html[data-theme="day"] #commandCenterShell > .sidebar {
  background:
    url("/static/command_center/assets/ornament-corner-tl.svg") 10px 10px / 46px 46px no-repeat,
    url("/static/command_center/assets/ornament-corner-bl.svg") 10px calc(100% - 10px) / 46px 46px no-repeat,
    linear-gradient(180deg, rgba(255, 253, 248, .9), rgba(250, 244, 231, .86)) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 0 !important;
  box-shadow: inset -1px 0 0 var(--r-gold-soft), inset -4px 0 0 rgba(255, 253, 248, .9), inset -5px 0 0 rgba(194, 154, 82, .22), 8px 0 30px -18px rgba(90, 64, 24, .3) !important;
}
html[data-theme="day"] #commandCenterShell .brand .mark {
  background: radial-gradient(circle at 30% 25%, #25909a, #0f4f57) !important;
  color: #fff8e6 !important;
  border-radius: 999px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .55), 0 0 0 2px #fffdf8, 0 0 0 3px var(--r-gold), 0 6px 14px -6px rgba(15, 79, 87, .6) !important;
  font-family: var(--r-display) !important;
}
html[data-theme="day"] .brand .mark::after { background: var(--r-gold) !important; box-shadow: 0 0 0 1.5px #fffdf8 !important; }
html[data-theme="day"] #commandCenterShell .brand h1 { color: var(--r-text) !important; font-size: 1.02rem !important; }
html[data-theme="day"] #commandCenterShell .brand small { color: var(--r-bronze) !important; letter-spacing: .12em !important; }
html[data-theme="day"] #commandCenterShell .sidebar :is(.nav-group-title, [class*="group-title"], [class*="section-label"], h2, h4) { color: var(--r-bronze) !important; letter-spacing: .14em !important; font-weight: 600 !important; }
html[data-theme="day"] #commandCenterShell .cc-shell-nav__item,
html[data-theme="day"] #commandCenterShell #primaryNav :is(a, button) { color: var(--r-muted) !important; border-radius: 10px !important; }
html[data-theme="day"] #commandCenterShell .cc-shell-nav__item:hover,
html[data-theme="day"] #commandCenterShell #primaryNav a:hover { background: rgba(194, 154, 82, .1) !important; color: var(--r-text) !important; }
html[data-theme="day"] #commandCenterShell .cc-shell-nav__item.active,
html[data-theme="day"] #commandCenterShell #primaryNav a.active,
html[data-theme="day"] #commandCenterShell #primaryNav [aria-current="page"] {
  background: linear-gradient(90deg, rgba(194, 154, 82, .16), rgba(255, 253, 248, .95) 60%) !important;
  color: var(--r-text) !important;
  border: 1px solid var(--r-gold-soft) !important;
  box-shadow: inset 3px 0 0 var(--r-gold), 0 4px 12px -8px rgba(90, 64, 24, .4) !important;
  font-weight: 650 !important;
}
/* Pinned shortcuts at the bottom of the sidebar. */
html[data-theme="day"] #commandCenterShell .sidebar :is(.pinned-list, [class*="pinned"]) :is(a, button, span) { color: var(--r-muted) !important; }
html[data-theme="day"] #commandCenterShell .pin-button { color: var(--r-bronze) !important; border-color: var(--r-gold-soft) !important; }

/* Page header: serif title with a centred-left gold flourish. */
html[data-theme="day"] #commandCenterShell .topbar #pageTitle {
  font-size: 2.05rem !important;
  letter-spacing: .02em !important;
  background-image: none !important;
  color: var(--r-text) !important;
  -webkit-text-fill-color: var(--r-text) !important;
  padding-bottom: 14px !important;
  background: url("/static/command_center/assets/ornament-rule-left.svg") left bottom / 220px 12px no-repeat !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}
html[data-theme="day"] #commandCenterShell .topbar #pageSub { color: var(--r-muted) !important; }

/* Module tabs: ivory rail with gold hairline; active tab is an engraved plate. */
html[data-theme="day"] #commandCenterShell .module-tabs-shell {
  background: rgba(255, 253, 248, .75) !important;
  border: 1px solid var(--r-gold-soft) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 0 0 3px rgba(255, 253, 248, .9), inset 0 0 0 4px rgba(194, 154, 82, .18) !important;
  padding: 6px !important;
}
html[data-theme="day"] #commandCenterShell #moduleTabs :is(.tab, button, a) { border-radius: 10px !important; color: var(--r-muted) !important; white-space: nowrap !important; }
html[data-theme="day"] #commandCenterShell #moduleTabs :is(.tab, button, a):hover { background: rgba(194, 154, 82, .1) !important; color: var(--r-text) !important; }
html[data-theme="day"] #commandCenterShell #moduleTabs :is(.tab, button, a):is(.active, [aria-selected="true"]) {
  background: linear-gradient(180deg, #1b7e88, #115a63) !important;
  color: #fffaf0 !important;
  border: 1px solid #0e4c54 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .35), 0 4px 12px -6px rgba(15, 79, 87, .6) !important;
  font-weight: 650 !important;
}
/* Cards: ivory plate, double gold hairline, engraved corner flourishes. */
html[data-theme="day"] #moduleStage :is(.grid, .overview-grid) { gap: 22px !important; }
html[data-theme="day"] #commandCenterShell :is(
  .panel, .work-column, .overview-signal-card, .overview-focus-panel, .overview-change-panel,
  .overview-action-panel, .overview-canvas-widget > .panel
) {
  background:
    url("/static/command_center/assets/ornament-corner-tl.svg") 7px 7px / 34px 34px no-repeat,
    url("/static/command_center/assets/ornament-corner-tr.svg") calc(100% - 7px) 7px / 34px 34px no-repeat,
    url("/static/command_center/assets/ornament-corner-bl.svg") 7px calc(100% - 7px) / 34px 34px no-repeat,
    url("/static/command_center/assets/ornament-corner-br.svg") calc(100% - 7px) calc(100% - 7px) / 34px 34px no-repeat,
    linear-gradient(180deg, #fffefb 0%, #f7faf6 100%) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid var(--r-gold-soft) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 0 0 4px #fffdf8, inset 0 0 0 5px rgba(194, 154, 82, .2), var(--r-shadow) !important;
  transition: box-shadow .2s var(--r-ease), transform .2s var(--r-ease);
}
html[data-theme="day"] #commandCenterShell :is(.panel, .work-column):hover {
  box-shadow: inset 0 0 0 4px #fffdf8, inset 0 0 0 5px rgba(194, 154, 82, .32), var(--r-shadow-hover) !important;
}
html[data-theme="day"] #moduleStage .panel:not(.overview-command-deck) { padding: 22px 24px 20px !important; }
html[data-theme="day"] #commandCenterShell .panel .panel {
  background: #fffdf8 !important;
  border: 1px solid var(--r-line) !important;
  box-shadow: none !important;
}
/* Card titles: serif ink with a gold rule beneath. */
html[data-theme="day"] #moduleStage .panel > h3,
html[data-theme="day"] #moduleStage :is(h2, h3).ds-has-icon,
html[data-theme="day"] #moduleStage .command-console-head h3 {
  font-size: 1.1rem !important;
  color: var(--r-text) !important;
  padding: 0 0 14px !important;
  margin: 0 0 8px !important;
  border: 0 !important;
  background: url("/static/command_center/assets/ornament-rule-left.svg") left bottom / 180px 10px no-repeat !important;
}
html[data-theme="day"] #commandCenterShell :is(.overview-canvas-toolbar, .command-console-head, .overview-signal-card, h3)::before { content: none !important; display: none !important; }
html[data-theme="day"] #moduleStage .command-console-head { border: 0 !important; border-left: 0 !important; box-shadow: none !important; background: transparent !important; }
html[data-theme="day"] #commandCenterShell :is(.overview-canvas-kicker, .eyebrow, [class*="eyebrow"], [class*="kicker"], .section-kicker) {
  color: var(--r-bronze) !important;
  font-size: .72rem !important;
  letter-spacing: .16em !important;
  font-weight: 650 !important;
}
html[data-theme="day"] #commandCenterShell .module-canvas-toolbar strong { font-family: var(--r-display) !important; font-weight: 600 !important; }

/* KPI tiles: parchment plates with a gold keyline and serif numerals. */
html[data-theme="day"] #commandCenterShell .kpi {
  background: linear-gradient(180deg, #fffaf0, #f8f0df) !important;
  border: 1px solid rgba(194, 154, 82, .34) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 #fffdf8, 0 2px 6px -3px rgba(90, 64, 24, .2) !important;
  padding: 12px 14px !important;
}
html[data-theme="day"] #commandCenterShell .kpis > .kpi:nth-child(4n + 2) { background: linear-gradient(180deg, #f8fbf6, #ebf2e8) !important; }
html[data-theme="day"] #commandCenterShell .kpis > .kpi:nth-child(4n + 3) { background: linear-gradient(180deg, #f8fafc, #eaf0f5) !important; }
html[data-theme="day"] #commandCenterShell .kpis > .kpi:nth-child(4n + 4) { background: linear-gradient(180deg, #fcf6f4, #f5e8e4) !important; }
html[data-theme="day"] #commandCenterShell .kpi :is(span, small, label, p) { color: var(--r-muted) !important; font-size: .78rem !important; }
html[data-theme="day"] #commandCenterShell .kpi :is(strong, b, .value, [class*="value"]) {
  font-size: 1.4rem !important;
  line-height: 1.25 !important;
  color: var(--r-text) !important;
}

/* Rows & bars. */
html[data-theme="day"] #moduleStage .overview-expense-category-row { background: transparent !important; }
html[data-theme="day"] #commandCenterShell .row { border-bottom: 1px solid transparent !important; border-image: linear-gradient(90deg, transparent, rgba(194, 154, 82, .35) 12%, rgba(194, 154, 82, .35) 88%, transparent) 1 !important; padding-block: 10px !important; }
html[data-theme="day"] #commandCenterShell .list > .row:last-child { border-image: none !important; }
html[data-theme="day"] #commandCenterShell .row:hover { background: rgba(194, 154, 82, .07) !important; }
html[data-theme="day"] #commandCenterShell .bar-track { background: rgba(122, 92, 44, .1) !important; }
html[data-theme="day"] #commandCenterShell .bar-track > * { background: linear-gradient(90deg, #17707a, #3a9ea3) !important; box-shadow: none !important; }
html[data-theme="day"] #moduleStage :is(.workbench-actions) { border: 0 !important; background: transparent !important; box-shadow: none !important; }
html[data-theme="day"] #moduleStage :is(.finance-day-editor) { border-left: 0 !important; }
html[data-theme="day"] #moduleStage .finance-calendar-detail-records__list { border-color: var(--r-line) !important; }

/* Buttons: ivory with gold keyline and emerald ink; primary is an emerald plate. */
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) :is(.mini-action, .button, .status-button, .secondary) {
  background: linear-gradient(180deg, #fffefa, #faf3e4) !important;
  color: var(--r-accent-strong) !important;
  border: 1px solid rgba(194, 154, 82, .55) !important;
  border-radius: 9px !important;
  box-shadow: inset 0 1px 0 #fffdf8, 0 1px 2px rgba(90, 64, 24, .1) !important;
  font-weight: 600 !important;
}
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) :is(.mini-action, .button, .status-button, .secondary) * { color: inherit !important; }
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) :is(.mini-action, .button, .status-button, .secondary):hover:not(:disabled) {
  background: #fffdf8 !important;
  border-color: var(--r-gold) !important;
  color: #0c4a52 !important;
}
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(.button.primary, button.primary, .primary-action, .ai-fab, .ai-command-button, button[type="submit"]:not(.mini-action):not(.secondary):not(.button):not(.danger):not([class*="-row"])) {
  background: linear-gradient(180deg, #1b7e88, #115a63) !important;
  color: #fffaf0 !important;
  border: 1px solid #0e4c54 !important;
  border-radius: 9px !important;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 190, .35), var(--r-glow) !important;
}
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(.button.primary, button.primary, .primary-action, .ai-fab, .ai-command-button):hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
html[data-theme="day"] :is(#commandCenterShell, #aiPanel) :is(.danger, .button.danger, .mini-action.danger) {
  background: #f8e7e2 !important;
  color: var(--r-red) !important;
  border-color: rgba(168, 50, 43, .35) !important;
}

/* Tags, counters, avatars: parchment chips in tone ink. */
html[data-theme="day"] #commandCenterShell :is(.tag, .chip, .badge, .pill) { background: #f5ecda !important; border: 1px solid rgba(194, 154, 82, .3) !important; color: var(--r-bronze) !important; }
html[data-theme="day"] #commandCenterShell :is(.tag, .badge, .chip).green { background: var(--r-green-soft) !important; color: var(--r-green) !important; border-color: transparent !important; }
html[data-theme="day"] #commandCenterShell :is(.tag, .badge, .chip).red { background: var(--r-red-soft) !important; color: var(--r-red) !important; border-color: transparent !important; }
html[data-theme="day"] #commandCenterShell :is(.tag, .badge, .chip).amber { background: var(--r-amber-soft) !important; color: var(--r-amber) !important; border-color: transparent !important; }
html[data-theme="day"] #commandCenterShell :is(.tag, .badge, .chip).cyan { background: var(--r-accent-soft) !important; color: var(--r-accent-strong) !important; border-color: transparent !important; }
html[data-theme="day"] #moduleStage :is(.work-status, .work-progress-count, .work-project-row em, [class*="work-priority"], .library-state-chip, [class*="-count"]:is(strong, span, b)) {
  background: #f5ecda !important;
  border-color: rgba(194, 154, 82, .3) !important;
  color: var(--r-bronze) !important;
}
html[data-theme="day"] #moduleStage :is(.people-avatar, [class*="avatar"]:not(img)) {
  background: radial-gradient(circle at 30% 25%, #fffdf8, #efe3c9) !important;
  color: var(--r-bronze) !important;
  border: 1px solid var(--r-gold-soft) !important;
  font-family: var(--r-display) !important;
}

/* Inner cards, panes, empty states. */
html[data-theme="day"] #moduleStage :is([class*="-card"], [class*="__card"]):not(.panel):not(button):not(a),
html[data-theme="day"] #moduleStage :is([class*="asset-capture-panel"], [class*="asset-ledger-section"], [class*="-pane"]:not(button), fieldset, .finance-chart-kpis) {
  background: #fffdf8 !important;
  border: 1px solid var(--r-line) !important;
  border-radius: 12px !important;
}
html[data-theme="day"] #moduleStage :is([class*="__empty"], [class*="-empty"]):not(button):not(p):not(span) {
  background: url("/static/command_center/assets/ornament-rule-center.svg") center 14px / 150px 10px no-repeat, #fcf7ec !important;
  border: 1px dashed rgba(194, 154, 82, .45) !important;
  padding-top: 32px !important;
}

/* Inputs. */
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea) {
  background-color: #fffefb !important;
  border: 1px solid rgba(122, 92, 44, .26) !important;
  border-radius: 9px !important;
  box-shadow: inset 0 1px 2px rgba(90, 64, 24, .06) !important;
}
html[data-theme="day"] :is(#commandCenterShell, #aiPanel, #ownerGlobalSearch, #qqActivationModal) :is(input, select, textarea):focus { border-color: var(--r-accent) !important; box-shadow: 0 0 0 3px var(--r-ring) !important; }
html[data-theme="day"] #commandCenterShell .owner-global-search-trigger { background: #fffdf8 !important; border-color: var(--r-gold-soft) !important; color: var(--r-muted) !important; }

/* Calendar & tables. */
html[data-theme="day"] #commandCenterShell .fc .fc-day-today { background: rgba(194, 154, 82, .1) !important; }
html[data-theme="day"] #commandCenterShell .fc .fc-day-today .fc-daygrid-day-number { background: #17707a !important; color: #fffaf0 !important; border-radius: 999px !important; box-shadow: 0 0 0 2px #fffdf8, 0 0 0 3px var(--r-gold) !important; }
html[data-theme="day"] #commandCenterShell .fc :is(th, .fc-col-header, .fc-col-header-cell) { background: #f8f0df !important; }
html[data-theme="day"] #commandCenterShell .fc .fc-col-header-cell-cushion { color: var(--r-bronze) !important; font-weight: 650 !important; }
html[data-theme="day"] #moduleStage .tabulator :is(.tabulator-header, .tabulator-col) { background: #f8f0df !important; color: var(--r-bronze) !important; }
html[data-theme="day"] #moduleStage .tabulator :is(.tabulator-tableholder, .tabulator-table, .tabulator-row) { background: #fffdf8 !important; }
html[data-theme="day"] #moduleStage .tabulator .tabulator-row:nth-child(even) { background: #fcf8ef !important; }
html[data-theme="day"] #moduleStage .tabulator .tabulator-row:hover { background: rgba(194, 154, 82, .1) !important; }

/* Floating layers. */
html[data-theme="day"] :is(#aiPanel, #ownerGlobalSearch, #mobileNavMore, #qqActivationModal) {
  background-color: #fffdf8 !important;
  background-image: url("/static/command_center/assets/ornament-corner-tl.svg"), url("/static/command_center/assets/ornament-corner-tr.svg") !important;
  background-position: 8px 8px, calc(100% - 8px) 8px !important;
  background-size: 34px 34px !important;
  background-repeat: no-repeat !important;
  border: 1px solid var(--r-gold-soft) !important;
}
html[data-theme="day"] #ownerGlobalSearch::backdrop { background: rgba(60, 44, 20, .28); }

/* Login: framed ivory plate with a centred flourish under the title. */
html[data-theme="day"] body.auth-required #commandCenterShell .login-required {
  background:
    url("/static/command_center/assets/ornament-corner-tl.svg") 12px 12px / 54px 54px no-repeat,
    url("/static/command_center/assets/ornament-corner-tr.svg") calc(100% - 12px) 12px / 54px 54px no-repeat,
    url("/static/command_center/assets/ornament-corner-bl.svg") 12px calc(100% - 12px) / 54px 54px no-repeat,
    url("/static/command_center/assets/ornament-corner-br.svg") calc(100% - 12px) calc(100% - 12px) / 54px 54px no-repeat,
    linear-gradient(180deg, rgba(255, 253, 248, .97), rgba(250, 243, 228, .95)) !important;
  border: 1px solid var(--r-gold-soft) !important;
  border-radius: 20px !important;
  box-shadow: inset 0 0 0 6px #fffdf8, inset 0 0 0 7px rgba(194, 154, 82, .28), var(--r-shadow-pop) !important;
}
html[data-theme="day"] body.auth-required #commandCenterShell .login-required h2 {
  background: url("/static/command_center/assets/ornament-rule-center.svg") left bottom / 200px 14px no-repeat !important;
  padding-bottom: 20px !important;
  color: var(--r-text) !important;
  -webkit-text-fill-color: var(--r-text) !important;
  font-size: 2rem !important;
  letter-spacing: .06em !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}
html[data-theme="day"] body.auth-required #commandCenterShell .auth-mode-switch { background: #f5ecda !important; border: 1px solid rgba(194, 154, 82, .3) !important; }
html[data-theme="day"] body.auth-required #commandCenterShell .auth-mode-switch [role="tab"][aria-selected="true"] { background: #fffdf8 !important; color: var(--r-accent-strong) !important; box-shadow: 0 1px 3px rgba(90, 64, 24, .18) !important; }

/* Mobile bottom nav. */
html[data-theme="day"] #commandCenterShell .cc-mobile-nav { background: rgba(255, 253, 248, .94) !important; border-top: 1px solid var(--r-gold-soft) !important; }
html[data-theme="day"] #commandCenterShell .cc-mobile-nav__item { color: var(--r-muted) !important; }
html[data-theme="day"] #commandCenterShell .cc-mobile-nav__item.active { color: var(--r-accent-strong) !important; }
html[data-theme="day"] * { scrollbar-color: rgba(194, 154, 82, .45) transparent; }

/* Legacy stretched PNG frames, crest watermarks and paper textures on module
 * sections (both themes): removed — the frame language below replaces them. */
html[data-theme] #moduleStage :is(.cc-import-v2, .cc-ai-surface, .knowledge-v2, [class*="knowledge-v2__"], .formal-workbench-intro, .cc-profile__structure, .cc-profile__archive-manager, .cc-profile__life-timeline, .work-overview-timeline, .library-intelligence, .ai-workbench__result, .asset-net-ring, header)::before,
html[data-theme] #moduleStage :is(.cc-import-v2, .cc-ai-surface, .knowledge-v2, [class*="knowledge-v2__"], .formal-workbench-intro, .cc-profile__structure, .cc-profile__archive-manager, .cc-profile__life-timeline, .work-overview-timeline, .library-intelligence, .ai-workbench__result, header)::after {
  background-image: none !important;
  border-image: none !important;
  content: none !important;
}
html[data-theme] #moduleStage :is(.cc-import-v2, .cc-ai-surface, .knowledge-v2, .knowledge-v2__metric, .cc-profile__structure, .cc-profile__archive-manager, .cc-profile__life-timeline, .work-overview-timeline, .library-intelligence, .ai-workbench__result, .asset-net-ring, .cc-profile header, header) {
  background-image: none !important;
  border-image: none !important;
}
/* Remaining legacy texture layers and framed pseudo-elements. */
html[data-theme] #moduleStage :is([class*="__empty"], [class*="-empty"], [class*="__metrics"], [class*="-metrics"], [class*="__workspace"], [class*="-column"], [class*="compact-list"], [class*="__intro"], [class*="-intro"])::before,
html[data-theme] #moduleStage :is([class*="__empty"], [class*="-empty"], [class*="__metrics"], [class*="-metrics"], [class*="__workspace"], [class*="-column"], [class*="compact-list"], [class*="__intro"], [class*="-intro"])::after {
  background-image: none !important;
  content: none !important;
}
html[data-theme] #moduleStage :is(.formal-workbench-intro, .people-overview-list-column, .items-v2__workspace, .items-v2__compact-list, .cc-custom-info__metrics, [class*="__metrics"], [class*="-column"]:not(.work-column)) { background-image: none !important; }
/* Inner cards: one consistent frame — teal hairline, ivory gap, gold inner keyline. */
html[data-theme="day"] #moduleStage :is(
  .panel .panel, .panel section, .panel article, .cc-import-v2, .cc-ai-surface, .reminder-v2-workbench-grid > *,
  [class*="-card"]:not(button):not(a), [class*="__card"]:not(button):not(a), [class*="-pane"]:not(button), fieldset,
  .knowledge-v2__metric, .work-overview-metrics > article
):not(.ds-icon-tile) {
  background-color: #fffefb !important;
  border: 1px solid rgba(23, 112, 122, .24) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 0 0 3px #fffefb, inset 0 0 0 4px rgba(194, 154, 82, .2), 0 1px 3px rgba(15, 79, 87, .06) !important;
}
html[data-theme="day"] #moduleStage .panel :is(section, article) :is(section, article) {
  box-shadow: none !important;
  border-color: rgba(23, 112, 122, .16) !important;
  background-color: #fbfdfb !important;
}
html[data-theme="day"] #moduleStage .reminder-v2-workbench-grid { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html[data-theme="day"] #commandCenterShell :is(.panel, .work-column, .overview-signal-card, .overview-focus-panel, .overview-change-panel, .overview-action-panel) { border-color: rgba(23, 112, 122, .3) !important; }

/* ---------- Day details ---------- */
/* Selection, scrollbars. */
html[data-theme="day"] ::selection { background: rgba(23, 112, 122, .18); color: #0c3d43; }
html[data-theme="day"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-theme="day"] ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(23, 112, 122, .35), rgba(194, 154, 82, .45)); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
html[data-theme="day"] ::-webkit-scrollbar-track { background: transparent; }
/* Sidebar group labels get a small gold diamond. */
html[data-theme="day"] #commandCenterShell .sidebar :is(.nav-group-title, [class*="group-title"], [class*="section-label"]) { display: flex !important; align-items: center; gap: 8px; }
html[data-theme="day"] #commandCenterShell .sidebar :is(.nav-group-title, [class*="group-title"], [class*="section-label"])::before {
  content: "" !important; display: block !important; width: 6px; height: 6px; transform: rotate(45deg);
  background: var(--r-gold) !important; box-shadow: 0 0 0 2px #fffdf8, 0 0 0 3px rgba(194, 154, 82, .4);
}
/* Sidebar icons nudge on hover; active item icon sits in a small medallion. */
html[data-theme="day"] #commandCenterShell .cc-shell-nav__icon { transition: transform .2s var(--r-ease); }
html[data-theme="day"] #commandCenterShell .cc-shell-nav__item:hover .cc-shell-nav__icon { transform: translateX(2px); }
html[data-theme="day"] #commandCenterShell .cc-shell-nav__item.active .cc-shell-nav__icon {
  border-radius: 999px; padding: 3px; box-sizing: content-box;
  background: radial-gradient(circle at 30% 25%, #fffefb, #e4f0ef); box-shadow: 0 0 0 1px rgba(194, 154, 82, .5);
}
/* KPI tiles: teal→gold keyline along the top edge. */
html[data-theme="day"] #commandCenterShell .kpi { position: relative; }
html[data-theme="day"] #commandCenterShell .kpi::after {
  content: "" !important; display: block !important; position: absolute; left: 14px; right: 14px; top: 0; height: 2px;
  background: linear-gradient(90deg, #17707a, rgba(194, 154, 82, .9) 60%, transparent) !important; border-radius: 0 0 2px 2px;
}
/* Rows: a teal marker slides in on hover. */
html[data-theme="day"] #commandCenterShell .row { position: relative; transition: background-color .15s var(--r-ease); }
html[data-theme="day"] #commandCenterShell .row::after {
  content: "" !important; position: absolute; left: 0; top: 22%; bottom: 22%; width: 2px; border-radius: 2px;
  background: #17707a !important; opacity: 0; transform: scaleY(.4); transition: opacity .15s var(--r-ease), transform .15s var(--r-ease);
}
html[data-theme="day"] #commandCenterShell .row:hover::after { opacity: 1; transform: scaleY(1); }
/* Buttons: pressed state; icon tiles tilt slightly on card hover. */
html[data-theme="day"] :is(#commandCenterShell, #aiPanel) :is(button, .mini-action, .button):active:not(:disabled) { transform: translateY(0) scale(.98); }
html[data-theme="day"] #moduleStage .ds-icon-tile { transition: transform .25s var(--r-ease); }
html[data-theme="day"] #moduleStage :is(.panel, .work-column, section):hover > :is(h2, h3) > .ds-icon-tile { transform: rotate(-8deg) scale(1.06); }
/* Tabular, lining numerals for amounts and dates. */
html[data-theme="day"] #moduleStage :is(td, time, [class*="amount"], [class*="money"], [class*="date"], .tabulator-cell) { font-variant-numeric: tabular-nums lining-nums; }
/* Mobile nav: a small teal dot under the active item. */
html[data-theme="day"] #commandCenterShell .cc-mobile-nav__item { position: relative; }
html[data-theme="day"] #commandCenterShell .cc-mobile-nav__item.active::after {
  content: "" !important; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 999px; background: #17707a !important;
}
/* Cards fade up once on view entry (motion-safe). */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ds-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  html[data-theme] #moduleStage > * > .panel, html[data-theme] #moduleStage > .panel { animation: ds-rise .35s var(--r-ease) both; }
}

/* ---------- Today brief (home, read-only) ---------- */
html[data-theme] #moduleStage .overview-today-brief {
  margin: 0 0 14px; padding: 14px 16px; border-radius: var(--r-radius, 14px);
  border: 1px solid var(--r-line); background: var(--r-surface-2);
}
html[data-theme] #moduleStage .overview-brief-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
html[data-theme] #moduleStage .overview-brief-item {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--r-line); background: var(--r-surface);
}
html[data-theme] #moduleStage .overview-brief-item > span { font-size: .78rem; color: var(--r-muted); letter-spacing: .04em; }
html[data-theme] #moduleStage .overview-brief-item > strong { font-family: var(--r-display, inherit); font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums lining-nums; }
html[data-theme] #moduleStage .overview-brief-item > small { color: var(--r-faint); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme] #moduleStage .overview-brief-bar { height: 6px; border-radius: 999px; background: rgba(23, 112, 122, .12); overflow: hidden; }
html[data-theme] #moduleStage .overview-brief-bar > i { display: block; height: 100%; border-radius: inherit; background: #17707a; }
html[data-theme] #moduleStage .overview-brief-bar > i.amber { background: #b7832f; }
html[data-theme] #moduleStage .overview-brief-bar > i.red { background: #b4443a; }
html[data-theme="day"] #moduleStage .overview-today-brief { background: linear-gradient(180deg, #fffdf8, #f5f8f4); border-color: rgba(194, 154, 82, .42); box-shadow: inset 0 0 0 3px #fffdf8, inset 0 0 0 4px rgba(194, 154, 82, .28); }
html[data-theme="day"] #moduleStage .overview-brief-item { border-color: rgba(23, 112, 122, .22); }
html[data-theme] #moduleStage .overview-today-brief .overview-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html[data-theme] #moduleStage .overview-ai-entry {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 10px;
}
html[data-theme] #moduleStage .overview-ai-entry > label { font-weight: 600; color: var(--r-accent, #17707a); white-space: nowrap; }
html[data-theme] #moduleStage .overview-ai-entry > input { min-width: 0; height: 40px; padding: 0 12px; }
html[data-theme] #moduleStage .overview-ai-entry > button { height: 40px; white-space: nowrap; }
@media (max-width: 900px) {
  html[data-theme] #moduleStage .overview-brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme] #moduleStage .overview-ai-entry { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-theme] #moduleStage .overview-ai-entry > label { grid-column: 1 / -1; }
}

/* ---------- AI workbench quick prompts ---------- */
html[data-theme] .ai-workbench__quick-prompts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
html[data-theme] .ai-workbench__quick-prompt {
  min-height: 30px; padding: 4px 12px; border-radius: 999px; font-size: .82rem; cursor: pointer;
  border: 1px solid var(--r-line-strong, rgba(23, 112, 122, .35)); background: var(--r-surface, #fffdf8); color: var(--r-accent, #17707a);
}
html[data-theme] .ai-workbench__quick-prompt:hover:not(:disabled) { background: rgba(23, 112, 122, .08); }
html[data-theme] .ai-workbench__quick-prompt:disabled { opacity: .55; cursor: not-allowed; }
html[data-theme="night"] .ai-workbench__quick-prompt { color: var(--r-text); }

/* ---------- Scrollbars ---------- */
html[data-theme] * { scrollbar-width: thin; scrollbar-color: var(--r-line-strong) transparent; }

html[data-reduce-motion="true"] * { transition: none !important; animation: none !important; }

/* ---------- Finance planning: recurring items / budget suggestions / QQ push ---------- */
html[data-theme] #moduleStage .overview-recurring-due {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; padding: 8px 12px;
  border-radius: 10px; border: 1px dashed var(--r-line); background: var(--r-surface);
}
html[data-theme] #moduleStage .overview-recurring-due__label { font-size: .8rem; color: var(--r-muted); letter-spacing: .04em; }
html[data-theme] #moduleStage .overview-recurring-due__item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
html[data-theme] #moduleStage .overview-recurring-due__item strong { font-size: .88rem; font-variant-numeric: tabular-nums; }
html[data-theme] #moduleStage .finance-recurring-form {
  display: grid; grid-template-columns: minmax(0, 1.4fr) 110px 110px minmax(0, 1fr) 90px auto; gap: 8px; align-items: end; margin-bottom: 10px;
}
html[data-theme] #moduleStage .finance-recurring-form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: .78rem; color: var(--r-muted); }
html[data-theme] #moduleStage .finance-recurring-form input,
html[data-theme] #moduleStage .finance-recurring-form select { min-width: 0; width: 100%; }
html[data-theme] #moduleStage .finance-recurring-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
html[data-theme] #moduleStage .finance-suggestion-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html[data-theme] .settings-push-form { display: grid; gap: 8px; margin-top: 10px; }
html[data-theme] .settings-push-form label { display: flex; align-items: center; gap: 8px; }
html[data-theme] .settings-push-hour select { width: auto; min-width: 96px; }
@media (max-width: 900px) {
  html[data-theme] #moduleStage .finance-recurring-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme] #moduleStage .finance-recurring-form > button { grid-column: 1 / -1; }
}
html[data-theme] #moduleStage .settings-collab-panel .settings-action-row[hidden] { display: none; }
html[data-theme] #moduleStage .settings-workspace-options { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
html[data-theme] #moduleStage .settings-invite-form select { width: auto; min-width: 96px; }
html[data-theme] #moduleStage .settings-invite-token { word-break: break-all; font-variant-numeric: tabular-nums; }

/* Reminder dropdowns must use the same night surface as their text. */
html[data-theme="night"] #moduleStage [data-reminder-editor-card] select {
  color-scheme: dark;
  background: var(--r-surface-2) !important;
  background-image: none !important;
  color: var(--r-text) !important;
}

/* Keep the main task readable and secondary controls compact. */
html[data-theme="day"] #moduleStage [data-items-v2] .items-v2__feedback.success {
  color: #14513d !important; background: #e7f4ed !important; border-color: #267552;
}
html[data-theme="night"] #moduleStage [data-items-v2] .items-v2__feedback.success {
  color: #d0f5df !important; background: #163c30 !important; border-color: #76c797;
}
html[data-theme] #moduleStage :is(.work-timeline > section, .work-progress-form, .work-progress-form fieldset, .work-progress-actions) {
  min-width: 0; max-width: 100%;
}
html[data-theme] #moduleStage .work-progress-form :is(input, textarea, select) { min-width: 0; max-width: 100%; }
html[data-theme] #moduleStage .work-progress-actions > span { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
html[data-theme] #moduleStage .finance-recurring-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px; margin-top: 8px; border: 1px solid var(--r-line); border-radius: 10px;
}
html[data-theme] #moduleStage .finance-recurring-edit-form > small,
html[data-theme] #moduleStage .finance-recurring-edit-form > button { grid-column: 1 / -1; }
html[data-theme] #moduleStage .budget-row { grid-template-columns: minmax(0, 1fr) minmax(60px, .65fr) auto auto; }
html[data-theme] #moduleStage [data-overview-open-record] {
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
}
html[data-theme] #moduleStage [data-overview-open-record]:focus-visible { outline: 2px solid var(--r-accent); outline-offset: 2px; }
html[data-theme] #moduleStage .knowledge-search-secondary { min-width: 0; }
html[data-theme] #moduleStage .knowledge-search-secondary > summary { cursor: pointer; color: var(--r-muted); font-size: .82rem; padding: 8px 0; }
html[data-theme] #moduleStage .asset-ledger-row > label.field,
html[data-theme] #moduleStage .asset-reconciliation-line > label.field { min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
html[data-theme] #moduleStage .asset-ledger-row > label.field small,
html[data-theme] #moduleStage .asset-reconciliation-line > label.field small { color: var(--r-muted); font-size: .75rem; }
html[data-theme="night"] #moduleStage [data-asset-workbench],
html[data-theme="night"] #moduleStage [data-asset-workbench] :is(.asset-capture-panel, .asset-reference-card, .asset-ledger-section),
html[data-theme="night"] #moduleStage [data-asset-workbench] .panel,
html[data-theme="night"] #moduleStage [data-asset-workbench] .asset-ledger-row,
html[data-theme="night"] #moduleStage [data-asset-workbench] .asset-reconciliation-line {
  background: #17232e !important; background-image: none !important; backdrop-filter: none !important;
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-areas: "name amount" "reference note" "remove remove";
}
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row > label:nth-of-type(1) { grid-area: name !important; }
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row > label:nth-of-type(2) { grid-area: amount !important; }
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row > label:nth-of-type(3) { grid-area: note !important; }
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row > .asset-row-reference { grid-area: reference !important; }
html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row > .asset-row-delete { grid-area: remove !important; justify-self: end; }
@media (max-width: 760px) {
  html[data-theme] body.owner-shell-v1:not(.auth-required) #moduleStage [data-asset-human-contract="asset-liability-ledger-v5"] .asset-ledger-row {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "name" "amount" "reference" "note" "remove";
  }
  html[data-theme] #moduleStage .work-progress-layout { grid-template-columns: minmax(0, 1fr); }
  html[data-theme] #moduleStage .budget-row { grid-template-columns: minmax(0, 1fr) auto; }
  html[data-theme] #moduleStage .budget-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  html[data-theme] #moduleStage .budget-row > button { grid-column: 1 / -1; min-height: 44px; }
  html[data-theme] #moduleStage .knowledge-v2__search-row { gap: 8px; }
  html[data-theme] #moduleStage .knowledge-search-secondary:not([open]) { padding: 0; }
}

}

/* source: record-relations.css */
/* 统一“关联 · 附件”对话框与手机日历订阅面板（沿用象牙白 + 青绿主题）。 */
.record-relations-open { display: inline-flex; align-items: center; gap: 4px; }
.work-overview-brief > .record-relations-open { margin-top: 8px; }
.knowledge-v2__editor + .record-relations-open,
.record-relations-open + .knowledge-v2__editor { margin-top: 8px; }

.record-relations-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: min(86vh, 820px);
  padding: 0;
  border: 1px solid rgba(184, 150, 62, 0.45);
  border-radius: 16px;
  background: #fbf8f0;
  color: #23332f;
  box-shadow: 0 24px 64px rgba(20, 44, 40, 0.28);
  overflow: auto;
}
.record-relations-dialog::backdrop { background: rgba(18, 32, 30, 0.45); }
.record-relations-dialog__head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px 12px; background: #fbf8f0; border-bottom: 1px solid rgba(31, 111, 106, 0.14);
}
.record-relations-dialog__head small { color: #1f6f6a; font-size: 12px; }
.record-relations-dialog__head h3 { margin: 2px 0 0; font-size: 18px; word-break: break-all; }
.record-relations-dialog__status { margin: 8px 20px 0; min-height: 1.2em; font-size: 13px; color: #1f6f6a; }
.record-relations-dialog__status.is-error { color: #a33b2f; }
.record-relations-dialog__section { padding: 8px 20px 16px; }
.record-relations-dialog__section h4 { margin: 8px 0; font-size: 15px; color: #1f6f6a; }
.record-relations-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.record-relations-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid rgba(31, 111, 106, 0.12);
}
.record-relations-list li.record-relations-empty { color: #66756f; font-size: 13px; background: transparent; border-style: dashed; }
.record-relations-text { flex: 1; min-width: 0; display: grid; }
.record-relations-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-relations-text small { color: #66756f; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-relations-chip {
  flex: none; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  background: rgba(31, 111, 106, 0.1); color: #1f6f6a;
}
.record-relations-add { display: grid; grid-template-columns: 140px 1fr; gap: 8px; margin: 12px 0 8px; }
.record-relations-add label { display: grid; gap: 4px; font-size: 12px; color: #66756f; }
.record-relations-add select,
.record-relations-add input {
  min-height: 38px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid rgba(31, 111, 106, 0.28); background: #fff; color: inherit; font-size: 15px;
}
.record-relations-candidates { max-height: 240px; overflow: auto; }
.record-relations-upload { margin-top: 10px; display: inline-flex; cursor: pointer; }

.calendar-feed-card { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(31, 111, 106, 0.16); }
.calendar-feed-card h4 { margin: 0 0 4px; font-size: 15px; color: #1f6f6a; }
.calendar-feed-intro { margin: 0 0 8px; font-size: 13px; line-height: 1.6; }
.calendar-feed-body { display: grid; gap: 10px; }
.calendar-feed-link { display: grid; gap: 4px; font-size: 13px; }
.calendar-feed-link input {
  width: 100%; min-height: 38px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid rgba(31, 111, 106, 0.28); background: #fff; font-family: ui-monospace, monospace; font-size: 13px;
}
.calendar-feed-steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.calendar-feed-note { font-size: 12px; color: #66756f; line-height: 1.6; }
.settings-inline-result.is-error { color: #a33b2f; }

[data-theme="night"] .record-relations-dialog,
[data-theme="night"] .record-relations-dialog__head { background: #16211f; color: #e8e2d2; }
[data-theme="night"] .record-relations-list li,
[data-theme="night"] .record-relations-add select,
[data-theme="night"] .record-relations-add input,
[data-theme="night"] .calendar-feed-link input { background: #1d2b28; color: #e8e2d2; }

@media (max-width: 640px) {
  .record-relations-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  .record-relations-add { grid-template-columns: 1fr; }
  .record-relations-list li { flex-wrap: wrap; }
  .record-relations-list li .mini-action { min-height: 36px; }
}

/* source: styles/mobile-home-r1.css */
/* 手机端 AI 首页外壳（modules/mobile-home.mjs）。只在 ≤760px 且已登录时生效，桌面不受影响。 */
.m-home,
.m-home-nav {
  display: none;
}

@media (max-width: 760px) {
  body.mobile-home-shell #mobilePrimaryNav,
  body.mobile-home-shell #mobileNavMore {
    display: none !important;
  }

  body.mobile-home-shell #commandCenterShell .m-home-nav {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--r-elev, #fffdf8);
    border-top: 1px solid var(--r-gold-soft, var(--r-line, rgba(0, 0, 0, .1)));
  }

  body.mobile-home-shell .m-home-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    border: 0;
    background: transparent;
    color: var(--r-muted, #5a5043);
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
  }

  body.mobile-home-shell .m-home-nav__item svg,
  body.mobile-home-shell .m-home-nav__item i {
    width: 22px;
    height: 22px;
  }

  body.mobile-home-shell .m-home-nav__item.active {
    color: var(--r-accent-strong, #115a63);
    font-weight: 650;
  }

  body.mobile-home-shell .m-home-nav__item:focus-visible {
    outline: 2px solid var(--r-ring, rgba(23, 112, 122, .35));
    outline-offset: -4px;
  }

  body.mobile-home-shell .m-home:not([hidden]) {
    position: fixed;
    z-index: 38;
    inset: 0 0 var(--cc-mobile-nav-height, 58px);
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--r-backdrop, none), var(--r-bg, #edf3f0);
    background-attachment: fixed;
    color: var(--r-text, #2a2419);
    font-family: var(--r-font, system-ui, sans-serif);
  }

  body.mobile-home-open {
    overflow: hidden;
  }

  .m-home__pane {
    padding: 18px 16px 24px;
  }

  .m-home[data-tab="home"] .m-home__pane[data-m-pane="home"] {
    padding-bottom: 96px;
  }

  .m-home h1,
  .m-home h2 {
    margin: 0;
    color: var(--r-text, #2a2419);
    font-family: var(--r-display, serif);
    letter-spacing: .02em;
  }

  .m-home h1 {
    font-size: 1.45rem;
  }

  .m-home h2 {
    font-size: 1rem;
  }

  .m-home p {
    margin: 0;
  }

  .m-home__muted,
  .m-home__section-head p,
  .m-home__hello p {
    color: var(--r-muted, #5a5043);
    font-size: .86rem;
  }

  .m-home__hello {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
  }

  .m-home__section-head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
  }

  .m-home__today,
  .m-home__card {
    display: grid;
    gap: 12px;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid var(--r-gold-soft, var(--r-line-strong, rgba(0, 0, 0, .12)));
    border-radius: var(--r-radius-lg, 14px);
    background: var(--r-elev, #fffdf8);
    box-shadow: 0 0 0 3px var(--r-elev, #fffdf8), 0 0 0 4px rgba(194, 154, 82, .18), 0 10px 24px -18px rgba(90, 64, 24, .45);
  }

  .m-home__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .m-home__stats a {
    display: grid;
    gap: 2px;
    padding: 8px 6px;
    border-radius: var(--r-radius, 8px);
    background: var(--r-surface-2, #f5f8f4);
    color: var(--r-text, #2a2419);
    text-align: center;
    text-decoration: none;
  }

  .m-home__stats b {
    color: var(--r-accent-strong, #115a63);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .m-home__stats span {
    color: var(--r-muted, #5a5043);
    font-size: .75rem;
  }

  .m-home__agenda {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .m-home__agenda a {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 7px 2px;
    border-top: 1px solid var(--r-line, rgba(0, 0, 0, .08));
    color: var(--r-text, #2a2419);
    text-decoration: none;
  }

  .m-home__due {
    flex: 0 0 auto;
    min-width: 58px;
    color: var(--r-accent, #17707a);
    font-size: .8rem;
    font-weight: 600;
  }

  .m-home__thread {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .m-home__suggest,
  .m-home__manual,
  .m-home__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .m-home__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 8px;
    scrollbar-width: none;
  }

  .m-home__chip {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--r-line-strong, rgba(23, 112, 122, .3));
    border-radius: 999px;
    background: var(--r-elev, #fffdf8);
    color: var(--r-accent-strong, #115a63);
    font: inherit;
    font-size: .86rem;
    text-decoration: none;
    cursor: pointer;
  }

  .m-home__chip svg {
    width: 16px;
    height: 16px;
  }

  .m-home__chip.is-active {
    border-color: var(--r-accent, #17707a);
    background: var(--r-accent, #17707a);
    color: var(--r-accent-contrast, #fffdf8);
  }

  .m-home__manual {
    padding-top: 4px;
  }

  .m-home__bubble.is-user {
    justify-self: end;
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 14px 14px 4px 14px;
    background: var(--r-accent, #17707a);
    color: var(--r-accent-contrast, #fffdf8);
    overflow-wrap: anywhere;
  }

  .m-home__reply {
    display: grid;
    gap: 8px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--r-line, rgba(0, 0, 0, .08));
    border-radius: 14px 14px 14px 4px;
    background: var(--r-elev, #fffdf8);
    overflow-wrap: anywhere;
  }

  .m-home__reply.is-error {
    border-color: var(--r-red, #a8322b);
  }

  .m-home__question {
    padding: 6px 10px;
    border-left: 3px solid var(--r-amber, #8a5300);
    background: var(--r-amber-soft, #f6ecd9);
    color: var(--r-text, #2a2419);
    font-size: .9rem;
  }

  .m-home__draft {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--r-line-strong, rgba(0, 0, 0, .14));
    border-radius: var(--r-radius-md, 10px);
    background: var(--r-surface-2, #f5f8f4);
  }

  .m-home__draft header {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .m-home__draft.is-done {
    opacity: .72;
  }

  .m-home__draft.is-local {
    border-style: dashed;
  }

  .m-home__draft footer {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .m-home__facts {
    color: var(--r-text, #2a2419);
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
  }

  .m-home__tag {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--r-accent-soft, #e2f0f0);
    color: var(--r-accent-strong, #115a63);
    font-size: .74rem;
    font-weight: 600;
  }

  .m-home__tag.is-warn {
    margin-right: 6px;
    background: var(--r-amber-soft, #f6ecd9);
    color: var(--r-amber, #8a5300);
  }

  .m-home__status {
    color: var(--r-green, #1f6b3f);
    font-size: .85rem;
    font-weight: 600;
  }

  .m-home__primary,
  .m-home__ghost {
    min-height: 38px;
    padding: 6px 16px;
    border-radius: 999px;
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
  }

  .m-home__primary {
    border: 0;
    background: var(--r-accent, #17707a);
    color: var(--r-accent-contrast, #fffdf8);
    font-weight: 600;
  }

  .m-home__ghost {
    border: 1px solid var(--r-line-strong, rgba(0, 0, 0, .15));
    background: transparent;
    color: var(--r-accent-strong, #115a63);
  }

  .m-home__primary:disabled,
  .m-home__ghost:disabled {
    opacity: .55;
    cursor: wait;
  }

  .m-home__reset {
    justify-self: center;
  }

  .m-home__dots::after {
    display: inline-block;
    width: 1.2em;
    content: "…";
  }

  .m-home__composer {
    position: fixed;
    z-index: 39;
    right: 0;
    bottom: var(--cc-mobile-nav-height, 58px);
    left: 0;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 12px;
    border-top: 1px solid var(--r-line, rgba(0, 0, 0, .08));
    background: var(--r-elev, #fffdf8);
  }

  .m-home__composer[hidden] {
    display: none;
  }

  .m-home__composer textarea {
    flex: 1 1 auto;
    min-height: 42px;
    max-height: 120px;
    padding: 10px 12px;
    border: 1px solid var(--r-line-strong, rgba(0, 0, 0, .15));
    border-radius: 21px;
    background: var(--r-input, #fffefb);
    color: var(--r-text, #2a2419);
    font: inherit;
    font-size: 16px; /* 16px 以下 iOS 会自动放大页面 */
    line-height: 1.35;
    resize: none;
  }

  .m-home__composer textarea:focus-visible {
    outline: 2px solid var(--r-ring, rgba(23, 112, 122, .35));
    outline-offset: 1px;
  }

  .m-home__icon-btn,
  .m-home__send {
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    cursor: pointer;
  }

  .m-home__icon-btn {
    border: 1px solid var(--r-line-strong, rgba(0, 0, 0, .15));
    background: transparent;
    color: var(--r-accent-strong, #115a63);
  }

  .m-home__icon-btn.is-listening {
    border-color: var(--r-red, #a8322b);
    background: var(--r-red-soft, #f8e7e2);
    color: var(--r-red, #a8322b);
  }

  .m-home__send {
    border: 0;
    background: var(--r-accent, #17707a);
    color: var(--r-accent-contrast, #fffdf8);
  }

  .m-home__send:disabled {
    opacity: .55;
    cursor: wait;
  }

  .m-home__feed {
    display: grid;
    gap: 6px;
  }

  .m-home__day {
    margin-top: 10px !important;
    color: var(--r-muted, #5a5043) !important;
    font-family: var(--r-font, sans-serif) !important;
    font-size: .8rem !important;
    font-weight: 600;
  }

  .m-home__row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--r-line, rgba(0, 0, 0, .08));
    border-radius: var(--r-radius-md, 10px);
    background: var(--r-elev, #fffdf8);
    color: var(--r-text, #2a2419);
    text-decoration: none;
  }

  .m-home__row-main {
    display: grid;
    min-width: 0;
    gap: 1px;
  }

  .m-home__row-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-home__row-main small {
    overflow: hidden;
    color: var(--r-muted, #5a5043);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .m-home__more {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-self: start;
    margin-top: 8px;
    color: var(--r-accent-strong, #115a63);
    font-weight: 600;
    text-decoration: none;
  }

  .m-home__more svg {
    width: 16px;
    height: 16px;
  }

  .m-home__list {
    display: grid;
  }

  .m-home__list-item {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 46px;
    padding: 8px 2px;
    border: 0;
    border-top: 1px solid var(--r-line, rgba(0, 0, 0, .08));
    background: transparent;
    color: var(--r-text, #2a2419);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .m-home__list-item:first-child {
    border-top: 0;
  }

  .m-home__list-item svg {
    width: 20px;
    height: 20px;
    color: var(--r-accent, #17707a);
  }

  .m-home__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .m-home__tile {
    display: grid;
    gap: 4px;
    justify-items: center;
    padding: 10px 2px;
    border-radius: var(--r-radius, 8px);
    background: var(--r-surface-2, #f5f8f4);
    color: var(--r-text, #2a2419);
    font-size: .78rem;
    text-align: center;
    text-decoration: none;
  }

  .m-home__tile svg {
    width: 22px;
    height: 22px;
    color: var(--r-accent, #17707a);
  }

  .m-home__logout {
    display: block;
    width: 100%;
    margin-top: 4px;
  }

  .m-home a:focus-visible,
  .m-home button:focus-visible {
    outline: 2px solid var(--r-ring, rgba(23, 112, 122, .35));
    outline-offset: 2px;
  }
}

/* source: styles/native-reminders.css */
/* 安卓 APP 内“我的 → 手机通知提醒”卡片（仅 APP 内出现） */
.m-native h2 {
  margin: 0;
}

.m-native p {
  margin: 0;
  line-height: 1.5;
}

.m-native__status {
  color: var(--r-accent-strong, #115a63);
  font-weight: 600;
}

.m-native__warn {
  color: var(--r-danger, #9a3b2a);
  font-size: .88rem;
}

.m-native__warn button {
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
}

.m-native__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m-native__hint {
  color: var(--r-text-muted, #6b6359);
  font-size: .82rem;
}

.m-native__calendar {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--r-line, rgba(0, 0, 0, .08));
}

.m-native__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.m-native__row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.m-native__row small {
  color: var(--r-text-muted, #6b6359);
  font-size: .82rem;
}

/* 开关：44px 宽，触控区域足够 */
.m-native__switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--r-line-strong, rgba(23, 112, 122, .35));
  border-radius: 999px;
  background: var(--r-surface-muted, #ece6d8);
  cursor: pointer;
  transition: background-color 160ms ease;
}

.m-native__switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform 160ms ease;
}

.m-native__switch[aria-checked="true"] {
  border-color: var(--r-accent, #17707a);
  background: var(--r-accent, #17707a);
}

.m-native__switch[aria-checked="true"] span {
  transform: translateX(20px);
}

.m-native__switch:focus-visible {
  outline: 2px solid var(--r-accent, #17707a);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .m-native__switch,
  .m-native__switch span {
    transition: none;
  }
}

/* source: styles/mobile-polish-r1.css */
/* 手机端细节修正（2026-10-01 APP 走查）：只在窄屏生效，桌面不受影响。 */
@media (max-width: 760px) {
  /* “我的 → 切换日间 / 夜间”：全局的 34px 图标按钮样式误套在了列表项上，文字被挤成竖排 */
  #mobileHome .m-home__list-item[data-theme-mode-toggle] {
    display: flex;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 46px;
    flex: none;
    place-items: initial;
    justify-content: flex-start;
    padding: 8px 2px;
    border: 0;
    border-top: 1px solid var(--r-line, rgba(0, 0, 0, .08));
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--r-text, #2a2419);
    font-size: inherit;
    line-height: 1.4;
  }

  #mobileHome .m-home__list-item[data-theme-mode-toggle]:hover {
    border-color: var(--r-line, rgba(0, 0, 0, .08));
    background: transparent;
  }

  /* 提醒卡片的操作按钮：从一列 6 个长条改成两列，卡片高度减半 */
  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions > * {
    min-width: 0;
    width: 100%;
  }

  body.owner-shell-v1:not(.auth-required) #moduleStage .reminder-v2-row .reminder-v2-actions :is(button, summary) {
    min-height: 38px;
  }

  /* 工作模块的状态筛选：25px 高太难点 */
  .work-status-chip {
    min-height: 34px;
    padding: 6px 14px;
  }

  /* 8–10px 的小字在手机上看不清，统一抬到 11.5px */
  body.owner-shell-v1:not(.auth-required) #moduleStage :is(
    .overview-section-head > div > span,
    .overview-signal-card > span,
    .overview-canvas-status,
    .library-intelligence__signal > span,
    .library-readiness-ring small,
    .library-intelligence__head > span,
    .library-intelligence__empty,
    .ai-workbench__session-item small,
    .ai-workbench__query > label,
    .people-section-head span,
    .items-v2__summary span,
    .items-v2__workspace-section > h4,
    .items-v2__compact-empty > span,
    .cc-profile__summary-grid span,
    .cc-profile__completion > span,
    .cc-profile__overview-foot span,
    .work-column__header small,
    .list > .row > .tag
  ) {
    font-size: 11.5px !important;
    line-height: 1.35;
  }
}

/* APP 内“⏰ 设闹钟”按钮（只有 1.2 版以上 APP 会出现） */
.native-alarm-button {
  gap: 4px;
}

/* 附件预览弹窗：下载原件 + 新标签页并排；APP 内不可预览时的说明 */
.library-preview-dialog__actions { display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.library-preview-dialog__note { margin: 0; padding: 28px 18px; text-align: center; color: #5b6f6b; font-size: 14px; line-height: 1.6; }

/* 资料附件：已选文件清单，可逐个移除（再选是追加，不顶掉） */
.library-attachment-queue { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.library-attachment-queue[hidden] { display: none; }
.library-attachment-queue li { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; align-items: center; gap: 8px; min-height: 40px; padding: 4px 4px 4px 10px; border: 1px solid #d9d2bf; border-radius: 6px; background: #fffdf7; font-size: 13px; }
.library-attachment-queue li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #24413d; }
.library-attachment-queue li > small { color: #6f807c; font-size: 12px; }
.library-attachment-queue button { width: 36px; height: 36px; border: 0; border-radius: 5px; background: transparent; color: #8a5a4d; font-size: 20px; line-height: 1; cursor: pointer; }
.library-attachment-queue button:hover, .library-attachment-queue button:focus-visible { background: rgba(180, 82, 58, 0.14); color: #9b3b26; }

/* 日间主题：去掉夜间皮肤遗留的黑色滚动条/下拉项/图标底（owner-tech-v2 未分层，压过了 design-refresh 的分层规则） */
html[data-theme="day"] body.owner-shell-v1 * {
  scrollbar-color: rgba(23, 112, 122, .38) transparent;
}
html[data-theme="day"] body.owner-shell-v1 ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="day"] body.owner-shell-v1 :is(select option, optgroup) {
  background: #fffdf8;
  color: #183b3f;
}
html[data-theme="day"] body.owner-shell-v1 select { color-scheme: light; }
html[data-theme="day"] body.owner-shell-v1 :is(.knowledge-v2__metric, .knowledge-v2__coverage-row, .knowledge-v2__command-context) > [data-lucide] {
  background: rgba(23, 112, 122, .1);
  color: #17707a;
}

/* 物品：手机上“重要物品”勾选框被挤成 0 宽 */
[data-items-v2="true"] .items-v2__important { flex: 0 0 auto; min-width: max-content; }
[data-items-v2="true"] .items-v2__important input { flex: 0 0 auto; width: 18px; height: 18px; }

/* 资料总览：类型行在手机上只有 14px 高，难点 */
@media (max-width: 760px) {
  [data-command-library="vault"] button.library-intelligence__type-row { min-height: 36px; }
}

/* 手机首页：逾期提醒标红；AI 回答保留换行（列表不再挤成一行） */
#mobileHome .m-home__due.is-overdue { color: #a3392b; font-weight: 600; }
#mobileHome .m-home__agenda small { color: #6f807c; font-size: 12px; }
#mobileHome .m-home__reply > p:first-child { white-space: pre-line; }

/* 手机：设置里的开关、工作“编辑这个项目”、AI 快捷提问——点按区域放大到 ≥40px */
@media (max-width: 760px) {
  #moduleStage :is([data-tab-panel="settings-privacy"], [data-tab-panel="settings-notifications"], [data-tab-panel="settings-display"]) input[type="checkbox"] {
    width: 22px; height: 22px; min-width: 22px; flex: 0 0 22px; accent-color: #17707a;
  }
  #moduleStage .work-overview-edit { min-height: 40px; padding-inline: 14px; }
  .ai-workbench__quick-prompt { min-height: 40px; }
}

/* 财务快速记账：科目管理默认收起，记账表单不再被长长的科目表撑开 */
.finance-category-manager-fold > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: #17707a; font-weight: 600; list-style: none; }
.finance-category-manager-fold > summary::-webkit-details-marker { display: none; }
.finance-category-manager-fold > summary::before { content: "▸"; margin-right: 6px; transition: transform .15s; }
.finance-category-manager-fold[open] > summary::before { transform: rotate(90deg); }

.inbox-load-notice:not([hidden]) { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 16px; padding: 10px 14px; border: 1px solid currentColor; border-radius: 8px; color: var(--text, #315954); }
@media (max-width: 760px) {
  /* Keep the full route title above the compact status controls in both themes. */
  html[data-theme] body.owner-shell-v1:not(.auth-required) { --ui-title-height: 120px; --cc-mobile-topbar-height: 120px; }
  html[data-theme] body.owner-shell-v1:not(.auth-required) .topbar { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 8px !important; }
  html[data-theme] body.owner-shell-v1:not(.auth-required) .topbar > .title { flex: 1 0 100% !important; width: 100% !important; max-width: none !important; min-width: 0 !important; }
  html[data-theme] body.owner-shell-v1:not(.auth-required) .topbar #pageTitle { font-size: 26px !important; line-height: 1.3 !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: none !important; }
  html[data-theme] body.owner-shell-v1:not(.auth-required) .topbar > .status { margin-left: auto !important; flex: 0 0 auto !important; }
  /* The tab rail already provides all destinations; keep one prominent entry. */
  html[data-theme] #moduleStage[data-active-view="finance"] .finance-overview-primary-actions > a:not([data-pin="finance:quick-entry"]) { display: none !important; }
  html[data-theme] #moduleStage[data-active-view="finance"] .finance-overview-primary-actions { justify-content: flex-start !important; }
  html[data-theme] .module-canvas-toolbar-actions [data-module-canvas-edit][aria-pressed="false"] ~ button { display: none !important; }
  html[data-theme] .module-canvas-toolbar { align-items: center !important; flex-direction: row !important; flex-wrap: wrap !important; gap: 8px !important; }
  html[data-theme] .module-canvas-toolbar-title { width: auto !important; min-width: 0 !important; flex: 1 1 160px !important; }
}

@layer design-refresh {
  @media (max-width: 760px) {
    html[data-theme] body.owner-shell-v1:not(.auth-required) #commandCenterShell .topbar #pageTitle { font-size: 26px !important; }
  }
}

/* Share the phone composer's attachment/status rows without changing its theme. */
@media (max-width: 760px) {
  #mobileHome .m-home__composer { flex-wrap: wrap; gap: 6px; }
  #mobileHome .m-home__composer textarea { flex: 1 1 120px; min-width: 0; }
  #mobileHome .m-home__attachment-queue,
  #mobileHome .m-home__attachment-error { flex: 0 0 100%; margin: 0; }
  #mobileHome .m-home__attachment-queue { display: flex; flex-wrap: wrap; gap: 6px; max-height: 104px; overflow-y: auto; }
  #mobileHome .m-home__attachment-queue[hidden],
  #mobileHome .m-home__attachment-error[hidden] { display: none; }
  #mobileHome .m-home__attachment-queue > span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow-wrap: anywhere; font-size: 12px; }
  #mobileHome .m-home__attachment-queue button { min-width: 36px; min-height: 36px; }
  #mobileHome .m-home__attachment-error { color: var(--r-muted, #5f6f6b); font-size: 12px; }
  #mobileHome .m-home__sent-files { display: block; font-size: 12px; opacity: .85; }
  #mobileHome .m-home__pane[data-m-pane="home"] { padding-bottom: calc(var(--m-composer-height, 84px) + 16px); }
  html body.owner-shell-v1.mobile-home-shell #moduleStage#moduleStage[data-active-view="ai-workbench"] .ai-workbench[data-ai-workbench] {
    height: calc(100dvh - var(--cc-mobile-topbar-height, 120px) - var(--cc-mobile-nav-height, 58px) - 64px) !important;
    min-height: 0 !important;
  }
  html body.owner-shell-v1.mobile-home-shell #moduleStage#moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer-editor { min-height: 72px; }
  html body.owner-shell-v1.mobile-home-shell #moduleStage#moduleStage[data-active-view="ai-workbench"] #aiWorkbenchQuery { min-height: 64px; }
}

/* source: styles/ai-result-cards.css */
/* AI 回答中的资料卡片（证件 / 文件 / 物品 / 保险柜），手机首页与桌面 AI 工作台共用。 */
.ai-cards {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
}

.ai-card {
  border: 1px solid var(--r-line, #d9e2df);
  border-radius: var(--r-radius-md, 12px);
  background: var(--r-elev, #fff);
  padding: 10px 12px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ai-card.is-protected {
  border-color: var(--r-line-strong, #b9cbc6);
  background: var(--r-surface-2, #f6f8f7);
}

.ai-card header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-card header > svg,
.ai-card header > i {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--r-accent, #1f6f68);
}

.ai-card header span {
  display: grid;
  min-width: 0;
}

.ai-card header strong {
  color: var(--r-text, #1d2a28);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-card header small {
  color: var(--r-muted, #5f6f6b);
  font-size: 12px;
}

.ai-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-card__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--r-line-strong, #b9cbc6);
  border-radius: 999px;
  background: transparent;
  color: var(--r-accent-strong, #155650);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ai-card__action svg {
  width: 15px;
  height: 15px;
}

.ai-card__action.is-primary {
  background: var(--r-accent, #1f6f68);
  border-color: var(--r-accent, #1f6f68);
  color: var(--r-accent-contrast, #fff);
}

.ai-card__action:focus-visible {
  outline: 2px solid var(--r-ring, #1f6f68);
  outline-offset: 2px;
}

.ai-card__unlock,
.ai-card__secret {
  display: grid;
  gap: 8px;
}

.ai-card__unlock label {
  display: grid;
  gap: 6px;
  color: var(--r-muted, #5f6f6b);
  font-size: 12px;
}

.ai-card__unlock input {
  min-height: 40px;
  border: 1px solid var(--r-line-strong, #b9cbc6);
  border-radius: 10px;
  padding: 0 10px;
  font: inherit;
  font-size: 16px; /* 避免 iOS 聚焦放大 */
  background: var(--r-elev, #fff);
  color: var(--r-text, #1d2a28);
}

.ai-card__unlock > div,
.ai-card__secret > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-card__secret code {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--r-surface-2, #f1f5f4);
  color: var(--r-text, #1d2a28);
  font-size: 15px;
  word-break: break-all;
  user-select: all;
}

.ai-card__status {
  margin: 0;
  color: var(--r-muted, #5f6f6b);
  font-size: 12px;
}

.ai-references { display: grid; gap: 6px; margin: 10px 0; min-width: 0; }
.ai-reference { border: 1px solid var(--r-line, #d9e2df); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.ai-reference > summary { cursor: pointer; color: var(--r-accent-strong, #155650); font-weight: 600; min-height: 32px; }
.ai-reference > p { margin: 8px 0; white-space: pre-wrap; }
.ai-reference .ai-card__status { display: block; }

/* source: styles/ai-workbench-roomy-r1.css */
/* AI 工作台：对话区占满可视高度，输入框加大，去掉多余留白（2026-10 用户反馈“对话框太小”）。
 * 只调整尺寸与间距；配色沿用现有主题。 */

/* 隐藏输入框标签但保留给读屏软件 */
.ai-workbench__sr-label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 整个工作台：撑满主区域剩余高度（减去顶部标题栏），不再留一截空白 */
#moduleStage[data-active-view="ai-workbench"] {
  min-height: 0;
}

html body.owner-shell-v1 #moduleStage#moduleStage[data-active-view="ai-workbench"] .ai-workbench[data-ai-workbench] {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  height: calc(100dvh - 148px) !important;
  min-height: 520px !important;
  max-height: none !important;
}

/* AI 页整页不出现外层滚动条：对话区自己滚动 */
body.owner-shell-v1:has(#moduleStage[data-active-view="ai-workbench"]) :is(.shell, .main) {
  min-height: 0 !important;
}

/* 主区域在 AI 页不再留 48px 底部空白（手机保留底部导航的高度） */
body.owner-shell-v1:has(#moduleStage[data-active-view="ai-workbench"]) .workspace {
  padding-bottom: 12px;
}

@media (max-width: 760px) {
  body.owner-shell-v1:has(#moduleStage[data-active-view="ai-workbench"]) .workspace {
    padding-bottom: 66px;
  }
}

/* 对话 + 右侧资料卡片区：占掉除输入框外的全部高度 */
#moduleStage[data-active-view="ai-workbench"] .ai-workbench__columns {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__columns > *,
#moduleStage[data-active-view="ai-workbench"] .ai-workbench__columns .module-canvas-widget {
  min-height: 0 !important;
  height: 100% !important;
}

html body.owner-shell-v1 #moduleStage#moduleStage[data-active-view="ai-workbench"] .ai-workbench__pane.ai-workbench__pane--answer,
html body.owner-shell-v1 #moduleStage#moduleStage[data-active-view="ai-workbench"] .ai-workbench__context-pane > .ai-workbench__pane {
  max-height: none !important;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__pane--answer {
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
  height: 100%;
  padding: 14px 18px;
}

html body.owner-shell-v1 #moduleStage#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__result, .ai-workbench__proposal-list, .ai-workbench__source-list)[data-scroll-owner] {
  max-height: none !important;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__result {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  height: auto !important;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__context-pane {
  min-height: 0 !important;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__context-pane > [role="tabpanel"]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#moduleStage[data-active-view="ai-workbench"] :is(.ai-workbench__proposal-list, .ai-workbench__source-list) {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
}

/* 输入框：更大、紧凑排布，不再有标题和快捷按钮占行 */
#moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer {
  flex: 0 0 auto;
  position: static;
  padding: 10px 14px;
  box-shadow: none;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer-editor {
  min-height: 120px;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer-editor > textarea,
#moduleStage[data-active-view="ai-workbench"] #aiWorkbenchQuery {
  min-height: 96px;
  max-height: 260px;
  font-size: 15px;
  line-height: 1.6;
}

#moduleStage[data-active-view="ai-workbench"] .ai-workbench__feedback[data-ai-feedback-empty="true"] {
  display: none;
}

/* 手机：顶部、底部导航之间全部给对话；输入框保持可见 */
@media (max-width: 760px) {
  html body.owner-shell-v1 #moduleStage#moduleStage[data-active-view="ai-workbench"] .ai-workbench[data-ai-workbench] {
    height: calc(100dvh - 168px) !important;
    min-height: 420px !important;
    gap: 8px;
  }

  #moduleStage[data-active-view="ai-workbench"] .ai-workbench__pane--answer {
    padding: 10px 12px;
  }

  /* 没有来源和草稿时，“回答/来源/待确认”切换条没有意义，收起省一行 */
  #moduleStage[data-active-view="ai-workbench"] .ai-workbench[data-ai-context-state="closed"] .ai-workbench__mobile-segments {
    display: none;
  }

  #moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer {
    padding: 8px 10px;
  }

  #moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer > div {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "query query"
      "attachment submit";
  }

  #moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer-editor {
    min-height: 92px;
  }

  #moduleStage[data-active-view="ai-workbench"] .ai-workbench__composer-editor > textarea,
  #moduleStage[data-active-view="ai-workbench"] #aiWorkbenchQuery {
    min-height: 72px;
  }
}

/* source: styles/ai-provider-slots.css */
/* Backup AI model slots inside the AI settings "连接" panel. */
.ai-slots {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--r-gold-soft, var(--r-line, rgba(0, 0, 0, .1)));
}

.ai-slots__card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--r-line, rgba(0, 0, 0, .1));
  border-radius: 12px;
  background: var(--r-elev, #fffdf8);
}

.ai-slots__card.is-primary {
  border-color: var(--r-gold-soft, var(--r-line, rgba(0, 0, 0, .12)));
}

.ai-slots__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--r-text, #1f2a2c);
}

.ai-slots__badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--r-muted, #5b6667);
  background: var(--r-surface-2, rgba(0, 0, 0, .05));
}

.ai-slots__badge.is-vision {
  color: var(--r-accent, #17707a);
  background: var(--r-accent-soft, rgba(23, 112, 122, .12));
}

.ai-slots__hint {
  margin: 0;
  font-size: 13px;
  color: var(--r-muted, #5b6667);
}

@media (max-width: 760px) {
  /* The shell pins #moduleStage inputs to 13px; 16px keeps iOS/Android from zooming on focus. */
  #moduleStage .ai-slots input:not([type="checkbox"]),
  #moduleStage .ai-slots select {
    font-size: 16px !important;
  }
}

