/* Закупки БДТ — единая таблица стилей. Цвета и размеры задаются переменными ниже. */
:root {
  --canvas: #eef1f3;
  --surface: #ffffff;
  --surface-2: #f6f8f9;
  --line: #e1e6e9;
  --line-strong: #c9d1d6;
  --ink: #111c24;
  --ink-2: #485862;
  --ink-3: #7b8992;
  --nav: #0f1b24;
  --nav-2: #1b2a35;
  --nav-ink: #a7b4bd;
  --accent: #1d5e8a;
  --accent-ink: #164a6e;
  --accent-bg: #e7f0f7;
  --danger: #c0262d;
  --danger-ink: #9b1c22;
  --danger-bg: #fdeceb;
  --warning: #b86a00;
  --warning-ink: #8a4f00;
  --warning-bg: #fff3df;
  --success: #1e7a4b;
  --success-bg: #e3f3ea;
  --star: #e0a100;
  --stage-yellow: #d99a00;
  --violet-ink: #4c3fa6;
  --violet-bg: #eeebfb;
  --radius: 10px;
  --radius-sm: 7px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 var(--font); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 650; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-size: .95em; letter-spacing: -.01em; }
.strong { font-weight: 650; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.block { display: block; }
.note { margin-top: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tone-danger { color: var(--danger); font-weight: 600; }
.tone-warning { color: var(--warning-ink); font-weight: 600; }
.tone-muted { color: var(--ink-3); }
.text-danger { color: var(--danger) !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Каркас ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.nav-collapsed .shell { grid-template-columns: 68px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 16px; z-index: 20; background: var(--nav); color: var(--nav-ink); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 650; font-size: 15px; line-height: 1.2; }
.brand small, .login-brand small { display: block; font-weight: 400; font-size: 11px; color: var(--nav-ink); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--accent); color: #fff; }
.brand-mark .i { width: 19px; height: 19px; }
.chevron { width: 14px; height: 14px; margin-left: auto; color: var(--nav-ink); transition: transform .15s; }
/* Logo row: the logo (opens the list of systems) and the bell. */
.brand-row { display: flex; align-items: center; gap: 2px; margin: 0 0 18px; }
.brand-row .brand > .nav-text, .mobile-bar .brand > .nav-text { min-width: 0; white-space: nowrap; }
.brand-row .brand > .nav-text small, .mobile-bar .brand > .nav-text small { overflow: hidden; text-overflow: ellipsis; }
.brand-row > .brand, .brand-row > .ws-menu { flex: 1; min-width: 0; }
.ws-menu > summary.brand, .brand-row > a.brand { gap: 9px; padding: 6px; border-radius: var(--radius-sm); }
.ws-menu > summary.brand:hover { background: var(--nav-2); }
.ws-menu[open] > summary .chevron { transform: rotate(180deg); }
.bell-link { width: 34px; height: 34px; flex: none; border-radius: var(--radius-sm); color: var(--nav-ink); }
.bell-link:hover, .bell-link.active { background: var(--nav-2); color: #fff; }
/* Drop-down menus built on <details>: systems, profile. */
.popover { position: relative; }
.popover > summary { list-style: none; cursor: pointer; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-panel { position: absolute; z-index: 50; display: grid; gap: 2px; min-width: 232px; padding: 6px; border: 1px solid var(--nav-2); border-radius: var(--radius); background: #14232e; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.popover-caption { margin: 8px 10px 4px; font-size: 11px; color: #6c7b85; letter-spacing: .04em; }
.popover-caption:first-child { margin-top: 4px; }
.ws-panel { top: calc(100% + 6px); left: 0; right: 0; }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius-sm); color: #fff; text-decoration: none; font-weight: 650; font-size: 14px; line-height: 1.2; }
.ws-item:hover { background: var(--nav-2); }
.ws-item.active { background: var(--nav-2); }
.ws-item .brand-mark { width: 30px; height: 30px; }
.ws-item .brand-mark .i { width: 17px; height: 17px; }
.ws-name small { display: block; font-weight: 400; font-size: 11px; color: var(--nav-ink); }
.ws-check { margin-left: auto; color: #5ea3d6; }
.ws-external { border-top: 1px solid var(--nav-2); border-radius: 0 0 var(--radius-sm) var(--radius-sm); margin-top: 4px; padding-top: 10px; }
.ws-external .ws-check { color: var(--nav-ink); }
.menu-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--nav-ink); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.menu-link:hover, .menu-link.active { background: var(--nav-2); color: #fff; }
.menu-logout { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--nav-2); }
.nav { display: grid; gap: 2px; align-content: start; }
/* Collapsible menu groups: Реестры, Каталоги. */
.nav-group-toggle { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.nav-group-toggle.has-active { color: #fff; }
.nav-group.open > .nav-group-toggle .chevron { transform: rotate(180deg); }
.nav-group-items { display: none; gap: 2px; padding: 2px 0 4px 14px; }
.nav-group.open > .nav-group-items { display: grid; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--nav-ink); text-decoration: none; font-weight: 500; }
.nav-link:hover { background: var(--nav-2); color: #fff; }
.nav-link.active { background: var(--nav-2); color: #fff; box-shadow: inset 3px 0 0 #5ea3d6; }
.account-menu { margin-top: auto; border-top: 1px solid var(--nav-2); padding-top: 8px; }
.sidebar-account { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.sidebar-account:hover, .account-menu[open] > .sidebar-account { background: var(--nav-2); }
.account-menu:not([open]) > .sidebar-account .chevron { transform: rotate(180deg); }
.account-panel { bottom: calc(100% + 6px); left: 0; right: 0; }
.sidebar-person { min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-person strong { display: block; color: #fff; font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-person small { font-size: 11px; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--nav-2); color: #fff; font-size: 12px; font-weight: 650; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--nav-ink); cursor: pointer; }
.icon-button:hover { background: var(--nav-2); color: #fff; }
.sidebar form { margin: 0; }
.nav-toggle { width: 100%; margin-top: auto; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.nav-toggle + .account-menu { margin-top: 0; }
/* Свёрнутое меню: остаются только иконки, название — во всплывающей подсказке. */
.nav-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
.nav-collapsed .sidebar .nav-text, .nav-collapsed .sidebar .nav-text-icon, .nav-collapsed .sidebar-person { display: none; }
.nav-collapsed .brand-row { flex-direction: column; gap: 8px; }
.nav-collapsed .brand-row > .brand, .nav-collapsed .brand-row > .ws-menu { flex: none; }
.nav-collapsed .ws-menu > summary.brand, .nav-collapsed .brand-row > a.brand { padding: 4px; }
.nav-collapsed .nav-link { justify-content: center; padding: 10px 0; }
/* Narrow menu: groups are not folded, every item is an icon. */
.nav-collapsed .nav-group-toggle { display: none; }
.nav-collapsed .nav-group-items { display: grid; padding: 0; }
.nav-collapsed .nav-group + .nav-group, .nav-collapsed .nav > a + .nav-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--nav-2); }
.nav-collapsed .nav-toggle .i { transform: scaleX(-1); }
.nav-collapsed .sidebar-account { justify-content: center; padding: 8px 0; }
.nav-collapsed .ws-panel { right: auto; left: 0; }
.nav-collapsed .account-panel { right: auto; left: 0; }
.main { min-width: 0; width: 100%; max-width: 1280px; padding: 28px 36px 64px; }
.mobile-bar { display: none; }

/* ---------- Сообщения ---------- */
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-bg); color: var(--accent-ink); border: 1px solid #cfe0ec; }
.message.success { background: var(--success-bg); color: var(--success); border-color: #c4e3d1; }
.message.error { background: var(--danger-bg); color: var(--danger-ink); border-color: #f4c9c7; }

/* ---------- Кнопки и поля ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s; }
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-ink); }
.button.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover { border-color: var(--ink-3); }
.button.ghost { background: transparent; color: var(--ink-2); }
.button.ghost:hover { background: var(--surface-2); }
.button.danger { background: var(--danger); color: #fff; }
.button.danger:hover { background: var(--danger-ink); }
.button.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.button.full { width: 100%; }
.button .i { width: 17px; height: 17px; }

input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=date], input[type=tel], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px;
}
textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
select { appearance: none; padding-right: 32px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8992' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29, 94, 138, .15); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.field { display: grid; gap: 6px; align-content: start; }
.field > span, .field > label, .field .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-weight: 400; }
.required { color: var(--danger); margin-left: 2px; }
.field-error { color: var(--danger); font-size: 12px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.stack-form { display: grid; gap: 14px; }
.checkbox-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
.quote-remove-list { display: grid; gap: 6px; }
input[readonly], input:disabled { background: var(--surface-2); color: var(--ink-2); }
input:disabled { cursor: not-allowed; }

/* ---------- Заголовки страниц ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head .muted { margin-top: 3px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: -6px 0 12px -4px; padding: 4px; color: var(--ink-3); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--ink); }
.back-link .i { width: 16px; height: 16px; }

/* ---------- Карточки ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card > h2 { margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }

/* ---------- Плитки-счётчики ---------- */
/* Все плашки в одну строку: ширина делится поровну при любом мониторе. */
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 13px 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .12s, transform .12s; }
.tile:hover { border-color: var(--line-strong); }
.tile-count { font-size: 28px; line-height: 1.1; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-label { font-size: 13px; color: var(--ink-2); }
.tile-danger:not(.zero) { background: var(--danger-bg); border-color: #f3c7c5; }
.tile-danger:not(.zero) .tile-count, .tile-danger:not(.zero) .tile-label { color: var(--danger-ink); }
.tile-warning:not(.zero) { background: var(--warning-bg); border-color: #f2d7a8; }
.tile-warning:not(.zero) .tile-count, .tile-warning:not(.zero) .tile-label { color: var(--warning-ink); }
.tile.zero .tile-count { color: var(--ink-3); }
.tile.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- Поиск и фильтры ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 320px; }
.search .i { position: absolute; left: 12px; top: 11px; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 38px; }
.toolbar-select { flex: 0 0 200px; }
.list-toolbar { display: grid; gap: 10px; }
.toolbar-row { display: flex; gap: 8px; }
.toolbar-row .search { flex: 1 1 auto; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-bar select, .filter-bar .multi > summary { width: auto; min-width: 150px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; border-radius: 999px; padding-left: 14px; }
.filter-bar .is-set, .filter-bar .multi.is-set > summary { border-color: var(--accent); background-color: var(--accent-bg); color: var(--accent-ink); font-weight: 600; }
.filter-bar .multi-options { right: auto; }
/* Фильтры реестра заявок — в одну строку, ширина делится поровну. */
.filter-bar-fit { flex-wrap: nowrap; }
.filter-bar-fit > select, .filter-bar-fit > .multi { flex: 1 1 0; min-width: 0; }
.filter-bar-fit select, .filter-bar-fit .multi > summary { width: 100%; min-width: 0; }
.filter-bar-fit select, .filter-bar-fit .multi > summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-bar .filter-date, .filter-bar .filter-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 6px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13px; }
.filter-bar .filter-check { padding-right: 14px; cursor: pointer; }
.filter-bar .filter-date input { width: auto; min-height: 30px; padding: 2px 6px; border: 0; background: transparent; font-size: 13px; }
.offer-table td small { display: block; }
.offer-table tr.offer-selected td { background: var(--success-bg); }
.offer-table .num { text-align: right; white-space: nowrap; }
.offer-table td small.cell-label { display: none; }
.multi-options .button { margin-top: 4px; }
.count-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; }
.multi { position: relative; }
.multi > summary { display: flex; align-items: center; min-height: 40px; padding: 8px 32px 8px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237b8992' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; list-style: none; cursor: pointer; font-weight: 400; color: var(--ink); }
.multi > summary::-webkit-details-marker { display: none; }
.multi-options { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; min-width: 210px; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 12px 28px rgba(15, 27, 36, .14); }
.multi-options label { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 5px; font-weight: 400; color: var(--ink); cursor: pointer; }
.multi-options label:hover { background: var(--surface-2); }

/* ---------- Статусы и срочность ---------- */
.status, .urgency { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: #edf0f2; color: #3a4750; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.status-approval { background: var(--violet-bg); color: var(--violet-ink); box-shadow: inset 0 0 0 1px currentColor; }
.status-clarification { background: var(--warning-bg); color: var(--warning-ink); }
.status-searching, .status-ordered, .status-assembly, .status-consolidation { background: var(--accent-bg); color: var(--accent-ink); }
.status-in_transit, .status-customs { background: var(--violet-bg); color: var(--violet-ink); }
.status-delayed { background: var(--danger-bg); color: var(--danger-ink); }
.status-delivered { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: #f1f2f3; color: var(--ink-3); text-decoration: line-through; }
.urgency { border-radius: 5px; padding: 1px 7px; font-size: 11px; letter-spacing: .02em; }
.urgency-aog_now { background: var(--danger); color: #fff; }
.urgency-aog_14 { background: var(--warning-bg); color: var(--warning-ink); }
.urgency-aog_28 { background: #fbf6ea; color: #7a5a1c; }
.urgency-planned { background: #f0f2f3; color: var(--ink-3); }
.urgency-price_request { background: var(--accent-bg); color: var(--accent-ink); }

/* ---------- Список заявок ---------- */
.req-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.req-row { display: grid; grid-template-columns: 4px minmax(0, 2.3fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.35fr) 92px; gap: 16px; align-items: center; padding: 12px 18px 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.req-row:first-child { border-top: 0; }
a.req-row:hover { background: #f8fafb; }
.req-head { padding-top: 9px; padding-bottom: 9px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; }
.req-bar { align-self: stretch; margin: -12px 0; }
.urg-aog_now .req-bar { background: var(--danger); }
.urg-aog_14 .req-bar { background: #e39a2d; }
.urg-aog_28 .req-bar { background: #ecd29d; }
.req-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-row small { color: var(--ink-3); font-size: 12px; }
.req-title { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-title .mono { font-size: 14px; }
.req-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.req-status { align-items: flex-start; }
.req-status small.tone-danger { color: var(--danger); }
.req-status small.tone-warning { color: var(--warning-ink); }
.req-dest .mono { font-weight: 600; }
.req-people span, .req-people small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-date { font-variant-numeric: tabular-nums; }
.part-tag.order-tag { background: var(--accent-bg); color: var(--accent-ink); }
.message.warning { background: var(--warning-bg); color: var(--warning-ink); border-color: #f0dcb4; }
.order-table .num { text-align: right; white-space: nowrap; }
.order-table td small { display: block; }
.order-table td small.cell-label { display: none; }
.nowrap { white-space: nowrap; }
.order-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.differs { color: var(--warning-ink); font-size: 12px; }
.order-table tr.row-differs td { background: var(--warning-bg); }
.order-table tr.row-closed td { color: var(--ink-3); }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; }
.card-head h2 { margin: 0; }
.order-search { display: flex; gap: 8px; padding: 0 16px 12px; }
.order-search input { flex: 1; min-width: 0; }
.order-add-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-top: 1px solid var(--line); }
.order-form { display: grid; gap: 12px; }
.transport-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; gap: 8px 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.transport-form .button { grid-column: 1 / -1; justify-self: start; }
.event-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 13px; }
.event-list small { display: block; color: var(--ink-3); }
.order-card { display: grid; gap: 10px; }
.order-create-bar { position: sticky; bottom: 12px; z-index: 5; display: grid; gap: 10px; margin-top: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.order-create-bar .field { max-width: 360px; }
.order-create-bar .button { justify-self: start; }
.order-create-sum { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-weight: 600; }
.order-create-bar p.small { margin: 0; }
.order-supplier { flex: 1 1 320px; min-width: 0; }
.own-logistics { display: grid; gap: 16px; }
.own-logistics > summary { justify-self: start; list-style: none; }
.own-logistics > summary::-webkit-details-marker { display: none; }
.own-logistics > summary::after { content: " ▸"; color: var(--ink-3); }
.own-logistics[open] > summary::after { content: " ▾"; }
.own-logistics > p { margin: 0; }
.order-card h2 { margin: 0; }
.order-card-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.list-foot { margin-top: 10px; font-size: 12px; }
.empty { padding: 56px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h2 { font-size: 17px; margin-bottom: 4px; }
.empty p { color: var(--ink-3); margin-bottom: 16px; }
.fab { display: none; }

/* ---------- Карточка заявки ---------- */
.detail-head { margin-bottom: 16px; }
.detail-head h1 { margin: 4px 0 8px; font-size: 26px; }
.detail-head h1 .mono { font-size: 26px; }
.detail-name { font-weight: 400; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hint { font-size: 13px; }
.progress { padding: 18px 20px 14px; margin-bottom: 16px; }
.progress-note { margin-bottom: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.progress-note.tone-warning { background: var(--warning-bg); }
.progress-note.tone-danger { background: var(--danger-bg); }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--ink-3); }
.step::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step-done::before, .step-current::before, .step-paused::before { background: var(--success); }
.step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.step-dot .i { width: 14px; height: 14px; stroke-width: 3; }
.step-done { color: var(--ink-2); }
.step-done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.step-current { color: var(--accent-ink); font-weight: 650; }
.step-current .step-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.step-current .step-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.step-paused { color: var(--warning-ink); font-weight: 650; }
/* Этапы по цвету: поиск — синий, путь — жёлтый, таможня и доставка — зелёный. */
.tone-step-blue { --step: var(--accent); --step-bg: var(--accent-bg); --step-ink: var(--accent-ink); }
.tone-step-yellow { --step: var(--stage-yellow); --step-bg: var(--warning-bg); --step-ink: var(--warning-ink); }
.tone-step-green { --step: var(--success); --step-bg: var(--success-bg); --step-ink: var(--success); }
.step-done::before, .step-current::before, .step-paused::before { background: var(--step); }
.step-done .step-dot { background: var(--step); border-color: var(--step); }
.step-current { color: var(--step-ink); }
.step-current .step-dot { border-color: var(--step); box-shadow: 0 0 0 4px var(--step-bg); }
.step-current .step-dot::after { background: var(--step); }
.step-paused .step-dot { border-color: var(--warning); border-style: dashed; }
.steps-cancelled { opacity: .45; filter: grayscale(1); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.side { display: grid; gap: 16px; }
.main-col { display: grid; gap: 16px; min-width: 0; }
.offers-card > summary { list-style: none; cursor: pointer; }
.offers-card > summary::-webkit-details-marker { display: none; }
.offers-head h2 { margin: 0; display: inline; }
.offers-head h2::after { content: " ▾"; color: var(--ink-3); font-size: 13px; }
.offers-card:not([open]) .offers-head h2::after { content: " ▸"; }
.offers-add { margin: 12px 0 0; }
.offer-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.offer { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.offer-selected { border-color: var(--success); background: var(--success-bg); }
.offer-summary { display: grid; gap: 4px; padding: 10px 12px; cursor: pointer; list-style: none; }
.offer-summary::-webkit-details-marker { display: none; }
.offer-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.offer-supplier { overflow-wrap: anywhere; }
.offer-badge { padding: 1px 9px; border-radius: 999px; background: var(--success); color: #fff; font-size: 12px; font-weight: 600; }
.offer-line { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.offer-sum { color: var(--ink); font-weight: 600; }
.offer-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.offer-facts dt { color: var(--ink-3); }
.offer-facts dd { margin: 0; overflow-wrap: anywhere; }
.offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 12px 12px; }
.offer-actions form { margin: 0; }
.history-note { margin: 8px 0 0; }
.history-offers { margin: 0; padding: 10px 12px; list-style: none; display: grid; gap: 6px; border-top: 1px solid var(--line); font-size: 13px; }
.history-offers li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 20px; margin: 0; }
.fact { min-width: 0; }
.fact dt { margin-bottom: 2px; color: var(--ink-3); font-size: 12px; }
.fact dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.facts-extra { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.facts-extra:has(.facts-block) { margin-top: 16px; border-top: 1px solid var(--line); }
.facts-wide { grid-column: 1 / -1; }
.feed-card > .feed { margin-top: 14px; }
.feed-changes { margin: 4px 0 0; padding: 8px 12px; list-style: none; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.feed-changes li + li { margin-top: 2px; }
.old-value { color: var(--ink-3); text-decoration: line-through; }
.more-button { margin-top: 10px; }
.reg-list { padding: 0; overflow: hidden; }
.reg-group + .reg-group { border-top: 1px solid var(--line); }
.reg-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; align-items: center; gap: 12px; padding: 13px 20px; list-style: none; cursor: pointer; }
.reg-summary::-webkit-details-marker { display: none; }
.reg-summary .mono::before { content: "▸ "; color: var(--ink-3); }
.reg-group[open] .reg-summary .mono::before { content: "▾ "; }
.reg-summary:hover { background: var(--surface-2); }
.reg-summary .small { text-align: right; }
.reg-items { display: grid; gap: 0; margin: 0; padding: 0 20px 12px 38px; list-style: none; }
.reg-delete { padding: 0 20px 12px 38px; }
.danger-zone { display: grid; gap: 8px; justify-items: start; }
.danger-zone h2 { margin: 0; }
.blockers { display: grid; gap: 4px; margin: 6px 0 8px; padding-left: 18px; font-size: 13px; }
.reg-items li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px dashed var(--line); }
.reg-items a { color: var(--ink); text-decoration: none; }
.reg-items a:hover .mono { color: var(--accent); }
.reg-items .status { margin-left: auto; }
.doc-list { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.doc-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.doc-list form { margin: 0 0 0 auto; }
.docs-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.awb-form { display: grid; gap: 8px; margin-top: 8px; }
.gtd-form { display: flex; align-items: flex-end; gap: 10px; }
.gtd-form .field { flex: 1; }
.more-button > summary.button { color: #fff; font-size: 14px; min-height: 44px; padding: 0 15px; }
.more-button > summary.button::after { content: "▾"; margin-left: 2px; }
.more-button[open] > summary.button::after { content: "▴"; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.quick-form { margin-bottom: 10px; }
.quick-form .button { min-height: 44px; }
.more > summary { padding: 8px 0 2px; color: var(--accent); font-weight: 600; cursor: pointer; list-style: none; font-size: 13px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: " ▾"; }
.more[open] > summary::after { content: " ▴"; }
.more .stack-form { margin-top: 12px; }

.feed { margin: 0 0 16px; padding: 0; list-style: none; }
.feed-item { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 0 0 16px; }
.feed-item::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.feed-item:last-child::before { display: none; }
.feed-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.feed-icon .i { width: 15px; height: 15px; }
.feed-comment .feed-icon { background: var(--accent-bg); border-color: #cfe0ec; color: var(--accent); }
.feed-body { min-width: 0; padding-top: 4px; }
.feed-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--ink-2); }
.feed-line strong { color: var(--ink); font-weight: 600; }
.feed-line time { color: var(--ink-3); font-size: 12px; margin-left: auto; }
.bubble { margin-top: 6px; padding: 10px 13px; border-radius: 4px var(--radius) var(--radius) var(--radius); background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--accent-ink); font-size: 12px; text-decoration: none; max-width: 100%; }
.file-chip .i { width: 14px; height: 14px; }
.file-chip:hover { border-color: var(--accent); }
.composer { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.composer-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-bar .button.primary { margin-left: auto; }
.attach { position: relative; max-width: 100%; overflow: hidden; }
.attach span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.picked-files { flex-basis: 100%; min-width: 0; display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.picked-files li { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Формы ---------- */
.form-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; max-width: 860px; padding: 8px 24px 20px; }
.form-section { display: grid; gap: 16px; margin: 0; padding: 18px 0 20px; border: 0; border-bottom: 1px solid var(--line); }
.form-section legend { float: left; width: 100%; margin-bottom: 2px; font-size: 15px; font-weight: 650; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.qty-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.chips, .segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .seg { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 400; color: var(--ink-2); cursor: pointer; user-select: none; }
.chip input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover, .seg:hover { border-color: var(--ink-3); }
.chip:has(input:checked), .seg:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent); }
.chip:has(input:focus-visible), .seg:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips-group { margin-top: 2px; font-size: 12px; }
.saved-files { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.saved-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.remove-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.file-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.part-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.part-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.part-photo { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.parts-table .part-photos img { width: 64px; height: 64px; }
.photo-add { margin-top: 6px; }
.seg-aog_now:has(input:checked) { border-color: var(--danger); background: var(--danger-bg); color: var(--danger-ink); box-shadow: inset 0 0 0 1px var(--danger); }
.seg-aog_14:has(input:checked), .seg-aog_28:has(input:checked) { border-color: var(--warning); background: var(--warning-bg); color: var(--warning-ink); box-shadow: inset 0 0 0 1px var(--warning); }
.urgency-pick .seg { font-weight: 600; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }
.check-field { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 14px; }
.inline-form .field { flex: 0 0 220px; }
.inline-form .field.grow { flex: 1 1 240px; }

/* ---------- Таблицы и списки настроек ---------- */
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 16px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; text-align: left; }
.table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table-empty { text-align: center; color: var(--ink-3); }
.row-actions { text-align: right; white-space: nowrap; }
.row-actions form { display: inline; }
.row-actions .confirm[open] { flex-direction: column-reverse; align-items: flex-end; }
.role-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: #edf0f2; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.state-on { color: var(--success); font-weight: 600; }
.state-off { color: var(--ink-3); }
.option-list { margin: 0; padding: 0; list-style: none; }
.option-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.option-list li:first-child { border-top: 0; }
.option-list li > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.option-list form { margin: 0; }
.option-list li:has(.confirm[open]) { flex-wrap: wrap; }
.option-actions:has(.confirm[open]) { width: 100%; justify-content: flex-end; }
.option-actions:has(.confirm[open]) > a { display: none; }
.option-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.confirm { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.confirm[open] { flex-direction: row-reverse; }
.confirm > summary { list-style: none; cursor: pointer; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary.text-danger { color: var(--ink-2) !important; }
.confirm .when-open, .confirm[open] .when-closed { display: none; }
.confirm[open] .when-open { display: inline; }
.confirm-box { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--ink-2); }

/* ---------- Вход ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; background: var(--nav); }
.login-card { width: min(400px, 100%); padding: 28px; border-radius: 14px; background: var(--surface); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-weight: 650; font-size: 15px; line-height: 1.2; }
.login-brand small { color: var(--ink-3); }
.login-card h1 { margin-bottom: 4px; }
.login-card .muted { margin-bottom: 20px; }
.login-card .message { margin-bottom: 14px; }
.login-card .button { min-height: 44px; margin-top: 4px; }

.mobile-only { display: none; }

/* ---------- Планшет ---------- */
/* Same P/N in several open requests: hint for one combined supplier order */
.same-pn { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: var(--violet-bg); color: var(--violet-ink); font-size: 11px; font-weight: 650; white-space: nowrap; }
.same-pn-card { border-color: #d6d0f5; background: linear-gradient(var(--violet-bg), var(--surface) 70%); }
.same-pn-card > h2 { margin-bottom: 4px; color: var(--violet-ink); }
.same-pn-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.same-pn-list li { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.same-pn-list a { color: inherit; text-decoration: none; }
.same-pn-list a:hover .strong { color: var(--accent); }
.same-pn-list small { color: var(--ink-3); }
.same-pn-total { margin: 0; font-size: 13px; }
.same-pn-hint { margin-top: 4px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--violet-bg); color: var(--violet-ink); font-size: 13px; }
.same-pn-hint ul { margin: 6px 0; padding-left: 18px; }
.same-pn-hint a { color: inherit; font-weight: 650; }
.part-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: var(--warning-bg); color: var(--warning-ink); font-size: 11px; font-weight: 650; white-space: nowrap; }
.parts-card > h2 { margin-bottom: 10px; }
.parts-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin: 0 0 12px; }
.parts-total { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--canvas); }
.parts-total dt { color: var(--ink-3); font-size: 12px; }
.parts-total dd { margin: 0; font-weight: 650; }
.parts-delivered { background: var(--success-bg); }
.parts-searching { background: var(--warning-bg); }
.parts-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.parts-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.parts-list a { color: inherit; text-decoration: none; }
.parts-list a:hover .strong { color: var(--accent); }
.parts-list li.is-current .strong { color: var(--accent); }
.facts-sub { margin: 16px 0 6px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.description { margin: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

/* Alternate P/Ns and suggestions from earlier requests */
.small-button { min-height: 34px; padding: 0 12px; font-size: 13px; }
.alt-add { justify-self: start; }
.alt-rows { display: grid; gap: 6px; }
.alt-rows:empty { display: none; }
.alt-row { display: flex; gap: 6px; align-items: center; }
.alt-row input { flex: 1; min-width: 0; font-family: var(--mono); }
.alt-remove { flex: none; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-3); font-size: 18px; line-height: 1; cursor: pointer; }
.alt-remove:hover { color: var(--danger); border-color: var(--danger); }
.alt-tags { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.alt-tags li { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; }
.alt-tags form { margin: 0; }
.alt-tags .alt-remove { width: 22px; height: 22px; border: 0; border-radius: 999px; font-size: 15px; }
.alt-form { display: grid; gap: 8px; }
.alt-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.pn-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.pn-suggest-title { color: var(--ink-3); }
.suggest-chip { padding: 4px 10px; border: 1px dashed var(--accent); border-radius: 999px; background: var(--accent-bg); color: var(--accent-ink); font-size: 12px; cursor: pointer; }
.suggest-chip:hover { border-style: solid; }
.req-alts { color: var(--ink-3); }

@media (max-width: 1100px) {
  .req-row { grid-template-columns: 4px minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr) 86px; }
  .req-people, .req-head span:nth-child(5) { display: none !important; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .tile { padding: 11px 12px 10px; }
  .tile-count { font-size: 24px; }
  .tile-label { font-size: 12px; line-height: 1.3; }
}

/* ---------- Телефон ---------- */
@media (max-width: 820px) {
  body { font-size: 15px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .mobile-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 56px; padding: 0 8px 0 10px; background: var(--nav); }
  .mobile-bar .brand-mark { width: 30px; height: 30px; }
  .mobile-bar > .ws-menu, .mobile-bar > .brand { min-width: 0; }
  .mobile-bar .ws-menu > summary.brand, .mobile-bar > a.brand { padding: 5px 6px; border-radius: var(--radius-sm); }
  .mobile-bar .ws-menu { position: static; }
  .mobile-bar .ws-panel { top: 56px; left: 8px; right: 8px; }
  .mobile-bar .chevron { margin-left: 2px; }
  .mobile-actions { display: flex; align-items: center; gap: 2px; }
  .mobile-menu > summary { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); color: #fff; list-style: none; cursor: pointer; }
  .mobile-menu > summary::-webkit-details-marker { display: none; }
  .mobile-menu-panel { position: absolute; top: 56px; left: 0; right: 0; display: grid; padding: 8px 12px 14px; background: var(--nav); border-top: 1px solid var(--nav-2); box-shadow: 0 16px 30px rgba(0, 0, 0, .25); }
  .mobile-menu-panel { max-height: calc(100vh - 56px); overflow-y: auto; gap: 2px; }
  .mobile-nav { display: grid; gap: 2px; }
  .mobile-menu-panel .nav-link, .mobile-menu-panel .menu-link { padding: 12px 10px; font-size: 16px; color: #fff; }
  .mobile-menu-panel .nav-link.active { box-shadow: inset 3px 0 0 #5ea3d6; }
  .mobile-menu-panel form { margin: 0; }
  .mobile-menu-panel .popover-caption { margin: 10px 10px 4px; }
  .mobile-profile { display: grid; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--nav-2); }
  .mobile-person { display: flex; align-items: center; gap: 10px; padding: 6px 10px 8px; color: #fff; line-height: 1.3; }
  .mobile-person small { display: block; color: var(--nav-ink); font-size: 12px; }
  .main { padding: 18px 16px 96px; }
  h1, .detail-head h1, .detail-head h1 .mono { font-size: 21px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-flex; }
  .page-head { margin-bottom: 14px; }

  .tiles { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .tile { padding: 10px 12px; }
  .tile-count { font-size: 22px; }
  .tile-label { font-size: 12px; line-height: 1.3; }

  .toolbar .search { flex-basis: 100%; }
  .toolbar > .button { flex: 1; }
  .toolbar-select { flex: 1; }
  .toolbar-row { flex-wrap: wrap; }
  .toolbar-row .button { flex: 1; }
  .filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar select, .filter-bar .multi > summary { min-width: 0; width: 100%; min-height: 40px; font-size: 14px; }
  .filter-bar .multi-options { right: 0; min-width: 0; }
  .filter-bar .filter-date, .filter-bar .filter-check { min-height: 40px; font-size: 14px; }
  .filter-bar .filter-date input { flex: 1; min-width: 0; min-height: 36px; font-size: 16px; }
  input[type=text], input[type=search], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea { font-size: 16px; min-height: 44px; }

  .req-list { background: transparent; border: 0; border-radius: 0; overflow: visible; display: grid; gap: 10px; }
  .req-head { display: none !important; }
  .req-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main status" "dest date"; gap: 8px 12px; padding: 13px 14px 13px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; overflow: hidden; }
  .req-row:first-child { border-top: 1px solid var(--line); }
  .req-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; margin: 0; }
  .req-main { grid-area: main; }
  .req-status { grid-area: status; align-items: flex-end !important; text-align: right; }
  .req-dest { grid-area: dest; flex-direction: row !important; align-items: baseline; gap: 6px !important; }
  .req-date { grid-area: date; flex-direction: row !important; gap: 4px !important; justify-content: flex-end; color: var(--ink-3); font-size: 12px; }
  .req-name { white-space: normal; }
  .order-table .num { text-align: left; }
  .order-table td small.cell-label { display: inline; }

  .fab { position: fixed; z-index: 25; right: 16px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 25px; background: var(--accent); color: #fff; font-weight: 650; text-decoration: none; box-shadow: 0 8px 22px rgba(29, 94, 138, .35); }

  .progress { padding: 14px 12px 12px; }
  .step-label { font-size: 11px; }
  .step-done .step-label, .step-todo .step-label { visibility: hidden; height: 0; }
  .step-current .step-label, .step-paused .step-label { white-space: nowrap; }
  .step:first-child .step-label { align-self: flex-start; }
  .step:last-child .step-label { align-self: flex-end; }
  .detail-grid { grid-template-columns: 1fr; }
  .side { display: contents; }
  .actions-card { order: -1; }
  .main-col { display: contents; }
  .feed-card { order: 2; }
  .order-requests { order: 1; }
  .order-create-bar { position: static; box-shadow: none; }
  .order-add { order: 2; }
  .order-late { order: 3; }
  .shop-order-delete { order: 3; } /* after the feed, not with the status card on top */
  .feed-line time { margin-left: 0; width: 100%; }
  .composer-bar .muted { display: none; }

  .form-card { padding: 4px 16px 18px; }
  .form-grid, .two-col { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; min-height: 46px; }
  .chip, .seg { min-height: 44px; }
  .segmented .seg { flex: 1 1 calc(50% - 8px); justify-content: center; }

  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  .table tr:first-child { border-top: 0; }
  .table td { padding: 3px 0; border: 0; }
  .row-actions { text-align: left; padding-top: 8px !important; }
  .offer-table td.num { text-align: left; }
  .offer-table td small.cell-label { display: inline; }
  .inline-form .field { flex: 1 1 100%; }
}

/* ---------- Каталог P/N ---------- */
.pos-list { padding: 0; overflow: hidden; }
.pos-head, .pos-line { display: grid; grid-template-columns: 1.1fr 1.6fr 1.3fr 70px 100px 1.9fr; gap: 12px; align-items: center; padding: 12px 16px; }
.pos-head { background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; }
.pos-row { border-top: 1px solid var(--line); }
a.pos-line { color: inherit; text-decoration: none; }
a.pos-line:hover { background: #f8fafb; }
.pos-line > span { min-width: 0; overflow-wrap: anywhere; }
.pos-label { display: none; }
.pos-empty { padding: 24px 16px; }
.pager { display: flex; gap: 10px; margin-top: 12px; }
@media (max-width: 820px) {
  .pos-list { background: transparent; border: 0; display: grid; gap: 10px; }
  .pos-head { display: none; }
  .pos-row { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .pos-line { grid-template-columns: 1fr 1fr; grid-template-areas: "pn pn" "name name" "alt alt" "req off" "last last"; gap: 4px 12px; padding: 12px 14px; }
  .pos-pn { grid-area: pn; } .pos-name { grid-area: name; } .pos-alt { grid-area: alt; font-size: 13px; }
  .pos-req { grid-area: req; } .pos-off { grid-area: off; }
  .pos-last { grid-area: last; font-size: 13px; }
  .pos-label { display: inline; }
}

.pos-block { margin-top: 14px; }
.pos-block h3 { font-size: 15px; margin: 0 0 6px; display: inline; }
.pos-parts, .pos-requests, .pos-events { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.pos-requests li { display: flex; gap: 12px; flex-wrap: wrap; }
.pos-parts li { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.pos-parts li:first-child { border-top: 0; }
.pos-part-main { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.pos-part-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pos-add { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.pos-add h4 { margin: 0; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pos-add .inline-form { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; margin: 0; }
.pos-add .inline-form input[type=text] { width: auto; flex: 1 1 auto; min-width: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 820px) {
  .pos-add .inline-form { flex-direction: column; align-items: stretch; }
  .pos-add .inline-form input[type=text] { width: 100%; }
  .pos-part-actions { width: 100%; }
  .page-head:has(.head-cta) { flex-direction: column; align-items: stretch; }
  .page-head:has(.head-cta) .head-cta { align-self: flex-start; }
  .head-actions { justify-content: flex-start; }
}
.pos-log > summary { cursor: pointer; }
.pos-summary { list-style: none; margin: -6px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pos-summary li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); }
.pos-summary li.is-yes { border-color: var(--success); background: var(--success-bg); }
.pos-body { display: grid; gap: 16px; }
.pos-section > .pos-requests, .pos-section > .pos-parts, .pos-section > .pos-events, .pos-section > .pos-customs { margin-top: 12px; }
.pos-section > p { margin: 12px 0 0; }
.pos-requests li { padding: 6px 0; border-top: 1px solid var(--line); }
.pos-requests li:first-child { border-top: 0; }
.pos-customs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pos-customs li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pos-customs .cus-fields { grid-template-columns: 130px 1fr; flex: 1 1 280px; }
@media (max-width: 720px) {
  .pos-customs .cus-fields { grid-template-columns: 1fr; }
  .pos-customs .button { width: 100%; }
}

/* Таможенные данные */
.cus-list { padding: 0; overflow: hidden; }
.cus-head, .cus-line { display: grid; grid-template-columns: 56px 1.1fr 1.1fr 2fr 1fr 90px; gap: 12px; align-items: center; padding: 10px 16px; }
.cus-head { background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; }
.cus-line { border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.cus-line > span { min-width: 0; overflow-wrap: anywhere; }
.cus-makers { display: block; margin-top: 2px; }
.cus-line .c-code .mono { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.cus-thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; display: block; background: var(--surface-2); }
.cus-thumb.empty { border: 1px dashed var(--line); }
.cus-warn { color: #b45309; font-size: 12px; font-weight: 600; }
.cus-fields { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.cus-fields dt { color: var(--ink-3); font-size: 13px; }
.cus-fields dd { margin: 0; overflow-wrap: anywhere; }
.cus-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cus-photos img { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
@media (max-width: 720px) {
  .cus-list { background: transparent; border: 0; display: grid; gap: 10px; }
  .cus-head { display: none; }
  .cus-line { grid-template-columns: 56px 1fr auto; grid-template-areas: "th pn pn" "th alt alt" "desc desc desc" "code code weight"; gap: 4px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 14px; }
  .cus-line .c-th { grid-area: th; } .cus-line .c-pn { grid-area: pn; } .cus-line .c-alt { grid-area: alt; font-size: 13px; }
  .cus-line .c-desc { grid-area: desc; } .cus-line .c-code { grid-area: code; } .cus-line .c-weight { grid-area: weight; text-align: right; }
  .cus-fields { grid-template-columns: 1fr; gap: 2px; }
  .cus-fields dd { margin-bottom: 8px; }
}
.form-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.form-inline input { flex: 1 1 200px; min-width: 0; }
@media (max-width: 720px) { .form-inline input { flex-basis: 100%; width: 100%; } }

/* Supplier directory: rating stars and contact rows */
.supplier-list .supplier-main { flex-direction: column; align-items: flex-start; gap: 2px; }
.supplier-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stars { color: var(--line-strong); letter-spacing: 1px; font-size: 15px; line-height: 1; }
.stars .on { color: var(--star); }
.rating-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stars-pick { display: inline-flex; flex-direction: row-reverse; }
.stars-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-pick label { padding: 0 2px; font-size: 30px; line-height: 1; color: var(--line-strong); cursor: pointer; }
.stars-pick input:checked ~ label, .stars-pick label:hover, .stars-pick label:hover ~ label { color: var(--star); }
.stars-pick input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rating-clear { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.contact-rows { display: grid; gap: 10px; }
.contact-rows:empty { display: none; }
.contact-row { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.contact-row[hidden] { display: none; }
@media (max-width: 720px) {
  .contact-row { grid-template-columns: 1fr; }
  .contact-remove { justify-self: start; }
  .page-head:has(.supplier-head-actions), .page-head:has(.offer-head-actions) { flex-direction: column; align-items: stretch; }
  .supplier-list li { flex-wrap: wrap; }
  .supplier-list .supplier-main { width: 100%; }
  .supplier-list .option-actions { margin-left: -10px; }
}

/* Dangerous goods: red — only by a cargo aircraft, yellow — a passenger aircraft is allowed. */
.dg-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; font: 700 12px/1 system-ui, sans-serif; vertical-align: middle; cursor: help; }
.dg-cargo { background: var(--danger); color: #fff; }
.dg-passenger { background: #f5c400; color: #3a2c00; box-shadow: inset 0 0 0 1px #c99f00; }
h1 .dg-icon { width: 24px; height: 24px; font-size: 15px; }
.profile-card { margin-bottom: 16px; }
.profile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.profile-head h2 { font-size: 16px; margin: 0; }

/* ---------- Колокольчик и лента уведомлений ---------- */
.bell { position: relative; display: inline-grid; place-items: center; }
.bell-count { position: absolute; top: -7px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--nav); }
.bell-count[hidden] { display: none; }
.mobile-bell { width: 40px; height: 40px; border-radius: var(--radius-sm); color: #fff; }
.notes-card { padding: 6px 20px; margin-bottom: 16px; }
.notes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 8px; }
.notes-head h2 { margin: 0; }
.notes { list-style: none; margin: 0; padding: 0; }
.note-item a { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 8px; margin: 0 -8px; border-top: 1px solid var(--line); border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.note-item a:hover { background: var(--surface-2); }
.note-item.unread a { background: var(--accent-bg); }
.note-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; }
.note-item.unread .note-dot { background: var(--accent); }
.note-title { font-weight: 550; overflow-wrap: anywhere; }
.note-item.unread .note-title { font-weight: 700; }
.note-label { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: 1px; }
.note-time { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.note-body { grid-column: 2 / 4; color: var(--ink-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.notes-empty { padding: 18px 0; color: var(--ink-3); }

/* CRM SHOP: repair order statuses. */
.status-received, .status-repair { background: var(--accent-bg); color: var(--accent-ink); }
.status-awaiting_parts { background: var(--warning-bg); color: var(--warning-ink); }
.status-ready { background: var(--success-bg); color: var(--success); box-shadow: inset 0 0 0 1px currentColor; }
.status-issued { background: var(--success-bg); color: var(--success); }
.status-suspended { background: var(--danger-bg); color: var(--danger-ink); }
.feed-event-text { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

/* CRM SHOP: technological process — percent bars, folding stages, large mark buttons. */
.pct { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.pct-bar { -webkit-appearance: none; appearance: none; width: 64px; height: 6px; border: 0; border-radius: 3px; background: var(--line); overflow: hidden; vertical-align: middle; }
.pct-bar::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
.pct-bar::-webkit-progress-value { background: var(--success); border-radius: 3px; }
.pct-bar::-moz-progress-bar { background: var(--success); border-radius: 3px; }
.process-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.pstage { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); scroll-margin-top: 70px; }
.pstage > summary { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 14px; list-style: none; cursor: pointer; font-weight: 650; }
.pstage > summary::-webkit-details-marker { display: none; }
.pstage > summary::before { content: "▸"; flex: none; color: var(--ink-3); font-size: 13px; }
.pstage[open] > summary::before { content: "▾"; }
.pstage[open] > summary { border-bottom: 1px solid var(--line); }
.pstage-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pstage-body { padding: 0 14px 12px; }
.pitems { margin: 0; padding: 0; list-style: none; }
.pitem { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.pitem:first-child { border-top: 0; }
.pitem-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.pitem-num { min-width: 32px; padding-top: 1px; color: var(--ink-3); font-size: 13px; }
.pitem-text { font-weight: 550; overflow-wrap: anywhere; }
.pitem-done .pitem-text { color: var(--ink-2); }
.pitem-na .pitem-text { color: var(--ink-3); text-decoration: line-through; }
.psubsteps { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.pmeta { margin-top: 4px; color: var(--ink-3); font-size: 12px; }
.pmark { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 6px; }
.pmark-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: 14px; line-height: 1.2; text-align: center; cursor: pointer; }
.pmark-btn:hover { border-color: var(--ink-3); }
.mark-done { border-color: var(--success); color: var(--success); }
.mark-done.is-on { background: var(--success); border-color: var(--success); color: #fff; }
.mark-todo.is-on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-ink); }
.mark-na.is-on { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.pstate { justify-self: start; padding: 4px 12px; border-radius: 999px; background: #edf0f2; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.pstate-done { background: var(--success-bg); color: var(--success); }
.pnote > summary { display: flex; align-items: center; gap: 4px; min-height: 36px; list-style: none; cursor: pointer; color: var(--accent-ink); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.pnote > summary::-webkit-details-marker { display: none; }
.pnote-preview { color: var(--ink); font-weight: 400; }
.pnote-text { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; overflow-wrap: anywhere; }
.ptools > summary { list-style: none; }
.ptools > summary::-webkit-details-marker { display: none; }
.ptools-box { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ptools-box .field { display: grid; gap: 4px; }
.ptools-box .field > span { color: var(--ink-2); font-size: 13px; }
.ptools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.pstage-tools { align-items: flex-start; margin-top: 10px; }
.pstage-tools > .ptools[open] { flex-basis: 100%; }
.padd-stage { margin-top: 14px; }
.pempty { margin-top: 12px; }
.process-card > h2 { margin-bottom: 4px; }
@media (max-width: 720px) {
  .pstage > summary { flex-wrap: wrap; padding: 10px 12px; }
  .pstage-body { padding: 0 12px 12px; }
  .pmark { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pmark-btn { min-height: 52px; padding: 0 4px; font-size: 13px; overflow-wrap: break-word; }
  .ptools > summary.button, .ptools-row .button { min-height: 40px; }
  .order-table .pct { justify-content: flex-end; }
  .pstage .pct-bar { width: 40px; }
}

/* ---------- SHOP: перечни компонентов ---------- */
.parts-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 10px 0; }
.parts-filter { flex: 1 1 220px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font: inherit; }
.parts-table-wrap { overflow-x: auto; margin-bottom: 10px; }
.parts-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.parts-table th { padding: 8px 10px; background: var(--surface-2); color: var(--ink-3); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.parts-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.parts-table .num { width: 32px; color: var(--ink-3); white-space: nowrap; }
.parts-table td.mono { white-space: nowrap; overflow-wrap: normal; }
.parts-table .qty { text-align: right; white-space: nowrap; }
.parts-table .pname { font-weight: 550; min-width: 140px; }
.parts-table .note { min-width: 180px; }
.parts-table .row-tools { width: 1%; white-space: nowrap; }
.parts-table .row-tools .ptools-row { margin-top: 0; flex-wrap: nowrap; justify-content: flex-end; }
.parts-mobile { display: none; margin-bottom: 10px; }
.prow > summary { list-style: none; cursor: pointer; overflow-wrap: anywhere; }
.prow > summary::-webkit-details-marker { display: none; }
.prow > summary::before { content: "▸ "; color: var(--ink-3); }
.prow[open] > summary::before { content: "▾ "; }
.prow-name { font-weight: 550; }
.prow-body { display: grid; gap: 4px; padding: 6px 0 0 14px; }
@media (max-width: 767px) {
  .parts-table-wrap { display: none; }
  .parts-mobile { display: block; }
  .parts-tools { justify-content: stretch; }
  .parts-tools .button { min-height: 40px; }
}
