/* Раскладка использует всю ширину окна; дни не сжимаются в узкие карточки. */
.lt col.ly-col-num{width:44px}.lt col.ly-col-hours{width:80px}.lt col.ly-col-vehicle{width:84px}.lt col.ly-col-place{width:26%}.lt col.ly-col-actions{width:24px}
@media screen {
  #viewSched.layout-wide{width:100%;max-width:none;min-width:0}
  #viewSched.layout-wide>.panel,#viewSched.layout-wide #schBody{min-width:0}
  #viewSched.layout-wide .ly{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px;min-width:0}
  #viewSched.layout-wide .ld{min-width:0;overflow:visible;padding:12px}
  #viewSched.layout-wide .lt-scroll{width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  #viewSched.layout-wide .lt{min-width:610px;font-size:13px}
  #viewSched.layout-wide .lt col.ly-col-num{width:48px}
  #viewSched.layout-wide .lt col.ly-col-hours{width:94px}
  #viewSched.layout-wide .lt col.ly-col-vehicle{width:112px}
  #viewSched.layout-wide .lt col.ly-col-place{width:25%}
  #viewSched.layout-wide .lt col.ly-col-actions{width:24px}
  #viewSched.layout-wide .lt-hd th{font-size:11px;line-height:1.3;padding:7px 3px;overflow-wrap:break-word}
  #viewSched.layout-wide .lt .lt-day{font-size:17px;padding:10px}
  #viewSched.layout-wide .lt input,#viewSched.layout-wide .lt select{font-size:13px;padding:7px 4px}
  #viewSched.layout-wide .lt .ds-trigger{gap:3px;font-size:13px;min-height:34px;padding:7px 4px}
  #viewSched.layout-wide .lt .ds-chevron{width:12px;height:12px}
  #viewSched.layout-wide .lt .ds-trigger:disabled{color:var(--ink);opacity:1;background:transparent;pointer-events:none}
  #viewSched.layout-wide .lt input:disabled{pointer-events:none}
  #viewSched.layout-wide .lt .ds-trigger:disabled .ds-chevron{display:none}
  #viewSched.layout-wide .lt .c-e2{min-width:0;grid-template-columns:20px minmax(0,1fr)}
  #viewSched.layout-wide .lt .c-e2>div{min-width:0}
  #viewSched.layout-wide .lt .c-cust{font-size:13px}
  #viewSched.layout-wide .lt-sen td:first-child{font-size:13px}
  #viewSched.layout-wide .lt [data-layout-field]{position:relative}
}
@media screen and (max-width:1199px){#viewSched.layout-wide .ly{grid-template-columns:minmax(0,1fr)}}
@media screen and (max-width:700px){
  #viewSched.layout-wide .ld{padding:8px}
  #viewSched.layout-wide .ly{gap:12px}
}
.layout-field-tip{position:fixed;z-index:10040;box-sizing:border-box;width:max-content;max-width:min(480px,calc(100vw - 24px));max-height:min(48vh,360px);overflow:auto;padding:12px 15px;border:1px solid #c9dce2;border-radius:12px;background:#fff;color:#163b4a;box-shadow:0 8px 30px #102f4330;font:14px/1.5 system-ui,-apple-system,'Segoe UI',sans-serif;white-space:normal;overflow-wrap:anywhere;user-select:text}
.layout-field-tip[hidden]{display:none}
.layout-field-tip-label{font-size:12px;font-weight:600;color:#627e89;margin-bottom:4px}
.layout-field-tip-value{white-space:pre-wrap;font-weight:500}
@media print{.layout-field-tip{display:none!important}.lt-scroll{overflow:visible!important}}
.layout-attention-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;margin-left:6px;padding:0 5px;border-radius:12px;background:#b82935;color:#fff;font-size:12px;font-weight:800;line-height:1}
.layout-attention-badge[hidden],.layout-pending-notice[hidden],.layout-changed[hidden]{display:none!important}
.lt tr.layout-pending{background:#fff0f1;color:#7f1d28}
.lt tr.layout-pending>td{border-top-color:#e8aab0;border-bottom-color:#e8aab0}
.lt tr.layout-pending>td:first-child{box-shadow:inset 4px 0 #c62f3e}
.lt tr.layout-pending input,.lt tr.layout-pending .ds-trigger{color:#7f1d28!important}
.lt tr>td.layout-field-needed{background:#fff0ad;box-shadow:inset 0 0 0 1px #dfc363}
.lt tr>td.layout-field-needed input,.lt tr>td.layout-field-needed .ds-trigger{background:transparent;color:#594714}
.layout-new-label{display:inline-block;margin:5px 4px 2px;padding:3px 7px;border-radius:6px;background:#bb2535;color:#fff;font-weight:700;font-size:11px;line-height:1.3}
.layout-travel-note{margin:2px 4px 5px;font-size:11px;font-weight:600;line-height:1.35;white-space:normal}
.lt tr.layout-inactive{background:#fff2e8;color:#5b3321}
.lt tr.layout-inactive>td{border-top-color:#dfb5a5;border-bottom-color:#dfb5a5;vertical-align:top}
.lt tr.layout-inactive>td:first-child{box-shadow:inset 4px 0 #a43e2c}
.layout-inactive-value{display:block;padding:7px 4px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.layout-inactive-status{display:block;margin:4px;padding:3px 5px;border:1px solid #c46f5b;border-radius:4px;background:#fff;color:#8a2819;font-size:12px;line-height:1.3;white-space:normal}
.layout-inactive-reminder{margin:4px;font-size:12px;line-height:1.4;color:#6c301e}
@media print{.lt tr.layout-inactive{background:#fff!important}.layout-inactive-status{border:2px solid #111;color:#111}}
.layout-pending-notice{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #e8b7bd;border-radius:12px;background:#fff4f5;color:#812431;font-size:13px;line-height:1.5}
.layout-pending-notice .btn{flex-shrink:0;border-color:#d99da7;background:#fff;color:#812431}
.layout-changed{display:flex;align-items:center;gap:12px;padding:9px 12px;border:1px solid #cbdbe0;border-radius:10px;background:#f3f8fa;font-size:13px}
@media(max-width:600px){.layout-pending-notice,.layout-changed{align-items:flex-start;flex-direction:column;gap:8px}}
.lt.layout-with-arrival col.ly-col-arrival{width:100px}
.layout-with-arrival th.c-base-head{font-weight:800;color:var(--ink,#163b4a)}
.layout-with-arrival .c-base input{width:100%;min-width:0;font-variant-numeric:tabular-nums;font-weight:700}
.layout-repeat{display:block;margin:3px 4px 5px;font-size:11px;line-height:1.3;white-space:normal;font-weight:650}
.layout-repeat.sequence,.layout-repeat.conflict,.layout-repeat.unknown{color:#b42318}
.layout-repeat small{display:block;font:inherit;font-weight:400}
.layout-arrival-hint{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
@media screen{
 #viewSched.layout-wide .lt.layout-with-arrival{display:table;min-width:790px;white-space:normal;overflow:visible}
 #viewSched.layout-wide .lt.layout-with-arrival .lt-hd th{width:auto}
 #viewSched.layout-wide .lt.layout-with-arrival col.ly-col-place{width:23%}
 #viewSched.layout-wide .lt .c-base input{padding-inline:3px;text-align:center}
 #viewSched.layout-wide .lt .layout-combine{display:block;width:100%;margin:4px 0;padding:6px 3px;border:1px solid var(--layout-combine-border,#b8d7de);border-radius:8px;background:var(--layout-combine-bg,#eaf5f7);color:var(--layout-combine-ink,#164c5b);font:600 11px/1.35 system-ui,sans-serif;text-align:center;white-space:normal;word-break:normal;overflow-wrap:normal;cursor:pointer}
 #viewSched.layout-wide .lt .layout-combine:hover{background:var(--layout-combine-hover,#d9edf2)}
 #viewSched.layout-wide .lt .layout-combine:focus-visible{outline:2px solid var(--layout-combine-ink,#167c96);outline-offset:1px}
 .layout-combine strong{display:block;font-weight:800}
 .layout-combine span{display:block;font-weight:400;margin-top:2px}
 .modal.layout-combine-modal{width:min(620px,100%);max-width:100%;gap:14px}
 .layout-combine-intro{margin:0;color:var(--muted);font-size:14px;line-height:1.5}
 .layout-combine-group-label{justify-self:start;padding:6px 12px;border:1px solid var(--layout-combine-border);border-radius:8px;background:var(--layout-combine-bg);color:var(--layout-combine-ink);font-size:14px;font-weight:800}
 .layout-combine-list{list-style:none;margin:0;padding:0;display:grid;gap:0;min-width:0}
 .layout-combine-item{padding:12px 14px;border:1px solid #d5e1e5;border-radius:12px;background:#f8fbfc;line-height:1.5;overflow-wrap:break-word}
 .layout-combine-list .current .layout-combine-item{border-color:var(--layout-combine-border,#33809a);background:var(--layout-combine-bg,#eaf5f7)}
 .layout-combine-time{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-bottom:4px}
 .layout-combine-time b{white-space:nowrap;font-variant-numeric:tabular-nums}
 .layout-combine-time span,.layout-combine-item small{font-size:12px;color:#496671}
 .layout-combine-item small{display:block;margin-top:4px;font-weight:600}
 .layout-combine-gap{padding:8px 14px;font-size:12px;font-weight:600;color:#32687b}
}
@media print{[data-layout-combinations]{display:none!important}}

/* Сохранённые группы и корзина раскладок. */
.layout-combine-modal .field {display:flex;flex-direction:column;gap:8px;min-width:0;max-width:100%}
.modal.layout-trash-modal {align-content:start}
.layout-trash-list {display:grid;gap:12px;min-width:0}
.layout-trash-item {display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px;border:1px solid var(--border,#d5dde1);border-radius:12px;min-width:0}
.layout-trash-item>div {min-width:0;overflow-wrap:anywhere}
.layout-trash-item .btn {flex-shrink:0}
@media(max-width:540px){.layout-trash-item{align-items:stretch;flex-direction:column}.layout-trash-item .btn{width:100%}}
@media print{.layout-trash-modal,.layout-trash-list,#lyDeleted{display:none!important}}

/* Один понятный план на день: последовательности показаны до таблицы. */
.layout-autoplan{margin-bottom:16px;padding:14px;border:1px solid #ccdadd;border-radius:12px;background:#f7fafb;color:#193e4a;font-size:13px;line-height:1.45;min-width:0}
.layout-autoplan>header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px}
.layout-autoplan h3{margin:0;font-size:16px}
.layout-autoplan>header>span{font-weight:600;white-space:nowrap}
.layout-autoplan>p{margin:8px 0 12px;color:#516773}
.layout-autoplan>small{display:block;margin-top:10px;color:#516773}
.layout-plan-cards{display:grid;gap:10px;min-width:0}
.layout-plan-card{padding:12px;background:#fff;border:1px solid #d6e0e4;border-radius:10px;min-width:0}
.layout-plan-card>header{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 10px;margin-bottom:8px;font-size:13px}
.layout-plan-card>header>span{color:#516773}
.layout-plan-card.is-saved{background:var(--layout-combine-bg,#f1f6f8);border-color:var(--layout-combine-border,#adc4ce)}
.layout-plan-card.is-saved>header>b{color:var(--layout-combine-ink,#256344)}
.layout-plan-chain{padding:0;margin:0;list-style:none;min-width:0}
.layout-plan-stop{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;align-items:start;min-width:0}
.layout-plan-stop>b{font-variant-numeric:tabular-nums;white-space:nowrap}
.layout-plan-stop>div{min-width:0}
.layout-plan-customer{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.layout-plan-stop small{display:block;color:#627581;font-size:11px;line-height:1.4;margin-top:2px;overflow-wrap:anywhere}
.layout-plan-gap{font-size:11px;color:#627581;padding:6px 0 6px 110px}
.layout-plan-actions{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin-top:12px}
.layout-plan-actions>label{min-width:130px;flex:1 1 150px;font-size:11px;color:#627581}
.layout-plan-actions select,.layout-plan-actions .ds-trigger{margin-top:4px;max-width:100%;font-size:13px;min-height:38px}
.layout-plan-actions>.btn{font-size:12px;min-height:38px;padding:8px 12px;white-space:nowrap}
.layout-plan-other{margin-bottom:0!important}
@media screen{
 #viewSched.layout-wide .lt .layout-combine{background:var(--layout-combine-bg,#f5f7f8);border-color:var(--layout-combine-border,#cedbdf);color:var(--layout-combine-ink,#3c5965);padding:5px 2px;font-size:10px}
 #viewSched.layout-wide .lt .layout-combine:hover{background:var(--layout-combine-hover,#e9eff2)}
 .modal.layout-combine-modal{align-content:start}
 .layout-combine-list .current .layout-combine-item{background:var(--layout-combine-bg,#f1f6f8);border-color:var(--layout-combine-border,#adc4ce)}
}
.layout-manual-open{margin-bottom:12px;max-width:100%;white-space:normal}
.layout-manual-list{display:grid;gap:8px;max-height:44dvh;overflow-y:auto;overscroll-behavior:contain;min-width:0;padding:2px}
.layout-manual-option{display:grid;grid-template-columns:24px minmax(0,1fr);gap:10px;align-items:start;margin:0;padding:12px;border:1px solid #cddce1;border-radius:10px;cursor:pointer;background:#fff;min-width:0}
.layout-manual-option:has(input:checked){background:#e8f3f5;border-color:#347481}
.layout-manual-option input[type=checkbox]{width:22px;height:22px;margin:1px 0;accent-color:#215865}
.layout-manual-option>span{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.45}
.layout-manual-option b{font-size:14px;white-space:nowrap;font-variant-numeric:tabular-nums}
.layout-manual-option small{color:#516773;font-size:12px}
.layout-manual-modal .actions>.btn{white-space:normal;min-width:0;max-width:100%}
.layout-manual-modal .actions{flex-wrap:wrap}
@media(max-width:420px){
 .layout-autoplan{padding:10px}.layout-plan-card{padding:10px}
 .layout-plan-stop{grid-template-columns:90px minmax(0,1fr);gap:8px}
 .layout-plan-gap{padding-left:98px}
 .layout-plan-actions>label{flex-basis:100%}
 .layout-plan-actions>.btn{flex:1 1 0}
}
@media print{[data-layout-proposals],.layout-autoplan{display:none!important}}

/* Source identity stays in the editor; exported crew sheets use their clean template. */
.layout-call-ref{display:block;color:#52626d;font-size:11px;line-height:1.35;margin:3px 0;white-space:nowrap}
.layout-delete-modal{width:min(680px,100%);box-sizing:border-box;overflow-wrap:anywhere}
.layout-delete-details{margin:16px 0}
.layout-delete-details>div{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px;padding:8px 0;border-bottom:1px solid #e1e7eb}
.layout-delete-details dt{color:#64717a}.layout-delete-details dd{margin:0;min-width:0}
.layout-delete-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px}
.layout-delete-actions .btn{white-space:normal;max-width:100%}
@media(max-width:480px){.layout-delete-details>div{grid-template-columns:minmax(0,1fr);gap:3px}.layout-delete-actions .btn{flex:1 1 100%}}
@media print{.layout-call-ref{display:none!important}}

/* Direct time entry for phones, including an unfolded screen. */
@media screen {
 #viewSched.layout-wide .lt .c-base input[data-keyboard-time]{font-size:16px;min-height:42px}
 #viewSched.layout-wide .lt .c-base input[aria-invalid="true"]{outline:2px solid #b42318;outline-offset:-2px}
 .layout-time-error{display:block;margin:4px;font-size:11px;line-height:1.3;color:#b42318;white-space:normal}
 .layout-time-error[hidden]{display:none}
}
@media print{.layout-time-error{display:none!important}}

/* Compact arrival column, with enough room for a five-character time. */
@media screen and (pointer:coarse){
 #viewSched.layout-wide .lt.layout-with-arrival col.ly-col-arrival{width:66px}
 #viewSched.layout-wide .lt.layout-with-arrival{min-width:756px}
 #viewSched.layout-wide .lt.layout-with-arrival .c-base-head{font-size:10px;overflow-wrap:normal;word-break:normal}
 #viewSched.layout-wide .lt .c-base input[data-keyboard-time]::placeholder{font-size:13px;font-weight:500}
}
