:root {
  --bg: #060d18;
  --bg-2: #091224;
  --bg-3: #0d1830;
  --panel: rgba(10, 19, 35, 0.92);
  --panel-2: rgba(14, 25, 44, 0.94);
  --panel-3: rgba(18, 31, 54, 0.98);
  --border: rgba(128, 170, 255, 0.16);
  --border-strong: rgba(255, 190, 70, 0.22);
  --text: #eef4ff;
  --muted: #93a7c7;
  --gold: #ffb347;
  --cyan: #66a7ff;
  --mint: #54d7a7;
  --pink: #ff7eb6;
  --critical: #ff5f6d;
  --high: #ffb347;
  --medium: #ffd84d;
  --low: #42d69b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --ring-glow-a: rgba(255, 179, 71, 0.34);
  --ring-glow-b: rgba(102, 167, 255, 0.28);
  --ring-glow-c: rgba(84, 215, 167, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(102, 167, 255, 0.18), transparent 22%),
    radial-gradient(circle at 90% 5%, rgba(255, 179, 71, 0.14), transparent 26%),
    radial-gradient(circle at 80% 90%, rgba(84, 215, 167, 0.12), transparent 20%),
    linear-gradient(160deg, #040914 0%, #060d18 35%, #0a1325 100%);
}

.shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 24px 20px;
  background: linear-gradient(180deg, rgba(4, 8, 16, 0.96), rgba(8, 14, 26, 0.98));
  border-right: 1px solid var(--border);
}

.sidebar-brand,
.login-hero,
.panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(11, 19, 34, 0.94), rgba(9, 17, 31, 0.94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.sidebar-brand::before,
.login-hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 26%, transparent 72%, rgba(102, 167, 255, 0.08)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 22%);
  opacity: 0.8;
}

.sidebar-brand {
  padding: 18px;
}

.sidebar-logo,
.topbar-logo,
.login-logo {
  display: block;
  width: 100%;
  height: auto;
}

.sidebar-brand p,
.topbar-brand p,
.panel p,
.login-copy p,
.radial-copy p,
.table-subtext {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 10px;
}

.nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  transition: 180ms ease;
}

.nav a small {
  color: var(--muted);
}

.nav a.active,
.nav a:hover {
  transform: translateX(3px);
  border-color: var(--border-strong);
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.14), rgba(102, 167, 255, 0.08));
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.label,
.eyebrow,
.panel-kicker {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.main {
  padding: 24px 26px 38px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-logo {
  width: 280px;
  max-width: 34vw;
}

.topbar-brand h1,
.hero-copy h2,
.page-heading h2 {
  margin: 0;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.ghost-button,
.primary-button,
input,
select,
textarea {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

input,
select,
textarea {
  width: 100%;
}

.ghost-button,
.primary-button {
  cursor: pointer;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.03);
}

.primary-button {
  background: linear-gradient(135deg, #ffd15c, #ff9f43);
  color: #1f1100;
  font-weight: 700;
  border-color: rgba(255, 185, 88, 0.5);
}

.content,
.score-grid,
.radial-grid,
.analytics-grid,
.overview-grid,
.details-layout,
.case-layout,
.login-layout {
  display: grid;
  gap: 20px;
}

.hero-surface {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(18, 31, 54, 0.96), rgba(10, 18, 33, 0.92)),
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 30%);
}

.hero-copy p {
  max-width: 760px;
}

.hero-score {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.score-card,
.radial-card,
.chart-panel,
.table-panel,
.signal-panel,
.detail-card,
.timeline-card,
.create-case-panel,
.page-heading,
.login-form {
  padding: 20px;
}

.score-card,
.radial-card,
.chart-panel,
.table-panel,
.signal-panel {
  background:
    linear-gradient(180deg, rgba(15, 26, 46, 0.96), rgba(9, 17, 31, 0.96)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.04), transparent 30%);
}

.score-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 2rem;
}

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

.radial-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  border-color: rgba(136, 181, 255, 0.22);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.radial-visual {
  position: relative;
  width: 140px;
  height: 140px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), transparent 28%),
    radial-gradient(circle at 72% 68%, rgba(255, 179, 71, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 30px rgba(102, 167, 255, 0.12),
    inset 0 0 24px rgba(255, 255, 255, 0.04);
}

.radial-visual::before,
.radial-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.radial-visual::before {
  inset: -10px;
  background: radial-gradient(circle, var(--ring-glow-a) 0%, transparent 62%);
  filter: blur(14px);
  opacity: 0.54;
}

.radial-visual::after {
  inset: -18px;
  background:
    radial-gradient(circle at 28% 28%, var(--ring-glow-b) 0%, transparent 44%),
    radial-gradient(circle at 72% 72%, var(--ring-glow-c) 0%, transparent 46%);
  filter: blur(20px);
  opacity: 0.46;
}

.radial-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 255, 0.05))
    drop-shadow(0 0 16px rgba(255, 179, 71, 0.18))
    drop-shadow(0 0 20px rgba(102, 167, 255, 0.16));
}

