/* WAYLAB-ROUTE-COLLAB (T-1116) — только .wc-* и токены-алиасы; css/style.css не меняется. */
:root{--wc-flash-bg:var(--primary-50,#f0fdfa);--wc-flash-line:var(--primary-600,#0d9488);--wc-flash-ring:var(--primary-200,#99f6e4);--wc-presence-bg:var(--primary-50,#f0fdfa);--wc-presence-line:var(--primary-200,#99f6e4);--wc-presence-ink:var(--primary-700,#0f766e);--wc-chip-bg:var(--primary-100,#ccfbf1);--wc-chip-ink:var(--primary-700,#0f766e);--wc-remote-bg:var(--accent-400,#fbbf24);--wc-remote-ink:var(--surface-800,#292524);--wc-dur:1600ms;--wc-ease:cubic-bezier(.4,0,.2,1);}
.wc-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;}
/* Подсветка изменений */
.wc-flash{animation:wc-flash var(--wc-dur) var(--wc-ease) 1;}
@keyframes wc-flash{0%,11%,75%{background-color:var(--wc-flash-bg);border-color:var(--wc-flash-line);box-shadow:inset 3px 0 0 var(--wc-flash-line),0 0 0 2px var(--wc-flash-ring);}}
.wc-flash.wc-static{animation:none;background-color:var(--wc-flash-bg);border-color:var(--wc-flash-line);box-shadow:inset 3px 0 0 var(--wc-flash-line),0 0 0 2px var(--wc-flash-ring);}
@media (prefers-reduced-motion:reduce){.wc-flash{animation:none;}.wc-flash:not(.wc-static){background-color:var(--wc-flash-bg);box-shadow:inset 3px 0 0 var(--wc-flash-line),0 0 0 2px var(--wc-flash-ring);}}
.wc-changed-chip{display:inline-flex;align-items:center;gap:5px;height:18px;max-width:100%;margin:0 6px 0 0;padding:1px 7px;border-radius:999px;background:var(--wc-chip-bg);color:var(--wc-chip-ink);font-family:inherit;font-size:11px;font-weight:600;line-height:1.5;white-space:nowrap;vertical-align:middle;}
.wc-changed-chip::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor;}
/* Бейдж присутствия */
.wc-presence{display:inline-flex;align-items:center;gap:4px;max-width:148px;height:20px;padding:2px 8px 2px 6px;border:1px solid var(--wc-presence-line);border-radius:999px;background:var(--wc-presence-bg);color:var(--wc-presence-ink);font-family:inherit;font-size:11.5px;font-weight:600;line-height:1.2;transition:opacity 120ms linear;}
.wc-presence svg{width:12px;height:12px;flex:none;}
.wc-presence-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wc-presence--multi{max-width:176px;}
.wc-presence--self{background:var(--surface-100);border-color:var(--surface-300);color:var(--surface-600);}
.wc-presence.is-leaving{opacity:0;}
.rfx-head>.wc-presence{flex:none;align-self:flex-start;margin-top:2px;}
.feed-note-main>.wc-presence{margin:0 6px 4px 0;}
/* Чип отложенных изменений */
.wc-remote-chip{display:inline-flex;align-items:center;gap:5px;max-width:220px;height:20px;padding:0 8px;border:1px solid var(--accent-500,#f59e0b);border-radius:999px;background:var(--wc-remote-bg);color:var(--wc-remote-ink);font-family:inherit;font-size:11px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;}
.wc-remote-chip-text{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.wc-remote-count{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--surface-800);color:#fff;font-size:10px;font-weight:700;}
.wc-remote-chip:hover,.wc-remote-chip:active,.wc-remote-chip[aria-expanded="true"]{background:var(--accent-500,#f59e0b);border-color:var(--accent-500,#f59e0b);}
.wc-remote-chip:focus-visible{outline:2px solid var(--primary-600);outline-offset:2px;}
.wc-remote-chip.is-leaving{opacity:0;transition:opacity 160ms linear;}
.wc-remote-pop{position:fixed;z-index:960;display:flex;gap:6px;padding:6px;max-width:calc(100vw - 16px);flex-wrap:wrap;border:1px solid var(--surface-200);border-radius:10px;background:#fff;box-shadow:var(--shadow-lg);}
.wc-remote-pop[hidden]{display:none;}
.rfx-main>.wc-remote-chip{margin:0 0 2px;align-self:flex-start;}
.feed-note-main>.wc-remote-chip{margin:0 6px 4px 0;}
@media (prefers-reduced-motion:reduce){.wc-remote-chip.is-leaving{transition:none;}}
@media (max-width:480px){.wc-remote-chip{max-width:150px;}.wc-remote-pop{flex-direction:column;align-items:stretch;}}
/* Индикатор связи */
.wc-status{display:inline-flex;align-items:center;gap:6px;flex:none;height:22px;max-width:180px;padding:0 8px;border:1px solid var(--surface-200);border-radius:999px;background:#fff;color:var(--surface-600);font-family:inherit;font-size:11.5px;font-weight:600;line-height:1;}
.wc-status-dot{width:7px;height:7px;border-radius:50%;background:var(--primary-500);flex:none;}
.wc-status-label{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.wc-status--live{background:var(--primary-50);border-color:var(--primary-200);color:var(--primary-700);}
.wc-status--polling .wc-status-dot{background:var(--accent-500);}
.wc-status--offline{background:var(--surface-100);border-color:var(--surface-200);color:var(--surface-600);}
.wc-status--offline .wc-status-dot{background:var(--surface-400);}
.wc-status--readonly .wc-status-dot{background:var(--surface-300);}
@media (max-width:768px){.wc-status{max-width:22px;padding:0 6px;}.wc-status-label{display:none;}}
/* T-1248: «История» — иконка в строке поиска (.planner-search-row), обёртку монтирует feature-collab.js */
.planner-search-row{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0;}
.planner-search-row > .map-search{flex:1 1 auto;min-width:0;flex-shrink:1;}
.wc-history-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;padding:0;border:1px solid var(--surface-200);border-radius:12px;background:#fff;color:var(--surface-700);font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;transition:background-color 120ms ease,border-color 120ms ease,color 120ms ease;margin-right:12px;}
.wc-history-btn svg{width:16px;height:16px;flex:none;}
.wc-history-btn:hover{background:var(--surface-100);}
.wc-history-btn:active{background:var(--surface-200);}
.wc-history-btn:focus-visible{outline:2px solid var(--primary-600);outline-offset:2px;}
.wc-history-btn[aria-disabled="true"]{opacity:.55;cursor:default;}
.wc-history-btn-label{display:none;}
@media (max-width:768px){.wc-history-btn{width:38px;height:38px;padding:0;}}
/* Drawer истории и вех */
.wc-scrim{position:fixed;inset:0;z-index:940;background:rgba(15,23,42,.35);}
.wc-scrim[hidden]{display:none;}
.wc-drawer{position:fixed;right:0;top:calc(64px + 52px);bottom:0;z-index:950;display:flex;flex-direction:column;width:clamp(320px,30vw,480px);background:#fff;border-left:1px solid var(--surface-200);box-shadow:-12px 0 32px rgba(15,23,42,.14);font-family:Manrope,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;animation:wc-drawer-in 180ms var(--wc-ease) 1;}
@keyframes wc-drawer-in{from{transform:translateX(24px);opacity:.4;}to{transform:translateX(0);opacity:1;}}
body.header-hidden .wc-drawer{top:52px;}
.wc-drawer-head{display:flex;align-items:center;gap:8px;flex:none;height:52px;padding:6px 8px 6px 16px;border-bottom:1px solid var(--surface-100);}
.wc-drawer-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:700;color:var(--surface-800);}
.wc-drawer-close{flex:none;width:40px;height:40px;border:none;border-radius:10px;background:transparent;color:var(--surface-600);font-size:18px;cursor:pointer;}
.wc-drawer-close:hover{background:var(--surface-100);}
.wc-drawer-tabs{display:flex;gap:6px;flex:none;padding:8px 16px;border-bottom:1px solid var(--surface-100);}
.wc-tab{height:30px;padding:0 14px;border:none;border-radius:8px;background:var(--surface-100);color:var(--surface-500);font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;}
.wc-tab.is-active{background:#fff;color:var(--primary-700);box-shadow:var(--shadow-soft);}
.wc-drawer-body{flex:1;overflow-y:auto;padding-bottom:16px;font-size:13px;color:var(--surface-700);}
.wc-drawer-foot{flex:none;padding:10px 16px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--surface-100);background:#fff;}
@media (min-width:769px){.wc-scrim{display:none;}}
@media (max-width:768px){.wc-drawer{top:0;width:100%;}}
@media (prefers-reduced-motion:reduce){.wc-drawer{animation:none;}}
/* Строки ревизий и вех */
.wc-rev{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px 16px 12px 20px;border-bottom:1px solid var(--surface-100);}
.wc-rev.is-current{background:var(--primary-50);box-shadow:inset 3px 0 0 var(--primary-500);}
.wc-rev-main{min-width:0;}
.wc-rev-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.wc-rev-time{font-size:12px;color:var(--surface-500);}
.wc-rev-author{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;color:var(--surface-800);}
.wc-rev-kind{padding:1px 6px;border-radius:999px;background:var(--surface-100);color:var(--surface-600);font-size:10.5px;font-weight:700;text-transform:uppercase;}
.wc-rev-kind--restore{background:var(--primary-100);color:var(--primary-700);}
.wc-rev-summary{margin-top:3px;overflow-wrap:anywhere;font-size:13px;line-height:1.45;}
.wc-rev-chips,.wc-mile-actions{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px;}
.wc-chip{display:inline-flex;align-items:center;height:18px;padding:0 7px;border-radius:999px;background:var(--surface-100);color:var(--surface-600);font-size:11px;font-weight:500;}
.wc-rev-action{align-self:center;}
.wc-mile{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--surface-100);}
.wc-mile-info{min-width:0;}
.wc-mile-label{overflow-wrap:anywhere;font-size:13px;font-weight:600;color:var(--surface-800);}
.wc-mile-meta{margin-top:2px;font-size:11.5px;color:var(--surface-500);}
.wc-mile-actions{margin-top:0;justify-content:flex-end;}
/* Кнопки, формы, состояния */
.wc-btn{display:inline-flex;align-items:center;justify-content:center;height:28px;padding:0 10px;border:1px solid var(--surface-200);border-radius:8px;background:#fff;color:var(--surface-700);font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;}
.wc-btn:hover{background:var(--surface-100);}
.wc-btn:focus-visible{outline:2px solid var(--primary-600);outline-offset:2px;}
.wc-btn:disabled{opacity:.55;cursor:default;}
.wc-btn-primary{border-color:var(--primary-700);background:var(--primary-700);color:#fff;}
.wc-btn-primary:hover{background:#115e59;border-color:#115e59;}
.wc-drawer-foot>.wc-btn-primary{width:100%;}
.wc-empty{padding:28px 20px;text-align:center;font-size:13px;line-height:1.45;color:var(--surface-500);}
.wc-error{margin:10px 16px;padding:8px 10px;border:1px solid var(--accent-500);border-radius:10px;background:#fff;color:var(--surface-800);font-size:12.5px;line-height:1.4;}
.wc-error[hidden]{display:none;}
.wc-skel{height:46px;margin:10px 16px;border-radius:8px;background:var(--surface-100);animation:wc-skel 900ms ease-in-out infinite alternate;}
@keyframes wc-skel{from{opacity:.55;}to{opacity:1;}}
@media (prefers-reduced-motion:reduce){.wc-skel{animation:none;}}
.wc-milestone-form{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}
.wc-milestone-form .wc-error{flex-basis:100%;margin:6px 0 0;}
.wc-input{flex:1;min-width:0;height:30px;padding:0 9px;border:1px solid var(--surface-300);border-radius:8px;font-family:inherit;font-size:12.5px;color:var(--surface-800);}
.wc-input:focus-visible{outline:2px solid var(--primary-600);outline-offset:1px;}
/* T-1249 WAYLAB-HISTORY-SUMMARY */
.wc-rev-summary-lead{margin:0 0 4px;color:var(--surface-800);font-weight:600;}
.wc-mile-summary{margin-top:2px;overflow-wrap:anywhere;font-size:12px;line-height:1.4;color:var(--surface-600);}
/* T-1248: капсула тоталов — в строке заголовка ленты (.planner-feed-head, монтирует app.js). style.css не правится. */
.planner-feed-head{display:flex;align-items:center;gap:8px;min-width:0;flex:0 0 auto;}
.planner-feed-head > .planner-page-head{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.planner-feed-head > .rl-totals-flag{flex:0 1 auto;max-width:min(240px,60%);}
.planner-feed-head > .rl-totals-flag .rl-totals-flag-body{min-width:0;}
body.rl-expanded .rl-totals-flag:not([hidden]){display:inline-flex;}
/* T-1248: меню «+» — стрелка на левой кромке при боковом раскрытии (режим вычисляет _rnPlaceMenu).
   position не дублируем: наследуется от базового .feed-gap-menu::before в style.css. */
.feed-gap-menu.is-right::before{top:var(--feed-menu-arrow-y,50%);left:-4.5px;margin-left:0;margin-top:-4px;border-top:0;border-right:0;border-left:1px solid var(--surface-200);border-bottom:1px solid var(--surface-200);transform:rotate(45deg);}
/* T-1261: error-state «История и вехи» — центр тела, розовая карточка (только historyError) */
.wc-drawer-body:has(> .wc-error + .wc-btn){display:flex;flex-direction:column;align-items:center;gap:14px;padding:24px 16px;text-align:center;}
.wc-drawer-body > .wc-error:has(+ .wc-btn){margin:auto 0 0;max-width:320px;padding:12px 16px;border:1px solid #f9a8d4;border-radius:12px;background:#fdf2f8;color:#9d174d;font-size:13px;line-height:1.45;}
.wc-drawer-body > .wc-error + .wc-btn{min-width:148px;margin-bottom:auto;}


/* T-1253: lease-локи — read-only UI, скрытый toolbar (DESIGN_SPEC v1.1a §8.1). */
:root{--wc-lock-bg:var(--surface-100,#f5f5f4);--wc-lock-line:var(--surface-300,#d6d3d1);--wc-lock-focus:var(--surface-400,#a8a29e);--wc-lock-dur:160ms;}
.is-locked{transition:background-color var(--wc-lock-dur) var(--wc-ease),border-color var(--wc-lock-dur) var(--wc-ease);}
.feed-note.is-locked{background:var(--wc-lock-bg);border-color:var(--surface-200);border-left-color:var(--wc-lock-line);}
.feed-note.is-locked:hover,.feed-note.is-locked:focus-within{background:var(--wc-lock-bg);border-color:var(--surface-200);border-left-color:var(--wc-lock-line);box-shadow:none;}
.feed-note.is-locked .feed-note-body{cursor:default;color:var(--surface-700);user-select:text;}
.feed-note.is-locked:focus-within .feed-note-toolbar{display:none;}
.feed-note.is-locked .feed-note-toolbar{display:none;}
.point-title-input.is-locked,.seg-block-title.is-locked,.input.is-locked,
.sched-range-input.is-locked{background:var(--wc-lock-bg);border-color:var(--surface-200);color:var(--surface-600);cursor:not-allowed;}
.point-title-input.is-locked:hover,.point-title-input.is-locked:focus,
.seg-block-title.is-locked:hover,.seg-block-title.is-locked:focus,
.input.is-locked:hover,.input.is-locked:focus,
.sched-range-input.is-locked:hover{background:var(--wc-lock-bg);border-color:var(--surface-200);box-shadow:none;outline:none;}
.is-locked:focus-visible{outline:2px dashed var(--wc-lock-focus);outline-offset:2px;}
.seg-block-header-top>.wc-presence{flex:none;align-self:center;max-width:120px;}
.rl-field-desc.is-locked .rl-desc{background:var(--wc-lock-bg);border-radius:8px;cursor:default;}
.sched-range-input.is-locked{box-shadow:none;}
@media (max-width:480px){.seg-block-header-top>.wc-presence{max-width:96px;}}
@media (prefers-reduced-motion:reduce){.is-locked{transition:none;}}
