/* ============================================================
   Вкладка «Задания» модуля «Смены» (Jump.Работа)
   Стили повторяют визуальный язык вкладки «Смены».
   ============================================================ */

/* ---------- Группы действий в заголовке ---------- */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Круглая кнопка-иконка (загрузка Excel) */
.add-button.icon-only {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
    font-size: 15px;
}
.add-button.icon-only i { font-size: 15px; }

/* Переключатель «Смены | Задания» в заголовке (как view-toggle в тарифах) */
#shiftModuleTabs {
    flex-shrink: 0;
}
.module-tab-count {
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 16px;
}
#shiftModuleTabs .module-tab-count {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
}
#shiftModuleTabs .view-toggle-btn.active .module-tab-count {
    background: var(--primary);
    color: #fff;
}

/* ---------- Статусы заданий ---------- */
.order-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    line-height: 18px;
}
.order-status i { font-size: 0.62rem; }

.order-status-moderation { background: #e2e8f0; color: #475569; }
.order-status-search { background: #dbeafe; color: #1d4ed8; }
.order-status-assembled { background: #cffafe; color: #0e7490; }
.order-status-progress { background: #ffedd5; color: #c2410c; }
.order-status-accept { background: #ede9fe; color: #6d28d9; }
.order-status-payment { background: #e0e7ff; color: #4338ca; }
.order-status-done { background: #dcfce7; color: #166534; }
.order-status-canceled { background: #fee2e2; color: #b91c1c; }
.order-status-rejected { background: #fecaca; color: #991b1b; }
.order-status-unknown { background: #f1f5f9; color: #64748b; }

/* ---------- Таблица заданий ---------- */
.order-title-cell strong { display: block; font-size: 0.82rem; }
.order-title-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 3px;
}
.order-id {
    display: block;
    margin-top: 1px;
    font-size: 0.64rem;
    color: var(--text-muted);
    font-weight: 500;
}
.order-shift-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}
.order-shift-chip i { font-size: 0.58rem; }
.order-shift-chip.is-paid {
    background: #dcfce7;
    color: #166534;
}
.order-address {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 140px;
}
.order-address small {
    color: var(--text-muted);
    font-size: 0.66rem;
}
.order-period-cell {
    display: flex;
    flex-direction: column;
    gap: 1px;
    white-space: nowrap;
    font-size: 0.72rem;
    line-height: 1.35;
}
.order-period-cell strong {
    font-size: 0.76rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.order-period-cell small {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- Магазин / исполнитель / менеджер ---------- */
.orders-table { table-layout: fixed; min-width: 1180px; }
.orders-table th,
.orders-table td { overflow-wrap: anywhere; }
.orders-table td {
    white-space: normal;
    padding: 11px 12px;
    vertical-align: middle;
}
.orders-table th {
    white-space: nowrap;
    padding: 11px 12px;
    text-align: left;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}
.orders-table th:nth-child(4),
.orders-table td:nth-child(4) { text-align: right; }
.orders-table th:nth-child(5),
.orders-table td:nth-child(5) { text-align: center; }
.orders-table th:not([data-sort]) { cursor: default; }
.orders-table .order-status { max-width: 100%; white-space: normal; line-height: 1.25; }
.orders-table .order-address { min-width: 0; }
.orders-table .order-cost-cell strong {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 0.8rem;
}
.orders-table .order-manager-cell {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.orders-table .order-address span,
.orders-table .order-address small,
.orders-table .order-title-cell strong,
.orders-table .order-shop-cell strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.orders-table .order-address span { -webkit-line-clamp: 1; }
.orders-table .order-address small { -webkit-line-clamp: 2; }
.orders-table .order-title-cell strong { -webkit-line-clamp: 2; }
.orders-table .order-shop-cell strong { -webkit-line-clamp: 2; width: 100%; }
.order-shop-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}
.order-shop-cell strong {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}
.order-shop-tt { display: flex; }
.order-executor-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}
.order-executor-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}
.order-executor-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    min-width: 0;
}
.order-executor-name-row .order-executor-name {
    flex: 1 1 auto;
    min-width: 0;
}
.order-executor-name-row .badge-selfemployed {
    flex: 0 0 auto;
}
.order-executor-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    max-width: 100%;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}
.order-executor-state {
    display: inline-flex;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.61rem;
    font-weight: 700;
    line-height: 15px;
    white-space: nowrap;
}
.order-executor-state i { font-size: 0.55rem; }
.order-executor-state.is-approved { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.order-executor-state.is-waiting { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.order-executor-state.is-canceled { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.order-executor-state.is-muted { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.order-executor-state.is-payment { background: #e0e7ff; color: #4338ca; border-color: #c7d2fe; }
.order-executor-state.is-done { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.order-executor-state.is-failed { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.order-executor-state.is-warning { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.order-executor-state.is-reserve { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
.order-executor-empty {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.25;
}
.order-executor-more {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}
.order-manager-cell {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ---------- Автоотмена задания ---------- */
.order-auto-cancel-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.72rem;
    line-height: 1.45;
}
.order-auto-cancel-note > i {
    margin-top: 2px;
    color: #dc2626;
}
.order-auto-cancel-note strong {
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
}
.order-auto-cancel-note span {
    display: block;
    margin-top: 1px;
    color: #b91c1c;
}

/* ---------- Приёмка работы ---------- */
.order-accept-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(22, 163, 74, 0.24);
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.06) 0%, var(--surface) 100%);
}
.order-accept-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.order-accept-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}
.order-accept-hint {
    margin-top: 2px;
    font-size: 0.68rem;
    line-height: 1.4;
    color: var(--text-muted);
}
.order-accept-reset {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}
.order-accept-reset:hover { border-color: rgba(var(--accent-rgb), 0.35); color: var(--accent); }
.order-accept-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.order-accept-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 90px;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.order-accept-row.is-zero {
    opacity: 0.62;
    background: #fef2f2;
    border-color: #fecaca;
}
.order-accept-row.is-payment-data {
    background: #fffbeb;
    border-color: #fde68a;
}
.order-accept-state {
    display: inline-flex;
    align-items: center;
    margin-top: 2px;
    font-size: 0.61rem;
    font-weight: 700;
    color: #b45309;
}
.order-accept-person {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.order-accept-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.order-accept-sub {
    font-size: 0.64rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-accept-volume {
    display: flex;
    align-items: center;
    gap: 5px;
}
.order-accept-input {
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    outline: none;
    box-sizing: border-box;
}
.order-accept-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.09);
}
.order-accept-unit {
    font-size: 0.66rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.order-accept-sum {
    text-align: right;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.order-accept-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(22, 163, 74, 0.08);
    color: #166534;
    font-size: 0.72rem;
    font-weight: 700;
}
.order-accept-total strong {
    font-size: 0.9rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.order-accept-error {
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
}
.order-accept-error:empty { display: none; }
.order-accept-actions {
    display: flex;
    justify-content: flex-end;
}
.order-accept-btn {
    height: 36px;
    padding: 0 14px;
    border: none;
    border-radius: 9px;
    background: #16a34a;
    color: #fff;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.22);
    transition: filter 0.15s;
}
.order-accept-btn:hover { filter: brightness(1.05); }
.order-accept-btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.order-accept-cancel {
    margin-right: auto;
    background: #fff;
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.35);
    box-shadow: none;
}
.order-accept-cancel:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.order-accept-empty {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px;
    border-radius: 9px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.72rem;
}

/* Отмена задания */
.order-detail-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.order-cancel-btn {
    width: 100%;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.order-cancel-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}
.order-cancel-btn:disabled {
    opacity: 0.6;
    cursor: default;
    background: rgba(220, 38, 38, 0.06);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.35);
}

/* Предупреждение при создании задания без исполнителя */
.order-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}
.order-confirm-card {
    width: min(420px, 100%);
    padding: 22px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
}
.order-confirm-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    color: #b45309;
    font-size: 1.15rem;
}
.order-confirm-title {
    margin-bottom: 6px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}
.order-confirm-text {
    margin-bottom: 18px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.order-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.order-confirm-btn {
    height: 38px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.order-confirm-back {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text-secondary);
}
.order-confirm-back:hover { background: var(--surface); }
.order-confirm-continue {
    background: #2563eb;
    color: #fff;
}
.order-confirm-continue:hover { filter: brightness(1.05); }

/* ---------- Форма создания задания ---------- */
.order-form-window {
    max-width: 1160px;
    width: 96vw;
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 40px 110px rgba(15, 23, 42, 0.3);
}

/* Шапка */
.order-form-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px 22px 17px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.order-form-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #c02626 100%);
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.26);
    flex-shrink: 0;
}
.order-form-header-icon-jump {
    background: transparent;
    box-shadow: none;
}
.order-form-header-logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}
.order-form-header-text {
    flex: 1;
    min-width: 0;
}
.order-form-header-text h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
}
.order-form-header-text p {
    margin: 3px 0 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--text-muted);
}
.order-form-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.order-form-close:hover {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.05);
}

/* Двухколоночная раскладка: форма + последние задания */
.order-form-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.order-form-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.order-form-history {
    width: 302px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--border);
    background: var(--surface);
    padding: 18px 16px;
}
.order-form-history-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.order-form-history-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    font-size: 0.68rem;
    flex-shrink: 0;
}
.order-form-history-title h4 {
    margin: 0;
    font-size: 0.79rem;
    font-weight: 800;
    color: var(--text);
}
.order-form-history-title p {
    margin: 1px 0 0;
    font-size: 0.66rem;
    color: var(--text-muted);
}
.order-form-history-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-right: 2px;
}
.order-history-card {
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.order-history-card:hover {
    border-color: rgba(var(--accent-rgb), 0.28);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}
.order-history-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.order-history-card-date {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.order-history-card-top .order-status {
    padding: 1px 7px;
    font-size: 0.6rem;
    line-height: 15px;
}
.order-history-card-shop {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.order-history-card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: 0.66rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.order-history-card-meta i {
    width: 11px;
    font-size: 0.58rem;
    text-align: center;
    flex-shrink: 0;
}
.order-history-card-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-history-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
}
.order-history-card-executor {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
    color: var(--text-secondary);
}
.order-history-card-cost {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.order-history-loading,
.order-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 30px 12px;
    text-align: center;
    font-size: 0.74rem;
    color: var(--text-muted);
}
.order-history-loading i { color: var(--accent); }

/* Плашка «данные из заявки» */
.order-form-prefill {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 11px;
    background: rgba(37, 99, 235, 0.06);
    color: #1e40af;
    font-size: 0.72rem;
    line-height: 1.4;
}
.order-form-prefill > i {
    margin-top: 2px;
    color: #2563eb;
}
.order-form-prefill strong {
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    color: #1d4ed8;
}
.order-form-prefill span {
    display: block;
    margin-top: 1px;
    color: #3b5fbf;
}

/* Контент и секции */
.order-form-content {
    padding: 18px 22px 20px;
    background: var(--surface-2);
}
.order-form-sections {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.order-form-card {
    padding: 14px 16px 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.order-form-card-auto {
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.035) 0%, rgba(var(--accent-rgb), 0.01) 100%);
    border-color: rgba(var(--accent-rgb), 0.16);
}
.order-form-card-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}
.order-form-card-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    font-size: 0.68rem;
    flex-shrink: 0;
}
.order-form-card-title {
    min-width: 0;
    flex: 1;
}
.order-form-card-title h4 {
    margin: 0;
    font-size: 0.79rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
}
.order-form-card-title p {
    margin: 1px 0 0;
    font-size: 0.68rem;
    line-height: 1.3;
    color: var(--text-muted);
}

/* Сетка полей */
.order-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px 13px;
}
.order-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.order-form-field.full { grid-column: 1 / -1; }
.order-form-field label {
    font-size: 0.69rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
}
.order-form-field .req { color: #dc2626; }

/* Поля ввода */
.order-form-field input,
.order-form-field select,
.order-form-field textarea {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.order-form-field input::placeholder,
.order-form-field textarea::placeholder { color: #a3aebf; }
.order-form-field input:hover:not([readonly]):not(:focus),
.order-form-field select:hover:not(:disabled):not(:focus),
.order-form-field textarea:hover:not([readonly]):not(:focus) {
    border-color: rgba(var(--accent-rgb), 0.35);
}
.order-form-field input:focus,
.order-form-field select:focus,
.order-form-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.09);
}
.order-form-field textarea {
    height: auto;
    min-height: 80px;
    padding: 9px 12px;
    line-height: 1.45;
    resize: vertical;
}
.order-form-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    padding-right: 34px;
    cursor: pointer;
}

