/* ============================================================
   MANIE On Cloud — หน้าตาเว็บ (ดำ-ทอง)
   ไฟล์นี้มีแต่การตกแต่ง ไม่มีตรรกะธุรกิจอะไรให้แกะ
   ============================================================ */
:root {
  --bg: #0b0c0e;
  --bg2: #121418;
  --card: #16191f;
  --line: #242832;
  --tx: #e9ecf1;
  --mut: #8d95a5;
  --gold: #e3b341;
  --gold2: #f5cf6b;
  --ok: #3fb950;
  --warn: #e0674a;
  --r: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: "Sukhumvit Set", "IBM Plex Sans Thai", "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 5vw, 46px); letter-spacing: -0.5px; }
h2 { font-size: clamp(21px, 3vw, 30px); }
h3 { font-size: 17px; }
s { color: var(--mut); font-weight: 400; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--mut); }
.sm { font-size: 14px; }
.xs { font-size: 12.5px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: #1a1400;
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn.sm { padding: 7px 13px; font-size: 14px; border-radius: 9px; }
.btn.big { padding: 14px 28px; font-size: 17px; }
.btn.w { width: 100%; }
.btn.ghost { background: transparent; color: var(--tx); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.danger { background: transparent; color: var(--warn); border: 1px solid var(--warn); }

/* ---------- ฟอร์ม ---------- */
.inp {
  background: #0e1014;
  border: 1px solid var(--line);
  color: var(--tx);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  width: 100%;
  min-width: 0;
}
.inp:focus { outline: none; border-color: var(--gold); }
.inp.sm { padding: 6px 9px; font-size: 14px; width: auto; }
select.inp { cursor: pointer; }
textarea.inp { resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .inp { flex: 1 1 180px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.lbl { display: block; font-size: 13px; color: var(--mut); margin: 14px 0 6px; }

/* ============================================================
   หน้าขาย
   ============================================================ */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 12, 14, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav nav { display: flex; gap: 20px; align-items: center; }
.nav nav a { color: var(--tx); font-size: 15px; }
.nav nav a.btn { color: #1a1400; }
.logo { font-weight: 800; letter-spacing: 0.3px; }

.hero { padding: clamp(50px, 9vw, 104px) 0; background: radial-gradient(1000px 420px at 50% -80px, #2a2412 0%, transparent 70%); text-align: center; }
.hero .lead { color: var(--mut); font-size: clamp(16px, 2.2vw, 19px); max-width: 620px; margin: 0 auto 26px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-pts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero-pts span { border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px; font-size: 13.5px; color: var(--mut); }

.sec { padding: clamp(44px, 7vw, 82px) 0; }
.sec.alt { background: var(--bg2); border-block: 1px solid var(--line); }
.sec h2 { text-align: center; margin-bottom: 34px; }

.grid2, .grid3, .grid4 { display: grid; gap: 16px; }
/* ฟอร์มข้อมูลสินค้า: 2 คอลัมน์บนจอกว้าง · 1 คอลัมน์บนมือถือ */
.grid2 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 16px; margin-bottom: 12px; }
.grid2 .inp.sm { width: 100%; }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.itm { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.itm p { color: var(--mut); margin: 0; font-size: 15px; }
.steps .num { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #1a1400; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }

/* ---------- แพ็ก ---------- */
.plans { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 22px; }
.plan.hl { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.plan.cur { border-color: var(--ok); }
.plan .tag { position: absolute; top: -12px; left: 22px; background: var(--gold); color: #1a1400; font-size: 12px; font-weight: 800; padding: 3px 11px; border-radius: 999px; }
.plan-name { font-weight: 700; color: var(--mut); }
.plan-price { font-size: 34px; font-weight: 800; letter-spacing: -1px; }
.plan-price .per { font-size: 14px; font-weight: 500; color: var(--mut); letter-spacing: 0; margin-left: 4px; }
.plan-price .ask { font-size: 20px; color: var(--gold); }
.plan-ch { color: var(--gold); font-size: 14px; margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.plan li { padding-left: 22px; position: relative; font-size: 15px; color: var(--mut); margin-bottom: 7px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
.cur-tag { text-align: center; color: var(--ok); font-weight: 700; font-size: 14px; }

.faq { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--mut); margin: 10px 0 0; font-size: 15px; }
.honest { color: var(--mut); font-size: 13.5px; border-left: 3px solid var(--line); padding-left: 14px; margin-top: 26px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--mut); font-size: 14px; }
.foot .wrap { display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- หน้าเอกสาร (ข้อตกลง / ความเป็นส่วนตัว / คู่มือ) ---------- */
.itm.doc { margin-bottom: 14px; }
.itm.doc h3 { display: flex; align-items: center; gap: 10px; }
.num.inline { width: 26px; height: 26px; font-size: 14px; margin: 0; flex: none; }
.tick { list-style: none; padding: 0; margin: 10px 0 0; }
.tick li { position: relative; padding-left: 22px; color: var(--mut); font-size: 15px; margin-bottom: 7px; }
.tick li::before { content: "→"; position: absolute; left: 0; color: var(--gold); }
.steps-ol { padding-left: 20px; margin: 0 0 16px; color: var(--mut); }
.steps-ol li { margin-bottom: 8px; }
.steps-ol b { color: var(--tx); }
.contactbox { border-color: var(--gold); }

/* ============================================================
   เข้าสู่ระบบ
   ============================================================ */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth { width: 100%; max-width: 420px; }
.back { font-size: 14px; display: inline-block; margin-bottom: 14px; }
.auth-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px; }
.auth-box .logo { text-align: center; margin-bottom: 22px; font-size: 19px; }
.tabs { display: flex; gap: 6px; background: #0e1014; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; background: transparent; border: 0; color: var(--mut); font: inherit; padding: 9px; border-radius: 8px; cursor: pointer; }
.tab.on { background: var(--card); color: var(--tx); font-weight: 700; }
.chk { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--mut); }
.chk input { width: 17px; height: 17px; accent-color: var(--gold); }
.linkbtn { background: none; border: 0; color: var(--gold); font: inherit; font-size: 14px; cursor: pointer; padding: 0; text-decoration: underline; }
.msg { min-height: 22px; margin-top: 14px; font-size: 14.5px; text-align: center; }
.msg.err { color: var(--warn); }
.msg.ok { color: var(--ok); }

/* ============================================================
   จอลูกค้า
   ============================================================ */
.app-page { background: var(--bg); }
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.nvs { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nv { background: transparent; border: 0; color: var(--mut); font: inherit; text-align: right; padding: 10px 13px; border-radius: 9px; cursor: pointer; }
.nv:hover { background: var(--card); color: var(--tx); }
.nv.on { background: var(--card); color: var(--gold); font-weight: 700; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.who { font-size: 14px; color: var(--mut); word-break: break-all; }

.main { padding: 22px clamp(16px, 3vw, 34px) 60px; }
.topbar { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 18px; }
.toast { font-size: 14.5px; color: var(--ok); }
.toast.err { color: var(--warn); }
.view { max-width: 980px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 26px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card .k { color: var(--mut); font-size: 13.5px; }
.card .v { font-size: 30px; font-weight: 800; }
.card .u { font-size: 14px; color: var(--mut); font-weight: 500; margin-left: 5px; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); padding: 34px; text-align: center; color: var(--tx); }
.banner { border-radius: 12px; padding: 13px 17px; margin-bottom: 18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner.warn { background: #2a1713; border: 1px solid var(--warn); }
.banner.trial { background: #201c0e; border: 1px solid var(--gold); justify-content: space-between; }
.trialbox { border-color: var(--gold); }

.tbl { width: 100%; border-collapse: collapse; margin-bottom: 22px; font-size: 15px; }
.tbl th { text-align: right; color: var(--mut); font-weight: 600; font-size: 13.5px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.kv td:first-child { color: var(--mut); width: 42%; }

.pill { display: inline-block; font-size: 12.5px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--mut); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: #1f3d24; background: #10200f; }
.pill.warn { color: var(--warn); border-color: #45241c; background: #21120e; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 7px; background: var(--mut); }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px #10200f; }
.dot.off { background: var(--mut); }

.chans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.chan { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.chan-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.chan-name { font-weight: 700; font-size: 17px; }
.chan-stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 16px 0 4px; }
.chan-stats .k { display: block; color: var(--mut); font-size: 12.5px; }
.setup { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 6px; }
.chan-act { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.note { background: #0e1014; border-radius: 10px; padding: 10px 13px; font-size: 14px; color: var(--mut); margin-top: 12px; }

.lock { background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); padding: 40px 26px; text-align: center; }
.lock-ic { font-size: 34px; margin-bottom: 10px; }
.lock p { color: var(--mut); }

.bar { height: 6px; background: #0e1014; border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar > div { height: 100%; width: 0; background: var(--gold); transition: width 0.2s ease; }

/* ---------- จอเล็ก ---------- */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
  .nvs { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
  .nv { white-space: nowrap; }
  .side-foot { border: 0; padding: 0; flex-direction: row; align-items: center; }
  .nav nav a:not(.btn) { display: none; }
}

/* ---- หน้าวิธีใช้งาน (/guide) ---- */
ol.steps { margin: 6px 0 10px 20px; padding: 0; }
ol.steps li { margin-bottom: 7px; line-height: 1.6; }
.itm.doc .tbl { display: block; overflow-x: auto; }   /* ตารางยาวบนมือถือให้เลื่อนได้ ไม่ดันจอ */
.itm.doc .tbl th:first-child, .itm.doc .tbl td:first-child { text-align: left; min-width: 150px; }
.qa { padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa:last-child { border-bottom: 0; }
.qa .q { margin: 0 0 4px; }
.qa p { line-height: 1.65; }

/* ---- รายการที่ยังต้องทำก่อนเปิดไลฟ์ ---- */
.todo { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; }
.todo ul { margin: 6px 0 0; padding-left: 2px; list-style: none; }
.todo li { line-height: 1.9; }
.todo li.done { color: var(--mut); }

/* กล่องข้อความยาว (ตัวอย่างบทขาย ฯลฯ) — ไม่หายเองเหมือน toast */
.msgPanel { background: var(--card); border: 1px solid var(--gold); border-radius: var(--r);
            padding: 16px 18px; margin-bottom: 18px; }
.msgPanel.err { border-color: var(--warn); }
.msgPanel .msgBody { white-space: pre-line; font-size: 14.5px; line-height: 1.8; margin-bottom: 10px; }
