*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #2a2a2a;
  --text: #e5e5e5;
  --text-muted: #888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --radius: 8px;
}

body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Nav */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  color: var(--text);
  background: var(--surface);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

/* Terminal */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 2rem auto;
  max-width: 520px;
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }

.terminal pre {
  padding: 1rem 1.25rem;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  overflow-x: auto;
}

.prompt { color: var(--green); }
.output { color: var(--text-muted); }

/* How it works */
.how-it-works {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.how-it-works h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.step code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* Pricing */
.pricing {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.pricing h2 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 320px;
  margin: 0 auto;
}

.price {
  font-size: 3rem;
  font-weight: 800;
}

.price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.price-card ul {
  list-style: none;
  margin: 1.5rem 0;
  text-align: left;
}

.price-card li {
  padding: 0.4rem 0;
  color: var(--text-muted);
}

.price-card li::before {
  content: "\2713 ";
  color: var(--green);
  margin-right: 0.5rem;
}

/* Footer */
footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--text);
}

/* Login page */
.auth-container {
  max-width: 400px;
  margin: 8rem auto;
  padding: 2rem;
  text-align: center;
}

.auth-container h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.auth-container p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--accent);
}

.form-group .btn {
  width: 100%;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.message.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Dashboard */
.dashboard {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.dashboard h1 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.device-list {
  list-style: none;
}

.device-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.device-list li:last-child {
  border-bottom: none;
}

.device-name {
  font-weight: 600;
}

.device-type {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.device-remove {
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

.pairing-code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  margin: 1rem 0;
}

.countdown {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.message-list {
  list-style: none;
}

.message-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.message-list li:last-child {
  border-bottom: none;
}

.message-body {
  margin-bottom: 0.25rem;
}

.message-time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}

.status-badge.trialing {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.status-badge.canceled,
.status-badge.past_due {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 0;
}

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

.gap-sm {
  display: flex;
  gap: 0.5rem;
}

.qr-code {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.5rem;
}

.qr-code img {
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
}

.qr-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.device-rename {
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

/* ---- Landing redesign (BeeCrow design system) ---- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.btn-lg {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-muted);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3rem;
  line-height: 1.05;
}

.subtitle {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.terminal-title {
  margin-left: auto;
  color: var(--text-muted);
  font-family: "Fira Code", "SF Mono", monospace;
  font-size: 0.75rem;
}

.terminal pre {
  font-family: "Fira Code", "SF Mono", "Consolas", monospace;
}

.str { color: var(--text); }
.flag { color: var(--accent); font-weight: 600; }

.features {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.feature:hover {
  border-color: var(--accent);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.feature code,
.how-it-works code,
.subtitle code {
  font-family: "Fira Code", "SF Mono", monospace;
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--accent);
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.2rem; }
  .hero { padding-top: 3.5rem; }
  nav { padding: 1rem 1.25rem; }
}
