:root {
  --bg: #0d0f12;
  --ink: #f4f3ee;
  --accent: #e85d47;
  --muted: #9aa3ad;
  --card: #1d232b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2028 0%, #0d0f12 55%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.uc-bar {
  background: #f2c94c;
  color: #111111;
  border-bottom: 2px solid #111111;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.uc-bar .container {
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}


.container {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  padding: 32px 0 12px;
}

.page-main {
  flex: 1 0 auto;
}

.site-header h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: 1px;
}

.subtitle {
  color: var(--muted);
  margin: 6px 0 0;
}

.site-nav {
  border-top: 1px solid #2a3038;
  border-bottom: 1px solid #2a3038;
  background: rgba(23, 27, 33, 0.8);
  backdrop-filter: blur(6px);
}

.site-nav .container {
  display: flex;
  gap: 18px;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-search input {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  background: #0f1318;
  border: 1px solid #2a3038;
  color: var(--ink);
  min-width: 180px;
}

.nav-search button {
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid #2a3038;
  color: var(--ink);
  font-size: 0.85rem;
}

.nav-logout {
  margin: 0;
}

.nav-logout button {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid #2a3038;
  color: var(--ink);
}

.nav-brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-right: 8px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-brand:visited {
  color: var(--ink);
}

.nav-logo {
  width: 26px;
  height: 26px;
  display: block;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}

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


a {
  color: #ffdd8a;
}

a:visited {
  color: #ffdd8a;
}

a:hover {
  color: #ffe8b3;
}

.search-panel {
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 24px;
}

.search-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input {
  padding: 10px 12px;
  border: 1px solid #2a3038;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #0f1318;
  color: var(--ink);
}

textarea {
  padding: 10px 12px;
  border: 1px solid #2a3038;
  border-radius: 8px;
  font-size: 0.95rem;
  resize: vertical;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  background: #0f1318;
  color: var(--ink);
}

.admin-form {
  display: grid;
  gap: 12px;
}

.nl-query {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
}

.nl-status {
  min-height: 18px;
}

.loading {
  display: none;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 12px 0;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #2a3038;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.diagram-wrap {
  background: #0f1318;
  border: 1px solid #2a3038;
  border-radius: 12px;
  padding: 12px;
  overflow-x: auto;
}

.chart-wrap {
  background: #0f1318;
  border: 1px solid #2a3038;
  border-radius: 12px;
  padding: 12px;
}

.diagram-wrap img {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.code-block {
  background: #0f1318;
  color: #e9eef3;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.8rem;
}

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

.raw-toggle summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  margin: 12px 0;
}

.raw-toggle[open] summary {
  color: #ffb199;
}

.json-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.json-table th,
.json-table td {
  text-align: left;
  border-bottom: 1px solid #2a3038;
  padding: 6px 8px;
  vertical-align: top;
}

.json-table th {
  width: 15%;
  color: var(--muted);
  font-weight: 600;
}

.json-table th:nth-child(2),
.json-table td:nth-child(2) {
  width: 35%;
}

.json-table th:nth-child(3),
.json-table td:nth-child(3) {
  width: 50%;
}

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

th,
td {
  text-align: left;
  border-bottom: 1px solid #2a3038;
  padding: 8px 6px;
  vertical-align: top;
}

th {
  font-weight: 700;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.clear-link {
  text-decoration: none;
  color: var(--muted);
  align-self: center;
  justify-self: start;
}

.meta {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.meta li {
  display: block;
  width: 100%;
}

.meta-value {
  color: #e5ebf2;
  font-weight: 600;
}

.results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.results .card + .card {
  margin-top: 18px;
}

.timeline-card .cve-timeline {
  background: #0f1318;
  border: 1px solid #2a3038;
  border-radius: 12px;
  padding: 8px;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink);
}

.legend-item::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #2d3440;
  border: 1px solid #343b44;
}

.legend-item.tl-cve::before {
  background: #b0221f;
  border-color: #d13430;
}

.legend-item.tl-kev::before {
  background: #1f5fbf;
  border-color: #2b73dc;
}

.legend-item.tl-mitre::before {
  background: #d07a1d;
  border-color: #e28b2a;
}

.legend-item.tl-github::before {
  background: #14181f;
  border-color: #2a2f37;
}

.legend-item.tl-epss::before {
  background: #2bb673;
  border-color: #3ad68a;
}

.vis-timeline {
  background: transparent;
  border: none;
  color: var(--ink);
}

.vis-item {
  border-color: #343b44;
  background: #2d3440;
  color: var(--ink);
  font-size: 0.78rem;
  z-index: 2;
}

.vis-item.tl-cve {
  background: #b0221f;
  border-color: #d13430;
}

.vis-item.tl-kev {
  background: #1f5fbf;
  border-color: #2b73dc;
}

.vis-item.tl-due {
  background: #1f5fbf;
  border-color: #2b73dc;
}

.vis-item.tl-mitre {
  background: #d07a1d;
  border-color: #e28b2a;
}

.vis-item.tl-github {
  background: #14181f;
  border-color: #2a2f37;
  color: #ffffff;
}

.vis-item.tl-epss {
  background: #2bb673;
  border-color: #3ad68a;
  color: #ffffff;
}

.vis-time-axis .vis-text {
  color: var(--muted);
}

.vis-custom-time {
  background-color: #d13430;
  width: 2px;
  z-index: 1;
}

.vis-custom-time .vis-custom-time-marker {
  border-color: #d13430;
}

.cve-card {
  display: grid;
  gap: 10px;
}

.cve-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cve-row-top {
  font-weight: 700;
}

.cve-title {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.cve-row-mid {
  gap: 8px;
  width: 100%;
}

.tag {
  background: #20252d;
  color: #d7dde3;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #343b44;
}

.tag-link {
  color: #ffdd8a;
  text-decoration: none;
}

.tag-link:visited {
  color: #ffdd8a;
}

.tag-link:hover {
  color: #ffe8b3;
}

.tag-danger {
  background: #4a1a1a;
  color: #ffb3aa;
}

.tag-warn {
  background: #4b3514;
  color: #ffd089;
}

.tag-due {
  margin-left: auto;
}

.product {
  color: #ffdd8a;
  font-weight: 700;
}

.tag-cvss-critical {
  background: #4b1515;
  color: #ff9b9b;
}

.tag-cvss-high {
  background: #4a2214;
  color: #ffb789;
}

.tag-cvss-medium {
  background: #4a3b14;
  color: #ffd36b;
}

.tag-cvss-low {
  background: #1c3f2a;
  color: #8bffb2;
}

.tag-cvss-unknown {
  background: #2a2f37;
  color: #c6ccd4;
}

.tag-epss {
  background: #4b3514;
  color: #ffd089;
  border-color: #6a4b1d;
}

.tooltip {
  border-bottom: 1px dashed #58606a;
  cursor: help;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.cve-id {
  color: var(--accent);
}

.cve-id:visited {
  color: var(--accent);
}

.cve-id {
  text-decoration: none;
}

.cve-id:hover {
  text-decoration: underline;
}

.source {
  color: var(--muted);
  font-size: 0.85rem;
}

.summary {
  margin: 0 0 8px;
}

.published {
  color: var(--muted);
  font-size: 0.8rem;
}

.empty-state {
  background: var(--card);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.warning-box {
  background: #4b1515;
  border: 1px solid #7a1f1f;
  color: #ffd0d0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin: 8px 0 14px;
}

.site-footer {
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: auto;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 32px;
}

.pagination button {
  padding: 8px 14px;
}
