:root {
  --bg: #0b1220;
  --panel: #121a2b;
  --panel-2: #192338;
  --text: #e8eefc;
  --muted: #9fb1d1;
  --accent: #4da3ff;
  --border: #2b3854;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), #0f1728);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subtle {
  color: var(--muted);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
}

nav a:hover {
  color: var(--text);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin: 24px 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

input, button {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

input {
  background: #0f1728;
  color: var(--text);
}

button {
  background: var(--accent);
  color: white;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

a {
  color: var(--accent);
}

.digest-body {
  line-height: 1.6;
}

.login-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-banner {
  background: #4a1820;
  border: 1px solid #7c2733;
  color: #ffd9de;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.nav-user {
  color: var(--muted);
  margin-left: 16px;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.wrap-form {
  flex-wrap: wrap;
}

.success-banner {
  background: #143320;
  border: 1px solid #1f5b36;
  color: #d9ffe7;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.login-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-banner {
  background: #4a1820;
  border: 1px solid #7c2733;
  color: #ffd9de;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.nav-user {
  color: var(--muted);
  margin-left: 16px;
}

.compact-card {
  padding: 14px 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 32px;
  line-height: 1.1;
}

.small-value {
  font-size: 16px;
  line-height: 1.4;
}

.table-header {
  margin-bottom: 12px;
}

.digest-preview-shell {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.digest-preview-body {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel-row {
    flex-direction: column;
    align-items: stretch;
  }
}
.time-col {
  white-space: nowrap;
  width: 160px;
  font-size: 12px;
  color: var(--muted);
}
.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.wrap-form {
  flex-wrap: wrap;
}

.success-banner {
  background: #143320;
  border: 1px solid #1f5b36;
  color: #d9ffe7;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f1728;
  color: var(--text);
}

.top-threat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.threat-stat-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 900px) {
  .top-threat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .top-threat-grid {
    grid-template-columns: 1fr;
  }
}

.top-threat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.threat-stat-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 22px;
  font-weight: bold;
}

.tag-zero-day { background: #7f1d1d; color: #fecaca; }
.tag-ransomware { background: #78350f; color: #fde68a; }
.tag-breach { background: #1e3a8a; color: #bfdbfe; }
.tag-phishing { background: #064e3b; color: #a7f3d0; }
.tag-cloud { background: #0c4a6e; color: #bae6fd; }
.tag-identity { background: #4c1d95; color: #ddd6fe; }
.tag-ai-security { background: #312e81; color: #c7d2fe; }
.tag-vulnerability { background: #374151; color: #e5e7eb; }
.tag-general { background: #1f2937; color: #d1d5db; }

.threat-link {
  text-decoration: none;
  color: inherit;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
}

.brand p {
  margin: 2px 0 0 0;
  font-size: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7f1d1d, #0f172a);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark.large {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  margin: 0 auto 14px auto;
  font-size: 20px;
}

.edition-badge {
  background: #10263f;
  border: 1px solid #1f4e85;
  color: #dbeafe;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-brand {
  text-align: center;
  margin-bottom: 22px;
}

.footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .topbar-inner,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  nav a,
  .nav-user {
    margin-left: 0;
  }
}

.nav-form {
  display: inline;
  margin: 0;
}

.link-button {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: none;
}

.link-button:hover {
  color: var(--accent);
}

.landing-hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #9ca3af;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.landing-hero h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-text {
  max-width: 760px;
  margin: 0 auto 2rem;
  color: #b4bcc8;
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.primary-btn {
  background: #dc2626;
  color: white;
}

.primary-btn:hover {
  background: #ef4444;
}

.secondary-btn {
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.8rem;
}

.pricing-section {
  margin-top: 5rem;
  display: flex;
  justify-content: center;
}

.pricing-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
}

.pricing-tier {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.pricing-price span {
  font-size: 1rem;
  color: #9ca3af;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.pricing-features li {
  margin-bottom: 0.75rem;
}

.full-width {
  width: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link,
.nav-link-button {
  color: #d1d5db;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link-button:hover {
  color: white;
}

.subscription-badge {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.nav-user {
  color: #9ca3af;
  font-size: 0.9rem;
}

.logout-link {
  color: #f87171;
}

.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.dashboard-hero-left {
  max-width: 620px;
}

.hero-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #9ca3af;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.dashboard-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-card {
  min-width: 120px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.stat-label {
  color: #9ca3af;
  font-size: 0.82rem;
}

table tbody tr {
  transition: background 0.15s ease;
}

table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

table a {
  color: #f3f4f6;
  text-decoration: none;
}

table a:hover {
  color: #f87171;
}

.dashboard-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 1rem;
  min-width: 460px;
}

.stat-card {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-value {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .dashboard-stats {
    min-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

.headline-tags {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Zero-Day */
.tag-zero-day {
  background: rgba(220, 38, 38, 0.16);
  color: #f87171;
}

/* Ransomware */
.tag-ransomware {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
}

/* Breach */
.tag-breach {
  background: rgba(249, 115, 22, 0.16);
  color: #fb923c;
}

/* Phishing */
.tag-phishing {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
}

/* Cloud */
.tag-cloud {
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
}

/* Identity */
.tag-identity {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
}

/* AI Security */
.tag-ai-security {
  background: rgba(236, 72, 153, 0.16);
  color: #f472b6;
}

/* Vulnerability */
.tag-vulnerability {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
}

/* General */
.tag-general {
  background: rgba(255,255,255,0.06);
  color: #d1d5db;
}

.headline-cell {
  min-width: 520px;
}

.headline-cell a {
  display: inline-block;
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.spotlight-card {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(220, 38, 38, 0.12),
      rgba(127, 29, 29, 0.18)
    );

  border: 1px solid rgba(248, 113, 113, 0.18);
}

.spotlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 1rem;
  flex-wrap: wrap;

  margin-bottom: 1rem;
}

.spotlight-label {
  color: #f87171;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.spotlight-severity {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;

  background: rgba(220, 38, 38, 0.18);
  color: #fca5a5;

  font-size: 0.72rem;
  font-weight: 600;
}

.spotlight-card h3 {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.spotlight-card h3 a {
  color: white;
  text-decoration: none;
}

.spotlight-card h3 a:hover {
  color: #fca5a5;
}

.spotlight-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;

  color: #cbd5e1;
  font-size: 0.85rem;
}

.preview-section {
  margin-top: 5rem;
}

.preview-header {
  text-align: center;
  margin-bottom: 2rem;
}

.preview-window {
  max-width: 1100px;
  margin: 0 auto;

  border-radius: 22px;
  overflow: hidden;

  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 20px 60px rgba(0,0,0,0.35);
}

.preview-topbar {
  display: flex;
  gap: 0.5rem;

  padding: 1rem;

  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.preview-topbar span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
}

.preview-content {
  padding: 2rem;
}

.preview-alert {
  margin-bottom: 2rem;

  padding: 1.5rem;
  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(220, 38, 38, 0.12),
      rgba(127, 29, 29, 0.18)
    );

  border: 1px solid rgba(248, 113, 113, 0.18);
}

.preview-alert-label {
  color: #f87171;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;

  margin-bottom: 0.8rem;
}

.preview-alert-title {
  font-size: 1.2rem;
  line-height: 1.5;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 1rem;
  margin-bottom: 2rem;
}

.preview-metric-card {
  padding: 1.25rem;

  border-radius: 16px;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.preview-metric-card strong {
  display: block;
  margin-bottom: 0.5rem;

  font-size: 1.5rem;
}

.preview-metric-card span {
  color: #9ca3af;
}

.preview-headlines {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-headline {
  padding: 1rem 1.2rem;

  border-radius: 14px;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);

  line-height: 1.5;
}

.preview-tag {
  display: inline-block;

  margin-right: 0.75rem;
  padding: 0.28rem 0.65rem;

  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 600;
}

.preview-tag.zero {
  background: rgba(220,38,38,0.18);
  color: #f87171;
}

.preview-tag.ransomware {
  background: rgba(168,85,247,0.18);
  color: #c084fc;
}

.preview-tag.ai {
  background: rgba(236,72,153,0.18);
  color: #f472b6;
}
