/* Дорожные работы ДДХ */
.rw-hero { margin-bottom: 4px; }
.rw-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rw-kpi-overdue .fm-kpi-value { color: #b91c1c; }
.rw-kpi-blocked .fm-kpi-value { color: #c2410c; }
.rw-kpi-active .fm-kpi-value { color: #1d4ed8; }
.rw-kpi-done .fm-kpi-value { color: #15803d; }
.rw-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.rw-map-panel { position: sticky; top: 8px; }
.rw-map { height: 560px; border-top: 1px solid #e0e7ef; background: #eef2f6; }
.rw-table td { vertical-align: top; }
.rw-table tr.rw-row { cursor: pointer; }
.rw-table tr.rw-row:hover td { background: #f6faff; }
.rw-title { font-weight: 800; color: #1f3347; font-size: 12px; }
.rw-sub { display: block; color: #6b7d90; font-size: 11px; margin-top: 3px; line-height: 1.45; }
.rw-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; border: 1px solid transparent; white-space: nowrap; }
.rw-impact-blocked { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.rw-impact-restricted { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.rw-impact-none { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.rw-st-planned { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.rw-st-active { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.rw-st-overdue { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.rw-st-completed { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.rw-st-cancelled { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.rw-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rw-table td:last-child, .rw-table th:last-child { width: 1%; white-space: nowrap; }
.rw-table td:nth-child(3) { white-space: nowrap; }
.rw-row-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.rw-row-actions .fm-btn { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.rw-report-actions .fm-btn { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.fm-btn.rw-danger { color: #b91c1c; border-color: #fecaca; }
.fm-btn.rw-danger:hover { background: #fef2f2; }
.fm-btn.rw-success { background: #15803d; border-color: #15803d; color: #fff; }
.fm-btn.rw-success:hover { background: #166534; }

.rw-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .48); display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px; overflow-y: auto; }
.rw-dialog { width: min(980px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(15, 23, 42, .35); overflow: hidden; }
.rw-dialog.rw-narrow { width: min(560px, 100%); }
.rw-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #e5ebf2; background: #f8fafc; }
.rw-dialog-head h4 { font-size: 17px; font-weight: 800; color: #142a40; letter-spacing: -.01em; }
.rw-dialog-head p { font-size: 11px; color: #64748b; margin-top: 4px; }
.rw-close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid #dbe4ec; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: #475569; flex-shrink: 0; }
.rw-dialog-body { padding: 18px 22px; }
.rw-dialog-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid #e5ebf2; background: #fbfcfe; }
.rw-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.rw-form-grid .rw-wide { grid-column: 1 / -1; }
.rw-form-grid label, .rw-field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 750; color: #3d5266; }
.rw-form-grid input, .rw-form-grid select, .rw-form-grid textarea, .rw-field input, .rw-field select, .rw-field textarea { border: 1px solid #d5dfe9; border-radius: 9px; padding: 8px 10px; font-size: 12.5px; font-weight: 500; color: #1f2f40; background: #fff; }
.rw-form-grid textarea, .rw-field textarea { min-height: 70px; resize: vertical; }
.rw-form-grid small { font-weight: 500; color: #7a8a9b; font-size: 10.5px; }
.rw-picker { height: 360px; border-radius: 12px; border: 1px solid #d5dfe9; overflow: hidden; }
.rw-picker-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 11px; color: #5b6f83; }
.rw-picker-bar .fm-btn { min-height: 30px; padding: 5px 10px; font-size: 11px; }
.rw-error { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; font-size: 12px; }
.rw-note { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: #f0f7ff; color: #1e4f80; border: 1px solid #cfe3fb; font-size: 11.5px; line-height: 1.5; }
.rw-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.rw-card-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 18px; }
.rw-kv { display: grid; grid-template-columns: 165px minmax(0, 1fr); gap: 7px 12px; font-size: 12px; }
.rw-kv dt { color: #6b7d90; font-weight: 700; }
.rw-kv dd { color: #1f3347; white-space: pre-wrap; word-break: break-word; }
.rw-mini-map { height: 260px; border-radius: 12px; border: 1px solid #d5dfe9; overflow: hidden; }
.rw-section-title { font-size: 12px; font-weight: 800; color: #1f3347; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.rw-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid #dbe6f1; }
.rw-timeline li { position: relative; padding: 0 0 10px 14px; font-size: 11.5px; color: #33475b; }
.rw-timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #1575dc; border: 2px solid #fff; }
.rw-timeline time { display: block; font-size: 10.5px; color: #7a8a9b; }
.rw-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-thumb { width: 108px; height: 82px; border-radius: 10px; border: 1px solid #d5dfe9; background: #f1f5f9 center / cover no-repeat; display: flex; align-items: flex-end; justify-content: flex-start; padding: 5px; font-size: 9.5px; color: #334155; cursor: pointer; overflow: hidden; position: relative; }
.rw-thumb span { background: rgba(255, 255, 255, .88); border-radius: 6px; padding: 1px 5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-thumb.rw-doc { align-items: center; justify-content: center; flex-direction: column; gap: 4px; font-size: 22px; color: #b91c1c; }
.rw-thumb.rw-doc span { font-size: 9.5px; color: #334155; }
.rw-lightbox img { max-width: 100%; max-height: 72vh; display: block; margin: 0 auto; border-radius: 10px; }
.rw-empty { padding: 26px 12px; text-align: center; color: #6b7d90; font-size: 12px; }
.rw-route-chip { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 4px 9px; border-radius: 999px; font-size: 9px; font-weight: 900; background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
@media (max-width: 1280px) { .rw-layout { grid-template-columns: minmax(0, 1fr); } .rw-map-panel { position: static; } .rw-map { height: 420px; } .rw-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rw-form-grid, .rw-card-grid { grid-template-columns: minmax(0, 1fr); } .rw-kv { grid-template-columns: minmax(0, 1fr); } .rw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 1.8.11 / 1.9.2: Яндекс Карты */
.rw-map-off { height: 100%; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; text-align: center; color: #5b6f83; font-size: 12px; line-height: 1.45; background: #eef2f6; }
.rw-map-off i { font-size: 26px; color: #94a3b8; }
.rw-map-off b { color: #23384d; font-size: 13px; }

/* 1.8.13 / 1.9.4: значки на карте, контроль покрытия и повторных разрытий */
.rw-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.rw-kpi-surface .fm-kpi-value { color: #b91c1c; } .rw-kpi-repeat .fm-kpi-value { color: #7c3aed; }
.rw-chip.rw-ctl-surface { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.rw-chip.rw-ctl-repeat { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.rw-pin { position: relative; width: 34px; height: 40px; cursor: pointer; filter: drop-shadow(0 3px 4px rgba(15, 23, 42, .35)); transition: transform .15s ease; }
.rw-pin-ya { position: absolute; left: -17px; top: -40px; }
.rw-pin:hover { transform: scale(1.15); z-index: 5; }
.rw-pin-ya:hover { transform: translateY(-3px) scale(1.15); }
.rw-pin-body { position: absolute; left: 2px; top: 2px; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin); border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.rw-pin-body i { transform: rotate(45deg); color: #fff; font-size: 14px; }
.rw-pin-done .rw-pin-body { opacity: .82; }
.rw-pin-pulse .rw-pin-body::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid var(--pin); animation: rw-pulse 1.6s ease-out infinite; }
@keyframes rw-pulse { from { opacity: .9; transform: scale(.85); } to { opacity: 0; transform: scale(1.35); } }
.rw-pin-badge { position: absolute; right: -7px; top: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #7c3aed; color: #fff; font: 700 10px/18px system-ui, sans-serif; text-align: center; border: 2px solid #fff; box-sizing: border-box; }
.rw-legend .rw-pin-badge { position: static; display: inline-block; vertical-align: middle; margin-left: 4px; }
.rw-pin-badge-alert { background: #dc2626; }
.rw-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.rw-legend i { margin-right: 4px; color: #475569; }
.rw-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 3px; }
.rw-hint { font-size: 12px; line-height: 1.45; max-width: 300px; color: #0f172a; }
.rw-hint span { color: #475569; } .rw-hint i { color: #64748b; font-size: 11px; }
.rw-hint .rw-hint-alert { color: #b91c1c; font-weight: 600; } .rw-hint .rw-hint-repeat { color: #6d28d9; font-weight: 600; }
.rw-icon-btn { min-width: 34px; padding: 6px 8px; }
.rw-control { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; font-size: 12px; }
.rw-control li { display: flex; gap: 8px; align-items: baseline; padding: 8px 10px; border-radius: 10px; background: #f1f5f9; }
.rw-control li.rw-bad { background: #fef2f2; color: #991b1b; } .rw-control li.rw-ok { background: #f0fdf4; color: #166534; } .rw-control li.rw-wait { background: #fffbeb; color: #92400e; }
.rw-link { border: 0; background: none; padding: 0; color: #1d4ed8; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.rw-bad-text { color: #b91c1c; }
.rw-contractors td, .rw-contractors th { text-align: center; } .rw-contractors td:first-child, .rw-contractors th:first-child { text-align: left; }

/* 1.8.14 / 1.9.5: вкладки разделов ДДХ */
.rw-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 6px; border-radius: 14px; background: #fff; border: 1px solid #e0e7ef; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.rw-tab { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 9px 13px; border-radius: 10px; font: 600 12.5px/1.2 inherit; color: #334155; cursor: pointer; }
.rw-tab i { color: #64748b; } .rw-tab:hover { background: #f1f5f9; }
.rw-tab.active { background: #0f2a44; color: #fff; } .rw-tab.active i { color: #7dd3fc; }
.rw-upload-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; } .rw-upload-row select { min-height: 34px; border-radius: 9px; border: 1px solid #d5dfe9; padding: 0 8px; }
