:root {
  --bg: #0f172a;
  --panel: #0b1324;
  --text: #e8edf7;
  --muted: #9aa7c5;
  --accent: #7be0c3;
  --accent-strong: #47c4a1;
  --border: rgba(255, 255, 255, 0.07);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --max-width: 1100px;
  --bg-grad-1: radial-gradient(circle at 18% 15%, rgba(123, 224, 195, 0.12), transparent 26%);
  --bg-grad-2: radial-gradient(circle at 78% 8%, rgba(87, 125, 255, 0.16), transparent 32%);
  --bg-grad-3: linear-gradient(145deg, #0c1323, #111a30 48%, #18263c);
  --header-bg: rgba(10, 16, 32, 0.65);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-grad-1), var(--bg-grad-2), var(--bg-grad-3);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.hidden {
  display: none !important;
}

header {
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #4ca1ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0b1220;
  letter-spacing: 0.5px;
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
}

#nav-hamburger {
  display: none;
  border: 1px solid var(--border, #1e2d45);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text, #e2e8f0);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 18px;
}

.nav-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

#nav-error {
  display: none;
}

#nav-error:not(.hidden) {
  display: block;
}

.nav-links .pill {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

header .nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.user-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-dropdown button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.user-dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 10px;
  display: none;
  z-index: 10;
}

.user-dropdown-menu a,
.user-dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}

.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown.open .user-dropdown-menu {
  display: block;
}

.user-pill {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  color: #0b1220;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(123, 224, 195, 0.25);
  transition: transform 120ms ease;
  height: 48px;
}

.btn.loading {
  opacity: 0.7;
  cursor: wait;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-primary,
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1220;
  border: 1px solid var(--accent);
  box-shadow: 0 12px 30px rgba(123, 224, 195, 0.25);
}

.btn-ghost,
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.pdf-icon-btn {
  min-width: auto;
  padding: 3px 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  box-shadow: none;
}

.pdf-icon-btn:hover {
  color: var(--text);
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

.pdf-icon-btn:focus,
.pdf-icon-btn:active {
  background: transparent;
  border: none;
  box-shadow: none;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 20px;
}

.hero {
  text-align: center;
  padding-top: 70px;
  padding-bottom: 50px;
  max-width: 1260px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.2;
}

.hero p {
  color: var(--muted);
  max-width: 720px;
  margin: 16px auto 28px;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

#cta-logged-out.hero-actions {
  display: block;
  text-align: center;
}

#cta-logged-out.hero-actions > .btn {
  display: inline-flex;
  margin: 0 10px 12px;
}

.hero-showcase {
  margin-top: 28px;
  width: 100%;
  flex: 1 1 100%;
}

.hero-showcase-intro {
  margin: 0 0 14px;
  font-size: 17px;
}

.hero-showcase-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px;
  align-items: stretch;
}

.showcase-card {
  position: relative;
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  height: 100%;
  min-width: 0;
}

