/* 道路救援 · 管理端扩展样式
   ⚠️ 视觉规范（颜色/字号/圆角/按钮/表格/徽标）统一由 shared/css/unified.css 定义，
   本文件只保留救援模块特有的布局类（r-kpi / r-split / r-timeline / r-photos 等）。
   新增样式请优先复用 unified.css 的变量与组件类，不要再写死颜色和字号。 */
/* 金科道路救援 · 管理端扩展样式（吉诺 SAA / 15 模块） */
.r-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.r-page-head h1 { margin: 0; font-size: 1.35rem; }
.r-page-head .sub { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.r-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.r-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.r-kpi { background: var(--card, #fff); border: 1px solid var(--line, var(--line)); border-radius: 12px; padding: 14px 16px; }
.r-kpi .k { color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 6px; }
.r-kpi .v { font-size: 1.5rem; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.r-kpi .v small { font-size: .8rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.r-kpi.warn .v { color: #d97706; }
.r-kpi.bad .v { color: #dc2626; }
.r-kpi.good .v { color: #059669; }

.r-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line, var(--line)); margin-bottom: 14px; overflow-x: auto; }
.r-tab { padding: 9px 14px; border: none; background: none; cursor: pointer; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.r-tab.active { color: var(--primary, var(--primary)); border-bottom-color: var(--primary, var(--primary)); font-weight: 600; }

.r-grid { display: grid; gap: 14px; }
.r-grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.r-table-wrap { overflow-x: auto; }
.r-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.r-table th { text-align: left; padding: 9px 10px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line, var(--line)); white-space: nowrap; background: var(--surface-2); }
.r-table td { padding: 9px 10px; border-bottom: 1px solid var(--line, var(--line)); vertical-align: middle; }
.r-table tbody tr:hover { background: #f8faff; }
.r-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.r-empty { padding: 28px; text-align: center; color: var(--muted); font-size: .9rem; }

/* 详情键值栅格（弹层/抽屉统一展示风格） */
.r-kv { display: grid; gap: 8px 20px; margin-top: 10px; }
.r-kv.c2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.r-kv.c1 { grid-template-columns: 1fr; }
.r-kv .kv-item { display: flex; gap: 8px; font-size: .85rem; line-height: 1.65; padding-bottom: 6px; border-bottom: 1px dashed var(--line); min-width: 0; }
.r-kv .kv-item .k { flex: 0 0 88px; color: var(--muted); }
.r-kv .kv-item .v { flex: 1; min-width: 0; word-break: break-word; }
.r-kv .kv-item.span2 { grid-column: 1 / -1; }
.r-kv .kv-item .v .r-badge { margin-right: 4px; }

.r-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; line-height: 1.6; font-weight: 600; white-space: nowrap; }
.r-badge.gray { background: #eef1f7; color: #475569; }
.r-badge.blue { background: var(--primary-light); color: var(--primary-ink); }
.r-badge.green { background: #dcfce7; color: #15803d; }
.r-badge.yellow { background: #fef3c7; color: #b45309; }
.r-badge.red { background: #fee2e2; color: #b91c1c; }
.r-badge.purple { background: #ede9fe; color: #6d28d9; }
.r-badge.indigo { background: #e0e7ff; color: #4338ca; }

.r-bars { display: flex; flex-direction: column; gap: 8px; }
.r-bar-row { display: grid; grid-template-columns: 132px 1fr 64px; gap: 10px; align-items: center; font-size: .83rem; }
.r-bar-track { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.r-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #6366f1); }
.r-bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.r-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.r-toolbar input, .r-toolbar select { min-width: 130px; }
.r-form { display: grid; gap: 12px; }
.r-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r-form label.rf { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.r-form label.rf.span2 { grid-column: 1 / -1; }
.r-form label.rf i.form-hint { font-style: normal; }
.r-form input, .r-form select, .r-form textarea { padding: 0 10px; border: 1px solid var(--line, var(--line)); border-radius: 8px; font-size: 14px; font-family: inherit; min-height: 34px; }
.r-form textarea { padding: 8px 10px; }
.r-form .r-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.r-form .r-field-label { font-size: 12px; }
.r-form .r-checks { display: flex; gap: 16px; align-items: center; min-height: 34px; }
.r-form .r-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text, #1f2937); }
.r-form .r-checks input[type="checkbox"] { min-height: 0; width: 15px; height: 15px; padding: 0; margin: 0; }
.r-hint { color: var(--muted); font-size: 12px; }

.r-drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 900; display: flex; justify-content: flex-end; }
.r-drawer { width: min(820px, 96vw); background: #fff; height: 100%; overflow-y: auto; padding: 16px 20px 48px; box-shadow: -12px 0 30px rgba(15, 23, 42, .18); }
.r-drawer.is-max { width: 96vw; }
.r-drawer h2 { margin: 4px 0 2px; font-size: 1.05rem; }
.r-drawer .close-x { float: right; border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

.r-modal { background: #fff; border-radius: 14px; padding: 18px 20px; width: 92vw; max-height: 88vh; overflow-y: auto; margin: auto; box-shadow: 0 20px 50px rgba(15, 23, 42, .28); }
.r-modal.is-max { width: 96vw !important; max-width: 96vw !important; height: 92vh; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.r-modal.is-max .r-form { flex: 1; overflow: auto; align-content: start; }
.r-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.r-modal-head h2 { margin: 0; font-size: 15px; flex: 1; }
.r-modal-head .close-x { border: none; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; color: var(--muted); }
.r-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.r-drawer-mask:has(.r-modal) { justify-content: center; align-items: center; }
.r-kpi.drill { cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.r-kpi.drill:hover { border-color: #c7d2fe; box-shadow: 0 8px 22px rgba(79,70,229,.12); transform: translateY(-1px); }
.r-kpi .drill-arrow { font-style: normal; font-size: 12px; color: var(--primary, #4f46e5); margin-left: 6px; vertical-align: middle; }

.r-timeline { list-style: none; margin: 0; padding: 0; }
.r-timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; font-size: .85rem; }
.r-timeline li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #94a3b8; }
.r-timeline li.done::before { background: var(--primary); }
.r-timeline .t { color: var(--muted); font-size: .76rem; }

.r-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.r-photo { border: 1px solid var(--line, var(--line)); border-radius: 8px; overflow: hidden; font-size: .72rem; }
.r-photo img { width: 100%; height: 78px; object-fit: cover; background: var(--surface-3); display: block; }
.r-photo .meta { padding: 5px 6px; display: flex; justify-content: space-between; gap: 4px; align-items: center; }

.r-split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 14px; }
@media (max-width: 1080px) { .r-split { grid-template-columns: 1fr; } }

.r-flag { font-size: .74rem; }
.r-flag.ok { color: #15803d; }
.r-flag.yellow { color: #b45309; }
.r-flag.red, .r-flag.diff { color: #b91c1c; font-weight: 700; }

.r-inline-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.r-step { padding: 5px 10px; border-radius: 8px; border: 1px dashed #cbd5e1; font-size: .8rem; background: #fff; cursor: pointer; }
.r-step:hover { border-color: var(--primary); color: var(--primary); }

/* date quick range */
.r-quick-range { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.r-quick-range .btn.is-on { background: var(--primary-light); border-color: #c7d2fe; color: var(--primary-ink); font-weight: 600; }
@media (max-width: 720px) { .r-quick-range { width: 100%; } }

/* ── 交期 / 逆向流程 ─────────────────────────────────────────── */
.r-guide { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(180deg, #f8fbff, #f3f7ff); border: 1px solid #dbeafe; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; font-size: .82rem; line-height: 1.75; color: #1e3a8a; }
.r-guide .ic { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: #dbeafe; display: grid; place-items: center; font-size: 14px; }
.r-guide b { color: #1d4ed8; }
.r-guide details { margin-top: 2px; }
.r-guide summary { cursor: pointer; color: #1d4ed8; font-weight: 600; }
.r-guide .r-guide-list { margin: 6px 0 0; padding-left: 18px; color: #334155; }
.r-guide .r-guide-list li { margin: 2px 0; }

.r-mini-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.r-mini-tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .8rem; cursor: pointer; transition: .15s; }
.r-mini-tab:hover { border-color: #c7d2fe; color: var(--primary-ink); }
.r-mini-tab.active { background: var(--primary-light, #eef2ff); border-color: #c7d2fe; color: var(--primary-ink, #4338ca); font-weight: 600; }
.r-mini-tab .n { min-width: 18px; padding: 0 5px; border-radius: 999px; background: #eef2f7; color: #475569; font-size: .72rem; text-align: center; }
.r-mini-tab.active .n { background: #e0e7ff; color: #4338ca; }

.r-deadline-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.r-deadline-line .big { font-size: .95rem; font-weight: 700; }
.r-deadline-line .muted { color: var(--muted); font-size: .78rem; }
.r-deadline-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin: 8px 0 4px; }
.r-deadline-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #84cc16); }
.r-deadline-bar.is-soon > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.r-deadline-bar.is-over > i { background: linear-gradient(90deg, #dc2626, #f87171); }
.r-deadline-bar.is-done > i { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }

.r-reverse-row .r-badge { margin-right: 2px; }
.r-reverse-amount { font-variant-numeric: tabular-nums; font-weight: 700; color: #b91c1c; }
.r-reverse-amount.zero { color: var(--muted); font-weight: 500; }

/* ── 多节点交期 ───────────────────────────────────────────────── */
.r-sla-flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 10px 2px 4px; }
.r-sla-node { flex: 1 0 96px; min-width: 96px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 9px; background: #fff; position: relative; }
.r-sla-node .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; background: #eef2f7; color: #64748b; margin-bottom: 6px; }
.r-sla-node .nm { font-size: .78rem; font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sla-node .tm { font-size: .7rem; color: #94a3b8; font-variant-numeric: tabular-nums; margin-top: 2px; }
.r-sla-node .st { font-size: .7rem; margin-top: 3px; color: #64748b; }
.r-sla-node.ok { border-color: #bbf7d0; background: #f0fdf4; }
.r-sla-node.ok .dot { background: #22c55e; color: #fff; }
.r-sla-node.ok .st { color: #15803d; }
.r-sla-node.warn { border-color: #fde68a; background: #fffbeb; }
.r-sla-node.warn .dot { background: #f59e0b; color: #fff; }
.r-sla-node.warn .st { color: #b45309; font-weight: 600; }
.r-sla-node.bad { border-color: #fecaca; background: #fef2f2; }
.r-sla-node.bad .dot { background: #dc2626; color: #fff; }
.r-sla-node.bad .st { color: #b91c1c; font-weight: 700; }
.r-sla-node.run { border-color: #bfdbfe; background: #eff6ff; }
.r-sla-node.run .dot { background: #2563eb; color: #fff; }
.r-sla-node.run .st { color: #1d4ed8; font-weight: 600; }
.r-sla-node.skip { opacity: .55; }
.r-sla-link { flex: 0 0 10px; align-self: center; height: 2px; background: #e2e8f0; }
.r-sla-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: #64748b; padding: 4px 2px 0; }
.r-sla-sum b { color: #1e293b; }

/* 交期作战室 */
.r-sla-col { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.r-sla-col .col-head { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-weight: 700; padding: 8px 10px; border-radius: 9px; margin-bottom: 8px; }
.r-sla-col .col-head.red { background: #fef2f2; color: #b91c1c; }
.r-sla-col .col-head.yellow { background: #fffbeb; color: #b45309; }
.r-sla-col .col-head.green { background: #f0fdf4; color: #15803d; }
.r-sla-col .col-head.gray { background: #f8fafc; color: #64748b; }
.r-sla-card { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; background: #fff; cursor: pointer; transition: .15s; }
.r-sla-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-sm, 0 2px 8px rgba(15,23,42,.06)); }
.r-sla-card .no { font-size: .8rem; font-weight: 700; color: #1e293b; }
.r-sla-card .meta { font-size: .72rem; color: #94a3b8; margin-top: 2px; }
.r-sla-card .bar { height: 5px; border-radius: 999px; background: #eef2f7; margin-top: 7px; overflow: hidden; }
.r-sla-card .bar > i { display: block; height: 100%; }
@media (max-width: 1100px) { .r-sla-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .r-sla-col { grid-template-columns: 1fr; } .r-sla-flow { flex-wrap: wrap; } .r-sla-link { display: none; } }