/* Поле с иконкой */
.order-input-shell {
    position: relative;
    display: block;
    width: 100%;
}
.order-input-shell > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.15s;
    z-index: 1;
}
.order-input-shell:focus-within > i { color: var(--accent); }
.order-input-shell > input,
.order-input-shell > select { padding-left: 34px; }
.order-input-shell > input[readonly] { color: var(--text-secondary); }

/* Кастомный селект */
.order-custom-select { position: relative; width: 100%; }
.order-custom-select-btn {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.order-input-shell > .order-custom-select .order-custom-select-btn { padding-left: 34px; }
.order-custom-select-btn:hover { border-color: rgba(var(--accent-rgb), 0.35); }
.order-custom-select.open .order-custom-select-btn,
.order-custom-select-btn:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.09);
}
.order-custom-select-btn.placeholder .order-custom-select-value { color: #a3aebf; }
.order-custom-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-custom-select-btn i {
    font-size: 0.62rem;
    color: var(--text-muted);
    transition: transform 0.15s;
    flex-shrink: 0;
}
.order-custom-select.open .order-custom-select-btn i { transform: rotate(180deg); }
.order-custom-select-menu {
    display: none;
    position: absolute;
    z-index: 10002;
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    max-height: 230px;
    overflow-y: auto;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.2);
}
.order-custom-select-menu.show { display: block; }
.order-custom-select-menu.up {
    top: auto;
    bottom: calc(100% + 5px);
}
.order-custom-option {
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.8rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.order-custom-option:hover { background: rgba(var(--accent-rgb), 0.07); color: var(--accent); }
.order-custom-option.selected {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    font-weight: 700;
}
.order-custom-empty { padding: 10px; color: var(--text-muted); font-size: 0.78rem; }
.order-custom-select-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Период: дата и время */
.order-form-duration-badge {
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.09);
    color: #15803d;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}
.order-form-duration-badge.warn {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}
.order-period {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.order-period-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 11px 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.order-period-col:focus-within {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.06);
}
.order-period-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.order-period-label i {
    font-size: 0.58rem;
    color: var(--accent);
}
.order-period-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 6px;
}
.order-datetime {
    position: relative;
    display: block;
    min-width: 0;
}
.order-datetime > i {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.64rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.15s;
}
.order-datetime:focus-within > i { color: var(--accent); }
.order-datetime input {
    width: 100%;
    height: 36px;
    padding: 0 7px 0 27px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.order-datetime input:hover { border-color: rgba(var(--accent-rgb), 0.35); }
.order-datetime input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.09);
}
.order-datetime input::-webkit-calendar-picker-indicator {
    opacity: 0.45;
    cursor: pointer;
    padding: 1px;
    border-radius: 4px;
    transition: opacity 0.15s;
}
.order-datetime input:hover::-webkit-calendar-picker-indicator,
.order-datetime input:focus::-webkit-calendar-picker-indicator { opacity: 0.9; }
.order-period-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.66rem;
    flex-shrink: 0;
}
.order-form-schedule-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 7px 11px;
    border-radius: 9px;
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
}
.order-form-schedule-hint::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
    flex-shrink: 0;
}
.order-form-schedule-hint.muted::before { background: #94a3b8; }
.order-form-schedule-hint.warn {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}
.order-form-schedule-hint.warn::before { background: #d97706; }

/* Исполнители */
.order-contractor-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}
.order-contractor-chips:empty { display: none; }
.order-contractor-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px 3px 10px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.07);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}
.order-contractor-chip-remove {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
}
.order-contractor-chip-remove:hover { background: rgba(var(--accent-rgb), 0.14); }
.order-contractor-suggest-item { padding: 8px 12px; }

