:root {
  --bg: #f3f6f5;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --border: #d7dfdb;
  --text: #13201b;
  --muted: #60726a;
  --accent: #0e7c66;
  --accent-soft: #dff4ec;
  --pass: #11835f;
  --warn: #b87012;
  --block: #bf3d32;
  --neutral: #58706a;
  --shadow: 0 16px 40px rgba(20, 48, 39, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Aptos", "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 124, 102, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fbfa 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 28px 20px;
  border-right: 1px solid rgba(215, 223, 219, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(247, 251, 249, 0.96));
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #123c34, #0e7c66);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
}

.brand-subtitle,
.nav-label,
.page-copy,
.panel-note,
.meta-row,
.finding-meta,
.record-list span,
.detail-grid span {
  color: var(--muted);
}

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

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.96rem;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(14, 124, 102, 0.08);
  color: #0c5848;
}

.content {
  padding: 28px;
}

.page-header,
.panel-header,
.hero-grid,
.three-up,
.two-up,
.button-row,
.inline-form,
.verdict-line,
.meta-row,
.pill-row,
.identity-block {
  display: flex;
  gap: 14px;
}

.page-header,
.panel-header {
  justify-content: space-between;
  align-items: center;
}

.page-header {
  margin-bottom: 24px;
}

h1,
h2,
h3,
p,
ul,
pre {
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.05;
}

h2 {
  font-size: 1.45rem;
  line-height: 1.1;
  margin-top: 8px;
}

h3 {
  font-size: 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  margin-bottom: 20px;
}

.hero-card,
.stats-card,
.panel {
  background: var(--surface);
  border: 1px solid rgba(215, 223, 219, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.stats-card {
  padding: 24px;
}

.panel {
  padding: 20px;
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 247, 0.92)),
    repeating-linear-gradient(0deg, rgba(19, 32, 27, 0.025), rgba(19, 32, 27, 0.025) 1px, transparent 1px, transparent 22px);
}

.hero-score {
  font-size: 3rem;
  line-height: 1;
  font-weight: 700;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.meta-row,
.pill-row,
.button-row {
  flex-wrap: wrap;
}

.meta-row {
  margin: 14px 0 20px;
  font-size: 0.88rem;
}

.stats-card .stat-list {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.stats-card .stat-list div,
.detail-grid div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.button,
button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  font: inherit;
  cursor: pointer;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  background: var(--accent-soft);
  color: #0a5b4a;
}

.text-link {
  color: var(--accent);
}

.stack-form,
.stack-list,
.record-list,
.simple-list {
  display: grid;
  gap: 12px;
}

.stack-form label {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-row input {
  width: 16px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(215, 223, 219, 0.75);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.verdict-chip,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pass {
  background: rgba(17, 131, 95, 0.12);
  color: var(--pass);
}

.warn,
.medium {
  background: rgba(184, 112, 18, 0.12);
  color: var(--warn);
}

.block,
.critical,
.high {
  background: rgba(191, 61, 50, 0.12);
  color: var(--block);
}

.pending,
.neutral,
.info {
  background: rgba(88, 112, 106, 0.12);
  color: var(--neutral);
}

.finding-card {
  padding: 14px;
  border: 1px solid rgba(215, 223, 219, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.finding-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.record-list {
  list-style: none;
  padding: 0;
}

.record-list li,
.simple-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(215, 223, 219, 0.7);
}

.simple-list {
  margin: 0;
  padding-left: 18px;
}

.simple-list li:last-child,
.record-list li:last-child {
  border-bottom: 0;
}

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

.run-summary {
  margin-bottom: 16px;
}

.inline-alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.code-block {
  border-radius: 8px;
  background: #14211d;
  color: #edf5f2;
  overflow: auto;
}

.code-block pre {
  padding: 14px;
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 0.84rem;
  line-height: 1.5;
}

.mono {
  font-family: "SFMono-Regular", "Consolas", monospace;
}

.identity-block {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-right: 8px;
}

.identity-block span {
  color: var(--muted);
  font-size: 0.84rem;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-wrap {
  width: min(100%, 480px);
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border: 1px solid rgba(215, 223, 219, 0.86);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: grid;
  gap: 18px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(215, 223, 219, 0.7);
  }

  .hero-grid,
  .three-up,
  .two-up {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .content {
    padding: 18px;
  }

  .page-header,
  .panel-header,
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 1.6rem;
  }

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