:root {
  --qlb-primary: #5b3df5;
  --qlb-primary-dark: #4327c9;
  --qlb-accent: #00c2a8;
  --qlb-ink: #1d1b2e;
  --qlb-muted: #6b7280;
  --qlb-bg: #f6f7fb;
  --qlb-surface: #ffffff;
  --qlb-border: #e7e8f0;
  --qlb-sidebar: #1a1730;
}

html { font-size: 15px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--qlb-ink);
  background: var(--qlb-bg);
}

a { color: var(--qlb-primary); text-decoration: none; }
a:hover { color: var(--qlb-primary-dark); }

.btn-primary {
  background: var(--qlb-primary); border-color: var(--qlb-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--qlb-primary-dark); border-color: var(--qlb-primary-dark);
}
.btn-outline-primary { color: var(--qlb-primary); border-color: var(--qlb-primary); }
.btn-outline-primary:hover { background: var(--qlb-primary); border-color: var(--qlb-primary); }
.text-primary { color: var(--qlb-primary) !important; }
.badge-soft { background: #efeaff; color: var(--qlb-primary); font-weight: 600; }

/* ── Public navbar / landing ─────────────────────────────── */
.qlb-navbar { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--qlb-border); }
.qlb-brand { font-weight: 800; letter-spacing: -.02em; color: var(--qlb-ink); }
.qlb-brand .dot { color: var(--qlb-primary); }

.hero {
  background: radial-gradient(1200px 500px at 80% -10%, #efeaff 0%, transparent 60%),
              radial-gradient(900px 500px at 0% 10%, #e6fff9 0%, transparent 55%);
  padding: 5rem 0 4rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.hero .lead { color: var(--qlb-muted); font-size: 1.2rem; max-width: 38rem; }
.hero-card {
  background: var(--qlb-surface); border: 1px solid var(--qlb-border); border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(45,27,95,.35); padding: 1.25rem;
}
.gradient-text {
  background: linear-gradient(90deg, var(--qlb-primary), var(--qlb-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.feature-card {
  background: var(--qlb-surface); border: 1px solid var(--qlb-border); border-radius: 14px;
  padding: 1.5rem; height: 100%; transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(45,27,95,.4); }
.feature-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #efeaff; color: var(--qlb-primary); font-size: 1.3rem; margin-bottom: .9rem;
}
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--qlb-primary); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}

/* ── App shell (dashboard) ───────────────────────────────── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--qlb-sidebar); color: #cfcde6;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { padding: 1.25rem 1.25rem .5rem; color: #fff; font-weight: 800; font-size: 1.15rem; }
.sidebar .nav-link {
  color: #b9b6d6; border-radius: 9px; margin: 2px 10px; padding: .55rem .75rem; font-weight: 500;
  display: flex; align-items: center; gap: .6rem;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: var(--qlb-primary); color: #fff; }
.sidebar .nav-section { color: #6f6b94; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem 1.5rem .25rem; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--qlb-surface); border-bottom: 1px solid var(--qlb-border);
  padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between;
}
.content { padding: 1.5rem; }

.card { border: 1px solid var(--qlb-border); border-radius: 14px; }
.card-soft { background: var(--qlb-surface); border: 1px solid var(--qlb-border); border-radius: 14px; }

.kpi { background: var(--qlb-surface); border: 1px solid var(--qlb-border); border-radius: 14px; padding: 1.1rem 1.25rem; height: 100%; }
.kpi .label { color: var(--qlb-muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; }
.kpi .ico { float: right; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #efeaff; color: var(--qlb-primary); }

.table thead th { color: var(--qlb-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--qlb-border); }
.table td { vertical-align: middle; }

.pill { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; }
.pill-earn { background: #e7f8f2; color: #0a7d62; }
.pill-redeem { background: #fdeef0; color: #b3263b; }
.pill-expiry { background: #fef3e2; color: #9a6411; }
.pill-neutral { background: #eef0f6; color: #4b5563; }

.empty-state { text-align: center; color: var(--qlb-muted); padding: 3rem 1rem; }
.code-block { background: #0f1024; color: #d7d9f5; border-radius: 12px; padding: 1rem 1.1rem; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .85rem; overflow-x: auto; white-space: pre; }

@media (max-width: 860px) {
  .sidebar { display: none; }
}
