/* Общий визуальный слой. Геометрия расписания и атрибуты Livewire остаются в шаблонах.
   Этап A (стиль MobileTechRX): тёмная шапка, нейтральные графитовые тексты/рамки и мягкая
   тень карточек. --btn-primary-bg, --danger-bg, --surface-1, --border-strong и --page-gradient
   этим этапом сознательно не менялись. Единственный источник токенов для обоих layout'ов —
   этот файл подключается и в app.blade.php, и в guest.blade.php. */
:root, .workspace-body, .auth-body {
  --surface-2: #fff;
  --surface-1: #f2f5fb;
  --surface-0: #f7f8fa;
  --text-primary: #1c252d;
  --text-secondary: #5f6b78;
  --text-muted: #65717d;
  --border: #e4e8ed;
  --border-strong: #d8e0ed;
  --btn-primary-bg: #235be9;
  --btn-primary-shadow: #1847be;
  --teal-bg: #e7f7f1;
  --teal-text: #168064;
  --coral-bg: #fff0e9;
  --coral-text: #ac4d32;
  --accent-bg: #fff4da;
  --accent-text: #93620b;
  --violet-bg: #f0ecff;
  --violet-text: #7251bd;
  --error-text: #b82f43;
  --danger-bg: #c53d4e;
  --danger-shadow: #9c273b;
  --radius: 14px;
  --page-gradient: #f5f7fc;
  --brand-soft: #edf3ff;
  --card-shadow: 0 1px 2px rgb(22 28 36 / 4%), 0 6px 20px rgb(22 28 36 / 6%);
  --card-shadow-hover: 0 2px 4px rgb(22 28 36 / 5%), 0 10px 28px rgb(22 28 36 / 9%);
  --sidebar-width: 236px;
  /* Шапка: цвета сняты пипеткой с референсов (tint-overview.jpg и ppf-overview.jpg совпадают) —
     горизонтальный графитовый градиент от #4b5156 слева к #222b32 справа. --header-bg-solid —
     его середина: для theme-color и как запасной цвет под градиентом. */
  --header-bg: linear-gradient(90deg, #4b5156 0%, #222b32 100%);
  --header-bg-solid: #363e44;
  --header-text: #fff;
  --header-text-muted: rgb(255 255 255 / 68%);
  --header-control: rgb(255 255 255 / 10%);
  --header-control-hover: rgb(255 255 255 / 18%);
  --header-height: 64px;
}

html { color-scheme: light; scroll-padding-top: 92px; }
body { font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
::selection { background: #dbe7ff; color: #163f9a; }
:focus-visible { outline: 3px solid #90b3ff; outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: #63718a; opacity: 1; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--btn-primary-bg); }
input[type='date'], input[type='datetime-local'], select { min-width: 0; }
.ui-icon { display: block; flex-shrink: 0; }
/* Иконка внутри строки текста (заменила эмодзи в бейджах и подписях): размер от шрифта строки. */
.ui-icon.ui-icon-inline { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; }

/* Навигация и рабочее пространство */
.workspace-body { padding: 0 32px 32px; background: var(--page-gradient); line-height: 1.45; }
.workspace-body .wrap { max-width: 1512px; min-width: 0; gap: 24px; }
.workspace-body .wrap > * { min-width: 0; }
.workspace-body .sidebar { border-color: var(--border); box-shadow: none; padding: 0 14px 18px; }
/* Блок бренда — продолжение тёмной шапки: та же высота и тот же градиент, растянутый на 100vw
   от левого края окна (сайдбар прижат к нему), поэтому стыка с полосой шапки не видно.
   Отрицательные поля закрывают внутренние отступы и правую рамку сайдбара. */
.workspace-body .sidebar-brand { flex-shrink: 0; gap: 12px; height: var(--header-height); margin: 0 -15px 22px -14px; padding: 0 24px; color: var(--header-text); background: var(--header-bg-solid); background-image: var(--header-bg); background-size: 100vw 100%; background-repeat: no-repeat; font-size: 21px; letter-spacing: -.045em; }
.workspace-body .sidebar-brand .brand-caption { color: var(--header-text-muted); }
.brand-mark { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #3976ff, #174ddd); color: white; font-size: 24px; font-weight: 750; line-height: 1; box-shadow: 0 4px 10px #235be920; }
.brand-caption { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; font-weight: 500; letter-spacing: .01em; }
.sidebar-nav-heading { padding: 0 12px 12px; color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.workspace-body .sidebar-nav { padding: 0; gap: 5px; }
.workspace-body .sidebar-nav-item { gap: 13px; padding: 12px 14px; border-radius: 11px; min-height: 46px; font-size: 13px; font-weight: 550; }
.workspace-body .sidebar-nav-item > .ui-icon { width: 20px; height: 20px; }
.workspace-body .sidebar-nav-item:hover { color: var(--btn-primary-bg); background: var(--brand-soft); }
.workspace-body .sidebar-nav-item.active { color: white; background: var(--btn-primary-bg); box-shadow: 0 5px 12px #235be91a; }
.workspace-body .sidebar-footer { padding: 18px 4px 0; margin-top: 20px; gap: 16px; }
.workspace-body .sidebar-user { gap: 10px; font-size: 13px; }
.sidebar-user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-name small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; font-weight: 400; }
.user-avatar { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; color: #315b9e; background: #e9f0ff; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.workspace-body .sidebar-logout { min-height: 44px; padding: 9px 12px; border: 0; background: var(--surface-0); color: var(--text-secondary); font-size: 12px; }
.workspace-body .sidebar-logout:hover { color: var(--error-text); background: #fff0f2; }
.sidebar-logout .ui-icon { width: 18px; height: 18px; }
/* Тёмная шапка (Этап A). Подложка — псевдоэлемент body во всю ширину окна (z-index:-1, под
   содержимым), сама шапка прозрачная и задаёт только раскладку: так полоса непрерывна от
   сайдбара до правого края при любой ширине, хотя .wrap ограничен max-width. Высоты совпадают
   через --header-height. */
.workspace-body::before { content: ''; position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: var(--header-height); background: var(--header-bg-solid); background-image: var(--header-bg); pointer-events: none; }
.app-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; height: var(--header-height); min-height: 0; color: var(--header-text); }
.app-header-start { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app-header-back { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; margin-left: -12px; border-radius: 10px; color: var(--header-text); text-decoration: none; }
.app-header-back:hover { background: var(--header-control); }
.app-header-back .ui-icon { width: 22px; height: 22px; }
.app-header-title { min-width: 0; overflow: hidden; color: var(--header-text); font-size: 13px; font-weight: 650; letter-spacing: .09em; line-height: 1.3; text-align: center; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.app-toolbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; min-width: 0; }
.app-date { color: var(--header-text-muted); font-size: 12px; white-space: nowrap; }
.app-profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-profile-copy { display: grid; gap: 2px; min-width: 0; font-size: 12px; }
.app-profile-copy strong { color: var(--header-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-profile-copy small { color: var(--header-text-muted); font-size: 10px; }
.app-toolbar .user-avatar { color: var(--header-text); background: var(--header-control); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%); }
.app-mobile-brand, .app-mobile-logout { display: none; }
.mobile-more-menu, .mobile-menu-backdrop { display: none; }
.workspace-body .list-header { align-items: center; gap: 16px; margin-bottom: 22px; }
.workspace-body .list-header .title { font-size: clamp(23px, 2.1vw, 29px); font-weight: 650; letter-spacing: -.045em; line-height: 1.2; }
.workspace-body .list-header-sub { margin-top: 6px; font-size: 13px; }
.workspace-body h2 { color: var(--text-primary); font-size: 15px; font-weight: 650; text-transform: none; letter-spacing: -.01em; }

/* Единая поверхность карточек, форм и панелей */
.workspace-body :is(.client-card, .form-card, .mini-card, .job-card, .order-list-card, .client-list-card, .report-panel, .report-controls, .report-breakdown) {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); box-shadow: var(--card-shadow);
}
.workspace-body :is(.client-card, .form-card, .mini-card) { padding: 24px; }
.workspace-body :is(.order-list-card, .client-list-card, .job-card) { padding: 20px; }
.workspace-body :is(.order-list-card, .client-list-card):hover { border-color: #c9d6ea; box-shadow: var(--card-shadow-hover); }
.workspace-body :is(.orders-grid, .clients-grid, .cards-grid) { gap: 18px; }
.workspace-body :is(.client-phone, .order-list-title) { font-weight: 650; letter-spacing: -.03em; }
.workspace-body :is(.client-section-heading, .film-header, .film-list-header) h2 { font-size: 17px; }
.workspace-body :is(.client-vehicle-list, .client-order-list, .whatsapp-notification-panel, .order-item-card) { border: 1px solid var(--border); border-radius: 12px; box-shadow: none; }
.workspace-body :is(.client-vehicle-row, .client-order-row, .staff-row) { padding-block: 14px; }
.workspace-body :is(.client-order-main strong, .client-vehicle-main strong, .employee-name-cell strong) { font-size: 14px; }
.workspace-body :is(.client-order-main span, .client-vehicle-main > span, .client-section-heading > small) { font-size: 12px; }
.workspace-body .badge { min-height: 24px; padding: 4px 10px; border-radius: 7px; font-size: 11px; font-weight: 600; line-height: 1.4; }
.workspace-body :is(.empty-state, .report-empty, .employee-empty) { padding: 28px 20px; line-height: 1.65; color: var(--text-secondary); }
.workspace-body :is(.hint, .field-error) { line-height: 1.55; }
.workspace-body .alert-success { border: 1px solid #cdeade; font-size: 13px; box-shadow: var(--card-shadow); }
.workspace-body .alert-warning { border: 1px solid #f0d5c8; font-size: 13px; }

/* Поля и действия: одинаковые зоны касания на всех устройствах */
.intake-other-parts { margin-bottom: 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.intake-other-parts > summary, .intake-material-roll > summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--text-secondary); font-size: 13px; }
.intake-other-parts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.intake-part-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 9px; text-align: left; background: white; color: var(--text-primary); font: inherit; font-size: 13px; cursor: pointer; }
.intake-part-option.selected { border-color: #90b3ff; background: var(--brand-soft); color: var(--btn-primary-bg); }
.intake-material-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; color: var(--text-secondary); font-size: 13px; }
.intake-material-summary strong { color: var(--text-primary); font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.intake-material-list { display: grid; gap: 12px; }
.intake-material-part { min-width: 0; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.intake-material-part h3 { margin: 0 0 16px; color: var(--text-primary); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.intake-material-part .field { margin-bottom: 0; }
.intake-material-roll { margin-top: 10px; }
.intake-material-roll > summary span { margin-left: 6px; color: var(--text-muted); font-size: 11px; }
.intake-ppf-common { padding: 18px; margin-bottom: 16px; border: 1px solid #cbdcfb; border-radius: 12px; background: var(--brand-soft); }
.intake-ppf-common .field { margin-bottom: 0; }
.intake-ppf-common .intake-help { margin-bottom: 0; }
.intake-ppf-parts { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.intake-ppf-part { min-width: 0; padding: 14px 18px; background: white; }
.intake-ppf-part + .intake-ppf-part { border-top: 1px solid var(--border); }
.intake-ppf-part-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.intake-ppf-part-heading > div { min-width: 0; }
.intake-ppf-part h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.intake-ppf-part-status { font-size: 12px; color: var(--text-secondary); }
.intake-ppf-part-heading .btn-secondary { flex: 0 0 auto; width: auto; padding-inline: 12px; }
.intake-ppf-part > .field { margin-top: 14px; margin-bottom: 0; }
.finish-material-group { min-width: 0; margin-bottom: 20px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.finish-material-group h3 { margin: 0 0 10px; color: var(--text-primary); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.finish-material-details { margin: 0 0 8px; color: var(--text-secondary); font-size: 13px; overflow-wrap: anywhere; }
.finish-material-group .finish-material-add-roll { width: 100%; margin-top: 8px; border-style: dashed; }
.finish-film-choice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.finish-film-choice .btn-secondary { flex: 0 0 auto; width: auto; min-height: 44px; margin: 0; }
.finish-film-choice .hint { margin: 0; }
.finish-film-selector { max-width: 680px; margin: 0 0 16px; }
.finish-film-selector select { width: 100%; }
.finish-film-selector .hint { margin: 8px 0 0; }
@media (max-width: 600px) {
  .intake-other-parts-grid { grid-template-columns: minmax(0, 1fr); }
  .intake-material-part { padding: 14px; }
  .intake-material-roll > summary span { display: block; margin-left: 16px; }
  .intake-ppf-part, .intake-ppf-common { padding: 14px; }
  .intake-ppf-part-heading { flex-wrap: wrap; }
}
.ppf-quantity-hint { margin-top: 0; }
.ppf-price-list { display: grid; gap: 10px; margin-bottom: 20px; }
.ppf-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; }
.ppf-price-row.selected { border-color: #90b3ff; background: var(--brand-soft); }
.ppf-price-row:not(.selected) { flex-wrap: nowrap; }
.ppf-price-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; flex: 1 1 260px; min-width: 0; min-height: 44px; padding: 0; border: 0; color: var(--text-primary); background: transparent; text-align: left; cursor: pointer; }
.ppf-price-description { min-width: 0; }
.ppf-price-description strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: break-word; }
.ppf-price-row small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 11px; }
.ppf-price-amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ppf-price-amount strong { color: var(--btn-primary-bg); font-size: 16px; font-weight: 650; }
.ppf-price-counter { display: grid; grid-template-columns: 44px 32px 44px; align-items: center; flex-shrink: 0; margin-left: auto; border: 1px solid var(--border-strong); border-radius: 9px; background: white; text-align: center; }
.ppf-price-counter button, .ppf-price-add { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: var(--btn-primary-bg); background: transparent; font: inherit; font-size: 20px; cursor: pointer; }
.ppf-price-add { flex-shrink: 0; border: 1px solid var(--border-strong); background: var(--surface-0); }
.ppf-price-counter button:hover, .ppf-price-add:hover { background: var(--brand-soft); }
.ppf-price-counter button:disabled { color: var(--text-muted); opacity: .4; cursor: default; }
.ppf-price-counter span { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  .ppf-price-row { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .ppf-price-row.selected .ppf-price-choice { flex-basis: 100%; }
  .ppf-price-counter { margin-left: auto; }
  .ppf-price-choice { gap: 10px; }
  .ppf-price-description strong { font-size: 12px; }
  .ppf-price-amount strong { font-size: 15px; }
}
.workspace-body :is(.btn-primary, .btn-secondary, .btn-danger), .auth-body .btn-primary {
  min-height: 44px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.3; transition: background .15s ease, box-shadow .15s ease;
}
.workspace-body .btn-primary, .auth-body .btn-primary { background: var(--btn-primary-bg); box-shadow: 0 3px 9px #235be91c; }
.workspace-body .btn-primary:hover, .auth-body .btn-primary:hover { background: #184fd7; transform: none; box-shadow: 0 4px 14px #235be92b; }
.workspace-body .btn-primary:active, .auth-body .btn-primary:active { transform: none; background: #1744b7; }
.workspace-body .btn-secondary { background: white; border: 1px solid var(--border-strong); color: #3a4550; box-shadow: none; }
.workspace-body .btn-secondary:hover { color: var(--btn-primary-bg); border-color: #a9bfee; background: var(--surface-0); }
.workspace-body .btn-danger { box-shadow: none; }
.workspace-body .staff-add-button { background: var(--btn-primary-bg); box-shadow: 0 3px 9px #235be91c; }
.workspace-body :is(.icon-btn, .employee-edit-button) { width: 44px; height: 44px; border-radius: 10px; }
.workspace-body .icon-btn:hover { color: var(--btn-primary-bg); background: var(--brand-soft); }
.workspace-body :is(.field input, .field select, .field textarea, .search-input, .filters-row select, .filters-row input, .search-filter-row select, .employee-toolbar select) {
  border: 1px solid var(--border-strong); border-radius: 10px; min-height: 44px; color: var(--text-primary); background: white; font-size: 14px; box-shadow: none;
}
.workspace-body :is(.search-input, .employee-toolbar .search-input) { background: white; padding-inline: 16px; }
.workspace-body .search-input.with-icon { padding-left: 42px; }
.workspace-body :is(.field input, .field select, .field textarea, .search-input, .filters-row select, .filters-row input):focus {
  border-color: #709aef; box-shadow: 0 0 0 3px #235be910;
}
.workspace-body .field label { color: var(--text-secondary); font-size: 12px; font-weight: 550; }
.client-phone-fields { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
.client-phone-fields input { min-width: 0; }
.client-phone-fields .client-phone-code { text-align: center; }
.workspace-body .employee-toolbar { grid-template-columns: minmax(0, 1fr) 180px 180px; gap: 12px; margin-block: 20px; }
.workspace-body .employee-toolbar .search-icon .ui-icon { width: 18px; height: 18px; }
.workspace-body .employee-filter-reset { grid-column: 1 / -1; justify-self: end; }
.workspace-body .filters-row { gap: 10px; margin-bottom: 20px; }
.workspace-body :is(.employee-filter-reset, .pagination-wrap button) { min-height: 44px; }
.workspace-body .search-filter-row { gap: 12px; }
.workspace-body .list-header .title { margin: 0; }
.page-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Модальные формы */
.workspace-body .modal-overlay { background: rgb(22 28 36 / 42%); backdrop-filter: blur(4px); padding: 24px; z-index: 100; }
.workspace-body .modal-card { border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 24px 80px rgb(22 28 36 / 22%); padding: 28px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.workspace-body .modal-card .form-title { color: var(--text-primary); font-size: 21px; font-weight: 650; letter-spacing: -.035em; }
.workspace-body .form-actions { gap: 12px; }
.workspace-body :is(.role-toggle, .planner-mode-toggle, .report-periods) button { min-height: 44px; }

/* Финансовый экран: синий главный показатель и спокойные вторичные карточки */
.workspace-body .report-shell { gap: 20px; }
.workspace-body .report-controls { padding: 20px; }
.workspace-body .report-tabs { gap: 6px; padding: 5px; background: #f2f5fb; border-radius: 11px; border: 0; }
.workspace-body .report-tabs button { min-height: 42px; font-size: 13px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); }
.workspace-body .report-tabs button.active { color: #fff; background: var(--btn-primary-bg); box-shadow: 0 2px 6px rgb(35 91 233 / 24%); }
.workspace-body .report-period-bar { gap: 18px; margin-top: 18px; }
.workspace-body .report-period-caption > span { font-size: 11px; color: var(--text-muted); }
.workspace-body .report-period-caption > strong { font-size: 14px; }
.workspace-body .report-periods { gap: 6px; }
.workspace-body .report-periods button { border-radius: 8px; font-size: 12px; }
.workspace-body .report-periods button.active { color: var(--btn-primary-bg); background: var(--brand-soft); border-color: #dce6ff; }
.workspace-body .report-kpi-grid { gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workspace-body .report-kpi-card { min-width: 0; min-height: 190px; padding: 22px; border: 1px solid var(--border); border-radius: 15px; background: white; box-shadow: var(--card-shadow); text-align: left; }
.workspace-body .report-kpi-card:hover { border-color: #b9cdef; transform: none; box-shadow: var(--card-shadow-hover); }
.workspace-body .report-kpi-card.active { border-color: #709aef; box-shadow: 0 0 0 2px #235be914; }
.workspace-body .report-kpi-card:first-child { color: white; background: radial-gradient(ellipse at top right, #5b8fff 0, transparent 60%), linear-gradient(125deg, #123685, #2158e4); border-color: transparent; }
.workspace-body .report-kpi-card:first-child :is(.report-kpi-label, .report-kpi-meta, .report-kpi-action) { color: #e2ebff; }
.workspace-body .report-kpi-card:first-child .report-kpi-value { color: white; }
.workspace-body .report-kpi-card:first-child .stat-icon { color: #fff; background: #ffffff20; }
.workspace-body .report-kpi-card.profit { background: #edf8f4; border-color: #d9eee5; color: #146e57; }
.workspace-body .report-kpi-card.profit.negative { background: #fff0f2; border-color: #f3dce1; color: var(--error-text); }
.workspace-body .report-kpi-label { color: var(--text-secondary); font-size: 12px; font-weight: 550; line-height: 1.5; }
.workspace-body .report-kpi-value { color: var(--text-primary); font-size: clamp(25px, 2.7vw, 34px); font-weight: 650; letter-spacing: -.055em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.workspace-body .report-kpi-meta { font-size: 11px; line-height: 1.5; }
.workspace-body .report-kpi-action { font-size: 11px; color: var(--btn-primary-bg); }
.workspace-body .report-panel { padding: 22px; }
.workspace-body .report-panel-title { color: var(--text-primary); font-size: 16px; font-weight: 650; }
.workspace-body :is(.report-breakdown, .report-custom-range) { padding: 20px; }
.workspace-body .report-breakdown-head button { width: 44px; height: 44px; }
.workspace-body .report-profit-breakdown { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .42fr); gap: 24px; }
.workspace-body .report-profit-ledger { min-width: 0; margin: 0; }
.workspace-body .report-profit-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.workspace-body .report-profit-line:first-child { padding-top: 0; }
.workspace-body .report-profit-line:last-child { border-bottom: 0; padding-bottom: 0; }
.workspace-body .report-profit-line dt { min-width: 0; color: var(--text-secondary); font-size: 13px; }
.workspace-body .report-profit-line dt small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; }
.workspace-body .report-profit-line dd { margin: 0; color: var(--text-primary); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workspace-body .report-profit-line.income dt { color: var(--text-primary); font-weight: 600; }
.workspace-body .report-profit-line.income dt small { font-weight: 400; }
.workspace-body .report-profit-result { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 12px; color: var(--text-primary); background: var(--surface-0); }
.workspace-body .report-profit-result > span:first-child { color: var(--text-secondary); font-size: 12px; }
.workspace-body .report-profit-result > strong { max-width: 100%; margin-top: 6px; font-size: clamp(24px, 2.5vw, 32px); font-weight: 650; line-height: 1.2; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.workspace-body .report-profit-margin { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; }
.workspace-body .report-profit-margin b { font-weight: 600; }
.workspace-body .report-profit-result p { margin: 12px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.workspace-body .report-profit-result.positive { color: var(--teal-text); border-color: #d4eae0; background: var(--teal-bg); }
.workspace-body .report-profit-result.negative { color: var(--error-text); border-color: #f3dce1; background: #fff0f2; }
.workspace-body :is(.report-master-table, .report-material-table) { font-size: 13px; }
.workspace-body .report-inline-bar { background: #edf2fb; }
.workspace-body .report-inline-bar i { background: #457beb; }

/* Каталоги, списки и склад */
.workspace-body .employee-table { min-width: 0; overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 14px; }
.workspace-body :is(.film-catalog-list, .consumable-list, .film-roll-list) { background: white; border: 1px solid var(--border); border-radius: 14px; }
.workspace-body :is(.film-catalog-header, .consumable-header) { background: var(--surface-0); color: var(--text-secondary); font-size: 11px; }
.workspace-body :is(.film-catalog-header, .film-catalog-list .film-catalog-row) { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 88px 112px 96px; gap: 10px; padding: 12px 14px; }
.workspace-body .film-catalog-list .staff-name { font-size: 14px; font-weight: 600; }
.workspace-body .film-catalog-list .staff-phone { font-size: 12px; line-height: 1.45; white-space: normal; }
.workspace-body .film-catalog-row .staff-info { grid-column: auto; }
.workspace-body .film-catalog-cell::before { content: none; }
.workspace-body .film-catalog-actions { grid-column: auto; }
.workspace-body .film-roll-row { padding: 16px; }
.film-sort-control { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; min-width: 0; max-width: 100%; }
.film-sort-select { flex: 1; min-width: 0; width: 100%; min-height: 44px; padding: 0 12px; color: var(--text-primary); background: white; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 14px; cursor: pointer; }
.film-column-filters { flex-basis: 100%; min-width: 0; border-top: 1px solid var(--border); }
.film-column-filters > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: var(--text-secondary); font-size: 12px; font-weight: 550; cursor: pointer; list-style: none; }
.film-column-filters > summary::-webkit-details-marker { display: none; }
.film-column-filters[open] > summary > span { transform: rotate(180deg); }
.film-range-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-block: 4px 12px; }
.film-range-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.film-range-field legend { margin-bottom: 8px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.film-range-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.film-range-inputs input { min-width: 0; width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text-primary); background: white; font-size: 14px; }
.film-range-inputs input[aria-invalid] { border-color: var(--error-text); }
.film-filter-status { display: flex; align-items: center; justify-content: space-between; flex: 1 0 100%; gap: 12px; min-height: 32px; color: var(--text-secondary); font-size: 12px; }
.film-filter-reset { min-height: 44px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--btn-primary-bg); background: white; font: inherit; font-weight: 600; cursor: pointer; }
.film-column-sort { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 36px; padding: 0; border: 0; color: var(--text-secondary); background: transparent; font: inherit; font-weight: 600; cursor: pointer; }
.film-column-sort:first-child { justify-content: flex-start; }
.film-column-sort:hover { color: var(--btn-primary-bg); }
.film-column-sort span { font-size: 13px; color: var(--btn-primary-bg); }
.workspace-body .consumable-summary { padding: 22px; border: 1px solid var(--border); box-shadow: var(--card-shadow); }
.workspace-body .consumable-summary-total strong { font-size: 30px; font-weight: 650; letter-spacing: -.045em; }
.workspace-body .consumable-row-new { background: var(--surface-0); }
.workspace-body :is(.consumable-cell input, .consumable-cell select, .consumable-search input, .consumable-select) { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 9px; background: white; font-family: inherit; }
.workspace-body .consumable-actions button { min-height: 44px; }
.workspace-body :is(.employee-table-head, .employee-table-row) { min-width: 0; grid-template-columns: minmax(0, 1.1fr) minmax(0, .75fr) minmax(0, .95fr) minmax(0, 1.4fr) 82px 44px; column-gap: 12px; padding: 12px 18px; }
.workspace-body .employee-table-head { background: var(--surface-0); color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.workspace-body .employee-table-row { min-height: 68px; background: white; font-size: 13px; }
.workspace-body :is(.employee-table-head, .employee-table-row) > * { min-width: 0; }
.workspace-body .employee-table-row > div { overflow-wrap: anywhere; }
.workspace-body .employee-table-row > div > .badge { justify-self: start; }
.workspace-body .employee-name-cell strong { white-space: normal; overflow-wrap: anywhere; }
.workspace-body .employee-account { white-space: normal; overflow-wrap: anywhere; }
.workspace-body .employee-table-footer { min-width: 0; padding: 14px 18px; background: var(--surface-0); }
.workspace-body .employee-edit-button { border: 1px solid #dce6fa; background: var(--brand-soft); color: var(--btn-primary-bg); }
.workspace-body .employee-edit-button:hover { border-color: #a9bfee; background: #e0ebff; }
.workspace-body .employee-edit-button .ui-icon { width: 18px; height: 18px; }
.workspace-body .employee-table-row:hover { background: #fafcff; }
.workspace-body .warehouse-csv-panel { background: white; border: 1px solid var(--border); border-radius: 12px; }
.workspace-body .warehouse-csv-panel > summary { min-height: 48px; font-size: 12px; }
.workspace-body :is(.roll-code, .roll-name) { font-weight: 650; color: var(--text-primary); }
.workspace-body :is(.stock-low, .film-low-warning) { color: var(--error-text); }

/* Планировщик: только оформление, без изменения высот слотов и координат работ */
.workspace-body .planner-page > .list-header { margin-bottom: 16px; }
.workspace-body .planner-toolbar { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: white; gap: 12px; }
.workspace-body .planner-mode-toggle { padding: 4px; gap: 4px; border-radius: 10px; background: var(--surface-1); }
.workspace-body .planner-mode-toggle button { border: 0; border-radius: 8px; box-shadow: none; font-size: 12px; }
.workspace-body .planner-mode-toggle button.active { color: #fff; background: var(--btn-primary-bg); box-shadow: 0 2px 6px rgb(35 91 233 / 24%); }
.workspace-body :is(.planner-day-card, .planner-week-col) { border: 1px solid var(--border); border-radius: 12px; background: white; box-shadow: var(--card-shadow); }
.workspace-body :is(.day-timeline-card, .planner-week-card) { border-radius: 8px; box-shadow: 0 2px 5px #233f6510; }
.workspace-body .planner-lane-tabs button { min-height: 44px; border-radius: 9px; }
.workspace-body .planner-range-label { font-weight: 650; color: var(--text-primary); }
.workspace-body .planner-range-date-input {
  min-height: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 550;
  cursor: pointer;
}
.workspace-body .planner-range-date-input:focus { border-color: #709aef; box-shadow: 0 0 0 3px #235be910; outline: none; }
.workspace-body .planner-week-col-add-btn { width: 32px; height: 32px; font-size: 17px; }
input[type='date'], input[type='time'], input[type='datetime-local'] { cursor: pointer; }
input[type='date']::-webkit-calendar-picker-indicator,
input[type='time']::-webkit-calendar-picker-indicator,
input[type='datetime-local']::-webkit-calendar-picker-indicator { cursor: pointer; }

/* Приём авто, карточка заказа и помощник */
.workspace-body .intake-card.form-card { padding: 0; border-radius: 18px; }
.workspace-body .intake-header { background: linear-gradient(125deg, white, #f0f5ff); }
.workspace-body .intake-eyebrow { color: var(--btn-primary-bg); }
.workspace-body :is(.order-item-header, .order-summary-card) { background: white; }
.workspace-body :is(.order-item-actions, .order-item-reschedule) { border-color: var(--border); }
.workspace-body .order-summary-client a { color: var(--btn-primary-bg); font-weight: 550; text-decoration: none; }
.workspace-body .order-summary-client a:hover { text-decoration: underline; }
.workspace-body .order-work-location { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.workspace-body .order-work-location .field { flex: 0 1 260px; min-width: 0; margin-bottom: 0; }
.workspace-body .order-work-location select { width: 100%; }
.workspace-body .order-work-location button { width: auto; flex: 0 1 auto; }
.workspace-body .order-work-section { margin-top: 22px; }
.workspace-body .order-work-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: white; box-shadow: var(--card-shadow); }
.workspace-body .order-work-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 22px; background: var(--surface-0); border-bottom: 1px solid var(--border); }
.workspace-body .order-work-heading h2 { margin: 0; font-size: 17px; }
.workspace-body .order-work-item { padding: 22px; }
.workspace-body .order-work-item.separated { border-bottom: 1px solid var(--border); }
.workspace-body .order-work-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.workspace-body .order-work-title { flex: 1 1 280px; min-width: 0; margin: 0; color: var(--text-primary); font-size: 16px; font-weight: 650; line-height: 1.45; }
.workspace-body .order-work-details { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); font-size: 13px; }
.workspace-body .order-work-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.workspace-body .order-work-metrics > div { min-width: 0; overflow-wrap: anywhere; }
.workspace-body .order-work-metrics span { display: block; font-size: 11px; }
.workspace-body .order-work-metrics span:first-child { margin-bottom: 5px; }
.workspace-body .order-work-metrics strong { color: var(--text-primary); font-size: 13px; font-weight: 600; }
.workspace-body .order-work-materials { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.workspace-body .order-work-material-row { margin-block: 7px; line-height: 1.6; }
.workspace-body .order-payroll { margin-top: 16px; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: white; }
.workspace-body .order-payroll-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--surface-0); border-bottom: 1px solid var(--border); }
.workspace-body .order-payroll-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace-body .order-payroll-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 8px; color: var(--btn-primary-bg); background: var(--brand-soft); }
.workspace-body .order-payroll-icon .ui-icon { width: 18px; height: 18px; }
.workspace-body .order-payroll-heading h3 { margin: 0; color: var(--text-primary); font-size: 14px; font-weight: 600; line-height: 1.4; }
.workspace-body .order-payroll-total { display: grid; flex-shrink: 0; gap: 3px; text-align: right; }
.workspace-body .order-payroll-total > span { color: var(--text-secondary); font-size: 11px; }
.workspace-body .order-payroll-total-value { color: var(--text-primary); font-size: 20px; font-weight: 650; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.workspace-body .order-payroll-total small { color: var(--text-muted); font-size: 10px; }
.workspace-body .order-payroll-progress { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--text-secondary); font-size: 11px; }
.workspace-body .order-payroll-progress.incomplete { color: var(--accent-text); }
.workspace-body .order-payroll-progress .ui-icon { width: 13px; height: 13px; color: var(--teal-text); }
.workspace-body .order-payroll-progress.incomplete .ui-icon { color: var(--accent-text); }
.workspace-body .order-payroll-list { display: block; }
.workspace-body .order-payroll-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 206px; align-items: center; gap: 10px 12px; min-width: 0; min-height: 56px; padding: 6px 16px; border-bottom: 1px solid var(--border); background: white; }
.workspace-body .order-payroll-row.is-editing { padding-block: 12px; background: var(--surface-0); }
.workspace-body .order-payroll-worker { display: flex; align-items: center; gap: 10px; min-width: 0; }
.workspace-body .order-payroll-avatar { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; color: #315b9e; background: var(--brand-soft); font-size: 12px; font-weight: 600; }
.workspace-body .order-payroll-worker > div { min-width: 0; }
.workspace-body .order-payroll-worker strong { display: block; color: var(--text-primary); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.workspace-body .order-payroll-saved, .workspace-body .order-payroll-dirty { font-size: 11px; line-height: 1.5; }
.workspace-body .order-payroll-saved { color: var(--text-secondary); }
.workspace-body .order-payroll-dirty { color: var(--accent-text); }
.workspace-body .order-payroll-read { display: grid; grid-template-columns: 120px 150px 44px; grid-column: 2 / -1; align-items: center; gap: 12px; min-width: 0; }
.workspace-body .order-payroll-value { color: var(--text-primary); font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.workspace-body .order-payroll-edit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; justify-self: end; min-width: 110px; padding-inline: 12px; font-size: 12px; }
.workspace-body .order-payroll-edit .ui-icon { width: 16px; height: 16px; }
.workspace-body .order-payroll-edit:disabled, .workspace-body .order-payroll-add:disabled, .workspace-body .order-payroll-detach:disabled { opacity: .45; cursor: default; }
.workspace-body .order-payroll-detach { display: grid; place-items: center; min-width: 44px; width: 44px; height: 44px; padding: 0; color: var(--text-secondary); }
.workspace-body .order-payroll-detach .ui-icon { width: 16px; height: 16px; }
.workspace-body .order-payroll-detach:hover { color: var(--error-text); border-color: var(--error-text); }
.workspace-body .order-payroll-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; grid-column: 2 / -1; align-items: center; gap: 8px; min-width: 0; }
.workspace-body .order-payroll-amount { position: relative; min-width: 0; }
.workspace-body .order-payroll-amount input { width: 100%; min-width: 0; height: 44px; padding: 0 28px 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: white; color: var(--text-primary); font-size: 15px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; appearance: textfield; }
.workspace-body .order-payroll-amount input::-webkit-inner-spin-button, .workspace-body .order-payroll-amount input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.workspace-body .order-payroll-amount input:focus { outline: 2px solid #90b3ff; outline-offset: 1px; }
.workspace-body .order-payroll-amount > span { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--text-secondary); font-size: 13px; pointer-events: none; }
.workspace-body .order-payroll-save { flex: 0 0 auto; padding-inline: 12px; font-size: 12px; }
.workspace-body .order-payroll-save .ui-icon { width: 16px; height: 16px; }
.workspace-body .order-payroll-cancel { display: grid; place-items: center; width: 44px; padding: 0; }
.workspace-body .order-payroll-cancel .ui-icon { width: 16px; height: 16px; }
.workspace-body .order-payroll-remove { grid-column: 1 / -1; justify-self: end; width: auto; padding: 0 4px; border: 0; background: transparent; color: var(--text-muted); font-size: 11px; }
.workspace-body .order-payroll-remove:hover { color: var(--error-text); background: transparent; }
.workspace-body .order-payroll-add { display: inline-flex; align-items: center; gap: 7px; width: auto; margin: 4px 16px 8px; padding: 0; border: 0; background: transparent; color: var(--btn-primary-bg); font-size: 12px; }
.workspace-body .order-payroll-add:hover { background: transparent; color: #1847be; }
.workspace-body .order-payroll-add .ui-icon { width: 17px; height: 17px; }
.workspace-body .order-payroll-add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 12px 16px; }
.workspace-body .order-payroll-add-form select { min-width: 0; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: white; color: var(--text-primary); font-size: 14px; }
.workspace-body .order-payroll-empty { margin: 0; padding: 16px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.workspace-body .order-payroll-no-candidates { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
.workspace-body .order-payroll-no-candidates p { flex: 1 1 200px; margin: 0; color: var(--text-secondary); font-size: 12px; }
.workspace-body .order-payroll .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Экран входа */
.auth-body { min-height: 100dvh; margin: 0; padding: 32px 20px; background: radial-gradient(ellipse at 20% 15%, #e3edff 0, transparent 50%), radial-gradient(ellipse at 85% 85%, #e7efff 0, transparent 45%), #f6f8fc; }
.auth-body .auth-wrap { max-width: 410px; }
.auth-brand { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 48px; color: var(--text-primary); text-decoration: none; font-size: 26px; font-weight: 700; letter-spacing: -.04em; }
.auth-brand .brand-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 13px; font-size: 30px; }
.auth-brand small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 11px; font-weight: 450; letter-spacing: 0; }
.auth-body .auth-title { margin: 0 0 8px; font-size: 26px; font-weight: 650; letter-spacing: -.04em; }
.auth-description { margin: 0 0 28px; text-align: center; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.auth-body .form-card { padding: 30px; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--card-shadow-hover); }
.auth-body .field { margin-bottom: 22px; }
.auth-body .field label { color: var(--text-secondary); font-size: 12px; font-weight: 550; }
.auth-body .field input { height: 48px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 16px; }
.auth-body .field input:focus { border-color: #709aef; box-shadow: 0 0 0 3px #235be910; }
.auth-body .toggle-row { min-height: 44px; margin-bottom: 18px; }
.auth-body .toggle-row input { width: 17px; height: 17px; }
.auth-body .btn-primary { height: 48px; }
/* Та же тёмная шапка на экране входа: вне потока, поэтому вертикальное центрирование формы
   (flex в guest.blade.php) не меняется — только верхний отступ под высоту шапки. */
.auth-body { padding-top: calc(var(--header-height) + 32px); }
.auth-header { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: center; height: var(--header-height); padding: 0 20px; background: var(--header-bg-solid); background-image: var(--header-bg); }
.auth-header-title { color: var(--header-text); font-size: 13px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }

/* Этап A — единый акцент переключателей: активный сегмент/вкладка — сплошной синий с белым
   текстом, как «Flat Pricing» и «PPF / Vinyl» в референсе. Меняется только цвет активного
   состояния; размеры и Alpine/Livewire-привязки классов не трогаются. */
.workspace-body :is(.planner-lane-tabs button.active, .role-toggle button.active, .client-type-filter button.active, .client-kind-toggle button.active, .finish-roll-width-options label.active) { color: #fff; background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); box-shadow: 0 2px 6px rgb(35 91 233 / 24%); }
/* Заголовки таблиц — короткие подписи капителью, как «ENTIRE VEHICLE» в референсе. */
.workspace-body :is(.film-catalog-header, .consumable-header, .employee-table-head, .roll-inventory .film-roll-table-head) { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
/* Иконки единого набора вместо эмодзи: раньше размер задавал font-size глифа, теперь он явный.
   Пустые состояния — линейная иконка в мягком синем круге, как иконки категорий в референсе. */
.workspace-body :is(.stat-icon, .search-icon, .consumable-search span, .client-vehicle-icon) .ui-icon { width: 18px; height: 18px; }
.workspace-body .client-vehicle-icon { color: var(--text-secondary); }
.workspace-body :is(.client-list-empty, .employee-empty) > span { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px; border-radius: 50%; color: var(--btn-primary-bg); background: var(--brand-soft); }
.workspace-body :is(.client-list-empty, .employee-empty) > span .ui-icon { width: 24px; height: 24px; }

@media (min-width: 1024px) {
  .workspace-body { margin-left: var(--sidebar-width); }
  .workspace-body .sidebar { width: var(--sidebar-width); }
  .workspace-body .order-summary-card { padding: 20px 24px; }
  .workspace-body .order-summary-card .client-phone { font-size: 21px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .workspace-body { margin-left: 76px; padding-inline: 24px; }
  .workspace-body .sidebar { width: 76px; padding: 0 10px 14px; }
  .workspace-body .sidebar-brand { justify-content: center; margin: 0 -11px 18px -10px; padding: 0; }
  .sidebar-nav-heading { display: none; }
  .workspace-body .sidebar-nav-item { padding: 12px; }
  .workspace-body .sidebar-footer { padding-inline: 0; }
  .workspace-body .sidebar-logout { padding: 10px; }
  .workspace-body .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .employee-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .employee-toolbar .search-input-wrap { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  .app-profile-copy { display: none; }
  .workspace-body .report-kpi-card { padding: 20px; }
  .workspace-body :is(.client-card, .form-card, .mini-card) { padding: 20px; }
  .workspace-body .intake-card.form-card { padding: 0; }
}

/* После вычета боковой панели широкие таблицы становятся карточками раньше,
   чем на телефоне: название и поля должны оставаться читаемыми. */
@media (max-width: 1399px) {
  .workspace-body .consumable-header { display: none; }
  .workspace-body .consumable-list .consumable-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; padding: 20px; }
  .workspace-body .consumable-cell.name-cell { grid-column: 1 / -1; }
  .workspace-body .consumable-cell::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 11px; font-weight: 600; }
  .workspace-body .consumable-qty { flex-wrap: wrap; }
  .workspace-body .consumable-qty::before { flex: 0 0 100%; }
  .workspace-body .consumable-qty input { flex: 1 1 64px; width: 0; min-width: 64px; }
  .workspace-body .consumable-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .workspace-body .film-roll-row { grid-template-columns: minmax(150px, 1fr) 70px minmax(160px, auto) 88px; }
  .workspace-body .film-roll-actions { grid-column: 1 / -1; }
  .workspace-body .film-roll-barcode-editor { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .film-roll-barcode-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .film-roll-barcode-controls input { grid-column: 1 / -1; }
  .workspace-body .film-roll-correction-fields { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); }
  .workspace-body .film-roll-correction-fields .comment { grid-column: 1 / -1; }
}

@media (max-width: 1023px) {
  .workspace-body .film-catalog-list .film-catalog-header { display: none; }
  .workspace-body .film-catalog-list .film-catalog-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; gap: 10px 8px; padding: 12px; }
  .workspace-body .film-catalog-row .staff-info { grid-column: 1 / 3; }
  .workspace-body .film-catalog-actions { grid-column: 3; grid-row: 1; align-self: start; }
  .workspace-body .film-catalog-cell { text-align: left; }
  .workspace-body .film-catalog-cell::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--text-secondary); font-size: 11px; font-weight: 500; }
}

@media (max-width: 1200px) {
  .workspace-body .employee-table { border: 0; border-radius: 0; background: transparent; overflow: visible; }
  .workspace-body .employee-table-head { display: none; }
  .workspace-body .employee-table-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px 12px; margin-bottom: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; font-size: 13px; }
  .workspace-body .employee-table-row > div { display: grid; grid-template-columns: 95px minmax(0, 1fr); grid-column: 1 / -1; min-width: 0; gap: 8px; }
  .workspace-body .employee-table-row > div::before { content: attr(data-label); color: var(--text-muted); font-size: 11px; }
  .workspace-body .employee-edit-button { grid-column: 2; grid-row: 1; background: var(--brand-soft); color: var(--btn-primary-bg); }
  .workspace-body .employee-table-row > .employee-name-cell { display: block; grid-column: 1; align-self: center; }
  .workspace-body .employee-name-cell::before { display: none; }
  .workspace-body .employee-name-cell strong { white-space: normal; font-size: 15px; }
  .workspace-body .employee-account { overflow-wrap: anywhere; white-space: normal; }
  .workspace-body .employee-table-footer { padding: 4px 2px; background: transparent; }
}

@media (max-width: 767px) {
  .workspace-body .film-roll-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .workspace-body .film-roll-main { grid-column: auto; }
  .workspace-body .film-roll-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .film-roll-action { width: 100%; min-height: 44px; font-size: 11px; }
  .workspace-body .film-roll-correction-fields { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .film-roll-correction-formula { display: none; }
  .workspace-body .film-roll-metric { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .workspace-body .film-roll-metric strong { text-align: right; }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 80px; }
  .film-range-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .film-range-inputs input { font-size: 16px; }
  .workspace-body { margin-left: 0; padding: 0 16px calc(100px + env(safe-area-inset-bottom)); overflow-x: clip; }
  .workspace-body .wrap { gap: 20px; }
  .workspace-body .sidebar { display: none; }
  .workspace-body, .auth-body { --header-height: 58px; }
  .app-toolbar { gap: 8px; }
  .app-date, .app-profile-copy { display: none; }
  .app-header-back { margin-left: -8px; }
  .app-header-title { font-size: 12px; letter-spacing: .07em; }
  .app-mobile-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--header-text); text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: -.045em; }
  .app-mobile-brand .brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 22px; border-radius: 9px; }
  .app-header-start.has-back .app-mobile-brand { display: none; }
  .app-toolbar-right { gap: 6px; }
  .app-toolbar .user-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .app-mobile-logout { display: block; }
  .workspace-body .app-mobile-logout .icon-btn { border: 0; background: transparent; color: var(--header-text-muted); }
  .workspace-body .app-mobile-logout .icon-btn:hover { color: var(--header-text); background: var(--header-control); }
  /* Нижние табы как в референсе: белая панель, серые иконки, у активного — синий цвет и
     синяя полоса снизу вместо подложки. */
  .workspace-body .bottom-tabs { display: flex; align-items: stretch; gap: 4px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: #fff; box-shadow: 0 -4px 20px rgb(22 28 36 / 5%); z-index: 60; }
  .workspace-body .bottom-tab-item { position: relative; min-width: 0; min-height: 56px; gap: 5px; padding: 6px 2px 9px; border: 0; border-radius: 0; color: var(--text-muted); background: transparent; font-family: inherit; font-size: 9.5px; font-weight: 650; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; cursor: pointer; }
  .workspace-body .bottom-tab-item .bottom-tab-icon { width: 22px; height: 22px; }
  .workspace-body .bottom-tab-item.active { color: var(--btn-primary-bg); background: transparent; }
  .workspace-body .bottom-tab-item.active::after { content: ''; position: absolute; left: 16%; right: 16%; bottom: 0; height: 3px; border-radius: 3px; background: var(--btn-primary-bg); }
  .mobile-menu-backdrop { position: fixed; display: block; inset: 0 0 calc(72px + env(safe-area-inset-bottom)); z-index: 61; background: #17284242; backdrop-filter: blur(3px); }
  .mobile-more-menu { position: fixed; bottom: calc(84px + env(safe-area-inset-bottom)); left: 12px; right: 12px; z-index: 62; display: grid; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: white; box-shadow: 0 12px 40px #152c5020; }
  .mobile-menu-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 0 8px 10px; font-size: 15px; }
  .mobile-menu-heading button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--surface-0); color: var(--text-secondary); cursor: pointer; }
  .mobile-menu-link { display: flex; align-items: center; gap: 13px; min-height: 52px; padding: 12px; color: var(--text-primary); text-decoration: none; border-radius: 10px; font-size: 14px; }
  .mobile-menu-link .ui-icon:last-child { margin-left: auto; width: 15px; height: 15px; color: var(--text-muted); }
  .mobile-menu-link.active { color: var(--btn-primary-bg); background: var(--brand-soft); }
  .workspace-body .list-header { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
  .workspace-body .list-header .title { font-size: 25px; }
  .workspace-body :is(.orders-grid, .clients-grid, .cards-grid) { gap: 14px; }
  .workspace-body :is(.client-card, .form-card, .mini-card, .order-list-card, .client-list-card, .job-card) { padding: 18px; }
  .workspace-body .intake-card.form-card { padding: 0; }
  .workspace-body :is(.field input, .field select, .field textarea, .search-input, .filters-row select, .filters-row input, .search-filter-row select) { font-size: 16px; min-width: 0; max-width: 100%; }
  .workspace-body .filters-row > :is(select, input) { flex: 1 1 140px; width: 0; }
  .workspace-body .search-filter-row select { flex: 1 1 140px; width: 0; }
  .workspace-body .field-row { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .employee-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .employee-toolbar .search-input-wrap { grid-column: 1 / -1; }
  .workspace-body .field { min-width: 0; }
  .workspace-body .order-work-heading { padding: 16px; }
  .workspace-body .order-work-item { padding: 16px; }
  .workspace-body .order-work-details { padding: 14px; }
  .workspace-body .order-work-metrics { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .workspace-body .order-payroll-header { gap: 10px; padding: 12px; }
  .workspace-body .order-payroll-icon { display: none; }
  .workspace-body .order-payroll-heading h3 { font-size: 13px; }
  .workspace-body .order-payroll-total > span { font-size: 10px; }
  .workspace-body .order-payroll-total-value { font-size: 18px; }
  .workspace-body .order-payroll-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 12px; }
  .workspace-body .order-payroll-worker { gap: 8px; }
  .workspace-body .order-payroll-worker strong { font-size: 13px; }
  .workspace-body .order-payroll-read { display: flex; gap: 8px; grid-column: 2; }
  .workspace-body .order-payroll-value { font-size: 15px; }
  .workspace-body .order-payroll-edit { min-width: 44px; width: 44px; padding: 0; }
  .workspace-body .order-payroll-edit > span { display: none; }
  .workspace-body .order-payroll-controls, .workspace-body .order-payroll-row.is-editing .order-payroll-worker { grid-column: 1 / -1; }
  .workspace-body .order-payroll-amount input, .workspace-body .order-payroll-add-form select { font-size: 16px; }
  .workspace-body .order-payroll-add { margin-inline: 12px; }
  .workspace-body .order-payroll-add-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .order-payroll-add-form select { grid-column: 1 / -1; }
  .workspace-body .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .workspace-body .report-kpi-card { min-height: 185px; padding: 16px; }
  .workspace-body .report-kpi-card:first-child { grid-column: 1 / -1; min-height: 180px; }
  .workspace-body .report-kpi-value { font-size: clamp(23px, 6vw, 30px); }
  .workspace-body .report-kpi-card:first-child .report-kpi-value { font-size: 36px; }
  .workspace-body .report-kpi-label { font-size: 11px; }
  .workspace-body .stat-icon { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
  .workspace-body .report-controls { padding: 16px; }
  .workspace-body .report-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .workspace-body .report-tabs button { width: 100%; min-width: 0; padding: 10px; white-space: normal; font-size: 12px; }
  .workspace-body .report-tabs button:first-child { grid-column: 1 / -1; }
  .workspace-body .report-periods { display: flex; flex-wrap: wrap; }
  .workspace-body .report-periods button { min-height: 44px; font-size: 11px; }
  .workspace-body :is(.report-panel, .report-breakdown) { padding: 18px; }
  .workspace-body .report-profit-breakdown { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .workspace-body .report-profit-result { padding: 16px; }
  .workspace-body .planner-toolbar { padding: 12px; }
  .workspace-body .planner-mode-toggle { max-width: 100%; flex-wrap: wrap; }
  .workspace-body .planner-mode-toggle button { padding-inline: 10px; }
  .workspace-body .modal-overlay { padding: 12px; }
  .workspace-body .modal-card { width: 100%; max-width: 100%; padding: 22px 18px; border-radius: 17px; max-height: calc(100dvh - 24px); }
  .workspace-body .modal-card .form-title { font-size: 20px; }
  .workspace-body :is(.consumable-cell input, .consumable-cell select, .consumable-search input, .consumable-select) { font-size: 16px; }
  .film-sort-select { font-size: 16px; }
  .workspace-body :is(.film-catalog-list, .film-roll-list) { border: 0; background: transparent; border-radius: 0; }
  .workspace-body :is(.film-catalog-row, .film-roll-row) { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
}

@media (max-width: 480px) {
  .workspace-body .employee-toolbar { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .app-mobile-brand-text { display: none; }
}

@media (max-width: 380px) {
  .workspace-body { padding-inline: 12px; }
  .workspace-body .report-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .report-kpi-card { min-height: 155px; }
  .workspace-body .list-header .btn-primary { width: 100%; }
  .workspace-body .bottom-tabs { padding-inline: 6px; gap: 2px; }
  .auth-body .form-card { padding: 24px 20px; }
}

/* Оплата заказа: завершённое состояние, сводка и компактная история. */
.order-payment-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; }
.order-payment-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.order-payment-heading-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--btn-primary-bg); background: var(--brand-soft); }
.workspace-body .order-payment-heading h2 { margin: 0; font-size: 18px; }
.order-payment-heading p { margin: 3px 0 0; font-size: 12px; color: var(--text-secondary); }
.order-payment-invoice { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.order-payment-invoice .switch { flex-shrink: 0; }
.order-payment-success { display: flex; align-items: center; gap: 12px; margin: 0 20px; padding: 16px; border: 1px solid #c6e7da; border-radius: 12px; background: var(--teal-bg); color: var(--teal-text); }
.order-payment-success-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; background: white; }
.order-payment-success strong { display: block; font-size: 17px; font-weight: 650; }
.order-payment-success p { margin: 4px 0 0; font-size: 12px; }
.order-payment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px; }
.order-payment-metric { min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-0); }
.order-payment-metric > span { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 12px; }
.order-payment-metric > strong { display: block; font-size: clamp(20px, 2vw, 26px); font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.order-payment-metric small { color: var(--text-muted); font-size: 11px; }
.order-payment-balance > strong { color: var(--coral-text); }
.order-payment-balance.is-settled > strong { color: var(--teal-text); }
.order-payment-breakdown { display: grid; gap: 6px; margin: -4px 20px 16px; padding: 0 2px; font-size: 12px; color: var(--text-secondary); }
.order-payment-breakdown > div { display: flex; justify-content: space-between; gap: 16px; }
.order-payment-breakdown > div > span:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.order-payment-discount { margin: 0 20px 16px; padding: 12px 14px 14px; border: 1px solid #90b3ff; border-radius: 12px; background: var(--brand-soft); }
.order-payment-discount-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.order-payment-discount-head strong { font-size: 14px; }
.order-payment-discount-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.order-payment-discount-close .ui-icon { width: 18px; height: 18px; }
.order-payment-metric-actions { display: flex; flex-wrap: wrap; gap: 0 16px; }
.order-payment-discount-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.order-payment-discount-toggle .ui-icon { width: 16px; height: 16px; }
.order-payment-discount-arrow { margin-left: 8px; transform: rotate(90deg); transition: transform .15s; }
.order-payment-discount-arrow.is-open { transform: rotate(-90deg); }
.order-payment-discount .discount-panel-rows > div:last-child { flex-wrap: wrap; }
.order-payment-discount input { min-width: 0; flex-basis: 120px !important; }
.order-payment-discount .discount-panel-rows button, .order-payment-discount input { min-height: 44px; }
.order-payment-history { padding: 0 20px 20px; }
.order-payment-history-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.order-payment-history-heading h3 { margin: 0; font-size: 13px; font-weight: 600; }
.order-payment-history-heading > span { display: grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 4px; border-radius: 6px; background: var(--surface-1); color: var(--text-secondary); font-size: 11px; }
.order-payment-list { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.order-payment-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border-top: 1px solid var(--border); }
.order-payment-row:first-child { border-top: 0; }
.order-payment-record-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-1); color: var(--text-secondary); }
.order-payment-record-icon .ui-icon { width: 18px; height: 18px; }
.order-payment-record { min-width: 0; }
.order-payment-record-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 13px; }
.order-payment-record-title strong { font-weight: 600; }
.order-payment-record-amount { color: var(--teal-text); font-variant-numeric: tabular-nums; }
.order-payment-record-meta { margin: 5px 0 0; color: var(--text-secondary); font-size: 11px; overflow-wrap: anywhere; }
.order-payment-cancelled-label { border-radius: 5px; padding: 2px 6px; color: var(--text-secondary); background: var(--surface-1); font-size: 10px; }
.order-payment-row.is-cancelled .order-payment-record-amount { color: var(--text-secondary); text-decoration: line-through; }
.order-payment-record-actions { display: flex; gap: 6px; }
.workspace-body .order-payment-record-actions .btn-secondary { flex: 0 0 auto; min-height: 44px; padding: 8px 10px; font-size: 11px; border-radius: 8px; }
.order-payment-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: 12px; background: var(--surface-0); }
.order-payment-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface-0); }
.order-payment-footer.is-settled { background: white; }
.order-payment-footer-status { display: flex; align-items: center; gap: 7px; color: var(--teal-text); font-size: 12px; }
.order-payment-footer-status .ui-icon { width: 16px; height: 16px; }
.workspace-body .order-payment-footer .order-payment-extra { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; font-size: 12px; border-radius: 9px; }
.workspace-body .order-payment-footer .order-payment-accept { flex: 1; width: 100%; min-height: 46px; }
@media (max-width: 900px) {
  .order-payment-row { grid-template-columns: 32px minmax(0, 1fr); }
  .order-payment-record-actions { grid-column: 2; flex-wrap: wrap; }
}
@media (max-width: 580px) {
  .order-payment-header { padding: 16px; gap: 8px; }
  .order-payment-invoice { margin-left: auto; }
  .order-payment-success { margin-inline: 16px; padding: 12px; align-items: flex-start; }
  .order-payment-success strong { font-size: 15px; }
  .order-payment-success p { font-size: 11px; }
  .order-payment-summary { padding: 16px; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-payment-metric { padding: 12px; }
  .order-payment-metric > span { font-size: 11px; }
  .order-payment-metric > strong { font-size: 22px; }
  .order-payment-balance { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .order-payment-balance > span { margin: 0; }
  .order-payment-breakdown { margin-inline: 16px; }
  .order-payment-discount { margin-inline: 16px; }
  .order-payment-history { padding: 0 16px 16px; }
  .order-payment-row { gap: 8px; padding: 12px; }
  .order-payment-record-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .order-payment-footer { padding: 12px 16px; }
  .workspace-body .order-payment-footer .order-payment-extra { width: 100%; }
}

.ppf-checklist { margin-top: 18px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); color: var(--text-primary); }
.ppf-checklist-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ppf-checklist-header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.ppf-checklist-header p, .ppf-checklist-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.ppf-checklist-progress { flex-shrink: 0; padding: 7px 10px; border-radius: 8px; background: var(--accent-bg); color: var(--accent-text); font-size: 12px; font-weight: 600; }
.ppf-wash-block { padding: 14px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.ppf-wash-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ppf-wash-caption { font-size: 10px; color: var(--text-secondary); }
.ppf-wash-header h4 { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.ppf-wash-count { font-size: 11px; color: var(--text-secondary); }
.ppf-wash-names { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.ppf-wash-names span { color: var(--text-primary); font-weight: 600; }
.ppf-wash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ppf-wash-mark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.ppf-wash-mark input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.ppf-wash-mark.is-marked { color: var(--teal-text); border-color: var(--teal-text); background: var(--teal-bg); }
.ppf-worker-wash { display: block; margin: 6px 0; color: var(--teal-text); font-size: 11px; }
.ppf-checklist-empty { padding: 14px; border-radius: 10px; background: var(--surface-1); font-size: 13px; color: var(--text-secondary); }
.ppf-checklist-empty p { margin: 0 0 10px; }
.ppf-checklist-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ppf-checklist-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; }
.ppf-checklist-row + .ppf-checklist-row { border-top: 1px solid var(--border); }
.ppf-checklist-row.has-marks { background: #f4fbf8; background: color-mix(in srgb, var(--teal-bg) 28%, white); }
.ppf-checklist-detail { min-width: 0; flex: 1; }
.ppf-checklist-detail > strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.ppf-checklist-names { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }
.ppf-checklist-names em { font-style: normal; margin-left: 6px; padding: 2px 6px; border-radius: 5px; color: var(--teal-text); background: var(--teal-bg); white-space: nowrap; }
.ppf-checklist-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; max-width: 60%; }
.ppf-checklist-mark { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; }
.ppf-checklist-mark.is-marked { background: var(--teal-bg); border-color: var(--teal-text); color: var(--teal-text); font-weight: 600; }
.ppf-checklist-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-secondary); background: white; font-size: 18px; cursor: pointer; }
.ppf-checklist button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.ppf-checklist-add-button { margin-top: 12px; width: auto; font-size: 12px; }
.ppf-checklist-picker { margin-top: 12px; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.ppf-checklist .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ppf-checklist-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--surface-1); }
.ppf-checklist-picker-heading > strong { font-size: 13px; }
.ppf-checklist-picker-heading input { width: min(260px, 55%); min-height: 44px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: white; font: inherit; font-size: 12px; }
.ppf-checklist-picker > .field-error { padding: 0 14px; }
.ppf-checklist-picker-scroll { max-height: 440px; overflow: auto; overscroll-behavior: contain; }
.ppf-checklist-picker-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.ppf-checklist-picker-table th { position: sticky; top: 0; z-index: 1; padding: 12px 8px; border-bottom: 1px solid var(--border-strong); background: var(--surface-1); color: var(--text-secondary); font-size: 11px; font-weight: 600; text-align: left; }
.ppf-checklist-picker-table th:nth-child(1) { width: 48px; }
.ppf-checklist-picker-table th:nth-child(2) { width: 39%; }
.ppf-checklist-picker-table th:nth-child(3) { width: 100px; }
.ppf-checklist-picker-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ppf-checklist-picker-table tr:last-child td { border-bottom: 0; }
.ppf-checklist-picker-table tr.is-selected td { background: var(--brand-soft); }
.ppf-picker-check { text-align: center; }
.ppf-picker-check input { width: 20px; height: 20px; margin: 0; vertical-align: middle; cursor: pointer; }
.ppf-picker-name label { display: flex; align-items: center; min-height: 44px; font-size: 12px; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; }
.ppf-picker-quantity select, .ppf-picker-note input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: white; color: var(--text-primary); font: inherit; font-size: 12px; }
.ppf-picker-quantity select:disabled, .ppf-picker-note input:disabled { background: var(--surface-0); border-color: var(--border); color: var(--text-muted); }
.ppf-picker-note input:disabled::placeholder { color: var(--text-muted); }
.ppf-picker-mobile-label { display: none; }
.ppf-picker-no-results { padding: 24px !important; color: var(--text-secondary); text-align: center; font-size: 12px; }
.ppf-checklist-picker-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface-1); }
.ppf-checklist-picker-footer > span { color: var(--text-secondary); font-size: 11px; }
.ppf-checklist-add-actions { display: flex; gap: 8px; }
.ppf-checklist .ppf-checklist-add-actions button { flex: 0 0 auto; width: auto; min-height: 44px; margin: 0; padding: 8px 14px; font-size: 12px; }
.ppf-checklist-add-actions button:disabled { opacity: .5; cursor: default; }
.ppf-checklist-rename { display: flex; flex-wrap: wrap; gap: 6px; }
.ppf-checklist-rename input { min-width: 120px; width: 100%; flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; }
.ppf-checklist-rename .btn-secondary { width: auto; min-height: 44px; font-size: 12px; }
.ppf-checklist-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 18px; }
.ppf-checklist-worker { padding: 12px; min-width: 0; border-radius: 10px; background: var(--surface-1); }
.ppf-checklist-worker > strong { font-size: 13px; }
.ppf-checklist-worker p { margin: 5px 0; font-size: 11px; color: var(--text-secondary); }
.ppf-checklist-worker b { font-size: 14px; color: var(--text-primary); }
.ppf-checklist-worker p > span { margin: 0 4px; }
.ppf-checklist-worker small { display: block; font-size: 10px; line-height: 1.6; color: var(--text-secondary); overflow-wrap: anywhere; }
.jobs-period { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 13px; color: var(--text-secondary); }
.jobs-period select { max-width: 240px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--text-primary); font: inherit; }
@media (max-width: 700px) {
    .ppf-checklist { padding: 14px; }
    .ppf-checklist-header { flex-wrap: wrap; gap: 10px; }
    .ppf-checklist-row { align-items: stretch; flex-direction: column; gap: 8px; padding: 12px; }
    .ppf-checklist-actions { max-width: none; justify-content: flex-start; }
    .ppf-checklist-picker-heading { align-items: stretch; flex-direction: column; }
    .ppf-checklist-picker-heading input { width: 100%; }
    .ppf-checklist-picker-scroll { max-height: 440px; }
    .ppf-checklist-picker-table thead { display: none; }
    .ppf-checklist-picker-table tbody, .ppf-checklist-picker-table tr { display: block; }
    .ppf-checklist-picker-table tr { display: grid; grid-template-columns: 40px 84px minmax(0, 1fr); gap: 6px 8px; padding: 12px 8px; border-bottom: 1px solid var(--border); }
    .ppf-checklist-picker-table tr:last-child { border-bottom: 0; }
    .ppf-checklist-picker-table tr.is-selected { background: var(--brand-soft); }
    .ppf-checklist-picker-table td { display: block; padding: 0; border: 0; }
    .ppf-picker-check { grid-column: 1; grid-row: 1; display: grid !important; place-items: center; min-height: 44px; }
    .ppf-picker-name { grid-column: 2 / -1; }
    .ppf-picker-quantity { grid-column: 2 / -1; display: flex !important; align-items: center; gap: 10px; }
    .ppf-picker-quantity select { flex: 0 0 84px; width: 84px; }
    .ppf-picker-quantity .ppf-picker-mobile-label { margin: 0; min-height: 0; }
    .ppf-picker-note { grid-column: 2 / -1; }
    .ppf-checklist-picker-table tr:not(.is-selected) .ppf-picker-quantity,
    .ppf-checklist-picker-table tr:not(.is-selected) .ppf-picker-note { display: none !important; }
    .ppf-picker-mobile-label { display: block; min-height: 28px; margin-bottom: 4px; color: var(--text-secondary); font-size: 10px; line-height: 1.4; }
    .ppf-picker-no-results { grid-column: 1 / -1; }
    .ppf-checklist-picker-footer { align-items: stretch; flex-direction: column; }
    .ppf-checklist-add-actions { flex-wrap: wrap; }
    .ppf-checklist-summary { grid-template-columns: 1fr; }
    .jobs-period { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .workspace-body :is(button, a, input, select, textarea), .auth-body .btn-primary { transition: none; }
}

@media print {
  .workspace-body { margin: 0; padding: 0; background: white; }
  .sidebar, .bottom-tabs, .app-toolbar, .mobile-more-menu, .mobile-menu-backdrop { display: none !important; }
  .workspace-body::before, .auth-header { display: none !important; }
  .workspace-body .wrap { max-width: none; }
}

/* Список физических рулонов адаптируется к ширине блока, включая страницу с сайдбаром. */
.workspace-body .roll-inventory { container: roll-inventory / inline-size; min-width: 0; }
.workspace-body .roll-inventory .film-rolls-heading { margin-bottom: 14px; }
.workspace-body .roll-inventory .film-rolls-heading h2 { font-size: 18px; font-weight: 700; }
.workspace-body .roll-inventory .film-rolls-heading h2 small { font-size: 12px; }
.workspace-body .roll-inventory .film-roll-list { overflow: hidden; margin: 0; border: 1px solid var(--border); border-radius: 12px; background: white; }
.workspace-body .roll-inventory :is(.film-roll-table-head, .film-roll-row) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 112px 86px 246px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.workspace-body .roll-inventory .film-roll-table-head { color: var(--text-muted); background: var(--surface-0); font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border); }
.workspace-body .roll-inventory .film-roll-table-head span:last-child { text-align: right; }
.workspace-body .roll-inventory .film-roll-row {
  grid-template-areas: 'identity width balance status actions';
  min-height: 78px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  background: white;
}
.workspace-body .roll-inventory .film-roll-row:last-child { border-bottom: 0; }
.workspace-body .roll-inventory .film-roll-row:hover { background: var(--surface-0); }
.workspace-body .roll-inventory .film-roll-row:target { background: var(--teal-bg); box-shadow: inset 3px 0 0 var(--teal-text); }
.workspace-body .roll-inventory .film-roll-identity { grid-area: identity; min-width: 0; }
.workspace-body .roll-inventory .film-roll-main { min-width: 0; }
.workspace-body .roll-inventory .film-roll-main strong { color: var(--btn-primary-bg); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.workspace-body .roll-inventory .film-roll-main:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.workspace-body .roll-inventory .film-roll-main .film-roll-received { margin-top: 2px; font-size: 11px; line-height: 1.4; }
.workspace-body .roll-inventory .film-roll-barcode-cell { min-width: 0; margin-top: 3px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.workspace-body .roll-inventory .film-roll-barcode-value { color: var(--text-primary); font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.workspace-body .roll-inventory .film-roll-barcode-empty { color: var(--text-muted); font-size: 12px; }
.workspace-body .roll-inventory .film-roll-width-cell { grid-area: width; display: block; }
.workspace-body .roll-inventory .film-roll-balance-cell { grid-area: balance; display: block; }
.workspace-body .roll-inventory .film-roll-metric strong { text-align: left; font-size: 14px; white-space: nowrap; }
.workspace-body .roll-inventory .film-roll-metric > span,
.workspace-body .roll-inventory .film-roll-cell-label { display: none; }
.workspace-body .roll-inventory .film-roll-width { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; font-weight: 550; }
.workspace-body .roll-inventory .film-roll-sub { display: block; margin: 3px 0 0; font-size: 11px; font-weight: 400; }
.workspace-body .roll-inventory .film-roll-status { grid-area: status; justify-content: flex-start; }
.workspace-body .roll-inventory .film-roll-status .badge { padding: 5px 9px; border-radius: 7px; font-size: 11px; white-space: nowrap; }
.workspace-body .roll-inventory .film-roll-actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.workspace-body .roll-inventory .film-roll-action { width: auto; min-height: 36px; height: auto; padding: 7px 10px; font-size: 11px; font-weight: 600; border: 1px solid var(--border-strong); border-radius: 8px; background: white; }
.workspace-body .roll-inventory .film-roll-inventory-action { color: var(--btn-primary-bg); background: var(--brand-soft); border-color: #dbe6ff; }
.workspace-body .roll-inventory .film-roll-action:hover { border-color: #8eaffb; background: #eaf1ff; }
.workspace-body .roll-inventory .film-roll-action.active { color: var(--teal-text); background: var(--teal-bg); border-color: var(--teal-text); }
.workspace-body .roll-inventory :is(.film-roll-correction, .film-roll-barcode-editor) { grid-column: 1 / -1; min-width: 0; }
.workspace-body .roll-inventory .film-roll-archive { border-top: 1px solid var(--border); }
.workspace-body .roll-inventory .film-roll-archive summary { padding: 12px 14px; color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; background: var(--surface-0); }
.workspace-body .roll-inventory .film-roll-archive summary span { margin-left: 6px; font-variant-numeric: tabular-nums; }
.workspace-body .roll-inventory .film-roll-archive summary:hover { color: var(--btn-primary-bg); }
.workspace-body .roll-inventory .film-roll-archive[open] summary { border-bottom: 1px solid var(--border); }

@media (max-width: 1300px) {
  .workspace-body .roll-inventory .film-roll-barcode-editor { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-barcode-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-body .roll-inventory .film-roll-barcode-controls input { grid-column: 1 / -1; min-width: 0; }
  .workspace-body .roll-inventory .film-roll-correction-fields { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-correction-fields .comment { grid-column: 1 / -1; }
}

@container roll-inventory (max-width: 999px) {
  .workspace-body .roll-inventory .film-roll-barcode-editor { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-barcode-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workspace-body .roll-inventory .film-roll-barcode-controls input { grid-column: 1 / -1; min-width: 0; }
  .workspace-body .roll-inventory .film-roll-correction-fields { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-correction-fields .comment { grid-column: 1 / -1; }
}

@media (max-width: 1023px) {
  .workspace-body .roll-inventory .film-roll-table-head { display: none; }
  .workspace-body .roll-inventory .film-roll-row {
    grid-template-columns: minmax(0, 1fr) 56px 112px;
    grid-template-areas: 'identity width balance' 'actions actions status';
    gap: 8px 10px;
  }
  .workspace-body .roll-inventory .film-roll-metric > span { display: block; margin: 0 0 3px; font-size: 11px; }
  .workspace-body .roll-inventory .film-roll-actions { justify-content: flex-start; }
  .workspace-body .roll-inventory .film-roll-status { justify-content: flex-end; }
}

@container roll-inventory (max-width: 699px) {
  .workspace-body .roll-inventory .film-roll-table-head { display: none; }
  .workspace-body .roll-inventory .film-roll-row {
    grid-template-columns: minmax(0, 1fr) 56px 112px;
    grid-template-areas: 'identity width balance' 'actions actions status';
    gap: 8px 10px;
  }
  .workspace-body .roll-inventory .film-roll-metric > span { display: block; margin: 0 0 3px; font-size: 11px; }
  .workspace-body .roll-inventory .film-roll-actions { justify-content: flex-start; }
  .workspace-body .roll-inventory .film-roll-status { justify-content: flex-end; }
}

@media (max-width: 640px) {
  .workspace-body .roll-inventory .film-roll-list { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .workspace-body .roll-inventory .film-roll-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'identity status' 'width balance' 'actions actions';
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .workspace-body .roll-inventory .film-roll-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--border); }
  .workspace-body .roll-inventory .film-roll-status { align-self: start; justify-content: flex-end; }
  .workspace-body .roll-inventory .film-roll-main strong { font-size: 15px; }
  .workspace-body .roll-inventory .film-roll-balance-cell { text-align: right; }
  .workspace-body .roll-inventory .film-roll-balance-cell strong { text-align: right; }
  .workspace-body .roll-inventory .film-roll-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 2px; }
  .workspace-body .roll-inventory .film-roll-action { width: 100%; min-height: 44px; font-size: 12px; padding: 8px; }
  .workspace-body .roll-inventory .film-roll-archive-action { grid-column: 1 / -1; }
  .workspace-body .roll-inventory .film-roll-correction-fields { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-correction-formula { display: none; }
  .workspace-body .roll-inventory .film-roll-correction-head { grid-template-columns: minmax(0, 1fr) auto; }
  .workspace-body .roll-inventory .film-roll-correction-mark { display: none; }
  .workspace-body .roll-inventory .film-roll-correction-footer { flex-direction: column; align-items: stretch; }
  .workspace-body .roll-inventory .film-roll-correction-buttons { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-correction-buttons :is(.btn-primary, .btn-secondary) { width: 100%; }
  .workspace-body .roll-inventory .film-roll-correction-before { flex-wrap: wrap; }
  .workspace-body .roll-inventory .film-rolls-heading h2 small { display: block; margin: 4px 0 0; }
  .workspace-body .roll-inventory .film-roll-archive { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .workspace-body .roll-inventory .film-roll-archive .film-roll-row { border: 0; border-radius: 0; margin-bottom: 0; }
  .workspace-body .roll-inventory .film-roll-barcode-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .roll-inventory .film-roll-barcode-controls button { width: 100%; min-height: 44px; }
  .workspace-body .roll-inventory .film-roll-barcode-controls button:first-of-type { grid-column: 1 / -1; }
}

@container roll-inventory (max-width: 519px) {
  .workspace-body .roll-inventory .film-roll-list { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .workspace-body .roll-inventory .film-roll-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'identity status' 'width balance' 'actions actions';
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }
  .workspace-body .roll-inventory .film-roll-row:last-child { margin-bottom: 0; border-bottom: 1px solid var(--border); }
  .workspace-body .roll-inventory .film-roll-status { align-self: start; justify-content: flex-end; }
  .workspace-body .roll-inventory .film-roll-main strong { font-size: 15px; }
  .workspace-body .roll-inventory .film-roll-balance-cell { text-align: right; }
  .workspace-body .roll-inventory .film-roll-balance-cell strong { text-align: right; }
  .workspace-body .roll-inventory .film-roll-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 2px; }
  .workspace-body .roll-inventory .film-roll-action { width: 100%; min-height: 44px; font-size: 12px; padding: 8px; }
  .workspace-body .roll-inventory .film-roll-archive-action { grid-column: 1 / -1; }
  .workspace-body .roll-inventory .film-roll-correction-fields { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-correction-formula { display: none; }
  .workspace-body .roll-inventory .film-roll-correction-head { grid-template-columns: minmax(0, 1fr) auto; }
  .workspace-body .roll-inventory .film-roll-correction-mark { display: none; }
  .workspace-body .roll-inventory .film-roll-correction-footer { flex-direction: column; align-items: stretch; }
  .workspace-body .roll-inventory .film-roll-correction-buttons { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-body .roll-inventory .film-roll-correction-buttons :is(.btn-primary, .btn-secondary) { width: 100%; }
  .workspace-body .roll-inventory .film-roll-correction-before { flex-wrap: wrap; }
  .workspace-body .roll-inventory .film-rolls-heading h2 small { display: block; margin: 4px 0 0; }
  .workspace-body .roll-inventory .film-roll-archive { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .workspace-body .roll-inventory .film-roll-archive .film-roll-row { border: 0; border-radius: 0; margin-bottom: 0; }
  .workspace-body .roll-inventory .film-roll-barcode-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-body .roll-inventory .film-roll-barcode-controls button { width: 100%; min-height: 44px; }
  .workspace-body .roll-inventory .film-roll-barcode-controls button:first-of-type { grid-column: 1 / -1; }
}

@container roll-inventory (max-width: 349px) {
  .workspace-body .roll-inventory .film-roll-action { font-size: 11px; gap: 4px; }
}

/* Источник плёнки: физический рулон или ранее отрезанные остатки. */
.workspace-body .material-source-picker { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 14px 0; padding: 0; min-width: 0; }
.workspace-body .material-source-picker legend { margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.workspace-body .material-source-picker label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: white; color: var(--text-secondary); font-size: 13px; cursor: pointer; }
.workspace-body .material-source-picker label.is-selected { border-color: var(--btn-primary-bg); background: var(--brand-soft); color: var(--btn-primary-bg); }
.workspace-body .material-source-picker input[type="radio"] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--btn-primary-bg); }
/* Гарантия применяется отдельно к выбранным работам. */
.workspace-body .order-warranty { margin: 0 24px 20px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.workspace-body .order-warranty summary { cursor: pointer; font-size: 14px; font-weight: 650; color: var(--text-primary); }
.workspace-body .order-warranty summary span { margin-left: 8px; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.workspace-body .order-warranty > p { margin: 12px 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.workspace-body .order-warranty-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.workspace-body .order-warranty-check { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: white; border: 1px solid var(--border-strong); border-radius: 9px; cursor: pointer; }
.workspace-body .order-warranty-check[aria-checked="true"] { background: var(--btn-primary-bg); color: white; border-color: var(--btn-primary-bg); }
.workspace-body .order-warranty-row strong { font-size: 13px; overflow-wrap: anywhere; }
.workspace-body .order-warranty-row small { display: block; font-size: 11px; line-height: 1.5; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 600px) {
  .workspace-body .order-warranty { margin: 0 12px 16px; padding: 12px; }
  .workspace-body .order-warranty summary span { display: block; margin: 4px 0 0; }
  .workspace-body .order-warranty-row { grid-template-columns: 44px minmax(0, 1fr); }
  .workspace-body .order-warranty-row > strong { grid-column: 2; }
}
/* Инвентаризация: один способ ввода и сравнение остатка до сохранения. */
.workspace-body .roll-inventory .film-roll-correction { margin: 4px 0 0; background: white; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: none; }
.workspace-body .roll-inventory .film-roll-correction-head { padding: 14px 16px; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; background: var(--surface-0); }
.workspace-body .roll-inventory .film-roll-correction-head strong { font-size: 14px; }
.workspace-body .roll-inventory .film-roll-correction-head span { font-size: 12px; line-height: 1.5; }
.workspace-body .roll-inventory .film-roll-correction-head > button { width: 36px; height: 36px; }
.workspace-body .roll-inventory .inventory-edit-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; padding: 16px; align-items: start; }
.workspace-body .roll-inventory .inventory-step-title { font-size: 12px; font-weight: 650; color: var(--text-primary); margin-bottom: 10px; }
.workspace-body .roll-inventory .inventory-mode { display: flex; width: fit-content; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-0); }
.workspace-body .roll-inventory .inventory-mode button { min-height: 36px; padding: 6px 16px; color: var(--text-muted); font-size: 12px; font-weight: 600; background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.workspace-body .roll-inventory .inventory-mode button[aria-pressed="true"] { color: #fff; background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); box-shadow: 0 2px 6px rgb(35 91 233 / 24%); }
.workspace-body .roll-inventory .film-roll-correction .field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.workspace-body .roll-inventory .film-roll-correction .field label span { color: var(--text-muted); }
.workspace-body .roll-inventory .inventory-unit-input { position: relative; }
.workspace-body .roll-inventory .film-roll-correction .field input { width: 100%; min-width: 0; height: 44px; padding: 0 12px; background: white; font-size: 14px; border: 1px solid var(--border-strong); border-radius: 8px; }
.workspace-body .roll-inventory .inventory-unit-input input { padding-right: 76px !important; }
.workspace-body .roll-inventory .inventory-unit-input > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); font-size: 12px; }
.workspace-body .roll-inventory .film-roll-correction .field small { font-size: 11px; line-height: 1.5; margin-top: 6px; min-height: 0; }
.workspace-body .roll-inventory .inventory-calculation { display: grid; gap: 3px; margin-top: 10px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.workspace-body .roll-inventory .inventory-calculation strong { color: var(--text-secondary); font-weight: 550; overflow-wrap: anywhere; }
.workspace-body .roll-inventory .inventory-preview { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); min-width: 0; }
.workspace-body .roll-inventory .inventory-comparison { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; }
.workspace-body .roll-inventory .inventory-comparison > div { min-width: 0; }
.workspace-body .roll-inventory .inventory-comparison div > span { display: block; font-size: 11px; line-height: 1.4; color: var(--text-muted); }
.workspace-body .roll-inventory .inventory-comparison strong { display: block; margin-top: 6px; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workspace-body .roll-inventory .inventory-comparison strong small { font-size: 12px; font-weight: 500; }
.workspace-body .roll-inventory .inventory-comparison-arrow { color: var(--text-muted); font-size: 18px; }
.workspace-body .roll-inventory .inventory-after strong { color: var(--teal-text); }
.workspace-body .roll-inventory .inventory-change { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.workspace-body .roll-inventory .inventory-change strong { color: var(--text-primary); white-space: nowrap; }
.workspace-body .roll-inventory .inventory-reason { padding: 0 16px 16px; }
.workspace-body .roll-inventory .inventory-reason-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.workspace-body .roll-inventory .inventory-reason-presets button { padding: 6px 10px; min-height: 32px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-0); color: var(--text-secondary); font-size: 11px; cursor: pointer; }
.workspace-body .roll-inventory .inventory-reason-presets button[aria-pressed="true"] { color: var(--btn-primary-bg); border-color: #9fbaff; background: var(--brand-soft); }
.workspace-body .roll-inventory .film-roll-correction-footer { padding: 12px 16px; background: var(--surface-0); }
.workspace-body .roll-inventory .inventory-save-note { margin: 0; max-width: 330px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.workspace-body .roll-inventory .film-roll-correction-buttons :is(.btn-primary, .btn-secondary) { min-height: 40px; height: auto; font-size: 12px; padding: 10px 14px; }
.workspace-body .roll-inventory .film-roll-correction .field-error { display: block; margin-top: 6px; font-size: 12px; }

@media (max-width: 1023px) {
  .workspace-body .roll-inventory .inventory-edit-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@container roll-inventory (max-width: 699px) {
  .workspace-body .roll-inventory .inventory-edit-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 640px) {
  .workspace-body .roll-inventory .film-roll-correction-head { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .workspace-body .roll-inventory .inventory-edit-body { padding: 12px; }
  .workspace-body .roll-inventory .inventory-mode { width: 100%; }
  .workspace-body .roll-inventory .inventory-mode button { flex: 1; min-height: 44px; padding: 6px 8px; }
  .workspace-body .roll-inventory .inventory-preview { padding: 12px; }
  .workspace-body .roll-inventory .inventory-comparison { gap: 8px; }
  .workspace-body .roll-inventory .inventory-comparison strong { font-size: 18px; white-space: normal; }
  .workspace-body .roll-inventory .inventory-comparison strong small { display: block; font-size: 11px; margin-top: 2px; }
  .workspace-body .roll-inventory .inventory-reason { padding: 0 12px 12px; }
  .workspace-body .roll-inventory .inventory-reason-presets button { min-height: 44px; }
  .workspace-body .roll-inventory .film-roll-correction-footer { padding: 12px; }
  .workspace-body .roll-inventory .film-roll-correction-buttons :is(.btn-primary, .btn-secondary) { min-height: 44px; }
}
@container roll-inventory (max-width: 519px) {
  .workspace-body .roll-inventory .film-roll-correction-head { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; }
  .workspace-body .roll-inventory .inventory-edit-body { padding: 12px; }
  .workspace-body .roll-inventory .inventory-mode { width: 100%; }
  .workspace-body .roll-inventory .inventory-mode button { flex: 1; min-height: 44px; padding: 6px 8px; }
  .workspace-body .roll-inventory .inventory-preview { padding: 12px; }
  .workspace-body .roll-inventory .inventory-comparison { gap: 8px; }
  .workspace-body .roll-inventory .inventory-comparison strong { font-size: 18px; white-space: normal; }
  .workspace-body .roll-inventory .inventory-comparison strong small { display: block; font-size: 11px; margin-top: 2px; }
  .workspace-body .roll-inventory .inventory-reason { padding: 0 12px 12px; }
  .workspace-body .roll-inventory .inventory-reason-presets button { min-height: 44px; }
  .workspace-body .roll-inventory .film-roll-correction-footer { padding: 12px; }
  .workspace-body .roll-inventory .film-roll-correction-buttons :is(.btn-primary, .btn-secondary) { min-height: 44px; }
}

/* Общий каталог /films: короткие строки и прямой переход к физическим рулонам. */
.workspace-body .film-stock-catalog { container: film-stock / inline-size; min-width: 0; }
.workspace-body .film-stock-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 16px; padding: 14px; background: white; border: 1px solid var(--border); border-radius: 12px; }
.workspace-body .film-stock-search { position: relative; min-width: 0; }
.workspace-body .film-stock-search .search-input { height: 44px; font-size: 13px; }
.workspace-body .film-stock-categories { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.workspace-body .film-stock-categories .btn-secondary { flex: 0 0 auto; width: auto; white-space: nowrap; }
.workspace-body .film-stock-toolbar .film-qr-search-button { flex: 0 0 auto; width: auto; min-height: 44px; font-size: 12px; white-space: nowrap; }
.workspace-body .film-stock-toolbar .film-sort-control { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 260px; }
.workspace-body .film-stock-toolbar .film-sort-control label { font-size: 12px !important; }
.workspace-body .film-stock-toolbar .film-sort-select { width: 100%; min-width: 0; height: 42px; font-size: 12px; }
.workspace-body .film-stock-toolbar .film-column-filters { grid-column: 1 / -1; min-width: 0; margin: 0; }
.workspace-body .film-stock-toolbar .film-column-filters summary { font-size: 12px; }
.workspace-body .film-stock-toolbar .film-filter-status { grid-column: 1 / -1; margin: 0; }
.workspace-body .film-stock-catalog .film-catalog-list { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: white; }
.workspace-body .film-stock-catalog :is(.film-catalog-header, .film-catalog-row) {
  display: grid; grid-template-columns: minmax(190px, 1fr) 120px 110px 130px 150px;
  align-items: center; gap: 12px; padding: 12px 16px;
}
.workspace-body .film-stock-catalog .film-catalog-header { color: var(--text-muted); background: var(--surface-0); }
.workspace-body .film-stock-catalog .film-column-sort { justify-content: flex-start; text-align: left; font-size: 12px; }
.workspace-body .film-stock-catalog .film-catalog-row { min-height: 90px; margin: 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.workspace-body .film-stock-catalog .film-catalog-row:hover { background: var(--surface-0); }
.workspace-body .film-stock-catalog .staff-info { grid-column: auto; min-width: 0; }
.workspace-body .film-stock-name { display: inline-block; color: var(--text-primary); font-size: 14px; font-weight: 650; text-decoration: none; }
.workspace-body .film-stock-name:hover { color: var(--btn-primary-bg); text-decoration: underline; text-underline-offset: 3px; }
.workspace-body .film-stock-catalog .staff-phone { margin: 3px 0 0; color: var(--text-muted); font-size: 11px; }
.workspace-body .film-stock-sku { display: block; margin-top: 2px; color: var(--text-muted); font-size: 10px; overflow-wrap: anywhere; }
.workspace-body .film-stock-catalog .film-catalog-cell { min-width: 0; text-align: left; }
.workspace-body .film-stock-catalog .film-catalog-cell::before { display: none; }
.workspace-body .film-stock-catalog .film-catalog-cell .badge { font-size: 11px; padding: 5px 9px; }
.workspace-body .film-stock-rolls-link { color: var(--btn-primary-bg); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.workspace-body .film-stock-rolls-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.workspace-body .film-stock-catalog .film-catalog-actions { grid-column: auto; grid-row: auto; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.workspace-body .film-stock-open { display: inline-flex; justify-content: center; align-items: center; gap: 5px; height: 36px; padding: 0 10px; color: var(--btn-primary-bg); background: var(--brand-soft); border: 1px solid #dbe6ff; border-radius: 8px; font-size: 12px; font-weight: 600; text-decoration: none; }
.workspace-body .film-stock-open:hover { background: #e0eaff; border-color: #8eaffb; }
.workspace-body .film-stock-open .ui-icon { width: 14px; height: 14px; }
.workspace-body .film-stock-catalog .film-catalog-actions .icon-btn { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; border-radius: 8px; }
.workspace-body .film-stock-catalog .film-catalog-actions .icon-btn .ui-icon { width: 16px; height: 16px; }

@media (max-width: 1160px) {
  .workspace-body .film-stock-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .workspace-body .film-stock-categories { grid-column: 1 / -1; }
  .workspace-body .film-stock-toolbar :is(.film-sort-control, .film-column-filters) { grid-column: 1 / -1; min-width: 0; }
  .workspace-body .film-stock-catalog .film-catalog-header { display: none; }
  .workspace-body .film-stock-catalog .film-catalog-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 150px; gap: 12px; }
  .workspace-body .film-stock-catalog .film-catalog-row .staff-info { grid-column: 1 / 4; }
  .workspace-body .film-stock-catalog .film-catalog-actions { grid-column: 4; grid-row: 1; }
  .workspace-body .film-stock-catalog .film-catalog-cell { grid-row: 2; }
  .workspace-body .film-stock-catalog .film-catalog-cell::before { display: block; content: attr(data-label); margin-bottom: 4px; color: var(--text-muted); font-size: 11px; }
}

@container film-stock (max-width: 859px) {
  .workspace-body .film-stock-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .workspace-body .film-stock-categories { grid-column: 1 / -1; }
  .workspace-body .film-stock-toolbar :is(.film-sort-control, .film-column-filters) { grid-column: 1 / -1; min-width: 0; }
  .workspace-body .film-stock-catalog .film-catalog-header { display: none; }
  .workspace-body .film-stock-catalog .film-catalog-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 150px; gap: 12px; }
  .workspace-body .film-stock-catalog .film-catalog-row .staff-info { grid-column: 1 / 4; }
  .workspace-body .film-stock-catalog .film-catalog-actions { grid-column: 4; grid-row: 1; }
  .workspace-body .film-stock-catalog .film-catalog-cell { grid-row: 2; }
  .workspace-body .film-stock-catalog .film-catalog-cell::before { display: block; content: attr(data-label); margin-bottom: 4px; color: var(--text-muted); font-size: 11px; }
}

@media (max-width: 640px) {
  .workspace-body .film-stock-toolbar { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .workspace-body .film-stock-toolbar :is(.film-stock-categories, .film-qr-search-button) { grid-column: 1; width: 100%; }
  .workspace-body .film-stock-categories .btn-secondary { flex: 1 1 auto; padding: 0 10px !important; font-size: 12px !important; white-space: nowrap; }
  .workspace-body .film-stock-toolbar .film-sort-control { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-body .film-stock-catalog .film-catalog-list { border: 0; background: transparent; }
  .workspace-body .film-stock-catalog .film-catalog-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-bottom: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: white; }
  .workspace-body .film-stock-catalog .film-catalog-row .staff-info { grid-column: 1 / -1; }
  .workspace-body .film-stock-catalog .film-catalog-actions { grid-column: 1 / -1; grid-row: 3; justify-content: stretch; padding-top: 8px; border-top: 1px solid var(--border); }
  .workspace-body .film-stock-open { flex: 1; height: 44px; }
  .workspace-body .film-stock-catalog .film-catalog-actions .icon-btn { flex-basis: 44px; width: 44px; height: 44px; }
  .workspace-body .film-stock-catalog .film-catalog-cell .badge { font-size: 10px; padding: 5px; white-space: normal; }
  .workspace-body .film-stock-rolls-link { font-size: 12px; }
  .workspace-body .film-stock-toolbar .film-range-grid { grid-template-columns: minmax(0, 1fr); }
}

@container film-stock (max-width: 519px) {
  .workspace-body .film-stock-toolbar { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .workspace-body .film-stock-toolbar :is(.film-stock-categories, .film-qr-search-button) { grid-column: 1; width: 100%; }
  .workspace-body .film-stock-categories .btn-secondary { flex: 1 1 auto; padding: 0 10px !important; font-size: 12px !important; white-space: nowrap; }
  .workspace-body .film-stock-toolbar .film-sort-control { display: grid; grid-template-columns: minmax(0, 1fr); }
  .workspace-body .film-stock-catalog .film-catalog-list { border: 0; background: transparent; }
  .workspace-body .film-stock-catalog .film-catalog-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-bottom: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: white; }
  .workspace-body .film-stock-catalog .film-catalog-row .staff-info { grid-column: 1 / -1; }
  .workspace-body .film-stock-catalog .film-catalog-actions { grid-column: 1 / -1; grid-row: 3; justify-content: stretch; padding-top: 8px; border-top: 1px solid var(--border); }
  .workspace-body .film-stock-open { flex: 1; height: 44px; }
  .workspace-body .film-stock-catalog .film-catalog-actions .icon-btn { flex-basis: 44px; width: 44px; height: 44px; }
  .workspace-body .film-stock-catalog .film-catalog-cell .badge { font-size: 10px; padding: 5px; white-space: normal; }
  .workspace-body .film-stock-rolls-link { font-size: 12px; }
  .workspace-body .film-stock-toolbar .film-range-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Warranty documents: separate from free warranty rework in the payment panel. */
.workspace-body .form-card.invoice-panel { padding: 0; overflow: hidden; }
.invoice-panel-header { display: flex; gap: 12px; align-items: center; padding: 20px 24px; }
.invoice-panel-header > svg { color: var(--btn-primary-bg); flex-shrink: 0; }
.invoice-panel-header h2 { margin: 0 0 4px; font-size: 18px; }
.invoice-panel-header p, .invoice-document-row p, .invoice-panel-footer > p { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.invoice-document-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }
.invoice-document-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-body .invoice-panel :is(.btn-secondary, .btn-primary) { width: auto; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; margin: 0; text-decoration: none; white-space: nowrap; }
.invoice-empty { padding: 16px 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.invoice-panel-footer { padding: 18px 24px; background: var(--surface-1); border-top: 1px solid var(--border); }
.invoice-issue-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.invoice-issue-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.invoice-language-select { min-width: 180px; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; color: var(--text-primary); font: inherit; font-size: 14px; padding: 8px 12px; }
.invoice-panel-footer > p { margin-top: 12px; line-height: 1.5; }
@media (max-width: 600px) { .invoice-panel-header, .invoice-document-row, .invoice-empty, .invoice-panel-footer { padding: 16px; } .invoice-issue-form > label, .workspace-body .invoice-issue-form > button { width: 100%; } .invoice-document-actions { width: 100%; } .invoice-document-actions > a { flex: 1; } }

.workspace-body .form-card.warranty-panel { padding: 0; overflow: hidden; }
.warranty-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; }
.warranty-eyebrow { font-size: 11px; letter-spacing: .06em; color: var(--text-muted); text-transform: uppercase; }
.warranty-panel h2 { font-size: 20px; margin: 4px 0 6px; }
.warranty-panel-header p, .warranty-document-row p { color: var(--text-muted); font-size: 13px; margin: 4px 0 0; }
.workspace-body .warranty-panel :is(.btn-primary, .btn-secondary) { width: auto; min-height: 44px; margin: 0; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; text-decoration: none; white-space: nowrap; }
.warranty-empty { margin: 0; padding: 18px 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.warranty-document-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-top: 1px solid var(--border); padding: 16px 24px; }
.warranty-document-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.warranty-form { border-top: 1px solid var(--border); padding: 24px; }
.warranty-vehicle-summary { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface-1); border-radius: 12px; }
.warranty-vehicle-summary span, .warranty-field-help, .warranty-form-footer p { font-size: 13px; color: var(--text-muted); }
.warranty-work-selection { border: 0; padding: 0; margin: 22px 0; min-width: 0; }
.warranty-work-selection legend { font-weight: 600; margin-bottom: 10px; }
.warranty-work-option { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.warranty-work-option input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: #2359ef; }
.warranty-work-option small { display: block; color: var(--text-muted); margin-top: 5px; }
.warranty-date-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.warranty-date-grid label, .warranty-text-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; min-width: 0; }
.warranty-date-grid input { width: 100%; min-width: 0; }
.warranty-text-field { margin-top: 20px; }
.warranty-text-field textarea { resize: vertical; min-height: 100px; font-weight: 400; padding: 12px; }
.warranty-text-field span { font-size: 12px; color: var(--text-muted); }
.warranty-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.warranty-form-footer p { margin: 0; max-width: 420px; }
.warranty-form-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 1050px) { .warranty-date-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .warranty-panel-header, .warranty-document-row, .warranty-form-footer { align-items: stretch; flex-direction: column; }
    .warranty-panel-header, .warranty-document-row, .warranty-form { padding: 16px; }
    .warranty-date-grid { grid-template-columns: minmax(0, 1fr); }
    .warranty-document-actions a, .warranty-form-footer > div button { flex: 1; }
}
.warranty-panel .form-input { box-sizing: border-box; width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0, #fff); color: var(--text); font: inherit; padding: 12px 14px; min-height: 46px; }
.warranty-panel .form-input:focus { border-color: #2359ef; outline: 2px solid #2359ef22; outline-offset: 1px; }
.warranty-dates-basic { grid-template-columns: repeat(3,minmax(0,1fr)); }
.warranty-term-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.warranty-term-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface-1); }
.warranty-term-card label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.warranty-fixed-terms .warranty-term-card span { display: block; color: var(--text-muted); font-size: 13px; }
.warranty-fixed-terms .warranty-term-card strong { display: block; font-size: 24px; margin-top: 8px; }
.warranty-tint-periods { margin-top: 20px; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.warranty-tint-periods h3, .warranty-manual-heading { font-size: 15px; margin: 0 0 8px; }
.warranty-manual-heading { margin-top: 20px; }
.warranty-tint-period-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.warranty-tint-period-row > div { min-width: 0; flex: 1; }
.warranty-tint-period-row small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.warranty-tint-period-row > span { flex-shrink: 0; font-weight: 600; }
.warranty-tint-period-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; margin-top: 8px; }
.warranty-tint-period-row .field-error { color: var(--error-text); }
@media (max-width: 600px) { .warranty-tint-period-row { flex-wrap: wrap; } .warranty-tint-period-row > div { flex-basis: 100%; } }
.warranty-template-preview { border: 1px solid var(--border); border-radius: 12px; margin-top: 20px; padding: 14px 16px; }
.warranty-template-preview summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.warranty-template-preview summary span { display: block; color: var(--text-muted); font-weight: 400; font-size: 12px; margin-top: 4px; }
.warranty-template-preview > div { max-height: 360px; overflow-y: auto; margin-top: 16px; padding-right: 12px; font-size: 13px; line-height: 1.6; }
.warranty-template-preview h3 { font-size: 13px; margin: 16px 0 6px; }
.warranty-template-preview p, .warranty-template-preview ul { margin: 6px 0; }
@media (max-width: 800px) { .warranty-dates-basic { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) { .warranty-term-grid { grid-template-columns: minmax(0,1fr); } }

/* Keep tax visible alongside the amount that contributes to revenue. */
.report-payment-row { grid-template-columns: 90px minmax(0, 1fr) 65px 170px 12px; padding-top: 12px; padding-bottom: 12px; }
.report-payment-money { display: flex; flex-direction: column; gap: 3px; }
.report-payment-money > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.report-payment-row .report-payment-money span { margin: 0; font-size: 10px; overflow: visible; }
.report-payment-row .report-payment-money b { font-size: 10px; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.report-payment-row .report-payment-money strong { font-size: 13px; color: var(--teal-text); overflow: visible; }
.report-payment-row .report-payment-net span { color: var(--teal-text); }
.report-payment-row .report-payment-money.refund strong,
.report-payment-row .report-payment-money.refund .report-payment-net span { color: var(--coral-text); }
.report-method-money { max-width: 260px; text-align: right; }
.report-breakdown-row .report-method-money small { display: block; margin: 4px 0 0; font-size: 11px; }
.order-work-sheet-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; margin: 16px 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.order-photos { margin: 16px 0; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-1); }
.order-photos-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.order-photos-heading h3 { margin: 0; font-size: 16px; }
.order-photos-heading p, .order-photos-empty { margin: 6px 0 12px; font-size: 13px; color: var(--text-secondary); }
.order-photos-count { flex-shrink: 0; font-size: 12px; color: var(--text-secondary); }
.order-photo-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.order-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.order-photo { margin: 0; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.order-photo a { display: block; }
.order-photo img { display: block; width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }
.order-photo figcaption { display: flex; flex-direction: column; gap: 3px; padding: 8px 0; font-size: 11px; color: var(--text-secondary); overflow-wrap: anywhere; }
.order-photo-remove { padding: 4px 0; border: 0; background: none; color: var(--coral-text, #b0442b); font: inherit; font-size: 12px; cursor: pointer; }
@media (max-width: 480px) { .order-photos { padding: 12px; } .order-photo-actions button { flex: 1; } .order-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.order-work-sheet-actions > div:first-child { min-width: 0; }
.order-work-sheet-actions strong { display: block; font-size: 15px; }
.order-work-sheet-actions span { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.order-work-sheet-buttons { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 600px) {
    .order-work-sheet-actions { flex-direction: column; align-items: stretch; padding: 16px; }
    .order-work-sheet-buttons a { flex: 1; text-align: center; }
}
@media (min-width: 721px) and (max-width: 1100px) {
    .report-cashflow-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .report-payment-row { grid-template-columns: minmax(0, 1fr) 155px 10px; gap: 8px; }
    .report-payment-row time, .report-payment-method { display: none; }
}
.architecture-window { padding:16px; margin:12px 0; border:1px solid var(--border-color, #dde5f1); border-radius:12px; background:var(--surface-secondary, #f8faff); }
.architecture-dimensions { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
@media(max-width:600px) { .architecture-dimensions { grid-template-columns:1fr; } }
.order-price-edit-button { display:inline-flex; align-items:center; gap:6px; align-self:flex-start; padding:4px 0; border:0; background:transparent; color:var(--accent-text, #235be9); cursor:pointer; font:inherit; font-size:13px; }
.order-price-edit-button svg { width:15px; height:15px; }
.order-price-editor { padding:20px 24px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface-1); }
.order-price-editor h3 { margin:0 0 6px; }
.order-price-editor-row { display:grid; grid-template-columns:minmax(0,1fr) 200px; align-items:center; gap:16px; margin:16px 0; }
.order-price-editor-row .field { margin:0; }
.order-price-editor-row.has-trip { grid-template-columns:minmax(0,1fr) 160px 160px; }
.order-price-preview { display:flex; flex-wrap:wrap; gap:10px 24px; padding:12px 0; }
.order-price-editor-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.order-price-history { padding:16px 24px; border-bottom:1px solid var(--border); }
.order-price-history summary { cursor:pointer; font-weight:600; }
.order-price-history-entry { padding:12px 0; border-bottom:1px solid var(--border); font-size:13px; }
.order-price-history-entry p { margin:4px 0; }
@media(max-width:760px) { .order-price-editor-row, .order-price-editor-row.has-trip { grid-template-columns:1fr; gap:8px; } }
/* Короткие движения интерфейса: исходные значения и размеры остаются серверными. */
.report-kpi-value, .report-result-value, [data-motion-value] { font-variant-numeric: tabular-nums; }
.report-progress i, .report-inline-bar i, .report-result-progress i { transform-origin:left center; transition: width .46s cubic-bezier(.22,1,.36,1); }
.report-money-column i { transform-origin:center bottom; transition: height .46s cubic-bezier(.22,1,.36,1); }
.workspace-body :is(.btn-primary, .btn-secondary, .job-action-btn, .report-tabs button, .report-periods button, .ppf-checklist-mark, .bottom-tab-item) { transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .14s ease; }
.workspace-body :is(.btn-primary, .btn-secondary, .job-action-btn, .report-tabs button, .report-periods button, .ppf-checklist-mark, .bottom-tab-item):active:not(:disabled) { transform: scale(.98); }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .report-kpi-card, .order-list-card, .client-list-card { transition: box-shadow .2s ease, border-color .2s ease; }
  .report-kpi-card:hover, .order-list-card:hover, .client-list-card:hover { box-shadow:0 7px 24px rgb(35 61 109 / 9%); }
}
@media (prefers-reduced-motion:reduce) {
  .workspace-body *, .workspace-body *::before, .workspace-body *::after { animation:none !important; transition:none !important; }
}
.workspace-body .order-completion-overlay { z-index: 120; }
.workspace-body .modal-card.order-completion-card { width: min(960px, 100%); max-width: 960px; min-width: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.order-completion-header { display: flex; flex-shrink: 0; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--surface-1); }
.order-completion-header > div { min-width: 0; overflow-wrap: anywhere; }
.order-completion-header h2 { margin: 0; color: var(--text-primary); font-size: 23px; line-height: 1.25; outline: none; }
.order-completion-header p { margin: 8px 0 0; color: var(--text-secondary); font-size: 14px; }
.order-completion-header > .btn-secondary { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; font-size: 24px; }
.order-completion-body { overflow-y: auto; overscroll-behavior: contain; min-width: 0; min-height: 0; padding: 20px 24px; scrollbar-gutter: stable; }
.order-completion-instruction { margin: 0 0 20px; color: var(--text-primary); font-weight: 600; }
.order-completion-work + .order-completion-work { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.order-completion-work > h3 { margin: 0 0 12px; color: var(--text-primary); font-size: 18px; }
.order-completion-footer { display: flex; flex-shrink: 0; align-items: center; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-1); }
.order-completion-footer > span { margin-right: auto; color: var(--text-secondary); font-size: 13px; }
.order-completion-footer > button { flex: 0 1 auto; width: auto; height: auto; min-height: 44px; padding: 10px 18px; white-space: normal; }

/* The form can be narrower than the viewport (side panels and browser zoom). */
.finish-roll-entry { min-width: 0; container: film-consumption / inline-size; }
.finish-roll-entry :is(input, select, .field, .material-source-picker) { min-width: 0; max-width: 100%; }
.finish-roll-entry :is(.field input, .field select) { width: 100%; }
.finish-roll-entry .material-source-picker { flex-wrap: wrap; }
.finish-roll-entry-head { flex-wrap: wrap; }
.finish-roll-scan-row { grid-template-columns: minmax(0, 1fr) auto auto; }
.finish-roll-scan-row > * { min-width: 0; }
.finish-roll-scan-row input { grid-column: auto; }
.finish-roll-scan-row .btn-secondary { height: auto; min-height: 40px; padding-block: 8px; white-space: normal; }
.finish-roll-selected { grid-template-columns: auto minmax(0, 1fr) auto; }
.finish-roll-selected > * { min-width: 0; overflow-wrap: anywhere; }
.finish-area-calculator-head { flex-wrap: wrap; }
.finish-linear-inputs { grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1fr) minmax(0, .8fr); }
.finish-linear-inputs.with-width-picker { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
.finish-linear-inputs > *, .finish-area-inputs > * { min-width: 0; }
.finish-roll-width-fixed { min-height: 44px; align-items: center; flex-wrap: wrap; padding-block: 8px; }
.finish-linear-result strong { white-space: normal; overflow-wrap: anywhere; }
.finish-area-inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); }
.finish-area-inputs .result { grid-column: auto; }
.finish-area-inputs > b:nth-of-type(2) { display: block; }

@media (max-width: 640px) {
  .finish-linear-inputs, .finish-linear-inputs.with-width-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finish-linear-inputs > b { display: none; }
  .finish-linear-inputs:not(.with-width-picker) .finish-linear-result { grid-column: 1 / -1; }
  .finish-linear-inputs.with-width-picker .finish-linear-result { grid-column: auto; }
  .finish-roll-selected { grid-template-columns: auto minmax(0, 1fr); }
  .finish-roll-selected small { grid-column: 1 / -1; }
  .finish-roll-scan-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finish-roll-scan-row input { grid-column: 1 / -1; }
  .finish-area-inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .finish-area-inputs .result { grid-column: 1 / -1; }
  .finish-area-inputs > b:nth-of-type(2) { display: none; }
}
@container film-consumption (max-width: 520px) {
  .finish-linear-inputs, .finish-linear-inputs.with-width-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finish-linear-inputs > b { display: none; }
  .finish-linear-inputs:not(.with-width-picker) .finish-linear-result { grid-column: 1 / -1; }
  .finish-linear-inputs.with-width-picker .finish-linear-result { grid-column: auto; }
  .finish-roll-selected { grid-template-columns: auto minmax(0, 1fr); }
  .finish-roll-selected small { grid-column: 1 / -1; }
  .finish-roll-scan-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finish-roll-scan-row input { grid-column: 1 / -1; }
  .finish-area-inputs { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .finish-area-inputs .result { grid-column: 1 / -1; }
  .finish-area-inputs > b:nth-of-type(2) { display: none; }
}
@container film-consumption (max-width: 380px) {
  .finish-area-calculator-head { flex-direction: column; gap: 4px; }
  .finish-area-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finish-area-inputs > b { display: none; }
  .finish-area-inputs .result { grid-column: 1 / -1; }
}
@container film-consumption (max-width: 260px) {
  .finish-linear-inputs, .finish-linear-inputs.with-width-picker { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .workspace-body .order-completion-overlay { padding: 8px; }
  .workspace-body .modal-card.order-completion-card { max-height: calc(100dvh - 16px); }
  .order-completion-header, .order-completion-body { padding: 16px; }
  .order-completion-header h2 { font-size: 20px; }
  .order-completion-footer { flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .order-completion-footer > span { width: 100%; }
  .order-completion-footer > .btn-primary { flex: 1; padding: 10px 12px; height: auto; min-height: 48px; }
}
.order-barter-panel { padding: 22px 24px; border-top: 1px solid var(--border); background: var(--surface-1); }
.order-barter-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.order-barter-panel h3 { margin: 0; font-size: 19px; }
.order-barter-panel header p, .order-barter-panel header > span { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; }
.barter-agreement { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: white; margin-top: 12px; }
.barter-agreement-heading { display: flex; justify-content: space-between; gap: 20px; }
.barter-agreement-heading > strong:first-child { overflow-wrap: anywhere; white-space: pre-line; }
.barter-agreement-heading > strong:last-child { white-space: nowrap; }
.barter-agreement p { margin: 10px 0 0; }
.barter-agreement-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.barter-agreement-actions > button { width: auto; flex: 0 1 auto; padding: 0 16px; }
.barter-cancellation { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border); }
.barter-form-note { padding: 12px 14px; margin: 12px 0; border-radius: 10px; background: var(--surface-1); color: var(--text-secondary); font-size: 13px; }
.barter-received-check { display: flex; align-items: center; gap: 10px; margin: 16px 0; cursor: pointer; }
.barter-received-check input { width: 18px; height: 18px; }
.report-barter-intro { margin: 20px 0; }
.report-barter-intro h2 { margin-bottom: 6px; }
.report-barter-intro p { color: var(--text-secondary); max-width: 840px; line-height: 1.5; }
.barter-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.barter-kpis .report-dashboard-panel { display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.barter-kpis strong { color: var(--text-primary); font-size: 28px; font-variant-numeric: tabular-nums; }
.barter-kpis small { color: var(--text-secondary); line-height: 1.5; }
.barter-report-panel { margin-top: 20px; }
.barter-report-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) 140px; gap: 20px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--border); text-decoration: none; color: var(--text-primary); }
.barter-report-row div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.barter-report-row div > strong { overflow-wrap: anywhere; white-space: pre-line; }
.barter-report-row span:not(.badge), .barter-report-row small { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
.barter-report-row > strong, .barter-report-amount { text-align: right; font-variant-numeric: tabular-nums; }
.barter-report-row:hover { background: var(--surface-1); }
.barter-empty { padding: 18px 22px; color: var(--text-secondary); }
.barter-agreement.is-cancelled, .barter-report-row.is-cancelled { opacity: .65; }
.report-barter-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; padding: 22px; }
.report-barter-summary h2 { margin: 6px 0; }
.report-barter-summary p, .report-barter-summary span, .barter-result-note { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.report-barter-summary button { flex: 0 0 auto; width: auto; padding: 0 16px; }
.client-barter-summary header { padding: 20px 22px; }
.client-barter-summary header h2 { margin: 0 0 8px; }
.client-barter-summary header p { color: var(--text-secondary); margin: 0; }
@media (max-width: 760px) {
  .workspace-body .report-tabs button:first-child { grid-column: auto; }
  .barter-kpis { grid-template-columns: 1fr; }
  .barter-report-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 16px; }
  .barter-report-row > div:first-child { grid-column: 1 / -1; }
  .order-barter-panel { padding: 18px 16px; }
  .order-barter-panel > header, .report-barter-summary { flex-direction: column; align-items: stretch; }
  .barter-agreement { padding: 14px; }
}
.finance-group-note { margin: 18px 0; padding: 12px 16px; border-radius: 12px; background: var(--surface-1); color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.barter-finance-kpis { margin-bottom: 18px; }
.barter-finance-result { grid-column: 1 / -1; background: var(--success-bg, #edf9f4); }
.barter-finance-result.negative { background: #fff2ee; }
.barter-finance-result.negative strong, .barter-finance-table .negative { color: #b74329; }
.barter-journal-heading { margin: 30px 0 16px; font-size: 20px; }
.barter-finance-table-scroll { overflow-x: auto; overscroll-behavior: contain; }
.barter-finance-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.barter-finance-table th { background: var(--surface-1); color: var(--text-secondary); font-weight: 600; }
.barter-finance-table th, .barter-finance-table td { padding: 14px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
.barter-finance-table th:first-child, .barter-finance-table td:first-child { text-align: left; min-width: 185px; }
.barter-finance-table a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text-primary); }
.barter-finance-table a span, .barter-finance-table a small { color: var(--text-secondary); white-space: normal; }
.barter-table-note { padding: 14px 22px; color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.barter-payroll-link { color: var(--accent-text); text-decoration: none; font-size: 13px; }
.barter-payroll-panel { scroll-margin-top: 24px; margin-bottom: 20px; }
.barter-payroll-period-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 22px; border-top: 1px solid var(--border); }
.barter-payroll-period-note p { margin: 0; max-width: 760px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.barter-payroll-period-note button { flex: 0 0 auto; width: auto; padding: 0 16px; }
.barter-payroll-master { border-top: 1px solid var(--border); }
.barter-payroll-master summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; background: var(--surface-1); cursor: pointer; }
.barter-payroll-master summary > span { display: flex; flex-direction: column; gap: 5px; }
.barter-payroll-master small, .barter-payroll-work span { color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.barter-payroll-work { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 22px; color: var(--text-primary); border-top: 1px solid var(--border); text-decoration: none; }
.barter-payroll-work > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.barter-payroll-work > strong { text-align: right; font-variant-numeric: tabular-nums; }
.barter-payroll-work:hover { background: var(--surface-1); }
.consumable-coating-rate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; margin: 0 0 24px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: white; }
.consumable-coating-rate h2 { margin: 0 0 10px; font-size: 18px; }
.consumable-coating-rate p, .consumable-coating-rate span { margin: 8px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.consumable-coating-amount { display: flex; flex-direction: column; }
.consumable-coating-amount strong { font-size: 24px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.consumable-coating-note { flex-basis: 100%; border-top: 1px solid var(--border); padding-top: 12px; }
.purchase-journal { display: flex; flex-direction: column; gap: 20px; }
.purchase-toolbar, .purchase-actions, .purchase-files { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.purchase-journal label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--text-secondary); }
.purchase-journal input:not([type=checkbox]), .purchase-journal select, .purchase-journal textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--text-primary); font: inherit; }
.purchase-journal input[type=file] { max-width: 100%; }
.purchase-journal .btn-primary, .purchase-journal .btn-secondary { width: auto; flex: 0 0 auto; padding: 12px 18px; min-height: 44px; }
.purchase-search { flex: 1 1 200px; }
.purchase-editor, .purchase-record, .purchase-stat-grid > section, .purchase-stat-details { border: 1px solid var(--border); border-radius: 16px; background: white; padding: 22px; min-width: 0; }
.purchase-editor h2, .purchase-record h2, .purchase-stat-grid h2 { margin: 0 0 12px; font-size: 18px; }
.purchase-editor > p, .purchase-explanation, .purchase-record span, .purchase-record-totals, .purchase-journal small { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.purchase-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.purchase-lines { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.purchase-lines fieldset { min-width: 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.purchase-lines legend { font-weight: 600; font-size: 13px; padding: 0 5px; }
.purchase-line-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.purchase-name { grid-column: span 2; }
.purchase-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.purchase-kpis section { display: flex; flex-direction: column; gap: 10px; background: white; border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.purchase-kpis span { font-size: 13px; color: var(--text-secondary); }
.purchase-kpis strong, .purchase-record header > strong { font-size: 25px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.purchase-explanation { margin: 0; }
.purchase-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.purchase-stat-grid p { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 14px; }
.purchase-stat-grid strong { white-space: nowrap; }
.purchase-table-scroll { width: 100%; overflow-x: auto; margin-top: 14px; }
.purchase-journal table { width: 100%; border-collapse: collapse; font-size: 13px; }
.purchase-journal th, .purchase-journal td { text-align: right; padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.purchase-journal th { background: var(--surface-1); }
.purchase-journal td:first-child, .purchase-journal th:first-child { text-align: left; min-width: 180px; white-space: normal; }
.purchase-journal td small { display: block; margin-top: 5px; }
.purchase-journal summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 5px 0; }
.purchase-record header { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.purchase-record header h2 { overflow-wrap: anywhere; }
.purchase-record.is-cancelled { background: var(--surface-1); }
.purchase-record .purchase-actions { margin-top: 16px; }
.purchase-files { padding-top: 18px; align-items: center; }
.purchase-files a { display: inline-block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; font-size: 13px; }
.purchase-note { white-space: pre-line; }
.purchase-history, .purchase-cancel-form { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.purchase-history > div { padding: 14px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.purchase-preview { padding: 14px; background: var(--surface-1); border-radius: 10px; }
.purchase-journal .purchase-cancelled-toggle { flex-direction: row; align-items: center; gap: 10px; }
.purchase-empty { padding: 28px; border: 1px dashed var(--border); border-radius: 14px; color: var(--text-secondary); }
.purchase-saved { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 12px; background: var(--success-bg, #edf9f4); font-size: 13px; }
@media (max-width: 760px) {
  .purchase-fields, .purchase-stat-grid { grid-template-columns: 1fr; }
  .purchase-kpis, .purchase-line-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-toolbar > label { flex: 1 1 140px; }
  .purchase-record header { flex-wrap: wrap; }
  .purchase-editor, .purchase-record { padding: 16px; }
}
@media (max-width: 640px) {
  .barter-payroll-period-note { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .barter-payroll-master summary, .barter-payroll-work { padding: 16px; }
  .barter-payroll-work { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (hover: none), (pointer: coarse) {
  .workspace-body .modal-overlay,
  .mobile-menu-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.planner-slot, .order-list-card, .client-list-card, .job-card {
  contain: layout style;
}

/* ===== Рабочее место заказа (MobileTechRX, часть 1) =====
   /orders/{id}: полоса заказа сверху, вкладки «Авто / Услуги / Фото / Расчёт» и своя нижняя
   панель переключения. Панели переключает Alpine x-show, поэтому display задаётся только классом
   (см. техзаметку в CLAUDE.md про x-show и inline display). */
.workspace-body.has-order-workspace { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.order-workspace { display: grid; gap: 16px; min-width: 0; }
.order-workspace > .order-work-sheet-actions { margin: 0; }
.workspace-panel { display: grid; gap: 16px; min-width: 0; }
.workspace-panel > .order-work-section { margin-top: 0; }
.workspace-panel > div[style*="margin-top: 24px"] { margin-top: 0 !important; }

.workspace-body .order-workspace-strip .client-card-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px 22px; margin-bottom: 10px; }
.order-workspace-total { display: grid; justify-items: end; gap: 2px; line-height: 1.15; }
.order-workspace-total span { color: var(--text-muted); font-size: 10.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.order-workspace-total strong { color: var(--text-primary); font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.order-workspace-actions { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--card-shadow); }
.order-workspace-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* Вкладка «Авто»: слева машина, справа данные — как VEHICLE INFO в референсе. */
.vehicle-workspace { display: grid; gap: 16px; min-width: 0; }
.vehicle-hero { position: relative; display: grid; align-content: center; justify-items: center; gap: 12px; min-height: 280px; padding: 64px 24px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: radial-gradient(ellipse 70% 55% at 50% 66%, #ffffff 0%, #f1f3f6 72%, #eaedf1 100%); box-shadow: var(--card-shadow); overflow: hidden; }
.vehicle-hero-plate { position: absolute; top: 18px; left: 18px; display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border: 2px solid #1c252d; border-radius: 7px; background: white; color: #1c252d; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.vehicle-hero-car { display: block; width: 100%; max-width: 560px; height: auto; }
.vehicle-hero-caption { margin: 0; color: var(--text-muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.vehicle-hero-empty { padding-top: 32px; }
.vehicle-hero-icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; color: var(--btn-primary-bg); background: var(--brand-soft); }
.vehicle-hero-icon .ui-icon { width: 36px; height: 36px; }

.vehicle-info-card { display: grid; align-content: start; gap: 18px; min-width: 0; padding: 20px 24px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--card-shadow); }
.vehicle-info-tabs { display: inline-flex; justify-self: start; max-width: 100%; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-0); }
.vehicle-info-tabs button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; }
.vehicle-info-tabs button:hover { color: var(--text-primary); }
.vehicle-info-tabs button.active { color: white; background: var(--btn-primary-bg); }
.vehicle-info-tabs button:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.vehicle-info-pane { display: grid; gap: 16px; min-width: 0; }
.vehicle-info-title { display: grid; gap: 0; min-width: 0; }
.vehicle-info-year { color: var(--text-muted); font-size: 24px; font-weight: 300; letter-spacing: -.01em; line-height: 1.15; }
.vehicle-info-title h2 { margin: 0; color: var(--text-primary); font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1.12; text-transform: uppercase; overflow-wrap: anywhere; }
.vehicle-info-rows { display: grid; margin: 0; }
.vehicle-info-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.vehicle-info-rows dt { color: var(--text-secondary); font-size: 13px; }
.vehicle-info-rows dd { min-width: 0; margin: 0; color: var(--text-primary); font-size: 14px; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.vehicle-info-rows .vehicle-info-strong { font-size: 15px; font-weight: 700; letter-spacing: .03em; }
.vehicle-info-rows .vehicle-info-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .04em; }
.vehicle-info-rows .vehicle-info-color { display: inline-flex; align-items: center; gap: 10px; }
.vehicle-color-swatch { display: inline-block; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid rgb(0 0 0 / 18%); border-radius: 50%; box-shadow: inset 0 2px 3px rgb(255 255 255 / 35%); }
.vehicle-info-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vehicle-info-actions > :is(.btn-primary, .btn-secondary) { flex: 0 1 auto; width: auto; padding: 0 18px; text-decoration: none; }
.vehicle-info-form { display: grid; gap: 8px; }
.vehicle-info-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.vehicle-info-form-grid .field { min-width: 0; }
.vehicle-info-form-grid :is(input, select) { width: 100%; }

.order-workspace-location .order-work-location { margin-top: 0; }
/* «Место выполнения работы» — сразу под машиной (25.11.2026). Карточка машины и данные живут в
   отдельном компоненте orders.vehicle-panel, поэтому его корень растворён (display: contents),
   и все три блока раскладываются общей сеткой вкладки. */
.order-auto-panel { grid-template-areas: "hero" "loc" "info"; }
.order-work-location-switch { display: grid; gap: 8px; justify-items: start; }
.order-work-location-switch .hint { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.order-work-location-switch button:disabled { opacity: .45; cursor: default; }
.order-auto-panel > .vehicle-workspace { display: contents; }
.order-auto-panel .vehicle-hero { grid-area: hero; }
.order-auto-panel .vehicle-info-card { grid-area: info; }
.order-auto-panel > .order-workspace-location { grid-area: loc; }
@media (min-width: 1024px) {
  .order-auto-panel { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "hero info" "loc info"; align-items: start; }
}
.order-workspace-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 24px; color: var(--text-secondary); text-align: center; }
.order-workspace-empty p { margin: 0; }
.order-workspace-empty > span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--btn-primary-bg); background: var(--brand-soft); }

/* Нижняя панель вкладок: белая, иконка + подпись капителью, активная — синяя с полосой. */
.order-workspace-tabs { position: fixed; z-index: 58; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 max(12px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left)); border-top: 1px solid var(--border); background: white; box-shadow: 0 -4px 20px rgb(22 28 36 / 6%); }
.order-workspace-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 5px; min-width: 0; min-height: 64px; padding: 8px 4px 10px; border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 10.5px; font-weight: 650; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.order-workspace-tab:hover { color: var(--text-primary); }
.order-workspace-tab.active { color: var(--btn-primary-bg); }
.order-workspace-tab.active::after { content: ""; position: absolute; right: 24%; bottom: 0; left: 24%; height: 3px; border-radius: 3px 3px 0 0; background: var(--btn-primary-bg); }
.order-workspace-tab:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: -6px; border-radius: 10px; }
.order-workspace-tab-icon { position: relative; display: inline-grid; }
.order-workspace-tab-icon .ui-icon { width: 25px; height: 25px; }
.order-workspace-tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-workspace-tab-dot { position: absolute; top: -2px; right: -7px; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: #e0702a; }

@media (min-width: 768px) and (max-width: 1023px) {
  .order-workspace-tabs { left: 76px; }
}
@media (min-width: 1024px) {
  .order-workspace-tabs { left: var(--sidebar-width); }
  .vehicle-workspace { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; }
  .vehicle-hero { min-height: 340px; }
}
@media (max-width: 767px) {
  .workspace-body.has-order-workspace { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .workspace-body.has-order-workspace :is(.bottom-tabs, .mobile-more-menu, .mobile-menu-backdrop) { display: none !important; }
  .order-workspace-tabs { padding-inline: max(6px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-right)); }
  .order-workspace-tab { min-height: 60px; font-size: 9.5px; letter-spacing: .05em; }
  .vehicle-hero { min-height: 220px; padding: 60px 14px 16px; }
  .vehicle-info-card { padding: 16px 16px 20px; }
  .vehicle-info-year { font-size: 20px; }
  .vehicle-info-title h2 { font-size: 24px; }
}
@media (max-width: 640px) {
  .workspace-body .order-workspace-strip .client-card-header { grid-template-columns: minmax(0, 1fr) auto; }
  .order-workspace-total { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--border); }
  .order-workspace-total strong { font-size: 21px; }
  .vehicle-info-form-grid { grid-template-columns: minmax(0, 1fr); }
  .order-workspace-actions-row > button { flex: 1 1 calc(50% - 5px) !important; }
}
@media print {
  .order-workspace-tabs { display: none !important; }
}

/* ===== Рабочее место заказа, часть 2: сетка круглых иконок услуг =====
   Круг с линейной иконкой, подпись капителью и сумма — как SERVICES у MobileTechRX. Услуга,
   которая уже есть в заказе, — залитый синий круг. Лист услуги выезжает снизу; x-show, поэтому
   display только классом, а центрирование — через margin, не transform (x-transition трогает transform). */
.service-grid-card { padding: 20px 24px 24px; }
.service-grid-heading h2 { margin: 0; color: var(--text-primary); font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.service-grid-heading p { margin: 2px 0 0; color: var(--text-secondary); font-size: 13px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 20px 8px; margin-top: 20px; }
.service-tile { display: grid; justify-items: center; align-content: start; gap: 6px; width: 100%; min-height: 44px; padding: 6px 2px; border: 0; border-radius: 14px; background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.service-tile:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.service-tile-ring { position: relative; display: grid; place-items: center; width: 76px; height: 76px; border: 1.5px solid #9fc0f5; border-radius: 50%; color: var(--btn-primary-bg); background: white; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.service-tile-ring > .ui-icon { width: 32px; height: 32px; }
.service-tile:hover .service-tile-ring { box-shadow: 0 6px 18px rgb(37 99 235 / 16%); }
.service-tile:active .service-tile-ring { transform: scale(.96); }
.service-tile.is-active .service-tile-ring { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; box-shadow: 0 6px 18px rgb(37 99 235 / 28%); }
.service-tile-label { max-width: 100%; color: var(--text-primary); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; line-height: 1.2; text-align: center; text-transform: uppercase; overflow-wrap: anywhere; }
.service-tile-sum { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.service-tile.is-active .service-tile-sum { color: var(--text-primary); font-weight: 600; }
.service-tile-flag { position: absolute; top: 1px; right: 1px; width: 20px; height: 20px; border: 2px solid white; border-radius: 50%; }
.service-tile-flag.is-waiting { background: #e0702a; }
.service-tile-flag.is-ready { display: grid; place-items: center; color: white; background: #1f9d6b; }
.service-tile-flag.is-ready .ui-icon { width: 11px; height: 11px; stroke-width: 3.2; }
.service-tile-count { position: absolute; right: -4px; bottom: -2px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 2px solid white; border-radius: 12px; color: white; background: #1c252d; font-size: 11px; font-weight: 700; }
.service-grid .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.service-sheet-backdrop { position: fixed; z-index: 70; inset: 0; display: block; background: rgb(15 23 42 / 38%); backdrop-filter: blur(2px); }
.service-sheet { position: fixed; z-index: 71; right: 0; bottom: 0; left: 0; display: grid; align-content: start; gap: 18px; width: min(640px, 100%); max-height: min(80vh, 720px); margin-inline: auto; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; border-radius: 20px 20px 0 0; background: white; box-shadow: 0 -12px 40px rgb(15 23 42 / 20%); }
.service-sheet-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.service-sheet-head h3 { margin: 0; color: var(--text-primary); font-size: 19px; font-weight: 650; }
.service-sheet-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; color: var(--btn-primary-bg); background: var(--brand-soft); }
.service-sheet-icon .ui-icon { width: 24px; height: 24px; }
.service-sheet-section { display: grid; }
.service-sheet-caption { margin: 0 0 8px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.service-sheet-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.service-sheet-item-copy { display: grid; gap: 6px; flex: 1 1 220px; min-width: 0; }
.service-sheet-item-copy strong { color: var(--text-primary); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.service-sheet-item-copy > span { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; font-variant-numeric: tabular-nums; }
.service-sheet-item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.service-sheet-item-actions > :is(.btn-primary, .btn-secondary) { flex: 0 1 auto; width: auto; padding: 0 16px; text-decoration: none; }
.service-sheet-add { display: grid; gap: 8px; }
.service-sheet-add-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 550; text-align: left; cursor: pointer; }
.service-sheet-add-btn:hover { border-color: var(--btn-primary-bg); background: var(--brand-soft); }
.service-sheet-add-btn:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.service-sheet-add-btn .ui-icon { flex: none; width: 20px; height: 20px; color: var(--btn-primary-bg); }
.order-work-item, .order-add-item-form { scroll-margin-top: 16px; }

@media (max-width: 767px) {
  .service-grid-card { padding: 16px 14px 20px; }
  .service-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px 4px; }
  .service-tile-ring { width: 66px; height: 66px; }
  .service-tile-ring > .ui-icon { width: 28px; height: 28px; }
  .service-tile-label { font-size: 10.5px; }
  .service-sheet { padding-inline: 16px; }
}

/* ===== Рабочее место заказа, часть 3: экран приёма тонировки =====
   Слева стоимость, схема стёкол сверху и заметки, справа шаги приёма — как TINT у MobileTechRX.
   Выбор плёнки — строки «Плёнка» / «Затемнение» с синей пилюлей «Выбрать» и листы снизу
   (переиспользуют .service-sheet из части 2). x-show — display только классами. */
.intake-page.is-wide { max-width: 1240px; }
.tint-screen { display: grid; gap: 24px; min-width: 0; }
.tint-screen-main { min-width: 0; }
.tint-screen-aside { display: grid; align-content: start; gap: 16px; min-width: 0; }
.tint-screen-total { display: grid; justify-items: center; gap: 2px; text-align: center; }
.tint-screen-total strong { color: var(--text-primary); font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tint-screen-total span { color: var(--text-muted); font-size: 10.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.tint-screen-legend { display: grid; gap: 6px; color: var(--text-primary); font-size: 13px; }
.tint-screen-legend ul { margin: 0; padding-left: 18px; }
.tint-screen-legend-title { color: var(--text-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.tint-diagram { position: relative; width: min(100%, 270px); margin: 0 auto; aspect-ratio: 240 / 440; }
.tint-diagram-car { display: block; width: 100%; height: 100%; }
.tint-glass { fill: #dfe5ec; stroke: #aeb7c1; stroke-width: 1.4; transition: fill .15s ease; }
.tint-glass.is-selected { fill: #2563eb; fill-opacity: .82; stroke: #1d4ed8; }
.tint-spot { position: absolute; display: grid; place-items: center; width: 38px; height: 38px; transform: translate(-50%, -50%); border: 1.5px solid #9fc0f5; border-radius: 50%; background: white; color: var(--btn-primary-bg); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 2px 6px rgb(15 23 42 / 12%); }
.tint-spot.is-static { pointer-events: none; }
button.tint-spot { width: 44px; height: 44px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.tint-spot:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.tint-spot.is-selected { border-color: white; background: var(--btn-primary-bg); color: white; }

.intake-notes { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-0); }
.intake-notes h3 { margin: 0; color: var(--text-primary); font-size: 15px; font-weight: 650; }
.intake-notes .hint { margin: -6px 0 0; }
.intake-notes-list { display: grid; gap: 8px; }
.intake-note { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text-primary); font: inherit; font-size: 13.5px; line-height: 1.3; text-align: left; cursor: pointer; }
.intake-note:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.intake-note-box { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid #9fb0c3; border-radius: 6px; color: transparent; }
.intake-note-box .ui-icon { width: 14px; height: 14px; stroke-width: 3; }
.intake-note.is-checked { border-color: var(--btn-primary-bg); background: var(--brand-soft); }
.intake-note.is-checked .intake-note-box { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.intake-notes .intake-note-custom { margin: 0; }
.intake-notes .intake-note-custom textarea { width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; font-size: 15px; resize: vertical; }
.intake-notes > .btn-secondary { justify-self: start; width: auto; padding: 0 16px; }

.tint-picker { display: grid; gap: 6px; min-width: 0; }
.tint-picker-rows { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: white; }
.tint-picker-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.tint-picker-row:last-child { border-bottom: 0; }
.tint-picker-row:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: -2px; }
.tint-picker-label { color: var(--text-secondary); font-size: 13.5px; }
.tint-picker-value { color: var(--text-primary); font-size: 13.5px; font-weight: 700; letter-spacing: .03em; text-align: right; text-transform: uppercase; overflow-wrap: anywhere; }
.tint-picker-value.is-empty { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; border-radius: 7px; background: var(--btn-primary-bg); color: white; font-size: 11px; letter-spacing: .07em; }
.tint-picker-fallback summary { padding: 4px 0; color: var(--text-secondary); font-size: 12.5px; cursor: pointer; }
.tint-picker-fallback select { width: 100%; margin-top: 8px; }
.tint-series-list { display: grid; gap: 8px; }
.tint-series { display: grid; gap: 2px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.tint-series span { font-size: 15px; font-weight: 650; }
.tint-series small { color: var(--text-muted); font-size: 12px; }
.tint-series.is-selected { border-color: var(--btn-primary-bg); background: var(--brand-soft); }
.tint-wheel { display: flex; gap: 14px; padding: 18px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tint-wheel::-webkit-scrollbar { display: none; }
.tint-wheel-item { display: grid; place-items: center; align-content: center; flex: none; width: 72px; height: 72px; border: 1.5px solid #9fc0f5; border-radius: 50%; background: white; color: var(--text-secondary); font: inherit; scroll-snap-align: center; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.tint-wheel-item strong { font-size: 17px; font-weight: 600; }
.tint-wheel-item small { font-size: 10px; }
.tint-wheel-item.is-selected { transform: scale(1.18); border-width: 2px; border-color: var(--btn-primary-bg); color: var(--btn-primary-bg); box-shadow: 0 6px 18px rgb(37 99 235 / 22%); }
.tint-wheel-caption { margin: 0; color: var(--text-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.tint-sheet .tint-wheel-done { width: 100%; }

/* Шаг «Стоимость»: уровни плёнки — карточки, а не мелкие пилюли. */
.intake-card.is-tint .price-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.intake-card.is-tint .price-chip { justify-content: flex-start; min-height: 60px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; font-size: 14px; line-height: 1.3; text-align: left; white-space: normal; }
.intake-card.is-tint .price-chip.suggested { border-color: #9fc0f5; background: var(--brand-soft); color: var(--text-primary); }
.intake-card.is-tint .price-chip.selected { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; box-shadow: 0 6px 16px rgb(37 99 235 / 24%); }

.order-intake-notes { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid #e0702a; border-radius: 8px; background: #fff7ef; color: var(--text-primary); font-size: 13px; }
.order-intake-notes-title { color: #9a4a12; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.order-intake-notes ul { margin: 4px 0 0; padding-left: 18px; }

@media (min-width: 1024px) {
  .tint-screen { grid-template-columns: minmax(270px, 330px) minmax(0, 1fr); align-items: start; }
  .tint-screen-aside { position: sticky; top: 16px; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .tint-screen-aside { grid-template-columns: 230px minmax(0, 1fr); align-items: start; column-gap: 24px; }
  .tint-screen-aside > .tint-screen-total { grid-column: 1; }
  .tint-screen-aside > .tint-diagram { grid-column: 1; grid-row: 2 / span 2; width: 100%; }
  .tint-screen-aside > :is(.tint-screen-legend, .intake-notes) { grid-column: 2; }
  .tint-screen-aside > .tint-screen-legend { grid-row: 1 / span 2; align-self: start; }
  .tint-screen-aside > .intake-notes { grid-row: 3; }
}
@media (max-width: 599px) {
  .tint-diagram { width: min(100%, 220px); }
}
.tint-screen-aside { padding: 22px 20px 0; }
.tint-screen.is-summary { padding: 22px 20px 24px; }
.tint-screen.is-summary .tint-screen-aside { padding: 0; }
@media (min-width: 1024px) {
  .tint-screen-aside { padding: 28px 0 28px 28px; }
  .tint-screen.is-summary { padding: 28px 32px; }
}

/* ===== Рабочее место заказа, часть 4: экран приёма PPF и винила =====
   Силуэт сбоку с зонами кузова (подсветка выбранного, нажатие — где оно что-то отмечает),
   детали строками с галочкой, пакеты карточками с мини-силуэтом. Колонки и заметки — общие
   с экраном тонировки (.tint-screen*). */
.ppf-diagram-wrap { width: 100%; max-width: 420px; margin: 0 auto; }
.ppf-diagram { display: block; width: 100%; height: auto; }
.ppf-zone { fill: #eef1f5; stroke: #b9c2cd; stroke-width: 1.2; stroke-linejoin: round; transition: fill .15s ease; }
.ppf-zone.is-selected { fill: #2563eb; stroke: #1d4ed8; }
.ppf-zone-arch { fill: none; stroke: #b9c2cd; stroke-width: 9; }
.ppf-zone-arch.is-selected { fill: none; stroke: #2563eb; }
.ppf-zone.is-action { cursor: pointer; }
.ppf-zone.is-action:hover { fill: #cfe0ff; }
.ppf-zone.is-action.is-selected:hover { fill: #1d4ed8; }
.ppf-zone-arch.is-action:hover { fill: none; stroke: #9fc0f5; }
.ppf-zone-arch.is-action.is-selected:hover { fill: none; stroke: #1d4ed8; }
.ppf-zone.is-action:focus-visible { outline: none; stroke: #0f172a; stroke-width: 2.4; }
.ppf-glass { fill: #2f3b47; stroke: #fff; stroke-opacity: .5; stroke-width: 1.2; pointer-events: none; }

.ppf-price-choice { grid-template-columns: auto minmax(0, 1fr) auto; }
.ppf-price-check { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 1.5px solid #9fb0c3; border-radius: 6px; color: transparent; background: white; }
.ppf-price-check .ui-icon { width: 14px; height: 14px; stroke-width: 3; }
.ppf-price-row.selected .ppf-price-check, .ppf-package-card.selected .ppf-price-check { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }

.ppf-package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ppf-package-card { display: grid; gap: 8px; align-content: start; min-height: 44px; padding: 12px 12px 14px; border: 1px solid var(--border-strong); border-radius: 14px; background: white; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.ppf-package-card:hover { border-color: #9fc0f5; }
.ppf-package-card.selected { border-color: var(--btn-primary-bg); background: var(--brand-soft); box-shadow: 0 6px 16px rgb(37 99 235 / 16%); }
.ppf-package-card .ppf-diagram { pointer-events: none; }
.ppf-package-name { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

@media (min-width: 1024px) {
  .tint-screen-aside.is-ppf .ppf-diagram-wrap { max-width: none; }
}
@media (min-width: 600px) and (max-width: 1023px) {
  /* У силуэта сбоку ширина важнее высоты: он занимает всю строку над списком и заметками. */
  .tint-screen-aside.is-ppf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tint-screen-aside.is-ppf > :is(.tint-screen-total, .ppf-diagram-wrap) { grid-column: 1 / -1; grid-row: auto; }
  .tint-screen-aside.is-ppf > .tint-screen-legend { grid-column: 1; grid-row: auto; }
  .tint-screen-aside.is-ppf > .intake-notes { grid-column: 2; grid-row: auto; }
}

/* ===== Рабочее место заказа, часть 5: фото по схеме =====
   Вкладки мест и ячейки вокруг машины «вид сверху» — как PHOTOS у MobileTechRX. Сетка из трёх
   колонок тянется от ширины блока, поэтому одна раскладка работает и на вкладке «Фото», и в
   узкой колонке приёма авто. Панели вкладок — x-show, display только классом. */
.photo-diagram { display: grid; gap: 14px; margin: 14px 0 4px; }
.photo-diagram-tabs { display: inline-flex; justify-self: center; max-width: 100%; padding: 3px; overflow-x: auto; border: 1px solid var(--border); border-radius: 11px; background: white; }
.photo-diagram-tabs button { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 11.5px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; }
.photo-diagram-tabs button.active { color: white; background: var(--btn-primary-bg); }
.photo-diagram-tabs button:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.photo-diagram-tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--brand-soft); color: var(--btn-primary-bg); font-size: 11px; letter-spacing: 0; }
.photo-diagram-tabs button.active .photo-diagram-tab-count { background: rgb(255 255 255 / 22%); color: white; }
.photo-diagram-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 520px; margin: 0 auto; }
.photo-diagram-car { display: grid; place-items: center; min-height: 0; }
.photo-diagram-car-svg { display: block; width: auto; max-width: 100%; height: 100%; max-height: 280px; }
.photo-slot { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-width: 0; min-height: 104px; padding: 6px 6px 8px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; color: var(--text-primary); font: inherit; text-align: center; }
button.photo-slot { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s ease, box-shadow .15s ease; }
button.photo-slot:hover { border-color: #9fc0f5; box-shadow: 0 4px 14px rgb(37 99 235 / 12%); }
button.photo-slot:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
button.photo-slot:disabled { opacity: .55; cursor: default; }
.photo-slot.has-photo { border-color: var(--btn-primary-bg); }
.photo-slot-thumb { position: relative; display: grid; place-items: center; min-height: 62px; overflow: hidden; border-radius: 8px; background: #4a5057; color: rgb(255 255 255 / 85%); }
.photo-slot-thumb .ui-icon { width: 26px; height: 26px; }
.photo-slot-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-slot-count { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--btn-primary-bg); color: white; font-size: 11px; font-weight: 700; }
.photo-slot-label { color: var(--text-secondary); font-size: 10px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; overflow-wrap: anywhere; }
.photo-slot.has-photo .photo-slot-label { color: var(--text-primary); }
.photo-diagram-hint { margin: 0; text-align: center; }
.order-photo-slot { color: var(--text-primary); font-size: 12px; font-weight: 650; }

.vehicle-hero-photo { display: block; width: 100%; max-width: 560px; overflow: hidden; border-radius: 12px; box-shadow: 0 8px 24px rgb(22 28 36 / 14%); }
.vehicle-hero-photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

@media (max-width: 480px) {
  .photo-diagram-grid { gap: 6px; }
  .photo-diagram-tabs button { padding: 0 11px; font-size: 10.5px; letter-spacing: .04em; }
  .photo-slot { min-height: 92px; padding: 5px 4px 6px; }
  .photo-slot-thumb { min-height: 52px; }
  .photo-slot-label { font-size: 9px; letter-spacing: .02em; }
}
/* Ячейки не растягиваются на высоту машины: в ряду с машиной они стоят по центру. */
.photo-slot { align-self: center; }
.photo-diagram-car-svg { min-height: 190px; max-height: 240px; }

/* ===== Форма «Новая запись» в стиле MobileTechRX (часть 6) =====
   Тёмная шапка, три экрана (Авто / Услуги / Время) с нижней панелью вкладок. На планшете и
   телефоне форма занимает весь экран, на компьютере — большое окно по центру. Экраны
   переключает Alpine x-show, поэтому display задаётся только классами. */
.workspace-body .booking-overlay { padding: 20px; }
.booking-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; width: min(1080px, 100%); height: min(820px, 100%); overflow: hidden; border-radius: 20px; background: var(--surface-0); box-shadow: 0 24px 80px rgb(22 28 36 / 30%); }
.booking-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 60px; padding: 0 14px; color: var(--header-text); background: var(--header-bg-solid); background-image: var(--header-bg); }
.workspace-body .booking-header h2 { margin: 0; color: var(--header-text); font-size: 13px; font-weight: 650; letter-spacing: .09em; text-align: center; text-transform: uppercase; }
.booking-header-btn { display: grid; place-items: center; justify-self: start; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--header-text); cursor: pointer; }
.booking-header-btn:hover { background: var(--header-control); }
.booking-header-btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.booking-header-step { justify-self: end; padding-right: 6px; color: var(--header-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.booking-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px; }
.booking-pane { display: grid; gap: 18px; align-content: start; min-width: 0; }
.booking-pane-vehicle, .booking-pane-time { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
.booking-hero { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 300px; padding: 24px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: radial-gradient(ellipse 70% 55% at 50% 60%, #ffffff 0%, #f1f3f6 72%, #eaedf1 100%); text-align: center; }
.booking-hero-car { display: block; width: 100%; max-width: 440px; height: auto; }
.booking-hero-title { margin: 6px 0 0; color: var(--text-primary); font-size: 26px; font-weight: 500; letter-spacing: -.01em; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
.booking-hero-caption { margin: 0; color: var(--text-muted); font-size: 12px; }
.booking-panel { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 18px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--card-shadow); }
.booking-section-title { margin: 0 0 8px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.booking-panel > .booking-section-title:not(:first-child) { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--border); }
.booking-panel .field { margin-bottom: 10px; }
.booking-panel :is(input:not([type="checkbox"]), select), .booking-pane-services :is(input:not([type="checkbox"]), select) { width: 100%; }
.booking-wide-btn { width: 100%; margin: 0 0 6px; }
.booking-client-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-0); }
.booking-client-chip div { display: grid; gap: 2px; min-width: 0; }
.booking-client-chip strong { font-size: 15px; }
.booking-client-chip span { color: var(--text-secondary); font-size: 13px; }
.booking-client-matches { margin-top: 8px; }

.booking-pane-services { padding: 18px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--card-shadow); }
.booking-services-head .hint { margin: 0; }
.booking-pane-services .service-grid { margin-top: 4px; }
.service-tile.is-open:not(.is-active) .service-tile-ring { border-width: 2.5px; border-color: var(--btn-primary-bg); background: var(--brand-soft); }
.booking-service-options { display: grid; gap: 8px; }
.booking-service-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.booking-service-option:hover { border-color: #9fc0f5; }
.booking-service-option:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.booking-service-option.selected { border-color: var(--btn-primary-bg); background: var(--brand-soft); }
.booking-service-option.selected .ppf-price-check { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.booking-service-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.booking-service-meta { color: var(--text-secondary); font-size: 12px; white-space: nowrap; }

.booking-quick { display: grid; gap: 8px; margin-top: 6px; }
.booking-quick-label { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.booking-quick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.booking-chip { flex: 1 1 62px; min-width: 56px; min-height: 44px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.booking-chip:hover { border-color: #9fc0f5; }
.booking-chip.active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.booking-chip:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }

.booking-actions { display: flex; gap: 10px; padding: 12px 24px; border-top: 1px solid var(--border); background: white; }
.booking-actions .btn-secondary { flex: 1; }
.booking-actions .btn-primary { flex: 2; }
.booking-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 12px env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: white; }
.booking-tabs .order-workspace-tab { min-height: 58px; }

@media (max-width: 1023px) {
  .workspace-body .booking-overlay { padding: 0; }
  .booking-screen { width: 100%; height: 100%; max-height: none; border-radius: 0; }
}
@media (max-width: 767px) {
  .booking-pane-vehicle, .booking-pane-time { grid-template-columns: minmax(0, 1fr); }
  .booking-body { padding: 14px 14px 18px; }
  .booking-hero { min-height: 0; padding: 16px 14px; }
  .booking-hero-car { max-width: 300px; }
  .booking-hero-title { font-size: 21px; }
  .booking-panel, .booking-pane-services { padding: 16px 14px 18px; }
  .booking-actions { padding: 10px 14px; }
  .booking-service-option { grid-template-columns: auto minmax(0, 1fr); }
  .booking-service-meta { grid-column: 2; white-space: normal; }
}

/* ===== Экран PPF и винила: крупная детальная машина, список деталей уже (доработка) =====
   Перед машины справа: светлая фара, красный задний фонарь, руль, подписи «ЗАД / ПЕРЕД».
   Цвета фары, фонаря и ручек — только у невыбранных зон; выбранная зона всегда синяя. */
.ppf-zone { fill: #f4f6f8; stroke: #9aa5b1; stroke-width: 1.3; }
.ppf-zone[data-zone="tail"]:not(.is-selected) { fill: #e0554f; stroke: #a8322d; }
.ppf-zone:is([data-zone="headlight"], [data-zone="fog"]):not(.is-selected) { fill: #ffefb0; stroke: #c39a2c; }
.ppf-zone[data-zone="handles"]:not(.is-selected) { fill: #6b7580; stroke: #4c555f; }
.ppf-zone[data-zone="mirror"]:not(.is-selected) { fill: #dde2e8; }
.ppf-zone[data-zone="sill"]:not(.is-selected) { fill: #e4e8ed; }
.ppf-zone.is-action:hover { filter: brightness(.93); }
.ppf-decor { pointer-events: none; }
.ppf-diagram-labels text { fill: #65717d; font-size: 15px; font-weight: 700; letter-spacing: .12em; }
.ppf-diagram-labels path { fill: #65717d; }
.tint-screen-aside.is-ppf .ppf-diagram-wrap { max-width: 640px; }

@media (min-width: 1024px) {
  /* Список не уже 440px: иначе строка «название · цена · количество» ломается на три этажа. */
  .tint-screen.is-ppf { grid-template-columns: minmax(0, 1.15fr) minmax(440px, 1fr); }
  /* Колонка с машиной прилипает к экрану и прокручивается сама, если заметки не помещаются. */
  .tint-screen-aside.is-ppf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; scrollbar-width: thin; }
  .tint-screen-aside.is-ppf > :is(.tint-screen-total, .ppf-diagram-wrap) { grid-column: 1 / -1; }
  .tint-screen-aside.is-ppf > .tint-screen-legend { grid-column: 1; }
  .tint-screen-aside.is-ppf > .intake-notes { grid-column: 2; }
  .tint-screen.is-ppf.is-summary .tint-screen-aside { max-height: none; overflow: visible; position: static; }
}
.tint-screen-legend { align-content: start; }

/* ===== Рисунки автомобилей (часть 8) =====
   Схема стёкол тонировки — развёртка (вид сверху и оба бока), поэтому она шире прежней; выбор
   кузова для рисунка в карточке авто — плитки с мини-силуэтами. */
.tint-diagram { width: min(100%, 420px); aspect-ratio: 452 / 460; }
.tint-glass[data-action] { cursor: pointer; }
/* Кружок меньше, чтобы не закрывать стекло; зона нажатия кнопки остаётся 44px за счёт ::after. */
.tint-spot, button.tint-spot { width: 32px; height: 32px; font-size: 10px; }
button.tint-spot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.car-unfolded-side .tint-glass { stroke-width: 2.1; }
.car-unfolded-labels text { fill: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.photo-diagram-car-svg { min-height: 200px; max-height: 260px; }
@media (min-width: 1024px) {
  .tint-screen.is-tint { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
}
@media (min-width: 600px) and (max-width: 1023px) {
  .tint-screen-aside:not(.is-ppf) { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .tint-diagram { width: min(100%, 420px); }
}

.body-shape-picker { display: grid; gap: 8px; min-width: 0; margin: 4px 0 16px; padding: 0; border: 0; }
.body-shape-picker legend { padding: 0; color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.body-shape-picker .hint { margin: 0; }
.body-shape-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.body-shape-option { position: relative; display: block; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.body-shape-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.body-shape-tile { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 84px; padding: 8px 6px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; text-align: center; transition: border-color .15s ease, background-color .15s ease; }
.body-shape-car { display: block; width: 100%; max-width: 120px; height: auto; }
.body-shape-auto { display: grid; place-items: center; width: 100%; max-width: 120px; aspect-ratio: 640 / 252; color: var(--text-muted); }
.body-shape-auto .ui-icon { width: 28px; height: 28px; }
.body-shape-name { color: var(--text-primary); font-size: 12px; font-weight: 600; line-height: 1.2; }
.body-shape-option input:checked + .body-shape-tile { border-color: var(--btn-primary-bg); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--btn-primary-bg); }
.body-shape-option input:focus-visible + .body-shape-tile { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
@media (max-width: 420px) {
  .body-shape-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Схема зон PPF на седане из CarSilhouette (часть 9). */
.ppf-hit { fill: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ppf-zone.ppf-zone-arch { fill: none; stroke: #dce1e7; stroke-width: 8; }
.ppf-zone.ppf-zone-arch.is-selected { fill: none; stroke: #2563eb; }
.ppf-zone.ppf-zone-arch.is-action:hover { fill: none; }
.ppf-glass-screen { fill: #55626f; }
.ppf-zone[data-zone="handles"]:not(.is-selected) { fill: #e6eaef; stroke: #9aa5b1; }

/* ===== Доработки по замечаниям (часть 10) ===== */
/* Новая запись на компьютере — компактное окно по содержимому, а не во весь экран. */
@media (min-width: 1024px) {
  .booking-screen { width: min(860px, 100%); height: auto; max-height: min(760px, 100%); }
  .booking-body { padding: 18px 20px; }
  .booking-pane { gap: 14px; }
  .booking-pane-vehicle, .booking-pane-time { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .booking-hero { min-height: 0; padding: 18px 16px; gap: 4px; }
  .booking-hero-car { max-width: 300px; }
  .booking-hero-title { font-size: 20px; }
  .booking-panel, .booking-pane-services { padding: 16px 18px; }
  .booking-actions { padding: 10px 20px; }
  .booking-tabs .order-workspace-tab { min-height: 52px; }
}

/* Окно записи в планировщике и окно новой работы в заказе: шапка с крестиком, факты строками,
   одно главное действие крупно, остальное — второй ряд, отмена — тихой ссылкой внизу. */
.qa-overlay { display: grid; place-items: center; }
.qa-card { display: grid; gap: 14px; width: 520px; max-width: 100%; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 20px 22px 22px; border-radius: 18px; background: white; box-shadow: 0 24px 80px rgb(22 28 36 / 28%); }
.qa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.qa-head-text { min-width: 0; }
.qa-kicker { margin: 0 0 4px; color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.workspace-body .qa-title { margin: 0; color: var(--text-primary); font-size: 20px; font-weight: 700; line-height: 1.25; }
.qa-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text-secondary); cursor: pointer; }
.qa-close:hover { background: var(--surface-0); }
.qa-facts { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-0); }
.qa-facts div { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; }
.qa-facts dt { display: grid; place-items: center; color: var(--text-muted); }
.qa-facts dt .ui-icon { width: 18px; height: 18px; }
.qa-facts dd { margin: 0; color: var(--text-primary); font-size: 14px; overflow-wrap: anywhere; }
.qa-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-actions { display: grid; gap: 10px; }
.qa-main { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 50px; font-size: 15px; text-decoration: none; }
.qa-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.qa-row > :is(a, button) { display: inline-flex; align-items: center; justify-content: center; width: 100%; margin: 0; text-decoration: none; white-space: nowrap; }
.qa-row .btn-secondary.is-on { border-color: var(--btn-primary-bg); color: var(--btn-primary-bg); }
.qa-cancel { justify-self: center; min-height: 44px; padding: 0 14px; border: 0; background: transparent; color: var(--danger-bg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.qa-cancel:hover { text-decoration: underline; }
.qa-reschedule { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.qa-reschedule .qa-row { margin-top: 10px; }
.qa-card .field { margin-bottom: 0; }
.qa-card .field-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.qa-card .field-row .field { min-width: 0; }
.qa-card .field-row input { width: 100%; min-width: 0; }
@media (max-width: 599px) {
  .workspace-body .modal-overlay.qa-overlay { align-items: end; padding: 0; }
  .qa-card { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .qa-card .field-row { grid-template-columns: 1fr 1fr; }
  .qa-card .field-row .field:first-child { grid-column: 1 / -1; }
}

/* Общая «Тонировка» на приёме: группы стёкол из всего прайса тонировки (часть 10). */
.general-tint-group { display: grid; gap: 8px; margin-bottom: 16px; }
.general-tint-group-title { margin: 0; color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.general-tint-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--text-primary); font-size: 14px; }
.general-tint-element { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.general-tint-element-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.general-tint-chip { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 4px; }
.general-tint-chip-label, .general-tint-step { min-height: 40px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.general-tint-step { width: 32px; font-size: 18px; font-weight: 700; }
.general-tint-step:disabled { opacity: .35; cursor: not-allowed; }
.general-tint-qty { font-size: 13px; font-weight: 700; white-space: nowrap; }
@media (max-width: 599px) { .general-tint-element { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.general-tint-element { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.general-tint-element .price-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.general-tint-element .price-chip { width: auto; min-height: 40px; padding: 0 12px; font-size: 13px; }
.general-tint-element .price-chip.general-tint-chip { padding: 0 6px 0 4px; }

/* Общая тонировка: стёкла нажатием на схему и списком, как TINT у MobileTechRX (11.11.2026). */
.tint-pick { display: grid; gap: 10px; margin-bottom: 14px; }
.tint-pick-tiers { display: flex; flex-wrap: wrap; gap: 8px; }
.tint-pick-tier { min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: white; color: var(--text-primary); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.tint-pick-tier.is-active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.tint-pick-list { display: grid; margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: white; }
.tint-pick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.tint-pick-row:last-child { border-bottom: 0; }
.tint-pick-check { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; text-align: left; cursor: pointer; }
.tint-pick-box { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1.5px solid #9fb0c3; border-radius: 6px; color: transparent; }
.tint-pick-box .ui-icon { width: 15px; height: 15px; stroke-width: 3; }
.tint-pick-row.is-checked .tint-pick-box { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.tint-pick-sides { display: inline-flex; flex: none; gap: 6px; }
.tint-pick-side { min-width: 64px; min-height: 44px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: white; color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; cursor: pointer; }
.tint-pick-side.is-active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.tint-pick-check:focus-visible, .tint-pick-side:focus-visible, .tint-pick-tier:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; }
.tint-pick-more { margin-top: 4px; }
.tint-pick-more > summary { min-height: 44px; display: flex; align-items: center; color: var(--btn-primary-bg); font-size: 14px; font-weight: 600; cursor: pointer; }
.tint-pick-more[open] > summary { margin-bottom: 10px; }
.tint-diagram .tint-spot:not(.is-static) { cursor: pointer; }
@media (max-width: 420px) { .tint-pick-side { min-width: 54px; padding: 0 6px; } }
.tint-pick-count { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 4px; border: 1px solid var(--border-strong); border-radius: 8px; background: white; color: var(--text-secondary); font-size: 12px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.tint-pick-count.is-active { border-color: var(--btn-primary-bg); color: var(--btn-primary-bg); }
.tint-pick-count button { width: 32px; min-height: 40px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 18px; cursor: pointer; }
.tint-pick-count button:disabled { opacity: .35; cursor: not-allowed; }

/* Узкая колонка (iPad в альбоме): кнопки сторон уходят под название, а не обрезаются. */
.tint-pick-row { flex-wrap: wrap; row-gap: 4px; }
.tint-pick-check { flex: 1 1 150px; }
.tint-pick-sides { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.tint-pick-sides { flex: 0 1 auto; max-width: 100%; }

/* Переключатель «Нужен счёт (НДС)» в окне «Принять оплату» — строка во всю ширину. */
.order-payment-invoice.is-in-modal { width: 100%; justify-content: space-between; margin: 0 0 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-0); color: var(--text-primary); font-size: 14px; font-weight: 600; }

/* Готовые цвета машины под полем «Цвет» (x-ui.color-choices). */
.color-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.color-choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text-primary); font: inherit; font-size: 13px; cursor: pointer; }
.color-choice:hover { border-color: var(--border-strong); }
.color-choice.is-selected { border-color: var(--btn-primary-bg); box-shadow: 0 0 0 1px var(--btn-primary-bg) inset; color: var(--btn-primary-bg); font-weight: 600; }
.color-choice-swatch { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.vehicle-info-form-grid .field.is-wide { grid-column: 1 / -1; }

/* Заметки приёма свёрнуты: на планшете раскрываются по нажатию на «Заметки», отмеченное видно в заголовке. */
.intake-notes { gap: 0; padding: 0; }
.intake-notes-summary { display: grid; gap: 8px; padding: 12px 16px; min-height: 48px; list-style: none; cursor: pointer; }
.intake-notes-summary::-webkit-details-marker { display: none; }
.intake-notes-summary:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: -2px; border-radius: var(--radius); }
.intake-notes-head { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.intake-notes-title { color: var(--text-primary); font-size: 15px; font-weight: 650; }
.intake-notes-count { padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--btn-primary-bg); font-size: 12px; font-weight: 600; }
.intake-notes-count.is-empty { background: transparent; color: var(--text-muted); font-weight: 500; padding: 0; }
.intake-notes-chevron { width: 9px; height: 9px; margin-left: auto; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg) translateY(-3px); transition: transform .15s ease; }
.intake-notes[open] .intake-notes-chevron { transform: rotate(-135deg) translateY(-3px); }
.intake-notes-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.intake-notes-picked span { padding: 4px 10px; border-radius: 999px; background: white; border: 1px solid var(--border); color: var(--text-primary); font-size: 12.5px; }
.intake-notes[open] .intake-notes-picked { display: none; }
.intake-notes-body { display: grid; gap: 10px; padding: 0 16px 16px; }
.intake-notes-body > .hint { margin: 0; }
.intake-notes-body > .btn-secondary { justify-self: start; width: auto; padding: 0 16px; }

/* Шаг 1 приёма: фото автомобиля в левой колонке под машиной, заметки справа под мастером. */
.tint-screen-aside > .order-photos { grid-column: 1 / -1; grid-row: auto; margin: 0; min-width: 0; }
.intake-body > .intake-notes { margin: 4px 0 16px; }
@media (min-width: 1024px) {
  /* На шаге 1 справа только госномер, мастер и заметки: левой колонке с машиной и фото — половина экрана,
     и она не прокручивается отдельно, чтобы ячейки фото не прятались. */
  .tint-screen.is-step-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tint-screen.is-step-1 .tint-screen-aside { position: static; max-height: none; overflow: visible; }
}
/* В колонке шага 1 госномер и кнопка распознавания переносятся друг под друга, если места мало. */
.tint-screen.is-step-1 .intake-plate-controls { display: flex; flex-wrap: wrap; }
.tint-screen.is-step-1 .intake-plate-input { flex: 1 1 200px; min-width: 0; }
.tint-screen.is-step-1 .intake-camera { flex: 1 1 auto; }

/* ===== Компактная страница заказа (12.11.2026) ===== */
/* Действия заказа — нижняя строка шапки, а не отдельная карточка. */
.order-workspace-strip .order-workspace-actions { margin-top: 12px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: transparent; box-shadow: none; }
.order-workspace-actions-row > :is(.btn-primary, .btn-secondary) { flex: 0 0 auto; width: auto; padding: 0 18px; }
.order-cancel-link { flex: 0 0 auto; min-height: 44px; margin-left: auto; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: #b4232c; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.order-cancel-link:hover { background: #fdecec; }
.order-cancel-link:focus-visible { outline: 2px solid #b4232c; outline-offset: 2px; }

/* Сетка услуг плотнее: меньше круги и отступы. */
.service-grid-card { padding: 16px 20px 18px; }
.service-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 12px 2px; margin-top: 12px; }
.service-tile { gap: 4px; padding: 4px 2px; }
.service-tile-ring { width: 60px; height: 60px; }
.service-tile-ring > .ui-icon { width: 26px; height: 26px; }
.service-tile-label { font-size: 10px; letter-spacing: .02em; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.service-tile-sum { font-size: 11.5px; }

/* Позиция заказа: отметки приёма строкой плашек, меньше отступов. */
.workspace-body .order-work-item { padding: 18px 20px; }
.order-intake-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 12px; }
.order-intake-notes-title { margin-right: 4px; }
.order-intake-note-chip { padding: 3px 10px; border-radius: 999px; background: white; border: 1px solid #f3d3b8; font-size: 12.5px; }

/* Зарплата и чек-лист: рядом на широком экране. */
.order-work-panels { display: grid; gap: 16px; margin-top: 16px; min-width: 0; }
.order-work-panels > div { min-width: 0; }
.order-work-panels .order-payroll, .order-work-panels .ppf-checklist { margin-top: 0; }
.order-work-panel-side { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1400px) {
  .order-work-panels.has-side { grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.1fr); align-items: start; }
}

/* ===== Планировщик: компактный верх и три дорожки рядом на планшете (12.11.2026) =====
   Заголовок страницы спрятан (он есть в тёмной шапке), панель — одной тонкой строкой.
   С 768px дневной вид показывает Тонировку, PPF и Другое рядом, без вкладок: весь цех
   за день виден сразу. Метки часов — только у первой дорожки, чтобы не тратить ширину. */
.planner-page .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.workspace-body .planner-toolbar { padding: 6px 8px; gap: 8px; margin-bottom: 12px; border-radius: 12px; }
.workspace-body .planner-toolbar .btn-primary { margin-left: 0; }
.workspace-body .planner-range-label { font-size: 13px; }
.workspace-body .planner-week-legend { gap: 12px; margin-bottom: 8px; font-size: 12px; }
.workspace-body .planner-lane-tabs { margin-bottom: 8px; }

@media (min-width: 768px) {
  .workspace-body .planner-day-lanes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 8px; }
  .workspace-body .planner-day-lanes .planner-master + .planner-master { margin-top: 0; }
  .workspace-body .planner-day-lanes .lane-hidden { display: block; }
  .workspace-body .planner-day-lanes .planner-master { border-radius: 12px; }
  .workspace-body .planner-lane-tabs.is-day { display: none; }
  .workspace-body .planner-day-lanes .planner-master-header { padding: 8px 10px; gap: 8px; }
  .workspace-body .planner-day-lanes .planner-master-header .avatar { width: 26px; height: 26px; font-size: 12px; }
  .workspace-body .planner-day-lanes .planner-master-header .staff-name { font-size: 14px; }
  .workspace-body .planner-day-lanes .day-timeline { padding: 10px 6px 12px; gap: 6px; }
  .workspace-body .planner-day-lanes .planner-master + .planner-master .day-timeline-hours { display: none; }
  .workspace-body .planner-day-lanes .planner-master + .planner-master .day-timeline { padding-left: 8px; }
  .workspace-body .planner-day-lanes .day-timeline-hours { width: 34px; }
  .workspace-body .planner-day-lanes .day-timeline-card { padding: 3px 6px; }
  .workspace-body .planner-day-lanes .day-timeline-slot-btn { font-size: 11px; }
}

/* На узком планшете подпись даты повторяет поле даты — прячем, чтобы панель осталась одной строкой. */
@media (min-width: 768px) and (max-width: 1023px) {
  .workspace-body .planner-range-label { display: none; }
  .workspace-body .planner-range-date-input { width: 132px; padding-inline: 8px; }
  .workspace-body .planner-toolbar .planner-nav { gap: 6px; }
}
/* Телефон: две строки — «День/Неделя» и «Новая запись», ниже навигация по датам во всю ширину. */
@media (max-width: 767px) {
  .workspace-body .planner-range-label { display: none; }
  .workspace-body .planner-toolbar .planner-mode-toggle { order: 1; }
  .workspace-body .planner-toolbar .btn-primary { order: 2; margin-left: auto; }
  .workspace-body .planner-toolbar .planner-nav { order: 3; width: 100%; }
  .workspace-body .planner-toolbar .planner-range-date-input { flex: 1; min-width: 0; width: auto; }
}

/* ===== Планировщик: строка дней, занятость мастеров, цвет по состоянию (12.11.2026) ===== */
:root { --st-waiting: #d4891c; --st-waiting-bg: #fdf5e6; --st-ready: #3b6fe0; --st-ready-bg: #eef3fd; --st-progress: #23926a; --st-progress-bg: #e7f6ef; --st-done: #8a939d; --st-done-bg: #f1f3f5; }

.planner-day-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.planner-day-strip-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 4px 6px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text-primary);
  transition: border-color .15s ease, background .15s ease;
}
.planner-day-strip-btn:hover { border-color: #9db6ef; }
.planner-day-strip-wd { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.planner-day-strip-btn strong { font-size: 16px; font-weight: 750; line-height: 1; }
.planner-day-strip-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--st-ready-bg); color: var(--st-ready); font-size: 11px; font-weight: 700; }
.planner-day-strip-btn.is-free .planner-day-strip-count { background: transparent; color: var(--text-muted); font-weight: 500; }
.planner-day-strip-btn.is-today strong { color: var(--btn-primary-bg); }
.planner-day-strip-btn.is-selected { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: #fff; box-shadow: 0 2px 6px rgb(35 91 233 / 24%); }
.planner-day-strip-btn.is-selected .planner-day-strip-wd, .planner-day-strip-btn.is-selected strong { color: #fff; }
.planner-day-strip-btn.is-selected .planner-day-strip-count { background: rgb(255 255 255 / 22%); color: #fff; }

.workspace-body .planner-status-legend { margin: 0 0 10px; }
.planner-week-legend-dot.status-waiting { background: var(--st-waiting); }
.planner-week-legend-dot.status-ready { background: var(--st-ready); }
.planner-week-legend-dot.status-in-progress { background: var(--st-progress); }
.planner-week-legend-dot.status-done { background: var(--st-done); }

.planner-masters { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.planner-master-load { min-width: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.planner-master-load-head { display: grid; gap: 1px; margin-bottom: 5px; min-width: 0; }
.planner-master-load-head strong { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planner-master-load-head span { font-size: 11px; font-weight: 600; color: var(--st-progress); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planner-master-load.is-busy .planner-master-load-head span { color: var(--st-waiting); }
.planner-master-load:not(.is-free):not(.is-busy) .planner-master-load-head span { color: var(--text-secondary); }
.planner-master-load.is-free .planner-master-load-head span { color: var(--st-progress); }
.planner-master-load-bar { position: relative; height: 8px; border-radius: 999px; background: #e9f5ef; overflow: hidden; }
.planner-master-load-bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--st-waiting); }

/* Неделя: цвет карточки — состояние работы. */
.planner-week-card.status-waiting { border-color: var(--st-waiting); background: var(--st-waiting-bg); }
.planner-week-card.status-ready { border-color: var(--st-ready); background: var(--st-ready-bg); }
.planner-week-card.status-in-progress { border-color: var(--st-progress); background: var(--st-progress-bg); }
.planner-week-card.status-done { border-color: #c7cdd3; background: var(--st-done-bg); color: var(--text-secondary); }
/* День: цвет дорожки остаётся, состояние — полоса слева. */
.day-timeline-card.status-waiting { border-left: 4px solid var(--st-waiting); }
.day-timeline-card.status-ready { border-left: 4px solid var(--st-ready); }
.day-timeline-card.status-in-progress { border-left: 4px solid var(--st-progress); }
.day-timeline-card.status-done { border-left: 4px solid var(--st-done); opacity: .75; }

@media (max-width: 767px) {
  .planner-day-strip { gap: 4px; }
  .planner-day-strip-btn { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px 2px; border-radius: 10px; }
  .planner-day-strip-btn strong { font-size: 15px; }
  .planner-day-strip-wd { font-size: 9.5px; }
}

/* ===== Склад плёнки — таблица остатков (12.11.2026, переделка) =====
   Одна таблица вместо смеси строк и карточек: раздел (категория) → серия (раскрывается) →
   вариант. Числа выровнены вправо и одной ширины цифр, статус — текстом и цветом,
   строка ~52px, вся строка ведёт на карточку плёнки. Сверху сводка, ниже одна панель поиска. */
.stock { --stock-cols: minmax(0, 1fr) 120px 112px 116px 40px; }
.stock .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.stock-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 10px; }
.stock-kpis { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.stock-kpi {
  display: grid; align-content: center; gap: 2px; padding: 11px 16px; text-align: left; font-family: inherit; color: var(--text-primary);
  border: 0; border-right: 1px solid var(--border); background: transparent;
}
.stock-kpi:last-child { border-right: 0; }
button.stock-kpi { cursor: pointer; transition: background .15s ease; }
button.stock-kpi:hover { background: var(--surface-0); }
.stock-kpi.is-active { background: #eef3fd; box-shadow: inset 0 -3px 0 var(--btn-primary-bg); }
.stock-kpi.is-total { background: var(--surface-0); }
.stock-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.stock-kpi strong { font-size: 20px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-kpi strong small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.stock-kpi-sub { font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.stock-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.stock-actions :is(.btn-primary, .btn-secondary) { width: 100%; white-space: nowrap; }

.stock-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: white; }
.stock-search { position: relative; flex: 1 1 260px; min-width: 0; }
.stock-search input { width: 100%; height: 42px; padding: 0 12px 0 38px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 14px; background: white; }
.stock-search input:focus { border-color: #709aef; box-shadow: 0 0 0 3px #235be914; outline: none; }
.stock-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: grid; }
.stock-search-icon .ui-icon { width: 16px; height: 16px; }
.stock-scan { height: 42px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; font-family: inherit; font-size: 13px; font-weight: 650; color: var(--text-primary); cursor: pointer; white-space: nowrap; }
.stock-scan:hover { background: var(--surface-0); }
.stock-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stock-chips.is-attention { padding-left: 8px; border-left: 1px solid var(--border); }
.stock-chip, .stock-filters summary {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: white;
  font-family: inherit; font-size: 12.5px; font-weight: 650; color: var(--text-secondary); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.stock-chip:hover, .stock-filters summary:hover { border-color: #9db6ef; }
.stock-chip.is-empty { color: #b4232c; border-color: #f1c4c4; }
.stock-chip.is-low { color: #9a5b0b; border-color: #f0d6a8; }
.stock-chip.is-reconcile { color: #2a54b8; border-color: #c9d7f5; }
.stock-chip.is-active { color: #fff; background: var(--btn-primary-bg); border-color: var(--btn-primary-bg); }
.stock-filters { min-width: 0; }
.stock-filters summary { list-style: none; }
.stock-filters summary::-webkit-details-marker { display: none; }
.stock-filters[open] { flex-basis: 100%; order: 10; }
.stock-filters[open] summary { color: var(--btn-primary-bg); border-color: #9db6ef; }
.stock-filters-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding-top: 10px; }
.stock-range { min-width: 0; margin: 0; padding: 0; border: 0; }
.stock-range legend, .stock-sort span { margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.stock-range > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stock-range input, .stock-sort select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 13px; background: white; }
.stock-sort { display: grid; min-width: 0; }
.stock-found { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.stock-reset { border: 0; background: none; padding: 4px 0; font-family: inherit; font-size: 12px; font-weight: 650; color: var(--btn-primary-bg); cursor: pointer; }

.stock-table { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.stock-row {
  position: relative; display: grid; grid-template-columns: var(--stock-cols); align-items: center; gap: 12px;
  min-height: 52px; padding: 6px 10px 6px 16px; border-top: 1px solid var(--border); box-sizing: border-box;
}
.stock-row:not(.stock-head):hover { background: #f7f9fd; }
.stock-head { min-height: 38px; border-top: 0; background: var(--surface-0); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.stock-sort-btn { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 0; white-space: nowrap; text-align: left; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.stock-sort-btn:hover { color: var(--text-primary); }
.stock-head .stock-cell-qty { justify-self: end; }
.stock-expand-all { padding: 0; border: 0; background: none; font-family: inherit; font-size: 11px; font-weight: 700; color: var(--btn-primary-bg); cursor: pointer; text-transform: none; letter-spacing: 0; }
.stock-cell { min-width: 0; }
.stock-cell-name { display: grid; gap: 2px; }
.stock-name { font-size: 14px; font-weight: 650; color: var(--text-primary); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.stock-name::after { content: ''; position: absolute; inset: 0; }
.stock-sub { display: flex; flex-wrap: nowrap; gap: 0; overflow: hidden; font-size: 12px; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; }
.stock-sub > * + *::before { content: '·'; margin: 0 6px; color: #b9c0c8; }
.stock-sub-cat { font-weight: 650; color: var(--text-secondary); }
.stock-sub-sku { overflow: hidden; text-overflow: ellipsis; }
.stock-cell-rolls { display: grid; gap: 1px; }
.stock-rolls { font-size: 13px; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stock-reconcile { font-size: 11px; font-weight: 650; color: #2a54b8; white-space: nowrap; }
.stock-cell-qty { justify-self: end; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stock-cell-qty strong { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.stock-unit { font-size: 12px; color: var(--text-muted); }
.stock-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.stock-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock-status.is-ok { color: #1f7a52; background: #e7f6ef; }
.stock-status.is-low { color: #9a5b0b; background: #fdf3e2; }
.stock-status.is-empty { color: #8a4b52; background: #f6eced; }
.stock-status.is-deficit { color: #fff; background: #c2372f; }
.stock-cell-act { justify-self: end; }
.stock-edit { position: relative; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.stock-edit:hover { background: var(--surface-1); color: var(--text-primary); }
.stock-edit .ui-icon { width: 16px; height: 16px; }
.stock-row.is-empty .stock-name, .stock-row.is-empty .stock-cell-qty strong { color: var(--text-muted); }

.stock-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 16px 7px; border-top: 1px solid var(--border); background: #f2f5fa; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.stock-section strong { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-primary); }
.stock-group-head { width: 100%; font-family: inherit; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; background: white; cursor: pointer; color: inherit; }
.stock-group-head .stock-name { display: flex; align-items: center; gap: 6px; }
.stock-chevron { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--surface-1); color: var(--text-secondary); font-size: 14px; line-height: 1; transition: transform .15s ease; }
.stock-group-head[aria-expanded="true"] .stock-chevron { transform: rotate(90deg); }
.stock-group-head[aria-expanded="true"] { background: #f9fbfe; }
.stock-group-body .stock-row.is-child { padding-left: 40px; background: #fbfcfe; }
.stock-group-body .stock-row.is-child::before { content: ''; position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: #dfe6f3; }
.stock-row.is-child .stock-name { font-variant-numeric: tabular-nums; }
.stock-empty { padding: 32px 16px; text-align: center; color: var(--text-secondary); border-top: 1px solid var(--border); }

@container film-stock (max-width: 760px) {
  .stock { --stock-cols: minmax(0, 1fr) 92px 96px 104px 36px; }
  .stock-row { gap: 8px; padding-left: 12px; }
  .stock-group-body .stock-row.is-child { padding-left: 32px; }
  .stock-group-body .stock-row.is-child::before { left: 18px; }
}
@container film-stock (max-width: 560px) {
  .stock-row { grid-template-columns: minmax(0, 1fr) auto 34px; grid-template-areas: "name qty act" "meta status act"; row-gap: 3px; column-gap: 10px; padding: 9px 6px 9px 12px; }
  .stock-head { display: none; }
  .stock-cell-name { grid-area: name; }
  .stock-cell-qty { grid-area: qty; }
  .stock-cell-rolls { grid-area: meta; display: flex; gap: 8px; align-items: center; }
  .stock-cell-status { grid-area: status; justify-self: end; }
  .stock-cell-act { grid-area: act; align-self: center; }
  .stock-status { height: 20px; padding: 0 8px; font-size: 11px; }
  .stock-sub { display: none; }
  .stock-row.is-child .stock-sub, .stock-group-head .stock-sub { display: flex; }
  .stock-group-head { grid-template-areas: "name qty act" "meta status act"; }
}
@media (max-width: 760px) {
  .stock-summary { grid-template-columns: minmax(0, 1fr); }
  .stock-kpis { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stock-kpi { border-bottom: 1px solid var(--border); }
  .stock-kpi:nth-child(2n) { border-right: 0; }
  .stock-kpi.is-total { grid-column: 1 / -1; border-bottom: 0; }
  .stock-actions { flex-direction: row; }
  .stock-actions > * { flex: 1 1 0; min-width: 0; }
  .stock-chips.is-attention { padding-left: 0; border-left: 0; }
  .stock-scan { flex: 1 1 auto; }
  .stock-found { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* История движений плёнки: ссылка на заказ у списаний. */
.movement-order-link { display: inline-block; margin: 2px 0 1px; font-size: 13px; font-weight: 600; color: var(--btn-primary-bg); text-decoration: none; }
.movement-order-link:hover { text-decoration: underline; }
.films-page .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.workspace-body .films-page .warehouse-csv-panel { margin-top: 16px; }
.stock-head .stock-sort-btn { display: inline-flex; }
.stock-row.is-child .stock-name { font-size: 14.5px; font-weight: 750; }
@media (max-width: 560px) {
  .stock-summary { gap: 8px; margin-bottom: 8px; }
  .stock-kpi { padding: 8px 12px; }
  .stock-kpi strong { font-size: 17px; }
  .stock-kpi.is-total .stock-kpi-sub { display: none; }
  .stock-actions :is(.btn-primary, .btn-secondary) { min-height: 42px; padding-inline: 8px; font-size: 13px; }
  .stock-toolbar { gap: 6px; padding: 8px; }
  .stock-search { flex: 1 1 0; }
  .stock-scan { flex: 0 0 44px; width: 44px; padding: 0; font-size: 16px; }
  .stock-scan-text { display: none; }
  .stock-chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .stock-chips::-webkit-scrollbar { display: none; }
  .stock-found { width: auto; margin-left: auto; }
}

/* ===== Карточка плёнки (12.11.2026, переделка) =====
   Шапка с названием, состоянием, характеристиками и действиями; ряд показателей;
   рулоны (с полоской остатка от исходного) и история движений таблицей с отбором. */
.film-page { display: grid; gap: 12px; }
.film-page .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.film-hero { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.film-hero-main { min-width: 0; flex: 1 1 360px; }
.film-hero-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.film-hero-title h1 { margin: 0; font-size: 22px; font-weight: 750; line-height: 1.2; color: var(--text-primary); }
.film-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.film-hero-tags li { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-1); font-size: 12px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.film-hero-tags li.is-category { background: #eef3fd; color: #2a54b8; }
.film-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.film-hero-actions :is(.btn-primary, .btn-secondary) { white-space: nowrap; }
.film-hero-edit { display: inline-flex; align-items: center; gap: 6px; padding-inline: 14px; }
.film-hero-edit .ui-icon { width: 15px; height: 15px; }

.film-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.film-kpi { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 12px 16px; border-right: 1px solid var(--border); }
.film-kpi:last-child { border-right: 0; }
.film-kpi > span { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.film-kpi strong { font-size: 19px; font-weight: 750; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.film-kpi strong small { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.film-kpi em { font-style: normal; font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.film-kpi em.is-warn { color: #2a54b8; font-weight: 650; }
.film-kpi.is-primary { background: #f3f8f5; }
.film-kpi.is-primary strong { color: #1f7a52; }

.film-section { padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.film-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.film-section-head > div > span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.film-section-head h2 { margin: 2px 0 0; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.workspace-body .film-section .roll-inventory .film-rolls-heading { margin-bottom: 12px; }

.film-roll-left { display: block; height: 4px; margin-top: 5px; border-radius: 999px; background: #e7ecf3; overflow: hidden; }
.film-roll-left > span { display: block; height: 100%; border-radius: inherit; background: #3fa57a; }
.film-roll-left.is-low > span { background: #d4891c; }

.movement-table { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.movement-row { display: grid; grid-template-columns: 92px 104px minmax(0, 1fr) 120px; align-items: center; gap: 12px; min-height: 52px; padding: 7px 14px; border-top: 1px solid var(--border); }
.movement-row:first-child { border-top: 0; }
.movement-when { display: grid; gap: 1px; font-variant-numeric: tabular-nums; }
.movement-when strong { font-size: 13px; font-weight: 650; color: var(--text-primary); }
.movement-when span { font-size: 11.5px; color: var(--text-muted); }
.movement-type { justify-self: start; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.movement-row.is-in .movement-type { color: #1f7a52; background: #e7f6ef; }
.movement-row.is-out .movement-type { color: #9a3b1c; background: #fbeee8; }
.movement-row.is-correction .movement-type { color: #2a54b8; background: #eef3fd; }
.movement-what { display: grid; gap: 2px; min-width: 0; }
.movement-what .movement-order-link { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.movement-meta { overflow: hidden; font-size: 12px; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.movement-qty { justify-self: end; font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.movement-qty small { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.movement-row.is-in .movement-qty { color: #1f7a52; }
.movement-row.is-out .movement-qty { color: #9a3b1c; }
.movement-empty { padding: 24px; text-align: center; color: var(--text-secondary); }
.movement-more { display: block; width: 100%; margin-top: 10px; min-height: 40px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-0); font-family: inherit; font-size: 13px; font-weight: 650; color: var(--btn-primary-bg); cursor: pointer; }

@media (max-width: 1100px) {
  .film-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .film-kpi { border-bottom: 1px solid var(--border); }
  .film-kpi:nth-child(3n) { border-right: 0; }
  .film-kpi:nth-child(n + 4) { border-bottom: 0; }
}
@media (max-width: 640px) {
  .film-hero { padding: 14px; }
  .film-hero-title h1 { font-size: 19px; }
  .film-hero-actions { width: 100%; }
  .film-hero-actions > * { flex: 1 1 0; min-width: 0; }
  .film-hero-actions :is(.btn-primary, .btn-secondary) { width: 100%; }
  .film-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .film-kpi { padding: 10px 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .film-kpi:nth-child(3n) { border-right: 1px solid var(--border); }
  .film-kpi:nth-child(2n) { border-right: 0; }
  .film-kpi:nth-child(n + 4) { border-bottom: 1px solid var(--border); }
  .film-kpi.is-primary { grid-column: 1 / -1; border-right: 0; }
  .film-kpi:last-child { border-bottom: 0; }
  .film-kpi strong { font-size: 17px; }
  .film-section { padding: 12px; }
  .movement-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "type qty" "what what" "when when"; row-gap: 4px; padding: 10px 12px; }
  .movement-type { grid-area: type; }
  .movement-qty { grid-area: qty; }
  .movement-what { grid-area: what; }
  .movement-when { grid-area: when; display: flex; gap: 6px; }
  .movement-when strong { font-weight: 500; font-size: 12px; color: var(--text-muted); }
}
.workspace-body .roll-inventory .film-roll-metric > .film-roll-left { display: block; height: 4px; margin: 5px 0 0; font-size: 0; }
/* Пустой корень окна правки плёнки не должен занимать место в сетке карточки. */
.film-page > div:not([class]) { display: contents; }

/* ===== Заказы: календарь месяца, неделя и список (12.11.2026) =====
   Цвет — статус работы заказа (решение владельца), всегда вместе со словом. Отдельная
   красная метка «€» — работа готова/выдана, а оплата не получена. В клетке месяца до 3
   заказов и «+ ещё N»; нажатие на день открывает панель дня со всеми заказами подробно.
   Дни Пн–Пт; выходные появляются, только если на них есть заказы. */
.orders-board { --o-booked: #3b6fe0; --o-booked-bg: #eef3fd; --o-progress: #23926a; --o-progress-bg: #e7f6ef; --o-done: #7a4fd0; --o-done-bg: #f3effc; --o-issued: #8a939d; --o-issued-bg: #f1f3f5; --o-cancelled: #c2372f; --o-cancelled-bg: #fbeceb; }
.orders-page .visually-hidden, .orders-board .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.orders-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 14px; background: white; }
.orders-view-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-1); }
.orders-view-toggle button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font-family: inherit; font-size: 13px; font-weight: 650; color: var(--text-secondary); cursor: pointer; }
.orders-view-toggle button.active { color: #fff; background: var(--btn-primary-bg); box-shadow: 0 2px 6px rgb(35 91 233 / 24%); }
.orders-period { display: flex; align-items: center; gap: 6px; }
.orders-period .icon-btn { width: 40px; height: 40px; min-height: 40px; }
.orders-today { height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.orders-period-label { min-width: 120px; margin-left: 4px; font-size: 15px; font-weight: 750; color: var(--text-primary); white-space: nowrap; }
.orders-search { flex: 1 1 200px; min-width: 0; }
.orders-search input, .orders-status-select, .orders-date { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 13.5px; background: white; }
.orders-status-select { width: auto; }
.orders-date { width: auto; }
.orders-reset { border: 0; background: none; font-family: inherit; font-size: 12.5px; font-weight: 650; color: var(--btn-primary-bg); cursor: pointer; }
.orders-new { margin-left: auto; }
.orders-new > .btn-primary { white-space: nowrap; }

.orders-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 2px 8px; font-size: 12px; color: var(--text-secondary); }
.orders-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.orders-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.orders-dot.is-booked { background: var(--o-booked); }
.orders-dot.is-progress { background: var(--o-progress); }
.orders-dot.is-done { background: var(--o-done); }
.orders-dot.is-issued { background: var(--o-issued); }
.orders-dot.is-cancelled { background: var(--o-cancelled); }
.orders-owes { display: inline-grid; place-items: center; flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; background: #c2372f; color: #fff; font-style: normal; font-size: 9.5px; font-weight: 800; line-height: 1; }

/* Месяц: сетка дней + панель выбранного дня. */
.orders-month-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
@media (min-width: 1280px) { .orders-month-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.orders-month { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.orders-month-head, .orders-month-grid { display: grid; grid-template-columns: repeat(var(--orders-cols, 5), minmax(0, 1fr)); }
.orders-month-head { border-bottom: 1px solid var(--border); background: var(--surface-0); }
.orders-month-head span { padding: 7px 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.orders-day { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 108px; padding: 4px 5px 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s ease; }
.orders-day:nth-child(5n) { border-right: 0; }
.orders-month[style*="--orders-cols: 7"] .orders-day:nth-child(5n) { border-right: 1px solid var(--border); }
.orders-month[style*="--orders-cols: 7"] .orders-day:nth-child(7n) { border-right: 0; }
.orders-day:hover { background: #fafcff; }
.orders-day.is-other-month { background: #fafbfc; }
.orders-day.is-other-month .orders-day-num span { color: #b4bcc6; }
.orders-day.is-selected { background: #f4f7ff; box-shadow: inset 0 0 0 2px var(--btn-primary-bg); }
.orders-day-num { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; min-height: 26px; padding: 0 2px; border: 0; background: none; font-family: inherit; cursor: pointer; }
.orders-day-num span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.orders-day.is-today .orders-day-num span { background: var(--btn-primary-bg); color: #fff; }
.orders-day-num em { padding: 1px 6px; border-radius: 999px; background: var(--surface-1); font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--text-secondary); }
.orders-chip { display: flex; align-items: center; gap: 5px; min-width: 0; height: 22px; padding: 0 6px; border-left: 3px solid var(--o-booked); border-radius: 5px; background: var(--o-booked-bg); color: var(--text-primary); text-decoration: none; font-size: 11.5px; line-height: 1; }
.orders-chip:hover { filter: brightness(.97); }
.orders-chip-time { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.orders-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.orders-chip .orders-owes { margin-left: auto; }
.orders-chip.is-progress { border-left-color: var(--o-progress); background: var(--o-progress-bg); }
.orders-chip.is-done { border-left-color: var(--o-done); background: var(--o-done-bg); }
.orders-chip.is-issued { border-left-color: var(--o-issued); background: var(--o-issued-bg); color: var(--text-secondary); }
.orders-chip.is-cancelled { border-left-color: var(--o-cancelled); background: var(--o-cancelled-bg); color: var(--text-muted); text-decoration: line-through; }
.orders-chip.is-continuation { opacity: .75; }
.orders-more { align-self: flex-start; padding: 1px 4px; border: 0; background: none; font-family: inherit; font-size: 11.5px; font-weight: 650; color: var(--btn-primary-bg); cursor: pointer; }

.orders-day-panel { padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
@media (min-width: 1280px) { .orders-day-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; } }
.orders-day-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.orders-day-panel-head strong { display: block; font-size: 16px; font-weight: 750; color: var(--text-primary); }
.orders-day-panel-head span { font-size: 12px; color: var(--text-muted); }
.orders-day-list { display: grid; gap: 8px; }
.orders-day-empty { margin: 8px 0; color: var(--text-muted); font-size: 13px; }

/* Строка заказа: список и панель дня. */
.orders-status, .orders-pay, .orders-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; font-style: normal; white-space: nowrap; }
.orders-status { color: var(--o-booked); background: var(--o-booked-bg); }
.orders-status.is-progress { color: var(--o-progress); background: var(--o-progress-bg); }
.orders-status.is-done { color: var(--o-done); background: var(--o-done-bg); }
.orders-status.is-issued { color: #5d6670; background: var(--o-issued-bg); }
.orders-status.is-cancelled { color: var(--o-cancelled); background: var(--o-cancelled-bg); }
.orders-pay.is-paid { color: #1f7a52; background: #e7f6ef; }
.orders-pay.is-partial { color: #9a5b0b; background: #fdf3e2; }
.orders-pay.is-unpaid { color: #b4232c; background: #fde8e8; }
.orders-pay.is-free { color: #5d6670; background: var(--surface-1); }
.orders-tag { height: 20px; padding: 0 7px; font-size: 11px; font-weight: 650; color: var(--text-secondary); background: var(--surface-1); }

.orders-list { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.orders-list-head, .orders-row { display: grid; grid-template-columns: 132px minmax(0, 1.15fr) minmax(0, 1.2fr) 220px 104px; gap: 12px; align-items: center; }
.orders-list-head { min-height: 38px; padding: 0 14px; background: var(--surface-0); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.orders-list-head .is-num { justify-self: end; }
.orders-row { min-height: 60px; padding: 9px 14px; border-top: 1px solid var(--border); border-left: 3px solid var(--o-booked); color: inherit; text-decoration: none; }
.orders-row:hover { background: #f7f9fd; }
.orders-row.is-progress { border-left-color: var(--o-progress); }
.orders-row.is-done { border-left-color: var(--o-done); }
.orders-row.is-issued { border-left-color: var(--o-issued); }
.orders-row.is-cancelled { border-left-color: var(--o-cancelled); }
.orders-row.is-cancelled .orders-row-who strong { text-decoration: line-through; color: var(--text-muted); }
.orders-row-main, .orders-row-who, .orders-row-work { display: grid; gap: 2px; min-width: 0; }
.orders-row-number { font-size: 13.5px; font-weight: 750; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.orders-row-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.orders-row-who strong { overflow: hidden; font-size: 14px; font-weight: 650; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.orders-row-who strong small { margin-left: 4px; padding: 1px 6px; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: .03em; }
.orders-row-who > span, .orders-row-masters { overflow: hidden; font-size: 12px; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.orders-row-who .orders-tag { margin-left: 4px; vertical-align: middle; }
.orders-row-services { overflow: hidden; font-size: 13px; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.orders-row-status { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.orders-row-sum { justify-self: end; font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.orders-list-empty { padding: 28px; text-align: center; color: var(--text-secondary); border-top: 1px solid var(--border); }

/* Строка в панели дня — компактная карточка в несколько строк. */
.orders-row.is-compact { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main sum" "who who" "work work" "status status"; gap: 4px 10px; padding: 9px 10px; border: 1px solid var(--border); border-left-width: 3px; border-radius: 10px; }
.orders-row.is-compact .orders-row-main { grid-area: main; display: flex; align-items: baseline; gap: 8px; }
.orders-row.is-compact .orders-row-sum { grid-area: sum; font-size: 13px; }
.orders-row.is-compact .orders-row-who { grid-area: who; }
.orders-row.is-compact .orders-row-work { grid-area: work; }
.orders-row.is-compact .orders-row-status { grid-area: status; }
.orders-row.is-compact .orders-row-time { order: -1; font-size: 13px; font-weight: 700; color: var(--text-primary); }
.orders-row.is-compact .orders-row-number { font-size: 12px; font-weight: 650; color: var(--text-muted); }

/* Неделя: колонки дней с карточками заказов. */
.orders-week { display: grid; grid-template-columns: repeat(var(--orders-cols, 5), minmax(0, 1fr)); gap: 8px; align-items: start; }
.orders-week-col { min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--card-shadow); }
.orders-week-col.is-today { border-color: var(--btn-primary-bg); }
.orders-week-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.orders-week-head strong { display: block; font-size: 13.5px; font-weight: 750; color: var(--text-primary); }
.orders-week-col.is-today .orders-week-head strong { color: var(--btn-primary-bg); }
.orders-week-head span { font-size: 11.5px; color: var(--text-muted); }
.orders-week-add { flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid #c9d7f5; border-radius: 8px; background: #f2f6fe; font-size: 17px; color: var(--btn-primary-bg); cursor: pointer; }
.orders-week-body { display: grid; gap: 6px; padding: 8px; }
.orders-week-card { display: grid; gap: 3px; min-width: 0; padding: 8px 9px; border-left: 3px solid var(--o-booked); border-radius: 8px; background: var(--o-booked-bg); color: inherit; text-decoration: none; }
.orders-week-card.is-progress { border-left-color: var(--o-progress); background: var(--o-progress-bg); }
.orders-week-card.is-done { border-left-color: var(--o-done); background: var(--o-done-bg); }
.orders-week-card.is-issued { border-left-color: var(--o-issued); background: var(--o-issued-bg); }
.orders-week-card.is-cancelled { border-left-color: var(--o-cancelled); background: var(--o-cancelled-bg); }
.orders-week-card.is-cancelled strong { text-decoration: line-through; color: var(--text-muted); }
.orders-week-time { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.orders-week-card strong { overflow: hidden; font-size: 13px; font-weight: 700; color: var(--text-primary); text-overflow: ellipsis; white-space: nowrap; }
.orders-week-card strong small { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.orders-week-services { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; color: var(--text-secondary); }
.orders-week-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.orders-week-foot .orders-status { height: 20px; padding: 0 7px; font-size: 11px; background: rgb(255 255 255 / 70%); }
.orders-week-master { overflow: hidden; font-size: 11.5px; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.orders-week-empty { margin: 4px 2px; color: #b4bcc6; font-size: 13px; }

@media (max-width: 1100px) {
  .orders-list-head { display: none; }
  .orders-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main sum" "who who" "work work" "status status"; gap: 4px 10px; }
  .orders-row-main { grid-area: main; display: flex; align-items: baseline; gap: 8px; }
  .orders-row-sum { grid-area: sum; }
  .orders-row-who { grid-area: who; }
  .orders-row-work { grid-area: work; }
  .orders-row-status { grid-area: status; }
}
@media (max-width: 900px) {
  .orders-week { grid-template-columns: minmax(0, 1fr); }
  .orders-week-body { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .orders-period-label { min-width: 0; }
}
@media (max-width: 640px) {
  .orders-toolbar { gap: 6px; padding: 8px; }
  .orders-view-toggle { flex: 1 1 100%; }
  .orders-view-toggle button { flex: 1 1 0; }
  .orders-period { flex: 1 1 100%; }
  .orders-period-label { margin-left: auto; }
  .orders-new { flex: 1 1 100%; margin-left: 0; }
  .orders-new > .btn-primary { width: 100%; } /* только кнопка панели: окно записи вложено в .orders-new */
  .orders-status-select { flex: 1 1 auto; }
  /* Месяц на телефоне: в клетке точки статусов, нажатие открывает список дня. */
  .orders-day { min-height: 58px; padding: 3px; flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 3px; }
  .orders-day-num { min-height: 22px; }
  .orders-day-num span { min-width: 22px; height: 22px; font-size: 12px; }
  .orders-day-num em { display: none; }
  .orders-chip { flex: 0 0 auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--o-booked); font-size: 0; pointer-events: none; }
  .orders-chip > * { display: none; }
  .orders-chip.is-progress { background: var(--o-progress); }
  .orders-chip.is-done { background: var(--o-done); }
  .orders-chip.is-issued { background: var(--o-issued); }
  .orders-chip.is-cancelled { background: var(--o-cancelled); }
  .orders-more { display: none; }
  .orders-legend { gap: 4px 10px; font-size: 11.5px; }
}

/* Запись на тонировку: готовые фразы «Что примерно делаем» (12.11.2026). */
.booking-note-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.booking-note-preset { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: white; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.booking-note-preset:hover { border-color: #9db6ef; }
.booking-note-preset.is-on { border-color: var(--btn-primary-bg); background: #eef3fd; color: var(--btn-primary-bg); }
.booking-note-preset span { font-weight: 800; }

/* ===== Новая запись: шаг «Время» (12.11.2026, переделка) =====
   Сверху итог выбранного времени; день — лента ближайших будней с числом записей (и «Другая»
   дата), начало — сетка часов с загрузкой цеха и занятостью выбранного мастера, длительность —
   ровный ряд; точное время и многодневная работа — в раскрывающемся блоке. Мастер — карточки
   со статусом «свободен / занят», место — два переключателя. */
.booking-pane-time { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.booking-when { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #c9d7f5; border-radius: var(--radius); background: #f2f6fe; }
.booking-when-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--btn-primary-bg); color: #fff; }
.booking-when-icon .ui-icon { width: 20px; height: 20px; }
.booking-when > div { display: grid; gap: 2px; min-width: 0; }
.booking-when strong { font-size: 16px; font-weight: 750; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.booking-when span { overflow: hidden; font-size: 12.5px; color: var(--text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.booking-pane-time .booking-quick-label { display: block; margin: 10px 0 6px; }
.booking-pane-time .booking-section-title + .booking-quick-label { margin-top: 0; }

.booking-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.booking-day { position: relative; display: grid; justify-items: center; align-content: center; gap: 1px; flex: 0 0 62px; min-height: 64px; padding: 4px 2px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; font-family: inherit; color: var(--text-primary); cursor: pointer; }
.booking-day:hover { border-color: #9fc0f5; }
.booking-day-wd { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.booking-day strong { font-size: 18px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.booking-day-load { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.booking-day.is-today .booking-day-wd { color: var(--btn-primary-bg); }
.booking-day.active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: #fff; }
.booking-day.active :is(.booking-day-wd, .booking-day-load) { color: rgb(255 255 255 / 85%); }
.booking-day-other { border-style: dashed; }
.booking-day-other .ui-icon { width: 20px; height: 20px; color: var(--btn-primary-bg); }
.booking-day-other input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.booking-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.booking-slot { display: grid; justify-items: center; gap: 1px; min-height: 48px; padding: 5px 2px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; font-family: inherit; color: var(--text-primary); cursor: pointer; }
.booking-slot:hover { border-color: #9fc0f5; }
.booking-slot strong { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-slot span { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.booking-slot.is-busy { border-color: #f0d6a8; background: #fdf7ec; }
.booking-slot.is-busy span { color: #9a5b0b; font-weight: 650; }
.booking-slot.active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: #fff; }
.booking-slot.active span { color: rgb(255 255 255 / 85%); }

.booking-durations { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.booking-duration { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; font-family: inherit; font-size: 13.5px; font-weight: 650; color: var(--text-primary); cursor: pointer; }
.booking-duration:hover { border-color: #9fc0f5; }
.booking-duration.active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: #fff; }

.booking-exact { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.booking-exact summary { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; font-weight: 650; color: var(--btn-primary-bg); cursor: pointer; list-style: none; }
.booking-exact summary::-webkit-details-marker { display: none; }
.booking-exact summary::before { content: '›'; display: inline-block; margin-right: 6px; transition: transform .15s ease; }
.booking-exact[open] summary::before { transform: rotate(90deg); }
.booking-exact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.booking-exact-grid .field { margin-bottom: 0; }
.booking-exact .hint { margin: 6px 0 0; }

.booking-masters { display: grid; gap: 6px; }
.booking-master { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; font-family: inherit; text-align: left; color: var(--text-primary); cursor: pointer; }
.booking-master:hover { border-color: #9fc0f5; }
.booking-master-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-1); font-size: 12.5px; font-weight: 750; color: var(--text-secondary); }
.booking-master-avatar.is-none { font-weight: 500; }
.booking-master-text { display: grid; gap: 1px; min-width: 0; }
.booking-master-text strong { overflow: hidden; font-size: 13.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.booking-master-text span { font-size: 11.5px; color: #1f7a52; }
.booking-master.is-busy .booking-master-text span { color: #9a5b0b; font-weight: 650; }
.booking-master:first-child .booking-master-text span { color: var(--text-muted); }
.booking-master.active { border-color: var(--btn-primary-bg); background: #eef3fd; }
.booking-master.active .booking-master-avatar { background: var(--btn-primary-bg); color: #fff; }

.booking-segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-1); }
.booking-segment button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 9px; background: transparent; font-family: inherit; font-size: 13.5px; font-weight: 650; color: var(--text-secondary); cursor: pointer; }
.booking-segment button .ui-icon { width: 17px; height: 17px; }
.booking-segment button.active { background: white; color: var(--btn-primary-bg); box-shadow: 0 1px 4px rgb(22 28 36 / 12%); }

@media (min-width: 1024px) {
  .booking-pane-time { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
}
@media (max-width: 767px) {
  .booking-pane-time { grid-template-columns: minmax(0, 1fr); }
  .booking-day { flex-basis: 56px; min-height: 60px; }
  .booking-slots { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .booking-slot span { font-size: 9.5px; }
  .booking-durations { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .booking-exact-grid { grid-template-columns: minmax(0, 1fr); }
}
/* Мастера в две колонки, если место есть; в узкой колонке (планшет) — в одну, чтобы имя было видно целиком (17.11.2026). */
.booking-masters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.booking-master { gap: 8px; min-height: 50px; padding: 6px 8px; }
.booking-master-avatar { width: 30px; height: 30px; font-size: 11.5px; }
.booking-master-text strong { font-size: 13px; }
.booking-master-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.booking-master-text strong { white-space: normal; overflow-wrap: anywhere; }

/* ===== Карточка заказа (12.11.2026, переделка) =====
   Шапка: номер, статус и оплата цветными пометками, итог; ниже «Клиент · Автомобиль · Когда ·
   Мастер». Работа: значок услуги в цвете статуса, короткое название (детали — таблицей ниже),
   примечание отдельной строкой, цена справа; приём — заметная подсказка с кнопкой; детали —
   таблица «деталь — плёнка — расход» с расходом справа. Цвета статусов — те же, что в календаре. */
.order-workspace { --o-booked: #3b6fe0; --o-booked-bg: #eef3fd; --o-progress: #23926a; --o-progress-bg: #e7f6ef; --o-done: #7a4fd0; --o-done-bg: #f3effc; --o-issued: #8a939d; --o-issued-bg: #f1f3f5; --o-cancelled: #c2372f; --o-cancelled-bg: #fbeceb; }

.workspace-body .order-head .order-head-top { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; margin-bottom: 0; }
.order-head-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.workspace-body .order-head .order-head-number { margin: 2px 0 0; font-size: 24px; font-weight: 750; letter-spacing: -.01em; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.order-head-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.order-head-badges :is(.orders-status, .orders-pay) { height: 26px; padding: 0 11px; font-size: 12.5px; }
.order-head-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.order-head-facts > div { min-width: 0; }
.order-head-facts dt { margin: 0 0 3px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.order-head-facts dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: 14px; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.order-head-facts dd a { color: var(--btn-primary-bg); text-decoration: none; }
.order-head-facts dd a:hover { text-decoration: underline; }
.order-head-facts dd .hint { flex-basis: 100%; font-weight: 500; }
.order-head-plate { padding: 1px 7px; border: 1.5px solid var(--text-primary); border-radius: 5px; font-size: 12px; font-weight: 800; letter-spacing: .04em; }

.workspace-body .order-work-title-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px; margin-bottom: 14px; }
.order-work-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--o-booked-bg); color: var(--o-booked); }
.order-work-icon .ui-icon { width: 22px; height: 22px; }
.order-work-icon.is-progress { background: var(--o-progress-bg); color: var(--o-progress); }
.order-work-icon.is-done { background: var(--o-done-bg); color: var(--o-done); }
.order-work-icon.is-cancelled { background: var(--o-cancelled-bg); color: var(--o-cancelled); }
.order-work-title-text { min-width: 0; }
.workspace-body .order-work-title-text .order-work-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.order-work-note { margin: 3px 0 0; font-size: 13px; color: var(--text-secondary); }
.order-work-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.order-work-badges .orders-pay .ui-icon-inline { width: 13px; height: 13px; margin-right: 3px; }
.workspace-body .order-work-title-row .order-item-price { justify-self: end; padding-top: 4px; font-size: 19px; font-weight: 750; color: var(--text-primary); white-space: nowrap; font-variant-numeric: tabular-nums; }

.order-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #c9d7f5; border-radius: 12px; background: #f2f6fe; }
.order-callout-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--btn-primary-bg); color: #fff; }
.order-callout-icon .ui-icon { width: 19px; height: 19px; }
.order-callout > div { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.order-callout strong { font-size: 14px; font-weight: 700; color: #234aa8; }
.order-callout > div > span { font-size: 12.5px; color: var(--text-secondary); }
.order-callout .btn-primary { flex: 0 0 auto; text-decoration: none; }

.workspace-body dl.order-work-metrics { margin: 0; }
.order-work-metrics > div { display: grid; gap: 3px; }
.order-work-metrics dt { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.order-work-metrics dd { margin: 0; font-size: 14px; font-weight: 650; color: var(--text-primary); }
.order-work-metrics dd small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.order-materials-title { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 650; color: var(--text-secondary); }
.order-materials { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: white; }
.workspace-body .order-materials .order-work-material-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto; align-items: center; gap: 12px; margin: 0; padding: 9px 12px; border-top: 1px solid var(--border); line-height: 1.35; }
.workspace-body .order-materials .order-work-material-row:first-child { border-top: 0; }
.order-material-part, .order-material-film { display: grid; gap: 2px; min-width: 0; }
.order-material-part strong { font-size: 13.5px; color: var(--text-primary); }
.order-material-part small, .order-material-film small { font-size: 11.5px; color: var(--text-muted); }
.order-material-film { justify-items: start; }
.order-material-film-name { font-size: 13px; font-weight: 600; color: #8a5a12; }
.order-material-qty { justify-self: end; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-material-qty strong { font-size: 14px; color: var(--text-primary); }
.order-material-qty small { display: block; max-width: 220px; font-size: 11.5px; color: var(--text-muted); white-space: normal; }
.order-material-qty .is-missing { font-style: italic; }
.order-material-total { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.order-material-total strong { color: var(--text-primary); }

.order-work-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.order-item-delete { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: none; font-family: inherit; font-size: 12.5px; font-weight: 650; color: #b4232c; cursor: pointer; }
.order-item-delete:hover { background: #fdecec; }
.order-work-count { display: inline-grid; place-items: center; min-width: 26px; height: 22px; margin-left: 8px; padding: 0 8px; border-radius: 999px; background: var(--surface-1); font-size: 12.5px; font-weight: 700; color: var(--text-secondary); vertical-align: middle; }
.order-payment-block { margin-top: 16px; }

@media (max-width: 900px) {
  .order-head-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .workspace-body .order-head .order-head-top { grid-template-columns: minmax(0, 1fr) auto; }
  .order-head-badges { grid-column: 1 / -1; justify-content: flex-start; order: 3; }
  .workspace-body .order-head .order-head-number { font-size: 21px; }
  .workspace-body .order-work-title-row { grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  .order-work-icon { width: 38px; height: 38px; }
  .workspace-body .order-work-title-row .order-item-price { grid-column: 2; justify-self: start; padding-top: 0; font-size: 17px; }
  .workspace-body .order-materials .order-work-material-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "part qty" "film film"; row-gap: 4px; }
  .order-material-part { grid-area: part; }
  .order-material-film { grid-area: film; }
  .order-material-qty { grid-area: qty; }
  .order-callout .btn-primary { width: 100%; }
}
.workspace-body .order-head .order-summary-heading { display: grid; gap: 0; align-items: start; }
.workspace-body .order-materials .order-work-material-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 190px; }
@media (max-width: 640px) { .workspace-body .order-materials .order-work-material-row { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 640px) {
  .workspace-body .order-materials .order-work-material-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "part" "film" "qty"; }
  .order-material-qty { justify-self: start; text-align: left; }
  .order-material-qty small { max-width: none; }
}

/* ===== Раздел «База данных» (13.11.2026): только администратор, только просмотр ===== */
.db-intro { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #c9d7f5; border-radius: 12px; background: #f2f6fe; font-size: 13px; color: var(--text-secondary); }
.db-intro .ui-icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--btn-primary-bg); }
.db-intro p { margin: 0; }
.workspace-body .db-heading { margin: 18px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.db-table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.db-table-card { display: grid; gap: 3px; min-height: 76px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: white; box-shadow: var(--card-shadow); font-family: inherit; text-align: left; cursor: pointer; }
.db-table-card:hover { border-color: var(--btn-primary-bg); }
.db-table-card-name { font-size: 14px; font-weight: 650; color: var(--text-primary); }
.db-table-card code { font-size: 11.5px; color: var(--text-muted); }
.db-table-card-rows { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.db-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 320px) auto; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.db-toolbar .btn-secondary { display: inline-flex; align-items: center; gap: 6px; height: 44px; margin: 0; padding: 0 14px; text-decoration: none; white-space: nowrap; }
.db-toolbar .btn-secondary .ui-icon { width: 16px; height: 16px; }
.db-toolbar-title { display: grid; gap: 2px; min-width: 0; }
.db-toolbar-title strong { font-size: 15px; color: var(--text-primary); overflow-wrap: anywhere; }
.db-toolbar-title span { font-size: 12.5px; color: var(--text-muted); }
.db-search { position: relative; display: block; margin: 0; }
.db-search .ui-icon { position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; color: var(--text-muted); transform: translateY(-50%); pointer-events: none; }
.workspace-body .db-search input { width: 100%; height: 44px; padding-left: 36px; }

.db-grid-wrap { overflow: auto; max-height: calc(100dvh - 260px); border: 1px solid var(--border); border-radius: 12px; background: white; }
.db-grid { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 12.5px; }
.db-grid th { position: sticky; top: 0; z-index: 1; padding: 0; border-bottom: 1px solid var(--border-strong); background: var(--surface-0); text-align: left; }
.db-grid th button { display: flex; gap: 4px; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; background: none; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; cursor: pointer; }
.db-grid th.is-num button { justify-content: flex-end; }
.db-grid td { max-width: 320px; padding: 7px 10px; border-bottom: 1px solid var(--border); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-grid td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.db-grid td.is-null, .db-grid td.is-masked { color: var(--text-muted); font-style: italic; }
.db-grid tbody tr { cursor: pointer; }
.db-grid tbody tr:hover td, .db-grid tbody tr:focus td { background: #f2f6fe; }
.db-grid tbody tr:focus { outline: none; }
.db-grid td.db-empty { padding: 24px; text-align: center; color: var(--text-muted); white-space: normal; cursor: default; }
.db-page { align-self: center; font-size: 13px; color: var(--text-secondary); }

.db-record { width: min(760px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; }
.db-record-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.db-record-head .form-title { margin: 0; }
.db-record-fields { display: grid; gap: 0; margin: 12px 0 0; border: 1px solid var(--border); border-radius: 10px; }
.db-record-fields > div { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 12px; padding: 8px 12px; border-top: 1px solid var(--border); }
.db-record-fields > div:first-child { border-top: 0; }
.db-record-fields dt { margin: 0; font-size: 12.5px; font-weight: 650; color: var(--text-secondary); overflow-wrap: anywhere; }
.db-record-fields dt small { display: block; font-weight: 500; color: var(--text-muted); }
.db-record-fields dd { margin: 0; font-size: 13px; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.db-record-fields dd.is-null, .db-record-fields dd.is-masked { color: var(--text-muted); font-style: italic; }
.db-record-fields pre { margin: 0; font-size: 12px; white-space: pre-wrap; }
.staff-admin-badge { margin-left: 6px; background: #eef3fd; color: #234aa8; }
.staff-admin-note { margin: 4px 0 12px; }

@media (max-width: 900px) {
  .db-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .db-search, .db-export { grid-column: 1 / -1; }
  .db-toolbar .db-export { justify-content: center; }
  .db-record-fields > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Номер заказа выдаётся при приёме авто (13.11.2026): до него в шапке карточки — пояснение. */
.workspace-body .order-head .order-head-number.is-pending { font-size: 17px; font-weight: 650; color: var(--text-secondary); }

/* ===== Гарантийный возврат (16.11.2026) ===== */
.orders-tag.is-warranty, .planner-warranty-tag { background: #fff4e0; color: #8a5a12; border: 1px solid #f1d39b; }
.planner-warranty-tag { display: inline-block; margin: 0 0 2px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 16px; }
.orders-warranty-mark { display: inline-grid; place-items: center; flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%; background: #f1d39b; color: #8a5a12; font-size: 9.5px; font-style: normal; font-weight: 800; }

.booking-warranty { margin-top: 14px; padding: 4px 12px 12px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.booking-warranty.is-on { border-color: #f1d39b; background: #fffaf0; }
.booking-warranty .toggle-row { margin: 0; padding: 8px 0; border: 0; }
.booking-warranty .toggle-row span { display: grid; gap: 2px; }
.booking-warranty .toggle-row small { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.booking-warranty-title { margin: 6px 0 8px; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.booking-warranty-orders { display: grid; gap: 6px; }
.booking-warranty-order { display: grid; gap: 2px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: white; font-family: inherit; text-align: left; cursor: pointer; }
.booking-warranty-order strong { font-size: 13.5px; color: var(--text-primary); }
.booking-warranty-order span { font-size: 12.5px; color: var(--text-secondary); }
.booking-warranty-order small { font-size: 11.5px; color: #23926a; }
.booking-warranty-order small.is-expired { color: #b4232c; }
.booking-warranty-order.is-picked { border-color: var(--btn-primary-bg); box-shadow: 0 0 0 1px var(--btn-primary-bg); background: #f2f6fe; }
.booking-warranty-order.is-none strong { color: var(--text-secondary); }

.order-warranty-links { display: grid; gap: 4px; margin-top: 12px; padding: 10px 12px; border: 1px solid #f1d39b; border-radius: 10px; background: #fffaf0; font-size: 13px; color: var(--text-secondary); }
.order-warranty-links p { margin: 0; }
.order-warranty-links a { font-weight: 700; color: var(--btn-primary-bg); text-decoration: none; }
.order-warranty-links small { color: #23926a; }
.order-warranty-links small.is-expired { color: #b4232c; }
.order-warranty-source { margin-top: 10px; }

.report-warranty-panel { display: grid; gap: 10px; margin-bottom: 16px; }
.report-warranty-costs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.report-warranty-costs span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-0); }
.report-warranty-costs small { font-size: 11.5px; color: var(--text-muted); }
.report-warranty-costs strong { font-size: 15px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.report-warranty-costs .is-total { background: #fff4e0; }
.report-warranty-list { display: grid; }
.report-warranty-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.report-warranty-row time { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.report-warranty-row span { display: grid; gap: 1px; min-width: 0; }
.report-warranty-row strong { font-size: 13.5px; }
.report-warranty-row span small, .report-warranty-row > small { font-size: 12px; color: var(--text-secondary); }
@media (max-width: 640px) {
  .report-warranty-costs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-warranty-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.orders-chip .orders-warranty-mark { margin-left: auto; }
.orders-chip .orders-warranty-mark + .orders-owes { margin-left: 3px; }

/* ===== Список рулонов по кнопке «Найти» при завершении (16.11.2026) ===== */
.finish-roll-picker { display: grid; gap: 6px; margin: 8px 0 4px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: white; max-height: 340px; overflow-y: auto; }
.finish-roll-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finish-roll-picker-head strong { font-size: 13px; color: var(--text-secondary); }
.finish-roll-picker-close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface-1); color: var(--text-secondary); font-size: 14px; cursor: pointer; }
.finish-roll-option { display: grid; grid-template-columns: minmax(0, 1fr) 56px 96px auto; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); font-family: inherit; text-align: left; cursor: pointer; }
.finish-roll-option:hover { border-color: var(--btn-primary-bg); background: #f2f6fe; }
.finish-roll-option.is-current { border-color: var(--btn-primary-bg); box-shadow: 0 0 0 1px var(--btn-primary-bg); }
.finish-roll-option-code { display: grid; gap: 1px; min-width: 0; }
.finish-roll-option-code strong { font-size: 14px; color: var(--text-primary); }
.finish-roll-option-code small { font-size: 11.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.finish-roll-option-width { font-size: 13px; font-weight: 700; color: var(--text-secondary); text-align: center; }
.finish-roll-option-left { font-size: 13.5px; font-weight: 650; color: var(--text-primary); text-align: right; font-variant-numeric: tabular-nums; }
.finish-roll-option-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.finish-roll-option-tags em { padding: 1px 6px; border-radius: 999px; background: #fff4e0; color: #8a5a12; font-size: 11px; font-style: normal; font-weight: 650; }
.finish-roll-picker-empty { margin: 4px 2px; font-size: 13px; color: var(--text-secondary); }
@media (max-width: 640px) {
  .finish-roll-option { grid-template-columns: minmax(0, 1fr) auto; }
  .finish-roll-option-width { text-align: left; }
  .finish-roll-option-tags { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Ссылка-кнопка внутри подсказки (16.11.2026: «Плёнка на передние боковые» на шаге материалов). */
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--btn-primary-bg, #2563eb);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ===== Приём общей тонировки на одном экране (пилот 16.11.2026, ветка claude/tint-intake-one-screen) ===== */
.intake-card.is-one-screen { padding: 0; overflow: visible; background: transparent; border: 0; box-shadow: none; }
.tint-one { display: grid; gap: 16px; }
.tint-one-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tint-one-headline { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-width: 0; }
.tint-one-head .intake-title { margin: 0; font-size: clamp(22px, 2.4vw, 26px); }
.tint-one-head .intake-service { flex-basis: 100%; margin: 0; font-size: 13px; }
.tint-one-head .intake-service a { color: var(--btn-primary-bg); font-weight: 600; text-decoration: none; }
.tint-one-head-note { flex: 0 1 460px; margin: 0; }
.tint-one-plate { flex: none; font-size: 15px; padding: 3px 10px; }
/* Ссылка «← Номер заказа» над приёмом на одном экране не нужна: она в шапке приёма и в тёмной шапке. */
.intake-page:has(.tint-one) > .intake-back { display: none; }
.tint-one-grid { display: grid; gap: 16px; align-items: start; }
.tint-one-aside, .one-section { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: white; box-shadow: var(--card-shadow, 0 1px 2px rgb(0 0 0 / 4%)); }
.tint-one-aside { display: grid; gap: 12px; }
.tint-one-total { display: grid; justify-items: center; gap: 2px; width: 100%; padding: 6px 8px 10px; border: 0; border-bottom: 1px dashed var(--border); background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; }
.tint-one-total strong { font-size: 30px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tint-one-total span { color: var(--text-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tint-one-total:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 2px; border-radius: 10px; }
.tint-one-hint { margin: -4px 0 0; color: var(--text-muted); font-size: 12.5px; text-align: center; }
.tint-one-main { display: grid; gap: 16px; min-width: 0; }
.one-section { display: grid; gap: 12px; min-width: 0; }
.one-section > h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--text-primary); font-size: 17px; font-weight: 650; }
.one-section > h2 .ui-icon { width: 20px; height: 20px; color: var(--btn-primary-bg); }
.one-section-count { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--surface-1, #f1f4f9); color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.one-section-count.is-warning { background: #fff1e6; color: #b45309; }

/* Строка «название — значение / ВЫБРАТЬ» (как Film Type · SELECT у MobileTechRX). */
.one-row { display: grid; gap: 6px; min-width: 0; }
.one-row-button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.one-row-button:hover { border-color: var(--border-strong); }
.one-row-button:focus-visible { outline: 2px solid var(--btn-primary-bg); outline-offset: 1px; }
.one-row.has-error .one-row-button { border-color: #e5484d; }
.one-row-label { color: var(--text-secondary); font-size: 14px; }
.one-row-value { color: var(--text-primary); font-size: 14px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.one-row-value.is-empty { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 14px; border-radius: 8px; background: var(--btn-primary-bg); color: white; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; }
.one-row-chevron { width: 8px; height: 8px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); }
.one-row-plate { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 6px 6px 6px 14px; border: 1px solid var(--border); border-radius: 12px; }
.one-row-plate .one-row-label { margin: 0; }
.one-row-plate .intake-plate-input { min-height: 42px; border: 0; background: var(--surface-0); text-align: right; font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.one-row-plate > :is(.field-error, .intake-ocr-status) { grid-column: 1 / -1; }
.one-row-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--brand-soft); color: var(--btn-primary-bg); cursor: pointer; }
.one-row-icon .ui-icon { width: 22px; height: 22px; }

/* Крупный список выбора снизу. */
.one-sheet-options { display: grid; gap: 8px; }
.one-sheet-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); color: var(--text-primary); font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer; }
.one-sheet-option.is-selected { border-color: var(--btn-primary-bg); background: var(--brand-soft); color: var(--btn-primary-bg); }
.one-sheet-option .ui-icon { width: 22px; height: 22px; }

/* Цифровая клавиатура для цены. */
.one-keypad { gap: 14px; }
.one-keypad-display { display: grid; justify-items: center; gap: 2px; padding: 4px 0 6px; }
.one-keypad-display span { font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.one-keypad-display span.is-placeholder { color: var(--text-muted); }
.one-keypad-display small { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.one-keypad-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.one-keypad-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.one-keypad-keys button { min-height: 60px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text-primary); font: inherit; font-size: 24px; font-weight: 600; cursor: pointer; }
.one-keypad-keys button:active { background: var(--brand-soft); }
.one-keypad-keys .ui-icon { width: 24px; height: 24px; }

/* Готовые наборы стёкол. */
.one-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.one-preset { min-height: 44px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: white; color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.one-preset.is-active { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }

/* Плёнка: общая на всё и строки групп. */
.one-common-film { display: grid; gap: 6px; }
.one-source { margin: 0; }
.one-film-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.one-film-item { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.one-film-item.is-open { background: white; }
.one-film-item.has-error { border-color: #e5484d; }
.one-film-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.one-film-name { display: grid; gap: 2px; min-width: 0; }
.one-film-name strong { font-size: 14.5px; }
.one-film-name small { color: var(--text-secondary); font-size: 13px; }
.one-film-name small.is-empty { color: #b45309; font-weight: 600; }
.one-film-toggle { flex: none; min-height: 40px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--btn-primary-bg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.one-film-body { display: grid; gap: 10px; }
.one-film-item .intake-material-roll { margin: 0; }
.one-section-notes { padding: 4px 16px; }
.one-section-notes .intake-notes { margin: 0; border: 0; }

/* Нижняя полоса с итогом и «Готово» — над панелью вкладок рабочего места. */
.tint-one-bar { position: sticky; z-index: 30; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 16px; background: rgb(255 255 255 / 96%); box-shadow: 0 -6px 24px rgb(22 28 36 / 10%); backdrop-filter: blur(6px); }
.tint-one-bar-total { display: grid; gap: 2px; min-width: 0; }
.tint-one-bar-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.tint-one-bar-total span { overflow: hidden; color: var(--text-secondary); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.tint-one-done { flex: none; min-width: 180px; min-height: 52px !important; font-size: 17px; }

@media (min-width: 1024px) {
  .tint-one-grid { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
  .tint-one-aside { position: sticky; top: 16px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .tint-one-grid { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .tint-one-aside { position: sticky; top: 12px; }
}
@media (max-width: 767px) {
  .tint-one-done { min-width: 130px; }
  .tint-one-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
}
.one-section-photos { gap: 0; }
.one-section-photos > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-primary); font-size: 17px; font-weight: 650; cursor: pointer; list-style: none; }
.one-section-photos > summary::-webkit-details-marker { display: none; }
.one-section-photos > summary .ui-icon { width: 20px; height: 20px; color: var(--btn-primary-bg); }
.one-section-photos[open] > summary { margin-bottom: 12px; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .tint-one-grid { grid-template-columns: 300px minmax(0, 1fr); }
}

/* ===== Завершение заказа — расход строками (пилот 16.11.2026, ветка claude/tint-intake-one-screen) ===== */
.finish-material-group { display: grid; gap: 10px; }
.finish-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.finish-group-title { display: grid; gap: 2px; min-width: 0; }
.finish-group-title h3 { margin: 0; font-size: 16px; }
.finish-group-title .finish-material-details { margin: 0; color: var(--text-secondary); font-size: 13.5px; }
.finish-group-film { flex: none; min-height: 40px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--btn-primary-bg); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.finish-entry { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-0); }
.finish-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finish-entry-head strong { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary); }
.finish-entry-remove { min-height: 36px; padding: 4px 10px; border: 0; background: transparent; color: #c2410c; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.finish-source { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-1, #eef1f6); }
.finish-source label { display: grid; place-items: center; min-height: 42px; border-radius: 9px; color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer; }
.finish-source label.is-selected { background: white; color: var(--btn-primary-bg); box-shadow: 0 1px 3px rgb(22 28 36 / 12%); }
.finish-source input { position: absolute; opacity: 0; pointer-events: none; }
.finish-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.finish-line.has-error { border-color: #e5484d; }
.finish-line-label { color: var(--text-secondary); font-size: 14px; }
.finish-line-value { justify-self: end; color: var(--text-primary); font-size: 14.5px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.finish-line-value small { display: block; color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.finish-line-value.is-empty { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 14px; border-radius: 8px; background: var(--btn-primary-bg); color: white; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; }
.finish-line-note { color: var(--text-secondary); font-size: 12.5px; }
.finish-line-note.is-deficit { color: #c2410c; font-weight: 600; }
.finish-usage { display: grid; gap: 6px; }
.finish-keypad-units { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-1, #eef1f6); }
.finish-keypad-units button { min-height: 44px; padding: 4px 6px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.finish-keypad-units button.is-active { background: white; color: var(--btn-primary-bg); box-shadow: 0 1px 3px rgb(22 28 36 / 12%); }
.finish-keypad-widths { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.finish-keypad-widths legend { width: 100%; margin-bottom: 6px; color: var(--text-secondary); font-size: 12.5px; }
.finish-keypad-widths label { display: grid; place-items: center; min-width: 52px; min-height: 40px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 10px; background: white; font-weight: 600; cursor: pointer; }
.finish-keypad-widths label.active { border-color: var(--btn-primary-bg); background: var(--brand-soft); color: var(--btn-primary-bg); }
.finish-keypad-widths input { position: absolute; opacity: 0; pointer-events: none; }
.finish-keypad-pair { display: flex; align-items: center; justify-content: center; gap: 10px; }
.finish-keypad-pair button { display: grid; justify-items: center; min-width: 120px; padding: 6px 10px; border: 2px solid transparent; border-radius: 12px; background: var(--surface-0); font: inherit; cursor: pointer; }
.finish-keypad-pair button.is-active { border-color: var(--btn-primary-bg); }
.finish-keypad-pair span { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.finish-keypad-pair small { color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; }
.finish-keypad-pair b { font-size: 22px; color: var(--text-muted); }
.finish-roll-picker { gap: 12px; }
.finish-roll-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.finish-roll-search input { min-height: 46px; }
.finish-roll-options { display: grid; gap: 8px; }
.finish-roll-picker .finish-roll-option { min-height: 58px; }
.finish-group-more { display: flex; flex-wrap: wrap; gap: 8px; }
.finish-add { min-height: 42px; padding: 6px 14px; border: 1px dashed var(--border-strong); border-radius: 10px; background: transparent; color: var(--btn-primary-bg); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.service-sheet.finish-roll-picker { margin: 0 auto; padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); border: 0; border-radius: 20px 20px 0 0; max-height: min(80vh, 720px); }

/* ===== «Новая запись» одним экраном (пилот 16.11.2026, ветка claude/tint-intake-one-screen) ===== */
.booking-one { display: grid; gap: 26px; align-content: start; scroll-padding-top: 12px; }
.booking-one .booking-pane { scroll-margin-top: 12px; }
.booking-step-title { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text-primary); font-size: 18px; font-weight: 650; }
.booking-step-title span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--btn-primary-bg); color: white; font-size: 14px; }
.booking-matches { display: grid; gap: 8px; margin-top: 8px; }
.booking-match { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--btn-primary-bg); border-radius: 12px; background: var(--brand-soft); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
.booking-match .ui-icon { width: 22px; height: 22px; color: var(--btn-primary-bg); }
.booking-match strong { display: block; font-size: 15px; }
.booking-match small { color: var(--text-secondary); font-size: 12.5px; }
.booking-match-pick { padding: 6px 12px; border-radius: 8px; background: var(--btn-primary-bg); color: white; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.booking-locale { margin-bottom: 4px; }
.booking-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.booking-car { display: grid; justify-items: center; gap: 6px; min-height: 110px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: white; color: var(--text-primary); font: inherit; text-align: center; cursor: pointer; }
.booking-car.is-picked { border: 2px solid var(--btn-primary-bg); background: var(--brand-soft); }
.booking-car-pic { width: 100%; max-width: 140px; height: auto; }
.booking-car strong { display: block; font-size: 14px; }
.booking-car small { display: inline-block; margin-top: 2px; padding: 0 6px; border: 1.5px solid var(--text-primary); border-radius: 4px; font-size: 11.5px; font-weight: 800; }
.booking-car.is-new { align-content: center; border-style: dashed; color: var(--btn-primary-bg); }
.booking-car.is-new .ui-icon { width: 30px; height: 30px; }
.booking-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.booking-pick { flex: none; white-space: nowrap; min-height: 40px; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: white; color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.booking-pick.is-on { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.booking-actions { align-items: center; }
.booking-actions-summary { display: grid; flex: 1; min-width: 0; gap: 1px; }
.booking-actions-summary strong { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.booking-actions-summary span { overflow: hidden; color: var(--text-secondary); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.booking-actions .btn-primary { min-width: 150px; }
.booking-actions > button { flex: none; }
.booking-actions .btn-secondary, .booking-actions .btn-primary { flex: none; }
.booking-locale { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Сводка склада на планшете (17.11.2026): итоги всегда одной строкой на всю ширину, кнопки — строкой под ними.
   Раньше auto-fit переносил «Стоимость склада» на вторую строку с пустым белым полем справа. */
@media (min-width: 761px) and (max-width: 1279px) {
  .stock-summary { grid-template-columns: minmax(0, 1fr); }
  .stock-actions { flex-direction: row; }
  .stock-actions > * { flex: 1 1 0; min-width: 0; }
  .stock-kpi { padding: 10px 14px; }
}

/* Отчёт на планшете (17.11.2026): две панели «Выручка по категориям» / «Доходы и расходы» рядом
   получали по ~320px — суммы легенды вылезали за карточку, итог в кольце переносился. До 1279px
   панели идут друг под другом, кольцо крупнее, суммы не переносятся. Период: подпись сверху,
   кнопки периода одной строкой (раньше «Диапазон» уезжал на вторую). */
.workspace-body .report-donut strong { white-space: nowrap; font-size: 15px; }
@media (min-width: 1280px) { .workspace-body .report-donut > div { width: 108px; } }
@media (min-width: 481px) and (max-width: 1279px) {
  .workspace-body .report-analytics-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-body .report-analytics-grid > * { grid-column: auto; }
  .workspace-body .report-donut-layout { grid-template-columns: 164px minmax(0, 1fr); gap: 24px; }
  .workspace-body .report-donut { width: 156px; }
  .workspace-body .report-donut > div { width: 108px; }
  .workspace-body .report-donut strong { font-size: 15px; }
  .workspace-body .report-period-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .workspace-body .report-periods { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .workspace-body .report-periods::-webkit-scrollbar { display: none; }
  .workspace-body .report-periods button { flex: 1 0 auto; white-space: nowrap; }
}
@media (max-width: 480px) {
  .workspace-body .report-donut { width: 132px; }
  .workspace-body .report-donut > div { width: 100px; }
  .workspace-body .report-donut strong { font-size: 13px; }
}

/* Перенос работы: дата и время кнопками (when-picker, 17.11.2026). */
.when-picker { display: grid; gap: 14px; }
.when-row { display: grid; gap: 8px; }
.when-label { font-size: 12px; font-weight: 650; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.when-stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; height: 48px; border: 1px solid var(--border-strong); border-radius: 12px; background: white; overflow: hidden; }
.when-stepper button { height: 100%; border: 0; background: var(--surface-0); font-family: inherit; font-size: 24px; line-height: 1; color: var(--btn-primary-bg); cursor: pointer; touch-action: manipulation; }
.when-stepper button:active { background: #e3ebfb; }
.when-stepper strong { text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.when-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.when-chips.is-hours { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.when-chips button { min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: white; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; }
.when-chips.is-hours button { padding: 0 4px; }
.when-chips button.is-on { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.when-summary { margin: 0; font-size: 14px; font-weight: 650; color: var(--text-primary); }

/* Окна выбора для списков, даты и времени на iPad/iPhone (public/js/touch-pickers.js, 17.11.2026).
   Стандартные окна Safari на iPad Air не открывались. Окно добавляется в конец body, вне Livewire. */
html.tp-open, html.tp-open body { overflow: hidden; }
.tp-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px 0; background: rgb(22 28 36 / 42%); }
.tp-sheet { display: flex; flex-direction: column; width: 520px; max-width: 100%; max-height: 82vh; border-radius: 18px 18px 0 0; background: white; box-shadow: 0 -12px 50px rgb(22 28 36 / 25%); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--border); }
.tp-head strong { font-size: 16px; color: var(--text-primary); }
.tp-close { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-0); font-size: 18px; color: var(--text-secondary); cursor: pointer; }
.tp-body { display: grid; gap: 10px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tp-options { display: grid; gap: 6px; }
.tp-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; background: white; font-family: inherit; font-size: 16px; font-weight: 600; text-align: left; color: var(--text-primary); cursor: pointer; touch-action: manipulation; }
.tp-option.is-on { border-color: var(--btn-primary-bg); background: #eef3fd; color: var(--btn-primary-bg); }
.tp-option.is-on::after { content: '✓'; font-weight: 750; }
.tp-option:disabled { opacity: .45; }
.tp-group { margin-top: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.tp-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; font-family: inherit; font-size: 15px; font-weight: 650; color: var(--text-primary); cursor: pointer; touch-action: manipulation; }
.tp-chip.is-on { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.tp-chip.is-quiet { color: var(--text-secondary); }
.tp-chip:disabled { opacity: .45; }
.tp-month-nav { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; text-align: center; }
.tp-month-nav strong { font-size: 16px; color: var(--text-primary); }
.tp-nav { height: 44px; border: 0; border-radius: 10px; background: var(--surface-0); font-size: 24px; color: var(--btn-primary-bg); cursor: pointer; }
.tp-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.tp-weekday { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.tp-day { height: 46px; border: 0; border-radius: 10px; background: white; font-family: inherit; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); cursor: pointer; touch-action: manipulation; }
.tp-day.is-other { color: var(--text-muted); }
.tp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--btn-primary-bg); }
.tp-day.is-on { background: var(--btn-primary-bg); color: white; }
.tp-day:disabled { opacity: .3; }
.tp-time-value { text-align: center; font-size: 32px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.tp-caption { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.tp-grid { display: grid; gap: 6px; }
.tp-grid.is-hours { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tp-grid.is-minutes { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tp-cell { min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: white; font-family: inherit; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-primary); cursor: pointer; touch-action: manipulation; }
.tp-cell.is-on { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.tp-actions { display: flex; gap: 8px; margin-top: 4px; }
.tp-actions > * { flex: 1 1 0; }
@media (min-width: 768px) {
  .tp-backdrop { align-items: center; padding: 24px; }
  .tp-sheet { border-radius: 18px; }
}

/* Календарь заказов у мастера — только просмотр (17.11.2026): записи не ссылки, без наведения. */
.orders-board.is-readonly .orders-chip, .orders-board.is-readonly .orders-week-card, .orders-board.is-readonly .orders-row { cursor: default; }
.orders-board.is-readonly .orders-chip:hover { filter: none; }
.orders-board.is-readonly .orders-row:hover { background: inherit; }
.booking-quick-note { margin-left: 4px; font-size: 11.5px; font-weight: 500; color: var(--text-muted); }

/* Чек-лист вклада: «Остальное — мастеру» (17.11.2026). */
.ppf-checklist-rest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 10px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--surface-0); }
.ppf-checklist-rest > span { font-size: 13.5px; color: var(--text-secondary); }
.ppf-checklist-rest-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.ppf-checklist-rest-buttons .btn-secondary { flex: 0 0 auto; width: auto; padding: 0 14px; white-space: nowrap; }

/* «Мои работы» — редизайн 17.11.2026. Цвета состояний — те же, что в планировщике (--st-*). */
.my-jobs-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.my-jobs { display: grid; gap: 16px; }
.my-jobs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.my-jobs-period { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.my-jobs-period button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-family: inherit; font-size: 14px; font-weight: 650; color: var(--text-secondary); cursor: pointer; touch-action: manipulation; }
.my-jobs-period button.is-on { background: var(--btn-primary-bg); color: white; }
.my-jobs-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.my-jobs-total { margin-right: 4px; font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.my-job-state { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.my-job-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.my-job-state.is-waiting { background: var(--st-waiting-bg); color: #9a5b0b; }
.my-job-state.is-ready { background: var(--st-ready-bg); color: var(--st-ready); }
.my-job-state.is-progress { background: var(--st-progress-bg); color: var(--st-progress); }
.my-job-state.is-done { background: var(--st-done-bg); color: #5d6670; }
.my-job-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: white; font-size: 12px; font-style: normal; font-weight: 600; color: var(--text-secondary); }

.my-job { display: grid; gap: 14px; padding: 18px 20px; border: 1px solid var(--border); border-left: 5px solid var(--st-ready); border-radius: 16px; background: white; box-shadow: var(--card-shadow); }
.my-job.is-waiting { border-left-color: var(--st-waiting); }
.my-job.is-progress { border-left-color: var(--st-progress); }
.my-job.is-done { border-left-color: var(--st-done); }
.my-job-head { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.my-job-when { display: grid; gap: 1px; padding: 10px 8px; border-radius: 12px; background: var(--surface-0); text-align: center; }
.my-job-when strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.my-job-when span { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.my-job-when em { margin-top: 4px; font-size: 11.5px; font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--btn-primary-bg); }
.my-job-main { display: grid; gap: 6px; min-width: 0; }
.my-job-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 18px; font-weight: 750; color: var(--text-primary); }
.my-job-services { margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--text-primary); }
.my-job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.my-job-action { display: flex; align-items: flex-start; justify-content: flex-end; min-width: 220px; }
.my-job-action .job-action-btn { width: 100%; min-height: 52px; margin: 0; border-radius: 12px; font-size: 16px; font-weight: 700; }
.my-job-done { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--st-done-bg); font-size: 16px; font-weight: 700; color: #3d8a63; }
.my-job-wait { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--st-waiting-bg); font-size: 13.5px; font-weight: 600; line-height: 1.35; color: #8a5a10; }

.my-job-films { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.my-job-films h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-secondary); }
.my-job-film-list { display: grid; }
.my-job-film { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) auto; align-items: center; gap: 4px 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.my-job-film:first-child { border-top: 0; padding-top: 0; }
.my-job-film small { display: block; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.my-job-film-part strong { font-size: 14px; color: var(--text-primary); }
.my-job-film-name { font-size: 14px; font-weight: 650; color: var(--text-primary); }
.my-job-film-name .my-job-tag { margin-left: 4px; padding: 1px 7px; }
.my-job-film-area { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--text-primary); }
.my-job-empty { margin: 0; font-size: 13.5px; color: var(--text-secondary); }
.my-jobs-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; border: 1px dashed var(--border-strong); border-radius: 16px; background: white; text-align: center; color: var(--text-secondary); }
.my-jobs-empty .ui-icon { width: 36px; height: 36px; color: var(--text-muted); }
.my-jobs-empty p { margin: 0; font-size: 15px; }
.my-jobs-empty .btn-secondary { width: auto; padding: 0 18px; }
.my-job > :is(.order-photos, .ppf-checklist, section:not(.my-job-films)) { margin: 0; }

@media (max-width: 1023px) {
  .my-job-head { grid-template-columns: 80px minmax(0, 1fr); }
  .my-job-action { grid-column: 1 / -1; min-width: 0; }
  .my-job-action > * { flex: 1 1 auto; }
}
@media (max-width: 560px) {
  .my-job { padding: 14px; }
  .my-job-head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .my-job-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 8px 12px; text-align: left; }
  .my-job-when strong { font-size: 18px; }
  .my-job-when em { margin: 0 0 0 auto; }
  .my-job-film { grid-template-columns: minmax(0, 1fr) auto; }
  .my-job-film-name { grid-column: 1 / -1; grid-row: 2; font-weight: 600; color: var(--text-secondary); }
  .my-jobs-period { width: 100%; }
  .my-jobs-period button { flex: 1 1 0; }
}

/* «Мои работы»: готовые заказы свёрнуты в строку (17.11.2026). wire:ignore.self держит раскрытие при обновлении. */
.my-job.is-folded { padding: 0; gap: 0; }
.my-job-fold > summary { list-style: none; }
.my-job-fold > summary::-webkit-details-marker { display: none; }
.my-job-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; cursor: pointer; touch-action: manipulation; }
.my-job-summary-time { display: grid; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.my-job-summary-time small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); }
.my-job-summary-main { display: grid; gap: 2px; min-width: 0; }
.my-job-summary-main strong { overflow: hidden; font-size: 15px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.my-job-summary-main > span { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.my-job-summary-chevron { font-size: 22px; line-height: 1; color: var(--text-muted); transition: transform .15s; }
.my-job-fold[open] .my-job-summary-chevron { transform: rotate(90deg); }
.my-job-fold[open] > .my-job-summary { border-bottom: 1px solid var(--border); }
.my-job-fold-body { display: grid; gap: 14px; padding: 14px 16px 16px; }
@media (max-width: 560px) {
  .my-job-summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .my-job-summary .my-job-state { display: none; }
}

/* Комплект тонировки с разной плёнкой на стёклах (18.11.2026): цена одна, плёнка у групп своя. */
.one-film-split { justify-self: start; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-height: 40px; padding: 6px 12px; border: 1px dashed var(--btn-primary-bg); border-radius: 10px; background: transparent; color: var(--btn-primary-bg); font: inherit; font-size: 13px; font-weight: 600; text-align: left; cursor: pointer; }
.one-film-split span { color: var(--text-secondary); font-weight: 500; }
.one-film-split-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); }
.one-film-split-head span { display: grid; gap: 2px; min-width: 0; }
.one-film-split-head strong { font-size: 14px; }
.one-film-split-head small { color: var(--text-secondary); font-size: 13px; }
.one-film-item.is-split { margin-left: 14px; border-left: 3px solid var(--btn-primary-bg); }
@media (max-width: 520px) { .one-film-item.is-split { margin-left: 6px; } }

/* «Весь прайс тонировки» одной раскладкой (18.11.2026): строка на позицию, уровни плёнки — кнопками. */
.tint-price-tip { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--text-primary); font-size: 13.5px; line-height: 1.4; }
.tint-pick-more .general-tint-group-title { margin: 14px 0 6px; }
.tint-price-list { display: grid; border: 1px solid var(--border); border-radius: 12px; background: white; overflow: hidden; }
.tint-price-row { display: grid; gap: 8px; padding: 12px 14px; }
.tint-price-row + .tint-price-row { border-top: 1px solid var(--border); }
.tint-price-name { display: grid; gap: 2px; min-width: 0; }
.tint-price-name strong { font-size: 14.5px; }
.tint-price-name small { color: var(--text-secondary); font-size: 12.5px; }
.tint-price-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tint-price-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); }
.tint-price-chip.is-selected { border-color: var(--btn-primary-bg); background: var(--btn-primary-bg); color: white; }
.tint-price-chip-main { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 12px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.tint-price-chip-label { font-weight: 500; }
.tint-price-chip-price { font-weight: 700; white-space: nowrap; }
.tint-price-chip-check { width: 16px; height: 16px; flex: none; }
.tint-price-qty { display: inline-flex; align-items: center; gap: 2px; padding-right: 4px; border-left: 1px solid rgba(255, 255, 255, .35); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tint-price-qty button { width: 34px; min-height: 42px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.tint-price-qty button:disabled { opacity: .4; cursor: not-allowed; }

/* Новая работа в заказе, где машину уже приняли (18.11.2026): сводка вместо шага «Данные автомобиля». */
.car-accepted-panel { display: grid; gap: 12px; margin-bottom: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-0); }
.car-accepted-head { display: flex; align-items: center; gap: 12px; }
.car-accepted-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: #e3f6ec; color: #1f7a4a; }
.car-accepted-icon .ui-icon { width: 18px; height: 18px; }
.car-accepted-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.car-accepted-text strong { font-size: 14.5px; }
.car-accepted-text small { color: var(--text-secondary); font-size: 13px; }
.car-accepted-panel .field { margin: 0; }

/* Зарплата за период (19.11.2026): итог с выгрузкой в Excel и ведомость по работам. */
.payroll-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.payroll-summary-text { display: grid; gap: 2px; }
.payroll-summary-text span { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.payroll-summary-text strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.payroll-summary-text small { color: var(--text-secondary); font-size: 13px; }
.payroll-summary-text b, .payroll-master-count b { color: #b45309; font-weight: 700; }
.payroll-export { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.payroll-export .ui-icon { width: 18px; height: 18px; }
.payroll-list { margin-top: 16px; }
.payroll-list h3 { margin: 0 0 8px; font-size: 16px; }
.payroll-master { border-top: 1px solid var(--border); }
.payroll-master > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; cursor: pointer; list-style: none; }
.payroll-master > summary::-webkit-details-marker { display: none; }
.payroll-master-name { font-weight: 600; }
.payroll-master-name small { margin-left: 6px; color: var(--text-secondary); font-weight: 500; }
.payroll-master-count { color: var(--text-secondary); font-size: 13px; }
.payroll-master > summary strong { font-variant-numeric: tabular-nums; }
.payroll-master ul { display: grid; gap: 0; margin: 0 0 10px; padding: 0; list-style: none; }
.payroll-master li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); }
.payroll-date { color: var(--text-secondary); font-size: 13px; font-variant-numeric: tabular-nums; }
.payroll-work { display: grid; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.payroll-work strong { font-size: 14px; }
.payroll-work small { color: var(--text-secondary); font-size: 12.5px; overflow-wrap: anywhere; }
.payroll-pay { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.payroll-pay.is-missing { color: #b45309; font-weight: 500; }
@media (max-width: 600px) {
  .payroll-master > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .payroll-master-count { grid-column: 1 / -1; grid-row: 2; }
}

/* Порог «мало» по категориям на складе (19.11.2026). */
.stock-thresholds { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--text-secondary); font-size: 13px; }
.stock-thresholds b { color: var(--text-primary); font-weight: 600; }
.stock-thresholds .link-btn { min-height: 36px; }
.stock-thresholds-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.stock-thresholds-form .field { display: grid; gap: 4px; margin: 0; }
.stock-thresholds-form .field span:first-child { font-weight: 600; color: var(--text-primary); }
.stock-thresholds-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.stock-thresholds-form .hint { grid-column: 1 / -1; margin: 0; }

/* Контрольный осмотр PPF через 2 недели (19.11.2026) — список на странице заказов. */
.ppf-checkups { margin: 0 0 12px; border: 1px solid #f3d9a4; border-radius: 12px; background: #fff8eb; }
.ppf-checkups > summary { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; cursor: pointer; list-style: none; }
.ppf-checkups > summary::-webkit-details-marker { display: none; }
.ppf-checkups > summary > span:last-child { display: grid; gap: 2px; }
.ppf-checkups > summary small { color: var(--text-secondary); font-size: 12.5px; }
.ppf-checkups-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: #fbe6bf; color: #8a5a12; }
.ppf-checkups-icon .ui-icon { width: 18px; height: 18px; }
.ppf-checkups ul { display: grid; margin: 0; padding: 0 14px; list-style: none; }
.ppf-checkups li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid #f3d9a4; }
.ppf-checkup-car { display: grid; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.ppf-checkup-car small, .ppf-checkup-client span { color: var(--text-secondary); font-size: 12.5px; }
.ppf-checkup-client { display: grid; gap: 2px; }
.ppf-checkup-client a { color: var(--btn-primary-bg); font-weight: 600; text-decoration: none; }
.ppf-checkup-actions { display: flex; gap: 8px; }
.ppf-checkup-actions button { min-height: 44px; padding: 0 14px; }
.ppf-checkups .hint { margin: 0; padding: 8px 14px 12px; }
@media (max-width: 760px) {
  .ppf-checkups li { grid-template-columns: minmax(0, 1fr); }
  .ppf-checkup-actions button { flex: 1; }
}

/* Плёнка, не выбранная при приёме (19.11.2026): выбор в работе и в окне «Завершить заказ». */
.order-material-film-name.is-missing, .my-job-film-name .is-missing { color: var(--coral-text, #b45309); font-weight: 600; }
.late-film { margin-top: 12px; border: 1px solid #f3d9a8; background: #fff8eb; border-radius: var(--radius, 12px); }
.late-film > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; cursor: pointer; list-style: none; color: #8a5a12; font-size: 14px; }
.late-film > summary::-webkit-details-marker { display: none; }
.late-film > summary > span:first-of-type { flex: 1 1 200px; }
.late-film-action { color: var(--btn-primary-bg, #2563eb); font-weight: 600; white-space: nowrap; }
.late-film[open] > summary .late-film-action { display: none; }
.late-film-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 14px; }
.late-film-body .field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.late-film-body .field > span { font-size: 13px; color: var(--text-secondary); }
.late-film-body select { width: 100%; min-height: 44px; }
.late-film-parts > summary { cursor: pointer; font-size: 14px; color: var(--btn-primary-bg, #2563eb); min-height: 32px; }
.late-film-parts[open] { display: flex; flex-direction: column; gap: 8px; }
.late-film-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.late-film-foot .btn-primary { margin: 0; }
.late-film-foot .hint { font-size: 12px; color: var(--text-secondary); }

/* Контрольный осмотр PPF на карточке заказа (19.11.2026). */
.order-ppf-checkup { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-0); font-size: 13px; color: var(--text-secondary); }
.order-ppf-checkup strong { color: var(--text-primary); }
.order-ppf-checkup a { font-weight: 700; color: var(--btn-primary-bg); text-decoration: none; }
.order-ppf-checkup small { font-size: 12px; }

/* ===== Планировщик одной дорожкой (19.11.2026): цвет — вид работ, состояние — подпись ===== */
:root { --cat-tint: #1d9e75; --cat-ppf: #d85a30; --cat-other: #7f63c9; --cat-tint-bg: #e7f6f0; --cat-ppf-bg: #fbeee8; --cat-other-bg: #f1edfa; }
.workspace-body .planner-day-lanes.is-single { display: block; }
.planner-cat-dot { display: inline-block; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--cat-other); }
.planner-cat-dot.tint { background: var(--cat-tint); }
.planner-cat-dot.ppf { background: var(--cat-ppf); }
.planner-legend-sep { width: 1px; align-self: stretch; background: var(--border); }

.workspace-body :is(.day-timeline-card, .planner-week-card):not(.continuation) {
  border: 0.5px solid var(--border-strong); border-left-width: 0.5px; padding-left: 11px; background: var(--cat-other-bg); color: var(--text-primary); opacity: 1;
}
.workspace-body :is(.day-timeline-card, .planner-week-card):not(.continuation)::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--cat-bar, var(--cat-other));
}
.workspace-body :is(.day-timeline-card, .planner-week-card).tint { background: var(--cat-tint-bg); border-color: #9fd8c4; }
.workspace-body :is(.day-timeline-card, .planner-week-card).ppf { background: var(--cat-ppf-bg); border-color: #efbfa9; }
.workspace-body :is(.day-timeline-card, .planner-week-card).other { background: var(--cat-other-bg); border-color: #cfc3ee; }
.workspace-body :is(.day-timeline-card, .planner-week-card).mixed { background: #fff; border-color: var(--border-strong); }
.workspace-body :is(.day-timeline-card, .planner-week-card).status-done { opacity: .7; }

.planner-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.planner-card-status { flex: 0 0 auto; padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 16px; white-space: nowrap; }
.planner-card-status.status-waiting { background: var(--st-waiting-bg); color: #9a5b0b; box-shadow: inset 0 0 0 1px var(--st-waiting); }
.planner-card-status.status-ready { background: var(--st-ready-bg); color: var(--st-ready); }
.planner-card-status.status-in-progress { background: var(--st-progress-bg); color: var(--st-progress); }
.planner-card-status.status-done { background: var(--st-done-bg); color: #5d6670; }
.workspace-body .day-timeline-card .day-timeline-card-vehicle { margin: 1px 0 0; font-size: 12px; color: var(--text-secondary); }
.workspace-body .day-timeline-card .day-timeline-card-vehicle strong { color: var(--text-primary); }
.planner-card-works { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 1px; }
.planner-card-works li { display: flex; align-items: baseline; gap: 5px; font-size: 11.5px; line-height: 1.3; color: var(--text-primary); }
.planner-card-works li .planner-cat-dot { transform: translateY(-1px); }
.planner-card-works em { font-style: normal; color: var(--text-secondary); }
.planner-week-card .planner-card-works li { font-size: 10.5px; }
.planner-week-card .planner-card-status { font-size: 9px; padding: 0 5px; }
.planner-chip-works { display: flex; flex-wrap: wrap; gap: 4px; }
.workspace-body .day-timeline-card .planner-card-works li { font-size: 12.5px; }
.workspace-body .day-timeline-card .day-timeline-card-vehicle { font-size: 13px; }
.workspace-body .day-timeline-card .day-timeline-card-time { font-size: 12px; }

/* «Новая запись», раздел 1 (19.11.2026): клиент и автомобиль — две равные карточки рядом.
   Рисунок машины перенесён внутрь карточки «Автомобиль», раньше он стоял отдельной карточкой
   слева и под ним оставалось пустое место. */
.booking-pane-vehicle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.booking-car-card .booking-hero { min-height: 0; margin-bottom: 12px; padding: 10px 12px 12px; gap: 2px; border-radius: 10px; }
.booking-car-card .booking-hero-car { max-width: 230px; }
.booking-car-card .booking-hero-title { margin-top: 2px; font-size: 17px; }
.booking-car-card .booking-hero-caption { font-size: 11.5px; }
.booking-car-card .booking-picks { margin-bottom: 10px; }
.booking-car-card .field-row + .booking-picks { margin: -2px 0 10px; }
@media (max-width: 767px) {
  .booking-pane-vehicle { grid-template-columns: minmax(0, 1fr); }
}
/* Раздел 3: «Когда» и «Кто и где» друг под другом во всю ширину. Рядом узкая колонка мастеров
   вытягивалась вдвое выше «Когда», под ним оставалась пустота, а лента дней прокручивалась вбок. */
.booking-pane-time { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .booking-pane-time .booking-day { flex: 1 0 62px; }
}
/* Клиент уже найден — от его карточки остаётся одна строка, поэтому машины клиента во всю ширину под ней. */
.booking-pane-vehicle.is-client-picked { grid-template-columns: minmax(0, 1fr); }
.orders-pay.is-awaiting { color: #9a5b0b; background: #fdf3e2; }
.orders-owes.is-awaiting { background: #d98a12; }
/* Ждём перевод: запись в календаре в жёлтой рамке (25.11.2026). */
.orders-chip.is-awaiting-pay, .orders-week-card.is-awaiting-pay { box-shadow: inset 0 0 0 1.5px #d98a12; background: #fdf3e2; }

/* Перечисление по счёту (19.11.2026): сумма засчитана заказу, деньги ждём — отдельная пометка и кнопка «Деньги пришли». */
.order-payment-awaiting { display: flex; align-items: center; gap: 12px; margin: 12px 20px 0; padding: 14px 16px; border: 1px solid #f0d9b0; border-radius: 12px; background: #fdf6ea; color: #8a5a12; }
.order-payment-awaiting-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #f6e3c3; }
.order-payment-awaiting strong { display: block; font-size: 15px; }
.order-payment-awaiting p { margin: 2px 0 0; font-size: 12.5px; color: #8a5a12; }
.order-payment-transfer { display: inline-block; margin: 4px 0 0; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.order-payment-transfer.is-waiting { color: #9a5b0b; background: #fdf3e2; }
.order-payment-transfer.is-received { color: #1f7a52; background: #e7f6ef; }
.transfer-form-note { padding: 12px 14px; margin: 12px 0; border-radius: 10px; background: #fdf6ea; color: #8a5a12; font-size: 13px; }
@media (max-width: 767px) { .order-payment-awaiting { margin-inline: 16px; align-items: flex-start; } }

/* Мастер завершает только свои работы (20.11.2026): незаконченные работы других мастеров. */
.my-job-others { display: block; margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }
.my-job-summary-main .my-job-others { margin-top: 2px; font-size: 12px; }

/* Счёт на оплату (24.11.2026): поля формы и кнопка «Отправить…». */
.invoice-issue-form input[type="text"], .invoice-issue-form input[type="date"], .invoice-issue-form select:not(.invoice-language-select) { min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; color: var(--text-primary); font: inherit; font-size: 14px; padding: 8px 12px; }
.invoice-issue-form.is-bill { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-items: end; }
.invoice-issue-form.is-bill > button { min-height: 44px; }
.invoice-share-btn { display: inline-flex; align-items: center; gap: 6px; }
.invoice-share-btn .ui-icon { width: 18px; height: 18px; }
@media (max-width: 600px) { .invoice-issue-form.is-bill { grid-template-columns: 1fr; } .invoice-document-actions > .invoice-share-btn { flex: 1 1 100%; justify-content: center; } }

/* Строки счёта на оплату по-латышски (24.11.2026). */
.invoice-lines { grid-column: 1 / -1; border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.invoice-lines legend { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; padding: 0; }
.invoice-line { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.invoice-line textarea { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: white; color: var(--text-primary); font: inherit; font-size: 14px; padding: 8px 12px; resize: vertical; }
.invoice-line small { color: var(--text-muted); }
.invoice-line.has-russian textarea { border-color: var(--coral-text, #c23a1c); }
.invoice-line.has-russian small { color: var(--coral-text, #c23a1c); }

/* Зарплата за выезд в заказе «На выезде» (24.11.2026). */
.trip-pay-card { margin-top: 16px; }
.trip-pay-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.trip-pay-head > .ui-icon { width: 22px; height: 22px; color: var(--btn-primary-bg, #2563eb); margin-top: 2px; flex: none; }
.trip-pay-head h2 { font-size: 16px; margin: 0; }
.trip-pay-head p { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.trip-pay-total { margin-left: auto; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.trip-pay-list { display: grid; gap: 8px; }
.trip-pay-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.trip-pay-row .field-error { grid-column: 1 / -1; }
.trip-pay-input { display: flex; align-items: center; gap: 6px; }
.trip-pay-input input { width: 100%; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; background: white; }
.trip-pay-list > .btn-primary { justify-self: end; margin-top: 4px; }
@media (max-width: 600px) { .trip-pay-row { grid-template-columns: minmax(0, 1fr) 120px; } .trip-pay-list > .btn-primary { justify-self: stretch; } }

/* Пробег при приёме (26.11.2026). */
.intake-odometer-field { margin-top: 12px; }
.intake-odometer-field .intake-odometer-input { font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.one-row-odometer { padding-right: 14px; }
.one-row-odometer > :is(.intake-odometer-help, .intake-odometer-warning, .field-error) { grid-column: 1 / -1; margin: 0; }
.one-row-odometer-unit { color: var(--text-secondary); font-size: 14px; font-weight: 600; }
.intake-odometer-help { margin: 4px 0 0; color: var(--text-secondary); font-size: 13px; }
.intake-odometer-warning { margin: 4px 0 0; color: #a15c07; font-size: 13px; font-weight: 600; }
.vehicle-info-odometer small { display: block; color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.order-warranty-odometer { color: var(--text-secondary); }
.order-warranty-odometer strong { color: var(--text-primary); }

/* Напоминание «мастер уже занят» (27.11.2026): тот же всплывающий блок, жёлтый, закрывается нажатием. */
.workspace-body .alert-success.is-warning { background: var(--accent-bg); color: var(--accent-text); border-color: #f1d79a; cursor: pointer; }
