:root {
  --bg: #0f0a16; --bg2: #160f20; --panel: #1d1429; --panel2: #271a38; --line: #352650; --text: #f6f0ff; --muted: #a897c2;
  --gold: #ffcf5a; --gold2: #ffb238; --accent: #ff3b6b; --ok: #3ddc97; --warn: #ffb347; --radius: 16px;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.6;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.hidden { display: none !important; }

/* Thanh trên */
.top { position: sticky; top: 0; z-index: 20; background: rgba(15, 10, 22, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { font-weight: 900; font-size: 20px; color: var(--gold); display: flex; gap: 8px; align-items: center; }
.logo:hover { text-decoration: none; }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.top nav a:not(.btn) { color: var(--text); padding: 8px 10px; border-radius: 10px; }
.top nav a:not(.btn):hover { background: var(--panel); text-decoration: none; }

/* Nút, ô nhập */
.btn, button {
  font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); cursor: pointer; text-decoration: none;
}
.btn:hover, button:hover { filter: brightness(1.15); text-decoration: none; }
.btn.primary, button.primary { background: linear-gradient(135deg, var(--accent), #ff6a3d); border-color: transparent; color: #fff; }
.btn.gold, button.gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); border-color: transparent; color: #2a1600; }
.btn.ghost, button.ghost { background: transparent; }
button.small, .btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
button:disabled { opacity: .5; cursor: default; filter: none; }
input, textarea, select {
  font: inherit; color: var(--text); background: #0c0712; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid #7a58b8; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.check { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 15px; margin: 12px 0 0; cursor: pointer; }
.check input { width: 18px; height: 18px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack > * + * { margin-top: 16px; }
@media (max-width: 860px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

/* Trang chủ */
.hero { padding: 72px 0 48px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); font-weight: 900; }
.hero h1 span { background: linear-gradient(135deg, var(--gold), #ff8a5c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); }
.phone { justify-self: center; width: min(320px, 100%); aspect-ratio: 9 / 16; border-radius: 28px; border: 6px solid #2c2140; overflow: hidden; box-shadow: 0 30px 80px rgba(255, 120, 60, .25); background: #000 center / cover; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } }
section.block { padding: 48px 0; }
section.block > .wrap > h2 { font-size: 30px; text-align: center; }
section.block > .wrap > p.sub { text-align: center; color: var(--muted); margin-bottom: 28px; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature b { color: var(--gold); font-size: 20px; line-height: 1.2; }
.steps { counter-reset: s; }
.steps .card { position: relative; padding-top: 34px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: -16px; left: 22px; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #2a1600; font-weight: 900; display: grid; place-items: center; }

/* Bảng giá */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; }
.plan.popular { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 20px 50px rgba(255, 190, 70, .12); }
.plan .tag { position: absolute; top: -12px; right: 18px; background: var(--gold); color: #2a1600; font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 99px; }
.plan .price { font-size: 32px; font-weight: 900; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { padding-left: 18px; margin: 8px 0 14px; color: var(--muted); }
.plan .btn, .plan button { margin-top: auto; }

/* Liên hệ */
.contact-list { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; }
.fab > button { border-radius: 99px; padding: 12px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.fab .menu { position: absolute; right: 0; bottom: 56px; width: 260px; display: none; }
.fab.open .menu { display: block; }
.fab .menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.fab .menu a:hover { background: var(--panel2); text-decoration: none; }

/* Form đăng nhập */
.auth { max-width: 420px; margin: 56px auto; }
.msg { min-height: 22px; margin-top: 10px; font-size: 14px; }
.msg.err { color: #ff7a93; } .msg.ok { color: var(--ok); }

/* Bảng điều khiển */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }
.side { border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--bg2); }
.side button { justify-content: flex-start; background: transparent; border: 0; font-weight: 600; text-align: left; }
.side button.active { background: var(--panel2); }
.side button:disabled { opacity: .4; }
.side .sub { margin-top: auto; padding: 12px; font-size: 13px; color: var(--muted); }
.main { padding: 26px; overflow: auto; }
.main > section { display: none; max-width: 980px; }
.main > section.active { display: block; }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); } .side .sub { display: none; } }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--panel2); }
.pill.ok { background: rgba(61, 220, 151, .15); color: var(--ok); }
.pill.warn { background: rgba(255, 179, 71, .15); color: var(--warn); }
.pill.bad { background: rgba(255, 59, 107, .15); color: #ff7a93; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.platform { cursor: pointer; text-align: center; padding: 26px 16px; }
.platform.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.platform.off { opacity: .45; cursor: not-allowed; }
.platform .ico { font-size: 38px; }
.qr { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.qr img { width: 100%; border-radius: 12px; background: #fff; }
@media (max-width: 860px) { .qr { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.kv > :nth-child(odd) { color: var(--muted); }
.status { display: flex; align-items: center; gap: 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #666; flex: none; }
.dot.live { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.dot.wait { background: var(--warn); }
.stat { background: var(--panel2); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 22px; }
.preview { width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border: 0; border-radius: 14px; background: #000; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { background: transparent; }
.tabs button.active { background: var(--panel2); border-color: var(--gold); }
.chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .chars { grid-template-columns: repeat(2, 1fr); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2d1f44; border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }
footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; }