.showcase-card img {
  display: block;
  width: 100%;
  height: clamp(250px, 26vw, 500px);
  object-fit: cover;
  object-position: top center;
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  color: #ffffff;
  text-align: center;
  background: rgba(5, 10, 22, 0.72);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.showcase-overlay-title {
  display: none;
}

.showcase-overlay-cta {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.showcase-card:hover .showcase-overlay,
.showcase-card:focus-visible .showcase-overlay {
  opacity: 1;
}

.grid {
  display: grid;
  gap: 32px;
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
}

:root[data-theme="light"] {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --text: #0f1e35;
  --muted: #4f607e;
  --accent: #0b766e;
  --accent-strong: #0891b2;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  --bg-grad-1: radial-gradient(circle at 14% 11%, rgba(8, 145, 178, 0.08), transparent 30%);
  --bg-grad-2: radial-gradient(circle at 84% 5%, rgba(11, 118, 110, 0.08), transparent 32%);
  --bg-grad-3: linear-gradient(165deg, #f8fbff, #f2f6fc 52%, #edf3fa);
  --header-bg: rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .btn-secondary {
  background: #e9eff8;
  color: #0f1f38;
  border-color: rgba(15, 23, 42, 0.16);
}

:root[data-theme="light"] .btn {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

:root[data-theme="light"] .btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
}

:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .btn.primary,
:root[data-theme="light"] .btn:not(.btn-secondary):not(.btn-ghost) {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: rgba(29, 78, 216, 0.45);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

/* Keep navbar button styling stable in light mode */
:root[data-theme="light"] header .nav-actions .btn,
:root[data-theme="light"] header .nav-auth .btn {
  color: #0f1f38;
  background: #f3f6fb;
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: none;
}

:root[data-theme="light"] header .nav-actions .btn:hover,
:root[data-theme="light"] header .nav-auth .btn:hover {
  background: #e8eef8;
}

:root[data-theme="light"] header .nav-actions .btn:not(.btn-secondary),
:root[data-theme="light"] header .nav-auth .btn:not(.btn-secondary) {
  color: #ffffff;
  background: linear-gradient(135deg, #0b766e, #0891b2);
  border-color: rgba(8, 145, 178, 0.4);
  box-shadow: 0 8px 18px rgba(8, 145, 178, 0.2);
}

:root[data-theme="light"] header .nav-links a {
  color: #0f172a;
}

:root[data-theme="light"] header .nav-links a:hover,
:root[data-theme="light"] header .nav-links a:focus-visible {
  color: #0b1220;
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
}

:root[data-theme="light"] header .nav-links a[aria-current="page"] {
  color: #0b1220;
  background: rgba(15, 23, 42, 0.12);
  border-color: rgba(15, 23, 42, 0.22);
}

:root[data-theme="light"] #nav-hamburger,
:root[data-theme="light"] .btn.btn-icon {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  border-color: var(--border);
}

:root[data-theme="light"] .showcase-overlay {
  background: rgba(10, 20, 40, 0.66);
}

.muted {
  color: var(--muted);
}

.list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.pricing {
  text-align: center;
}

.pricing .card {
  text-align: left;
}

.pricing-card {
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.pricing-card:hover {
  transform: scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.plan-cta-wrap {
  margin-top: 12px;
}

.plan-cta {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b1220;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pricing-card:hover .plan-cta {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .plan-cta {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(123, 224, 195, 0.18), rgba(76, 161, 255, 0.12));
  opacity: 0.08;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

.usage-bar {
  width: 100%;
  height: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--border);
}

.usage-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--accent), #4ca1ff);
  width: 0%;
  transition: width 400ms ease, background 200ms ease;
}

.usage-card {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  display: block;
}

.usage-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

.usage-card.is-refreshing {
  opacity: 0.9;
}

.usage-top {
  display: block;
  min-width: 0;
  max-width: none;
}

.usage-top > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.usage-summary-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
  width: 100%;
}

.usage-count {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.usage-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.eyebrow {
  display: none;
}

.usage-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-top: 0;
  white-space: nowrap;
  margin-left: auto;
  min-width: 0;
  justify-self: end;
}

.usage-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
  max-width: none;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.1;
}

.usage-bar {
  margin-top: 12px;
  max-width: none;
}

.soft-upsell {
  margin-top: 8px;
  font-size: 12px;
  text-align: right;
  max-width: 240px;
}

.usage-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.usage-fill.good {
  background: linear-gradient(135deg, #34d399, #22c55e);
}

.usage-fill.warn {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.usage-fill.danger {
  background: linear-gradient(135deg, #f87171, #ef4444);
}

.upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.12);
  color: #fecdd3;
  margin: 12px 0;
}

.upgrade-banner .btn {
  height: auto;
  padding: 10px 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 32px;
}

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

.scan-shortcuts-section .scan-shortcuts {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.scan-shortcuts-section .scan-shortcuts > .scan-shortcut-card {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  flex-direction: column !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  flex: 1 1 0;
  min-width: 0;
}

.scan-shortcuts-section .scan-shortcuts > .scan-shortcut-card > div {
  min-width: 0;
  flex: 1 1 auto;
}

.scan-shortcuts-section .scan-shortcuts > .scan-shortcut-card .btn {
  flex: 0 0 auto;
  height: 48px;
  padding: 14px 16px;
  align-self: flex-start;
}

.scan-shortcuts-section .scan-shortcut-card h3 {
  font-weight: 600;
}

.scan-shortcuts-section .scan-shortcut-card p {
  font-weight: 400;
}

.scan-shortcuts-section {
  margin-top: 16px;
}

.scan-shortcuts-header {
  margin-bottom: 2px;
}

.page-stack-tight {
  display: grid;
  gap: 12px;
}

.scan-shortcut-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scan-shortcut-card .btn,
.scan-shortcut-card a.btn {
  text-decoration: none;
  color: #0b1220;
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 30px rgba(123, 224, 195, 0.25);
}

.scan-switch-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.scan-switch-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.table th,
.table td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.3px;
}

.table-scroll {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 12px;
}

.table-scroll.is-refreshing,
.usage-card.is-refreshing {
  position: relative;
}

.table-scroll.is-refreshing::after,
.usage-card.is-refreshing::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #7be0c3;
  animation: spin 0.8s linear infinite;
  pointer-events: none;
}

.comparison-wrap {
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.compact-table th,
.compact-table td {
  padding: 8px 10px;
}

.comparison-table thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  width: 48px;
  height: 48px;
  margin-right: 0;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}

.status-good {
  color: #7be0c3;
}

.status-warn {
  color: #f5c16c;
}

.status-bad {
  color: #f77a7a;
}

.report-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  max-height: 360px;
  overflow: auto;
  margin-top: 10px;
}

.cve-table-wrapper {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  max-height: 320px;
  padding: 8px;
}

.btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
}

.btn.loading::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #0b1220;
  animation: spin 0.8s linear infinite;
}

.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.input-row .flex-1 {
  flex: 1 1 240px;
}

.loading-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

footer {
  border-top: 1px solid var(--border);
  background: rgba(10, 16, 32, 0.65);
  backdrop-filter: blur(10px);
  margin-top: 40px;
}

.auth-page {
  min-height: 100vh;
}

.auth-bg {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: radial-gradient(circle at 20% 18%, rgba(123, 224, 195, 0.16), transparent 30%),
    radial-gradient(circle at 78% 12%, rgba(87, 125, 255, 0.18), transparent 35%),
    linear-gradient(145deg, #0c1426, #111a31 55%, #1b2b45);
}

.auth-shell {
  width: min(420px, 100%);
}

.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-title {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
}

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

input,
textarea {
  width: 100%;
  padding: 15px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 15px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(123, 224, 195, 0.5);
  border-color: rgba(123, 224, 195, 0.7);
  box-shadow: 0 0 0 4px rgba(123, 224, 195, 0.12);
  background: rgba(255, 255, 255, 0.07);
}

.full {
  width: 100%;
}

.banner {
  margin-top: 10px;
  margin-bottom: 12px;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
}

.banner.error {
  border-color: #f77a7a;
  color: #ffc7c7;
}

.banner.success {
  border-color: #7be0c3;
  color: #b5f1dd;
}
.banner.warning {
  border-color: #f0b429;
  color: #fde68a;
}

.helper-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.helper-row a {
  color: var(--muted);
  transition: color 120ms ease;
}

.helper-row a:hover {
  color: var(--text);
}

.auth-toggle {
  font-weight: 600;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links .linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links .linkedin-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.page-title {
  margin: 24px 0 12px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.faq-item h3 {
  margin: 0 0 6px;
}

.legal h2 {
  margin-top: 24px;
}

.narrow {
  max-width: 520px;
  margin: 0 auto;
}

.mt-12 {
  margin-top: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

#captcha-field {
  margin-top: 4px;
  padding-top: 4px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-card .btn {
  margin-top: 8px;
}

.auth-card {
  animation: fadeIn 260ms ease;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .hero {
    text-align: left;
  }
  .hero-actions {
    justify-content: flex-start;
  }
  #cta-logged-out.hero-actions {
    text-align: left;
  }
  #cta-logged-out.hero-actions > .btn {
    margin-left: 0;
    margin-right: 10px;
  }
  .hero-showcase-intro {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero-showcase-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .scan-shortcuts,
  .scan-shortcuts-section .scan-shortcuts {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .scan-shortcuts-section .scan-shortcuts > .scan-shortcut-card {
    flex-wrap: wrap !important;
  }
}

.hidden {
  display: none !important;
}

/* Legacy scan UI styling embedded in dashboard */
.button {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}
.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.status {
  display: grid;
  gap: 10px;
}
.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}
.status-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.status-meta .label {
  display: block;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}
.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.logs .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.log-output {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 160px;
  max-height: 400px;
  overflow-y: auto;
  color: #d0d7ec;
  margin: 0;
}
.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 9999;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success {
  background: #22c55e;
  color: #fff;
}
.toast-error {
  background: #ef4444;
  color: #fff;
}
.toast-info {
  background: #3b82f6;
  color: #fff;
}

.sync-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 10000;
  animation: fadeInOut 1s ease-in-out;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.8); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: #0b1220;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.pricing-modal-card {
  background: #111827;
  width: 90%;
  max-width: 1000px;
  padding: 60px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  position: relative;
}
.pricing-grid {
  display: flex;
  gap: 24px;
  margin-top: 32px;
  flex-wrap: wrap;
  justify-content: center;
}
.pricing-tier.current-plan {
  border: 2px solid rgba(123, 224, 195, 0.5);
  position: relative;
}
.pricing-tier.current-plan::before {
  content: "Current Plan";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(123, 224, 195, 0.2);
  border: 1px solid rgba(123, 224, 195, 0.4);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pricing-tier.disabled-plan {
  opacity: 0.45;
  pointer-events: none;
}
.plan-upgrade-btn.is-current-plan {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}
  .pricing-tier {
  flex: 1;
  min-width: 220px;
  background: #1f2937;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.pricing-tier.featured {
  border: 2px solid var(--accent);
  transform: translateY(-6px) scale(1.03);
}
.pricing-tier ul,
.pricing-tier li {
  text-align: left;
}
.pricing-tier ul {
  margin: 12px 0;
  padding-left: 18px;
}
.pricing-tier li {
  margin: 6px 0;
}
.price {
  font-size: 32px;
  font-weight: 700;
  margin: 12px 0;
}
.price span {
  font-size: 14px;
  font-weight: 400;
}
.single-scan-option {
  margin-top: 24px;
}
.modal-close {
  margin-top: 24px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
}
#pricing-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
#pricing-close-btn:hover {
  opacity: 0.9;
}

.empty-state {
  text-align: center;
  padding: 32px 24px;
  max-width: 520px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.5;
  margin-bottom: 16px;
}

.password-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  background: #ef4444;
}

.strength-label {
  font-size: 12px;
  font-weight: 600;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.paywall-card {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  max-width: 720px;
  width: 100%;
  padding: 22px 22px 26px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0 12px;
  text-align: center;
}

.plan-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.2s ease;
}

.plan-card.selected {
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(123, 224, 195, 0.25);
  transform: translateY(-2px);
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price-row {
  font-size: 20px;
  font-weight: 700;
  margin: 6px 0 8px;
}

.plan-card ul {
  padding-left: 18px;
  color: var(--muted);
  margin: 8px 0;
}

.plan-content {
  transition: opacity 0.3s ease;
}

.plan-option .plan-title {
  font-weight: 700;
  font-size: 18px;
}

.plan-option .plan-sub {
  color: var(--muted);
  margin-top: 4px;
}

.plan-option .plan-price {
  margin-top: 10px;
  font-weight: 700;
  font-size: 16px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-badge {
  white-space: nowrap;
}

.plan-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.plan-signup-btn {
  padding: 12px 26px;
  font-weight: 600;
  border-radius: 12px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-signup-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.profile-card {
  background: #111827;
  padding: 28px;
  border-radius: 12px;
  width: 400px;
  max-width: 95%;
}

.profile-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scan-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scan-form .btn {
  align-self: flex-start;
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border-color: var(--accent);
}

.plan-card:hover .plan-content {
  opacity: 0.4;
}

.plan-card:hover .plan-overlay {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .plan-overlay {
    position: static;
    opacity: 1;
    backdrop-filter: none;
    background: transparent;
    margin-top: 12px;
  }

  .plan-content {
    opacity: 1 !important;
  }

  .plan-card:hover {
    transform: none;
    box-shadow: none;
  }
}

.badge.primary {
  background: rgba(123, 224, 195, 0.15);
  border: 1px solid var(--accent);
  color: var(--text);
}

.badge.subtle {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text);
}

.tiny {
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.paywall-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.paywall-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

#paywall-step-plan,
#paywall-step-account {
  flex: 1;
  min-width: 320px;
}

@media (max-width: 900px) {
  .paywall-layout {
    flex-direction: column;
    gap: 20px;
  }
}

.paywall-form input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.paywall-form label {
  font-weight: 600;
}

.banner.error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecdd3;
  padding: 10px;
  border-radius: 10px;
  margin: 6px 0;
}

.no-scroll {
  overflow: hidden;
}
.integration-tile {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.integration-tile .name {
  font-weight: 600;
}
.integration-tile .status {
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}
.integration-tile .stat {
  display: block;
  margin-top: 6px;
}
.integration-tile.tokens {
  border-color: rgba(123, 224, 195, 0.3);
}

.scan-logs {
  min-height: 200px;
  max-height: 250px;
  overflow-y: auto;
  font-size: 13px;
  white-space: pre-wrap;
}

.scan-complete-card {
  background: #111827;
  padding: 24px;
  border-radius: 12px;
  width: 380px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.scan-complete-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

#scan-complete-modal.hidden {
  display: none;
}

.scan-status-logs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 40px 0;
  font-size: 14px;
  opacity: 0.85;
}

.scan-log-line {
  margin: 4px 0;
  padding: 4px 0;
  position: relative;
  padding-left: 20px;
}

.scan-log-line::before {
  content: "â—";
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-size: 10px;
  top: 6px;
}

.scan-log-line.hidden {
  display: none;
}

.scan-log-line.running::after {
  content: " ¢";
  display: inline-block;
  animation: pulseDot 1s infinite ease-in-out;
}

.start-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.inline-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

@keyframes pulseDot {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* Auth page improvements */
.field-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.helper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.helper-row.center {
  justify-content: center;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.auth-footer .small {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.banner.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.banner.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 224, 195, 0.1);
}

.form-collapsible {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, max-height 0.25s ease;
}

.form-collapsible.show {
  opacity: 1;
  max-height: 2000px;
}

.signup-plans .plan-card:hover .plan-content {
  opacity: 1;
}

.signup-plans .plan-card:hover {
  transform: translateY(-2px);
}

.signup-plans .plan-overlay {
  display: none;
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
}

.upgrade-card {
  margin-top: 20px;
}

.upgrade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

/* Utilities */
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

.hint {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

#scan-form .scan-top-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px;
  align-items: end;
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  /* Scan form responsive */
  #scan-form .scan-top-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  #scan-form label {
    font-size: 14px;
  }

  #scan-form input,
  #scan-form textarea {
    font-size: 16px;
  }

  .start-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .start-row .btn {
    width: 100%;
  }

  .card {
    padding: 16px;
  }

  .section {
    padding: 40px 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .page-title {
    font-size: 24px;
  }

  .usage-card {
    display: block;
    padding: 14px 16px;
  }

  .usage-top {
    max-width: none;
  }

  .usage-top > div {
    gap: 8px;
  }

  .usage-summary-inline {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .usage-meta {
    justify-self: start;
    margin-left: 0;
  }

  .usage-bar-wrap {
    width: 100%;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
    font-size: 14px;
  }

  .table th,
  .table td {
    padding: 8px;
    white-space: nowrap;
  }

  .hint {
    font-size: 15px;
    line-height: 1.6;
  }
}




/* Navbar button alignment overrides */
.btn {
  height: 48px;
  white-space: nowrap;
}
.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
header .nav-auth .btn {
  height: 44px;
  padding: 0 16px;
}
header .nav-auth .btn-icon {
  width: 44px;
  height: 44px;
}

/* ============================================================
   Scan Complete Modal  ID-scoped rules, immune to cascade
   from the three generic .modal-overlay blocks above
   ============================================================ */
#scan-complete-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 20px;
}

#scan-complete-modal.hidden {
  display: none !important;
}

#scan-complete-modal .modal-content {
  background: var(--panel, #111827);
  border: 1px solid var(--border, #1e2d45);
  border-radius: 16px;
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

#scan-complete-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

#scan-complete-modal .modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent, #7be0c3);
  margin: 0;
}

#scan-complete-modal .modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border, #1e2d45);
  color: var(--text, #e2e8f0);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  line-height: 1;
  transition: background 120ms;
}

#scan-complete-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

#scan-complete-modal .modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   Settings icon button  SVG gear, encoding-safe
   ============================================================ */
#nav-settings svg {
  display: block;
  flex-shrink: 0;
}

header .nav-auth .btn-icon {
  border-radius: 8px;
  border: 1px solid var(--border, #1e2d45);
  background: transparent;
  color: var(--text, #e2e8f0);
  transition: background 120ms;
}

header .nav-auth .btn-icon:hover {
  background: rgba(255, 255, 255, 0.06);
}


/* Scan form select styling */
#scan-form select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: #000;
  font-size: 15px;
}

#scan-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 224, 195, 0.12);
}
.partners-grid .card{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-start;
}
.partner-name{
  font-weight:700;
  font-size:16px;
}
.partner-card.placeholder{
  opacity:0.78;
}

/* Modern report template */
.ts-modern {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #1f2937;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, system-ui, sans-serif;
  min-height: 100vh;
  padding: 32px 18px 40px;
}

.ts-modern .container {
  max-width: 1180px;
  margin: 0 auto;
}

.ts-modern .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.ts-modern .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ts-modern .brand .logo {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 14px;
}

.ts-modern .brand .title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.ts-modern .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ts-modern .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.ts-modern .pill.accent {
  background: rgba(59, 130, 246, 0.18);
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.4);
}

.ts-modern .section {
  margin-top: 18px;
}

.ts-modern .section-head h2,
.ts-modern .section-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ts-modern .section-body {
  margin-top: 12px;
  color: var(--text);
}

.ts-modern .body-text {
  color: var(--text);
  line-height: 1.6;
}

.ts-modern .callout {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.ts-modern .callout-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.ts-modern .callout ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.ts-modern .grid {
  display: grid;
  gap: 12px;
}

.ts-modern .grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ts-modern .grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.ts-modern .grid.cols-6 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.ts-modern .kv {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.ts-modern .kv .k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ts-modern .kv .v {
  margin-top: 6px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.ts-modern .kv.wide {
  grid-column: span 2;
}

.ts-modern details {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  margin-top: 16px;
}

.ts-modern details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.ts-modern details[open] summary {
  margin-bottom: 10px;
}

.ts-modern .risk-block {
  display: grid;
  gap: 12px;
}

.ts-modern .risk-score .number {
  font-size: 48px;
  font-weight: 800;
}

.ts-modern .risk-score .label {
  color: var(--muted);
  font-size: 13px;
}

.ts-modern .badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

.ts-modern .badge.risk-low {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.ts-modern .badge.risk-medium {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.ts-modern .badge.risk-high,
.ts-modern .badge.risk-critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.ts-modern .badge.risk-none {
  background: rgba(156, 163, 175, 0.12);
  color: var(--muted);
}

.ts-modern .risk-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  overflow: hidden;
}

.ts-modern .risk-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--danger));
}

.ts-modern .table-wrap {
  margin-top: 16px;
}

.ts-modern .table-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ts-modern table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
}

.ts-modern th,
.ts-modern td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.ts-modern tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.ts-modern tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

.ts-modern .actions {
  display: grid;
  gap: 10px;
}

.ts-modern .action-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.ts-modern .footer {
  text-align: center;
  color: var(--muted);
  margin-top: 18px;
  font-size: 13px;
}

.ts-modern .quick-facts .kv {
  background: rgba(255, 255, 255, 0.03);
}

.ts-modern .table-wrap a {
  color: var(--accent);
}

@media (max-width: 900px) {
  .ts-modern {
    padding: 22px 14px 28px;
  }
}

/* Public report library */
.reports-search-card {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

#reports-search {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}

#reports-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 224, 195, 0.12);
}

.reports-list {
  display: grid;
  gap: 10px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.report-row-main {
  min-width: 0;
}

.report-row-title {
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.report-row-desc {
  color: var(--muted);
  margin: 6px 0 0;
}

.report-row-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.report-row-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
  text-align: right;
  min-width: 110px;
}

.report-pill {
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--accent);
  background: rgba(123, 224, 195, 0.08);
}

.report-published {
  color: var(--muted);
  font-size: 12px;
}



@media (max-width: 760px) {
  .report-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-row-side {
    justify-items: start;
  }
}

/* Unified navbar behavior (single source of truth) */
header .nav {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

header .nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 1 auto;
  min-width: 0;
}

header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

header .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
}