.radial-track,
.radial-progress {
  fill: none;
  stroke-width: 10;
}

.radial-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.radial-progress {
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.12));
}

.radial-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.radial-center strong {
  font-size: 1.9rem;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.radial-center span {
  color: rgba(238, 244, 255, 0.72);
}

.radial-copy .label {
  color: rgba(255, 255, 255, 0.84);
}

.radial-copy p {
  margin-bottom: 0;
}

.analytics-grid {
  grid-template-columns: 1.3fr 0.9fr;
}

.trend-panel {
  grid-column: span 2;
}

.chart-panel {
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chart-svg {
  width: 100%;
  height: 220px;
}

.chart-axis {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  color: var(--muted);
  font-size: 0.8rem;
}

.chart-stack,
.signal-list,
.stacked-sections,
.comment-thread,
.stack-form {
  display: grid;
  gap: 12px;
}

.stacked-sections section {
  display: grid;
  gap: 12px;
}

.panel-header,
.case-card-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.panel-header h3,
.signal-item strong,
.case-card h3,
.fact-box strong {
  margin: 0;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bar-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.98), rgba(255, 235, 171, 0.88));
}

.bar-fill.cool {
  background: linear-gradient(90deg, rgba(102, 167, 255, 0.98), rgba(146, 255, 239, 0.88));
}

.severity-fill.severity-critical {
  background: linear-gradient(90deg, rgba(255, 95, 109, 0.98), rgba(255, 153, 128, 0.88));
}

.severity-fill.severity-high {
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.98), rgba(255, 221, 133, 0.88));
}

.severity-fill.severity-medium {
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.98), rgba(255, 240, 166, 0.88));
}

.severity-fill.severity-low {
  background: linear-gradient(90deg, rgba(66, 214, 155, 0.98), rgba(150, 255, 212, 0.88));
}

.overview-grid,
.details-layout,
.case-layout,
.login-layout {
  grid-template-columns: 1.2fr 0.8fr;
}

.table-panel {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-subtext {
  margin-top: 6px;
  font-size: 0.84rem;
}

.severity-pill,
.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.status-pill {
  color: var(--text);
}

.severity-critical {
  color: var(--critical);
}

.severity-high {
  color: var(--high);
}

.severity-medium {
  color: var(--medium);
}

.severity-low {
  color: var(--low);
}

.severity-pill.severity-critical {
  background: rgba(255, 95, 109, 0.14);
}

.severity-pill.severity-high {
  background: rgba(255, 179, 71, 0.14);
}

.severity-pill.severity-medium {
  background: rgba(255, 216, 77, 0.12);
}

.severity-pill.severity-low {
  background: rgba(66, 214, 155, 0.12);
}

.heading-badges,
.chip-row,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.advanced-filters > * {
  flex: 1;
  min-width: 180px;
}

.signal-item,
.timeline-item,
.comment-bubble,
.fact-box,
.case-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.signal-item,
.timeline-item,
.comment-bubble,
.fact-box {
  padding: 14px;
}

.case-card {
  padding: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.comment-thread {
  max-height: 420px;
  overflow: auto;
}

.stack-form textarea {
  min-height: 140px;
}

.inline-link {
  color: #ffd88d;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

.login-panel {
  margin-bottom: 18px;
}

.login-hero,
.login-form {
  padding: 24px;
}

.login-copy h2 {
  font-size: 2rem;
  margin: 0 0 10px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  color: var(--muted);
}

.empty-state.compact {
  min-height: auto;
  padding: 18px;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 14px;
  overflow: auto;
}

@media (max-width: 1180px) {
  .shell,
  .hero-surface,
  .score-grid,
  .radial-grid,
  .analytics-grid,
  .overview-grid,
  .details-layout,
  .case-layout,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .trend-panel {
    grid-column: span 1;
  }

  .sidebar {
    position: relative;
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-logo {
    width: 100%;
    max-width: 100%;
  }

  .detail-grid,
  .radial-card {
    grid-template-columns: 1fr;
  }
}
