:root {
  --bg: #0f1218;
  --panel: #171d27;
  --border: #2a3342;
  --text: #e6edf7;
  --muted: #9faec4;
  --accent: #4dd0e1;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, -apple-system, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(180deg, #0b0f14 0%, var(--bg) 100%);
  color: var(--text);
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--border); background: #0c1118;
}
.brand { font-weight: 700; letter-spacing: .4px; }
nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
nav a { color: var(--muted); margin-left: 0; text-decoration: none; }
nav a.active, nav a:hover { color: var(--accent); }
.account-dropdown {
  position: relative;
}
.account-trigger {
  padding: 8px 0;
  font-size: 15px;
  background: transparent;
  color: var(--muted);
  border: none !important;
  box-shadow: none;
  font-weight: 400;
}
.account-trigger:hover {
  color: var(--accent);
}
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: none;
  z-index: 40;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.account-menu.open {
  display: grid;
  gap: 10px;
}
.account-email {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
.account-logout {
  color: var(--text);
  text-decoration: none;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.account-logout:hover {
  color: var(--accent);
}
.container { max-width: 980px; margin: 28px auto; padding: 0 16px; }
.hero { margin-bottom: 20px; }
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p, .muted { color: var(--muted); }
.panel-title { font-size: 18px; color: var(--muted); margin: 10px 0; font-weight: 600; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: grid; gap: 10px; max-width: 440px;
}
input {
  background: #111722; border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 10px;
}
button {
  background: var(--accent); border: none; color: #00161b; padding: 10px;
  border-radius: 8px; font-weight: 700; cursor: pointer;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: #00161b;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: center;
}
.hero-logo-wrap {
  display: flex;
  justify-content: center;
}
.hero-logo {
  width: 180px;
  height: 180px;
}
.preview-heartbeat-logo {
  width: 240px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-heartbeat-line {
  width: 190px;
  height: 60px;
}
.preview-heartbeat-line path {
  fill: none;
  stroke: #00E676;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: previewBeat 1.25s ease-in-out infinite;
}
@keyframes previewBeat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
.live-heartbeat-logo {
  width: 220px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.flat-bolt {
  position: absolute;
  width: 46px;
  height: 58px;
  z-index: 10;
  transform: scaleX(0.82);
  transform-origin: center;
  animation: boltPulse 1.1s infinite ease-in-out;
}
.flat-bolt path {
  fill: #00E676;
}
.heartbeat-line {
  width: 190px;
  height: 70px;
  position: relative;
  z-index: 1;
}
.heartbeat-line path {
  fill: none;
  stroke: #00E676;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: lineRun 1.8s linear infinite;
}
@keyframes lineRun {
  0% { stroke-dashoffset: 260; opacity: .3; }
  20% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: .9; }
}
@keyframes boltPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 1; }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.stat-card, .step-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 6px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.cta-card { max-width: none; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
  }

  nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .account-menu {
    left: 0;
    right: auto;
  }

  nav a {
    margin-left: 0;
    font-size: 14px;
  }

  .container {
    margin: 16px auto;
    padding: 0 12px;
  }

  .hero h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .hero p {
    font-size: 14px;
    line-height: 1.45;
  }

  .preview-heartbeat-logo,
  .live-heartbeat-logo {
    width: 180px;
    height: 96px;
  }

  .preview-heartbeat-line,
  .heartbeat-line {
    width: 150px;
  }

  .stat-value {
    font-size: 20px;
  }
}
table {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 15px; }
th { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.alert-dropdown {
  position: relative;
}
.alert-trigger {
  padding: 8px 0;
  font-size: 15px;
  background: transparent;
  color: var(--muted);
  border: none !important;
  box-shadow: none;
  font-weight: 600;
}
.alert-trigger:hover {
  color: var(--accent);
}
.alert-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: none;
  z-index: 30;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}
.alert-menu.open {
  display: grid;
  gap: 8px;
}
.alert-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.alert-option input {
  accent-color: var(--accent);
}
.subscription-status {
  margin-bottom: 10px;
  font-size: 15px;
}
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.pagination-summary,
.pagination-page {
  color: var(--muted);
  font-size: 15px;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pagination-btn {
  padding: 10px 14px;
  font-size: 15px;
}
.pagination-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.site-disclaimer {
  margin: 24px auto 18px;
  max-width: 980px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}
