.radar-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.radar-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.radar-tab {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #334155;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.radar-tab.active {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

.radar-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.radar-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #111827;
}

.radar-muted {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.radar-grid.two {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.radar-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.radar-field.full {
  grid-column: 1 / -1;
}

.radar-field label {
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.radar-field input,
.radar-field select,
.radar-field textarea {
  border: 1px solid #dbe2ea;
  background: #f8fafc;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  width: 100%;
}

.radar-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.radar-field input:focus,
.radar-field select:focus,
.radar-field textarea:focus {
  border-color: #4a6cf7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,108,247,0.12);
}

.radar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.radar-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: #1a1a2e;
  color: #fff;
}

.radar-btn.secondary {
  background: #e8edf4;
  color: #1f2937;
}

.radar-btn.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.radar-btn.warn {
  background: #fff3d6;
  color: #92400e;
}

.radar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.radar-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.radar-table-wrap {
  overflow-x: auto;
}

.radar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.radar-table th,
.radar-table td {
  border-bottom: 1px solid #eef2f6;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.radar-table th {
  color: #475569;
  background: #f8fafc;
  white-space: nowrap;
}

.radar-table td:last-child {
  min-width: 92px;
  white-space: nowrap;
}

.radar-table tr:hover td {
  background: #fbfdff;
}

.radar-title {
  font-weight: 800;
  color: #111827;
  line-height: 1.45;
  min-width: 220px;
}

.radar-link {
  color: #2563eb;
  text-decoration: none;
}

.radar-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  background: #eef2ff;
  color: #3730a3;
  white-space: nowrap;
}

.radar-pill.key {
  background: #fee2e2;
  color: #b91c1c;
}

.radar-pill.high {
  background: #fff7ed;
  color: #c2410c;
}

.radar-pill.normal {
  background: #e0f2fe;
  color: #075985;
}

.radar-pill.low {
  background: #f1f5f9;
  color: #475569;
}

.radar-score {
  font-size: 18px;
  font-weight: 900;
  color: #111827;
}

.radar-score small {
  color: #64748b;
  font-size: 11px;
  display: block;
  font-weight: 600;
}

.radar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.radar-kpi {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
}

button.radar-kpi {
  width: 100%;
  text-align: left;
  font: inherit;
}

.radar-kpi-link {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.radar-kpi-link:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.14);
  transform: translateY(-1px);
}

.radar-kpi-link:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.28);
  outline-offset: 2px;
}

.radar-kpi .label {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 4px;
}

.radar-kpi .value {
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

.radar-kpi .hint {
  margin-top: 2px;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
}

.radar-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 14px;
}

.radar-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.58);
}

.radar-modal {
  width: min(1120px, 100%);
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.34);
}

.radar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.radar-modal-title {
  font-size: 17px;
  font-weight: 900;
  color: #111827;
}

.radar-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.radar-modal-body {
  overflow: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.radar-modal-body .radar-detail {
  align-items: start;
}

.radar-modal-body .radar-detail > .radar-card:first-child > h3:first-child {
  display: none;
}

.radar-detail-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}

.radar-detail-list dt {
  color: #64748b;
  font-weight: 700;
}

.radar-detail-list dd {
  color: #111827;
  min-width: 0;
}

.radar-device {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  margin-top: 8px;
  background: #f8fafc;
}

.radar-device strong {
  color: #111827;
}

.radar-empty {
  color: #94a3b8;
  font-size: 13px;
  padding: 18px;
  text-align: center;
  border: 1px dashed #dbe2ea;
  border-radius: 10px;
  background: #fbfdff;
}

.radar-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  max-height: 280px;
  font-size: 12px;
  line-height: 1.5;
}

.radar-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .radar-grid,
  .radar-grid.two,
  .radar-filters,
  .radar-kpi-grid,
  .radar-detail,
  .radar-split {
    grid-template-columns: 1fr;
  }

  .radar-modal-overlay {
    align-items: stretch;
    padding: 8px;
  }

  .radar-modal {
    max-height: 92vh;
  }

  .radar-modal-body {
    padding: 10px;
  }
}
