/* ============ Tab 2: 飞手与无人机 ============ */
#tab-pilots {
  flex-direction: column; background: #0f172a; overflow-y: auto;
}
#tab-pilots::-webkit-scrollbar { width: 4px; }
#tab-pilots::-webkit-scrollbar-thumb { background: #374151; border-radius: 2px; }

.pilots-subnav {
  display: flex; gap: 0; background: #1a2332; border-bottom: 1px solid #1f2937;
  padding: 0 20px; flex-shrink: 0;
}
.pilots-subnav .subtab {
  padding: 14px 24px; cursor: pointer; font-size:calc(14px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); color: #9ca3af;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.pilots-subnav .subtab:hover { color: #e5e7eb; }
.pilots-subnav .subtab.active {
  color: #f3f4f6; border-bottom-color: #dc2626; font-weight: 600;
}

.pilots-content { flex: 1; overflow-y: auto; padding: 20px; }
.pilots-section { display: none; }
.pilots-section.active { display: block; }

.drone-model-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.drone-model-toolbar input,.drone-model-toolbar select {
  min-height:38px; padding:8px 11px; border:1px solid #374151; border-radius:6px;
  background:#111827; color:#e5e7eb; outline:none;
}
.drone-model-toolbar input { min-width:240px; flex:1 1 280px; }
.drone-model-toolbar select { min-width:150px; }
.drone-model-toolbar input:focus,.drone-model-toolbar select:focus { border-color:#dc2626; }
.drone-model-toolbar .drone-model-add { margin-left:auto; }
.drone-model-table-wrap { overflow:auto; border:1px solid #1f2937; }
#drone-model-table { min-width:1460px; table-layout:fixed; border:0; border-radius:0; }
#drone-model-table th:nth-child(1) { width:82px; }
#drone-model-table th:nth-child(2) { width:115px; }
#drone-model-table th:nth-child(3) { width:180px; }
#drone-model-table th:nth-child(4) { width:100px; }
#drone-model-table th:nth-child(5) { width:100px; }
#drone-model-table th:nth-child(6) { width:112px; }
#drone-model-table th:nth-child(7) { width:90px; }
#drone-model-table th:nth-child(8) { width:112px; }
#drone-model-table th:nth-child(9) { width:112px; }
#drone-model-table th:nth-child(10) { width:72px; }
#drone-model-table th:nth-child(11) { width:150px; }
#drone-model-table th:nth-child(12) { width:150px; }
.drone-model-thumb { width:52px; height:40px; display:block; object-fit:contain; border:1px solid #334155; border-radius:5px; background:#f8fafc; }
.drone-model-thumb-empty { width:52px; height:40px; display:grid; place-items:center; border:1px dashed #475569; border-radius:5px; color:#64748b; font-size:10px; }
.drone-model-actions { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.drone-model-form-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.drone-model-form-grid .form-group.full { grid-column:1/-1; }
.drone-model-editor-card { width:min(980px,calc(100vw - 32px)); }
.drone-model-image-row { display:grid; grid-template-columns:110px minmax(0,1fr); gap:14px; align-items:center; }
.drone-model-image-preview { width:110px; height:82px; display:grid; place-items:center; overflow:hidden; border:1px dashed #475569; border-radius:6px; background:#0b1220; color:#64748b; font-size:11px; }
.drone-model-image-preview img { width:100%; height:100%; object-fit:contain; background:#fff; }
.drone-model-upload-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.drone-model-upload-state { color:#94a3b8; font-size:12px; }
.drone-model-toggle { min-height:40px; display:flex; align-items:center; gap:10px; color:#d1d5db; }
.drone-model-toggle input { width:18px; height:18px; accent-color:#dc2626; }
@media(max-width:900px){.drone-model-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.pilots-subnav{overflow-x:auto;padding:0 8px}.pilots-subnav .subtab{padding:13px 14px;white-space:nowrap}.drone-model-form-grid{grid-template-columns:1fr}.drone-model-form-grid .form-group.full{grid-column:auto}.drone-model-image-row{grid-template-columns:1fr}.drone-model-toolbar .drone-model-add{margin-left:0}}

/* 表单样式 */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: #111827; border: 1px solid #1f2937; border-radius: 10px;
  padding: 24px; margin-bottom: 20px;
}
.form-grid.single-col { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size:calc(12px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px; background: #1e293b; border: 1px solid #374151;
  border-radius: 6px; color: #e5e7eb; font-size:calc(13px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #dc2626; }
.form-group textarea { resize: vertical; min-height: 80px; }

.btn {
  padding: 10px 22px; border: none; border-radius: 6px; font-size:calc(13px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: #dc2626; color: #fff; }
.btn-primary:hover { background: #b91c1c; }
.btn-secondary { background: #374151; color: #e5e7eb; }
.btn-secondary:hover { background: #4b5563; }
.btn-danger { background: transparent; border: 1px solid #dc2626; color: #dc2626; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 14px; font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }

.btn-row { display: flex; gap: 10px; margin-top: 16px; }

/* 表格样式 */
.data-table {
  width: 100%; border-collapse: collapse; font-size:calc(13px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px));
  background: #111827; border-radius: 10px; overflow: hidden;
  border: 1px solid #1f2937;
}
.data-table th {
  text-align: left; padding: 12px 16px; background: #1a2332;
  color: #9ca3af; font-weight: 600; font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); text-transform: uppercase;
  letter-spacing: 0.5px; border-bottom: 1px solid #1f2937;
}
.data-table td {
  padding: 12px 16px; border-bottom: 1px solid #1f2937; color: #e5e7eb;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #1e293b; }
.data-table tr.clickable-row { cursor: pointer; }
.data-table tr.clickable-row:focus-visible td { outline: 2px solid #38bdf8; outline-offset: -2px; }
/* 飞手列表使用固定列布局，翻页时不会被长登记人名称撑动。 */
#pilot-table-container { overflow-x: auto; }
#pilot-table { table-layout: fixed; min-width: 1180px; }
#pilot-table th, #pilot-table td { box-sizing: border-box; vertical-align: middle; }
#pilot-table th:nth-child(1), #pilot-table td:nth-child(1) { width: 24%; }
#pilot-table th:nth-child(2), #pilot-table td:nth-child(2) { width: 14%; }
#pilot-table th:nth-child(3), #pilot-table td:nth-child(3) { width: 14%; }
#pilot-table th:nth-child(4), #pilot-table td:nth-child(4) { width: 10%; }
#pilot-table th:nth-child(5), #pilot-table td:nth-child(5) { width: 11%; }
#pilot-table th:nth-child(6), #pilot-table td:nth-child(6) { width: 11%; }
#pilot-table th:nth-child(7), #pilot-table td:nth-child(7) { width: 16%; }
#pilot-table td:nth-child(1) {
  white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.5;
}
#pilot-table td:nth-child(2), #pilot-table td:nth-child(3),
#pilot-table td:nth-child(4), #pilot-table td:nth-child(5),
#pilot-table td:nth-child(6), #pilot-table td:nth-child(7) { white-space: nowrap; }
.pilot-auth-status {
  display:inline-flex; align-items:center; min-height:26px; padding:0 9px;
  border:1px solid #475569; border-radius:4px; color:#cbd5e1; background:#111827;
  font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px));
}
.pilot-auth-status.verified { border-color:#24835b; color:#86efac; background:#10291f; }
.pilot-auth-status.identity { border-color:#287ca7; color:#7dd3fc; background:#102635; }
.pilot-risk-score-wrap { display:inline-flex; align-items:baseline; gap:3px; color:#f8fafc; }
.pilot-risk-score-wrap strong { font-size:calc(16px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
.pilot-risk-score-wrap small { color:#94a3b8; font-size:calc(10px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
#pilot-detail-modal .detail-card { width:min(1320px,96vw); }
.pilot-risk-overview {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin:16px 0 8px;
  border-top:1px solid #334155; border-bottom:1px solid #334155; background:#0b1220;
}
.pilot-risk-overview-item { min-width:0; padding:12px 16px; border-right:1px solid #273449; }
.pilot-risk-overview-item:last-child { border-right:0; }
.pilot-risk-overview-item span { display:block; margin-bottom:5px; color:#94a3b8; font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
.pilot-risk-overview-item strong { display:flex; align-items:center; min-height:24px; gap:7px; color:#f8fafc; font-size:calc(18px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
.pilot-risk-reasons { min-height:22px; margin-bottom:14px; color:#fbbf24; font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); line-height:1.55; }
.pilot-risk-ranking { max-height:380px; overflow:auto; }
.pilot-risk-ranking .data-table { min-width:1040px; table-layout:fixed; }
.pilot-risk-ranking .data-table th:nth-child(1) { width:6%; }
.pilot-risk-ranking .data-table th:nth-child(2) { width:24%; }
.pilot-risk-ranking .data-table th:nth-child(3) { width:15%; }
.pilot-risk-ranking .data-table th:nth-child(4) { width:12%; }
.pilot-risk-ranking .data-table th:nth-child(5) { width:11%; }
.pilot-risk-ranking .data-table th:nth-child(6) { width:11%; }
.pilot-risk-ranking .data-table th:nth-child(7) { width:14%; }
.pilot-risk-ranking .data-table th:nth-child(8) { width:7%; }
.pilot-risk-rank { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; background:#1e293b; color:#cbd5e1; font-weight:800; }
.pilot-risk-rank.top { background:#7f1d1d; color:#fecaca; }
.pilot-risk-drone-name { display:grid; gap:4px; }
.pilot-risk-drone-name strong { color:#bfdbfe; font-family:Consolas,monospace; overflow-wrap:anywhere; }
.pilot-risk-drone-name span { color:#94a3b8; font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
.drone-risk-violations-modal { z-index:11500; }
#drone-risk-violations-modal .drone-risk-violations-card {
  width:min(1440px,calc(100vw - 32px)); max-width:calc(100vw - 32px);
  max-height:94vh; overflow:auto;
}
.drone-risk-violation-wrap { overflow:auto; max-height:58vh; border:1px solid #273449; }
#drone-risk-violation-table { min-width:1240px; border:0; border-radius:0; }
#drone-risk-violation-table th:nth-child(1) { width:13%; }
#drone-risk-violation-table th:nth-child(2) { width:21%; }
#drone-risk-violation-table th:nth-child(3) { width:12%; }
#drone-risk-violation-table th:nth-child(4) { width:20%; }
#drone-risk-violation-table th:nth-child(5) { width:13%; }
#drone-risk-violation-table th:nth-child(6) { width:11%; }
#drone-risk-violation-table th:nth-child(7) { width:10%; }
.risk-points-cell { display:grid; gap:3px; }
.risk-points-cell strong { color:#fbbf24; font-size:calc(15px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
.risk-points-cell small { color:#64748b; font-size:calc(10px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); white-space:normal; }
.risk-location-cell { min-width:250px; white-space:normal !important; color:#dbeafe; line-height:1.5; }
.risk-observed-cell { white-space:normal !important; color:#cbd5e1; line-height:1.5; }
.risk-violation-type { display:grid; gap:4px; }
.risk-violation-type strong { color:#f8fafc; }
.risk-violation-type span { color:#94a3b8; font-size:calc(10px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); }
@media (max-width:820px) {
  .pilot-risk-overview { grid-template-columns:1fr 1fr; }
  .pilot-risk-overview-item:nth-child(2) { border-right:0; }
  .pilot-risk-overview-item:nth-child(-n+2) { border-bottom:1px solid #273449; }
}

.status-badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size:calc(11px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); font-weight: 600;
}
.status-ok { background: #064e3b; color: #34d399; }
.status-warn { background: #78350f; color: #fbbf24; }
.status-danger { background: #7f1d1d; color: #fca5a5; }

.section-title {
  font-size:calc(16px + var(--utm-text-delta, 0px) + var(--utm-area-text-delta, 0px)); font-weight: 700; color: #f3f4f6; margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid #1f2937;
}


