:root {
  color: #e7edf4;
  background: #071014;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.dashboard-shell {
  min-height: 100vh;
  background: #071014;
  padding: 24px;
}

.security-panel {
  max-width: 1440px;
  margin: 0 auto;
}

.security-header {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #79d6ca;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2.25rem;
  line-height: 1.1;
}

h2 {
  font-size: 1.05rem;
}

h3 {
  font-size: 0.95rem;
}

.subhead,
.muted,
small {
  color: #a4b4c4;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.summary-card,
.chart-panel,
.event-card,
.filters,
.empty-state {
  border: 1px solid #263640;
  background: #0d171d;
}

.summary-card {
  border-radius: 8px;
  padding: 14px;
}

.summary-card span {
  display: block;
  color: #a4b4c4;
  font-size: 0.78rem;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(220px, 1.2fr);
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 18px;
}

.filters label {
  display: grid;
  gap: 6px;
  color: #bdc9d5;
  font-size: 0.82rem;
  font-weight: 700;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #30444f;
  border-radius: 6px;
  background: #071014;
  color: #e7edf4;
  padding: 8px 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 18px;
  align-items: start;
}

.chart-panel {
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 16px;
}

.severity-chart {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 86px 1fr 28px;
  gap: 10px;
  align-items: center;
}

.chart-date,
.chart-total {
  color: #a4b4c4;
  font-size: 0.78rem;
}

.chart-total {
  text-align: right;
}

.chart-bar {
  display: flex;
  min-height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #14242c;
}

.bar-segment {
  min-width: 0;
}

.event-list-panel {
  display: grid;
  gap: 12px;
}

.event-card {
  border-radius: 8px;
  overflow: hidden;
}

.event-main {
  width: 100%;
  display: grid;
  grid-template-columns: 98px minmax(150px, 1fr) minmax(140px, 0.9fr) minmax(220px, 1.4fr) 80px 112px;
  gap: 14px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 14px;
  text-align: left;
}

.event-main:hover,
.event-main:focus-visible {
  background: #122129;
  outline: none;
}

.event-main strong,
.event-main small {
  display: block;
}

.reason {
  color: #d2dde8;
}

.severity-badge,
.state-pill,
.asi-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.asi-tag {
  background: #132d35;
  color: #9be7df;
}

.severity-critical {
  background: #5b1520;
  color: #ffd2d8;
}

.severity-high {
  background: #642b11;
  color: #ffd8b2;
}

.severity-medium {
  background: #5a4710;
  color: #ffe8a6;
}

.severity-low {
  background: #173f2b;
  color: #bbf7d0;
}

.severity-info {
  background: #17345f;
  color: #bfdbfe;
}

.severity-border-critical {
  border-left: 4px solid #f43f5e;
}

.severity-border-high {
  border-left: 4px solid #f97316;
}

.severity-border-medium {
  border-left: 4px solid #eab308;
}

.severity-border-low {
  border-left: 4px solid #22c55e;
}

.severity-border-info {
  border-left: 4px solid #3b82f6;
}

.state-open {
  background: #2a1820;
  color: #ffb4c0;
}

.state-acknowledged {
  background: #17345f;
  color: #bfdbfe;
}

.state-dismissed {
  background: #25313a;
  color: #cbd5e1;
}

.state-investigating {
  background: #4a3b11;
  color: #fde68a;
}

.event-details {
  display: grid;
  gap: 14px;
  border-top: 1px solid #263640;
  padding: 14px;
  background: #091218;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-row button,
.empty-state button {
  min-height: 36px;
  border: 1px solid #355562;
  border-radius: 6px;
  background: #12333b;
  color: #d7fffb;
  padding: 6px 10px;
  font-weight: 700;
}

pre {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid #263640;
  border-radius: 8px;
  background: #050b0f;
  color: #c7f9f0;
  padding: 12px;
  font-size: 0.82rem;
}

.empty-state {
  border-radius: 8px;
  padding: 28px;
  text-align: center;
}

@media (max-width: 1060px) {
  .security-header,
  .content-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .chart-panel {
    position: static;
  }

  .event-main {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .dashboard-shell {
    padding: 14px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}
