:root {
  --ink: #152238;
  --muted: #748094;
  --paper: #f4f6f8;
  --panel: #ffffff;
  --line: #e4e9ef;
  --blue: #3265d8;
  --blue-soft: #edf3ff;
  --orange: #e56b45;
  --orange-soft: #fff0e9;
  --green: #2f8a68;
  --green-soft: #e8f6f0;
  --yellow: #9a6d14;
  --yellow-soft: #fff7df;
  --shadow: 0 12px 34px rgba(22, 38, 61, .07);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 13px/1.45 Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; background: linear-gradient(145deg, #f8fafb 0%, var(--paper) 68%); }
.topbar { position: sticky; top: 0; z-index: 5; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 max(24px, calc((100vw - 2200px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 10px; font-weight: 800; line-height: 1.05; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: white; font: 700 11px Montserrat, sans-serif; letter-spacing: -.06em; text-transform: lowercase; }
.topbar-tools { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1; min-width: 0; }
.nav-search { display: flex; align-items: center; gap: 8px; width: min(390px, 31vw); min-width: 240px; height: 42px; padding: 0 12px; border: 2px solid #9eb8f1; border-radius: 10px; background: #fff; color: var(--blue); font-size: 20px; box-shadow: 0 0 0 3px rgba(50,101,216,.08); }
.nav-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.nav-filters { display: flex; align-items: center; gap: 5px; }
.nav-select select, .nav-action { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; background: #fbfcfd; color: #536074; font-size: 10px; font-weight: 800; }
.nav-action { cursor: pointer; }
.nav-reset { border-color: transparent; background: transparent; color: var(--blue); }
.nav-export { border-color: #dce5f7; background: var(--blue-soft); color: var(--blue); }
.avatar { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #dce8ff; color: #4264a0; font-size: 10px; font-weight: 800; }

.workspace { width: min(2200px, 100%); min-height: calc(100vh - 68px); margin: auto; padding: 22px 24px 0; }
.workspace-layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 20px; align-items: start; height: auto; }
.workspace-layout.is-dashboard { grid-template-columns: minmax(0, 1fr); }
.workspace-content { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: visible; height: auto; padding: 0 3px 0 0; background: var(--paper); }
.filter-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; height: calc(100vh - 110px); max-height: none; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.filter-sidebar-head { display: flex; align-items: start; justify-content: space-between; padding: 17px 16px 13px; border-bottom: 1px solid var(--line); }
.filter-sidebar-head h2 { margin: 3px 0 0; font-size: 17px; letter-spacing: -.04em; }
.filter-kicker { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-count { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 800; }
.filter-sections { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.filter-section { border-bottom: 1px solid var(--line); }
.filter-section-title { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 13px 16px 10px; border: 0; background: transparent; color: var(--ink); font-size: 11px; font-weight: 800; text-align: left; }
.filter-chevron { color: var(--muted); font-size: 14px; transition: transform .18s ease; }
.filter-section.is-collapsed .filter-chevron { transform: rotate(-90deg); }
.filter-section.is-collapsed .filter-options, .filter-section.is-collapsed .filter-period { display: none; }
.filter-options, .filter-period { padding: 0 16px 12px; }
.filter-option { display: flex; align-items: center; gap: 8px; min-height: 28px; color: #435169; font-size: 11px; cursor: pointer; }
.filter-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.filter-date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.filter-date-row label { color: var(--muted); font-size: 9px; font-weight: 800; }
.filter-date-row label[data-date-input] { position: relative; display: block; height: 40px; margin-top: 4px; }
.filter-date-row label[data-date-input]::after { content: attr(data-date); position: absolute; z-index: 1; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 24px 0 8px; border: 1px solid #c6d1df; border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; pointer-events: none; }
.filter-date-row input { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 40px; margin: 0; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; color: transparent; font-size: 12px; text-align: center; opacity: .01; cursor: pointer; }
.filter-date-row input::-webkit-datetime-edit,
.period-date input::-webkit-datetime-edit { display: flex; align-items: center; justify-content: center; padding: 0; }
.filter-date-row input::-webkit-datetime-edit-fields-wrapper,
.period-date input::-webkit-datetime-edit-fields-wrapper { display: flex; align-items: center; justify-content: center; width: 100%; }
.filter-date-row input::-webkit-calendar-picker-indicator,
.period-date input::-webkit-calendar-picker-indicator { margin-left: 4px; }
.filter-quick-periods { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.filter-quick-periods button { padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafc; color: var(--muted); font-size: 9px; font-weight: 800; }
.filter-quick-periods button:hover { border-color: #cddcf8; color: var(--blue); }
.filter-sidebar-actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: center; flex: 0 0 auto; padding: 12px 16px 14px; border-top: 1px solid var(--line); background: #fbfcfd; }
.filter-sidebar-actions .button { width: 100%; padding: 10px 9px; font-size: 10px; }
.filter-clear { border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 800; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 740px; margin-bottom: 9px; font: 800 clamp(32px, 4vw, 50px)/.98 Montserrat, sans-serif; letter-spacing: -.045em; }
.intro { margin: 0; color: var(--muted); font-size: 14px; }
.button { border: 0; border-radius: 8px; padding: 11px 15px; font-size: 12px; font-weight: 800; transition: .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.button-primary { background: var(--ink); color: white; }
.button-primary span { margin-right: 5px; color: #ffad8e; font-size: 16px; }
.button-dark { background: var(--ink); color: white; }

.entity-tabs { display: flex; gap: 4px; width: max-content; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #eaf0f5; }
.entity-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.entity-tab.is-active { background: var(--panel); color: var(--ink); box-shadow: 0 2px 8px rgba(21,34,56,.08); }
.entity-tab b { min-width: 18px; padding: 2px 5px; border-radius: 999px; background: #dfe6ee; font-size: 10px; text-align: center; }
.entity-tab.is-active b { background: var(--blue-soft); color: var(--blue); }
.nav-filters[hidden] { display: none; }
.dashboard-view { margin-top: 24px; }
.dashboard-heading { display: none; }
.dashboard-heading .eyebrow, .dashboard-period, .dashboard-summary { display: none; }
.dashboard-heading h1 { margin-bottom: 8px; }
.dashboard-period { min-width: 142px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.8); }
.dashboard-period span, .summary-label, .summary-note { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.dashboard-period strong { display: block; margin-top: 7px; font-size: 15px; }
.period-controls { display: flex; align-items: center; gap: 7px; margin: 22px 0 12px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.78); }
.period-button { height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.period-button.is-active { background: var(--blue-soft); color: var(--blue); }
.period-date { display: flex; align-items: center; gap: 5px; margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.period-date input { width: 128px; height: 36px; padding: 0 8px; border: 1px solid #c6d1df; border-radius: 7px; color: var(--ink); font-size: 12px; text-align: center; }
.period-controls .button { margin-left: auto; padding: 9px 12px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.chart-card, .dashboard-summary { border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.chart-card { position: relative; padding: 18px 20px 14px; }
.chart-card-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.chart-card h2 { margin: 0 0 4px; font-size: 14px; }
.chart-card-head p { margin: 0; color: var(--muted); font-size: 10px; }
.target-note { position: absolute; right: 20px; bottom: 14px; color: var(--blue); font-size: 10px; font-weight: 800; }
.group-controls { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f6f8fa; }
.group-button { padding: 6px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.group-button.is-active { background: white; color: var(--blue); box-shadow: 0 1px 4px rgba(21,34,56,.08); }
.sla-chart { display: grid; gap: 15px; margin: 28px 0 18px; }
.sla-row { display: grid; grid-template-columns: 166px minmax(0, 1fr) 90px; align-items: center; gap: 12px; }
.sla-label { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.sla-label b { font-size: 11px; }
.dashboard-filter-link, .dashboard-legend-link { cursor: pointer; }
.dashboard-filter-link { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.dashboard-filter-link:hover span, .dashboard-legend-link:hover { color: var(--blue); }
.dashboard-legend-link { border: 0; background: transparent; color: var(--muted); font-size: 10px; }
.sla-track { position: relative; height: 16px; border-radius: 5px; background: #edf1f5; }
.sla-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #3265d8, #5d86e4); cursor: help; }
.sla-fill.is-risk { background: linear-gradient(90deg, #e56b45, #f0a07f); }
.sla-target { position: absolute; top: -4px; bottom: -4px; left: 90%; width: 1px; background: #9da9b8; }
.sla-row small { color: var(--muted); font-size: 9px; }
.chart-empty { padding: 35px 0; color: var(--muted); font-size: 11px; text-align: center; }
.chart-legend { display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--blue); }
.legend-dot--risk { background: var(--orange); }
.dashboard-summary { display: grid; align-content: start; gap: 0; overflow: hidden; }
.dashboard-summary > div { padding: 18px; border-bottom: 1px solid var(--line); }
.dashboard-summary > div:last-child { border-bottom: 0; }
.dashboard-summary strong { display: block; margin: 7px 0 3px; font-size: 26px; letter-spacing: -.06em; }
.summary-callout { background: #f8fafc; }
.summary-callout p { margin: 8px 0 0; color: #536074; font-size: 11px; line-height: 1.5; }
.order-report { margin-top: 12px; }
.order-report-controls { display: grid; gap: 5px; justify-items: end; }
.order-control-row { display: flex; flex-wrap: wrap; gap: 3px; justify-content: end; }
.order-switches { display: flex; align-items: center; gap: 8px; }
.dimension-button, .granularity-button { height: 32px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.dimension-button.is-active, .granularity-button.is-active { background: white; color: var(--blue); box-shadow: 0 1px 4px rgba(21,34,56,.08); }
.orders-chart { display: flex; align-items: end; gap: 10px; min-height: 250px; overflow-x: auto; margin-top: 20px; padding: 10px 4px 26px; border-bottom: 1px solid var(--line); }
.orders-bar-group { display: flex; flex: 0 0 42px; flex-direction: column; align-items: center; justify-content: end; height: 220px; gap: 4px; }
.orders-bar { display: flex; flex-direction: column-reverse; width: 28px; min-height: 8px; overflow: visible; border-radius: 5px 5px 2px 2px; background: #e8edf4; }
.orders-segment { display: block; width: 100%; min-height: 2px; padding: 0; border: 0; border-radius: 0; }
.segment-0 { background: #3265d8; }.segment-1 { background: #e56b45; }.segment-2 { background: #2f8a68; }.segment-3 { background: #9a6d14; }.segment-4 { background: #8a65c4; }.segment-5 { background: #5a6675; }
.orders-bar-group small { max-width: 58px; overflow: hidden; color: var(--muted); font-size: 8px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.orders-bar-group b { color: var(--ink); font-size: 9px; }
.orders-segment { position: relative; cursor: help; }
.orders-segment:hover { filter: brightness(.82); }
.chart-tooltip { position: fixed; z-index: 100; pointer-events: none; width: max-content; max-width: 220px; padding: 6px 8px; border-radius: 6px; background: var(--ink); color: white; box-shadow: 0 6px 16px rgba(21,34,56,.2); font-size: 10px; line-height: 1.3; }
.orders-legend { margin-top: 12px; flex-wrap: wrap; }
.table-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.table-pagination > div { display: flex; gap: 3px; }
.page-button { min-width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--muted); font-size: 10px; font-weight: 800; }
.page-ellipsis { display: inline-flex; min-width: 20px; height: 26px; align-items: center; justify-content: center; color: var(--muted); }
.page-button.is-active { border-color: #cddcf8; background: var(--blue-soft); color: var(--blue); }.page-button:disabled { cursor: default; opacity: .4; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.metric { min-height: 74px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.86); }
.metric-danger { border-color: #f4cfc2; background: var(--orange-soft); }
.metric-risk { border-color: #f2dfad; background: var(--yellow-soft); }
.metric-label, .metric-note { display: block; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric strong { display: inline-block; margin: 5px 5px 2px 0; font: 700 23px/1 Montserrat, sans-serif; letter-spacing: -.08em; }
.metric-note { color: var(--muted); font-size: 10px; }

.date-popover { position: absolute; z-index: 4; top: 58px; right: max(70px, calc((100vw - 2200px) / 2)); width: 430px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: var(--shadow); }
.date-popover > div { display: flex; gap: 8px; margin-bottom: 9px; }
.date-popover label { flex: 1; color: var(--muted); font-size: 10px; font-weight: 700; }
.date-popover input { display: block; width: 100%; margin-top: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; }

.table-area { flex: 0 0 auto; min-height: calc(100% - 12px); margin-top: 12px; overflow: visible; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.table-heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.table-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.selection-toolbar { display: flex; align-items: center; gap: 10px; }
.selection-toolbar { order: -1; margin-right: 18px; }
.selection-toolbar span { color: var(--ink); font-size: 11px; font-weight: 800; }
.selection-toolbar .button { padding: 8px 12px; border: 1px solid #0d1a2c; border-radius: 7px; font-size: 10px; font-weight: 800; box-shadow: 0 2px 5px rgba(21,34,56,.12); }
.separator { margin: 0 6px; color: #c5ced9; }
.table-heading button { border: 0; background: transparent; color: var(--blue); font-size: 11px; font-weight: 800; }
.selection-toolbar .button-dark { background: var(--ink); color: white; }
.selection-toolbar .button-dark:hover { background: #263a56; box-shadow: 0 4px 9px rgba(21,34,56,.18); transform: translateY(-1px); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 1120px; border-collapse: collapse; white-space: nowrap; }
th { padding: 11px 12px; border-bottom: 1px solid var(--line); background: #f8fafc; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
th[data-sort] { cursor: pointer; }
th i { color: #aeb9c7; font-style: normal; }
td { padding: 14px 12px; border-bottom: 1px solid #edf0f3; color: #435169; font-size: 11px; vertical-align: middle; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #fbfdff; }
tbody tr.is-overdue td { background: #fff4f2; }
tbody tr.is-overdue:hover td { background: #ffece8; }
tbody tr:last-child td { border-bottom: 0; }
.selection-col { width: 36px; padding-right: 3px !important; padding-left: 13px !important; text-align: center; }
.selection-col input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.mono { color: var(--ink); font: 600 11px Montserrat, sans-serif; }
.subline { display: block; margin-top: 3px; color: #a0aaba; font-size: 10px; }
.type-badge, .status-badge, .delay-badge { display: inline-block; border-radius: 5px; padding: 4px 6px; font-size: 9px; font-weight: 800; }
.type-badge { background: var(--blue-soft); color: #3d63a9; }
.carrier-logo { position: relative; display: inline-flex; align-items: center; min-width: 58px; height: 25px; padding: 0 2px; color: #526174; font-size: 10px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.carrier-logo--cdek { color: #00a83b; font-style: italic; }
.carrier-logo--dpd { color: #e4003a; font-style: italic; }
.carrier-logo--boxberry { color: #e51b4b; }
.carrier-logo--boxberry::after { content: ""; width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: #9ac32f; }
.carrier-logo--fivepost { color: #5a5b5d; }
.carrier-logo--fivepost::before { content: ""; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #64bd50; }
.carrier-logo--lucksa { color: #111; }
.carrier-logo--pek { color: #29266d; }
.carrier-logo--pek::after { content: ":"; align-self: flex-start; margin: 2px 0 0 2px; color: #ec1d4c; font-size: 16px; line-height: .6; }
.carrier-logo--internal { color: #5a6675; }
.status-badge { background: #eef2f5; color: #5a6675; }
.delay-badge { display: block; width: max-content; margin-top: 5px; background: var(--orange-soft); color: var(--orange); }
.delay-badge.is-ok { background: var(--green-soft); color: var(--green); }
.plan-date.is-late { color: var(--orange); font-weight: 800; }
.plan-help { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-right: 4px; border: 1px solid currentColor; border-radius: 50%; font-size: 8px; font-weight: 900; vertical-align: 1px; }
.comment-preview { display: block; max-width: 180px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.row-action { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--blue); }
.empty-state { padding: 54px 20px; text-align: center; }
.empty-state span { color: var(--orange); font-size: 30px; }
.empty-state h2 { margin: 6px 0; font: 700 23px Montserrat, sans-serif; }
.empty-state p { color: var(--muted); }

.drawer { position: fixed; z-index: 10; top: 0; right: 0; width: min(610px, 100vw); height: 100vh; overflow-y: auto; padding: 26px; background: white; box-shadow: -18px 0 50px rgba(21,34,56,.16); transform: translateX(105%); transition: transform .24s ease; }
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.drawer h2 { margin: 0; font: 700 28px Montserrat, sans-serif; letter-spacing: -.07em; }
.close-button { border: 0; background: transparent; color: var(--muted); font-size: 30px; line-height: 1; }
.drawer-status { padding: 16px 0; }
.drawer-status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deadline-note { color: var(--muted); font-size: 11px; text-align: right; }
.drawer-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.info-item span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.info-item b { font-size: 12px; }
.drawer-info .carrier-logo { display: inline-flex; margin: 0; color: #526174; }
.drawer-info .carrier-logo--cdek { color: #00a83b; }
.drawer-info .carrier-logo--dpd { color: #e4003a; }
.drawer-info .carrier-logo--boxberry { color: #e51b4b; }
.drawer-info .carrier-logo--fivepost { color: #5a5b5d; }
.drawer-info .carrier-logo--lucksa { color: #111; }
.drawer-info .carrier-logo--pek { color: #29266d; }
.drawer-info .carrier-logo--internal { color: #5a6675; }
.order-items-section { padding: 18px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-heading h3 { margin-bottom: 14px; }
.section-heading > span { color: var(--muted); font-size: 10px; }
.order-items { display: grid; gap: 9px; }
.order-item { display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 8px 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.order-item img { grid-row: 1 / span 2; width: 84px; height: 84px; border-radius: 8px; object-fit: cover; }
.order-item-copy { min-width: 0; }
.order-item-copy b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; line-height: 1.3; }
.order-item-copy span { color: var(--muted); font: 10px Montserrat, sans-serif; }
.item-status { grid-column: 2; width: max-content; padding: 3px 6px; border-radius: 5px; font-size: 9px; font-weight: 800; }
.item-status--ожидает-сборки { background: var(--yellow-soft); color: var(--yellow); }
.item-status--собран { background: var(--green-soft); color: var(--green); }
.item-status--не-собран, .item-status--отклонен { background: var(--orange-soft); color: var(--orange); }
.item-status--отменен { background: #eef2f5; color: var(--muted); }
.timeline-section, .comment-section { padding: 18px 0; border-top: 1px solid var(--line); }
.drawer h3 { margin-bottom: 14px; font-size: 12px; }
.timeline { padding-left: 15px; border-left: 1px solid var(--line); }
.timeline-item { position: relative; padding: 0 0 16px 11px; }
.timeline-item:before { content: ""; position: absolute; top: 3px; left: -19px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: #aab4c0; }
.timeline-item.current:before { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.timeline-item b { display: block; font-size: 11px; }
.timeline-item span { color: var(--muted); font-size: 10px; }
.timeline-item--assembly-error b { color: var(--orange); }
.timeline-item--assembly-error:before { background: var(--orange); }
.comment-history { display: grid; gap: 8px; margin-bottom: 12px; }
.comment-history:empty { display: none; }
.comment-history-item { padding: 9px 10px; border: 1px solid #e3eaf2; border-radius: 8px; background: #f7f9fb; }
.comment-history-item p { margin: 0 0 5px; color: var(--ink); font-size: 11px; line-height: 1.45; }
.comment-history-item small { color: var(--muted); font-size: 9px; }
.comment-section textarea { display: block; width: 100%; margin-bottom: 9px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fbfcfd; color: var(--ink); font-size: 12px; }
.backdrop { position: fixed; z-index: 9; inset: 0; background: rgba(21,34,56,.25); backdrop-filter: blur(2px); }
.toast { position: fixed; z-index: 12; right: 24px; bottom: 22px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: white; font-size: 12px; opacity: 0; transform: translateY(10px); transition: .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) { .app-shell { height: auto; overflow: visible; } .workspace { height: auto; overflow: visible; } .workspace-layout { grid-template-columns: 1fr; height: auto; } .workspace-content { height: auto; overflow: visible; } .filter-sidebar { position: static; height: auto; max-height: none; } .filter-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-section:nth-child(3), .filter-section:nth-child(6) { grid-column: 1 / -1; } .metrics { grid-template-columns: repeat(2, 1fr); } .control-bar { align-items: stretch; flex-direction: column; } .search-box { min-width: 0; } .filters { justify-content: flex-start; } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .topbar-tools { justify-content: flex-end; } .nav-filters { display: none; } .nav-filters.is-dashboard { display: flex; flex-wrap: wrap; justify-content: flex-end; } .nav-search { width: min(300px, 46vw); } }
@media (max-width: 600px) { .topbar { height: 58px; padding: 0 16px; } .topbar-center { display: none; } .workspace { padding: 16px 14px 44px; } .filter-sections { display: block; } .filter-section:nth-child(3), .filter-section:nth-child(6) { grid-column: auto; } .page-heading { align-items: flex-start; flex-direction: column; } h1 { font-size: 34px; } .metrics { gap: 8px; } .metric { min-height: 94px; padding: 13px; } .metric strong { font-size: 23px; } .entity-tabs { width: 100%; overflow-x: auto; } .entity-tab { flex: 1; white-space: nowrap; } .filters > * { flex: 1; } .filters .reset-button { flex: 0; } .date-popover { right: 14px; left: 14px; width: auto; } .table-heading { padding: 12px; } .table-scroll { overflow: visible; } table { width: 100%; min-width: 0; } table, thead, tbody, tr, th, td { display: block !important; } thead { display: none !important; } tbody { padding: 6px; } tbody tr { width: 100%; margin: 8px 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; } td { display: grid !important; grid-template-columns: minmax(92px, 44%) minmax(0, 1fr); gap: 8px; padding: 5px 0; border: 0; white-space: normal; } td:before { content: attr(data-label); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; } .row-action { position: absolute; top: 9px; right: 9px; } .drawer { width: 100%; } .drawer-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } .drawer-info .info-item:nth-child(-n + 3) { grid-column: span 1; } .drawer-status-line { align-items: flex-start; flex-direction: column; gap: 7px; } .deadline-note { text-align: left; } .order-item { grid-template-columns: 72px minmax(0, 1fr); } .order-item img { width: 72px; height: 72px; } .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 14px; } .period-controls { align-items: stretch; flex-wrap: wrap; } .period-button { flex: 1; } .period-date input { width: 120px; } .sla-row { grid-template-columns: 1fr 45px; gap: 7px 10px; } .sla-label { grid-column: 1 / -1; } .sla-row small { grid-column: 1 / -1; margin-top: -4px; } .chart-card-head { flex-wrap: wrap; } .group-controls { width: 100%; order: 3; } .group-button { flex: 1; } .order-report-controls { width: 100%; display: flex; align-items: center; justify-items: stretch; gap: 6px; } .order-switches { width: 100%; flex-wrap: wrap; } .order-switches .group-controls { flex: 1; min-width: 0; } .order-switches .group-controls > button { flex: 1; min-width: 0; padding: 0 5px; } .orders-chart { margin-top: 12px; } .table-pagination { align-items: flex-start; flex-direction: column; } }
@media (max-width: 600px) { .topbar { gap: 10px; } .topbar-tools { justify-content: flex-end; } .nav-search { width: auto; min-width: 0; flex: 1; } .avatar { flex: 0 0 auto; } }