/* Подсказки и вспомогательные элементы */
.order-form-hint {
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--text-muted);
}
.order-form-hint:empty { display: none; }
.order-form-hint.warn {
    color: #b45309;
    font-weight: 600;
}
.order-form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.order-form-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.order-form-copy-btn:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}
.order-form-copy-btn.copied {
    border-color: rgba(22, 163, 74, 0.4);
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
}

/* Только для чтения */
.order-form-field input[readonly],
.order-form-field textarea[readonly] {
    background: var(--surface-2);
    border-color: transparent;
    color: var(--text-secondary);
    cursor: default;
}
.order-form-field input[readonly]:focus,
.order-form-field textarea[readonly]:focus {
    border-color: transparent;
    box-shadow: none;
}
.order-input-shell > input[readonly] { background: var(--surface-2); }

/* Стоимость */
.order-form-total {
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(var(--accent-rgb), 0.16);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-rgb), 0.03) 100%);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Подсказки магазина в автодополнении */
.order-shop-suggest-item { padding: 8px 12px; }
.order-contractor-suggest-head {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.order-shop-suggest-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
}
.order-shop-suggest-meta {
    margin-top: 1px;
    font-size: 0.66rem;
    color: var(--text-muted);
    line-height: 1.25;
}
.order-shop-suggest-empty {
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: default;
}

