/* =====================================================
   SUPERADMIN DEBUG – FELSÖKNING
   Route: #/superadmin/debug
   ===================================================== */

.debug-wrap {
  display: grid;
  gap: 16px;
  padding: 18px;
  color: #071b3a;
}

.debug-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.debug-top-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.debug-back-main {
  background: #ef4444;
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.debug-btn-dark {
  background: #111827;
  color: #fff;
  border: 2px solid #111827;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 900;
  cursor: pointer;
}

.debug-header-card,
.debug-box,
.debug-card,
.debug-right,
.debug-left {
  background: #dfefff;
  border: 1px solid #8ebcf2;
  border-radius: 18px;
}

.debug-header-card {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.debug-header-title {
  font-size: 38px;
  line-height: 1.05;
  font-weight: 950;
  color: #061a38;
}

.debug-header-sub {
  margin-top: 8px;
  color: #17324f;
  font-weight: 700;
}

.debug-header-badge {
  margin-left: auto;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 950;
  border: 2px solid currentColor;
  white-space: nowrap;
}

.debug-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.debug-card {
  padding: 16px;
  min-height: 82px;
}

.debug-card-label {
  font-weight: 950;
  color: #17324f;
}

.debug-card-value {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 950;
  color: #061a38;
}

.debug-box {
  padding: 16px;
}

.debug-box-title {
  font-size: 22px;
  font-weight: 950;
  color: #061a38;
  margin-bottom: 6px;
}

.debug-note {
  color: #23435f;
  font-weight: 700;
  margin-bottom: 14px;
}

.debug-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.debug-category {
  text-align: left;
  border-radius: 16px;
  border: 2px solid #8ebcf2;
  padding: 14px;
  min-height: 150px;
  cursor: pointer;
  font-weight: 800;
  color: #061a38;
  background: #eef7ff;
}

.debug-category:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
}

.debug-category.selected {
  outline: 4px solid #111827;
}

.debug-category-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.debug-category-title {
  font-size: 18px;
  font-weight: 950;
}

.debug-category-type {
  margin-top: 2px;
  font-size: 13px;
  opacity: .85;
}

.debug-category-message {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.25;
}

.debug-category-status {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 950;
}

.debug-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 950;
  border: 2px solid currentColor;
  white-space: nowrap;
}

.debug-ok {
  background: #a7f3d0 !important;
  color: #064e3b !important;
  border-color: #059669 !important;
}

.debug-info {
  background: #bfdbfe !important;
  color: #0b326d !important;
  border-color: #3b82f6 !important;
}

.debug-warn {
  background: #fde68a !important;
  color: #78350f !important;
  border-color: #f59e0b !important;
}

.debug-bad {
  background: #fecaca !important;
  color: #7f1d1d !important;
  border-color: #ef4444 !important;
}

.debug-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 12px;
}

.debug-filter {
  display: grid;
  gap: 6px;
}

.debug-filter label {
  font-weight: 950;
  color: #17324f;
}

.debug-filter input,
.debug-filter select {
  border: 1px solid #8ebcf2;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  background: #fff;
  color: #061a38;
}

.debug-filter-actions button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 950;
  cursor: pointer;
  background: #ffd400;
  color: #111827;
}

.debug-main-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
}

.debug-left,
.debug-right {
  padding: 16px;
}

.debug-list {
  display: grid;
  gap: 10px;
}

.debug-row {
  background: #eef7ff;
  border: 2px solid #8ebcf2;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}

.debug-row:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,.14);
}

.debug-row.selected {
  outline: 4px solid #111827;
}

.debug-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.debug-row-title {
  font-weight: 950;
  color: #061a38;
}

.debug-row-sev {
  font-weight: 950;
  white-space: nowrap;
}

.debug-row-message {
  margin-top: 8px;
  color: #17324f;
  font-weight: 700;
}

.debug-row-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #23435f;
  font-size: 13px;
  font-weight: 800;
}

.debug-row-meta span {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 4px 8px;
}

.debug-empty {
  padding: 18px;
  background: #eef7ff;
  border: 1px dashed #8ebcf2;
  border-radius: 14px;
  font-weight: 900;
}

.debug-detail-section {
  background: #eef7ff;
  border: 1px solid #8ebcf2;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.debug-detail-title {
  font-size: 24px;
  font-weight: 950;
  color: #061a38;
}

.debug-detail-sub {
  margin-top: 6px;
  color: #17324f;
  font-weight: 800;
}

.debug-detail-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.debug-detail-grid > div {
  background: #fff;
  border: 1px solid #b9d8fb;
  border-radius: 12px;
  padding: 12px;
  font-weight: 800;
}

.debug-detail-grid strong {
  color: #061a38;
  font-weight: 950;
}

.debug-recommendation {
  margin-top: 14px;
  background: #fff;
  border-left: 8px solid #111827;
  border-radius: 12px;
  padding: 12px;
  font-weight: 800;
}

.debug-open-route {
  margin-top: 14px;
  background: #111827;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 950;
  cursor: pointer;
}

.debug-detail-empty {
  background: #eef7ff;
  border: 1px dashed #8ebcf2;
  border-radius: 14px;
  padding: 18px;
  font-weight: 900;
}

.debug-msg {
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
}

.debug-msg-warning {
  background: #fde68a;
  border: 2px solid #f59e0b;
  color: #78350f;
}

.debug-msg-success {
  background: #a7f3d0;
  border: 2px solid #059669;
  color: #064e3b;
}

.debug-footer {
  background: #dfefff;
  border: 1px solid #8ebcf2;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 850;
  color: #17324f;
}

@media (max-width: 1200px) {
  .debug-summary-grid,
  .debug-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debug-main-layout {
    grid-template-columns: 1fr;
  }

  .debug-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .debug-summary-grid,
  .debug-category-grid,
  .debug-filters,
  .debug-detail-grid {
    grid-template-columns: 1fr;
  }

  .debug-header-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .debug-header-badge {
    margin-left: 0;
  }
}