:root {
  --ink: #15173a;
  --ink-2: #20245a;
  --muted: #6b6f8d;
  --line: #e5e6f2;
  --paper: #ffffff;
  --wash: #edeef7;
  --lime: #d8f032;
  --lime-2: #eefaa9;
  --indigo: #1e22c9;
  --indigo-soft: #ecedff;
  --peach: #ffb4a2;
  --good: #10a36f;
  --warn: #d68910;
  --bad: #ce3b55;
  --shadow: 0 24px 70px rgba(30,34,120,.14);
  --font-display: 'Fredoka', 'Noto Sans Thai', 'Nunito', sans-serif;
  font-family: 'Nunito', "Noto Sans Thai", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 8% 0%, #dfe2fb 0, transparent 30rem), radial-gradient(circle at 88% 6%, #e3f2f8 0, transparent 24rem), var(--wash); color: var(--ink); }
h1, h2, .brand-mark, .page-title { font-family: var(--font-display); letter-spacing: -.01em; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 46px; height: 46px; border-radius: 17px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-weight: 950; box-shadow: inset 0 -8px 16px rgba(21,23,58,.1); }
.logo svg { width: 28px; height: 28px; }
.brand h1 { font-size: 18px; margin: 0; letter-spacing: -.03em; }
.brand small { color: rgba(255,255,255,.58); }
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 11px 16px; font-weight: 820; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(17,20,55,.08); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.danger { color: var(--bad); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 11px; background: #ecedf7; color: var(--muted); font-size: 12px; font-weight: 850; width: max-content; }
.badge.green { background: #e8f8ef; color: var(--good); }
.badge.red { background: #ffecef; color: var(--bad); }
.badge.yellow { background: #fff5d8; color: var(--warn); }
.muted { color: var(--muted); }

.login { min-height: 100vh; padding: 22px; }
.landing { min-height: calc(100vh - 44px); max-width: 1220px; margin: 0 auto; display: grid; grid-template-rows: auto 1fr; gap: 26px; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.72); border: 1px solid rgba(229,230,242,.9); border-radius: 26px; padding: 12px 14px; backdrop-filter: blur(18px); box-shadow: 0 12px 40px rgba(17,20,55,.05); }
.landing-nav .brand h1, .login-panel .brand h1 { color: var(--ink); }
.landing-nav .brand small, .login-panel .brand small { color: var(--muted); }
.landing-links { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 750; }
.landing-links span { padding: 8px 10px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); align-items: center; gap: 28px; }
.hero-copy { padding: 24px 4px; }
.hero-kicker { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 13px; font-weight: 850; }
.hero-copy h2 { font-size: clamp(44px, 7vw, 86px); line-height: .9; letter-spacing: -.075em; margin: 18px 0 18px; max-width: 780px; }
.hero-copy p { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 680px; margin: 0 0 24px; }
.surface-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 760px; }
.surface-card { background: rgba(255,255,255,.76); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: 0 14px 38px rgba(17,20,55,.06); }
.surface-card strong { display: block; margin-bottom: 6px; }
.surface-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.login-stack { display: grid; gap: 16px; }
.phone-stage { position: relative; min-height: 620px; display: grid; place-items: center; }
.orbit { position: absolute; inset: 26px; border-radius: 42px; background: linear-gradient(135deg, rgba(216,240,50,.42), rgba(30,34,201,.16)); filter: blur(.2px); transform: rotate(-2deg); }
.phone { position: relative; width: 322px; min-height: 620px; border: 10px solid #111437; border-radius: 48px; background: #fff; box-shadow: 0 38px 100px rgba(17,20,55,.24); overflow: hidden; }
.phone-head { background: #111437; color: #fff; padding: 22px 18px 36px; border-radius: 34px 34px 26px 26px; }
.phone-head small { color: rgba(255,255,255,.6); }
.phone-head h3 { margin: 8px 0 0; font-size: 27px; line-height: 1; letter-spacing: -.05em; }
.phone-body { padding: 16px; display: grid; gap: 12px; }
.quest-card { border-radius: 24px; padding: 16px; background: var(--lime); color: var(--ink); }
.quest-card strong { display: block; font-size: 18px; }
.mini-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-tile { background: #f1f2fb; border: 1px solid var(--line); border-radius: 20px; padding: 13px; }
.mini-tile b { display: block; font-size: 22px; letter-spacing: -.05em; }
.login-panel { background: rgba(255,255,255,.88); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: var(--shadow); }
.login-panel h2 { margin: 14px 0 6px; font-size: 26px; letter-spacing: -.04em; }
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 850; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 12px 13px; background: #fff; color: var(--ink); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 292px 1fr; }
.sidebar { background: #111437; color: #fff; padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.nav { display: grid; gap: 8px; }
.nav button { border: 0; color: rgba(255,255,255,.72); background: transparent; text-align: left; border-radius: 16px; padding: 12px 13px; font-weight: 780; display: flex; align-items: center; justify-content: space-between; }
.nav button.active, .nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-card { margin-top: auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 16px; }
.main { padding: 26px; overflow: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topbar h2 { margin: 0; font-size: 34px; letter-spacing: -.055em; }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: rgba(255,255,255,.84); border: 1px solid var(--line); border-radius: 26px; padding: 20px; box-shadow: 0 18px 45px rgba(17,20,55,.06); }
.card.dark { background: #111437; color: #fff; border-color: #111437; }
.card.lime { background: var(--lime); border-color: var(--lime); }
.card h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.025em; }
.stat { font-size: 38px; font-weight: 950; letter-spacing: -.06em; }
.stat-label { color: var(--muted); font-size: 13px; }
.live-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) 330px; gap: 16px; margin-bottom: 16px; }
.live-panel { background: linear-gradient(135deg, #111437, #23276b); color: #fff; border-radius: 32px; padding: 28px; position: relative; overflow: hidden; min-height: 250px; }
.live-panel:after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(216,240,50,.22); }
.live-panel h3 { font-size: 44px; line-height: .95; letter-spacing: -.06em; margin: 0 0 12px; max-width: 620px; }
.live-panel p { color: rgba(255,255,255,.68); max-width: 560px; line-height: 1.65; }
.channel-stack { display: grid; gap: 12px; }
.channel { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 14px; }
.channel-icon { width: 42px; height: 42px; border-radius: 15px; background: var(--indigo-soft); color: var(--indigo); display: grid; place-items: center; font-weight: 900; }
.list { display: grid; gap: 10px; }
.item { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; display: grid; gap: 7px; }
.item strong { font-size: 14px; }
.item small { color: var(--muted); }
.mobile-preview { background: #111437; border-radius: 32px; padding: 12px; box-shadow: var(--shadow); max-width: 360px; }
.mobile-screen { background: #f7f8fe; border-radius: 24px; padding: 16px; min-height: 500px; display: grid; gap: 12px; }
.mobile-top { display: flex; align-items: center; justify-content: space-between; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; font-weight: 950; }
.progress { height: 10px; border-radius: 999px; background: #e4e5f3; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--indigo); border-radius: inherit; }
.toast { position: fixed; right: 18px; bottom: 18px; background: #111437; color: #fff; padding: 12px 14px; border-radius: 14px; max-width: 420px; box-shadow: 0 18px 50px rgba(0,0,0,.18); z-index: 10; }
.toast.error { background: #5c1522; }
.hidden { display: none !important; }
@media (max-width: 1050px) {
  .hero-grid, .live-hero { grid-template-columns: 1fr; }
  .phone-stage { min-height: auto; }
  .surface-row, .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .landing-links { display: none; }
  .hero-copy h2 { font-size: 48px; }
  .phone { width: min(322px, 100%); }
}