/* Подвал */
.order-form-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.order-form-error {
    flex: 1;
    min-width: 0;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}
.order-form-error:empty { display: none; }
.order-form-footer .btn-primary {
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.22);
}
.order-form-footer .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Компактный вид формы нового задания */
.order-form-window {
    max-width: 1060px;
    border-radius: 18px;
}
.order-form-header {
    gap: 11px;
    padding: 13px 18px 11px;
    border-bottom-color: rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}
.order-form-header-icon,
.order-form-header-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}
.order-form-header-text h3 {
    font-size: 0.95rem;
    color: #fff;
}
.order-form-header-text p {
    margin-top: 2px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.75);
}
.order-form-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}
.order-form-close:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.order-form-content { padding: 12px 18px 14px; }
.order-form-sections { gap: 10px; }
.order-form-card {
    padding: 10px 13px 12px;
    border-radius: 12px;
}
.order-form-card-head {
    gap: 8px;
    margin-bottom: 8px;
}
.order-form-card-icon {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    font-size: 0.62rem;
}
.order-form-card-title h4 { font-size: 0.75rem; }
.order-form-card-title p { display: none; }
.order-form-grid { gap: 8px 11px; }
.order-form-field { gap: 4px; }
.order-form-field label { font-size: 0.66rem; }
.order-form-field input,
.order-form-field select,
.order-form-field textarea {
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 0.78rem;
}
.order-input-shell > input,
.order-input-shell > select { padding-left: 32px; }
.order-input-shell > select { padding-right: 32px; }
.order-input-shell > .order-custom-select .order-custom-select-btn { padding-left: 32px; }
.order-custom-select-btn {
    height: 34px;
    border-radius: 9px;
    font-size: 0.78rem;
}
.order-form-field textarea {
    min-height: 50px;
    padding: 7px 10px;
}
.order-form-total {
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 0.85rem;
}
.order-period { gap: 8px; }
.order-period-col {
    gap: 5px;
    padding: 8px 9px 9px;
    border-radius: 10px;
}
.order-period-label { font-size: 0.6rem; }
.order-period-inputs { gap: 5px; }
.order-datetime input {
    height: 32px;
    font-size: 0.76rem;
}
.order-form-schedule-hint {
    margin-top: 7px;
    padding: 5px 9px;
    font-size: 0.66rem;
}
.order-form-footer {
    gap: 10px;
    padding: 10px 18px;
}
.order-form-footer .btn-primary {
    height: 36px;
    padding: 0 16px;
    font-size: 0.78rem;
}
.order-form-history {
    width: 268px;
    padding: 14px 13px;
}
.order-form-history-head { margin-bottom: 9px; }
.order-form-history-list { gap: 7px; }
.order-history-card { padding: 8px 9px; }