header .nav-links a {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 600;
  color: #f4f7ff;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

header .nav-links a:hover,
header .nav-links a:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

header .nav-links a[aria-current="page"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

header .nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

header .nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

header .nav-actions .btn,
header .nav-auth .btn {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

header .nav-actions .btn.btn-icon,
header .nav-auth .btn.btn-icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

@media (max-width: 1200px) {
  header .nav {
    padding: 12px 14px;
    gap: 12px;
  }

  header .nav-links a {
    padding: 8px 9px;
    font-size: 15px;
  }
}

@media (max-width: 1080px) {
  #nav-hamburger {
    display: inline-flex !important;
  }

  header .brand-name,
  header .logo-icon {
    display: none;
  }

  header .nav {
    position: relative;
    flex-wrap: wrap;
    row-gap: 10px;
  }

  header .nav-left {
    width: 100%;
    justify-content: space-between;
  }

  header .nav-links {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    white-space: normal;
    overflow: visible;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 1100;
  }

  body.mobile-nav-open header .nav-links {
    display: flex;
  }

  header .nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  header .nav-auth {
    margin-left: auto;
    gap: 8px;
  }

  #nav-hamburger {
    margin-right: auto;
  }
}

/* Light theme polish (isolated to visual styles, no layout changes) */
:root[data-theme="light"] body {
  color: var(--text);
}

:root[data-theme="light"] header {
  border-bottom-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

:root[data-theme="light"] footer {
  background: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(15, 23, 42, 0.1);
}

:root[data-theme="light"] .brand-name,
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4,
:root[data-theme="light"] h5,
:root[data-theme="light"] h6 {
  color: #0e2038;
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .auth-card,
:root[data-theme="light"] .usage-card,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .scan-shortcut-card,
:root[data-theme="light"] .plan-card,
:root[data-theme="light"] .profile-card,
:root[data-theme="light"] .modal-content,
:root[data-theme="light"] .paywall-card,
:root[data-theme="light"] .pricing-modal-card,
:root[data-theme="light"] .showcase-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .btn-secondary,
:root[data-theme="light"] .btn-ghost,
:root[data-theme="light"] .plan-signup-btn.btn-secondary {
  background: #f3f6fb;
  color: #0f1f38;
  border-color: rgba(15, 23, 42, 0.14);
}

:root[data-theme="light"] .btn-secondary:hover,
:root[data-theme="light"] .btn-ghost:hover {
  background: #e8eef7;
}

:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .btn.primary,
:root[data-theme="light"] .btn:not(.btn-secondary):not(.btn-ghost) {
  color: #08202b;
}

:root[data-theme="light"] a {
  color: #0a6b84;
}

:root[data-theme="light"] .muted,
:root[data-theme="light"] p,
:root[data-theme="light"] li,
:root[data-theme="light"] label {
  color: #344a69;
}

:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select {
  background: #f8fbff;
  color: #0f1e35;
  border-color: rgba(15, 23, 42, 0.14);
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
  color: #7586a2;
}

:root[data-theme="light"] .table th,
:root[data-theme="light"] .table td,
:root[data-theme="light"] .comparison-table th,
:root[data-theme="light"] .comparison-table td {
  border-color: rgba(15, 23, 42, 0.12);
  color: #20314d;
}

:root[data-theme="light"] .banner {
  background: #f7faff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #1f3352;
}

:root[data-theme="light"] .modal-overlay {
  background: rgba(10, 22, 40, 0.42);
}


.report-preview-page {
  min-height: 100vh;
  height: 100vh;
  background: radial-gradient(circle at top, rgba(27, 39, 68, 0.92), rgba(7, 12, 24, 1));
  overflow-anchor: none;
  overflow: hidden;
}

.report-preview-page .report-preview-shell-lite {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: none;
  box-sizing: border-box;
}

.report-preview-page .report-preview-head-lite {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: none;
}

.report-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-preview-template-pills {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}

.report-preview-pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.86);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.report-preview-pill:hover {
  background: rgba(116, 199, 216, 0.10);
  color: #d9f5fb;
}

.report-preview-pill.is-active {
  background: rgba(116, 199, 216, 0.16);
  color: #d9f5fb;
  box-shadow: inset 0 0 0 1px rgba(116, 199, 216, 0.14);
}

.report-preview-pill:disabled {
  opacity: .55;
  cursor: default;
}

.report-preview-page #report-preview-title {
  color: #f8fafc;
}

.report-preview-page #report-preview-status,
.report-preview-page .compliance-eyebrow {
  color: rgba(191, 211, 233, 0.9);
}

#report-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: none;
  opacity: 1;
  transition: opacity 120ms ease;
}

.report-preview-page .compliance-preview-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  overflow-anchor: none;
}

.report-preview-redmine-panel {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  background: rgba(8, 16, 28, 0.88);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-preview-redmine-panel.hidden {
  display: none;
}

.report-preview-redmine-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.report-preview-redmine-head h2 {
  margin: 2px 0 0;
  color: #f8fafc;
  font-size: 18px;
}

.report-preview-redmine-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-preview-redmine-status {
  padding: 12px 18px 0;
}

.report-preview-redmine-text {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #0b1220;
  color: #e5edf7;
  padding: 16px 18px 18px;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: none;
  box-sizing: border-box;
}

@media (max-width: 860px) {
  .report-preview-page .report-preview-shell-lite {
    max-width: calc(100vw - 14px);
  }

  .report-preview-page .report-preview-head-lite {
    gap: 14px;
  }

  .report-preview-toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .report-preview-template-pills {
    width: 100%;
    justify-content: space-between;
  }

  .report-preview-redmine-head {
    flex-direction: column;
    align-items: stretch;
  }

  .report-preview-pill {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 10px 12px;
  }

  #report-preview-frame {
    min-height: 0;
    border-radius: 14px;
  }
}
