:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #7dd3fc;
  --brand-ink: #0a0e1a;
  --ok: #16a34a;
  --wait: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0 0 0.5rem; }

.container { width: min(1100px, 92%); margin: 0 auto; }

.brand-logo { width: 44px; height: 44px; border-radius: 10px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-primary { background: var(--brand-ink); color: #fff; }
.btn-secondary { background: #eef2ff; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--brand-ink); border-color: var(--line); }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn:active { transform: scale(0.98); }

.wrap { padding: 2rem 0; }

.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #eef6ff 0%, #ffffff 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center; }
.hero-copy h1 { font-size: 2.6rem; line-height: 1.12; letter-spacing: -0.02em; }
.hero-copy p { color: var(--muted); font-size: 1.1rem; max-width: 34ch; }
.brand-hero { font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: 0.02em; }
.cta-group { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 300px at 12% -5%, rgba(125, 211, 252, 0.35), transparent),
    radial-gradient(500px 260px at 95% 10%, rgba(165, 180, 252, 0.25), transparent);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-head { max-width: 640px; margin-bottom: 1.5rem; }
.section-head .eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 700; color: var(--brand-ink); }
.section-title { font-size: 2rem; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); }

/* Cards grid */
.stats-grid, .fitur-grid, .ai-grid, .card-grid, .mulai-grid, .template-grid {
  display: grid; gap: 1rem;
}
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.stats-grid .stat-card { padding: 1.25rem; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stats-grid .stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-val { display: block; font-size: 2.1rem; font-weight: 800; color: var(--brand-ink); }
.stat-lbl { color: var(--muted); font-size: 0.95rem; }

.fitur-grid { grid-template-columns: repeat(3, 1fr); }
.fitur-item, .info-card, .ai-card, .mulai-item { padding: 1.25rem; }
.fitur-tag, .info-meta, .template-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-ink); }
.fitur-item h3, .info-card h3, .ai-card h3, .mulai-item h3 { font-size: 1.05rem; margin-top: 0.35rem; }
.fitur-item p, .info-card p, .ai-card p, .mulai-item p { color: var(--muted); font-size: 0.92rem; }

.info-card.cmd .info-meta { color: var(--bad); }

.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.card-grid { grid-template-columns: repeat(3, 1fr); }

.ai-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.ai-tags .tag { background: #eef2ff; color: var(--ink); padding: 0.35rem 0.8rem; border-radius: 999px; font-size: 0.85rem; }

.template-card { display: block; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; background: #fff; }
.template-preview iframe { width: 100%; height: 190px; border: 0; display: block; background: #eee; }
.template-body { padding: 1rem 1.1rem 1.2rem; }
.template-link { font-weight: 600; color: var(--brand-ink); }

/* Chat preview */
.chat-preview { max-width: 380px; }
.chat-preview header { display: flex; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.chat-status { color: var(--ok); font-weight: 600; font-size: 0.85rem; }
.chat-preview p { background: #f1f5f9; border-radius: 12px; padding: 0.55rem 0.8rem; margin-bottom: 0.5rem; }

/* Page (auth + generic) */
.page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.page-card { width: 100%; max-width: 420px; padding: 2rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.input {
  width: 100%; padding: 0.6rem 0.75rem;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 0.95rem; background: #fff;
}
.input:focus { outline: 2px solid var(--brand); border-color: transparent; }

.alert { padding: 0.7rem 1rem; border-radius: 10px; font-size: 0.9rem; margin-bottom: 1rem; }
.alert-err { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; }
.alert-ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }

/* Dashboard shell */
.dashboard { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: #0f172a; color: #e2e8f0; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; margin-bottom: 1rem; }
.sidebar a { padding: 0.5rem 0.75rem; border-radius: 8px; color: #cbd5e1; }
.sidebar a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar .is-active { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.main { padding: 2rem; }
.page-title { font-size: 1.6rem; }
.page-lead { color: var(--muted); margin-bottom: 1.5rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.kpi { padding: 1.25rem; }
.kpi-label { color: var(--muted); font-size: 0.85rem; }
.kpi-value { font-size: 2rem; font-weight: 800; }

.status-ok { color: var(--ok); }
.status-wait { color: var(--wait); }
.status-bad { color: var(--bad); }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.user-chip { display: flex; align-items: center; gap: 0.6rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-weight: 700; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.table th { background: #f8fafc; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

@media (max-width: 860px) {
  .hero-grid, .about-split { grid-template-columns: 1fr; }
  .stats-grid, .fitur-grid, .ai-grid, .card-grid, .mulai-grid, .template-grid, .kpi-grid { grid-template-columns: 1fr; }
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; }
  .hero-copy h1 { font-size: 2rem; }
}