@media (min-width: 760px) {
    .order-form-card-payment .order-form-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .order-form-card-auto .order-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .order-form-window { max-width: 900px; }
    .order-form-history { display: none; }
}
@media (max-width: 680px) {
    .order-form-content { padding: 14px 14px 16px; }
    .order-form-header { padding: 16px 16px 14px; }
    .order-form-footer { padding: 12px 16px; }
    .order-form-grid { grid-template-columns: 1fr; }
    .order-form-field.full { grid-column: auto; }
    .order-period { flex-direction: column; }
    .order-period-arrow { display: none; }
    .order-form-header-text p { display: none; }
}

.bids-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}
.bids-badge i { font-size: 0.6rem; }
.bids-badge.bids-empty { background: #f1f5f9; color: #94a3b8; }
.bids-badge.bids-ok { background: #ecfdf5; color: #047857; }
.bids-badge.bids-needs { background: #fef3c7; color: #b45309; }
.bids-badge.bids-failed { background: #fee2e2; color: #b91c1c; }

tr.order-row-needs td { background: rgba(245, 158, 11, 0.055); }
tr.order-row-needs:hover td { background: rgba(245, 158, 11, 0.1) !important; }

/* ---------- Пустые состояния ---------- */
.order-empty {
    padding: 54px 24px;
    text-align: center;
    color: var(--text-secondary);
}
.order-empty > i {
    display: block;
    font-size: 2.6rem;
    color: var(--text-faint);
    margin-bottom: 14px;
}
.order-empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.order-empty-text {
    max-width: 540px;
    margin: 0 auto;
    font-size: 0.82rem;
    line-height: 1.5;
}
.order-empty-actions { margin-top: 18px; }

/* ---------- Карточка задания (сайдбар) ---------- */
.order-desc-title {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 6px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--text-secondary);
}
.order-desc-title:hover { color: var(--text); }
.order-desc-chevron {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}
.order-desc-title.open .order-desc-chevron { transform: rotate(180deg); }
.order-desc-body {
    padding: 11px 14px;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
    white-space: pre-wrap;
}
.order-desc-body[hidden] { display: none; }
.order-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.order-detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.68rem;
    font-weight: 600;
}
.order-detail-chip i { font-size: 0.62rem; }

/* ---------- Отклики ---------- */
.order-bids-wrap {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}
.order-bids-list { display: flex; flex-direction: column; }
.order-bid-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-bottom: 1px solid var(--surface-2);
}
.order-bid-row:last-child { border-bottom: none; }
.order-bid-row:hover { background: var(--surface-2); }
.order-bid-person { flex: 1 1 auto; min-width: 0; }
.order-bid-name {
    display: block;
    font-weight: 700;
    color: var(--text);
    font-size: 0.76rem;
    line-height: 1.3;
}
.order-bid-sub {
    display: block;
    color: var(--text-muted);
    font-size: 0.64rem;
    margin-top: 1px;
    line-height: 1.3;
    word-break: break-word;
}

.order-bid-status {
    flex: 0 0 auto;
    max-width: 46%;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}
.order-bid-status.waiting { background: #fef3c7; color: #b45309; }
.order-bid-status.approved { background: #dbeafe; color: #1d4ed8; }
.order-bid-status.reserve { background: #f3e8ff; color: #7e22ce; }
.order-bid-status.muted { background: #f1f5f9; color: #64748b; }
.order-bid-status.canceled { background: #fee2e2; color: #b91c1c; }
.order-bid-status.act { background: #ede9fe; color: #6d28d9; }
.order-bid-status.action { background: #ffedd5; color: #c2410c; }
.order-bid-status.payment { background: #e0e7ff; color: #4338ca; }
.order-bid-status.done { background: #dcfce7; color: #166534; }
.order-bid-status.failed { background: #fee2e2; color: #b91c1c; }

/* ---------- Смены на оплату по заданию ---------- */
.order-shift-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.order-shift-row {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.order-shift-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.order-shift-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.order-shift-name {
    font-size: 0.77rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    word-break: break-word;
}
.order-shift-place {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.66rem;
    line-height: 1.35;
    color: var(--text-muted);
}
.order-shift-place i { font-size: 0.58rem; }
.order-shift-sep { opacity: 0.5; margin: 0 1px; }
.order-shift-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding-top: 7px;
    border-top: 1px dashed var(--border);
    font-size: 0.66rem;
    line-height: 1.4;
    color: var(--text-secondary);
}
.order-shift-details > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.order-shift-details i {
    font-size: 0.59rem;
    color: var(--text-muted);
}
.order-shift-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
    flex-shrink: 0;
}
.order-shift-amount {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.order-shift-side .status-badge {
    font-size: 0.6rem;
    padding: 1px 7px;
}
.order-shift-unlink {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.62rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.order-shift-unlink:hover {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.05);
}
.order-shift-empty,
.order-shift-hint {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 0.7rem;
    line-height: 1.4;
}
.order-shift-empty {
    background: var(--surface-2);
    color: var(--text-muted);
}
.order-shift-hint {
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
}
.order-shift-link {
    display: flex;
    align-items: stretch;
    gap: 7px;
}
.order-shift-link select {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.72rem;
    outline: none;
}
.order-shift-link select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.09);
}
.order-shift-link-btn {
    height: 34px;
    padding: 0 11px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.15s;
}
.order-shift-link-btn:hover { filter: brightness(1.08); }
.order-shift-link-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Акты ---------- */
.order-act-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.order-act-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.order-act-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    flex: 0 0 auto;
}
.order-act-info { flex: 1; min-width: 0; }
.order-act-title { font-size: 0.76rem; font-weight: 700; }
.order-act-sub { font-size: 0.66rem; color: var(--text-muted); }
.order-act-download {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}
.order-act-download:hover {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), 0.35);
    background: rgba(var(--accent-rgb), 0.06);
}

/* ---------- Мобильная адаптация ---------- */
@media (max-width: 768px) {
    .header-actions-group { gap: 8px; }
    #shiftModuleTabs .view-toggle-btn { padding: 0 9px; font-size: 0.7rem; }
    #shiftModuleTabs .view-toggle-btn i { font-size: 0.72rem; }
    .add-button.icon-only { width: 36px; height: 36px; }
    .order-address { min-width: 110px; }
    .order-bid-row { padding: 8px 9px; }
    .order-bid-status { max-width: 50%; }
}

/* ������ ��� ������� */
.orders-requests-window {
    max-width: 1100px;
    width: 94%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
}
.orders-requests-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 12px;
}
.orders-requests-toolbar input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.8rem;
}
.orders-requests-toolbar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}
.orders-requests-count {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.orders-requests-content {
    padding: 0 20px 20px;
    overflow: auto;
    max-height: 65vh;
}
.orders-requests-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}
.orders-requests-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-align: left;
    text-transform: uppercase;
}
.orders-requests-table tbody td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.orders-requests-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.orders-requests-table tbody tr:hover { background: var(--surface-2); }
.orders-requests-table strong { display: block; font-weight: 700; }
.orders-request-lkk {
    display: block;
    margin-top: 2px;
    font-size: 0.66rem;
    color: var(--text-muted);
}
.orders-requests-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}
.orders-requests-empty.is-error { color: #b91c1c; }

/* Èñòîðèÿ çàäàíèÿ */
.order-history-timeline {
    padding: 4px 14px;
}
.order-history-event {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
}
.order-history-event:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}
.order-history-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    flex: none;
    margin-top: 1px;
}
.order-history-dot.is-created { background: #dbeafe; color: #1d4ed8; }
.order-history-dot.is-assembled { background: #cffafe; color: #0e7490; }
.order-history-dot.is-accepted { background: #dcfce7; color: #166534; }
.order-history-dot.is-canceled { background: #fee2e2; color: #b91c1c; }
.order-history-dot.is-waiting { background: #fef3c7; color: #b45309; }
.order-history-dot.is-paid { background: #dcfce7; color: #166534; }
.order-history-dot.is-muted { background: #f1f5f9; color: #64748b; }
.order-history-body { flex: 1; min-width: 0; }
.order-history-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.order-history-meta {
    margin-top: 1px;
    font-size: 0.66rem;
    color: var(--text-muted);
}
.order-history-details {
    margin-top: 2px;
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--text-secondary);
}
