/* 巡检项目仅补充业务页面样式，主体风格直接使用 Yinhai-USB/custom3.css。 */
.role-badge {
  padding: 0.65rem 1.1rem;
  font-size: 1.15rem;
  border-radius: 0.7rem;
}

/* Warehouse dashboard V2 */
.warehouse-dashboard { max-width: 1600px; margin: 0 auto; color: #172b4d; }
.dashboard-header,.section-heading { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.dashboard-header { margin: .25rem 0 1.25rem; }
.dashboard-header h1 { margin:0; font-size:1.7rem; font-weight:700; letter-spacing:-.02em; }
.dashboard-header p,.section-heading span { margin:.35rem 0 0; color:#7b8794; font-size:.83rem; }
.refresh-controls { display:flex; align-items:center; gap:.8rem; color:#7b8794; font-size:.8rem; }
.refresh-state { color:#1f9d63; font-weight:600; }.refresh-state i { display:inline-block;width:7px;height:7px;background:#27ae73;border-radius:50%;margin-right:.4rem; }
.dashboard-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1rem; margin-bottom:1rem; }
.kpi-card,.dashboard-card,.dashboard-section { background:#fff; border:1px solid #e9eef5; border-radius:14px; box-shadow:0 5px 18px rgba(30,60,90,.045); }
.kpi-card { min-height:142px; padding:1.2rem 1.25rem; position:relative; text-decoration:none; transition:.2s ease; border-top:3px solid var(--accent); }
.kpi-card:hover,.warehouse-card:hover,.shortcut-grid a:hover { transform:translateY(-2px); box-shadow:0 10px 24px rgba(30,60,90,.1); }
.kpi-label { display:block; color:#607086; font-size:.88rem; font-weight:600; }.kpi-card strong { display:block; font-size:2rem; line-height:1.25; margin:.45rem 0 .35rem; color:var(--accent); }.kpi-meta { color:#7b8794; font-size:.8rem; }.kpi-meta em { font-style:normal; color:#a0a9b5; }.kpi-arrow { position:absolute;right:1.1rem;top:1.2rem;color:#b4c0ce;font-size:.75rem; }
.green {--accent:#18a66a}.blue {--accent:#2474d1}.red {--accent:#e05252}.purple {--accent:#805ad5}
.dashboard-grid-main { display:grid; grid-template-columns:1.2fr 1fr .9fr; gap:1rem; margin-bottom:1rem; }.dashboard-card,.dashboard-section { padding:1.2rem 1.25rem; }.section-heading h2 { margin:0; font-size:1.05rem; font-weight:700; }.section-heading a { color:#3977c9; font-size:.8rem; text-decoration:none; white-space:nowrap; }
.dashboard-list { margin-top:1rem; }.patrol-row,.exception-row { display:flex; align-items:center; gap:.7rem; padding:.8rem 0; border-bottom:1px solid #f0f3f7; text-decoration:none; color:inherit; }.patrol-row:last-child,.exception-row:last-child {border-bottom:0}.avatar { width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#e7f0fd;color:#3977c9;font-weight:700;font-size:.85rem; }.row-main { min-width:0; flex:1; }.row-main strong,.row-main small { display:block; overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }.row-main strong { font-size:.84rem; }.row-main small { color:#8793a4;font-size:.74rem;margin-top:.2rem; }.row-side { display:flex; flex-direction:column; align-items:flex-end; gap:.22rem; }.row-side b {font-size:.75rem}.row-side small { color:#8793a4;font-size:.72rem; }.progress { display:block;width:100%;height:4px;border-radius:4px;background:#edf2f7;margin-top:.45rem; }.progress i {display:block;height:100%;background:#4d8fe4;border-radius:inherit}.tag {font-style:normal;font-size:.68rem;padding:.22rem .48rem;border-radius:1rem;font-weight:600}.tag.blue {background:#e8f1fe;color:#3977c9}.tag.yellow {background:#fff4d8;color:#a57300}.exception-icon { width:29px;height:29px;display:grid;place-items:center;border-radius:8px;background:#fff0ef;color:#df625c;font-size:.8rem; }.exception-row .row-main { padding-right:.25rem; }
.attendance-summary { display:grid;grid-template-columns:repeat(4,1fr); gap:.3rem; padding:1.3rem 0 1rem; border-bottom:1px solid #f0f3f7; }.attendance-summary div {text-align:center}.attendance-summary strong {display:block;font-size:1.35rem;color:#1f3a5b}.attendance-summary span {display:block;color:#8793a4;font-size:.72rem;margin-top:.25rem}.attendance-summary .good{color:#18a66a}.attendance-summary .warn{color:#d99100}.attendance-summary .danger{color:#e05252}.late-people h3 {font-size:.8rem;margin:1rem 0 .55rem}.late-person {display:flex;justify-content:space-between;font-size:.78rem;padding:.4rem 0}.late-person small{color:#e09225}.attendance-status {font-size:.8rem;padding-top:1.1rem}.attendance-status i {margin-right:.35rem}.attendance-status.normal {color:#1f9d63}.attendance-status.pending {color:#3977c9}.attendance-status.warn {color:#d99100}.attendance-status.danger {color:#e05252}.attendance-status.muted {color:#8793a4}.on-time { color:#1f9d63;font-size:.8rem;padding-top:1.1rem; }.on-time i {margin-right:.35rem}
.dashboard-section { margin-bottom:1rem; }.dashboard-section>.section-heading {margin-bottom:1rem}.warehouse-cards {display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:.85rem}.warehouse-card {padding:1rem;text-decoration:none;color:inherit;border:1px solid #edf1f6;border-radius:11px;transition:.2s ease}.warehouse-card>div {display:flex;align-items:center;gap:.45rem}.warehouse-card strong{font-size:.9rem;flex:1}.warehouse-card>div>i{color:#aeb9c6;font-size:.72rem}.warehouse-dot {width:8px;height:8px;border-radius:50%;background:#2eb67d}.warehouse-dot.danger{background:#e05252}.warehouse-card dl{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin:1rem 0 .65rem}.warehouse-card dt{color:#8995a5;font-size:.7rem}.warehouse-card dt strong{display:block;color:#253b57;font-size:1.05rem;margin-top:.2rem}.warehouse-card dt strong.danger-text{color:#e05252}.warehouse-link{color:#3977c9;font-size:.72rem}.shortcut-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:.85rem}.shortcut-grid a{display:flex;align-items:center;justify-content:center;gap:.55rem;padding:.9rem;border:1px solid #edf1f6;border-radius:10px;color:#41566f;text-decoration:none;font-size:.82rem;transition:.2s ease}.shortcut-grid a i{color:#3977c9}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-height:150px;color:#a4afbc;font-size:.8rem}.empty-state i{font-size:1.35rem}.dashboard-error{position:fixed;top:35%;left:50%;transform:translate(-50%,-50%);z-index:3;background:#fff;border:1px solid #e9eef5;border-radius:14px;box-shadow:0 15px 45px rgba(30,60,90,.15);padding:2rem 3rem;display:flex;flex-direction:column;align-items:center;gap:.6rem;color:#7b8794}.dashboard-error i{font-size:2rem;color:#9eabb9}.dashboard-error strong{color:#253b57}.skeleton{min-height:142px!important;background:linear-gradient(90deg,#f2f5f8 25%,#e9eef4 37%,#f2f5f8 63%);background-size:400% 100%;animation:skeleton 1.4s ease infinite;border:0}.d-none{display:none!important}@keyframes skeleton{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (max-width:1200px){.dashboard-kpis{grid-template-columns:repeat(3,1fr)}.dashboard-grid-main{grid-template-columns:1fr 1fr}.attendance-card{grid-column:span 2}.warehouse-cards{grid-template-columns:repeat(4,1fr)}.shortcut-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:768px){.dashboard-header{align-items:flex-start;flex-direction:column}.refresh-controls{flex-wrap:wrap}.dashboard-kpis,.dashboard-grid-main{grid-template-columns:1fr}.attendance-card{grid-column:auto}.warehouse-cards{display:flex;overflow:auto}.warehouse-card{min-width:180px}.shortcut-grid{grid-template-columns:repeat(2,1fr)}}

.sidebar-menu-group {
  margin-bottom: 0.45rem;
}

.sidebar-group-toggle {
  width: 100%;
  border: 0;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}

.sidebar-group-toggle:hover,
.sidebar-group-toggle.is-open {
  background: rgba(255, 255, 255, 0.2);
}

.menu-arrow {
  font-size: 0.78rem;
  transition: transform 0.2s ease;
}

.sidebar-group-toggle[aria-expanded="true"] .menu-arrow {
  transform: rotate(90deg);
}

.sidebar-submenu {
  padding: 0.3rem 0 0.2rem 0.55rem;
}

.sidebar .sidebar-submenu a {
  margin: 0.08rem 0;
  border-radius: 0.45rem;
  font-size: 0.92rem;
  padding: 0.6rem 0.7rem;
}

.sidebar-nested-parent {
  display: flex;
  align-items: stretch;
}

.sidebar-nested-parent > a {
  min-width: 0;
}

.sidebar-child-toggle {
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: #fff;
  width: 2rem;
  margin: 0.08rem 0;
}

.sidebar-child-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-child-toggle[aria-expanded="true"] .menu-arrow {
  transform: rotate(90deg);
}

.sidebar-child-submenu {
  padding-left: 1.4rem;
}

.sidebar .sidebar-child-submenu a {
  font-size: 0.86rem;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

.menu-item-icon {
  width: 1.7rem;
  text-align: center;
  margin-right: 0.35rem;
}

.sidebar-logout {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.page-heading h2 {
  margin-bottom: 0.25rem;
}

.page-heading p {
  color: #6c757d;
  margin-bottom: 0;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  font-size: 0.8rem;
}

.status-badge.active {
  color: #237a45;
  background: #e3f4e9;
}

.status-badge.inactive {
  color: #a13d3d;
  background: #f9e4e4;
}

.status-badge.pending {
  color: #8a6400;
  background: #fff1c7;
}

.table tbody td,
.table tbody th,
.table tbody .fw-semibold {
  font-weight: 400 !important;
}

.user-actions-cell {
  min-width: 260px;
  white-space: normal;
}

.user-action-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.warehouse-status {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.warehouse-status.online {
  color: #237a45;
  background: #e3f4e9;
}

.warehouse-status.offline {
  color: #6c5a1f;
  background: #fff1c7;
}

.warehouse-status.disabled {
  color: #a13d3d;
  background: #f9e4e4;
}

.warehouse-status.running {
  color: #237a45;
  background: #e3f4e9;
}

.warehouse-status.closed {
  color: #6c5a1f;
  background: #fff1c7;
}

.warehouse-page .filter-card {
  background: #fff;
  border: 1px solid #e6e8eb;
  border-radius: 6px;
  padding: 1rem;
}

.warehouse-overview {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(560px, 1.15fr);
  gap: 1rem;
  align-items: start;
}

.warehouse-map-panel,
.warehouse-list-panel {
  min-width: 0;
}

.warehouse-map-toolbar,
.warehouse-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.warehouse-overview-map {
  width: 100%;
  min-height: 520px;
  height: calc(100vh - 260px);
  border: 1px solid #d8dde3;
  border-radius: 6px;
  overflow: hidden;
  background: #eef2f5;
}

.warehouse-picker-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 400px;
  max-height: 600px;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  overflow: hidden;
  background: #eef2f5;
}

.warehouse-table {
  background: #fff;
  border: 1px solid #e1e4e8;
}

.warehouse-table th {
  white-space: nowrap;
  background: #f7f8fa;
}

.warehouse-red-dot-marker span {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e11d2e;
  box-shadow: 0 0 0 2px rgba(225, 29, 46, 0.25), 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1200px) {
  .warehouse-overview {
    grid-template-columns: 1fr;
  }

  .warehouse-overview-map {
    height: 420px;
    min-height: 360px;
  }
}

@media (max-width: 768px) {
  .warehouse-map-toolbar,
  .warehouse-picker-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .warehouse-overview-map {
    height: 340px;
    min-height: 300px;
  }

  .warehouse-picker-map {
    min-height: 300px;
  }
}

.stat-card i {
  color: #5b4b8a;
  font-size: 1.6rem;
}

.stat-card span,
.stat-card strong,
.stat-card small {
  display: block;
}

.stat-card strong {
  margin: 0.5rem 0;
  font-size: 2rem;
}

.stat-card small {
  color: #6c757d;
}

.fuzzy-autocomplete-field {
  position: relative;
}

.warehouse-combobox {
  position: relative;
}

.warehouse-combobox .form-control {
  padding-left: 2.15rem;
  padding-right: 2.5rem;
}

.warehouse-combobox-search {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  z-index: 2;
  color: #6b7280;
  transform: translateY(-50%);
  pointer-events: none;
}

.warehouse-combobox-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  z-index: 3;
  width: 2.35rem;
  border: 0;
  border-radius: 0 0.3rem 0.3rem 0;
  background: transparent;
  color: #4b5563;
}

.warehouse-combobox-toggle:hover,
.warehouse-combobox-toggle:focus {
  background: #f3f4f6;
  color: #1f2937;
}

.fuzzy-autocomplete-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1080;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.fuzzy-autocomplete-option {
  display: block;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #1f2937;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.fuzzy-autocomplete-option:hover,
.fuzzy-autocomplete-option:focus {
  background: #eef4ff;
  outline: none;
}

.fuzzy-autocomplete-more,
.fuzzy-autocomplete-empty {
  padding: 0.45rem 0.6rem;
  color: #6b7280;
  font-size: 0.86rem;
  line-height: 1.35;
}

.patrol-point-filter-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(130px, 0.65fr) auto;
  gap: 0.9rem 1rem;
  align-items: end;
}

.patrol-point-filter-form .form-label {
  margin-bottom: 0.45rem;
}

.patrol-point-filter-form .form-control,
.patrol-point-filter-form .form-select {
  height: 36px;
  min-height: 36px;
}

.patrol-point-filter-form .filter-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 132px;
  white-space: nowrap;
}

.patrol-point-filter-form .filter-actions .btn {
  height: 36px;
  min-height: 36px;
  padding: 0 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.patrol-point-map,
.patrol-point-map-empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 520px;
  max-height: 76vh;
  border: 1px solid #d8dee8;
  background: #f8fafc;
}

.patrol-point-map-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.patrol-point-picker-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 400px;
  max-height: 600px;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  overflow: hidden;
  background: #eef2f5;
}

@media (max-width: 1100px) {
  .patrol-point-filter-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
  }
}

@media (max-width: 720px) {
  .patrol-point-filter-form {
    grid-template-columns: 1fr;
  }

  .patrol-point-filter-form .filter-actions {
    justify-content: flex-start;
  }

  .patrol-point-map,
  .patrol-point-map-empty {
    min-height: 360px;
  }
}

.route-detail-layout,
.route-editor-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(520px, 1.2fr);
  gap: 1rem;
  align-items: stretch;
}

.route-editor-left {
  display: grid;
  grid-template-rows: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 1rem;
  min-width: 0;
}

.route-panel,
.route-pool,
.route-selected,
.route-map-panel {
  min-width: 0;
}

.route-panel-title {
  margin-bottom: 0.6rem;
  color: #212529;
  font-weight: 600;
}

.route-title-hint {
  color: #6c757d;
  font-size: 0.86rem;
  font-weight: 400;
}

.route-point-list,
.route-point-pool,
.route-selected-list {
  min-height: 220px;
  max-height: 40vh;
  overflow: auto;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
}

.route-point-list {
  max-height: 70vh;
}

.route-list-item,
.route-pool-item,
.route-selected-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #eef1f5;
}

.route-list-item:last-child,
.route-pool-item:last-child,
.route-selected-item:last-child {
  border-bottom: 0;
}

.route-pool-item {
  justify-content: space-between;
}

.route-pool-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.6rem;
}

.route-selected-item {
  cursor: grab;
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.route-list-item {
  cursor: default;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.route-selected-item:active {
  cursor: grabbing;
}

.route-list-item:hover,
.route-list-item.is-hovered,
.route-selected-item:hover,
.route-selected-item.is-hovered {
  position: relative;
  z-index: 2;
  background: #eef6ff;
  box-shadow: inset 3px 0 0 #0d6efd;
}

.route-selected-item.is-dragging {
  opacity: 0.55;
  transform: scale(0.985);
  background: #e8f1ff;
}

.route-list-item small,
.route-pool-item small,
.route-selected-item small {
  display: block;
  color: #6c757d;
  line-height: 1.35;
}

.route-drop-placeholder {
  height: 64px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #eef1f5;
  background: #fff8df;
  box-shadow: inset 0 0 0 2px #f0ad00;
  color: #8a6400;
}

.route-drop-placeholder span {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border: 2px dashed #f0ad00;
  border-radius: 50%;
  background: rgba(240, 173, 0, 0.08);
}

.route-drop-placeholder strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.route-seq {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0d6efd;
  background: #e9f2ff;
  font-weight: 700;
}

.route-map {
  width: 100%;
  min-height: 620px;
  height: calc(100vh - 260px);
  border: 1px solid #d8dee8;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
}

.route-number-marker span {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #6c757d;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.32);
  font-size: 0.8rem;
  font-weight: 700;
}

.route-number-marker.selected span {
  background: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.22), 0 2px 10px rgba(15, 23, 42, 0.34);
}

.route-number-marker.highlighted span {
  width: 34px;
  height: 34px;
  background: #ff8a00;
  box-shadow: 0 0 0 5px rgba(255, 138, 0, 0.24), 0 4px 14px rgba(15, 23, 42, 0.38);
  transform: translate(-4px, -4px);
}

@media (max-width: 1200px) {
  .route-detail-layout,
  .route-editor-layout {
    grid-template-columns: 1fr;
  }

  .route-map {
    height: 460px;
    min-height: 380px;
  }
}
