.gt-page { padding: 24px 28px 48px; max-width: 1680px; margin: 0 auto; }
.gt-head { margin-bottom: 16px; }
.gt-source-filter { display: flex; justify-content: space-between; padding: 9px 12px; margin-bottom: 10px; border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 8px; color: #1e3a8a; font-size: 13px; }
.gt-source-filter a { color: #1d4ed8; font-weight: 700; }
.gt-filters { display: grid; grid-template-columns: 220px 190px minmax(280px, 1fr); gap: 10px; padding: 12px; margin-bottom: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.gt-filters label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gt-filters label > span { color: #64748b; font-size: 11px; font-weight: 800; }
.gt-queue { background: #fff; border: 1px solid #e2e8f0; border-radius: 11px; overflow: hidden; }
.gt-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border-bottom: 1px solid #e2e8f0; }
.gt-totals { color: #475569; font-size: 13px; }
.gt-totals b { color: #0f172a; font-size: 17px; }
.gt-totals span { margin-left: 14px; padding-left: 14px; border-left: 1px solid #cbd5e1; }
.gt-select-all { padding: 6px 10px; color: #2563eb; background: transparent; border: 0; border-radius: 6px; font-weight: 700; cursor: pointer; }
.gt-select-all:hover { background: #eff6ff; }
.gt-toolbar__actions { display: flex; align-items: center; gap: 8px; }
.gt-build { min-height: 32px; padding: 0 13px; border: 0; border-radius: 7px; color: #fff; background: #168016; font-size: 12px; font-weight: 800; cursor: pointer; }
.gt-build:hover { background: #116b11; }
.gt-build:disabled { color: #94a3b8; background: #e2e8f0; cursor: default; }
.gt-row { display: grid; grid-template-columns: 28px 88px 112px minmax(210px, 1fr) 105px 100px 110px 30px; gap: 9px; align-items: center; min-height: 62px; padding: 7px 12px; border-bottom: 1px solid #edf2f7; cursor: pointer; transition: background .12s; }
.gt-row:last-child { border-bottom: 0; }
.gt-row:not(.gt-row--head):hover { background: #f8fafc; }
.gt-row--selected { background: #eff6ff !important; box-shadow: inset 3px 0 #2563eb; }
.gt-row--disabled { cursor: default; opacity: .72; }
.gt-row--head { min-height: 34px; padding-top: 0; padding-bottom: 0; color: #94a3b8; background: #f8fafc; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; cursor: default; }
.gt-check { display: flex; justify-content: center; }
.gt-check input { width: 16px; height: 16px; accent-color: #2563eb; cursor: pointer; }
.gt-when, .gt-id, .gt-destination, .gt-cargo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gt-when b, .gt-id b, .gt-destination b, .gt-cargo b { overflow: hidden; color: #0f172a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gt-when span, .gt-destination span, .gt-cargo span, .gt-readiness > span { overflow: hidden; color: #64748b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gt-state, .gt-ready { align-self: flex-start; display: inline-flex; padding: 2px 6px; border-radius: 999px; font-size: 10px !important; font-weight: 750; }
.gt-state--new { color: #92400e !important; background: #fef3c7; }
.gt-state--planned { color: #1e40af !important; background: #dbeafe; }
.gt-state--transit { color: #5b21b6 !important; background: #ede9fe; }
.gt-state--done, .gt-ready { color: #166534 !important; background: #dcfce7; }
.gt-state--problem { color: #991b1b !important; background: #fee2e2; }
.gt-state--muted { color: #475569 !important; background: #f1f5f9; }
.gt-order-link { overflow: hidden; color: #2563eb; font-size: 11px; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.gt-order-link:hover { text-decoration: underline; }
.gt-add { width: 27px; height: 27px; padding: 0; border: 1px solid #cbd5e1; border-radius: 7px; color: #2563eb; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.gt-add:hover { border-color: #2563eb; background: #eff6ff; }
.gt-add:disabled { cursor: default; opacity: .45; }
.gt-missing { color: #b45309 !important; }
.gt-empty { padding: 46px 20px; text-align: center; color: #64748b; }
.gt-prototype { padding: 0 20px 14px; color: #94a3b8; font-size: 10px; line-height: 1.35; text-align: center; }
.gt-trip-modal { max-width: 920px; }
.gt-trip-modal .modal__body { padding: 0; gap: 0; }
.gt-trip-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 470px; }
.gt-trip-form { padding: 18px; border-right: 1px solid #e2e8f0; }
.gt-trip-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.gt-trip-summary > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; background: #f8fafc; border-radius: 8px; }
.gt-trip-summary b { color: #0f172a; font-size: 16px; }
.gt-trip-summary span { color: #64748b; font-size: 10px; }
.gt-trip-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gt-trip-fields label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gt-trip-fields label > span { color: #64748b; font-size: 10px; font-weight: 800; }
.gt-trip-wide { grid-column: 1 / -1; }
.gt-trip-fields .field__input, .gt-trip-fields .field__select { min-height: 36px; font-size: 12px; }
.gt-trip-route { min-width: 0; padding: 16px; background: #f8fafc; }
.gt-trip-route__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.gt-trip-route__head > div { display: flex; align-items: baseline; gap: 8px; }
.gt-trip-route__head b { font-size: 14px; }
.gt-trip-route__head span, .gt-trip-route__head small { color: #94a3b8; font-size: 10px; }
.gt-trip-stops { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.gt-trip-stop { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; }
.gt-trip-stop--pickup { background: #eff6ff; border-color: #bfdbfe; }
.gt-trip-stop__no { flex: 0 0 23px; width: 23px; height: 23px; display: grid; place-items: center; color: #475569; background: #e2e8f0; border-radius: 50%; font-size: 10px; font-weight: 800; }
.gt-trip-stop > div, .gt-trip-stop__main { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.gt-trip-stop small { color: #94a3b8; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.gt-trip-stop b, .gt-trip-stop span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gt-trip-stop__main > span { color: #334155; font-size: 12px; font-weight: 650; }
.gt-trip-stop__actions { flex: 0 0 auto !important; flex-direction: row !important; gap: 2px !important; }
.gt-trip-stop__actions button { width: 22px; height: 24px; padding: 0; border: 0; border-radius: 5px; color: #64748b; background: transparent; cursor: pointer; }
.gt-trip-stop__actions button:hover:not(:disabled) { background: #e2e8f0; }
.gt-trip-stop__actions button:disabled { opacity: .25; }
.gt-trip-modal .gt-prototype { padding: 8px 18px 12px; background: #f8fafc; }
.gr-page { max-width: 1280px; margin: 0 auto; padding: 24px 28px 48px; }
.gr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.gr-list { background: #fff; border: 1px solid #e2e8f0; border-radius: 11px; overflow: hidden; }
.gr-table--vehicles .gr-row { grid-template-columns: minmax(180px, 1.2fr) minmax(140px, 1fr) 110px 150px minmax(150px, 1fr) 90px 80px; }
.gr-table--drivers .gr-row { grid-template-columns: minmax(240px, 1.4fr) 150px minmax(180px, 1fr) 90px 80px; }
.gr-table--carriers .gr-row { grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 1fr) 160px 90px 80px; }
.gr-row { display: grid; gap: 14px; align-items: center; min-height: 54px; padding: 8px 14px; border-bottom: 1px solid #edf2f7; }
.gr-row:last-child { border-bottom: 0; }
.gr-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: #334155; font-size: 12px; }
.gr-row b, .gr-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gr-row small { color: #64748b; }
.gr-row--head { min-height: 34px; color: #94a3b8; background: #f8fafc; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.gr-row button { padding: 5px 7px; border: 0; border-radius: 6px; color: #2563eb; background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.gr-row button:hover { background: #eff6ff; }
.gr-state { display: inline-flex; align-self: flex-start; padding: 2px 7px; border-radius: 999px; color: #64748b; background: #f1f5f9; font-size: 10px; font-weight: 750; }
.gr-state--active { color: #166534; background: #dcfce7; }
.gr-own { color: #166534; }
.gr-empty { padding: 50px 20px; color: #64748b; text-align: center; }
.gr-modal { max-width: 650px; }
.gr-form { display: grid; gap: 12px; }
.gr-form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gr-active { display: flex; align-items: center; gap: 8px; color: #475569; font-size: 12px; }

/* Рейсы: плотный журнал и отдельная карточка маршрута. */
.gtr-page { max-width: 1480px; margin: 0 auto; padding: 24px 28px 48px; }
.gtr-head, .gtr-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.gtr-filters { display: grid; grid-template-columns: 220px 190px 180px minmax(260px, 1fr); gap: 10px; padding: 12px; margin-bottom: 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.gtr-filters label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gtr-filters label > span { color: #64748b; font-size: 11px; font-weight: 800; }
.gtr-list { background: #fff; border: 1px solid #e2e8f0; border-radius: 11px; overflow: hidden; }
.gtr-row { display: grid; grid-template-columns: 105px 105px minmax(250px, 1.5fr) 105px minmax(190px, 1fr) 112px; gap: 13px; align-items: center; min-height: 58px; padding: 8px 14px; border-bottom: 1px solid #edf2f7; color: #334155; text-decoration: none; }
.gtr-row:last-child { border-bottom: 0; }
.gtr-row:not(.gtr-row--head):hover { background: #f8fafc; }
.gtr-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gtr-row b, .gtr-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtr-row b { color: #0f172a; font-size: 12px; }
.gtr-row small { color: #64748b; font-size: 10px; }
.gtr-row--head { min-height: 34px; color: #94a3b8; background: #f8fafc; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.gtr-status { display: inline-flex; justify-self: start; padding: 3px 8px; border-radius: 999px; color: #475569; background: #f1f5f9; font-size: 10px; font-weight: 800; white-space: nowrap; }
.gtr-status--draft { color: #92400e; background: #fef3c7; }
.gtr-status--planned { color: #1e40af; background: #dbeafe; }
.gtr-status--loading { color: #9a3412; background: #ffedd5; }
.gtr-status--in_transit { color: #5b21b6; background: #ede9fe; }
.gtr-status--completed { color: #166534; background: #dcfce7; }
.gtr-status--problem { color: #991b1b; background: #fee2e2; }
.gtr-detail-head a { display: inline-block; margin-bottom: 8px; color: #64748b; font-size: 12px; text-decoration: none; }
.gtr-detail-head a:hover { color: #2563eb; }
.gtr-detail-head > div > div { display: flex; align-items: center; gap: 10px; }
.gtr-detail-head h1 { margin: 0; color: #0f172a; font-size: 24px; }
.gtr-summary { display: grid; grid-template-columns: 210px minmax(280px, 1fr) 210px; gap: 1px; margin-bottom: 12px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 10px; background: #e2e8f0; }
.gtr-summary > div { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px; background: #fff; }
.gtr-summary span { color: #94a3b8; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.gtr-summary b { color: #0f172a; font-size: 13px; }
.gtr-route { padding: 18px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.gtr-route h2 { margin: 0 0 14px; color: #0f172a; font-size: 16px; }
.gtr-route ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.gtr-route li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 72px; padding: 8px 0; }
.gtr-route li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 49px; bottom: -12px; width: 2px; background: #dbe4ef; }
.gtr-route li > span { z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #475569; background: #e2e8f0; font-size: 10px; font-weight: 800; }
.gtr-route li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gtr-route small { color: #94a3b8; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.gtr-route b { color: #0f172a; font-size: 12px; }
.gtr-route strong { color: #334155; font-size: 15px; line-height: 1.3; }
.gtr-route em { color: #64748b; font-size: 11px; font-style: normal; }
.gtr-route a { color: #2563eb; font-size: 11px; font-weight: 700; text-decoration: none; }
.gtr-comment { margin-top: 12px; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 10px; color: #475569; background: #fff; font-size: 12px; }
.gtr-picker-modal { max-width: 780px; }
.gtr-picker-filters { display: grid; grid-template-columns: 190px 155px minmax(220px, 1fr); gap: 8px; }
.gtr-picker-list { max-height: 440px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 9px; }
.gtr-picker-task { display: grid; grid-template-columns: 24px minmax(0, 1fr) 110px; gap: 10px; align-items: center; min-height: 58px; padding: 8px 11px; border-bottom: 1px solid #edf2f7; cursor: pointer; }
.gtr-picker-task:last-child { border-bottom: 0; }
.gtr-picker-task:hover { background: #f8fafc; }
.gtr-picker-task:has(input:checked) { background: #eff6ff; box-shadow: inset 3px 0 #2563eb; }
.gtr-picker-task input { width: 16px; height: 16px; accent-color: #2563eb; }
.gtr-picker-task > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gtr-picker-task b, .gtr-picker-task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtr-picker-task b { color: #0f172a; font-size: 12px; }
.gtr-picker-task span { color: #64748b; font-size: 10px; }
.gtr-picker-task > div:last-child { text-align: right; }
.gtr-picker-count { margin-right: auto; color: #64748b; font-size: 11px; }
.gtr-route__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.gtr-route__head h2 { margin: 0; }
.gtr-route__actions { display: flex; gap: 8px; }
.gtr-route__hint { margin-bottom: 12px; padding: 8px 11px; border: 1px solid #bfdbfe; border-radius: 7px; color: #1e3a8a; background: #eff6ff; font-size: 11px; }
/* Правка маршрута: закреплённая погрузка и перетаскиваемые карточки доставок. */
.gtr-edit-pickups { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; }
.gtr-edit-pickups__label { color: #64748b; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.gtr-edit-pickups__item { padding: 3px 10px; border-radius: 999px; color: #334155; background: #e2e8f0; font-size: 12px; font-weight: 650; }
.gtr-edit-stops { display: grid; gap: 8px; }
.gtr-edit-stop { position: relative; display: grid; grid-template-columns: 16px 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); cursor: grab; transition: border-color .12s, box-shadow .12s; }
.gtr-edit-stop:hover { border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(15, 23, 42, .07); }
.gtr-edit-stop:active { cursor: grabbing; }
.gtr-edit-stop__grip { width: 12px; height: 26px; background-image: radial-gradient(circle, #94a3b8 1.6px, transparent 1.8px); background-size: 6px 8px; cursor: grab; }
.gtr-edit-stop:hover .gtr-edit-stop__grip { background-image: radial-gradient(circle, #64748b 1.6px, transparent 1.8px); }
.gtr-edit-stop__no { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #1e40af; background: #dbeafe; font-size: 11px; font-weight: 800; }
.gtr-edit-stop__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gtr-edit-stop__main small { color: #94a3b8; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.gtr-edit-stop__main b { overflow: hidden; color: #0f172a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.gtr-edit-stop__main strong { overflow: hidden; color: #334155; font-size: 14px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.gtr-edit-stop__main em { color: #64748b; font-size: 11px; font-style: normal; }
.gtr-edit-stop__remove { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid #e2e8f0; border-radius: 8px; color: #94a3b8; background: #fff; font-size: 13px; line-height: 1; cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
.gtr-edit-stop__remove:hover:not(:disabled) { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }
.gtr-edit-stop__remove:disabled { opacity: .3; cursor: default; }
.gtr-edit-stop--dragging { opacity: .35; }
.gtr-edit-stop--drop-before::before, .gtr-edit-stop--drop-after::after { content: ''; position: absolute; left: 10px; right: 10px; z-index: 2; height: 3px; border-radius: 2px; background: #2563eb; }
.gtr-edit-stop--drop-before::before { top: -6px; }
.gtr-edit-stop--drop-after::after { bottom: -6px; }
.gtr-edit-stop--landed { animation: gtr-edit-landed .7s ease-out; }
@keyframes gtr-edit-landed { 0% { border-color: #93c5fd; background: #dbeafe; } 100% { border-color: #e2e8f0; background: #fff; } }
.gtr-edit-modal { max-width: 560px; }
.gtr-edit-form { padding: 4px 2px 0; }
.gtr-edit-modal .gt-prototype { text-align: left; }

/* Загрузка машины и состав груза рейса. */
.gtr-load { margin-bottom: 12px; padding: 13px 15px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.gtr-load--muted { color: #64748b; font-size: 12px; }
.gtr-load__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.gtr-load__head span { color: #64748b; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.gtr-load__head b { color: #0f172a; font-size: 13px; white-space: nowrap; }
.gtr-load__bar { height: 10px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.gtr-load__bar > div { height: 100%; border-radius: 999px; background: #168016; transition: width .25s; }
.gtr-load--high .gtr-load__bar > div { background: #d97706; }
.gtr-load--over .gtr-load__bar > div { background: #dc2626; }
.gtr-load--over { border-color: #fecaca; }
.gtr-load__warn { margin-top: 9px; color: #991b1b; font-size: 12px; font-weight: 650; }
.gtr-cargo { margin-top: 12px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.gtr-cargo__total { color: #64748b; font-size: 12px; }
.gtr-cargo__table { border: 1px solid #edf2f7; border-radius: 8px; overflow: hidden; }
.gtr-cargo__row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 130px; gap: 12px; padding: 7px 12px; border-bottom: 1px solid #edf2f7; color: #334155; font-size: 12px; }
.gtr-cargo__row:last-child { border-bottom: 0; }
.gtr-cargo__row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtr-cargo__row span:last-child { text-align: right; font-weight: 650; color: #0f172a; }
.gtr-cargo__row--head { color: #94a3b8; background: #f8fafc; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.gtr-cargo__row--head span:last-child { color: #94a3b8; font-weight: 800; }
@media (max-width: 850px) {
  .gt-page { padding: 18px 12px 40px; }
  .gr-page { padding: 18px 12px 40px; }
  .gt-filters { grid-template-columns: 1fr; }
  .gt-table { overflow-x: auto; }
  .gt-row { min-width: 940px; }
  .gt-trip-layout { grid-template-columns: 1fr; }
  .gt-trip-form { border-right: 0; border-bottom: 1px solid #e2e8f0; }
  .gr-list { overflow-x: auto; }
  .gr-row { min-width: 800px; }
  .gr-form__pair { grid-template-columns: 1fr; }
  .gtr-page { padding: 18px 12px 40px; }
  .gtr-filters, .gtr-picker-filters { grid-template-columns: 1fr; }
  .gtr-list { overflow-x: auto; }
  .gtr-row { min-width: 940px; }
  .gtr-summary { grid-template-columns: 1fr; }
  .gtr-picker-task { grid-template-columns: 24px minmax(0, 1fr); }
  .gtr-picker-task > div:last-child { grid-column: 2; text-align: left; }
}
