/* Shared palette and scale: docs/architecture/VISUAL_STYLE.md */
@import url('./clients/personal.css');
@import url('./finance/nav.css');
@import url('./finance/detail.css');
@import url('./chats/catalog.css');
@import url('./settings/service-texts.css');
.order-detail .order-section { scroll-margin-top:calc(var(--app-header-height,56px) + 16px); }
:root {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  font-synthesis: none;
  color: var(--text);
  background: var(--canvas);
  --accent: #b4363f;
  --card-outline: #b4363f;
  --status-amber-fill: #fff3d6;
  --status-amber-border: #e9cc89;
  --status-amber-ink: #74551c;
  --status-sage-fill: #e7f1e9;
  --status-sage-border: #bbd4c5;
  --status-sage-ink: #3b6650;
  --status-blue-fill: #eaf1fa;
  --status-blue-border: #cad9eb;
  --status-blue-ink: #345477;
  --accent-hover: #982c34;
  --accent-soft: #f8e9eb;
  --graphite: #30353b;
  --nav-hover: #3c424a;
  --nav-text: #f5f6f8;
  --nav-muted: #c2c7cf;
  --canvas: #f4f5f7;
  --surface: #ffffff;
  --surface-subtle: #eceef2;
  --text: #262a30;
  --muted: #626973;
  --border: #d3d8e0;
  --control-border: #a4aab3;
  --focus: #7b2932;
  --danger: #a72b37;
  --danger-soft: #fcf0f2;
  --warning: #825b10;
  --warning-soft: #fff6df;
  --signal-red: #e0223d;
  --signal-red-edge: #b71930;
  --signal-red-ink: #ffffff;
  --signal-yellow: #ffc21a;
  --signal-yellow-edge: #9b6b00;
  --signal-yellow-ink: #262a30;
  --on-accent: #ffffff;
  --tooltip: #30353b;
  --tooltip-text: #ffffff;
  --popup-shadow: 0 12px 32px #262a3026;
  --text-small: .889rem;
  --text-body: 1rem;
  --text-title: 1.778rem;
  --radius: 8px;
  --app-header-height: 56px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.ui-icon { width: 24px; height: 24px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.app-menu nav a > .nav-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.order-section-icon { display: inline-flex; align-items: center; justify-content: center; }
.order-chevron { display: inline-flex; align-items: center; justify-content: center; }
body { margin: 0; }
button, select, input { font: inherit; }
button, summary, a, select { -webkit-tap-highlight-color: transparent; }
button, select, summary, .open-link { border: 1px solid var(--control-border); background: var(--surface); border-radius: var(--radius); color: inherit; }
button { cursor: pointer; padding: 9px 14px; min-height: 44px; }
button:hover, .open-link:hover { border-color: var(--accent); background: var(--accent-soft); }
button:disabled, select:disabled { cursor: not-allowed; color: var(--muted); background: var(--surface-subtle); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
header { height: var(--app-header-height); border-bottom: 1px solid var(--border); background: var(--surface); display: flex; align-items: center; padding: 4px 16px; gap: 14px; }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 40px; padding: 7px; border-color: transparent; flex-shrink: 0; }
.brand { display: inline-flex; gap: 6px; align-items: center; font-size: 1.333rem; font-weight: 800; letter-spacing: -.8px; line-height: 1.2; white-space: nowrap; }
.profile { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 50%; }
.profile > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile small { display: inline; color: var(--muted); font-size: var(--text-small); }
.profile small::before { content: ' · '; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.layout { min-height: calc(100dvh - var(--app-header-height)); }
.app-menu { position: fixed; inset: var(--app-header-height) auto 0 0; margin: 0; width: 260px; max-width: calc(100vw - 40px); height: calc(100dvh - var(--app-header-height)); max-height: none; padding: 10px; border: 0; background: var(--graphite); color: var(--nav-text); box-shadow: var(--popup-shadow); overflow-y: auto; }
.app-menu:not([open]) { display: none; }
.app-menu::backdrop { background: #262a3033; }
.menu-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 10px 10px; }
.menu-heading button { color: var(--nav-text); background: transparent; border-color: transparent; display: grid; place-items: center; padding: 6px; min-height: 38px; }
.menu-heading button:hover { background: var(--nav-hover); }
.app-menu nav { background: var(--graphite); padding: 0; }
.app-menu nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; margin-bottom: 3px; border-radius: var(--radius); color: var(--nav-text); border-left: 3px solid transparent; }
.app-menu nav a > .nav-icon { width: 24px; flex: 0 0 24px; color: var(--nav-muted); }
.app-menu nav a > .nav-label { display: block; flex: 1 1 auto; min-width: 0; text-align: left; font-size: inherit; line-height: 1.35; color: inherit; overflow-wrap: anywhere; }
.app-menu nav a:hover { background: var(--nav-hover); }
.app-menu nav a[aria-current] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.app-menu nav a[aria-current] > .nav-icon { color: var(--on-accent); }
.app-menu nav a:focus-visible { outline-color: var(--nav-text); }
main { padding: 24px; min-width: 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
h1 { font-size: var(--text-title); line-height: 1.25; letter-spacing: -.6px; margin: 0 0 8px; font-weight: 650; }
p { line-height: 1.6; margin: 0; color: var(--muted); }
.page-heading p { font-size: var(--text-small); }
.demo-badge { background: var(--surface-subtle); color: var(--muted); border: 1px solid var(--border); border-radius: 24px; padding: 8px 14px; font-size: var(--text-small); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; border-radius: 0; padding: 0 4px 14px; border-bottom: 3px solid transparent; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.count { background: var(--surface-subtle); color: var(--muted); border-radius: 5px; padding: 2px 7px; font-size: var(--text-small); margin-left: 9px; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.filter { font-size: var(--text-small); color: var(--muted); display: grid; gap: 8px; align-content: end; }
select {
  width: 100%; min-height: 46px; padding: 8px 46px 8px 14px; min-width: 0;
  font-size: var(--text-body); color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23626973' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}
@media (forced-colors: active) {
  select { appearance: auto; background-image: none; }
}
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.quick-filters, .view-tools { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.quick-filters button { font-size: var(--text-small); }
.quick-filters button b { margin-left: 7px; font-weight: 600; }
.quick-filters button[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
button.reset { border-color: transparent; background: transparent; color: var(--muted); }
button.reset:hover { color: var(--accent); text-decoration: underline; }
button.orders-reset { border-color: var(--border); text-decoration: none; }
button.orders-reset.is-filtered { border-color: var(--accent); color: var(--accent); background: var(--surface); font-weight: 650; }
button.orders-reset.is-filtered:hover { background: var(--accent-soft); text-decoration: none; }
.view-tools { margin-left: auto; }
.popover { position: relative; }
.popover summary { cursor: pointer; list-style: none; padding: 9px 13px; min-height: 44px; font-size: var(--text-small); display: flex; align-items: center; gap: 18px; }
.popover summary::-webkit-details-marker { display: none; }
.popover summary:hover { border-color: var(--accent); background: var(--accent-soft); }
.info summary { border-color: transparent; background: transparent; font-size: 1.333rem; padding: 4px 9px; color: var(--muted); }
.popup { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--popup-shadow); width: 350px; max-width: calc(100vw - 32px); padding: 22px; }
.info .popup { width: 440px; }
.popup h3 { font-size: var(--text-body); margin: 0 0 14px; }
.popup p { font-size: var(--text-small); margin: 12px 0 0; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-size: var(--text-body); }
.check input { accent-color: var(--accent); width: 20px; height: 20px; flex-shrink: 0; margin: 0; }
.menu-note { border-top: 1px solid var(--border); padding-top: 16px; }
.table-scroll { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table-frame { position: relative; }
/* The sticky pan is the only visible scrollbar; keep the table scrollable. */
.table-frame .table-scroll { scrollbar-width: none; }
.table-frame .table-scroll::-webkit-scrollbar { display: none; width: 0; height: 0; }
.table-pan {
  position: sticky;
  bottom: 0;
  z-index: 4;
  height: 28px;
  overflow-x: scroll;
  overflow-y: hidden;
  background: var(--surface);
  border: 1px solid var(--control-border);
  border-radius: 6px;
  scrollbar-color: var(--muted) var(--surface-subtle);
  scrollbar-width: auto;
}
.table-pan[hidden] { display: none; }
.table-pan-track { height: 1px; }
.table-pan::-webkit-scrollbar { height: 18px; }
.table-pan::-webkit-scrollbar-track { background: var(--surface-subtle); border-radius: 6px; }
.table-pan::-webkit-scrollbar-thumb { background: var(--muted); border: 3px solid var(--surface-subtle); border-radius: 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: var(--text-body); }
th { font-size: var(--text-small); font-weight: 600; color: var(--muted); background: var(--surface-subtle); padding: 12px 14px; white-space: nowrap; }
tr { background: var(--surface); }
td { padding: 12px 14px; border-top: 1px solid var(--border); line-height: 1.4; vertical-align: top; min-width: 190px; }
td:first-child { min-width: 46px; width: 46px; padding: 14px 10px; }
td:nth-child(2) { min-width: 280px; }
td b { font-weight: 600; }
td small { display: block; color: var(--muted); font-size: var(--text-small); margin-top: 4px; }
td .order-client { font-size: 1rem; font-weight: 500; margin-top: 6px; }
td[data-col=comments] { min-width: 230px; max-width: 300px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions button { font-size: var(--text-small); padding: 8px 10px; }
/* Orders: action hierarchy without changing shared controls in other modules. */
.orders-heading { align-items: center; gap: 16px 24px; padding: 18px 20px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.orders-heading-copy { display: grid; gap: 4px; }
.orders-heading h1 { margin: 0; font-size: 1.556rem; font-weight: 650; }
.orders-heading p { margin: 0; font-size: var(--text-small); line-height: 1.4; }
.orders-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.orders-heading .orders-create { gap: 8px; padding: 10px 18px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.orders-create > span { font-size: 1.2em; line-height: 1; }
.orders-heading .orders-create:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.orders-heading .orders-import { border-color: var(--border); background: transparent; color: var(--muted); }
.row-actions.orders-row-actions { display: grid; gap: 6px; width: 112px; }
.orders-row-actions .orders-open, .row-actions .orders-task { justify-content: center; width: 100%; min-height: 36px; padding: 6px 10px; font-size: var(--text-small); font-weight: 500; line-height: 1.25; border-width: 1px; }
.orders-row-actions .orders-open { background: #ffffff; border: 1px solid #000000; color: #111111; }
.row-actions .orders-task { border: 1px solid var(--accent); color: var(--accent); background: var(--surface); }
.orders-row-actions .orders-open:hover, .row-actions .orders-task:hover { background: var(--accent-soft); border-color: var(--accent); }
.orders-row-actions .orders-open:hover { background: #ffffff; border-color: #000000; text-decoration: underline; }
.orders-heading a:focus-visible, .orders-row-actions a:focus-visible, .orders-row-actions button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 600px) {
  .orders-heading { padding: 16px; align-items: stretch; }
  .orders-heading-copy, .orders-heading-actions { width: 100%; }
  .orders-heading-actions > a { justify-content: center; flex: 1 1 auto; }
}
@media (pointer: coarse) {
  .orders-row-actions .orders-open, .row-actions .orders-task { min-height: 44px; }
}
th:last-child, td:last-child { position: sticky; right: 0; }
th:last-child { z-index: 2; }
td:last-child { min-width: 132px; vertical-align: middle; background: inherit; border-left: 1px solid var(--border); }
.order-title { color: var(--text); font-weight: 700; text-decoration: none; }
.status { background: var(--surface-subtle); color: var(--text); display: inline-block; padding: 4px 9px; border-radius: 5px; font-size: var(--text-small); max-width: 230px; }
.order-status-card { --owner-fill: #e0e3e8; --owner-border: #9fa7b4; display: grid; gap: 7px; min-width: 220px; max-width: 300px; padding: 10px 12px; border: 1px solid var(--owner-border); border-radius: 10px; background: var(--owner-fill); color: #111111; }
.order-status--manager { --owner-fill: #bcd8ff; --owner-border: #6f9bd4; }
.order-status--client { --owner-fill: #ffe29b; --owner-border: #c49a3d; }
.order-status--warehouse { --owner-fill: #a8e2d4; --owner-border: #4c9f8c; }
.order-status--currency { --owner-fill: #d9c4f5; --owner-border: #a080ca; }
.order-status--gateway { --owner-fill: #c5e69e; --owner-border: #83aa57; }
.order-status--administrator { --owner-fill: #ffcdb5; --owner-border: #c88e6f; }
.order-status__stage { display: flex; gap: 8px; align-items: flex-start; font-size: var(--text-small); font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.order-status__icon { width: 21px; height: 21px; flex: 0 0 21px; margin-top: 1px; }
.order-status-card .order-status__owner { margin: 0; padding-top: 7px; border-top: 1px solid #00000020; color: #111111; font-size: var(--text-small); line-height: 1.4; overflow-wrap: anywhere; }
.attention-red { background: var(--danger-soft); }
.attention-yellow { background: var(--warning-soft); }
.signal { display: inline-block; position: relative; line-height: 1; cursor: help; }
.signal-icon { display: inline-block; width: 32px; height: 32px; vertical-align: middle; --signal-fill: var(--signal-red); --signal-edge: var(--signal-red-edge); --signal-ink: var(--signal-red-ink); }
.signal-icon.yellow { --signal-fill: var(--signal-yellow); --signal-edge: var(--signal-yellow-edge); --signal-ink: var(--signal-yellow-ink); }
.signal-shape { fill: var(--signal-fill); stroke: var(--signal-edge); stroke-width: 1.5; }
.signal-mark { stroke: var(--signal-ink); stroke-width: 3; stroke-linecap: round; }
.signal-dot { fill: var(--signal-ink); }
.signal-key { display: inline-flex; align-items: center; gap: 8px; }
.signal-key .signal-icon { width: 26px; height: 26px; flex-shrink: 0; }
.signal-tip { display: none; position: absolute; left: 28px; top: -8px; width: 290px; padding: 14px; background: var(--tooltip); color: var(--tooltip-text); font-size: var(--text-small); line-height: 1.5; z-index: 5; box-shadow: var(--popup-shadow); border-radius: var(--radius); }
.signal:hover .signal-tip, .signal:focus .signal-tip { display: block; }
.open-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; font-size: var(--text-small); color: var(--text); white-space: nowrap; }
.muted { color: var(--muted); }
.red-text { color: var(--danger); }
.yellow-text { color: var(--warning); }
.list-footer { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; font-size: var(--text-small); color: var(--muted); }
.state { padding: 65px 25px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.state h2 { font-size: 1.333rem; }
.state button { margin-top: 20px; }
.state button[data-retry] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.state button[data-retry]:hover { background: var(--accent-hover); }
.placeholder { margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 35px; max-width: 850px; }
.placeholder p { margin: 18px 0; }
.eyebrow { display: block; font-weight: 600; font-size: var(--text-small); color: var(--accent); margin-bottom: 15px; }
.back { display: inline-block; color: var(--accent); padding: 7px 0; }
.order-detail { max-width: 1120px; margin: 20px auto 0; }
.order-detail .page-heading { margin-bottom: 20px; }
.order-stage { padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.order-stage-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.order-stage-heading h2 { font-size: 1.333rem; line-height: 1.35; margin: 0; }
.order-stage-heading button { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.order-summary { margin: 0; display: grid; gap: 10px; }
.order-summary div { display: grid; grid-template-columns: 185px minmax(0,1fr); gap: 16px; }
.order-summary dt { color: var(--muted); font-size: var(--text-small); }
.order-summary dd { margin: 0; overflow-wrap: anywhere; }
.order-alert { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-top: 14px; border-radius: var(--radius); background: var(--danger-soft); }
.order-alert.yellow { background: var(--warning-soft); }
.order-alert .signal-icon { flex-shrink: 0; }
.order-alert p { color: var(--text); font-weight: 600; }
.order-feed { display: grid; gap: 12px; margin-top: 20px; }
.order-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.order-section summary { display: flex; gap: 16px; align-items: center; min-height: 78px; padding: 16px 22px; list-style: none; cursor: pointer; border: 0; background: transparent; border-radius: var(--radius); }
.order-section summary::-webkit-details-marker { display: none; }
.order-section summary:hover { background: var(--surface-subtle); }
.order-section-icon { font-size: 1.333rem; width: 26px; flex-shrink: 0; text-align: center; color: var(--muted); }
.order-section-heading { display: grid; gap: 4px; min-width: 0; }
.order-section-heading b { font-size: 1.111rem; font-weight: 650; }
.order-section-preview { font-size: var(--text-small); color: var(--muted); overflow-wrap: anywhere; }
.order-chevron { margin-left: auto; font-size: 1.333rem; flex-shrink: 0; }
.order-section[open] > summary .order-chevron { transform: rotate(180deg); }
.order-section[open] > summary .order-section-preview { display: none; }
.order-section-body { padding: 0 24px 24px 64px; overflow-wrap: anywhere; }
.order-section-body h3 { margin: 0 0 8px; font-size: var(--text-small); color: var(--muted); font-weight: 600; }
.order-copy { color: var(--text); white-space: pre-wrap; }
.order-subsection + .order-subsection { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
.order-table-links { display: grid; gap: 16px; }
.order-table-link { display: grid; gap: 6px; }
a.order-table-link { color: var(--accent); text-decoration: underline; }
.order-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.order-items li { display: grid; gap: 6px; }
.order-items .muted, .order-table-link .muted { font-size: var(--text-small); }
.order-history { border-left: 2px solid var(--border); padding-left: 18px; }
.order-demo-note { margin: 20px 0 0; font-size: var(--text-small); }
.order-dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: 590px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; color: var(--text); background: var(--surface); box-shadow: var(--popup-shadow); }
.order-dialog::backdrop { background: #262a3070; }
.management-client-rows { display:grid; gap:16px; }
.management-client-row { display:grid; grid-template-columns:minmax(200px,1fr) minmax(300px,1.4fr) minmax(240px,1.2fr); gap:20px; align-items:start; border-color:#d5a0a5; }
.management-client-heading { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.management-client-heading h2 { margin:6px 0; font-size:1.12rem; }
.management-client-heading h2 a { color:var(--text); text-decoration:none; }
.management-client-activity { display:flex; flex-wrap:wrap; gap:8px 20px; }
.management-client-activity small { display:block; color:var(--muted); margin-bottom:2px; }
.management-client-number { font-size:.85rem; }
.management-client-state { padding:5px 10px; border-radius:8px; background:#bddbc6; color:#111; }
.management-client-state.is-blocked { background:#f4ccd0; }
.management-client-assignments { display:grid; grid-template-columns:1fr 1fr; gap:12px; background:#d5e6f5; padding:14px; border-radius:10px; }
.management-client-assignments span { display:grid; gap:4px; color:#111; }
.management-client-assignments small { color:#111; }
.management-client-note { background:#fff0b7; padding:14px; border-radius:10px; color:#111; }
.management-client-note p { margin:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; max-height:100px; overflow:auto; }
.management-client-note small { display:block; margin-top:10px; color:#111; }
.management-client-controls { grid-column:1/-1; border-top:1px solid #e4e4e7; padding-top:12px; }
.management-client-controls form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:16px; }
.management-client-controls form p { grid-column:1/-1; }
@media(max-width:1100px){.management-client-row{grid-template-columns:1fr 1fr}.management-client-heading{grid-column:1/-1}.management-client-controls form{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.management-client-row{grid-template-columns:1fr;gap:14px}.management-client-controls form{grid-template-columns:1fr}}
.chat-members-dialog .order-items { margin-bottom: 24px; }
.chat-members-dialog .order-items li { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin-bottom:14px; }
.chat-members-dialog .order-items li > span { color:var(--text); }
.chat-members-dialog form { margin-top:20px; }
.chat-members-dialog form button[type="submit"] { background:#b4363f; border-color:#b4363f; color:#fff; }
.chat-members-dialog form button[type="submit"]:hover:not(:disabled) { background:#962c35; color:#fff; }
.chat-people-panel .chat-members-button { width:100%; margin-top:8px; border:1px solid #b4363f; background:#fbf0f1; color:#922b34; }
.order-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.order-dialog-heading h2 { margin: 0; font-size: 1.333rem; }
.order-dialog p { margin: 0 0 18px; }
.order-subsection-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.order-subsection-heading h3 { margin: 0; align-self: center; }
.order-subsection-heading button { font-size: var(--text-small); }
.order-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.order-items li button { justify-self: start; }
.action-prototype { display: block; color: var(--muted); font-size: var(--text-small); font-weight: 400; }
.order-editor { display: grid; gap: 10px; }
.order-editor label { font-weight: 600; }
.order-editor textarea, .order-editor input, .prototype-field input, .prototype-field textarea { width: 100%; min-width: 0; font: inherit; line-height: 1.5; border: 1px solid var(--control-border); border-radius: var(--radius); padding: 10px 12px; color: var(--text); background: var(--surface); }
.order-editor textarea { resize: vertical; min-height: 150px; }
.order-editor .muted, .prototype-context { font-size: var(--text-small); }
.order-editor p:empty, .order-feedback:empty { display: none; }
.order-editor [aria-invalid=true] { border-color: var(--danger); }
.order-editor button[type=submit] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.order-editor button[type=submit]:hover { background: var(--accent-hover); }
.order-feedback { color: var(--text); margin-top: 14px; }
.prototype-field { display: grid; gap: 8px; margin-bottom: 16px; }
.stage-preview { display: grid; gap: 12px; margin: 20px 0; }
.stage-preview div { display: grid; gap: 3px; }
.stage-preview dt { color: var(--muted); font-size: var(--text-small); }
.stage-preview dd { margin: 0; font-weight: 600; }
.stage-confirm { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
.stage-confirm input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--accent); margin-top: 3px; }
[data-stage-error]:empty { display: none; }
.prototype-field input:disabled, .prototype-field textarea:disabled { background: var(--surface-subtle); color: var(--muted); }
.order-dialog .muted { margin-top: 18px; }
.preview-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0; font-size: var(--text-small); }
.preview-roles > span { color: var(--muted); }
.preview-roles a { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.preview-roles a[aria-current] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.shipping-status { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.shipping-result, .staff-note { border-left: 3px solid var(--accent); padding: 14px 18px; background: var(--canvas); margin: 18px 0; }
.staff-note { border-color: var(--graphite); }
.shipping-versions { margin-top: 20px; }
.shipping-versions > div { padding: 16px; border-bottom: 1px solid var(--border); }
[data-workflow-form] { width: 100%; margin-top: 22px; }
[data-workflow-form] p { margin: 14px 0; }
[data-workflow-form] button[type=submit] { border-color: var(--accent); color: var(--accent); margin: 5px 0; }
.order-editor[data-workflow-form] button[type=submit] { color:var(--on-accent); background:var(--accent); border-color:var(--accent); }
.order-editor[data-workflow-form] button[type=submit]:hover { color:var(--on-accent); background:var(--accent-hover); }
.order-editor[data-workflow-form] button[type=submit]:disabled { color:var(--muted); background:var(--surface-subtle); border-color:var(--control-border); }
[data-workflow-form] button[name=intent] { border-color: var(--control-border); color: var(--text); }
[data-workflow-error]:empty { display: none; }
.order-feedback:not(:empty) { background: var(--surface); border: 1px solid var(--border); padding: 12px 16px; border-radius: var(--radius); }
.chat-page { height: calc(100dvh - var(--app-header-height)); min-height: 0; padding: 8px 12px; display: flex; flex-direction: column; }
.chat-demo-tools summary { min-height: 32px; padding: 3px 8px; font-size: var(--text-small); border-color: transparent; background: transparent; gap: 8px; }
.chat-demo-tools .popup { padding: 14px; }
.chat-demo-tools .popup a { display: block; padding: 10px; border-radius: var(--radius); }
.chat-demo-tools .popup a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.chat-layout { display: grid; grid-template-columns: 360px minmax(0,1fr); flex: 1; min-height: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.chat-directory { border-right: 1px solid var(--border); min-width: 0; overflow: auto; background: var(--surface); }
.chat-search { display: block; padding: 8px; font-size: var(--text-small); color: var(--muted); }
.chat-search input { font: inherit; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--control-border); border-radius: var(--radius); }
.chat-channel { display: flex; gap: 10px; min-height: 46px; padding: 10px 12px; border-top: 1px solid var(--border); align-items: center; line-height: 1.35; }
.chat-channel > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.chat-channel:hover { background: #fafbfc; border-color: var(--control-border); }
.chat-channel[aria-current] { background: #fff; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chat-channel .ui-icon { color: var(--muted); width: 22px; }
.chat-unread { background: var(--accent); color: var(--on-accent); border-radius: 20px; padding: 1px 7px; font-size: var(--text-small); margin-left: auto; }
.chat-conversation { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--canvas); }
.chat-heading { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; flex-shrink: 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-heading h2 { margin: 0; font-size: 1.111rem; line-height: 1.3; }
.chat-heading > .ui-icon { color: var(--muted); }
.chat-mobile-back { display: none; color: var(--accent); min-width: 32px; text-align: center; font-size: 1.333rem; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-message { max-width: min(90%,980px); flex-shrink: 0; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; background: var(--surface); align-self: flex-start; min-width: min(220px,100%); overflow-wrap: anywhere; }
.chat-message.outgoing { align-self: flex-end; }
.chat-message p { color: var(--text); white-space: pre-wrap; }
.chat-message blockquote { margin: 8px 0 14px; padding-left: 10px; border-left: 3px solid var(--accent); color: var(--muted); font-size: var(--text-small); }
.message-order { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-top: 8px; }
.message-order > span:first-of-type { display: grid; gap: 4px; min-width: 0; }
.message-order small { color: var(--muted); font-size: var(--text-small); }
.message-order:hover { border-color: var(--accent); }
.chat-composer { flex-shrink: 0; border-top: 1px solid var(--border); padding: 10px 12px; background: var(--surface); }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-attachment-tools { position: relative; flex-shrink: 0; }
.chat-attachment-tools > summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 8px; list-style: none; cursor: pointer; }
.chat-attachment-tools > summary::-webkit-details-marker { display: none; }
.chat-attachment-picker { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 5; width: min(340px,calc(100vw - 48px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--popup-shadow); padding: 14px; }
.chat-attachment { display: grid; gap: 10px; font-size: var(--text-small); }
.chat-attachment select { width: 100%; }
.chat-composer textarea { font: inherit; width: 100%; min-width: 0; resize: none; max-height: 128px; height: 44px; min-height: 44px; border: 1px solid var(--control-border); border-radius: var(--radius); padding: 7px 10px; overflow-y: auto; }
.chat-send { display: flex; align-items: center; gap: 8px; flex-shrink: 0; height: 44px; padding: 7px 12px; background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chat-send:hover { background: var(--accent-hover); color: var(--on-accent); }
.chat-error:empty { display: none; }
.compose-chip { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 10px; margin-bottom: 6px; background: var(--canvas); border-left: 3px solid var(--accent); font-size: var(--text-small); }
.compose-chip button { padding: 0 8px; min-height: 32px; border: 0; background: transparent; }
.chat-empty { padding: 30px; margin: auto; text-align: center; }
@media (max-width: 1100px) { .chat-layout { grid-template-columns: 340px minmax(0,1fr); } }
@media (max-width: 700px) {
  .chat-page { padding: 6px; }
  .chat-layout { display: flex; min-height: 0; }
  .chat-directory { width: 100%; border: 0; }
  .chat-layout:not(.has-conversation) .chat-conversation { display: none; }
  .chat-layout.has-conversation .chat-directory { display: none; }
  .chat-conversation { flex: 1; min-height: 0; }
  .chat-messages { padding: 10px; min-height: 0; }
  .chat-message { max-width: 100%; }
  .chat-mobile-back { display: block; }
  .chat-heading { padding: 6px 10px; }
  .chat-composer { padding: 8px; }
  .chat-send span { display: none; }
  .chat-send { width: 44px; justify-content: center; padding: 8px; }

}
.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; }
.header-actions { display: flex; gap: 8px; margin-left: auto; }
.header-actions + .profile { margin-left: 4px; }
.header-actions > a { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; }
.header-actions > a:hover { background: var(--accent-soft); }
.header-actions > a > span { position: absolute; z-index: 1; top: -2px; right: -5px; min-width: 18px; padding: 0 4px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-size: 12px; text-align: center; }
.channel-signals { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.channel-signals .ui-icon { width: 16px; height: 16px; color: inherit; }
.mention-badge, .event-badge, .event-label, .task-state { display: inline-flex; align-items: center; gap: 4px; border-radius: 5px; padding: 1px 6px; font-size: var(--text-small); white-space: nowrap; }
.mention-badge { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.event-badge, .event-label { background: var(--warning-soft); color: var(--warning); }
.chat-message.mentioned-message { border: 1px solid var(--accent); }
.chat-message.target-message { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-events-link { margin-left: auto; font-size: var(--text-small); color: var(--warning); }
.message-task-link:hover { color: var(--accent); }
.chat-attachment-picker label { display: grid; gap: 8px; }
.chat-attachment-picker select { width: 100%; }
.work-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.work-toolbar h1 { margin: 0; }
.work-card { padding: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin: 20px 0; box-shadow: 0 2px 8px #262a3005; }
.work-card h2 { font-size: 1.222rem; margin: 0 0 10px; }
.work-card > summary { cursor: pointer; }
.work-card > .task-state { margin-right: 12px; }
.task-state { background: var(--surface-subtle); color: var(--text); }
.task-editor { max-width: 820px; display: grid; gap: 16px; }
.task-editor > label { display: grid; gap: 8px; }
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
.auth-card { display: grid; grid-template-columns: 42% minmax(0, 1fr); width: 100%; max-width: 1000px; min-height: 540px; border-radius: 22px; background: var(--surface); box-shadow: 0 16px 48px #262a301a; overflow: hidden; }
.auth-brand { display: grid; place-items: center; min-width: 0; overflow: hidden; background: var(--surface); }
.auth-art { display: block; width: 100%; }
.auth-art img { display: block; width: 100%; height: auto; aspect-ratio: 7 / 9; }
.auth-panel { display: grid; align-items: center; justify-items: center; min-width: 0; padding: 48px; }
.auth-content { width: 100%; max-width: 360px; min-width: 0; }
.auth-content h1 { font-size: 32px; margin: 0 0 28px; }
.auth-form { width: 100%; max-width: none; margin: 0; text-align: left; gap: 20px; }
.auth-form input { min-height: 50px; }
.auth-form > p { margin: 0; }
.auth-form [role="alert"]:empty, .auth-form [role="status"]:empty { display: none; }
.auth-actions { display: grid; gap: 6px; text-align: center; }
.auth-actions button { margin: 0; }
.auth-actions .auth-submit { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.auth-actions .auth-submit:hover { background: var(--accent-hover); }
.auth-actions .auth-submit:disabled { opacity: .65; }
.auth-actions [data-recover-open], .auth-actions [data-back-login] { display: grid; place-items: center; min-height: 44px; padding: 4px 8px; border-color: transparent; background: transparent; color: var(--muted); }
.auth-actions [data-recover-open]:hover, .auth-actions [data-back-login]:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 850px) {
  .auth-page { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .auth-card { grid-template-columns: minmax(0, 1fr); max-width: 440px; min-height: 0; border-radius: 18px; }
  .auth-art img { aspect-ratio: 22 / 5; }
  .auth-panel { padding: 32px 24px; min-height: 390px; }
  .auth-content h1 { font-size: 28px; margin-bottom: 24px; }
}
.task-editor textarea, .task-editor input, .task-editor select { width: 100%; }
.task-editor textarea, .task-editor input { min-width: 0; font: inherit; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--control-border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.task-editor textarea { resize: vertical; }
.task-editor > label:has(> input[type=checkbox]), .task-editor > label:has(> input[type=radio]) { display: flex; align-items: flex-start; gap: 12px; }
.task-editor input[type=checkbox], .task-editor input[type=radio] { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; margin: 4px 0 0; padding: 0; accent-color: var(--accent); }
.task-editor > p[role=alert]:empty, .task-editor > p[role=status]:empty { display: none; }
[data-settings-section] { scroll-margin-top: 20px; }
[data-settings-section] form + details { margin-top: 20px; }
[data-settings-section] > div > .work-card:first-child { margin-top: 0; }
[data-settings-section] > div > .work-card:last-child { margin-bottom: 0; }
nav[aria-label="Разделы настроек"] { margin: 18px 0 22px; }
.access-grid .task-editor { gap: 18px; }
.access-grid .task-editor > p { margin: 0; }

.task-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.task-row { display: grid; grid-template-columns: minmax(220px,1fr) 150px minmax(200px,auto); align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #f7f9fc; }
.task-row:focus-visible { outline-offset: -3px; }
.task-row:hover { background: var(--accent-soft); }
.task-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.task-row small { display: block; color: var(--muted); }
.task-row .task-state { justify-self: start; }
.notification-list { display: grid; gap: 12px; margin-top: 18px; }
.notification-row { display: grid; grid-template-columns: 170px minmax(0,1fr); align-items: start; gap: 16px; padding: 20px 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 6px #262a3005; }
.notification-row.read { background: var(--canvas); }
.notification-row h2 { font-size: 1.111rem; margin: 0 0 6px; }
.notification-row p { margin: 0 0 6px; overflow-wrap: anywhere; }
.notification-row small { display: block; color: var(--muted); line-height: 1.5; }
.notification-row .order-actions { grid-column: 2; margin-top: 0; }
.notification-row > span { justify-self: start; }
.notification-row .order-actions > :first-child { border-color: var(--accent); color: var(--accent); }
.notification-list + p { margin-top: 16px; }
.review-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.review-grid .work-card { margin: 12px 0; display: flex; flex-direction: column; align-items: flex-start; }
.review-grid button { margin-top: auto; }
.guide-grid .guide-result { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.guide-grid .guide-result h2 { margin-bottom: 0; }
.guide-grid .guide-result p { margin-bottom: 0; }
.guide-grid .guide-result .open-link { margin-top: auto; }
.client-filters { display: flex; flex-wrap: wrap; gap: 16px; }
.client-filters label { display: grid; gap: 6px; }
.client-filters input { font: inherit; padding: 9px 12px; border: 1px solid var(--control-border); border-radius: var(--radius); max-width: 100%; }
.client-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid var(--border); }
.client-row:hover { background: var(--accent-soft); }
.client-row > span:first-child { flex: 1; min-width: 170px; overflow-wrap: anywhere; }
.client-row > span:last-child { margin-left: auto; }
.client-row small { display: block; color: var(--muted); font-size: var(--text-small); }
.client-tabs { display: flex; gap: 8px; overflow-x: auto; margin-top: 20px; border-bottom: 1px solid var(--border); }
.client-tabs a { padding: 10px 16px; white-space: nowrap; border-bottom: 3px solid transparent; }
.client-tabs a[aria-current] { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.client-notes { margin-top: 24px; }
.client-notes p { white-space: pre-wrap; margin: 0; }
.client-balance { margin-top: 16px !important; font-size: 1.778rem !important; }
.finance-table td:first-child { min-width: 220px; width: auto; padding: 12px 14px; }
.finance-table td:nth-child(2) { min-width: 130px; }
.finance-table td { min-width: 180px; }
@media (max-width: 850px) {
  .review-grid { grid-template-columns: 1fr; gap: 0; }
  .task-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; padding: 14px; }
  .task-row > span:last-child { grid-column: 1/-1; }
}
.file-album { display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;max-width:650px;margin:12px 0; }
.chat-message .file-album { margin:6px 0; }
.file-tile { display:flex;flex-direction:column;align-items:stretch;min-width:0;padding:6px;text-align:left;gap:4px;border:1px solid var(--border,#d8dce1);background:#fff; }
.file-tile img { width:100%;height:130px;object-fit:cover;border-radius:5px; }
.chat-message .file-tile.image { padding:0;gap:0;overflow:hidden; }
.chat-message .file-tile.image img { border-radius:inherit; }
.file-tile span { overflow-wrap:anywhere;font-size:16px; }
.file-tile small { color:var(--muted,#65717a); }
.file-type { padding:20px 8px;background:#f1f3f5;border-radius:5px; }
.file-compose-draft { display:flex;gap:8px;flex-wrap:wrap;max-height:120px;overflow:auto; }
.file-compose-draft span { font-size:16px;background:#f1f3f5;padding:4px 8px;border-radius:6px;overflow-wrap:anywhere; }
.file-compose-draft button { padding:2px 8px;min-height:32px; }
.file-draft { padding-left:20px;overflow-wrap:anywhere; }
.file-upload { margin-top:16px; }
.file-panel summary { font-weight:650;cursor:pointer;margin-bottom:12px; }
.file-panel input[type=file] { min-width:0;max-width:100%; }
.file-viewer { width:min(1000px,calc(100vw - 16px));max-height:calc(100dvh - 16px);padding:16px;border:0;border-radius:12px;overflow:auto; }
.file-viewer::backdrop { background:#142027b8; }
.file-view-heading { display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;overflow-wrap:anywhere; }
.file-view-heading b { min-width:0; }
.file-view-stage { height:min(60dvh,560px);overflow:auto;background:#19252a;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;padding:8px; }
.file-view-stage img,.file-view-stage video { max-width:100%;max-height:100%;object-fit:contain; }
.file-view-stage.zoomed { display:block; }
.file-view-stage.zoomed img { max-width:none;max-height:none;width:150%; }
.file-view-tools { display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0; }
.file-view-tools .stage-confirm { display:flex;align-items:center;gap:8px;margin:0; }
.file-forward-preview { display:flex;gap:8px;overflow:auto;margin-bottom:16px; }
.file-forward-preview img { width:120px;height:90px;object-fit:cover;border-radius:6px; }
.chat-attachment-picker input[type=file] { min-width:0;width:100%;font-size:16px; }
@media (max-width: 480px) {
  .file-album { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .file-tile img { height:110px; }
  .file-viewer { padding:12px; }
  .header-actions { gap: 4px; }
  .header-actions > a { width: 32px; }
  .work-card { padding: 16px; }
  .work-toolbar .chat-demo-tools .popup { right: 0; width: min(320px,calc(100vw - 28px)); }
  .notification-row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .notification-row .order-actions { grid-column: 1; }
  .chat-heading h2 { font-size: 1rem; }
}
@media (max-width: 1300px) {
  .filters { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
  .view-tools { width: 100%; }
  }
@media (max-width: 850px) {
  header { padding: 4px 10px; gap: 10px; }
  main:not(.chat-page):not(.auth-page) { padding: 20px 14px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popup { width: 340px; }
  .info .popup { right: -180px; width: 340px; }
}
@media (max-width: 480px) {
  .order-section summary { gap: 10px; padding: 14px; }
  .order-section-icon { width: 22px; font-size: 1.111rem; }
  .order-section-body { padding: 0 16px 20px; }
  .order-stage { padding: 18px 16px; }
  .order-summary div { grid-template-columns: 1fr; gap: 2px; }
  .order-alert { padding: 14px; }
  .order-detail h1 { overflow-wrap: anywhere; }
  .brand { font-size: 1.222rem; gap: 5px; }
  .profile { gap: 8px; }
  .avatar { display: none; }
  .profile small { font-size: var(--text-small); }
  .profile small { display: none; }
  .view-tools { gap: 6px; }
  .view-tools { position: relative; }
  .view-tools .popover { position: static; }
  .view-tools .popup { right: 0; left: auto; }
    .view-tools .info .popup { right: auto; left: 0; }
  .tabs { gap: 14px; }
  .tabs button { font-size: var(--text-small); }
  .count { margin-left: 6px; }
  .placeholder { padding: 24px; }
}

[data-create-order] .stage-confirm { display:flex;flex-direction:row;align-items:center;gap:12px; }
[data-create-order] input[type=checkbox] { width:20px;height:20px;min-height:20px;flex-shrink:0; }

.access-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px;margin-top:16px}.access-grid .work-card{margin:0;min-width:0}.access-grid select{width:100%}.profile a{color:inherit;text-decoration:none}.access-grid .order-actions{margin-top:16px;flex-wrap:wrap}

.current-grid,.guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));gap:16px;margin-top:20px}.current-grid .work-card,.guide-grid .work-card{margin:0;min-width:0}.current-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--border);color:inherit;text-decoration:none}.current-row span{min-width:0}.current-row small,.current-row b,.current-row span span{display:block}.current-row small{color:var(--muted)}.current-row>span:last-child{flex-shrink:0;font-size:var(--text-small)}.current-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.current-stats a{padding:18px;border:1px solid var(--border);border-radius:12px;background:var(--surface);color:inherit;text-decoration:none}.current-stats b{display:block;font-size:28px}.guide-result{display:block;color:inherit;text-decoration:none}.guide-result p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.guide-article{max-width:900px}.guide-article section{margin:28px 0}.guide-article p{max-width:74ch}.journey-steps{padding-left:28px}.journey-steps li{padding:12px 0 24px;border-bottom:1px solid var(--border)}[data-control-settings] input{max-width:240px}@media(max-width:600px){.current-stats{grid-template-columns:1fr}.current-stats a{display:flex;align-items:center;gap:16px;padding:12px 16px}.current-row{align-items:flex-start}.guide-article{padding:18px}.current-grid,.guide-grid{grid-template-columns:minmax(0,1fr)}}

.notification-row small{display:block}.chat-heading [data-chat-sound]{padding:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.chat-heading h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-heading > .ui-icon{flex-shrink:0}@media(max-width:600px){.chat-heading{gap:7px}.chat-heading .chat-events-link{font-size:.78rem;white-space:nowrap}.chat-heading .back{font-size:.82rem}.chat-heading h2{flex:1}}

.chat-events-link{display:flex;align-items:center;gap:4px;white-space:nowrap}@media(max-width:600px){.chat-events-word{display:none}.chat-events-link .ui-icon{width:18px;height:18px}}

.reminder-row{display:flex;justify-content:space-between;gap:18px;padding:16px 0;border-bottom:1px solid var(--border)}.reminder-row h3{margin:0}.reminder-row small{display:block;color:var(--muted);margin:5px 0}.calendar-days{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.calendar-days button{font-size:.9rem}.calendar-range{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}.reminder-row>div{min-width:0;overflow-wrap:anywhere}@media(max-width:600px){.reminder-row{flex-direction:column}}

.reminder-row>.open-link{align-self:flex-start;white-space:nowrap}

.admission-header{height:64px;padding-inline:clamp(18px,5vw,64px)}
.admission-page{max-width:880px;margin:0 auto;padding:clamp(24px,6vh,72px) 20px!important}
.admission-card{padding:clamp(24px,5vw,48px);margin:0}
.admission-card h1{font-size:clamp(28px,4vw,36px);line-height:1.2;margin:18px 0 22px;max-width:23ch}
.admission-card p{font-size:20px;line-height:1.6;max-width:62ch}
.admission-tag{display:inline-block;color:var(--accent);font-weight:600}
.admission-card .order-actions{flex-wrap:wrap;gap:12px;margin-top:28px}
.admission-card button{white-space:normal;font-size:18px;min-height:48px}
.admission-card .admission-primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.admission-card .admission-primary:disabled{background:var(--surface-subtle);color:var(--muted);border-color:var(--border)}
.admission-card [role=status]:empty{display:none}
.admission-card details{margin-top:24px}
.admission-card summary{padding:12px 14px;overflow-wrap:anywhere}
@media(max-width:480px){.admission-page{padding:24px 14px!important}.admission-card{padding:24px 20px}.admission-card p{font-size:18px}.admission-card .order-actions>button{width:100%}}


.pwa-install-panel{overflow-wrap:anywhere;min-width:0}.pwa-install-panel p,.pwa-install-panel li{font-size:18px;line-height:1.55}.pwa-install-panel ol{padding-left:24px}.pwa-install-panel li+li{margin-top:10px}.pwa-install-panel button{min-height:48px;white-space:normal}.pwa-install-panel details{margin-top:16px}.pwa-install-panel summary{cursor:pointer}.admission-card>.pwa-install-panel{margin-top:24px}.pwa-install-panel [data-pwa-help]>summary{padding-left:0}.pwa-install-panel>div{padding-top:4px}@media(max-width:480px){.pwa-install-panel [data-pwa-install]{width:100%}}

.historical-invoice{border:1px solid var(--border);border-radius:var(--radius);padding:18px;min-width:0}.historical-invoice legend{padding-inline:8px}.historical-invoice textarea{resize:vertical}

.historical-entry{min-width:0;overflow-wrap:anywhere}.historical-entry fieldset{min-width:0}

.admin-order-data{display:grid;gap:16px;max-width:900px;min-width:0}.admin-order-data textarea{resize:vertical}.order-data-history{overflow-wrap:anywhere}.order-data-history summary{padding:10px 14px}.order-data-history .order-copy{margin:0}.order-data-history dl{margin-top:10px}

.access-preview-controls{display:flex;gap:16px;flex-wrap:wrap;margin:20px 0}.access-preview-controls label{display:grid;gap:6px;min-width:0}.access-screen{max-width:640px;overflow-wrap:anywhere}.access-screen .task-editor{max-width:100%}.access-screen .order-actions{margin-top:20px}.access-screen input{min-height:48px}.access-screen [role=alert]:empty,.access-screen [role=status]:empty{display:none}@media(max-width:600px){.access-preview-controls{display:grid;grid-template-columns:minmax(0,1fr)}.access-preview-controls select{width:100%}}

/* Test logins replace the role-switch controls in the normal cabinet. */
body.test-session .chat-demo-tools, body.test-session [data-demo-person], body.test-session [data-demo-role] { display:none !important; }

body.test-session .preview-roles { display:none !important; }

/* Nearest task opens in place; the deadline belongs to the same card. */
.order-task-card { display:block; width:100%; min-width:210px; max-width:360px; padding:12px 14px; text-align:left; color:var(--text); background:#fff; border:1px solid #c8cdd4; border-radius:10px; cursor:pointer; transition:border-color .15s,box-shadow .15s,background .15s; white-space:normal; }
.order-task-card b { display:block; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.order-task-deadline { display:block; margin-top:6px; }
.order-task-card:hover { background:#fff8f8; border-color:var(--primary,#b4363f); box-shadow:0 2px 8px #b4363f18; }
.order-task-card:focus-visible { outline:3px solid #b4363f; outline-offset:3px; }
.task-dialog { width:760px; padding:20px; }
.task-dialog > .order-dialog-heading { position:sticky; top:-20px; background:var(--surface); z-index:1; padding:12px 0; }
.task-dialog .work-card { margin:0 0 14px; padding:16px; }
.task-dialog .task-editor input,.task-dialog .task-editor textarea { min-width:0; width:100%; box-sizing:border-box; }
.task-dialog .order-actions { flex-wrap:wrap; }
@media(max-width:600px) { .task-dialog { padding:12px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); } .task-dialog > .order-dialog-heading { top:-12px; } .task-dialog .work-card { padding:12px; } }
@media(prefers-reduced-motion:reduce) { .order-task-card { transition:none; } }

.order-task-add b { margin-top:4px; color:var(--accent); font-weight:500; }

/* Task surfaces own their metadata grid; order-summary's 185px inner columns do not apply here. */
.task-detail,.task-create { min-width:0; border-color:#e2cbd0; border: 1px solid var(--card-outline); box-shadow:0 4px 16px #30353b08; }
.task-page-heading { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:center; justify-items:start; gap:12px 16px; margin:0 0 20px; }
.task-page-heading h1 { margin:0; font-size:24px; }
.task-page-heading > .task-status-banner { grid-column:1 / -1; }
.task-back { display:inline-flex; align-items:center; min-height:44px; padding:9px 14px; }
.task-order-link { display:inline-flex; align-items:center; justify-content:center; min-height:44px; max-width:100%; padding:10px 14px; margin:0 0 16px; border-color:var(--control-border); color:var(--accent); font-weight:600; background:var(--surface); }
.task-detail-heading { margin-bottom:18px; }
.task-detail-heading h2 { min-width:0; overflow-wrap:anywhere; margin:0; line-height:1.4; }
.task-badges { display:flex; gap:8px; flex-wrap:wrap; }
.task-badges .task-state,.task-overdue { border:1px solid transparent; border-radius:999px; padding:4px 10px; font-size:var(--text-small); }
.task-status-banner .task-state,.task-status-banner .task-overdue { display:inline-flex; align-items:center; min-height:44px; padding:8px 16px; border-radius:4px; font-size:1.111rem; font-weight:650; line-height:1.4; }
.task-detail > .task-status-banner { margin-bottom:18px; }
@media(max-width:600px) { .task-status-banner .task-state,.task-status-banner .task-overdue { font-size:1rem; padding:8px 12px; } }
.task-state-new { color:#225b91; background:#eaf3fe; border-color:#bed6f0!important; }
.task-state-working { color:#80580d; background:#fff5dc; border-color:#eddbab!important; }
.task-state-review { color:#654496; background:#f1ebfc; border-color:#d8c8ee!important; }
.task-state-done { color:#216345; background:#e8f6ed; border-color:#b6d9c5!important; }
.task-state-cancelled { color:var(--muted); background:var(--surface-subtle); border-color:var(--border)!important; }
.task-overdue { color:var(--danger); background:var(--danger-soft); border-color:#e6b8bf; }
.task-detail .task-description { margin:0 0 18px; color:var(--text); }
.task-metadata { display:flex; flex-wrap:wrap; gap:12px; margin:0 0 20px; }
.task-metadata > div { display:flex; flex:0 1 auto; flex-direction:column; gap:4px; min-width:min(100%,160px); max-width:min(100%,360px); padding:10px 14px; background:#f6f7fa; border:1px solid var(--border); border-radius:10px; }
.task-metadata dt { color:var(--muted); font-size:var(--text-small); }
.task-metadata dd { margin:0; min-width:0; font-weight:500; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.task-detail .task-edit-trigger { margin:0 0 18px; }
.task-edit-button { color:var(--accent); border-color:#d8aeb4; background:#fff; }
.task-action-panel { border-top:1px solid var(--border); padding-top:18px; }
.task-action-panel .order-actions { margin:8px 0 0; gap:10px; }
.task-action-panel > .prototype-field:not(:first-child) { margin-top:20px; }
.task-action-panel textarea[name=comment] { width:100%; max-width:100%; height:160px; min-height:160px; max-height:260px; resize:none; overflow-y:auto; overflow-x:hidden; box-sizing:border-box; }
.task-reschedule { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; margin-top:24px; }
.task-reschedule .task-date-field { flex:1 1 240px; max-width:360px; min-width:0; margin:0; }
.task-reschedule-submit { flex:0 0 auto; min-height:48px; padding:11px 18px; margin:0; }
.task-primary { background:var(--accent); color:white; border-color:var(--accent); font-weight:600; }
.task-primary:hover { background:var(--accent-hover); color:white; border-color:var(--accent-hover); }
.task-action-submit,.task-action-approve { color:#fff; background:#28734f; border-color:#28734f; font-weight:600; }
.task-action-submit:hover,.task-action-approve:hover { color:#fff; background:#205f41; border-color:#205f41; }
.task-action-uncompleted { color:#80580d; background:#fff8e7; border-color:#dcc58c; }
.task-action-cancel { color:var(--danger); border-color:#d9b2b7; background:#fff; }
.task-create .task-form-heading h2 { margin:0; }
.task-create > label,.task-detail .task-editor > label { font-weight:500; }
.task-create input,.task-create textarea,.task-create select,.task-detail .task-editor input,.task-detail .task-editor textarea { font-weight:400; }
.task-create .order-actions { margin-top:4px; }
.task-history { padding:0!important; overflow:hidden; border-color:#d9dde5; }
.task-history > summary { display:flex; align-items:center; gap:10px; list-style:none; width:100%; padding:14px 18px; border:0; border-radius:0; background:#f6f7fa; }
.task-history > summary::-webkit-details-marker { display:none; }
.task-history > summary:hover { background:#edf0f5; }
.task-history-chevron { display:inline-flex; color:var(--muted); }
.task-history-chevron .ui-icon { width:18px; height:18px; transform:rotate(-90deg); }
.task-history[open] > summary .ui-icon { transform:rotate(0); }
.task-history-count { margin-left:auto; min-width:28px; padding:1px 7px; text-align:center; border-radius:6px; background:#e4e8ef; font-size:var(--text-small); }
.task-history > .order-items { padding:16px 18px; margin:0; }
.task-history .order-items > li { overflow-wrap:anywhere; }
@media(max-width:600px) { .task-metadata { gap:8px; } .task-metadata > div { min-width:0; padding:10px 12px; } .task-detail-heading { gap:10px; } .task-action { flex:1 1 auto; } }

.task-create > [data-wait-choice]:empty,.task-editor > .form-error:empty,.task-action-panel > .form-error:empty { display:none; }

/* Date-only task picker: the red calendar control is always on the left. */
.task-date-field { display:grid; gap:6px; min-width:0; position:relative; }
.task-date-control { display:flex; align-items:stretch; border:1px solid var(--control-border); border-radius:8px; overflow:hidden; min-height:48px; background:var(--surface); }
.task-calendar-button { display:grid; place-items:center; flex:0 0 50px; padding:10px; border:0; border-right:1px solid #d5a5ad; border-radius:0; color:var(--accent); background:var(--accent-soft); }
.task-calendar-button:hover { color:white; background:var(--accent); }
.task-calendar-button .ui-icon { width:24px; height:24px; }
.task-date-control input[data-calendar-display] { border:0; border-radius:0; width:100%; min-width:0; margin:0; padding:10px 12px; cursor:pointer; background:transparent; }
.task-date-control:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.task-calendar-panel { position:absolute; z-index:6; top:calc(100% + 6px); left:0; display:block; width:min(340px,100%); min-width:260px; max-width:calc(100vw - 60px); padding:12px; background:#fff; border:1px solid #d8aeb4; border-radius:12px; box-shadow:var(--popup-shadow); color:var(--text); font-weight:400; }
.task-calendar-heading { display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:10px; }
.task-calendar-heading b { font-size:16px; font-weight:600; text-transform:capitalize; }
.task-calendar-heading button { padding:0; width:34px; height:34px; min-height:34px; color:var(--accent); border:0; font-size:25px; background:var(--accent-soft); }
.task-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
.task-calendar-weekday { text-align:center; font-size:13px; color:var(--muted); padding:3px 0 7px; }
.task-calendar-grid button { padding:0; min-width:0; min-height:36px; height:36px; border:1px solid transparent; border-radius:7px; color:var(--text); background:#fff; font-size:16px; }
.task-calendar-grid button:hover { color:var(--accent); border-color:#d8aeb4; background:var(--accent-soft); }
.task-calendar-grid button[aria-current=date] { border-color:var(--accent); color:var(--accent); font-weight:600; }
.task-calendar-grid button[aria-pressed=true] { background:var(--accent); border-color:var(--accent); color:#fff; }
.task-calendar-footer { display:flex; justify-content:space-between; gap:8px; border-top:1px solid var(--border); margin-top:10px; padding-top:10px; }
.task-calendar-footer button { padding:5px 10px; min-height:34px; color:var(--accent); border-color:#e1bbc1; background:#fff; font-size:14px; }

.order-task-meta { display:flex; gap:6px; align-items:baseline; color:var(--muted); line-height:1.4; }
.order-task-date { flex-shrink:0; white-space:nowrap; }
.order-task-assignee { min-width:0; overflow-wrap:anywhere; }

/* System signals and a separate slot for the employee's yellow comment. */
.order-signals { display:flex; flex-direction:column; align-items:center; gap:4px; min-height:68px; width:32px; }
.order-red-slot { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex-shrink:0; }
.signal-tip .signal-reason { display:block; }
.signal-tip .signal-reason + .signal-reason { margin-top:8px; }
.order-yellow-slot { display:inline-flex; align-items:center; justify-content:center; min-width:32px; min-height:32px; }
.signal-add { display:grid; place-items:center; width:32px; height:32px; min-height:32px; padding:0; border:0; border-radius:7px; background:transparent; color:#9aa1aa; font-size:26px; font-weight:400; line-height:1; }
.signal-add:hover { color:var(--accent); background:var(--accent-soft); }
.signal-attention-button { display:inline-flex; padding:0; border:0; border-radius:5px; background:transparent; min-height:32px; cursor:pointer; }
.signal-attention-button:hover { background:transparent; filter:brightness(.97); }
.signal-attention:focus-within .signal-tip { display:block; }
.signal-attention .signal-tip b,.signal-attention .signal-tip > span { display:block; }
.signal-attention .signal-tip b { margin-bottom:5px; font-weight:600; }
.attention-dialog { width:600px; }
.attention-author { color:var(--muted); margin:0!important; }
.attention-remove { color:var(--danger); border-color:#d9b2b7; background:white; }
.attention-dialog [data-attention-error]:empty { display:none; }

.task-date-missing { color:var(--danger); background:var(--danger-soft); border-radius:5px; padding:2px 6px; font-weight:600; }

/* Client identity: order participation and separately authorized destinations. */
.order-client-identity { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; vertical-align: middle; max-width: 100%; }
.order-client-name { min-width: 0; overflow-wrap: anywhere; }
.order-external-mark { display: inline-flex; align-items: center; flex: 0 0 auto; color: #B4313D; }
.order-external-mark .ui-icon { width: 22px; height: 22px; }
.order-client-shortcuts { display: inline-flex; align-items: center; gap: 6px; }
.order-client-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #c6cbd2; border-radius: 9px; background: #fff; color: #30363e; text-decoration: none; }
.order-client-button .ui-icon { width: 20px; height: 20px; }
.order-client-button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.order-client-button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 760px) { .order-client-button { width: 44px; height: 44px; } }

.order-rating-stars { display: inline-block; color: #E9AD00; font-size: 1.2rem; line-height: 1.2; letter-spacing: 2px; white-space: nowrap; }

/* Order card: focus on the next action, quiet settings at the end. */
.order-detail { padding: 24px; border-radius: 20px; background: linear-gradient(145deg,#ffffff 0%,#f4f4f5 65%); --accent-soft: #f2f2f3; }
.order-detail > .page-heading { padding: 8px 4px 18px; }
.order-header-actions { display: flex; gap: 12px; margin: 16px 0; }
.order-detail .order-stage { border-color: #d8d8dc; background: #fff; box-shadow: 0 5px 20px #00000008; }
.order-next-action, .order-stage-heading .order-next-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 20px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.order-next-action:hover { filter: brightness(.95); color: #fff; }
.order-next-action:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.order-detail .order-feed { gap: 18px; margin-top: 22px; }
.order-detail .order-section { box-shadow: 0 3px 12px #30384405; }
.order-detail .order-section-icon { color: var(--accent); }
.order-detail .order-actions { gap: 14px 18px; margin-top: 22px; }
.order-detail form > button, .order-detail form > a { margin-top: 14px; margin-right: 14px; }
.order-detail .order-feedback:empty { display: none; }
.order-admin-panel { margin-top: 22px; padding: 20px; border: 1px solid #d8d8dc; border-radius: 14px; background: #fff; }
.order-admin-panel > details + details { margin-top: 18px; }
.order-admin-panel > details > summary { padding: 12px; }
@media(max-width:760px){ .order-detail { padding: 14px; }.order-next-action { width: 100%; }.order-admin-panel { padding: 12px; } }

/* Read-only route: red progress, black labels, neutral surfaces. */
.order-route { overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x pan-y;padding: 20px 8px; margin: 0 0 18px; background: #fff; border-radius: 16px; }
.order-route ol { position:relative;list-style:none;display:flex;min-width:100%;width:max-content;margin:0;padding:4px 0; }
.order-route-step { position: relative; flex:1 0 105px;width:105px; display: flex; flex-direction: column; align-items: center; gap: 17px; min-width: 0; padding-top: 8px; color: #78787e; }
.order-route-step:not(:last-child)::after { content: ''; position: absolute; left: 50%; top: 20px; width: 100%; height: 4px; border-radius: 8px; background: #262a30; }
.order-route-step.is-passed:not(:last-child)::after { background: var(--accent); height: 7px; top: 18px; }
.order-route-node { position: relative; z-index: 1; display: block; width: 24px; height: 24px; flex: 0 0 auto; border: 2px solid #262a30; border-radius: 50%; background: #fff; }
.order-route-step.is-passed .order-route-node { border-color: var(--accent); background: var(--accent); box-shadow: 0 3px 0 #d1d1d5; }
.order-route-step.is-passed .order-route-node::before { content: ''; position: absolute; width: 6px; height: 4px; left: 4px; top: 3px; border-radius: 50%; background: #fff; opacity: .5; }
.order-route-step.is-current .order-route-node { border: 0; background: var(--accent); box-shadow: 0 3px 0 #c9c9ce; transform: scale(1.45); }
.order-route-step.is-passed, .order-route-step.is-current { color: #242428; }
.order-route-step.is-current .order-route-label { color: var(--text); font-weight: 650; }
.order-route-label { color:var(--text);position: relative; z-index: 1; font-size: .889rem; text-align:center;padding:0 3px;white-space:nowrap; }

.order-detail .order-task-create { display: inline-flex; gap: 9px; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.order-detail .order-task-create:hover { color: #fff; filter: brightness(.95); text-decoration: none; }
.order-detail .order-task-create:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.order-detail .order-external-settings { margin-top: 18px; background: var(--surface); box-shadow: 0 3px 12px #30384405; }
.order-external-settings > summary { color: var(--text); font-size: inherit; }
[data-edit-slot=teamDescription] { margin-top: 22px; }

/* Order uploader: one branded frame, no nested disclosure. */
.order-material-dialog { width: 640px; padding: 26px; border: 2px solid var(--accent); border-radius: 20px; background: #fff; box-shadow: 0 20px 64px #11111126; }
.order-material-dialog .order-dialog-heading { gap: 18px; padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid #e4e4e7; }
.order-material-title { display: flex; align-items: center; gap: 12px; }.order-material-title > span { display: inline-flex; color: var(--accent); }.order-material-title .ui-icon { width: 28px; height: 28px; }
.order-material-dialog [data-close-materials] { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border-radius: 11px; }
.order-material-dialog .prototype-field select { width: 100%; padding-top: 12px; padding-bottom: 12px; border-radius: 11px; }
.file-panel-embedded { padding: 0; border: 0; background: transparent; }.file-panel-embedded .file-upload { margin: 0; padding: 0; border: 0; }
.order-file-picker { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 172px; padding: 24px; border: 1.5px dashed var(--accent); border-radius: 15px; background: #fafafa; cursor: pointer; text-align: center; }
.order-file-picker:hover { background: #f1f1f3; border-style: solid; }.order-file-picker:focus-within { outline: 2px solid #29292e; outline-offset: 4px; }.order-file-picker:has(input:disabled) { cursor: wait; opacity: .6; }
.order-file-picker-icon { display: inline-flex; color: var(--accent); }.order-file-picker-icon .ui-icon { width: 30px; height: 30px; }
.order-file-picker strong { display: inline-flex; padding: 9px 20px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; }.order-file-picker > span:last-child { color: var(--muted); font-size: var(--text-small); }
.order-file-policy { margin-top: 20px; padding: 16px 18px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: #f5f5f6; }
.order-material-dialog .order-file-policy p { margin: 0; line-height: 1.5; }.order-material-dialog .order-file-policy p + p { margin-top: 9px; }.order-material-dialog .order-file-policy .muted { font-size: var(--text-small); }
.order-material-dialog [role=status]:empty, .order-material-dialog [role=alert]:empty { display: none; }
.order-file-selection { margin-top: 20px !important; font-weight: 600; }.file-panel-embedded .file-draft { margin: 0; padding: 0; list-style: none; }
.file-panel-embedded .file-draft li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e5e5e8; }.file-panel-embedded .file-draft li > span { min-width: 0; overflow-wrap: anywhere; }.file-panel-embedded .file-draft small { display: block; color: var(--muted); }
.file-panel-embedded .order-file-save { background: var(--accent); border-color: var(--accent); color: #fff; }
@media(max-width:600px){ .order-material-dialog { padding: 20px; border-radius: 16px; }.order-material-title { gap: 9px; }.order-material-title h2 { font-size: 1.12rem; }.order-file-picker { min-height: 150px; padding: 18px; } }

/* Current overview follows the order-card palette; data and routes are unchanged. */
.current-overview { max-width: 1400px; margin: 0 auto; padding: 26px; border-radius: 20px; background: linear-gradient(145deg,#fff,#f3f3f5); --accent-soft: #f1f1f3; }
.current-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 26px; }
.current-heading h1 { margin: 0 0 8px; }.current-heading p { margin: 0; color: var(--muted); }
.current-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 16px; border: 1px solid #242428; border-radius: 10px; background: #fff; font-weight: 500; }.current-refresh .ui-icon { width: 19px; height: 19px; }
.current-refresh:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.current-overview .current-stats { gap: 18px; }.current-overview .current-stat { display: flex; flex-direction: column; gap: 15px; min-width: 0; padding: 22px; border: 1px solid #dcdce0; border: 1px solid var(--card-outline); border-radius: 15px; background: #fff; box-shadow: 0 4px 14px #11111105; }
.current-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.current-overview .current-stats b { color: #242428; font-size: 2rem; line-height: 1.15; }
.current-stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid #e3e3e7; border-radius: 12px; color: var(--accent); }.current-stat-icon .ui-icon { width: 24px; height: 24px; }
.current-stat-label { font-weight: 500; }.current-overview .current-stat:hover { border-color: var(--accent); box-shadow: 0 5px 18px #1111110c; }
.current-section-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 32px 0 16px; }.current-section-heading h2 { margin: 0; font-size: 1.25rem; }
.current-overview .current-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,420px),1fr)); gap: 20px; margin-top: 0; align-items: start; }
.current-overview .current-work-card { margin: 0; padding: 0; border: 1px solid #dcdce0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px #11111105; }
.current-card-heading { display: flex; align-items: center; gap: 11px; padding: 20px 22px; border-bottom: 1px solid #e9e9ec; }.current-card-heading h2 { flex: 1; margin: 0; font-size: 1.1rem; line-height: 1.35; }.current-card-icon { display: inline-flex; flex: 0 0 auto; color: var(--accent); }.current-card-icon .ui-icon { width: 23px; height: 23px; }
.current-card-count { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; background: #f1f1f3; color: #29292e; font-weight: 600; font-size: var(--text-small); }
.current-overview .current-needs-attention { border-left: 3px solid var(--accent); }.current-needs-attention .current-card-count { background: var(--accent); color: #fff; }
.current-overview .current-row { gap: 18px; padding: 20px 22px; align-items: center; }.current-overview .current-row:last-child { border-bottom: 0; }.current-overview .current-row:hover { background: #f7f7f8; text-decoration: none; }
.current-row-copy { flex: 1; min-width: 0; }.current-row-copy > b { line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }.current-row-copy > small { margin-top: 7px; font-size: var(--text-small); line-height: 1.45; }
.current-order-client { margin-top: 7px; color: var(--muted); font-size: var(--text-small); }.current-status-row { margin-top: 10px; }.current-overview .current-status-chip { display: inline-flex; padding: 4px 9px; border: 1px solid #d7d7dc; border-radius: 7px; background: #fff; color: #29292e; font-size: .83rem; line-height: 1.4; }
.current-next { margin-top: 10px; color: #323238; font-size: var(--text-small); line-height: 1.5; }.current-overview .current-due { display: flex; align-items: center; gap: 6px; }.current-due .ui-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.current-overview .current-overdue { display: inline-block; margin-top: 8px; color: var(--accent); font-size: var(--text-small); font-weight: 600; }
.current-overview .current-row-action { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 11px; border: 1px solid #242428; border-radius: 9px; color: #242428; background: #fff; font-size: var(--text-small); font-weight: 500; white-space: nowrap; }.current-row:hover .current-row-action { color: var(--accent); border-color: var(--accent); }
.current-list-more { margin: 0; padding: 16px 22px; color: var(--muted); font-size: var(--text-small); border-top: 1px solid #e9e9ec; }
.current-empty { grid-column: 1/-1; padding: 40px 24px; border: 1px solid #dedee3; border-radius: 16px; background: #fff; text-align: center; }.current-empty > span { display: inline-flex; color: var(--accent); }.current-empty .ui-icon { width: 32px; height: 32px; }.current-empty h2 { margin: 14px 0 8px; font-size: 1.2rem; }.current-empty p { margin: 0; color: var(--muted); }
.current-overview a:focus-visible, .current-overview button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media(max-width:760px){ .current-overview { padding: 16px; }.current-heading { align-items: flex-start; }.current-overview .current-stats { gap: 12px; }.current-overview .current-stat { padding: 18px; }.current-overview .current-grid { grid-template-columns: minmax(0,1fr); }.current-card-heading { padding: 18px; }.current-overview .current-row { padding: 18px; flex-wrap: wrap; }.current-row-copy { flex-basis: 230px; }.current-overview .current-row-action { min-height: 42px; margin-left: auto; }.current-section-heading { margin-top: 26px; } }

@media(max-width:600px){ .current-overview .current-stat { flex-direction: row; align-items: center; gap: 18px; }.current-overview .current-stat-top { flex: 0 0 auto; gap: 14px; }.current-stat-label { min-width: 0; } }

/* Current: two expanded full-width work queues. */
.current-overview .current-workspace { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.current-workspace .current-work-card { width: 100%; }
.current-overview .current-action-row { display: flex; gap: 28px; align-items: center; }
.current-item-title { display: block; color: #242428; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; text-decoration: none; }.current-item-title:hover { text-decoration: underline; }
.current-action-row .current-row-copy { display: grid; gap: 8px; flex: 1; min-width: 0; }
.current-action-row .current-row-copy > * { margin: 0; }
.current-action-row .current-order-client { display: block; line-height: 1.4; }
.current-action-row .current-status-row { display: block; }
.current-action-row .current-next { display: block; line-height: 1.5; overflow-wrap: anywhere; }
.current-overview .current-row-action { flex: 0 0 270px; max-width: 270px; min-height: 44px; white-space: normal; text-align: center; line-height: 1.4; }
.current-overview .current-action-primary { border-color: var(--accent); color: var(--accent); }
.current-task-description { margin: 10px 0 0; font-size: var(--text-small); line-height: 1.5; color: #44444a; overflow-wrap: anywhere; }
.current-block-empty { margin: 0; padding: 24px 22px; color: var(--muted); }
.current-block-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 22px; border-top: 1px solid #e9e9ec; font-size: var(--text-small); }.current-block-footer > span { margin-right: auto; color: var(--muted); }.current-block-footer a { color: #29292e; }
@media(max-width:760px){ .current-overview .current-action-row { align-items: stretch; gap: 14px; }.current-action-row .current-row-copy { flex-basis: 100%; }.current-overview .current-action-row .current-row-action { flex: 0 1 auto; min-height: 44px; width: 100%; max-width: none; }.current-workspace .current-card-heading { gap: 9px; } }

/* Order rows: two readable pairs, with the action in its own column. */
@media(min-width:1000px){
 .current-order-row .current-row-copy { grid-template-columns: minmax(220px,1fr) minmax(200px,1fr); column-gap: 28px; align-items: start; }
 .current-order-row .current-item-title { grid-column: 1; grid-row: 1; }
 .current-order-row .current-order-client { grid-column: 1; grid-row: 2; }
 .current-order-row .current-status-row { grid-column: 2; grid-row: 1; }
 .current-order-row .current-next { grid-column: 2; grid-row: 2; }
 .current-order-row .current-row-copy > small { grid-column: 2; }
}


/* Calculations share the orders visual language; data and commands stay separate. */
.calc-workspace { min-width: 0; }
.calc-heading { height: auto; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 8px 0 26px; }
.calc-heading h1 { margin: 0; font-size: 1.85rem; line-height: 1.25; overflow-wrap: anywhere; }
.calc-heading > div { min-width: 0; }
.calc-workspace .calc-primary,.calc-create .calc-primary { display: inline-flex; gap: 9px; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.calc-workspace .calc-primary:hover,.calc-create .calc-primary:hover { background: var(--accent-hover); color: #fff; }
.calc-workspace .ui-icon { width: 21px; height: 21px; flex: 0 0 auto; }
.calc-tabs { margin-bottom: 20px; }
.calc-tabs button { display: flex; gap: 10px; align-items: center; }
.calc-tabs button span { padding: 1px 8px; border-radius: 7px; background: #eceef2; font-size: .85rem; }
.calc-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.calc-table { width: 100%; min-width: 1000px; border-collapse: collapse; table-layout: fixed; }
.calc-table th { background: #f7f8fa; color: #555d68; font-weight: 500; font-size: .85rem; text-align: left; }
.calc-table th,.calc-table td { padding: 18px; vertical-align: middle; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.calc-table th:nth-child(1) { width: 29%; }.calc-table th:nth-child(2) { width: 22%; }.calc-table th:nth-child(3) { width: 20%; }.calc-table th:nth-child(4) { width: 18%; }.calc-table th:last-child { width: 140px; }
.calc-table tr:last-child td { border-bottom: 0; }.calc-table tbody tr:hover { background: #fafafb; }
.calc-title { display: block; color: #262a30; font-weight: 600; text-decoration: none; line-height: 1.4; }.calc-title:hover { text-decoration: underline; }
.calc-client { display: block; margin-top: 8px; font-size: 1rem; color: #4d5560; }
.calc-phase { display: grid; gap: 7px; padding: 11px 13px; border: 1px solid #6f9bd4; border-radius: 10px; background: #bcd8ff; color: #262a30; min-width: 0; }
.calc-phase b { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; line-height: 1.4; }.calc-phase span { font-size: .85rem; line-height: 1.4; }
.calc-tone-client { background: #ffe29b; border-color: #c49a3d; }.calc-tone-warehouse { background: #a8e2d4; border-color: #4c9f8c; }.calc-tone-closed { background: #eef0f3; border-color: #d3d8df; }
.calc-next,.calc-last { display: block; font-size: .9rem; line-height: 1.5; }.calc-table small { display: block; margin-top: 7px; color: var(--muted); font-size: .85rem; }
.calc-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid #262a30; border-radius: 9px; background: #fff; color: #262a30; text-decoration: none; white-space: nowrap; font-size: .9rem; }
.calc-open:hover { border-color: var(--accent); color: var(--accent); }
.calc-detail { max-width: 1300px; margin: 0 auto; }.calc-detail > .back { display: inline-block; margin-bottom: 18px; }
.calc-detail .calc-heading { align-items: flex-start; }.calc-detail .calc-heading > .calc-phase { min-width: 200px; max-width: 300px; }
.calc-eyebrow { margin: 0 0 9px; color: var(--accent); font-weight: 600; }.calc-person { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }.calc-person span { margin-left: 10px; color: var(--muted); font-size: .9rem; }
.calc-action-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px solid #d3d7de; border-radius: 12px; background: #fff; }
.calc-action-card h2 { font-size: 1rem; margin: 0 0 7px; }.calc-action-card p { margin: 0; color: #515864; }
.calc-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }.calc-actions button,.calc-section button,.calc-edit-panel button { padding: 10px 14px; min-height: 44px; }
.calc-detail .work-card { padding: 24px; border-radius: 13px; margin: 22px 0; min-width: 0; }.calc-section h2,.calc-edit-panel h2 { display: flex; gap: 10px; align-items: center; font-size: 1.1rem; margin: 0 0 20px; }.calc-section h2 .ui-icon { color: var(--accent); }
.calc-section-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 20px; }.calc-section-heading h2 { margin: 0; }
.calc-description h3,.calc-field-pair h3 { font-size: .9rem; color: var(--muted); margin: 0 0 8px; font-weight: 500; }.calc-description p { margin: 0 0 22px; }
.calc-facts,.calc-field-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }.calc-facts { margin: 0; }.calc-facts > div { padding: 16px; border: 1px solid #e2e5ea; border-radius: 10px; background: #fafbfc; }.calc-facts dt { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }.calc-facts dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.calc-frozen { padding: 12px 14px; border-left: 3px solid #7b8594; background: #f4f5f7; color: #59616d; font-size: .85rem; margin: 0 0 22px; }
.calc-answer { border: 1px solid var(--card-outline); }.calc-section .order-copy { overflow-wrap: anywhere; }.calc-edit-panel { border-color: #bd6970; }.calc-edit-panel .task-editor { max-width: none; }.calc-edit-panel form { display: grid; gap: 14px; }.calc-edit-panel form button[type=submit] { border-color: var(--accent); background: var(--accent); color: #fff; }
.calc-history summary { padding: 14px 18px; border: 0; background: #f7f8fa; font-weight: 600; }.calc-history summary span { margin-left: 12px; color: var(--muted); }.calc-history ol { margin: 20px 0 0; padding-left: 24px; }.calc-history li { padding: 10px 0; }.calc-history small { display: block; color: var(--muted); margin-top: 6px; }
.calc-create { max-width: 950px; padding: 26px; border: 1px solid var(--card-outline); }
@media(max-width:760px){ .calc-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }.calc-heading h1 { font-size: 1.5rem; }.calc-detail .calc-heading > .calc-phase { width: 100%; max-width: none; }.calc-person span { margin-left: 0; flex-basis: 100%; }.calc-action-card { flex-direction: column; align-items: stretch; padding: 18px; }.calc-actions { justify-content: flex-start; }.calc-actions > * { flex: 1 1 160px; }.calc-facts,.calc-field-pair { grid-template-columns: minmax(0,1fr); gap: 16px; }.calc-detail .work-card { padding: 18px; }.calc-section-heading { flex-wrap: wrap; }.calc-create { padding: 18px; } }

.calc-files .file-panel summary { padding: 14px 18px; border: 0; background: #f7f8fa; font-weight: 600; margin-bottom: 18px; }
.calc-files input[type=file]::file-selector-button { padding: 9px 13px; margin-right: 12px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); background: #fff; font: inherit; cursor: pointer; }
.calc-files .file-panel [role=status]:empty,.calc-detail > [role=alert]:empty { display: none; }

/* Client directory: four aligned columns, shared orders style. */
.clients-directory { min-width: 0; max-width: 1500px; margin: 0 auto; }
.clients-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 8px 0 24px; }
.clients-heading h1 { margin: 0; font-size: 1.85rem; line-height: 1.3; }
.clients-directory-count { display: block; margin-top: 8px; color: var(--muted); font-size: .9rem; }
.clients-create { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; min-height: 44px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.clients-create:hover { color: #fff; background: var(--accent-hover); }
.clients-filter-panel { display: grid; grid-template-columns: minmax(240px,1fr) minmax(220px,340px); gap: 20px; padding: 20px 22px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.clients-filter-panel label { display: grid; gap: 8px; min-width: 0; color: #555d68; font-size: .9rem; }
.clients-filter-panel input,.clients-filter-panel select { width: 100%; min-width: 0; min-height: 46px; padding: 9px 42px 9px 13px; border: 1px solid var(--control-border); border-radius: 9px; background-color: #fff; color: var(--text); font: inherit; }
.clients-result-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 13px; color: #626973; font-size: .85rem; }
.clients-result-heading b { color: #262a30; margin-left: 7px; }
.clients-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.clients-table { width: 100%; min-width: 850px; border-collapse: collapse; table-layout: fixed; }
.clients-table th { padding: 16px 20px; background: #edf0f4; color: #505965; font-weight: 600; font-size: .85rem; text-align: left; border-bottom: 1px solid #d9dde3; }
.clients-table th:first-child { width: 29%; }.clients-table th:nth-child(2) { width: 22%; }.clients-table th:last-child { width: 120px; }
.clients-table td { padding: 18px 24px; min-width: 0; width: auto; vertical-align: middle; border-top: 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.clients-table td:first-child { width: auto; padding: 18px 24px; }.clients-table td:nth-child(2) { min-width: 0; }
.clients-table tr:last-child td { border-bottom: 0; }.clients-table tbody tr:hover { background: #f7f9fc; }.clients-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 var(--accent); }
.clients-identity { display: flex; align-items: center; gap: 14px; }.clients-identity > div { min-width: 0; }
.clients-avatar { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid #d8dce2; border-radius: 12px; background: #fafbfc; color: var(--accent); }.clients-avatar .ui-icon { width: 23px; height: 23px; }
.clients-name { display: block; color: #262a30; text-decoration: none; font-weight: 600; font-size: 1.1rem; line-height: 1.4; }.clients-name:hover { text-decoration: underline; }.clients-number { display: block; margin-top: 6px; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.clients-manager { display: inline-flex; gap: 9px; align-items: center; color: #353e4a; font-size: .95rem; }.clients-manager-avatar { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid #96b5df; background: #dceafd; color: #345580; font-size: .8rem; font-weight: 600; }
.clients-orders { display: grid; gap: 4px; width: fit-content; text-decoration: none; }
.clients-orders:hover .clients-total, .clients-orders:focus-visible .clients-total { text-decoration: underline; }
.clients-active { display: flex; align-items: baseline; gap: 8px; color: #7a8390; font-size: .9rem; }.clients-active b { color: #8a929d; font-size: 1.25rem; line-height: 1.35; font-weight: 600; font-variant-numeric: tabular-nums; }.clients-orders.has-active .clients-active { color: #414a56; }.clients-orders.has-active .clients-active b { color: var(--accent); }.clients-total { color: #737c89; font-size: .8rem; }
.clients-open { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 8px 12px; border: 1px solid #262a30; border-radius: 9px; color: #262a30; background: #fff; text-decoration: none; font-size: .9rem; white-space: nowrap; }.clients-open:hover { color: var(--accent); border-color: var(--accent); }
@media(max-width:760px){ .clients-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }.clients-heading h1 { font-size: 1.5rem; }.clients-filter-panel { grid-template-columns: minmax(0,1fr); padding: 18px; gap: 16px; }.clients-result-heading { align-items: flex-start; } }

/* Client profile: all tabs use the same readable panels and object rows. */
.client-profile { max-width: 1400px; min-width: 0; margin: 0 auto; }
.client-profile > .back { display: inline-block; margin-bottom: 20px; }
.profile-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 28px; border: 1px solid #dce0e6; border: 1px solid var(--card-outline); border-radius: 14px; background: #fff; }
.profile-heading h1 { margin: 5px 0 10px; font-size: 1.85rem; line-height: 1.25; overflow-wrap: anywhere; }.profile-eyebrow { color: var(--accent); font-size: .9rem; font-weight: 600; }.profile-heading .muted { font-size: .9rem; }
.client-profile .ui-icon { width: 21px; height: 21px; flex: 0 0 auto; }.client-profile .profile-chat { display: inline-flex; gap: 10px; align-items: center; border-color: var(--accent); color: var(--accent); padding: 11px 16px; }
.client-profile .client-tabs { margin-top: 24px; gap: 8px; padding: 0 0 8px; border: 0; }
.client-profile .client-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 15px; border: 1px solid transparent; border-radius: 10px; white-space: nowrap; color: #626b78; }
.client-profile .client-tabs a[aria-current] { background: #fff; border-color: #c6cbd3; border-bottom: 3px solid var(--accent); color: #262a30; font-weight: 600; }.client-profile .client-tabs a[aria-current] .ui-icon { color: var(--accent); }
.client-profile > .work-card { margin-top: 16px; padding: 24px; border: 1px solid #dce0e6; border-radius: 14px; min-width: 0; }
.profile-tab-title { display: flex; align-items: center; gap: 12px; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid #e8ebef; }.profile-tab-title h2 { font-size: 1.15rem; margin: 0; }
.client-profile .client-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 16px; margin: 0; border: 0; border-bottom: 1px solid #e7eaef; border-radius: 0; background: #fff; color: #262a30; }
.client-profile .client-row:hover { background: #f7f9fc; }.client-profile .client-row > span:first-child { flex: 1; min-width: 0; }.client-profile .client-row b { font-size: 1rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }.client-profile .client-row small { display: block; color: var(--muted); margin-top: 8px; font-size: .85rem; }.client-profile .client-row > span:nth-child(2) { flex: 0 1 auto; min-width: 140px; }
.client-profile .profile-row-arrow { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d8dde4; border-radius: 9px; flex-shrink: 0; color: #525c6b; }
.client-profile .profile-status { display: inline-flex; width: fit-content; max-width: 100%; min-width: 0 !important; padding: 5px 10px; border: 1px solid #c8d4e7; border-radius: 8px; background: #e9f0fb; color: #303e52; font-size: .85rem; }
.client-profile .profile-calc-ready { background: #fff1cf; border-color: #ddc58e; color: #544120; }.client-profile .profile-calc-closed { background: #eef0f3; border-color: #d6dbe2; color: #5b6471; }.client-profile .profile-arrived { background: #dff1eb; border-color: #a8cdbd; color: #2a5747; }
.client-profile .profile-invoice-meta { display: flex !important; align-items: center; flex-wrap: wrap; gap: 12px; }.client-profile .profile-amount { display: flex; align-items: center; gap: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.client-profile .open-link,.client-profile button { min-height: 44px; padding: 10px 14px; border-radius: 9px; }.client-profile .order-actions { gap: 12px; margin-top: 20px; }
.client-profile .quick-filters { margin: 20px 0; gap: 10px; }.client-profile .quick-filters button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); background: #fff; box-shadow: inset 0 -2px var(--accent); }
.client-profile .order-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 22px 0; }.client-profile .order-summary > div { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; padding: 18px; border: 1px solid #e0e4ea; border-radius: 11px; background: #fafbfc; }.client-profile .order-summary > div:last-child { grid-column: 1/-1; }.client-profile .order-summary dd { font-weight: 500; line-height: 1.6; }
.profile-info { color: #697382; border-left: 3px solid #a5adb8; padding: 10px 15px; font-size: .9rem; }
.client-profile .profile-balances { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }.client-profile .profile-balances button { display: grid; gap: 12px; text-align: left; padding: 18px; min-width: 0; border-color: #d7dce4; background: #fafbfc; color: #262a30; }.profile-balances button span { color: #6b7480; font-size: .85rem; }.profile-balances button b { font-size: 1.1rem; overflow-wrap: anywhere; }.client-profile .profile-balances button[aria-pressed=true] { background: #fff; border-color: var(--accent); color: #262a30; }.client-profile .client-balance { font-size: 1.65rem; margin: 26px 0 18px; }
.client-profile .order-items { padding: 0; margin: 20px 0; list-style: none; }.client-profile .order-items li { display: grid; gap: 10px; padding: 18px; margin-bottom: 12px; border: 1px solid #e1e5eb; border-radius: 10px; background: #fafbfc; }.client-profile .order-items li > span { display: block; }.client-profile .order-items small { color: var(--muted); font-size: .85rem; line-height: 1.6; }.client-profile .order-items p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.client-profile [data-client-note] { margin-top: 24px; padding: 20px; background: #f7f8fa; border: 1px solid #e0e4ea; border-radius: 11px; }.client-profile [data-client-note] button[type=submit],.client-profile [data-client-number] button[type=submit] { background: var(--accent); border-color: var(--accent); color: #fff; }.client-profile [role=alert]:empty { display: none; }
@media(max-width:760px){ .profile-heading { flex-wrap: wrap; gap: 18px; padding: 20px; }.profile-heading h1 { font-size: 1.5rem; }.client-profile > .work-card { padding: 18px; }.client-profile .client-row { flex-wrap: wrap; gap: 14px; padding: 18px 8px; }.client-profile .client-row > span:first-child { flex-basis: 100%; }.client-profile .client-row > span:nth-child(2) { flex: 1; }.client-profile .order-summary,.client-profile .profile-balances { grid-template-columns: minmax(0,1fr); }.client-profile .client-tabs a { padding: 10px 12px; }.client-profile .profile-amount { justify-content: space-between; } }

.invoice-workspace { min-width: 0; }.invoice-workspace > .back { display: inline-block; margin: 6px 0 22px; }
.invoice-workspace .work-card { padding: 26px; margin: 22px 0; border: 1px solid #dce0e6; border-radius: 14px; min-width: 0; }
.invoice-workspace .invoice-main { margin-top: 0; border: 1px solid var(--card-outline); }
.invoice-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }.invoice-hero > div { min-width: 0; }
.invoice-eyebrow { color: var(--accent); font-size: .9rem; font-weight: 600; }.invoice-hero h1 { font-size: 1.8rem; line-height: 1.3; margin: 8px 0 12px; overflow-wrap: anywhere; }.invoice-client { display: flex; gap: 10px; align-items: center; margin: 0; color: #596371; }
.invoice-workspace .ui-icon { width: 22px; height: 22px; flex: 0 0 auto; }
.invoice-cost { display: grid; justify-items: end; gap: 7px; }.invoice-cost small { color: var(--muted); font-size: .85rem; }.invoice-cost b { font-size: 1.65rem; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; }
.invoice-payment { font-size: .85rem; color: #8a5d13; }.invoice-payment.is-paid { color: #36725d; }
.invoice-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid #e6e9ee; border-bottom: 1px solid #e6e9ee; }.invoice-status-line a { color: #303d50; font-size: .95rem; }.invoice-status-line > span:not(.invoice-badge) { font-size: .95rem; }
.invoice-badge { display: inline-flex; gap: 8px; align-items: center; border: 1px solid #b2d4c5; background: #e6f3ed; color: #2e614d; border-radius: 9px; padding: 7px 11px; font-size: .9rem; }.invoice-badge.is-arrived { border-color: #d9dee5; background: #eef0f3; color: #687281; }
.invoice-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 24px 0; }.invoice-facts > div { padding: 16px; border: 1px solid #e0e4ea; border-radius: 10px; background: #f8f9fb; }.invoice-facts dt { color: #727c89; font-size: .85rem; margin-bottom: 9px; }.invoice-facts dd { margin: 0; color: #303a48; font-weight: 500; overflow-wrap: anywhere; }
.invoice-document { border: 1px solid #d7dce4; border-radius: 12px; overflow: hidden; background: #fff; margin: 24px 0; }.invoice-document-heading { display: flex; align-items: center; gap: 10px; padding: 15px 20px; background: #f1f3f6; color: #3c4858; border-bottom: 1px solid #dfe4eb; }.invoice-document-heading .ui-icon { color: var(--accent); }.invoice-document-heading h2 { font-size: 1rem; margin: 0; }.invoice-original { white-space: pre-wrap; overflow-wrap: anywhere; padding: 24px; font-size: 1rem; line-height: 1.9; }
.invoice-workspace .order-actions { gap: 12px; margin: 22px 0 6px; }.invoice-workspace button,.invoice-workspace .open-link { min-height: 44px; padding: 10px 14px; border-radius: 9px; }.invoice-workspace .open-link { border-color: #3e4857; background: #fff; }.invoice-workspace button:hover,.invoice-workspace .open-link:hover { background: #f5f6f8; border-color: var(--accent); }
.invoice-workspace .work-card > h2 { font-size: 1.1rem; margin: 0 0 18px; }.invoice-workspace form { display: grid; gap: 16px; margin: 20px 0 0; max-width: 900px; padding: 22px; border: 1px solid #dce1e8; border-radius: 12px; background: #f8f9fb; }.invoice-workspace form label { display: grid; gap: 8px; }.invoice-workspace form input,.invoice-workspace form select,.invoice-workspace form textarea { min-width: 0; width: 100%; padding: 11px 13px; border: 1px solid var(--control-border); border-radius: 9px; color: #262a30; background: #fff; font: inherit; }.invoice-workspace form input[type=checkbox] { width: auto; }.invoice-workspace form .stage-confirm { display: flex; }.invoice-workspace form button:not([type=button]) { background: var(--accent); border-color: var(--accent); color: #fff; }.invoice-workspace [role=alert]:empty { display: none; }
.invoice-workspace details.work-card > summary { padding: 13px 18px; border: 0; background: #f3f5f8; font-weight: 600; }.invoice-workspace .order-items li { padding: 14px 0; }.invoice-workspace .order-items small { display: block; color: var(--muted); margin-top: 7px; font-size: .85rem; }
.invoice-workspace .client-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px; background: #fff; }.invoice-workspace .client-row > span:first-child { flex: 1; min-width: 0; }.invoice-workspace .client-row small { display: block; color: var(--muted); margin-top: 8px; }
@media(max-width:760px){ .invoice-hero { flex-direction: column; gap: 18px; }.invoice-cost { justify-items: start; }.invoice-hero h1 { font-size: 1.45rem; }.invoice-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.invoice-workspace .work-card { padding: 18px; }.invoice-original { padding: 18px; }.invoice-workspace form { padding: 16px; }.invoice-workspace .client-row { flex-wrap: wrap; gap: 16px; }.invoice-workspace .client-row > span:first-child { flex-basis: 100%; }.profile-tab-invoices .profile-amount { justify-content: space-between; } }

/* Shared invoice register: transit first, arrival below; payment is independent. */
.invoice-register { min-width: 0; margin-top: 20px; }
.invoice-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--accent); border: 1px solid var(--card-outline); border-radius: 13px; background: #fff; box-shadow: 0 4px 16px #262a3007; }
.invoice-table { width: 100%; min-width: 1080px; table-layout: fixed; border-collapse: collapse; }
.invoice-table thead th { background: #f4f5f7; font-weight: 600; color: #303946; font-size: .85rem; text-align: left; padding: 17px 14px; border-bottom: 1px solid #c8a0a4; }
.invoice-table thead th:first-child { width: 30%; }.invoice-table thead th:nth-child(2) { width: 125px; }.invoice-table thead th:nth-child(3),.invoice-table thead th:nth-child(4) { width: 95px; }.invoice-table thead th:nth-child(5) { width: 140px; }.invoice-table thead th:nth-child(6) { width: 125px; }.invoice-table thead th:last-child { width: 125px; }
.invoice-table .invoice-data-row td { padding: 20px 14px; min-width: 0; width: auto; vertical-align: middle; border: 0; border-bottom: 1px solid #e5e9ef; font-size: .9rem; overflow-wrap: anywhere; }
.invoice-table .invoice-data-row td:first-child { width: auto; padding: 20px 18px; box-shadow: inset 3px 0 #65a78b; }.invoice-table .invoice-data-row.is-arrived td:first-child { box-shadow: inset 3px 0 #c4cbd4; }.invoice-table .invoice-data-row:hover { background: #f8fafb; }.invoice-table .invoice-data-row:last-child td { border-bottom: 0; }
.invoice-list-name { display: block; color: #262e39; font-size: .95rem; line-height: 1.5; font-weight: 600; text-decoration: none; }.invoice-list-name:hover { text-decoration: underline; }.invoice-list-order { display: block; margin-top: 7px; color: #5a6573; font-size: .83rem; line-height: 1.5; }.invoice-list-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; color: #7a8390; font-size: .78rem; line-height: 1.6; }
.invoice-list-state { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #b2d4c5; border-radius: 8px; color: #2e614d; background: #e6f3ed; white-space: nowrap; font-size: .82rem; }.invoice-list-state .ui-icon { width: 18px; height: 18px; }.invoice-list-state.is-arrived { background: #eef0f3; border-color: #d9dee5; color: #687281; }
.invoice-list-cost { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }.invoice-list-payment { color: #8a631c; font-size: .83rem; }.invoice-list-payment.is-paid { color: #47715d; }
.invoice-list-open { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--accent); border-radius: 9px; min-height: 42px; padding: 8px 12px; white-space: nowrap; color: var(--accent); background: #fff; text-decoration: none; font-size: .85rem; }.invoice-list-open:hover { color: #fff; border-color: var(--accent); background: var(--accent); }

/* Chat surfaces: separate cards, selected outline, no decorative red top stripe. */
.chat-layout { border-color: #c8cfd9; border-radius: 12px; }
.chat-directory { background: #e0e1e2; }
.chat-channel-list { display: grid; gap: 8px; padding: 12px; }
.chat-search { padding: 14px 12px; border-bottom: 1px solid #bfc1c4; }.chat-search input { min-height: 44px; border-color: #c8ced7; background: #fff; font-size: .85rem; }
.chat-channel { min-height: 72px; padding: 12px; border: 1px solid #cbd2dc; border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--text); gap: 10px; box-shadow: 0 1px 3px #262a3008; }
.chat-channel-symbol { display: grid; place-items: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 12px; background: #fff; border: 1px solid #e0e4ea; }.chat-channel[aria-current] .chat-channel-symbol .ui-icon { color: var(--accent); }
.chat-channel-name { display: flex; flex: 1; align-items: baseline; flex-wrap: nowrap; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; font-size: .95rem; font-weight: 500; }.chat-client-number { color: inherit; font: inherit; font-variant-numeric: tabular-nums; flex: 0 0 auto; }.chat-channel-name > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chat-channel .channel-signals { display: flex; flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; max-width: none; gap: 5px; }.chat-channel .channel-signals > span { font-size: 20px; line-height: 1; min-width: 32px; min-height: 32px; justify-content: center; display: inline-flex; align-items: center; gap: 3px; margin: 0; }.chat-channel .channel-signals .ui-icon { width: 22px; height: 22px; }
.chat-heading { position:relative; display:grid; grid-template-columns:minmax(220px,1fr) minmax(0,auto); padding:6px 12px; gap:8px; min-height:56px; border-bottom: 1px solid #d8dde5; background: #fff; box-shadow: 0 2px 7px #26303d04; }

.chat-heading-identity { min-width:0; display:flex; align-items:center; gap:10px; }.chat-heading-identity h2 { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.chat-heading-number { display: inline; color: inherit; font: inherit; font-variant-numeric: tabular-nums; }.chat-heading h2 { font-size: 1.1rem; overflow-wrap: anywhere; }
.chat-heading-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; min-width:0; }
.chat-pair-link { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; gap:5px; min-height:36px; padding:6px 9px; border:1px solid var(--accent); border-radius:9px; background:#fff; color:var(--accent); font-size:.8rem; white-space:nowrap; text-decoration:none; }.chat-pair-link:hover { background:#fafafa; }.chat-pair-link .ui-icon { width:19px; height:19px; }.chat-pair-short { display:none; }
@media(max-width:1200px) { .chat-pair-wide { display:none; }.chat-pair-short { display:inline; } }
.chat-participants { position:relative; flex-shrink:0; }
.chat-participants > summary { display:flex; align-items:center; justify-content:center; gap:4px; min-height:36px; padding:6px 9px; list-style:none; font-size:.8rem; cursor:pointer; white-space:nowrap; }
.chat-participants > summary::-webkit-details-marker { display:none; }
.chat-participants .ui-icon { width:20px; height:20px; }
.chat-people-panel { position:absolute; right:0; top:calc(100% + 6px); z-index:10; width:260px; max-width:calc(100vw - 32px); margin:0; padding:8px; list-style:none; background:var(--surface); border:1px solid var(--control-border); border-radius:10px; box-shadow:var(--popup-shadow); }
.chat-people-panel li { display:grid; gap:2px; padding:8px; }
.chat-people-panel li + li { border-top:1px solid var(--border); }
.chat-people-panel b { font-size:.9rem; overflow-wrap:anywhere; }
.chat-people-panel li > span { font-size:.8rem; color:var(--muted); }
@media (max-width:900px), (max-width:1100px) and (max-height:500px) and (pointer:coarse) {
  .chat-heading { grid-template-columns:44px minmax(0,1fr); }
  .chat-heading-identity { grid-column:2; grid-row:1; gap:6px; }.chat-heading .chat-profile-link { padding:5px 6px; gap:4px; font-size:.72rem; }.chat-heading .chat-heading-actions { gap:4px; }.chat-pair-link { min-height:44px; padding:5px 7px; font-size:.75rem; }
  .chat-heading-tools { grid-column:1 / -1; grid-row:2; justify-content:flex-start; gap:4px; }
  .chat-participants > summary { min-width:44px; min-height:44px; padding:5px; }
  .chat-participants { position:static; }
  .chat-participants-label,.chat-profile-suffix { display:none; }
  .chat-profile-link { width:auto; height:44px; min-height:44px; padding:5px 7px; gap:4px; font-size:.75rem; }
  .chat-people-panel { left:8px; right:auto; top:calc(100% + 4px); }
}
.chat-profile-link { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:6px 10px; min-height:36px; flex-shrink:0; white-space:nowrap; font-size:.8rem; border: 1px solid #d7dce3; border-radius: 9px; color: #526071; background: #fff; }.chat-profile-link .ui-icon { width: 21px; height: 21px; }.chat-profile-link:hover { color: var(--accent); border-color: var(--accent); }
.chat-heading-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-shrink: 0; }.chat-heading-actions .chat-events-link { margin: 0; border: 1px solid #d6dce5; padding: 7px 10px; border-radius: 9px; color: #485465; font-size: .8rem; }
.chat-heading [data-chat-sound] { display: grid; place-items: center; width: 38px; height: 38px; min-height: 38px; padding: 8px; border: 1px solid #cbd2dc; border-radius: 9px; background: #fff; color: #536174; }.chat-heading [data-chat-sound] .ui-icon { width: 21px; height: 21px; }.chat-heading [data-chat-sound][aria-pressed=true] { color: var(--accent); border-color: var(--accent); }
.chat-messages { background-color:#c2d5d3; background-image:linear-gradient(135deg,#a1c0c0ef,#c9dadbef),url("/brand/chat-wallpaper-assortment.png"); background-size:auto,640px 640px; background-position:center; background-repeat:no-repeat,repeat; background-attachment:scroll; padding:18px; gap:12px; }.chat-message { padding:6px 12px; background:#fff; border-color:#d9d9d9; border-radius: 12px; box-shadow: 0 2px 5px #25303b06; max-width: min(88%,900px); }.chat-message p { margin:2px 0; line-height: 1.275; }.chat-message .message-order { background: #fafbfc; border-color: #cbd2dc; padding: 8px 10px; }.chat-message.mentioned-message { border-color: var(--accent); }
.chat-composer { padding: 14px 16px; border-top: 1px solid #d7dce5; }.chat-composer [data-chat-save-status]:empty { display: none; }.chat-input-row { gap: 10px; }.chat-composer textarea { padding: 9px 13px; border-radius: 11px; border-color: #bec6d1; background: #fafbfc; }.chat-attachment-tools > summary { border-color: #bdc6d2; border-radius: 10px; color: #59677a; }.chat-send { border-radius: 10px; }
.chat-attachment-picker { padding: 18px; border-color: #b8bec8; border: 1px solid var(--card-outline); border-radius: 12px; max-height: min(70dvh,580px); overflow: auto; }.chat-attachment-title { margin: 0 0 16px; font-size: 1rem; }.chat-file-picker { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 3px 10px; border: 1px dashed #bd7179; border-radius: 10px; background: #fafbfc; padding: 15px; cursor: pointer; }.chat-file-picker > span { display: grid; place-items: center; grid-row: 1/3; color: var(--accent); }.chat-file-picker b { font-size: .95rem; }.chat-file-picker small { font-size: .75rem; color: #7a8391; }.chat-file-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }.chat-attachment-picker > p { font-size: .75rem; line-height: 1.5; }.chat-attachment-picker select { padding: 10px 34px 10px 12px; border-color: #c4cbd5; border-radius: 9px; font-size: .9rem; }
@media(max-width:760px){ .chat-heading { padding:6px 8px; gap:4px; min-height:56px; }.chat-heading-actions { gap: 6px; }.chat-heading-actions .chat-events-link { padding: 6px 8px; }.chat-messages { padding: 12px 10px; gap: 10px; }.chat-message { max-width:95%; padding:6px 10px; }.chat-composer { padding: 10px; }.chat-channel { min-height: 76px; } }
@media(max-width:430px){ .chat-heading-actions .chat-events-word { display: none; }.chat-heading h2 { font-size: .95rem; }.chat-heading [data-chat-sound] { width: 34px; height: 34px; } }

/* Compact message timeline: dates between days, actions in one metadata row. */
.chat-day-separator { display: flex; align-items: center; justify-content: center; align-self: stretch; gap: 14px; margin: 9px 0 4px; color: #364247; font-size: .8rem; flex-shrink: 0; }
.chat-day-separator > span { padding: 5px 14px; white-space: nowrap; background:#fffffff0; border:1px solid #ffffffb3; border-radius:6px; box-shadow:0 1px 4px #26323814; font-weight:600; }
.chat-message { min-width: min(260px,100%); }
.chat-message .message-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; min-height:24px; margin-bottom:1px; font-size:.8rem; color: var(--muted); }
.message-meta time { white-space: nowrap; flex: 0 0 auto; font-size: .75rem; color: #87909d; }
.message-meta-actions { display: flex; align-items: center; gap: 3px; margin-left: auto; flex: 0 0 auto; }
.chat-message .message-reply { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height:24px; min-height:24px; margin:0; padding:2px; border: 0; border-radius: 6px; background: transparent; color: #8a94a2; }
.chat-message .message-reply:hover { background: #f1f3f6; color: var(--accent); }.message-meta-actions .ui-icon { width: 18px; height: 18px; }
.message-mention-icon { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 30px; height: 30px; border: 1px solid #c8ced7; border-radius: 7px; color: #778394; font-size: 22px; }.message-mention-icon.is-mine { color: #fff; background: var(--accent); border-color: var(--accent); }
.message-event-icon { display: inline-flex; align-items: center; flex: 0 0 auto; color: #a58242; }.message-event-icon .ui-icon { width: 16px; height: 16px; }
.chat-message .message-order { width: min(100%,470px); max-width: 100%; min-height: 0; margin-top:3px; padding:6px 10px; gap:9px; }.message-order > .ui-icon { width: 20px; height: 20px; flex: 0 0 auto; }.message-order > span:first-of-type { gap: 2px; }.message-order b { font-size: .9rem; line-height: 1.35; }.message-order small { font-size: .75rem; line-height: 1.4; }

/* App identity and account actions: one consistent top bar. */
.app-header { position: sticky; top: 0; z-index: 40; height: var(--app-header-height); padding: 5px 20px; gap: 16px; border-bottom: 1px solid #d3d9e2; box-shadow: 0 2px 8px #25303b04; }
.app-header .menu-toggle { width: 42px; height: 44px; min-height: 44px; padding: 9px; border: 1px solid #dfe3e9; border-radius: 10px; background: #fff; }
.app-header .brand { gap: 10px; padding-right: 24px; border-right: 1px solid #dfe3e9; font-size: 1.35rem; letter-spacing: -.5px; }
.brand-wordmark { display: block; width: 178px; max-width: 100%; height: auto; }
@media(max-width:760px){ .app-header .brand-wordmark { width: clamp(92px, 28vw, 120px); } }
.app-header .header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; border-right: 1px solid #dfe3e9; padding-right: 16px; }.app-header .header-actions > a { width: 40px; height: 40px; border: 1px solid transparent; background: #fff; }.app-header .header-actions > a:hover { border-color: #d5dce5; background: #f5f6f8; }
.app-header .profile { margin-left: 0; max-width: 45%; gap: 18px; height: 44px; }.app-header .profile > a { min-width: 0; max-width: 260px; }.app-header .profile > a > span { display: block; font-size: .9rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.app-header .profile small { display: block; font-size: .72rem; line-height: 1.4; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }.app-header .profile small::before { content: none; }
.chat-heading .chat-create-task { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; min-height: 40px; border: 1px solid var(--accent); border-radius: 9px; color: #fff; background: var(--accent); font-size: .85rem; white-space: nowrap; }.chat-heading .chat-create-task:hover { background: var(--accent-hover); }.chat-create-task .ui-icon { width: 20px; height: 20px; }
@media(max-width:850px){ .app-header { padding-inline: 12px; gap: 10px; }.app-header .brand { padding-right: 14px; }.app-header .header-actions { padding-right: 10px; gap: 4px; }.app-header .profile { gap: 12px; } }
@media(max-width:760px){ :root { --app-header-height: 56px; }.app-header { padding: 5px 8px; gap: 7px; }.app-header .brand { padding-right: 0; border-right: 0; gap: 6px; font-size: .95rem; letter-spacing: -.3px; }.app-header .menu-toggle { width: 36px; height: 40px; min-height: 40px; padding: 7px; }.app-header .profile { max-width: none; gap: 0; }.app-header .profile > a { display: none; }.app-header .header-actions { gap: 2px; padding-right: 7px; }.app-header .header-actions > a { width: 30px; height: 36px; }.chat-heading .chat-create-task { width: 36px; min-height: 36px; height: 36px; padding: 7px; justify-content: center; }.chat-create-task > span { display: none; } }

/* Shared notification policy: desktop table, stacked rows on phones. */
.notification-policy { min-width:0; }
.notification-policy-heading { border-left:4px solid var(--accent); padding:4px 0 4px 16px; margin-bottom:22px; }
.notification-policy-heading h2 { margin:0 0 6px; }
.notification-policy-heading p { margin:0; color:var(--muted); }
.notification-rules-wrap { border:1px solid var(--border); border: 1px solid var(--card-outline); border-radius:12px; overflow:hidden; background:var(--surface); }
.notification-rules { width:100%; table-layout:fixed; border-collapse:collapse; }
.notification-table-caption { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.notification-rules th { text-align:left; background:var(--surface-subtle); padding:16px; color:var(--muted); font-weight:600; }
.notification-rules th:nth-child(1) { width:31%; }
.notification-rules th:nth-child(2) { width:23%; }
.notification-rules th:nth-child(3) { width:19%; }
.notification-rules th:nth-child(4) { width:13%; }
.notification-rules th:nth-child(5) { width:14%; }
.notification-rules td { padding:18px 16px; vertical-align:middle; border-top:1px solid var(--border); overflow-wrap:anywhere; }
.notification-rules td strong { display:block; margin:4px 0 7px; font-size:1rem; }
.notification-rules td p { margin:0; color:var(--muted); font-size:var(--text-small); line-height:1.5; }
.notification-rule-group { display:block; color:var(--accent); font-weight:600; }
.notification-rules select { width:100%; max-width:100%; min-width:0; padding:10px 26px 10px 10px; background-color:var(--surface); }
.notification-interval { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:6px 0; }
.notification-interval span { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.notification-interval input { width:72px; min-width:0; padding:8px; text-align:center; }
.notification-rule-switch { display:flex; flex-wrap:wrap; align-items:center; gap:8px; cursor:pointer; }
.notification-rule-switch input { width:22px; height:22px; margin:0; accent-color:var(--accent); }
.notification-rule-switch span { font-size:var(--text-small); }
.notification-rule-off { background:var(--surface-subtle); }
.notification-rule-off .notification-rule-group { color:var(--muted); }
.notification-calendar,.notification-policy-history { margin-top:22px; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.notification-policy-history summary { cursor:pointer; padding:4px; font-weight:600; }
.notification-calendar { padding:0; }
.notification-policy .notification-calendar > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:48px;
  padding:12px 18px;
  border:0;
  background:var(--surface-subtle);
  color:var(--text);
  font-weight:600;
  list-style:none;
  cursor:pointer;
}
.notification-calendar > summary::-webkit-details-marker { display:none; }
.notification-calendar > summary::after {
  content:"";
  width:8px;
  height:8px;
  flex:none;
  border:solid currentColor;
  border-width:0 2px 2px 0;
  transform:rotate(45deg);
  margin:0 3px 4px;
}
.notification-calendar[open] > summary::after { transform:rotate(225deg); margin-block:4px 0; }
.notification-calendar-body { padding:16px 18px; border-top:1px solid var(--border); }
.notification-calendar-body > p { margin:0 0 16px; }
.notification-calendar .calendar-range {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  max-width:560px;
  margin:0 0 14px;
}
.notification-calendar .calendar-range label { display:grid; gap:6px; min-width:0; font-weight:600; }
.notification-calendar .calendar-range small { color:var(--muted); font-size:var(--text-small); font-weight:400; }
.notification-calendar .calendar-range input {
  width:100%;
  min-width:0;
  min-height:44px;
  padding:8px 12px;
  color:inherit;
  font:inherit;
  font-weight:400;
  background:var(--surface);
  border:1px solid var(--control-border);
  border-radius:8px;
}
.notification-policy .notification-calendar [data-closed-add] {
  border-color:var(--accent);
  color:var(--accent);
}
.notification-calendar .calendar-days { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.notification-calendar .calendar-days p { margin:0; }
@media (max-width:600px) {
  .notification-calendar .calendar-range { grid-template-columns:minmax(0,1fr); }
}
.notification-policy-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:18px 0; }
.notification-policy-actions .task-primary { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.notification-policy-actions .task-primary:hover { background:var(--accent-hover); }
.notification-policy-actions [role=status] { color:var(--muted); }
.notification-policy-history article { margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }
.notification-policy-history small { display:block; color:var(--muted); margin:6px 0; }
@media (max-width:1100px) {
 .notification-rules thead { display:none; }
 .notification-rules,.notification-rules tbody { display:block; }
 .notification-rules tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:18px; gap:16px; border-top:1px solid var(--border); }
 .notification-rules tr:first-child { border-top:0; }
 .notification-rules td { display:block; padding:0; border:0; min-width:0; }
 .notification-rules td:first-child { grid-column:1/-1; }
 .notification-rules td:not(:first-child)::before { content:attr(data-label); display:block; color:var(--muted); font-size:var(--text-small); margin-bottom:8px; }
}
@media (max-width:480px) {
 .notification-rules tr { grid-template-columns:minmax(0,1fr); padding:16px; }
 .notification-rules td:first-child { grid-column:auto; }
 .notification-policy-actions button { min-height:44px; }
}

.notification-rule-switch { min-height:44px; }

/* Participant identity: same light bubbles, avatar and explicit role. */
.person-avatar { position:relative; display:inline-grid; place-items:center; width:32px; height:32px; flex:0 0 32px; border-radius:50%; overflow:hidden; background:#788f84; color:#fff; }
.avatar-fallback { display:grid; place-items:center; width:100%; height:100%; }.person-avatar .ui-icon { width:19px; height:19px; }
.avatar-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.avatar-role-manager { background:#a58b4c; }.avatar-role-administrator { background:#82786b; }.avatar-role-warehouse { background:#718269; }.avatar-role-currency { background:#8f7f91; }.avatar-role-gateway { background:#6c8587; }.avatar-role-system { background:#879097; }
.message-author { display:flex; align-items:baseline; gap:5px; min-width:0; flex:0 1 auto; }.message-author > b { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#414c58; }
.message-author-role { font-size:.72rem; font-weight:400; color:#68737c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.message-meta .person-avatar { margin-right:1px; }.chat-message > p { margin-top:4px; }
.profile-photo-preview { display:flex; align-items:center; gap:16px; margin:12px 0; }.profile-photo-preview .person-avatar { width:72px; height:72px; flex-basis:72px; }.profile-photo-preview .ui-icon { width:36px; height:36px; }.profile-photo-preview p { max-width:48ch; margin:0; }
.profile-photo-picker { display:flex; flex-direction:column; align-items:flex-start; gap:8px; font-weight:600; }.profile-photo-picker input { max-width:100%; font-weight:400; }.profile-photo-form .order-actions { flex-wrap:wrap; gap:10px; }
@media(max-width:760px){ .message-meta .person-avatar { width:28px; height:28px; flex-basis:28px; }.chat-message .message-meta { gap:5px; }.message-author { gap:4px; }.message-author-role { font-size:.65rem; }.message-author > b { max-width:110px; }.profile-photo-preview { gap:12px; }.profile-photo-preview p { font-size:.85rem; } }

/* Desktop matches the approved avatar mockup; mobile keeps full-width text. */
@media(min-width:761px){
  .chat-messages { padding-left:62px; padding-right:62px; }
  .chat-message { position:relative; }
  .chat-message .message-meta .person-avatar { position:absolute; width:44px; height:44px; flex-basis:44px; left:-54px; top:4px; margin:0; }
  .chat-message.outgoing .message-meta .person-avatar { left:auto; right:-54px; }
  .chat-message .person-avatar .ui-icon { width:24px; height:24px; }
}

/* Device-specific installation help; illustrations are action diagrams, not OS screenshots. */
.installation-page { background:#f4f5f7; color:#30353b; }.installation-page > main { max-width:1100px; margin:0 auto; padding:28px 20px 48px; }.installation-back { display:inline-block; margin-bottom:24px; color:#68737c; }
.installation-intro { height:auto; min-height:0; padding:0; border:0; background:transparent; display:flex; align-items:center; gap:20px; margin-bottom:24px; }.installation-intro > img { flex:0 0 88px; border-radius:18px; }.installation-intro h1 { margin:0 0 8px; font-size:1.8rem; }.installation-intro p { margin:0; color:#68737c; }
.pwa-install-panel > div { min-width:0; }.pwa-install-panel [data-pwa-help] > summary { padding:12px 0; font-weight:600; }.pwa-platform-picker { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }.pwa-platform-picker button { min-height:44px; padding:8px 14px; }.pwa-platform-picker button[aria-pressed=true] { background:#30353b; border-color:#30353b; color:#fff; }.pwa-platform-note { font-size:.85rem; }
.pwa-install-panel .pwa-guide-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:16px; list-style:none; padding:0; margin:20px 0; }.pwa-install-panel .pwa-guide-steps > li { margin:0; min-width:0; padding:14px; background:#fff; border:1px solid #d7dcdf; border-radius:12px; }.pwa-step-title { display:flex; align-items:center; gap:9px; min-height:48px; }.pwa-step-title > span { display:grid; place-items:center; width:28px; height:28px; flex:0 0 28px; border-radius:7px; background:#f7e9ea; color:#a42f38; font-weight:700; }.pwa-step-title h3 { margin:0; font-size:.95rem; line-height:1.35; }.pwa-guide-steps figure { margin:14px 0; }.pwa-guide-steps svg { display:block; width:100%; max-width:260px; margin:auto; height:auto; }.pwa-guide-steps li > p { font-size:.85rem; line-height:1.55; margin-bottom:0; }
.pwa-scheme-note,.pwa-install-sources { font-size:.75rem; }.pwa-install-panel .pwa-install-sources a { color:#9f333b; }.pwa-local-help { margin-top:24px; padding:20px; border:1px solid #d7dcdf; border-radius:12px; background:#fff; }.pwa-local-help h2 { font-size:1.1rem; margin-top:0; }.pwa-local-help p { font-size:.85rem; }
.auth-install-hint { display:flex; align-items:center; gap:12px; border-top:1px solid #e0e2e4; padding-top:16px; margin-top:20px; text-align:left; }.auth-install-hint img { flex:0 0 40px; border-radius:9px; }.auth-install-hint b { display:block; font-size:.8rem; }.auth-install-hint a { display:block; margin-top:4px; font-size:.78rem; color:#9f333b; }
@media(max-width:600px){ .installation-page > main { padding:20px 12px 32px; }.installation-intro { gap:12px; align-items:flex-start; }.installation-intro > img { width:64px; height:64px; flex-basis:64px; border-radius:13px; }.installation-intro h1 { font-size:1.35rem; }.installation-intro p { font-size:.85rem; }.pwa-install-panel .pwa-guide-steps { grid-template-columns:1fr; }.pwa-guide-steps > li { padding:14px; }.pwa-guide-steps figure { margin:8px 0; }.pwa-guide-steps svg { max-width:220px; } }

/* Client copy and controls use the same permitted objects without staff shortcuts. */
.client-order-chat { display:inline-flex; align-items:center; gap:5px; color:#8f3038; font-size:.8rem; text-decoration:none; }.client-order-chat .ui-icon { width:16px; height:16px; }.own-profile .profile-heading h1 { margin-bottom:4px; }.own-profile .profile-heading p { margin:0; }.app-menu [data-nav] .nav-label { min-width:0; }
/* Own-data actions must wrap inside narrow client cards, including 320px. */
.own-profile .open-link { max-width:100%; min-width:0; white-space:normal; overflow-wrap:anywhere; }
.own-profile .profile-heading > div { min-width:0; }
.chat-message .chat-text-link { color:var(--accent); text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }

.guide-article > .order-actions:empty { display:none; }

/* Approved 19.11: variant 1, white cards with a complete thin red contour.
   Keep controls, inner separators, alerts and the approved chat styling separate. */
.layout :is(.work-card,.orders-heading,.order-stage,.order-section,.profile-heading,
  .calc-action-card,.calc-create,.task-create,.task-detail,.notification-rules-wrap,
  .current-stat,.table-scroll,.calc-table-scroll,.clients-table-scroll,.invoice-table-scroll,
  .notification-calendar,.notification-policy-history) {
  border: 1px solid var(--card-outline);
  background: var(--surface);
}
.current-overview { background: transparent; padding: 0; border-radius: 0; }
.current-overview .current-stat { border-radius: 12px; box-shadow: none; }
.current-overview .current-work-card { box-shadow: none; }
.current-card-heading { background: #fcf5f5; border-bottom-color: #ecd2d4; }
.current-card-count { background: var(--accent); color: #fff; }
.current-stat-icon { background: #fbefee; border-color: #ecd3d3; }
.current-overview .current-stat:first-child .current-stat-top > b { color: #a32d38; }
.current-overview .current-stat:nth-child(2) .current-stat-icon { background: #edf4ed; color: #55725e; border-color: #d8e5da; }
.current-overview .current-stat:nth-child(3) .current-stat-icon { background: #edf2f8; color: #59718c; border-color: #dbe3ec; }
.current-overview .current-action-primary { background: #fff8f8; }
.current-overview .current-status-chip { padding: 5px 9px; font-weight: 600; background: var(--status-blue-fill); border-color: var(--status-blue-border); color: var(--status-blue-ink); }
.current-overview .current-status-amber { background: var(--status-amber-fill); border-color: var(--status-amber-border); color: var(--status-amber-ink); }
.current-overview .current-status-sage { background: var(--status-sage-fill); border-color: var(--status-sage-border); color: var(--status-sage-ink); }
.current-overview .current-status-neutral { background: #eef0f3; border-color: #d3d8df; color: #626973; }
.calc-phase { background: var(--status-blue-fill); border-color: var(--status-blue-border); color: var(--status-blue-ink); }
.calc-tone-client { background: var(--status-amber-fill); border-color: var(--status-amber-border); color: var(--status-amber-ink); }
.calc-tone-warehouse { background: var(--status-sage-fill); border-color: var(--status-sage-border); color: var(--status-sage-ink); }
.calc-tone-closed { background: #eef0f3; border-color: #d3d8df; color: #626973; }
.chat-attachment-picker { border: 1px solid var(--card-outline); }
/* The completed invoice grouping stays a label rather than a framed record. */
@media (max-width: 900px), (max-width: 1100px) and (max-height: 500px) and (pointer: coarse) {
  .layout :is(.table-scroll,.calc-table-scroll,.clients-table-scroll,.invoice-table-scroll) { border: 0; background: transparent; }
}

/* Client has two chats: visible red symbols even before selection. */
.chat-directory-client .chat-channel-symbol { color: var(--accent); background: #fcf5f5; border-color: #ecd2d4; }
.chat-directory-client .chat-channel-symbol .ui-icon { color: var(--accent); }

.chat-mention-picker { display: grid; gap: 6px; }
.chat-mention-picker > button { width: 100%; text-align: left; min-height: 44px; background: var(--surface); }

/* Approved invoice route card: second preview, with real calendar progress. */
.invoice-mobile-state { display: none; }
.invoice-list-state { font-size: 22px; font-weight: 400; }
.invoice-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.invoice-card-heading .invoice-list-name { min-width: 0; flex: 1; }
.invoice-route-box { min-width: 0; padding: 10px 12px; border-radius: 8px; background: #faf5f5; }
.invoice-time-track { position: relative; height: 4px; margin: 17px 8px 12px; border-radius: 3px; background: #e4d4d6; }
.invoice-time-track::before,.invoice-time-track::after { content: ''; position: absolute; top: -3px; width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 50%; background: #fff; }
.invoice-time-track::before { left: -4px; }.invoice-time-track::after { right: -4px; }
.invoice-time-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.invoice-time-marker { position: absolute; z-index: 1; bottom: -10px; transform: translateX(-50%); display: flex; padding: 0 3px; background: #faf5f5; color: var(--accent); }
.invoice-time-marker .ui-icon { width: 29px; height: 27px; }
.invoice-time-marker.is-arrived { color: #3b6650; }
.invoice-route-dates { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.invoice-route-dates > div { min-width: 0; display: grid; gap: 3px; }.invoice-route-dates > div:last-child { text-align: right; }
.invoice-route-dates span { color: var(--muted); font-size: 11px; line-height: 1.3; }.invoice-route-dates b { font-size: 14px; font-weight: 600; }
.invoice-table thead th:last-child { width: 210px; }

.notification-read-feedback { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; color: #3b6650; font-size: var(--text-small); }

.chat-channel-symbol > .ui-icon { width: 40px; height: 40px; }

.settings-session-exit { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.settings-session-exit button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; color: var(--accent); border-color: var(--accent); background: var(--surface); }
.settings-logout-dialog .order-actions { display:flex;flex-wrap:wrap;gap:12px; }
.settings-logout-dialog button { min-height:44px;padding:10px 14px; }
.settings-logout-dialog [data-settings-exit-cancel] { background:#fff;border-color:var(--border);color:var(--text); }
.settings-logout-dialog .settings-exit-confirm { background:var(--accent);border-color:var(--accent);color:#fff; }
.settings-logout-dialog .settings-exit-confirm:hover { background:var(--accent-hover);color:#fff; }
.settings-session-exit [role=alert]:empty { display: none; }

/* Approved attention preview: own actions stand out; waiting on others stays neutral. */
.attention-mark { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 22px; font-weight: 700; }
.my-action-label { display: inline-flex; align-items: center; gap: 6px; color: #a3313c; font-size: 12px; font-weight: 600; }
.my-action-label b { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid #c45a62; border-radius: 4px; }
.executor-pill { display: inline-flex; align-items: center; justify-self: start; gap: 5px; max-width: 100%; padding: 5px 9px; border: 1px solid #cfd4da; border-radius: 6px; background: #eef0f3; color: #515b66; font-size: 13px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.executor-pill.mine { background: var(--accent); border-color: var(--accent); color: #fff; }
.current-overview .current-card-heading { padding: 13px 14px; }
.current-overview .current-card-heading h2,.task-attention-group .current-card-heading h2 { font-size: 19px; font-weight: 700; line-height: 1.2; }
.current-overview .current-row { padding: 14px; gap: 10px; }
.current-overview .current-item-title { font-size: 16px; line-height: 1.3; }
.current-overview .current-row-action { min-height: 44px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.current-overview .delegated .current-row-action { background: #fff; border-color: var(--control-border); color: #515b66; }
.delegated .current-card-heading { background: #f6f7f8; }.delegated .current-card-count { background: #e5e7eb; color: #515b66; }
.task-attention-list { display: grid; gap: 18px; margin-top: 20px; }
.task-attention-group.work-card { margin: 0; padding: 0; overflow: hidden; }
.task-row.task-attention-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px; color: var(--text); }
.task-attention-copy { flex: 1 1 250px; min-width: 0; display: grid; gap: 9px; }
.task-attention-copy > .task-state { justify-self: start; }
.task-attention-copy > b { font-size: 16px; line-height: 1.3; }
.task-attention-open { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; min-height: 44px; border: 1px solid var(--control-border); border-radius: 9px; color: #515b66; background: #fff; font-weight: 600; }
.is-own-action .task-attention-open { color: #fff; background: var(--accent); border-color: var(--accent); }
.current-overview .current-row:hover .current-action-primary,
.current-overview .current-action-primary:is(:hover, :active, :focus-visible),
.task-attention-row.is-own-action:is(:hover, :active, :focus-visible) .task-attention-open { color: var(--on-accent); background: var(--accent-hover); border-color: var(--accent-hover); }
@media (max-width: 760px) { .task-attention-open { width: 100%; } .current-overview .current-stat { padding: 12px; gap: 10px; } .current-overview .current-stats { gap: 8px; } }
.task-attention-copy > small.red-text { color: var(--danger); }

.current-action-group + .current-action-group { border-top: 1px solid #d9dde3; }
.current-group-heading { display: flex; align-items: center; gap: 9px; padding: 9px 14px; background: #f5f6f8; border-bottom: 1px solid #e6e9ed; }
.current-group-heading h3 { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--graphite); }
.current-group-heading > span { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 5px; background: #e5e7eb; color: #515b66; font-size: 13px; }
.current-group-more { margin: 0; padding: 8px 14px; color: var(--muted); font-size: 13px; }

.task-completion-notice { display:grid;gap:5px;margin:18px 0;padding:14px 16px;border:1px solid var(--status-sage-border);border-radius:8px;background:var(--status-sage-fill);color:var(--status-sage-ink);line-height:1.35; }
.task-completion-notice span { font-size:var(--text-small); }
.attention-tone-sage .current-card-heading { background:var(--status-sage-fill);border-bottom-color:var(--status-sage-border);color:var(--status-sage-ink); }
.attention-tone-sage .current-card-count { background:var(--status-sage-ink);color:#fff; }
.attention-tone-amber .current-card-heading { background:var(--status-amber-fill);border-bottom-color:var(--status-amber-border);color:var(--status-amber-ink); }
.attention-tone-amber .current-card-count { background:var(--status-amber-ink);color:#fff; }
.task-person-status { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.task-person-status > .task-state { margin:0;flex:0 0 auto; }
.task-list-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px; }
.task-list-heading h1 { margin:0;font-size:1.5rem;line-height:1.2; }
.task-list-create.open-link { display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:9px 14px;min-height:44px;background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:600; }
.task-list-create.open-link:is(:hover,:active,:focus-visible) { background:var(--accent-hover);color:var(--on-accent); }
.task-list-filters { display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;max-width:640px;margin-bottom:20px; }
.task-list-filters label { display:grid;gap:6px;min-width:0;color:var(--muted);font-size:var(--text-small); }
.task-list-filters select { width:100%;min-width:0;min-height:44px;padding:9px 28px 9px 10px;background:var(--surface);color:var(--text);font-size:1rem; }
@media(max-width:380px) { .task-list-heading h1 { font-size:1.25rem; } .task-list-create.open-link { padding:8px 10px; } .task-list-filters { gap:8px; } .task-list-filters select { font-size:.889rem; } }
.order-status--my-action { --owner-fill:#faeeee;--owner-border:#d7a3a8;color:var(--text); }
.order-status--my-action .order-status__owner { display:flex;align-items:center;gap:8px;color:var(--text);font-weight:600;border-top-color:#d7a3a8; }
.order-status__attention { flex:0 0 24px;width:24px;height:24px;color:var(--accent); }
/* Compact client list route; independent of the full order-detail route. */
.compact-order-route { min-width:0;max-width:100%;padding:8px 0 1px; }
.compact-order-route-scroll { overflow-x:auto;overflow-y:hidden;max-width:100%;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#b8a3a6 transparent; }
.compact-order-route-scroll ol { position:relative;display:flex;width:max-content;min-width:100%;list-style:none;margin:0;padding:5px 0 6px; }
.compact-route-step { position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;flex:0 0 88px;width:88px;font-size:12px;line-height:1.25;color:var(--text);font-weight:400;white-space:nowrap; }
.compact-route-step:not(:last-child)::after { content:'';position:absolute;top:7px;left:50%;width:100%;height:2px;background:#262a30; }
.compact-route-step.is-passed:not(:last-child)::after { background:var(--accent); }
.compact-route-node { z-index:1;display:block;width:14px;height:14px;border:2px solid #262a30;border-radius:50%;background:var(--owner-fill); }
.compact-route-step.is-passed .compact-route-node { border-color:var(--accent);background:var(--accent); }
.compact-route-step.is-current { color:var(--text);font-weight:600; }
.compact-route-step.is-current .compact-route-node { border-color:var(--accent);background:var(--accent);transform:scale(1.35); }
.compact-route-caption { display:block;text-align:center;font-size:12px;line-height:1.3;color:var(--text);margin-top:3px; }
.order-status-card:has(.compact-order-route) { min-width:0; }
/* Order detail visual rhythm: no changes to section order or workflow. */
.order-detail-back { display:block;max-width:1120px;margin:0 auto; }
.order-detail { padding:24px;background:var(--surface); }
.order-detail > .page-heading { padding:0 0 18px;margin-bottom:0; }
.order-detail > .page-heading > div { min-width:0;width:100%; }
.order-detail h1 { margin:0;font-size:1.65rem;line-height:1.25; }
.order-detail-meta { display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:10px;font-size:var(--text-small); }
.order-service-label { color:var(--muted); }
.order-detail .order-route { margin:0 0 18px;padding:16px 0 18px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);border-radius:0; }
.order-detail .order-stage { padding:18px 20px; }
.order-detail .order-stage-heading { gap:12px;margin-bottom:16px; }
.order-detail .order-stage-heading h2 { font-size:1.2rem;line-height:1.3; }
.order-stage > .order-summary { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr);gap:16px; }
.order-stage > .order-summary > div { display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:4px; }
.order-stage > .order-summary dd { line-height:1.4; }
.order-detail .order-feed { gap:14px;margin-top:18px; }
.order-detail .order-section > summary { gap:12px;padding:16px 20px;min-height:72px; }
.order-detail .order-section-heading b { line-height:1.3; }
.order-detail .order-section-preview { line-height:1.35; }
.order-detail .order-section[data-section="purchase"] .order-summary { grid-template-columns:repeat(4,minmax(0,1fr));gap:16px; }
.order-detail .order-section[data-section="purchase"] .order-summary > div { grid-template-columns:minmax(0,1fr);align-content:start;gap:5px; }
.order-detail .order-section[data-section="purchase"] .order-summary dd { line-height:1.4; }
@media(max-width:760px){
 .order-detail { margin-top:14px;padding:16px 12px;border-radius:12px; }
 .order-detail h1 { font-size:1.35rem;line-height:1.25; }
 .order-detail-meta { align-items:flex-start;flex-direction:column;gap:6px; }
 .order-detail .order-stage { padding:16px; }
 .order-detail .order-stage-heading h2 { font-size:1.12rem; }
 .order-detail .order-next-action { min-height:44px;padding:11px 12px;line-height:1.35; }
 .order-stage > .order-summary { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
 .order-stage > .order-summary > div:last-child { grid-column:1/-1;padding-top:12px;border-top:1px solid var(--border); }
 .order-detail .order-section > summary { padding:14px;gap:10px;min-height:68px; }
 .order-detail .order-section-heading b { font-size:1rem; }
 .order-detail .order-section-body { padding:0 14px 16px; }
 .order-detail .order-section[data-section="purchase"] .order-summary { grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px; }
}
/* Order detail: approved soft accents, 20 November 2026. */
.order-detail .order-owner-pill { display:inline-block;padding:7px 10px;border:1px solid var(--border);border-radius:7px;line-height:1.35;color:var(--text);background:#f3f4f5; }
.order-detail .order-owner--manager { background:var(--status-blue-fill);border-color:var(--status-blue-border); }
.order-detail :is(.order-owner--client,.order-owner--currency) { background:var(--status-amber-fill);border-color:var(--status-amber-border); }
.order-detail :is(.order-owner--warehouse,.order-owner--gateway) { background:var(--status-sage-fill);border-color:var(--status-sage-border); }
.order-detail .order-owner--administrator { background:#faeeee;border-color:#d7a3a8; }
.order-detail .order-owner--my-action { background:#FAEEEE;border-color:#B4363F;color:#111; }
.order-detail .order-section { overflow:hidden; }
.order-detail .order-section > summary { background:#F3D47C;color:#473817; }
.order-detail .order-section:is([data-section="tasks"],[data-section="receiving"]) > summary { background:#BFD6C7;color:#294B37; }
.order-detail .order-section:is([data-section="shipping"],[data-section="invoices"]) > summary { background:#C9DCF0;color:#233F5D; }
.order-detail .order-section:is([data-section="comments"],[data-section="history"]) > summary { background:#f5f5f6; }
.order-detail .order-section[open] > summary { border-bottom:1px solid var(--border); }
.order-detail .order-section .order-section-body { padding-top:18px; }
.order-detail .order-subsection-heading { gap:12px;flex-wrap:wrap; }
.order-detail .order-section > summary :is(.order-section-heading,.order-section-preview,.order-chevron) { color:#111; }
.order-detail :is(button,.open-link,.order-table-link):not(.order-next-action) { min-height:44px;max-width:100%;padding:10px 14px;border:1px solid #B4363F;border-radius:7px;background:#FBF0F0;color:#A03039;white-space:normal;overflow-wrap:anywhere;text-decoration:none;line-height:1.35; }
.order-detail :is(button,.open-link,.order-table-link):not(.order-next-action):hover:not(:disabled) { background:#F4DFE1;color:#892A32;border-color:#A03039; }
.order-detail :is(button,.open-link,.order-table-link):focus-visible { outline:2px solid #A03039;outline-offset:3px; }
.order-detail button:disabled { opacity:.5;cursor:not-allowed; }
.order-detail :is(.order-section,.order-admin-panel,.order-dialog) form button:not([type="button"]),.order-detail a.order-task-create:not(.order-next-action) { background:#B4363F;color:#fff;border-color:#B4363F; }
.order-detail :is(.order-section,.order-admin-panel,.order-dialog) form button:not([type="button"]):hover:not(:disabled),.order-detail a.order-task-create:not(.order-next-action):hover { background:#962C35;color:#fff; }
.order-detail :is(.order-section,.order-admin-panel) form:is([data-editor],[data-action="admin-data"],[data-action="renumber"],[data-action="purchase:total"]) button[type="submit"],.order-detail .order-section button[value="save-draft"] { background:#FBF0F0;color:#A03039;border-color:#B4363F; }
.order-detail :is(.order-section,.order-admin-panel) form:is([data-editor],[data-action="admin-data"],[data-action="renumber"],[data-action="purchase:total"]) button[type="submit"]:hover:not(:disabled),.order-detail .order-section button[value="save-draft"]:hover:not(:disabled) { background:#F4DFE1;color:#892A32; }
.order-detail button:is([data-workflow-cancel],[data-cancel-editor],[data-close-dialog],[data-number-cancel]):not(.order-next-action) { background:#fff;color:#30353B;border-color:#C9CDD2; }
.order-detail button:is([data-workflow-cancel],[data-cancel-editor],[data-close-dialog],[data-number-cancel]):not(.order-next-action):hover { background:#F4F5F7;color:#30353B;border-color:#929AA3; }
.order-detail .order-actions { display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:18px; }
.order-detail form > button { margin-right:8px; }
.order-detail .order-content-action { display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:12px; }
.order-detail .order-content-action svg { width:20px;height:20px;flex-shrink:0; }
@media(max-width:760px){
 .order-detail .order-subsection-heading { align-items:center; }
 .order-detail .order-subsection-heading :is(button,.open-link) { flex:1 1 100%; }
 .order-detail .order-content-action { width:100%; }
 .order-detail .order-actions > :is(button,.open-link) { flex:1 1 150px;justify-content:center;text-align:center; }
}

.invoice-card-title { min-width:0;flex:1; }.invoice-card-title .invoice-list-order { margin-top:2px;line-height:1.3; }
.invoice-workspace .invoice-pay-action { display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:8px 12px;border:1px solid #b4363f;border-radius:7px;background:#b4363f;color:#fff;font-weight:600;text-decoration:none;line-height:1.3; }.invoice-workspace .invoice-pay-action:is(:hover,:active,:focus-visible) { background:#962c35;border-color:#962c35;color:#fff; }.invoice-pay-action:focus-visible { outline:3px solid var(--focus);outline-offset:3px; }.invoice-list-actions { gap:8px; }

.invoice-linked-order { display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;margin-top:18px;background:#f1f6fb;border:1px solid #bdcede;border-radius:10px; }.invoice-linked-order small { display:block;margin-bottom:5px;color:#515b65;font-size:13px; }.invoice-linked-order b { display:block;color:#202326; }.invoice-linked-order .open-link { margin:0; }.invoice-eta-waiting { margin:16px 0;padding:14px 16px;border:1px solid #dcc47b;border-radius:9px;background:#fff5d8;color:#202326; }.invoice-eta-waiting p { margin:6px 0 0;line-height:1.45; }
.invoice-workspace .invoice-payment,.invoice-workspace .invoice-list-payment { display:inline-flex;padding:6px 10px;border:1px solid #dcc47b;border-radius:7px;background:#fff5d8;color:#202326;font-weight:500;line-height:1.35; }.invoice-workspace .invoice-payment.is-paid,.invoice-workspace .invoice-list-payment.is-paid { border-color:#9fc4ae;background:#e4f2e9;color:#202326; }

.invoice-eta-date { display:block;margin-top:8px;color:#68717b;font-size:13px;line-height:1.4;font-weight:400; }

.invoice-workspace .work-card.invoice-release-ready { background:#e4f2e9;border:1px solid #91bfa5; }.invoice-workspace .work-card.invoice-payment-waiting { background:#fff5d8;border:1px solid #d8bd69; }.invoice-release-ready h2,.invoice-payment-waiting h2 { color:#202326;font-weight:700; }.invoice-release-ready p,.invoice-payment-waiting p { color:#30363b; }

.invoice-release-ready .invoice-release-label { display:inline-flex;align-items:center;gap:9px;max-width:100%;box-sizing:border-box;padding:10px 15px;border:1px solid #2d6d4c;border-radius:8px;background:#2f7652;color:#fff;font-size:18px;font-weight:650;line-height:1.35; }.invoice-release-label .ui-icon { flex:none;width:23px;height:23px;color:#fff; }

.invoice-workspace .work-card.invoice-payment-blocked { background:#fceced;border-color:#d69a9f; }.invoice-payment-blocked .invoice-payment-label { display:inline-flex;align-items:center;gap:9px;max-width:100%;box-sizing:border-box;padding:10px 15px;border:1px solid #a32b35;border-radius:8px;background:#b4363f;color:#fff;font-size:18px;font-weight:650;line-height:1.35; }.invoice-payment-label .ui-icon { flex:none;width:23px;height:23px; }.invoice-payment-blocked .invoice-release-warning { color:#8b2530;font-weight:700; }

.invoice-workspace button.invoice-handoff-button { background:#b4363f;border-color:#b4363f;color:#fff;font-weight:600; }.invoice-workspace button.invoice-handoff-button:is(:hover,:active,:focus-visible):not(:disabled) { background:#962c35;border-color:#962c35;color:#fff; }

.invoice-workspace .work-card.invoice-handoff-complete { background:#e4f2e9;border:1px solid #9fc4ae; }.invoice-handoff-complete h2,.invoice-handoff-complete p { color:#202326; }.invoice-handoff-complete small { color:#68717b; }

.receiving-intro { padding:16px;background:#f1f6fb;border:1px solid #bed0df;border-radius:10px;margin-bottom:18px; }.order-section-body .receiving-intro h3,.order-section-body .receiving-wait-form h3 { font-size:18px;color:#202326;font-weight:700;margin:0 0 8px; }.receiving-intro p { margin:8px 0 0;line-height:1.45;color:#30363b; }.receiving-deadline { padding:10px;background:#fff5d8;border-radius:7px; }
.order-detail .order-section form.receiving-main-actions { display:grid;grid-template-columns:1fr;gap:12px;margin:0; }.order-detail .order-section form.receiving-main-actions button { width:100%;margin:0;min-height:46px; }.order-detail .order-section form.receiving-main-actions .receiving-accept { background:#2f7652;color:#fff;border-color:#2f7652; }.order-detail .order-section form.receiving-main-actions .receiving-accept:hover { background:#245c40;color:#fff; }.order-detail .order-section form.receiving-main-actions .receiving-problem { background:#fbefef;color:#9d3039;border-color:#c37d83; }.order-detail .order-section form.receiving-main-actions .receiving-problem:hover { background:#f3dfe1;color:#892a32; }.order-detail .order-section form.receiving-main-actions .receiving-wait { background:#fff;color:#30363b;border-color:#bfc7cf; }.receiving-chat { margin:16px 0; }.receiving-other { border-top:1px solid #d7dce2;padding-top:14px;margin-top:18px; }.receiving-other summary { color:#58616c;font-size:14px;cursor:pointer; }.receiving-other p { font-size:14px;line-height:1.45; }.order-detail .order-section form .receiving-close { background:#fff;color:#414a54;border-color:#bfc7cf; }.receiving-wait-form { padding:14px;border:1px solid #d8c989;border-radius:9px;background:#fff8e6;margin:16px 0; }

.order-detail .order-section form.receiving-main-actions .receiving-wait { background:#fff0bd;color:#202326;border-color:#d8b85c; }.order-detail .order-section form.receiving-main-actions .receiving-wait:hover { background:#f5e29e;color:#202326; }.receiving-rating { border:0;padding:0;margin:16px 0;min-width:0; }.receiving-rating legend { font-weight:600;color:#202326; }.receiving-stars { display:flex;gap:8px;margin-top:8px; }.receiving-star { position:relative;cursor:pointer;display:block!important; }.receiving-star input { position:absolute;opacity:0;width:1px;height:1px; }.receiving-star span { display:block;color:#737b84;font-size:36px;line-height:1.3; }.receiving-star:has(input:checked) span,.receiving-star:has(~ .receiving-star input:checked) span { font-size:0;color:#b98412; }.receiving-star:has(input:checked) span::after,.receiving-star:has(~ .receiving-star input:checked) span::after { content:'★';font-size:36px; }.receiving-star:has(input:focus-visible) { outline:3px solid var(--focus);border-radius:5px; }.receiving-rated-stars { color:#b98412;font-size:30px;letter-spacing:3px; }

.order-detail button.purchase-request-primary:not(.order-next-action) { background:#b4363f;color:#fff; }
.order-detail button.purchase-request-primary:not(.order-next-action):hover:not(:disabled) { background:#962c35;color:#fff; }
.order-detail .purchase-secondary-actions :is(button,.open-link):not(.order-next-action) { background:#fff;color:var(--text);border-color:#c9cdd2; }
.order-detail .purchase-secondary-actions :is(button,.open-link):not(.order-next-action):hover:not(:disabled) { background:#f4f5f7;color:var(--text); }

.purchase-request-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 14px 0;
  padding: 12px 16px;
  border: 1px solid #bfd8c8;
  border-inline-start: 3px solid #397756;
  border-radius: 8px;
  background: #f1f7f3;
  color: var(--text);
}
.purchase-request-status p {
  margin: 3px 0 0;
  color: #4d5e53;
  font-size: .9em;
}
.purchase-request-status a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #275a40;
  font-weight: 600;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid #397756;
  border-radius: 7px;
  background: #fff;
  text-decoration: none;
}
.purchase-request-status a:hover { background: #e0efe5; }
.purchase-request-status a:focus-visible { outline: 2px solid #275a40; outline-offset: 2px; }
.staff-role-group { padding:0; margin-top:14px; overflow:hidden; }
.staff-role-group > summary {
  display:flex;align-items:center;gap:16px;min-height:52px;padding:14px 18px;
  list-style:none;cursor:pointer;font-weight:600;color:var(--text);background:#edf2f8;
  border:0;
}
.staff-role-group > summary::-webkit-details-marker { display:none; }
.staff-role-group > summary small {
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  min-width:29px;height:29px;padding:0 6px;border-radius:8px;
  background:#fff;color:#49545e;border:1px solid #d3dde6;font-size:15px;font-weight:600;
}
.staff-role-group > summary small.has-members { color:#a3323b;background:#fae9eb;border-color:#e8c1c5; }
.staff-role-group > summary::before {
  content:"";width:8px;height:8px;border:solid currentColor;border-width:0 2px 2px 0;
  transform:rotate(-45deg);margin:0 3px 0 0;flex:none;
}
.staff-role-group[open] > summary::before { transform:rotate(45deg);margin-top:-4px; }
.staff-role-group > .access-grid { padding:16px; }
.staff-role-group > .access-grid > .work-card { margin:0; }
.staff-action > .task-editor { margin:0; padding:18px; }
.access-credential-dialog { width:min(520px,calc(100% - 32px)); max-height:calc(100dvh - 32px); padding:24px; border:1px solid var(--border); border-radius:16px; color:var(--text); background:var(--surface); overflow:auto; }
.access-credential-dialog::backdrop { background:#262a3070; }
.access-credential-dialog > [data-close-access] { display:block; margin-left:auto; }
.access-credential-dialog h2 { margin:16px 0; overflow-wrap:anywhere; }
.access-credential-dialog .task-editor { margin:0; }
.access-credential-dialog button[type="submit"] { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.access-credential-dialog button[type="submit"]:hover { background:var(--accent-hover); }
.access-credential-dialog button[type="submit"]:disabled { opacity:.6; }
.access-credential-dialog [role="alert"]:empty { display:none; }

@media(min-width:901px){
  .client-orders-table { width:100%;min-width:0;table-layout:fixed;border-collapse:separate;border-spacing:0 14px; }
  .table-scroll:has(.client-orders-table) { border:0;background:transparent; }
  .orders-table-frame:has(.client-orders-table) > .table-pan { display:none; }
  .client-orders-table th { background:transparent;border:0;padding:0 16px 2px; }
  .client-orders-table th:nth-child(2) { width:25%; }
  .client-orders-table th:nth-child(3) { width:37%; }
  .client-orders-table th.client-next-col { width:29%; }
  .client-orders-table th:last-child { width:9%; }
  .client-orders-table td { padding:16px;vertical-align:middle; }
  .client-orders-table tbody td:not([hidden]) { border:solid #d7a5aa;border-width:1px 0;background:#fff; }
  .client-orders-table tbody td:nth-child(2) { border-left-width:1px;border-radius:12px 0 0 12px; }
  .client-orders-table tbody td:last-child { border-right-width:1px;border-radius:0 12px 12px 0; }
  .client-orders-table .order-status__owner > .order-owner-description,
  .client-orders-table .order-status__attention { display:none; }
  .client-orders-table .client-owner-details { display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-weight:400;font-size:13px; }
  .client-orders-table .order-status-card { min-height:166px; }
  .client-orders-table .order-status__stage { font-weight:600; }
  .client-orders-table .order-title { display:block;font-size:17px;line-height:1.45;overflow-wrap:anywhere; }
  .client-orders-table .order-client { margin-top:10px; }
  .client-orders-table .order-status-card { max-width:none;width:100%;box-sizing:border-box;gap:6px;padding:12px 16px; }
  .client-orders-table .compact-order-route { padding-top:2px; }
  .client-orders-table .compact-order-route-scroll ol { width:100%; }
  .client-orders-table .compact-route-step { flex:1 1 0;min-width:0;gap:6px; }
  .client-orders-table .compact-route-step > span:not(.compact-route-node):not(.sr-only) { font-size:12px; }
  .client-orders-table .compact-route-caption { margin-top:0; }
  .client-orders-table .row-actions { justify-content:center; }
  .client-orders-table .orders-open { min-height:42px;padding:10px 18px; }
  .client-orders-table .client-assignee-badge { display:inline-block;padding:6px 9px;background:#ffffff99;border:1px solid #0002;border-radius:6px;font-size:13px;font-weight:400; }
  .client-orders-table .order-status--my-action .client-assignee-badge,
  .client-orders-table .is-own-action .client-assignee-badge { background:#b4363f;border-color:#b4363f;color:#fff; }
  .client-next-card { min-height:166px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;padding:16px;border:1px solid #bfd1c5;border-radius:10px;background:#f0f6f2;color:#20262b;overflow-wrap:anywhere; }
  .client-next-card.is-own-action { border-color:#d8a3a8;background:#fff7f6; }
  .client-next-card > b { font-size:15px;line-height:1.45; }
  .client-next-card > small { font-size:13px; }
  .client-next-card .client-next-heading { color:#a52f39;font-weight:600; }
  .client-order-rating { margin-top:12px; }
}
.client-owner-details { display:none; }
@media(max-width:900px){
  .client-orders-table .client-next-col { display:none!important; }
}

