*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: #f0f2f5;
  color: #2d3748;
}

/* ---- Header ---- */
.app-header {
  background: #1a3c5e;
  color: #fff;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.app-header h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.app-header h1 i { color: #4fc3f7; font-size: 1.25rem; }

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: background .15s;
  white-space: nowrap;
}
.btn-refresh:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.btn-refresh:disabled { opacity: .6; cursor: not-allowed; }
.btn-refresh.loading i { animation: spin .9s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Filter bar ---- */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.filter-bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-group label {
  font-size: 12px;
  font-weight: 500;
  color: #718096;
  white-space: nowrap;
}
.filter-group select {
  padding: 5px 28px 5px 10px;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  font-size: 13px;
  color: #2d3748;
  background: #fff;
  cursor: pointer;
  appearance: auto;
  min-width: 130px;
}
.filter-group select:focus { outline: 2px solid #007ac2; outline-offset: 1px; border-color: transparent; }

.btn-clear {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  background: #fff;
  color: #718096;
  cursor: pointer;
  font-size: 12px;
  transition: color .15s, border-color .15s;
}
.btn-clear:hover { color: #e53e3e; border-color: #fed7d7; }

/* ---- Status bar ---- */
.status-bar {
  padding: 5px 24px;
  font-size: 12px;
  color: #718096;
  background: #f0f2f5;
  border-bottom: 1px solid #e2e8f0;
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #a0aec0;
}
.status-dot.ok { background: #48bb78; }
.status-dot.loading { background: #f6ad55; animation: pulse 1.1s ease-in-out infinite; }
.status-dot.error { background: #fc8181; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.status-bar.is-error { color: #c53030; }

/* ---- Content ---- */
.content { padding: 20px 24px; }

/* ---- DataTable overrides ---- */
.dataTable-wrapper {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  overflow: hidden;
}
.dataTable-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  flex-wrap: wrap;
  gap: 8px;
}
.dataTable-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-top: 1px solid #edf2f7;
  background: #f9fafb;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #718096;
}
.dataTable-search input {
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 13px;
  color: #2d3748;
  width: 220px;
}
.dataTable-search input:focus { outline: 2px solid #007ac2; outline-offset: 1px; border-color: transparent; }
.dataTable-selector {
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 13px;
  color: #2d3748;
}

.dataTable-container { overflow-x: auto; }

table.dataTable-table {
  border-collapse: collapse;
  width: 100%;
}
table.dataTable-table th {
  background: #f7fafc;
  color: #4a5568;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 9px 12px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
}
table.dataTable-table th.asc .dataTable-sorter::after { content: ' ↑'; }
table.dataTable-table th.desc .dataTable-sorter::after { content: ' ↓'; }

table.dataTable-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
  max-width: 320px;
}
table.dataTable-table tr:last-child td { border-bottom: none; }
table.dataTable-table tr:hover td { background: #f7fafc; }
table.dataTable-table a { color: #007ac2; text-decoration: none; }
table.dataTable-table a:hover { text-decoration: underline; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-critical {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}
.badge-normal {
  background: #f7fafc;
  color: #718096;
  border: 1px solid #e2e8f0;
}

/* ---- Version chip ---- */
.version-chip {
  display: inline-block;
  padding: 1px 7px;
  background: #ebf8ff;
  color: #2b6cb0;
  border: 1px solid #bee3f8;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* ---- Platform icons ---- */
.plat-icon { font-size: 1.25rem; vertical-align: middle; }
.plat-cell { text-align: center; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #a0aec0;
}
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 10px; }
