:root {
  --bg: #0b0e14;
  --panel: #131824;
  --panel2: #1a2130;
  --text: #e8ecf4;
  --muted: #8b95a7;
  --accent: #4f8cff;
  --accent2: #7c5cff;
  --ok: #34c98e;
  --warn: #ffb020;
  --err: #ff5c6c;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

/* header */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid #1f2635;
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.logo span { color: var(--accent); }
.header nav a { margin-left: 18px; color: var(--muted); font-size: 14px; }
.header nav a:hover { color: var(--text); text-decoration: none; }

/* hero */
.hero { text-align: center; padding: 84px 0 56px; }
.hero .badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(79,140,255,.12); color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: 46px; line-height: 1.15; letter-spacing: -1px; margin-bottom: 18px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 34px; }
.btn {
  display: inline-block; border: none; cursor: pointer; border-radius: 12px;
  padding: 14px 30px; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(79,140,255,.35); text-decoration: none; }
.btn.secondary { background: var(--panel2); color: var(--text); border: 1px solid #2a3347; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 34px 0 10px; }
.step {
  background: var(--panel); border: 1px solid #20293c; border-radius: var(--radius);
  padding: 26px 22px;
}
.step .num {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(79,140,255,.14); color: var(--accent); font-weight: 800; margin-bottom: 14px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* pricing */
.pricing { text-align: center; padding: 64px 0 30px; }
.pricing h2 { font-size: 30px; margin-bottom: 26px; }
.price-card {
  display: inline-block; background: var(--panel); border: 1px solid #26304a;
  border-radius: 20px; padding: 36px 48px; min-width: 320px;
}
.price-card .amount { font-size: 52px; font-weight: 800; }
.price-card .per { color: var(--muted); margin-bottom: 22px; }
.price-card ul { list-style: none; text-align: left; margin: 0 auto 26px; max-width: 280px; }
.price-card li { padding: 6px 0 6px 28px; position: relative; color: var(--muted); font-size: 14px; }
.price-card li::before { content: '✓'; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }

.footer { color: var(--muted); font-size: 13px; text-align: center; padding: 44px 0 30px; border-top: 1px solid #1f2635; margin-top: 40px; }

/* auth */
.auth-box {
  max-width: 400px; margin: 60px auto; background: var(--panel);
  border: 1px solid #20293c; border-radius: var(--radius); padding: 34px 30px;
}
.auth-box h2 { margin-bottom: 6px; }
.auth-box .hint { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #2a3347;
  background: var(--panel2); color: var(--text); font-size: 15px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.form-error { color: var(--err); font-size: 14px; margin: 8px 0; min-height: 20px; }
.auth-switch { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }

/* dashboard */
.dash { display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 30px 0 60px; }
.side { background: var(--panel); border: 1px solid #20293c; border-radius: var(--radius); padding: 14px; height: fit-content; position: sticky; top: 20px; }
.side a {
  display: block; padding: 10px 14px; border-radius: 10px; color: var(--muted);
  font-size: 14px; margin-bottom: 2px;
}
.side a:hover { background: var(--panel2); text-decoration: none; color: var(--text); }
.side a.active { background: rgba(79,140,255,.14); color: var(--accent); font-weight: 600; }
.card {
  background: var(--panel); border: 1px solid #20293c; border-radius: var(--radius);
  padding: 26px 26px; margin-bottom: 20px;
}
.card h3 { font-size: 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill.ok { background: rgba(52,201,142,.15); color: var(--ok); }
.pill.warn { background: rgba(255,176,32,.15); color: var(--warn); }
.card p.desc { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.status-list { list-style: none; margin: 6px 0 0; }
.status-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #1c2436; font-size: 14px; }
.status-list li:last-child { border-bottom: none; }

/* chat */
.chat { border: 1px solid #2a3347; border-radius: 12px; background: var(--panel2); padding: 16px; height: 380px; overflow-y: auto; margin-bottom: 14px; }
.msg { margin-bottom: 12px; max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; }
.msg.user { background: rgba(79,140,255,.16); margin-left: auto; border-bottom-right-radius: 4px; }
.msg.assistant { background: #232c40; border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 10px; }
.chat-input input { flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid #2a3347; background: var(--panel2); color: var(--text); font-size: 15px; outline: none; }
textarea.template-area { width: 100%; min-height: 140px; padding: 12px 14px; border-radius: 10px; border: 1px solid #2a3347; background: var(--panel2); color: var(--text); font-size: 14px; outline: none; font-family: inherit; }

/* digests */
.digest-item { border: 1px solid #232c40; border-radius: 12px; padding: 18px; margin-bottom: 14px; background: var(--panel2); }
.digest-item h4 { font-size: 16px; margin-bottom: 6px; }
.digest-item .meta { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.digest-item .body { font-size: 14px; white-space: pre-wrap; }
.digest-item .body b { color: var(--text); }
.digest-item details { margin-top: 8px; font-size: 13px; }
.digest-item summary { cursor: pointer; color: var(--accent); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid #2a3347; padding: 12px 22px;
  border-radius: 12px; font-size: 14px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.toast.err { border-color: var(--err); color: var(--err); }
.toast.ok { border-color: var(--ok); color: var(--ok); }

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .dash { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; }
  .side a { white-space: nowrap; }
}
