/* Liquid Glass surfaces. No layout, data, or action changes. */
/* Section explanations remain readable while matching both glass themes. */
.section-help-button{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:24px;height:24px;min-width:24px;margin-left:10px;padding:0;border:1px solid var(--line);border-radius:50%;background:rgba(111,133,172,.08);color:var(--muted);font:600 13px/1 system-ui;cursor:pointer;transform:translateY(-2px)}
.section-help-button:hover,.section-help-button[aria-expanded="true"]{color:var(--blue);border-color:var(--blue);background:rgba(95,127,208,.12)}
.section-help-button:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.section-help-tooltip,.section-help-popover{position:fixed;z-index:1400;box-sizing:border-box;border:1px solid rgba(174,192,218,.6);border-radius:16px;background:linear-gradient(135deg,rgba(255,255,255,.90),rgba(243,248,255,.82));color:var(--ink);box-shadow:0 12px 40px rgba(31,53,88,.18),inset 0 1px rgba(255,255,255,.75);backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%)}
.section-help-tooltip{width:285px;max-width:calc(100vw - 24px);padding:12px 15px;font-size:13px;line-height:1.55;pointer-events:none}
.section-help-popover{width:370px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;padding:18px;font-size:13px;line-height:1.55}
.section-help-tooltip[hidden],.section-help-popover[hidden]{display:none!important}
.section-help-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.section-help-title-row h2{font-size:17px;line-height:1.3;margin:0}
.section-help-close{border:0;background:transparent;color:var(--muted);font:22px/1 system-ui;padding:0 3px;cursor:pointer}
.section-help-popover p{margin:12px 0}.section-help-popover ol{margin:12px 0;padding-left:21px}.section-help-popover li{padding:3px 0}
.section-help-source{font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px}
.section-help-popover .section-help-ai{font-size:13px;padding:8px 12px;min-height:34px}
:root[data-theme="dark"] .section-help-tooltip,:root[data-theme="dark"] .section-help-popover{background:linear-gradient(135deg,rgba(26,39,58,.94),rgba(23,32,49,.88));border-color:rgba(142,166,202,.34);box-shadow:0 12px 40px rgba(0,0,0,.28),inset 0 1px rgba(213,231,255,.10)}
@media(prefers-reduced-transparency:reduce){.section-help-tooltip,.section-help-popover{backdrop-filter:none;-webkit-backdrop-filter:none;background:#f7faff}:root[data-theme="dark"] .section-help-tooltip,:root[data-theme="dark"] .section-help-popover{background:#1b283b}}
@media(forced-colors:active){.section-help-tooltip,.section-help-popover{background:Canvas;color:CanvasText;border:1px solid CanvasText;backdrop-filter:none}.section-help-button{color:ButtonText;border-color:ButtonText}}
:root {
  color-scheme: light;
  --ink: #222a38;
  --muted: #536071;
  --line: #37486326;
  --blue: #275699;
  --purple: #655293;
  --glass: #ffffffe0;
  --glass-edge: #53647f24;
  --glass-floating: #fff;
  --glass-shadow: 0 8px 30px #263b5510, 0 1px 3px #263b5509;
  --glass-highlight: inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff73;
  --shadow: var(--glass-shadow);
  background: #f0f1f3;
  color: var(--ink);
}

body {
  background:
    radial-gradient(ellipse at 41% 40%, #ffffffb8, transparent 71%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1500 1000' fill='none'%3E%3Cdefs%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='10'/%3E%3C/filter%3E%3C/defs%3E%3Cg stroke='%239aa4b0' stroke-opacity='.2' filter='url(%23b)'%3E%3Cpath stroke-width='29' d='M-80 805C165 766 141 643 321 611S465 485 622 441 788 484 966 345 1203 182 1580 5'/%3E%3Cpath stroke-width='15' d='M658 1039C786 886 994 894 1050 781S1325 650 1540 430'/%3E%3C/g%3E%3Cg stroke='%237b8797' stroke-opacity='.22' stroke-linecap='round'%3E%3Cpath stroke-width='2.5' d='M-50 804C132 787 124 700 212 655S319 627 381 573 451 501 554 467 697 448 772 437 867 421 956 354 1057 262 1166 217 1326 125 1545 21'/%3E%3Cpath d='M209 656C234 604 288 587 345 564S430 498 457 474M765 439C856 465 968 379 1040 343S1158 312 1203 269M662 1027C778 907 883 909 966 863S1025 794 1084 752 1180 733 1247 681 1441 553 1523 469'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat,
    linear-gradient(135deg, #f3f4f5, #fdfdfd 52%, #e9ebef);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Blur only the large surfaces; table cells and controls stay inexpensive. */
aside, .main-shell > header, .panel, .metric, .hero, dialog, .notice-panel {
  background: linear-gradient(145deg, #fffffff5, #f9fafbd9);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

aside {
  margin: 12px 0 12px 12px;
  top: 12px;
  height: calc(100vh - 24px);
  border-radius: 23px;
  padding: 25px 12px 18px;
  z-index: 10;
}

.brand { gap: 10px; padding: 0 11px; }
.brand-icon {
  border: 1px solid rgba(255, 255, 255, .65);
  background: linear-gradient(145deg, #73a9fa, #3d78e9 55%, #6265d6);
  border-radius: 14px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .65), 0 5px 14px rgba(47, 103, 201, .18);
}
.brand small { color: #667c98; }
.workspace {
  margin: 26px 5px 25px;
  background: rgba(255, 255, 255, .35);
  border-color: rgba(255, 255, 255, .84);
  border-radius: 15px;
  box-shadow: inset 0 1px 0 #ffffffb8;
}
.workspace small, .aside-bottom small { color: var(--muted); }
.nav-label { color: #667c98; font-size: 9px; letter-spacing: 1.5px; }
nav { gap: 4px; scrollbar-color: #b8c8df transparent; }
nav a {
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #4e6580;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
nav a:hover { background: #ffffff73; border-color: #ffffffb3; }
nav a.active {
  color: #245fca;
  background: linear-gradient(135deg, #ffffffd9, #d7e8ff9c);
  border-color: #fffffff0;
  box-shadow: inset 0 1px 0 #fff, 0 3px 11px #3154810c;
}
.aside-bottom { border-color: var(--line); padding-top: 17px; }
.avatar { background: linear-gradient(145deg, #ffffffd6, #d9e6f7); color: #416ba8; border: 1px solid #ffffffd9; }
.online, .workspace i { box-shadow: 0 0 0 3px #27b18b12; }

.main-shell > header {
  margin: 12px 20px 0;
  padding: 0 22px;
  height: 62px;
  border-radius: 19px;
}
.eyebrow { color: #637b9b; letter-spacing: 1.7px; }
.local-pill { color: #527297; background: #ffffff61; border-color: #ffffffd9; border-radius: 20px; }
.header-right { color: #617591; gap: 12px; }
.icon-button { border-radius: 11px; color: #527297; background: #ffffff82; border-color: #ffffffeb; }

h1 { letter-spacing: -.7px; font-weight: 700; }
h2, h3 { color: var(--ink); }
p.sub { color: #60728b; }
.page-heading { align-items: center; }
.panel { border-radius: 18px; }
.panel-head { background: #ffffff1a; border-color: var(--line); }
.panel-body { background: transparent; }
.metric { border-radius: 18px; }
.metric-label { color: #536c8a; }
.metric-icon {
  color: #507bc7;
  background: linear-gradient(145deg, #ffffffc2, #dbe9ff99);
  border: 1px solid #ffffffd1;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff;
}
.metric small, .metrics .metric > small { color: #667c97; }
.metric.red strong, .red { color: #b73d5e; }
.metric.green strong, .green { color: #137c68; }
.hero {
  color: var(--ink);
  border-radius: 22px;
  background: linear-gradient(115deg, #ffffffb8, #d9e9ff87 64%, #dadff787);
}
.hero .eyebrow { color: #4f719e; }
.hero h2 { color: #233e60; }
.hero p { color: #57708f; }
.hero:after { color: #6a8cc90b; }
.hero .btn { color: #3263aa; background: #ffffff75; border-color: #ffffffe6; }

.btn {
  border-radius: 11px;
  background: linear-gradient(150deg, #ffffffc4, #ffffff7d);
  color: #456184;
  border: 1px solid #ffffffe8;
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px #29467406;
  padding: 8px 12px;
  min-height: 34px;
  transition: background .16s, box-shadow .16s, border-color .16s;
}
.btn:hover:not(:disabled), .icon-button:hover:not(:disabled) {
  background: #ffffffe6;
  border-color: #fff;
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px #31578812;
  filter: none;
}
.btn.primary {
  color: #fff;
  background: linear-gradient(145deg, #5995f4, #3375e4 58%, #516cdb);
  border-color: #80adf3;
  box-shadow: inset 0 1px 0 #ffffff5c, 0 4px 12px #3168cc26;
}
.btn.primary:hover:not(:disabled) { background: linear-gradient(145deg, #4a8bed, #2b66d6); border-color: #7ea6ea; }
.btn:disabled { opacity: .48; box-shadow: none; }
.theme-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #ffffffc9; border-radius: 12px; background: #dce6f34d; flex-shrink: 0; }
.theme-switch button { padding: 6px 9px; min-height: 28px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #60728b; font-size: 11px; font-weight: 600; white-space: nowrap; }
.theme-switch button[aria-pressed=true] { color: #2d61b0; background: #ffffffdc; border-color: #fff; box-shadow: 0 1px 5px #25416810; }
.btn.danger, :root .btn[data-danger] { background: #fff1f0e6; border-color: #efc4c5; color: #b2374c; }
:root .btn[data-danger]:hover:not(:disabled) { background: #ffe5e6; color: #a0263e; border-color: #e5a2aa; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #346bc4; outline-offset: 3px; }

input:not([type=checkbox]):not([type=radio]), textarea, select, .report-period select {
  background: #ffffffa8;
  border: 1px solid #ffffffed;
  border-radius: 11px;
  box-shadow: inset 0 1px 3px #45689905, 0 1px 0 #6f8fb00b;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #71839b; opacity: 1; }
input:focus, textarea:focus, select:focus {
  background: #ffffffe6;
  border-color: #78a3e8;
  outline: 3px solid #4e8bdf1c;
}
input:read-only, textarea:read-only { background: #eaf0f68c; color: #5b718c; }
option { background: #f8fbff; color: var(--ink); }
input[type=checkbox] { accent-color: #3775df; }
.field, .field small { color: #5c718d; }

/* Dense, stable tables: no blur or animations on individual rows. */
thead { background: #eef4fcbd; color: #5d7595; }
th { color: #5d7595; border-color: var(--line); }
td { border-color: #90abc528; }
tbody tr:nth-child(even) { background: #ffffff1f; }
tbody tr:hover { background: #ffffff80; }
.product small, td > small, .table-wrap td small, .record small { color: #627a97; }
.pager { background: #ffffff24; border-color: var(--line); color: #617894; }
.empty { color: #687e99; }
.sheet-table thead th { background: #eaf1fbf5; color: #536e91; border-color: #bed0e256; }
.sheet-table tbody th, .sheet-table tbody td { background: #ffffff52; border-color: #9db3cf35; }
.sheet-table tbody tr:hover > th, .sheet-table tbody tr:hover > td { background: #f4f9fff2; }
.sheet-table .sheet-period, .sheet-table .sheet-metric, .sheet-table .sheet-product { background: #f1f6fdf5; border-color: #bdcfe45e; }
.sheet-table .sheet-total { background: #dce9ffb8 !important; border-color: #adcaed75; }
.sheet-table .sheet-total > th, .sheet-table .sheet-total > td { background: #dfebfcf5 !important; }
.sheet-table .sheet-selected > th, .sheet-table .sheet-selected > td { background: #eaf2fcf5; }
.sheet-table th small, .sheet-table td small, .report-footnote, .sheet-caption { color: #627997; }
.sheet-source { color: #227c6b; }
.sheet-source.incomplete { color: #976621; }
.report-definition, .report-period-note { color: #607795; }
.report-definition > span { color: #8b642a; }

.filters.return-filters { display: grid; gap: 10px; margin-block: 12px; }
.return-dates { display: grid; gap: 9px; min-width: 170px; max-width: 300px; font-size: 12px; line-height: 1.5; }
.return-dates span, .return-dates strong, .return-dates small { display: block; }
.return-dates small { color: var(--muted); font-size: 11px; }
.return-due-soon { color: #8b5616; }
:root[data-theme=dark] .return-due-soon { color: #edc781; }
.return-history { margin: 16px 0; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.return-history summary { color: var(--blue); cursor: pointer; font-weight: 600; }
.return-history ol { padding-inline-start: 22px; margin-bottom: 0; max-height: 300px; overflow: auto; }
.return-history li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.return-history li:last-child { border-bottom: 0; }
.return-history small { display: block; color: var(--muted); margin-top: 3px; }
.return-filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: 8px; }
.return-filter-row .field { min-width: 0; }
.return-filters .return-filter-row :is(input, select) { width: 100%; min-width: 0; }
.return-filter-extra > summary { width: fit-content; cursor: pointer; color: var(--muted); font-weight: 600; }
.return-filter-extra[open] .return-filter-row { margin-top: 8px; }
.return-filters .actions { flex-wrap: wrap; }
.report-tabs, .tabstrip {
  border: 1px solid #ffffffad;
  border-radius: 14px;
  background: #b9cde737;
  box-shadow: inset 0 1px 2px #496c9b08;
}
.report-tabs .btn, .return-tabs .btn, .tabstrip button { border-radius: 10px; color: #526d90; }
.customer-answer-tabs { align-items: center; margin-top: -7px; }
.customer-answer-tabs > span { padding-inline: 8px; }
.report-tabs .btn[aria-pressed=true], .return-tabs .btn.primary, .tabstrip button.active {
  color: #2d65bf;
  background: linear-gradient(145deg, #fffffff2, #eaf2ffb3);
  border-color: #fffffff5;
  box-shadow: inset 0 1px 0 #fff, 0 2px 7px #3154810e;
}
.badge { background: #e5ecfbc4; color: #4f6495; border: 1px solid #ffffff9c; border-radius: 7px; }
.badge.green { background: #dff4ebc9; color: #247b60; }
.badge.red { background: #ffe7eacd; color: #ae3453; }
.badge.orange { background: #ffedcfdb; color: #96621c; }
.platform { background: #e0edffc4; color: #366cb2; border: 1px solid #ffffffa6; border-radius: 7px; }
.platform.wb { background: #eee3f8bd; color: #8952a4; }

.notice, .global-alert, .board-notice, .danger-box, .return-signal {
  border-radius: 14px;
  box-shadow: inset 0 1px 0 #ffffffa6;
}
.notice { background: #fff7e6c9; border-color: #e5cf9e8c; color: #846027; }
.notice.info { background: #eaf2ffc7; border-color: #b8d0f47a; color: #496c9d; }
.global-alert, .board-notice { background: linear-gradient(125deg, #fffaf0eb, #fff3dcb5); border-color: #e4c58d8c; }
.global-alert.urgent, .board-notice.urgent, .danger-box, .return-signal.urgent { background: #fff0f1eb; border-color: #e3adb6b8; }
.customer-urgent, .return-conflict { background: #fff0f1b8; }
.return-signal { background: #fff3dbba; }
.notice-bell span { border: 1px solid #ffffffa3; }
.notice-bell.has-notices span { color: #885b15; background: #ffeab3be; }
.notice-panel { border-radius: 21px; background: #f7faffeb; }
.notice-panel > .notice-panel-head { padding-bottom: 10px; }
.board-notice { box-shadow: inset 0 1px 0 #fff; }

dialog {
  background: linear-gradient(140deg, #fffffff5, #f0f6fbf2);
  border-radius: 23px;
  border-color: #ffffffed;
  box-shadow: inset 0 1px 0 #fff, 0 30px 95px #17365933, 0 4px 15px #17365912;
}
dialog::backdrop { background: #19335438; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.details { background: #e4edf96b; border: 1px solid #ffffffe0; border-radius: 14px; }
.details small { color: #627b9a; }
.chat-message { background: #eaf1f98a; border: 1px solid #ffffffd4; border-radius: 15px; }
.chat-message.user { background: #dceaffb5; border-color: #ffffffdf; }
.reply-batch-sheet .dialog-actions { background: #f6f9fff5; }
.card-message { background: #ffffff85; border-color: #ffffffed; border-radius: 14px; }
.card-message.photo-request { background: #fff5dfc4; border-color: #e4cd9d91; }
.card-photo { background: #ffffff9c; border-color: #ffffffeb; border-radius: 14px; }
.card-photo img { background: #e8f0f75c; }
.quick, .flow div, .report-auto, .report-sources, .customer-site-status, .insight-box, .pricing-sync {
  background: #ffffff70;
  border: 1px solid #ffffffde;
  border-radius: 15px;
  box-shadow: inset 0 1px 0 #ffffffed;
}
.quick { color: #3f5b7e; }
.quick:hover { background: #ffffffb5; }
.quick span:first-child, .step-number { background: #dce9fb9c; color: #4a76b8; border-radius: 10px; }
.flow div, .customer-site-status small { color: #5c7493; }
.flow b { color: #3a567a; }
.ai-working { background: #e4edfd91; border-color: #ffffffdf; border-radius: 15px; }
.ai-orbit { background: linear-gradient(135deg, #ffffffd9, #d6e4ffb3); border: 1px solid #ffffffd9; color: #527cd0; }
.mini-bar, .demand-bar > div { background: #7e9fcb26; }
.mini-bar i, .demand-bar i { background: linear-gradient(90deg, #7ba7eb, #8a97dc); }
.result-price, .live-sale { color: #3167b9; }
.main-shell { display: flex; flex-direction: column; }
.main-shell > main { flex: 1; width: 100%; max-width: none; margin: 0; }
.main-shell > main[data-current-view] { padding-block-start: 16px; }
#main .workspace-heading {
  align-items: center;
  flex-flow: row wrap;
  gap: 6px 16px;
  margin: 0 0 12px;
}
#main .workspace-heading > div:not(.actions) { flex: 1 1 16rem; width: auto; min-width: 0; }
#main .workspace-heading h1 { margin: 0; font-size: clamp(19px, 1.5vw, 24px); line-height: 1.2; overflow-wrap: anywhere; }
#main .workspace-heading .actions { flex: 0 1 auto; min-width: 0; max-width: 100%; }
#main .workspace-heading .actions:empty { display: none; }
#main[data-current-view="prices"] #owner-margin > .panel-head { padding-block: 10px; }
#main[data-current-view="product"] .pc .pc-header { padding: 12px 14px; }
#main[data-current-view="product"] .pc-back { margin-bottom: 8px; }
.filters > select { max-width: 100%; }
.form-actions { flex-wrap: wrap; }
.form-actions .btn { max-width: 100%; white-space: normal; }
footer { color: var(--muted); }
.board-read-status:not([hidden]) {
  position: fixed;
  inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-floating);
  box-shadow: var(--glass-shadow);
  color: var(--ink);
  font-size: 12px;
  pointer-events: none;
}
.board-read-status .spinner { width: 14px; height: 14px; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .board-read-status .spinner { animation: none; }
}
#toast { color: #fff; background: #29496be8; border: 1px solid #ffffff38; border-radius: 14px; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  aside, .main-shell > header, .panel, .metric, .hero, dialog, .notice-panel { background: #f4f8fe; }
}
@media (prefers-reduced-transparency: reduce) {
  aside, .main-shell > header, .panel, .metric, .hero, dialog, .notice-panel {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #f5f8fd;
  }
}
@media (prefers-reduced-motion: reduce) {
  button, a, input, select, textarea { transition: none !important; }
}
@media (max-width: 1100px) {
  aside { padding: 23px 9px 16px; }
  .main-shell > header { margin-right: 15px; margin-left: 15px; padding-right: 16px; padding-left: 16px; }
}
@media (max-width: 700px) {
  aside { margin: 8px; top: auto; height: auto; padding: 15px 12px 10px; border-radius: 18px; z-index: auto; }
  nav { margin-top: 13px; gap: 4px; padding-bottom: 3px; }
  nav a { padding: 9px 11px; }
  .main-shell > header { margin: 8px; height: 52px; padding: 0 13px; border-radius: 15px; }
  .panel, .metric { border-radius: 15px; }
  .hero { border-radius: 18px; }
  .page-heading { align-items: stretch; }
  .global-alert { gap: 10px; }
  .global-alert > div { flex-basis: 100%; }
  .global-alert > .btn { flex: 1 1 135px; }
  dialog { border-radius: 19px; }
}
/* Black uses the same layout and glass layers with readable opaque table heads. */
:root[data-theme=dark] {
  color-scheme: dark;
  --ink: #eeeaf1;
  --muted: #b1aebc;
  --line: #d1c8dd28;
  --blue: #b4c6f2;
  --purple: #c6aee9;
  --glass: #252533b8;
  --glass-edge: #ede5f322;
  --glass-floating: #262632;
  --glass-shadow: 0 8px 30px #02060e29, 0 1px 2px #02060e24;
  --glass-highlight: inset 0 1px 0 #ffffff0b, inset 0 -1px 0 #ffffff03;
  background: #14141b;
}
:root[data-theme=dark] body {
  background:
    linear-gradient(144deg, transparent 20%, #d9c9e00c 26%, #dfd3dd15 27%, #baa6c408 29%, transparent 35%),
    linear-gradient(153deg, transparent 46%, #a6adc409 56%, #e2c7b917 57%, #c7b9d309 59%, transparent 65%),
    radial-gradient(ellipse at 15% 6%, #4643535e, transparent 52%),
    radial-gradient(ellipse at 85% 92%, #41435350, transparent 48%),
    linear-gradient(135deg, #17151c, #23222e 53%, #161820);
  background-attachment: fixed;
  color: var(--ink);
}
:root[data-theme=dark] :is(aside, .main-shell > header, .panel, .metric, .hero, .notice-panel) { background: linear-gradient(141deg, #33313fe0, #222431b8); border-color: var(--glass-edge); }
:root[data-theme=dark] :is(.brand small, .workspace small, .aside-bottom small, .nav-label, .eyebrow, .header-right, .metric-label, .metric small, p.sub, .field, .field small, .product small, td > small, .table-wrap td small, .record small, .pager, .empty, .sheet-table th small, .sheet-table td small, .report-footnote, .sheet-caption, .report-definition, .report-period-note, .details small, .row-more, .customer-site-status small, .assistant-progress-details, .assistant-welcome) { color: var(--muted); }
:root[data-theme=dark] .workspace { background: #ffffff04; border-color: #d7e6ff1a; }
:root[data-theme=dark] nav a { color: #aebdd0; }
:root[data-theme=dark] nav a:hover { background: #d8e7ff0a; border-color: #d8e7ff0b; }
:root[data-theme=dark] nav a.active { color: #b0caff; background: linear-gradient(135deg, #3c527c75, #304a6940); border-color: #9dbbff24; box-shadow: inset 0 1px 0 #ffffff09; }
:root[data-theme=dark] .brand-icon { background: linear-gradient(145deg, #4c7dc8, #3b63a6 55%, #5c5eac); border-color: #c5d7ff40; }
:root[data-theme=dark] .avatar { color: #c2d7ff; background: linear-gradient(145deg, #354663, #2a354c); border-color: #b2c9ed21; }
:root[data-theme=dark] :is(.local-pill, .icon-button) { color: #afc5e5; background: #dbe8ff08; border-color: #dbe8ff1c; }
:root[data-theme=dark] :is(.hero h2, .assistant-welcome h3) { color: var(--ink); }
:root[data-theme=dark] :is(.hero p, .hero .eyebrow) { color: #b1c3dc; }
:root[data-theme=dark] .metric-icon { color: #abc5fc; background: linear-gradient(145deg, #445e8a40, #34456640); border-color: #b6ccf323; box-shadow: inset 0 1px 0 #ffffff0c; }
:root[data-theme=dark] .panel-head { background: #ffffff03; }
:root[data-theme=dark] :is(.btn, .hero .btn) { color: #c7d6ec; background: linear-gradient(150deg, #40516c61, #34405854); border-color: #cadfff24; box-shadow: inset 0 1px 0 #ffffff08; }
:root[data-theme=dark] :is(.btn, .icon-button):hover:not(:disabled) { color: #f0f5ff; background: #42577875; border-color: #b5cff24d; }
:root[data-theme=dark] .btn.primary { color: #fff; background: linear-gradient(145deg, #427bce, #3767b4 58%, #555ca9); border-color: #8fb5f048; box-shadow: inset 0 1px 0 #dbeaff22, 0 3px 10px #02091826; }
:root[data-theme=dark] .btn.primary:hover:not(:disabled) { background: linear-gradient(145deg, #508cdd, #4072c0); }
:root[data-theme=dark] .btn:disabled { opacity: .54; }
:root[data-theme=dark] :is(.btn.danger, .btn[data-danger]) { color: #f4acb6; background: #713c493e; border-color: #dd8f9b3b; }
:root[data-theme=dark] .btn[data-danger]:hover:not(:disabled) { color: #ffd5dc; background: #713c4966; }
:root[data-theme=dark] :is(input:not([type=checkbox]):not([type=radio]), textarea, select, .report-period select) { color: var(--ink); background: #0e162586; border-color: #b5cee82b; box-shadow: inset 0 1px 3px #00000018; }
:root[data-theme=dark] :is(input, textarea)::placeholder { color: #99a9c0; }
:root[data-theme=dark] :is(input, textarea, select):focus { background: #172236; border-color: #89b4f3; outline-color: #80b3ff29; }
:root[data-theme=dark] :is(input:read-only, textarea:read-only) { background: #182335b3; color: #afbed3; }
:root[data-theme=dark] option { background: #1d293b; }
:root[data-theme=dark] :is(thead, .sheet-table thead th) { background: #202c3ded; color: #aec0d8; }
:root[data-theme=dark] th { color: #aec0d8; border-color: var(--line); }
:root[data-theme=dark] td { border-color: #a0b5d11c; }
:root[data-theme=dark] tbody tr:nth-child(even) { background: #adc5e503; }
:root[data-theme=dark] tbody tr:hover { background: #bfd7ff09; }
:root[data-theme=dark] .pager { background: #ffffff03; }
:root[data-theme=dark] .sheet-table :is(tbody th, tbody td) { background: #1a2435a1; border-color: #a0b5d124; }
:root[data-theme=dark] .sheet-table tbody tr:hover > :is(th, td) { background: #29394f; }
:root[data-theme=dark] .sheet-table :is(.sheet-period, .sheet-metric, .sheet-product) { background: #1f2b3ded; border-color: #a0b5d124; }
:root[data-theme=dark] .sheet-table .sheet-total, :root[data-theme=dark] .sheet-table .sheet-total > :is(th, td) { background: #2b4164ed !important; border-color: #a9c6ed39; }
:root[data-theme=dark] .sheet-table .sheet-selected > :is(th, td) { background: #273953ed; }
:root[data-theme=dark] :is(.report-tabs, .tabstrip, .theme-switch) { background: #0e18284d; border-color: #cbdcff1c; }
:root[data-theme=dark] :is(.report-tabs .btn, .return-tabs .btn, .tabstrip button, .theme-switch button) { color: #afc0d8; }
:root[data-theme=dark] :is(.report-tabs .btn[aria-pressed=true], .return-tabs .btn.primary, .tabstrip button.active, .theme-switch button[aria-pressed=true]) { color: #d5e5ff; background: linear-gradient(145deg, #3b527bc2, #304768a1); border-color: #bed2ff26; box-shadow: inset 0 1px 0 #ffffff0d; }
:root[data-theme=dark] :is(.badge, .platform) { color: #b3d0ff; background: #36548550; border-color: #bad5ff14; }
:root[data-theme=dark] .platform.wb { color: #d7b8f1; background: #6545754d; }
:root[data-theme=dark] :is(.metric.red strong, .red) { color: #f4a0b0; }
:root[data-theme=dark] :is(.metric.green strong, .green, .sheet-source) { color: #7ed7bc; }
:root[data-theme=dark] .badge.red { color: #f4a8b7; background: #713b4c59; }
:root[data-theme=dark] .badge.green { color: #8ad8bd; background: #285c4c61; }
:root[data-theme=dark] :is(.badge.orange, .sheet-source.incomplete, .report-definition > span, .assistant-poll-error) { color: #edc586; }
:root[data-theme=dark] .badge.orange { background: #70542d5c; }
:root[data-theme=dark] :is(.notice, .global-alert, .board-notice, .return-signal, .assistant-progress.offline) { color: #ecd2a5; background: linear-gradient(125deg, #473b23c2, #372d20b3); border-color: #d6ad5940; box-shadow: inset 0 1px 0 #ffffff06; }
:root[data-theme=dark] .notice.info { color: #b3cff2; background: #243a5bb3; border-color: #9fbde336; }
:root[data-theme=dark] :is(.global-alert.urgent, .board-notice.urgent, .danger-box, .return-signal.urgent, .customer-urgent, .return-conflict) { color: #f0b7c1; background: #50303bc9; border-color: #d38a9b47; }
:root[data-theme=dark] .notice-bell.has-notices span { color: #f2d599; background: #79602d75; border-color: #d2b5732e; }
:root[data-theme=dark] .notice-panel { background: #1b2739f5; }
:root[data-theme=dark] dialog { color: var(--ink); background: linear-gradient(140deg, #33313ffa, #242631fa); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 #ffffff0d, 0 30px 95px #00000073; }
:root[data-theme=dark] dialog::backdrop { background: #050a14a1; }
:root[data-theme=dark] :is(.details, .chat-message, .card-message, .card-photo, .quick, .insight-box, .report-auto, .customer-site-status, .pricing-sync, .assistant-progress) { color: var(--ink); background: #1c2a3cb8; border-color: #a9c3e62b; }
:root[data-theme=dark] .chat-message.user { background: #2f476b99; border-color: #a9c3e62b; }
:root[data-theme=dark] .card-message.photo-request { background: #4b40266e; border-color: #d5b98533; }
:root[data-theme=dark] .reply-batch-sheet .dialog-actions { background: #1b2739f5; }
:root[data-theme=dark] :is(.ai-working, .assistant-progress.active) { background: #3337588c; border-color: #b2b1e136; }
:root[data-theme=dark] :is(.ai-orbit, .assistant-motion, .quick span:first-child, .step-number) { color: #b8cafa; background: #3c4b714d; border-color: #b9cff426; }
:root[data-theme=dark] .assistant-progress.active .assistant-motion span { background: #b0baff; }
:root[data-theme=dark] :is(.live-sale, .price-details summary) { color: #b8c7ff; }
:root[data-theme=dark] :is(.mini-bar, .demand-bar > div) { background: #bed5f51a; }
:root[data-theme=dark] #toast { color: #eff6ff; background: #30465df2; border-color: #c5d8f32e; }
@media (max-width: 700px) {
  .main-shell > header > div:first-child { display: none; }
  .header-right { gap: 7px; min-width: 0; width: 100%; justify-content: space-between; }
  .header-right #sync { display: none; }
  .theme-switch button { font-size: 10px; padding: 5px 7px; }
}
@media (prefers-reduced-transparency: reduce) {
  :root[data-theme=dark] :is(aside, .main-shell > header, .panel, .metric, .hero, dialog, .notice-panel) { background: #1b2636; }
}
@media (forced-colors: active) {
  aside, .main-shell > header, .panel, .metric, .hero, dialog, .notice-panel, .btn, input, select, textarea {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  nav a.active { outline: 2px solid Highlight; }
  :root[data-theme], :root[data-theme] body, :root[data-theme] :is(aside, .main-shell > header, .panel, .metric, .hero, dialog, .notice-panel, .btn, input, select, textarea, .theme-switch, .theme-switch button) { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
}

/* One main action, optional parameters, and compact operational lists. */
.simple-workspace .page-heading { margin-bottom: 12px; gap: 16px; flex-wrap: wrap; }
.simple-workspace .page-heading > div:not(.actions) { flex: 1; min-width: min(100%, 280px); }
.simple-workspace .page-heading h1 { font-size: clamp(24px, 2.1vw, 32px); line-height: 1.2; }
.simple-workspace .page-heading .sub { font-size: 12px; max-width: 70ch; }
.simple-workspace .btn { font-size: 12px; min-height: 34px; padding: 7px 12px; border-radius: 10px; }
.simple-workspace .page-heading .actions { flex-wrap: wrap; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.workflow-guide > small { display: block; margin-bottom: 8px; }
.workflow-hint { color: var(--muted); font-size: 12px; line-height: 1.5; max-width: 110ch; margin: 0 0 8px; }
.workflow-filter-status { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.workflow-filter-tag { font-size: 10px; border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; color: var(--muted); }
.workflow-filter-reset { background: none; border: 0; padding: 2px 3px; font: inherit; font-size: 11px; color: var(--blue); text-decoration: underline; cursor: pointer; }
.workflow-options { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 20px; background: var(--glass); }
.workflow-options[hidden] { display: none !important; }
.workflow-options .filters { margin: 12px 0; padding: 0; border: 0; background: transparent; }
.workflow-options .report-period { margin: 12px 0; }
.workflow-extra-actions { margin-bottom: 12px; gap: 8px; }
#workflow-stage:not(:empty) { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; }
#workflow-stage .spinner { width: 14px; height: 14px; margin: 0; }
.simple-workspace .metrics { gap: 12px; }
.simple-workspace .metric { padding: 18px; min-height: 130px; }
.simple-workspace .metric strong { font-size: 28px; margin: 12px 0 8px; }
.simple-workspace .metric small { font-size: 11px; }
.simple-workspace .panel-head { padding: 18px 20px; }
.simple-workspace .panel-head h2 { font-size: 16px; }
.simple-workspace table th, .simple-workspace table td { padding: 13px 16px; font-size: 12px; }
.simple-workspace table td small { font-size: 10px; line-height: 1.5; }
.simple-workspace .report-definition { margin: 16px 0; }
.simple-workspace .notice { font-size: 12px; }
.report-origin-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 28px; margin: 0; padding-left: 18px; }
.report-origin-steps li { font-size: 12px; line-height: 1.6; color: var(--muted); padding-left: 2px; overflow-wrap: anywhere; }
.report-origin-steps li strong { color: var(--ink); }
.report-origin .sheet-caption { font-size: 11px; margin: 7px 0 0; }
.report-origin-evidence { margin-top: 14px; font-size: 12px; }
.report-origin { scroll-margin-top: 96px; }
.report-chain { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); font-size: 12px; }
.report-chain strong { font-weight: 600; }
.report-chain small { display: block; color: var(--muted); margin-top: 5px; font-size: 11px; }
.report-chain .btn { flex-shrink: 0; }
.week-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.week-kpis > div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.week-kpis small { display: block; color: var(--muted); font-size: 11px; }
.week-kpis strong { display: block; margin: 4px 0; font-size: clamp(15px,1.6vw,22px); font-variant-numeric: tabular-nums; }
.store-sheet { min-width: 1040px; }
.store-sheet th:not(.sheet-store) { text-align: right; }
.daily-sheet { min-width: 930px; }
.daily-sheet .sheet-day { position: sticky; left: 0; z-index: 2; min-width: 115px; white-space: nowrap; }
.daily-sheet .sheet-day small { display: inline; margin-left: 3px; }
.report-day-scope { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.report-day-scope select { width: auto; }
.report-daily-fixed { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 12px 16px; font-size: 12px; color: var(--muted); }
.report-daily-fixed b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.task-messenger-controls { display: grid; gap: 4px; margin-block: 6px; }
.task-messenger-controls > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.manager-advertising { margin-bottom: 12px; }
@media (max-width: 700px) { .report-day-scope { margin-top: 10px; } }
.sheet-table .sheet-store { position: sticky; inset-inline-start: 0; z-index: 2; min-width: 91px; background: #f1f6fd; border-right: 1px solid var(--line); }
.sheet-table thead .sheet-store { z-index: 5; }
:root[data-theme=dark] .sheet-table .sheet-store { background: #1f2b3d; }
.report-origin-title { padding: 14px 18px; cursor: pointer; }
.report-origin-title .badge { margin-inline-start: 10px; }
@media (max-width: 760px) { .week-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.notice-bell.has-notices #notice-count, :root[data-theme=dark] .notice-bell.has-notices #notice-count {
 color: #fff; background: #e44c5b; border: none; min-width: 21px; height: 21px; padding: 2px 6px; border-radius: 7px; font-size: 12px; display: inline-flex; justify-content: center; align-items: center;
}
aside.notice-panel { position: fixed; inset: 78px 20px 20px auto; width: min(1120px, calc(100vw - 40px)); height: auto; max-height: none; margin: 0; padding: 22px; z-index: 80; display: block; overflow: auto; border-radius: 20px; background: #f7f9fdf7; }
aside.notice-panel[hidden] { display: none !important; }
.notice-panel-head { align-items: flex-start; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.notice-panel-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 20px; }
.notice-panel-head p { color: var(--muted); font-size: 12px; margin: 7px 0 0; }
.notice-unread-total { background: #e44c5b; color: white; padding: 3px 7px; font-size: 12px; border-radius: 7px; }
.notice-panel .btn { padding: 6px 10px; font-size: 11px; min-height: 30px; border-radius: 9px; }
.notice-explainer { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 13px 0; color: var(--muted); font-size: 11px; }
.notice-options { min-width: 150px; text-align: right; }
.notice-options label { display: flex; gap: 8px; flex-direction: column; padding: 10px 0; }
.notice-options select { font-size: 12px; padding: 7px 9px; }
.notice-list { display: flex; gap: 13px; flex-direction: column; }
.notice-product { background: #ffffffb8; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.notice-product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notice-product-head strong { font-size: 13px; font-weight: 650; }
.notice-product-head small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.notice-product-head > span { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.notice-problem { display: grid; grid-template-columns: 86px minmax(0,1fr) auto; align-items: start; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.notice-problem:last-child { border-bottom: 0; }
.notice-category { font-size: 10px; color: #a13d53; background: #de5e7820; padding: 3px 7px; border-radius: 6px; }
.notice-problem.urgent .notice-category { color: #b12a44; background: #e65a7530; }
.notice-problem.info .notice-category { color: #3e669c; background: #5582c41c; }
.notice-reason { min-width: 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.notice-reason strong { font-size: 12px; }
.notice-reason p { margin: 3px 0; font-size: 12px; }
.notice-reason > small { display: block; color: var(--muted); font-size: 10px; }
.notice-row-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.notice-seen-mark { color: var(--muted); font-size: 11px; padding: 5px; text-align: center; }
.notice-problem.seen .notice-category { opacity: .7; }
.global-alert { padding: 12px 18px; gap: 12px; }
.global-alert strong { font-size: 12px; }
.global-alert span { font-size: 11px; }
:root[data-theme=dark] aside.notice-panel { background: #172335f8; }
:root[data-theme=dark] .notice-product { background: #223044a3; }
:root[data-theme=dark] .notice-category { color: #f4acb9; background: #bc586c2e; }
:root[data-theme=dark] .notice-problem.urgent .notice-category { color: #ffc0cc; background: #d85c7638; }
:root[data-theme=dark] .notice-problem.info .notice-category { color: #a9c9f3; background: #527cb838; }
.badge.order-api-status {
  gap: 6px;
  min-height: 25px;
  padding: 3px 8px;
  vertical-align: middle;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.order-api-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.order-api-status:hover { text-decoration: underline; }
.order-api-status:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#modal:has(.order-api-details) { width: min(500px, 94vw); }
.order-api-details .coverage-row + .coverage-row { border-top: 1px solid var(--line); }
.order-api-details .coverage-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.order-api-details .coverage-row > :last-child { text-align: right; }
@media (max-width: 850px) {
 .report-chain { align-items: flex-start; flex-direction: column; gap: 8px; }
 .report-origin-steps { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .simple-workspace .page-heading { align-items: flex-start; flex-direction: column; }
 .simple-workspace .page-heading > div:not(.actions) { flex: 0 1 auto; min-width: 0; width: 100%; }
 .simple-workspace .page-heading .actions { flex-wrap: wrap; }
 aside.notice-panel { inset: 64px 10px 10px; width: auto; padding: 16px; border-radius: 16px; }
 .notice-problem { grid-template-columns: 68px minmax(0,1fr); gap: 9px; }
 .notice-row-actions { grid-column: 2; flex-direction: row; }
 .notice-product { padding: 0 12px; }
 .notice-product-head { gap: 8px; }
 .notice-explainer { flex-wrap: wrap; }
 .notice-options { text-align: left; }
}
@media (forced-colors: active) {
 :root[data-theme] :is(.workflow-options, .notice-product, aside.notice-panel, .notice-category, .notice-unread-total, #notice-count) { color: CanvasText; background: Canvas; border: 1px solid CanvasText; }
}

/* Keep process steps and the weekly calculation legible in both themes. */
:root[data-theme=dark] :is(.flow div, .report-sources) {
  color: var(--muted);
  background: #1b283b;
  border-color: var(--line);
  box-shadow: inset 0 1px 0 #ffffff0b;
}
:root[data-theme=dark] :is(.flow b, .report-sources > summary) { color: var(--ink); }
.report-period label { min-width: 0; }
.report-period select { max-width: 100%; }
.procurement-filters { margin: 0 0 16px; }
.procurement-filters .filters { margin-bottom: 8px; align-items: end; }
.procurement-filters label { display: grid; gap: 4px; min-width: 0; font-size: 11px; color: var(--muted); }
.procurement-search { flex: 1 1 190px; }
.procurement-filters .procurement-search input { width: 100%; min-width: 0; }
.procurement-demand {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px;
  padding: 13px 16px; margin-bottom: 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px;
}
.procurement-demand strong { display: block; color: var(--ink); }
.procurement-demand small { display: block; margin-top: 4px; color: var(--muted); }
#main .procurement-demand + .report-sources { margin: 0 0 14px; }
.manager-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.manager-comparison details { min-width: 155px; }
.manager-comparison details[open] { min-width: min(335px, 68vw); }
.manager-comparison summary { cursor: pointer; }
.manager-comparison th, .manager-comparison td { padding: 6px 8px; }
.manager-materials { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0 8px; overflow-wrap: anywhere; }
.manager-materials img { display: block; width: 70px; height: 56px; object-fit: cover; border-radius: 8px; margin-bottom: 3px; }
#manager-work-form [hidden] { display: none; }
.stop-reason { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 150px; }
.price-queue > summary, .staff-unassigned > summary {
  cursor: pointer; padding: 13px 18px; font-weight: 650; color: var(--ink);
}
.price-queue > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; }
.price-queue > summary::-webkit-details-marker { display: none; }
.price-queue-toggle::after { content: "Показать ▾"; color: var(--muted); font-weight: 500; white-space: nowrap; }
.price-queue[open] .price-queue-toggle::after { content: "Свернуть ▴"; }
.price-queue-list, .staff-work-list, .staff-comment-list { margin: 0 0 12px; padding: 0; list-style: none; }
.price-queue-list li, .staff-work-list li, .staff-comment-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.price-queue-list small, .staff-work-list small, .staff-comment-list small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.price-queue-list details { margin-top: 4px; color: var(--muted); }
.price-queue-list details summary { cursor: pointer; }
.team-unread { margin-inline-start: auto; color: var(--ink); background: var(--glass); border-radius: 12px; padding: 1px 6px; font-size: 11px; }
.team-unread[hidden], .team-chat [hidden], #team-chat-create-form [hidden] { display: none; }
.team-chat { display: grid; grid-template-columns: minmax(218px, 28%) minmax(0, 1fr); overflow: hidden; }
.team-chat-sidebar { min-width: 0; padding: 12px; border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--glass) 65%, transparent); }
.team-chat-sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.team-chat-sidebar-top h2, .team-chat-title h2 { font-size: 16px; margin: 0; color: var(--ink); }
.team-chat-sidebar-top .btn { white-space: nowrap; }
#team-chat-list { display: grid; gap: 4px; max-height: min(65vh, 690px); overflow: auto; scrollbar-width: thin; padding: 3px; }
.team-chat-room {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 9px 8px; min-height: 60px; min-width: 0; border-radius: 13px;
  border: 1px solid transparent; background: transparent; color: var(--ink); text-align: start; cursor: pointer;
}
.team-chat-room:hover { background: var(--glass); }
.team-chat-room[aria-current="true"] { border-color: color-mix(in srgb, var(--blue) 28%, var(--line)); background: color-mix(in srgb, var(--blue) 10%, var(--glass)); }
.team-chat-icon, .team-message-avatar {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
  background: color-mix(in srgb, var(--blue) 13%, var(--glass)); color: var(--blue);
  border: 1px solid var(--line); font-size: 14px; font-weight: 750;
}
.team-chat-room-copy, .team-chat-title { min-width: 0; }
.team-chat-room-copy strong, .team-chat-room-copy > span, .team-chat-title p {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.team-chat-room-copy strong { margin-bottom: 3px; font-size: 13px; }
.team-chat-room-copy > span, .team-chat-room-meta time, .team-chat-title p { color: var(--muted); font-size: 11px; }
.team-chat-room-meta { display: grid; align-self: stretch; align-content: center; justify-items: end; gap: 4px; }
.team-chat-room-count {
  padding: 2px 6px; min-width: 18px; border-radius: 12px;
  color: var(--ink); background: color-mix(in srgb, var(--blue) 24%, var(--glass)); font-size: 11px; text-align: center;
}
.team-chat-pane { min-width: 0; min-height: 350px; padding: 0 16px 14px; }
.team-chat-header { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.team-chat-title h2 { overflow-wrap: anywhere; }
.team-chat-title p { margin: 3px 0 0; font-size: 12px; }
.team-chat-zone { margin-inline-start: auto; flex: none; padding: 4px 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; }
.team-chat-sound.btn { min-height: 32px; padding: 5px 8px; font-size: 11px; white-space: nowrap; }
.team-chat-sound.btn[aria-pressed=true] { color: var(--ink); background: color-mix(in srgb, var(--blue) 20%, var(--glass)); }
.card-packaging, .card-extra-options { min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.card-packaging legend { padding-inline: 5px; color: var(--ink); font-weight: 650; }
.card-packaging-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.card-packaging-choices label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.card-packaging-choices input { margin: 0; }
.card-packaging-choices label:has(input:checked) { color: var(--ink); background: color-mix(in srgb,var(--blue) 15%,var(--glass)); }
.card-packaging-summary { display: block; margin-top: 4px; color: var(--muted); }
.card-extra-options > summary { color: var(--blue); font-weight: 700; cursor: pointer; }
.card-extra-options[open] > summary { margin-bottom: 10px; }
.card-extra-options select[name=platform] { border-color: var(--blue); color: var(--ink); font-weight: 650; }
#card-missing-info[hidden] { display: none; }
.team-chat-top, .staff-work-page { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.team-chat-top { padding: 7px 0 2px; min-height: 25px; }
#team-chat-status { margin-inline-start: auto; }
#team-chat-messages {
  display: flex; flex-direction: column; gap: 10px; height: clamp(230px, 50vh, 560px);
  padding: 10px 3px 12px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain;
}
.team-chat-day { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; padding: 3px 0; }
.team-chat-day::before, .team-chat-day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.team-chat-empty { flex: 1; min-height: 190px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 12px; color: var(--muted); text-align: center; }
.team-chat-empty strong { color: var(--ink); font-size: 16px; }
.team-message { display: flex; align-items: end; align-self: flex-start; gap: 7px; max-width: min(94%, 74ch); min-width: 0; }
.team-message.own { align-self: flex-end; flex-direction: row-reverse; }
.team-message-avatar { width: 27px; height: 27px; font-size: 11px; border-radius: 9px; }
.team-message-bubble { min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 14px 14px 14px 5px; background: var(--glass); }
.team-message.own .team-message-bubble { border-radius: 14px 14px 5px 14px; background: color-mix(in srgb, var(--blue) 12%, var(--glass)); }
.team-message-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); }
.team-message-meta strong { color: var(--ink); }
.team-message-meta time { margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.team-message-task { font: inherit; color: var(--blue); background: transparent; border: 0; padding: 3px 5px; cursor: pointer; border-radius: 5px; }
.team-message-task:hover, .team-message-task:focus-visible { background: color-mix(in srgb, var(--blue) 13%, transparent); }
.team-message-target .team-message-bubble { outline: 2px solid var(--blue); outline-offset: 2px; }
.task-panel .panel-head { gap: 12px; }
.task-alert-controls { display: grid; justify-items: start; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.task-alert-controls small { color: var(--muted); }
.task-alert-controls small:empty { display: none; }
.task-browser-alert { display: grid; justify-items: start; gap: 5px; }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 12px 16px 0; }
.task-filters { justify-content: flex-start; padding-bottom: 12px; }
.task-filters input[type=search] { flex: 1 1 205px; min-width: 0; }
.task-filters input[type=search], .task-filters select { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.task-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; color: var(--ink); font-size: 12px; }
.task-toggle input { margin: 0; }
.task-segment { display: inline-flex; flex-wrap: wrap; gap: 3px; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.task-segment button { padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.task-segment button[aria-pressed=true] { color: var(--ink); background: color-mix(in srgb, var(--blue) 17%, var(--glass)); font-weight: 650; }
.task-empty { display: grid; justify-items: center; gap: 5px; padding: 35px 12px; color: var(--muted); text-align: center; }
.task-empty strong { color: var(--ink); }
.task-title { border: 0; background: transparent; color: var(--blue); cursor: pointer; font: inherit; font-weight: 680; padding: 0; text-align: left; overflow-wrap: anywhere; }
.task-title:hover { text-decoration: underline; }
.task-panel .table-wrap { border-top: 1px solid var(--line); }
.task-panel td:first-child { min-width: 180px; }
.task-panel td:nth-child(3) { min-width: 130px; }
.task-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-tags:empty { display: none; }
.task-panel td .task-tags { margin-top: 5px; }
.task-priority, .task-check-count, .task-status { display: inline-block; border-radius: 6px; padding: 3px 6px; font-size: 11px; line-height: 1.25; }
.task-priority { color: #974520; background: #e9893c24; }
.task-check-count { color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, transparent); }
.task-status { color: var(--ink); background: color-mix(in srgb, var(--stage-color) 15%, var(--glass)); white-space: nowrap; }
.stage-new { --stage-color: #8799b8; }
.stage-doing { --stage-color: #5b94ee; }
.stage-review { --stage-color: #bd8440; }
.stage-done { --stage-color: #3aab88; }
.task-overdue, .task-error { color: #a53243; }
:root[data-theme=dark] .task-priority { color: #ffcc9c; }
:root[data-theme=dark] :is(.task-overdue, .task-error) { color: #ff9daf; }
.tasks-kanban { display: grid; grid-template-columns: repeat(4,minmax(170px,1fr)); gap: 9px; overflow-x: auto; padding: 0 12px 12px; }
.task-column { min-height: 180px; padding: 8px; border: 1px solid var(--line); border-top: 2px solid var(--stage-color); border-radius: 10px; background: color-mix(in srgb, var(--stage-color) 7%, transparent); }
.task-column:only-child { grid-column: 1/-1; }
.task-column.drop-ready { outline: 2px solid var(--blue); outline-offset: -2px; }
.task-column h3 { font-size: 12px; margin: 2px 2px 9px; color: var(--ink); }
.task-column h3 span, .task-column-empty { color: var(--muted); font-weight: 500; }
.task-column h3 span { margin-inline-start: 4px; }
.task-column-empty { font-size: 11px; margin: 14px 2px; }
.task-card { display: grid; gap: 6px; width: 100%; text-align: left; font: inherit; font-size: 12px; color: var(--ink); padding: 8px 9px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--glass); cursor: grab; overflow-wrap: anywhere; }
.task-card:hover { border-color: var(--blue); }
.task-card:active { cursor: grabbing; }
.task-card-assignee { display: flex; gap: 5px; align-items: center; color: var(--muted); }
.task-initials { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); font-size: 10px; }
.task-card-due { font-size: 11px; color: var(--muted); }
.task-detail-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; align-items: end; padding: 0 0 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.task-detail-meta small { display: block; color: var(--muted); margin-bottom: 4px; }
.task-description, .task-event p { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-source-note { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: color-mix(in srgb, var(--blue) 6%, var(--glass)); font-size: 12px; }
.task-source-note a { color: var(--blue); }
.task-source-note small { display: block; margin-top: 3px; }
.task-check-editor { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.task-check-editor summary { cursor: pointer; color: var(--ink); font-size: 13px; }
.task-check-editor .field { margin-top: 7px; }
.task-checklist { margin: 12px 0; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.task-checklist legend { font-weight: 650; font-size: 13px; }
.task-checklist label { display: flex; align-items: start; gap: 8px; padding: 5px 0; font-size: 13px; overflow-wrap: anywhere; cursor: pointer; }
.task-checklist label:has(:checked) span { color: var(--muted); text-decoration: line-through; }
.task-thread { margin-top: 12px; }
.task-thread h3 { font-size: 14px; margin: 0 0 6px; }
.task-events { max-height: 200px; overflow-y: auto; }
.task-event { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.task-event time { margin-left: 5px; color: var(--muted); font-size: 11px; }
.task-event p { margin: 4px 0 0; color: var(--muted); }
.task-comment p { color: var(--ink); }
#team-task-comment { display: flex; align-items: end; gap: 8px; margin-top: 7px; }
#team-task-comment label { flex: 1; min-width: 0; }
.task-error { margin-top: 8px; font-size: 12px; }
.return-delivery-value { min-width: 105px; overflow-wrap: anywhere; }
.return-tracking-value { font-variant-numeric: tabular-nums; user-select: all; }
@media (max-width:700px) {
  .tasks-kanban { grid-template-columns: repeat(4,minmax(165px,1fr)); }
  .task-detail-meta { align-items: start; }
  .task-toolbar { padding-inline: 10px; }
}
.team-message p, .staff-comment-list p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#team-chat-form, #staff-comment-form { display: flex; gap: 10px; align-items: end; margin-top: 10px; }
#team-chat-form label, #staff-comment-form label { flex: 1; min-width: 0; }
#team-chat-form { border-top: 1px solid var(--line); padding-top: 10px; }
#team-chat-form textarea { min-height: 56px; resize: vertical; }
.team-chat-send { display: grid; gap: 4px; text-align: center; }
.team-attachment { display: grid; gap: 4px; margin: 5px 0 2px; max-width: 350px; }
.team-attachment img,.team-attachment video { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; }
.team-attachment a { color: var(--blue); overflow-wrap: anywhere; font-size: 12px; }
.team-attachment small { color: var(--muted); white-space: nowrap; }
.team-chat-draft-files { display: flex; flex-wrap: wrap; gap: 4px; }
.team-chat-draft-files:empty { display: none; }
.team-chat-file-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); overflow-wrap: anywhere; }
.team-chat-file-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
#team-chat-keys { line-height: 1.2; }
#team-chat-new:not([hidden]) { display: block; margin: 3px auto 0; }
.team-chat-people { border: 0; padding: 0; margin: 13px 0 8px; max-height: min(40vh, 320px); overflow-y: auto; }
.team-chat-people legend { color: var(--ink); font-weight: 650; padding: 0 0 6px; }
.team-chat-person { display: flex; align-items: center; gap: 9px; padding: 7px 9px; margin: 0 0 4px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.team-chat-person:has(input:checked) { background: color-mix(in srgb, var(--blue) 11%, var(--glass)); }
.team-chat-person small { display: block; margin-top: 2px; color: var(--muted); }
.team-chat-error { color: var(--danger, #ae4545); }
.staff-work-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 13px; }
.staff-work-counts { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.staff-work-list li { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 9px; align-items: start; }
.staff-work-list time { font-size: 12px; color: var(--muted); }
.staff-work-list a { color: var(--ink); }
.staff-work-page { justify-content: flex-end; }
.warehouse-times { margin: 12px 0; }
.warehouse-times summary { cursor: pointer; color: var(--ink); }
@media (max-width: 900px) {
  .team-chat { grid-template-columns: minmax(0, 1fr); }
  .team-chat-sidebar { padding: 8px 10px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .team-chat-sidebar-top { margin-bottom: 4px; }
  #team-chat-list { display: flex; max-height: none; overflow-x: auto; scroll-snap-type: x proximity; }
  .team-chat-room { flex: 0 0 min(190px, 49%); scroll-snap-align: start; }
  .team-chat-pane { padding: 0 10px 10px; }
  #team-chat-messages { height: clamp(185px, 42vh, 450px); }
}
@media (max-width: 540px) {
  .staff-work-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .staff-work-list li > .badge { grid-column: 2; justify-self: start; }
  #staff-comment-form { flex-wrap: wrap; }
  #staff-comment-form label { flex-basis: 100%; }
  #team-chat-keys, .team-message-role { display: none; }
  .team-message-bubble { padding: 7px 9px; }
}
.market-search-box { padding: 12px 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.market-search-box .filters { margin-bottom: 7px; align-items: end; }
.market-query-main label { display: grid; gap: 4px; flex: 1 1 155px; color: var(--muted); font-size: 12px; }
.market-query-main label:first-child { flex-grow: 2; }
.market-query-main input { width: 100%; min-width: 0 !important; }
.procurement-summary, .procurement-chart-grid-layout, .procurement-facts {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(155px,100%),1fr));
}
.procurement-summary { margin: 12px 0; }
.procurement-summary > div, .procurement-facts > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--glass);
}
.procurement-summary :is(span,small), .procurement-facts dt { display: block; color: var(--muted); font-size: 11px; }
.procurement-summary strong { display: block; margin: 2px 0; font-size: 20px; }
.procurement-facts dd { margin: 4px 0 0; font-weight: 650; }
.procurement-view-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.procurement-chart-grid-layout { grid-template-columns: repeat(auto-fit,minmax(min(260px,100%),1fr)); }
.procurement-chart-grid-layout > div { min-width: 0; }
.procurement-chart-grid-layout svg { display: block; max-width: 400px; width: 100%; }
.procurement-chart-grid-layout svg text { fill: var(--muted); font-size: 10px; }
.procurement-chart-grid { fill: none; stroke: var(--line); }
.procurement-chart-line { fill: none; stroke: var(--blue); stroke-width: 2; }
.procurement-chart-dot { fill: var(--blue); }
.procurement-charts td .btn { min-width: 34px; min-height: 27px; padding: 4px 6px; }
[data-action=procurement-detail] { white-space: normal; }
.product [data-action=procurement-detail] { text-align: start; font-weight: 650; padding-inline: 0; border: 0; background: transparent; box-shadow: none; color: var(--ink); }
.product [data-action=procurement-detail]:hover { text-decoration: underline; }
#ad-live-state { margin: 12px 0; }
.order-unavailable { max-width: 210px; }
.new-price-parameters { margin: 12px 0; }
.new-price-parameters > .form-grid { margin-top: 10px; }
.product .btn[data-action=stop-list-from-abc] { min-height: 25px; padding: 3px 7px; margin: 6px 4px 0 0; font-size: 11px; }
#stop-edit-history ul { padding-inline-start: 18px; }
#stop-edit-history li { padding: 5px 0; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .procurement-demand { grid-template-columns: 1fr; gap: 9px; }
  .procurement-search { flex-basis: 100%; }
  .procurement-filters label:has(select) { flex: 1 1 120px; }
  .procurement-filters select { width: 100%; }
  .report-period { align-items: start; }
}
@media (forced-colors: active) {
  :root[data-theme] :is(.flow div, .report-sources, .procurement-demand) { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  :root[data-theme] :is(.flow b, .report-sources > summary, .procurement-demand strong, .procurement-demand small) { color: CanvasText; }
}

@media (forced-colors: none) {
  :root[data-theme=light] :is(.workspace, .local-pill, .icon-button, .metric-icon, .theme-switch, .report-tabs, .tabstrip) { background: #f1f3f6b8; border-color: var(--glass-edge); color: var(--muted); }
  :root[data-theme=light] :is(nav a, .nav-label, .brand small, .header-right, .eyebrow, p.sub, .field, .field small, .btn:not(.primary):not(.danger):not([data-danger])) { color: var(--muted); }
  :root[data-theme=light] .btn:not(.primary):not(.danger):not([data-danger]) { border-color: var(--glass-edge); }
  :root[data-theme=light] :is(nav a.active, .theme-switch button[aria-pressed=true], .report-tabs .btn[aria-pressed=true], .tabstrip button.active, .return-tabs .btn.primary) { color: #244c86; background: linear-gradient(145deg,#fff,#e5edf9); border-color: #bccce5; }
  :root[data-theme=light] .btn.primary:not(.return-tabs .btn) { color: #fff; background: linear-gradient(145deg,#396bb3,#31558f); border-color: #365d99; }
  :root[data-theme=light] .btn.primary:not(.return-tabs .btn):hover:not(:disabled) { background: #294f8a; }
  :root[data-theme=light] :is(input:not([type=checkbox]):not([type=radio]), textarea, select, option) { color: var(--ink); background: #fffffff0; border-color: #68799156; }
  :root[data-theme=light] :is(input, textarea, select):focus { border-color: var(--blue); outline-color: #396bb330; }
  :root[data-theme=light] :is(input, textarea)::placeholder { color: var(--muted); }
  :root[data-theme=light] :is(thead, .sheet-table thead th) { color: #425066; background: #edf0f4; border-color: var(--line); }
  :root[data-theme=light] th { color: #425066; }
  :root[data-theme=light] .reply-batch-sheet .dialog-actions { background: var(--glass-floating); }
  :root[data-theme=dark] :is(thead, .sheet-table thead th) { background: #2d2b38ef; color: #d0c8da; }
  :root[data-theme=dark] :is(.notice-panel, .reply-batch-sheet .dialog-actions) { background: var(--glass-floating); }
  :root[data-theme] .card-extra-options select[name=platform] { border-color: var(--blue); }
}
.ad-controls { margin-top: 14px; }
.ad-controls .table-wrap { max-height: 340px; overflow: auto; }
.ad-controls td { padding: 9px 12px; }
.ad-controls .btn { min-height: 32px; padding: 6px 12px; font-size: 13px; }
#ad-parameter-form { display: grid; gap: 12px; max-width: 620px; }
#ad-parameter-form > label:not(.check-field) { display: grid; gap: 6px; }
#ad-parameter-form :is(input[type=number],select) { width: 100%; }
#ad-catalog-content .panel-body { padding-bottom: 10px; }

/* Audit: keep form actions reachable in long dialogs in both themes. */
#modal .dialog-actions{position:sticky;bottom:-1px;z-index:4;flex-wrap:wrap;padding:12px 0 4px;background:var(--glass-panel,rgba(245,248,253,.95));border-top:1px solid var(--glass-border,rgba(130,148,177,.22));backdrop-filter:blur(16px)}
html[data-theme="dark"] #modal .dialog-actions,body[data-theme="dark"] #modal .dialog-actions{background:rgba(33,38,55,.96)}
.board-comment{padding:12px 0;border-bottom:1px solid var(--line,rgba(130,148,177,.22));overflow-wrap:anywhere}
.board-comment p{white-space:pre-wrap}.board-comment.deleted{opacity:.65}
.team-reply-context,.team-message-quote{display:block;padding:8px 10px;border-left:3px solid #6398e7;font-size:12px;background:rgba(100,150,230,.1);border-radius:6px}
.team-reply-context[hidden]{display:none}

/* Task cards posted into team chat from the task board */
.stage-cancelled { --stage-color: #9aa3ad; }
.team-task-chat-card { display: grid; gap: 5px; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--line); border-left: 3px solid var(--stage-color, #8799b8); border-radius: 8px; background: color-mix(in srgb, var(--stage-color, #8799b8) 8%, transparent); }
.team-task-chat-card.overdue { border-left-color: #a53243; }
.team-task-chat-card .task-title { justify-self: start; font-weight: 600; text-align: left; }
.team-task-chat-head, .team-task-chat-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.team-task-chat-line { margin-top: 4px; }
.team-task-chat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.task-chat-overdue { --stage-color: #a53243; color: #a53243; }
:root[data-theme=dark] .task-chat-overdue { color: #ff9daf; }

/* Grouped primary navigation and the phone drawer. */
.board-navigation-sidebar .nav-label {display:none}
.board-navigation-sidebar {display:flex;flex-direction:column;min-height:0}
.board-navigation-sidebar #nav {display:flex;flex-direction:column;align-items:stretch;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;margin:0;padding:4px;gap:3px;overscroll-behavior:contain}
.board-navigation-sidebar #nav a,.board-navigation-sidebar #nav summary {box-sizing:border-box;min-height:38px;height:auto;flex:none;display:flex;align-items:center;white-space:normal;line-height:1.3}
.board-navigation-sidebar #nav a {gap:9px;padding:7px 9px}
.board-navigation-sidebar #nav .nav-icon {width:20px;flex:none;text-align:center}
.board-nav-direct {display:grid;gap:2px;padding-bottom:6px;border-bottom:1px solid var(--line);margin-bottom:4px}
.board-navigation-sidebar #nav details {flex:none;margin:0;padding:0;border:0;background:transparent;color:var(--ink)}
.board-navigation-sidebar #nav summary {justify-content:space-between;gap:5px;cursor:pointer;padding:7px 9px;font-weight:600;font-size:13px;border-radius:9px;list-style:none}
.board-navigation-sidebar #nav summary::-webkit-details-marker {display:none}
.board-navigation-sidebar #nav summary::after {content:"";width:7px;height:7px;box-sizing:border-box;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);margin-right:3px;flex:none}
.board-navigation-sidebar #nav details[open]>summary::after {transform:rotate(45deg)}
.board-navigation-sidebar #nav summary:hover {background:var(--collab-selected,var(--line))}
.board-navigation-sidebar #nav :is(summary,a):focus-visible,.board-nav-open:focus-visible,.board-nav-close:focus-visible {outline:2px solid var(--blue);outline-offset:-2px}
.board-navigation-sidebar #nav details a {margin-left:8px;padding-left:10px;font-size:12px}
.board-navigation-sidebar #nav .board-nav-owner {margin-top:auto;padding-top:8px;border-top:1px solid var(--line)}
.board-nav-open,.board-nav-close {display:none}
.board-nav-open[hidden] {display:none!important}
#board-navigation-drawer {padding:0;margin:0;inset:0 auto 0 0;border:0;border-radius:0;max-width:none;max-height:none;width:min(340px,calc(100% - 32px));height:100dvh;box-sizing:border-box;background:var(--collab-surface,#fff);color:var(--ink);overflow:hidden;box-shadow:10px 0 38px #0004}
#board-navigation-drawer::backdrop {background:#10172588;backdrop-filter:blur(2px)}
body.board-nav-modal {overflow:hidden}
@media (min-width:881px) and (max-height:780px) {
 .board-navigation-sidebar .workspace {margin:14px 4px;padding:9px}
 .board-navigation-sidebar .aside-bottom {margin-top:7px;padding-top:8px}
}
@media (max-width:880px) {
 .layout:has(.main-shell) {display:flex;flex-direction:column;min-height:100dvh}
 .layout>.main-shell {flex:1}
 .layout>.board-navigation-sidebar {display:none}
 .main-shell>header:has(.board-nav-open) {position:sticky;top:0;z-index:12;min-height:48px;height:auto;flex-wrap:wrap;gap:4px 8px;margin:4px 8px;padding:4px 7px}
 .main-shell>header:has(.board-nav-open)>.board-nav-open {display:inline-flex;align-items:center;gap:5px;min-height:40px;flex:none;padding:6px 9px}
 .main-shell>header:has(.board-nav-open)>div:has(.eyebrow) {display:none}
 .main-shell>header:has(.board-nav-open) .header-right {display:flex;align-items:center;justify-content:flex-end;flex:1;gap:4px;flex-wrap:wrap;min-width:0}
 #board-navigation-drawer .board-navigation-sidebar {position:relative;top:auto;display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;min-height:0;margin:0;padding:12px 9px;box-shadow:none;border:0;border-radius:0}
 #board-navigation-drawer .brand {padding-right:48px;margin:0 0 10px}
 #board-navigation-drawer .board-nav-close {display:grid;place-items:center;position:absolute;top:9px;right:9px;min-width:44px;min-height:44px;font:inherit;font-size:23px;line-height:1;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);cursor:pointer}
 #board-navigation-drawer .workspace {display:none}
 #board-navigation-drawer #nav :is(a,summary) {min-height:44px}
 #board-navigation-drawer .aside-bottom {display:flex;flex:none;margin:6px 2px 0;padding:8px 3px 0}
}
