:root {
  --bg: #050f0a;
  --bg2: #08170f;
  --panel: #0c1d14;
  --panel2: #10261a;
  --field: #071209;
  --line: #1b3a28;
  --line2: #24503a;
  --text: #eaf5ee;
  --muted: #8ea597;
  --green: #3ee08a;
  --green2: #22c06a;
  --greenbg: #123d26;
  --gold: #f6c544;
  --red: #ff6f6f;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -5%, #0f3a2466, transparent 70%),
    radial-gradient(700px 500px at -10% 100%, #0b2f1d55, transparent 70%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
}
a { color: var(--green); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nút & form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  padding: 10px 18px; border-radius: 9px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: .15s;
}
.btn:hover { border-color: var(--green2); background: #143021; }
.btn.primary { background: linear-gradient(180deg, #4cf09a, #22c06a); color: #032010; border-color: transparent; box-shadow: 0 6px 20px #22c06a33; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 13px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.input {
  width: 100%; padding: 11px 14px; border-radius: 9px; border: 1px solid var(--line2);
  background: var(--field); outline: none; transition: .15s;
}
.input:focus { border-color: var(--green2); box-shadow: 0 0 0 3px #22c06a22; }
.iconfield { position: relative; }
.iconfield > svg.i:first-child { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.iconfield .input { padding-left: 40px; }
.iconfield .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; display: grid; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
label.field > span b { color: var(--red); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); }
.check input { accent-color: var(--green); width: 16px; height: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.gold { color: var(--gold); }
.green { color: var(--green); }
.card { background: linear-gradient(180deg, #0d2016, #091811); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--greenbg); color: var(--green); border: 1px solid #1f6a40; }
.pill.warn { background: #3a3110; color: var(--gold); border-color: #5c4c18; }
.pill.err { background: #3a1616; color: var(--red); border-color: #5c2222; }
.pill.gray { background: #18241e; color: var(--muted); border-color: var(--line); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Logo ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand b { display: block; font-size: 15px; font-weight: 800; line-height: 1.15; }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }

/* ---------- Landing ---------- */
.lp { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }
.topnav { display: flex; align-items: center; gap: 28px; padding: 16px 0; }
.topnav .links { display: flex; gap: 30px; margin-left: 40px; }
.topnav .links a { color: var(--text); font-weight: 500; opacity: .85; }
.topnav .links a:hover { color: var(--green); opacity: 1; }
.topnav .acts { margin-left: auto; display: flex; gap: 10px; }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line2); border-radius: 9px; padding: 8px; cursor: pointer; }
.heroframe {
  position: relative; border: 1px solid var(--line2); border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(600px 400px at 75% 40%, #1d7a4a40, transparent 70%),
    linear-gradient(110deg, #061209 0%, #0a2215 45%, #0d2c1b 100%);
  box-shadow: 0 0 0 1px #3ee08a14, 0 30px 80px #0009;
}
.heroframe::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px 260px at 10% 0%, #3ee08a18, transparent 70%);
}
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 10px; align-items: center; padding: 40px 0 30px 48px; position: relative; }
.hero h1 { font-size: 54px; line-height: 1.04; font-weight: 800; letter-spacing: -1px; margin: 16px 0 12px; text-transform: uppercase; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .sub { font-size: 16px; color: #cfe0d6; }
.checks { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 12px; font-size: 15px; font-weight: 500; }
.checks li { display: flex; align-items: center; gap: 10px; }
.checks li::before { content: '✓'; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #032010; font-size: 12px; font-weight: 900; }
.hero .art { align-self: stretch; display: flex; align-items: center; justify-content: flex-end; }
.hero .art img { width: 100%; max-width: 620px; display: block; border-radius: 0 0 0 30px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%); mask-image: linear-gradient(90deg, transparent, #000 10%); }
.featbar { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 48px 28px; border: 1px solid var(--line2); border-radius: 14px; background: #06130bcc; backdrop-filter: blur(6px); }
.featbar > div { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.featbar > div + div { border-left: 1px solid var(--line); }
.featbar svg.i { width: 30px; height: 30px; color: var(--green); stroke-width: 1.5; }
.featbar b { display: block; font-size: 14px; }
.featbar span { font-size: 12.5px; color: var(--muted); }
.section { margin-top: 56px; }
.section h2 { font-size: 28px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.section > p { text-align: center; color: var(--muted); margin-bottom: 26px; }
.lpplans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 900px; margin: 0 auto; }
.lpplans .card { text-align: center; padding: 26px 20px; }
.lpplans .card.hot { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset, 0 10px 40px #22c06a22; }
.lpplans b.price { display: block; font-size: 30px; font-weight: 800; margin: 10px 0 4px; }
.guide { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.guide .card b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #032010; margin-bottom: 12px; }
.footer { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 56px; }

/* ---------- Đăng nhập ---------- */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.authbox { width: 100%; max-width: 860px; display: grid; grid-template-columns: 1fr 1.15fr; border: 1px solid var(--line2); border-radius: 20px; overflow: hidden; background: #08170f; box-shadow: 0 30px 80px #000a, 0 0 0 1px #3ee08a10; }
.authbox .art { background: url(/img/login-art.png) center / cover no-repeat; min-height: 480px; }
.authbox .form { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; }
.authbox h2 { font-size: 26px; font-weight: 800; }
.authbox .lead { color: var(--muted); margin: 6px 0 24px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.gbtn { width: 100%; justify-content: center; }
.gbtn img { width: 18px; height: 18px; }

/* ---------- Khung ứng dụng ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 18px 12px; background: #040d08e6; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .brand { padding: 2px 4px 22px; }
.side .brand b { font-size: 13.5px; white-space: nowrap; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; color: #b5c8bc; font-weight: 500; }
.nav a:hover { color: var(--text); background: #0e2117; }
.nav a.on { background: linear-gradient(90deg, #165133, #0f3322); color: var(--green); font-weight: 700; box-shadow: inset 2px 0 0 var(--green); }
.side .spacer { flex: 1; }
.side .me { border-top: 1px solid var(--line); padding: 14px 8px 0; display: grid; gap: 10px; }
.main { padding: 26px 32px 60px; min-width: 0; max-width: 1240px; }
.head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.head h2 { font-size: 24px; font-weight: 800; }
.head p { margin-top: 5px; color: var(--muted); }
.headacts { margin-left: auto; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.wallet { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line2); background: linear-gradient(180deg, #0f2419, #0a1a12); padding: 9px 16px 9px 10px; border-radius: 12px; }
.wallet .ico { width: 36px; height: 36px; border-radius: 9px; background: var(--greenbg); display: grid; place-items: center; color: var(--green); }
.wallet small { display: block; color: var(--muted); font-size: 11.5px; }
.wallet b { font-size: 17px; font-weight: 800; }
.mobilebar { display: none; }
.drawer { display: none; }
.banner { background: #2c260c; color: var(--gold); border: 1px solid #54471a; padding: 9px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 18px; }

.tabs { display: flex; gap: 0; border: 1px solid var(--line2); border-radius: 11px; padding: 4px; margin-bottom: 16px; background: var(--field); }
.tabs button { flex: 1; border: 0; background: transparent; padding: 11px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 600; }
.tabs button.on { background: linear-gradient(180deg, #17583a, #10402a); color: var(--green); box-shadow: inset 0 0 0 1px #2a7a50; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line2); background: var(--panel2); padding: 8px 16px; border-radius: 9px; cursor: pointer; color: #c3d4ca; font-weight: 600; font-size: 13px; }
.chips button.on { background: linear-gradient(180deg, #4cf09a, #22c06a); color: #032010; border-color: transparent; }

/* ---------- Nạp tiền ---------- */
.dep { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; }
.qrbox { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qrbox .qr { width: 190px; height: 190px; border-radius: 12px; background: #fff; padding: 8px; flex: none; }
.bankinfo { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--field); }
.mb { font-weight: 900; font-size: 24px; letter-spacing: -.5px; color: #e23b3b; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.mb span { color: #1f4ea8; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; word-break: break-all; }
.copy { background: none; border: 1px solid var(--line2); border-radius: 6px; padding: 3px; cursor: pointer; color: var(--green); display: grid; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #032010; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.cardh { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cardh h3 { font-size: 16px; font-weight: 700; }

/* ---------- Thuê máy ---------- */
.rent { display: grid; grid-template-columns: 1fr 1.05fr; gap: 16px; align-items: start; }
.chipcard .top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.chipcard h3 { font-size: 22px; font-weight: 800; }
.qc { margin-left: auto; text-align: center; font-size: 10px; color: var(--muted); }
.qc div { width: 52px; height: 52px; border-radius: 12px; background: #fff; display: grid; place-items: center; margin-bottom: 4px; }
.qc div span { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff5a4a, #c4161c); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 11px; }
.spec { display: grid; gap: 4px; }
.spec div { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.spec div:last-child { border-bottom: 0; }
.spec svg.i { color: var(--muted); }
.spec span { color: var(--muted); min-width: 92px; }
.spec b { font-weight: 600; }
.plans { display: grid; gap: 10px; margin-bottom: 18px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 11px; cursor: pointer; background: var(--field); transition: .15s; }
.plan:hover { border-color: #2f6a4a; }
.plan.on { border-color: var(--green); background: linear-gradient(90deg, #0f3322, #0b2418); box-shadow: 0 0 0 1px var(--green) inset; }
.plan input { accent-color: var(--green); width: 17px; height: 17px; margin: 0; }
.plan b { font-size: 15px; }
.plan .price { margin-left: auto; text-align: right; font-weight: 800; font-size: 15px; }
.plan .price small { display: inline-block; margin-top: 4px; font-weight: 600; font-size: 11px; color: #032010; background: var(--green); padding: 1px 7px; border-radius: 5px; }

/* ---------- Máy của tôi ---------- */
.devices { display: grid; gap: 16px; }
.device { display: grid; grid-template-columns: 116px 1fr auto; gap: 20px; align-items: start; padding: 20px 22px; }
.device .thumb { width: 116px; aspect-ratio: 62/100; border-radius: 16px; background: url(/img/thumb.png) center / cover; border: 2px solid #2f5a42; box-shadow: 0 8px 26px #0008; }
.device h3 { font-size: 21px; font-weight: 800; margin: 10px 0 12px; }
.device .info { display: grid; gap: 8px; font-size: 13.5px; }
.device .info div { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.device .info b { color: var(--text); font-weight: 600; }
.device .left { text-align: right; white-space: nowrap; }
.device .left .d { font-size: 15px; }
.device .left .d b { color: var(--gold); font-size: 22px; font-weight: 800; }
.device .actions { grid-column: 2 / -1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.device .actions .btn { min-width: 128px; }
.device .actions .menu .btn { min-width: 0; }
.progress { margin-top: 10px; font-size: 13px; color: var(--gold); display: flex; align-items: center; gap: 8px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #f6c54444; border-top-color: var(--gold); animation: sp 1s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.menu { position: relative; }
.menu .pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; min-width: 190px; z-index: 5; box-shadow: 0 14px 40px #000a; display: none; }
.menu.open .pop { display: grid; }
.menu .pop button { background: none; border: 0; text-align: left; padding: 9px 12px; border-radius: 7px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.menu .pop button:hover { background: #18382a; }

/* ---------- Bảng ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: #0a1a12; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.num { font-weight: 700; }
.plus { color: var(--green); }
.minus { color: var(--red); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.ttype { color: var(--green); font-weight: 600; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: #000b; backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 22px 24px; }
.modal .mh { display: flex; align-items: center; margin-bottom: 6px; }
.modal .mh h3 { font-size: 18px; font-weight: 800; }
.modal .x { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); display: grid; padding: 4px; }
.curdev { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin: 14px 0 18px; background: var(--field); }
.curdev .thumb { width: 44px; height: 60px; border-radius: 9px; background: url(/img/thumb.png) center / cover; }
.radios { display: grid; gap: 11px; margin: 12px 0 18px; }
.radios label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.radios input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.mfoot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

#toast { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 99; }
#toast div { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--green); padding: 12px 16px; border-radius: 10px; max-width: 360px; box-shadow: 0 10px 30px #000a; }
#toast div.err { border-left-color: var(--red); }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.stats .card b { display: block; font-size: 26px; font-weight: 800; margin-top: 6px; }
.support { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.red { color: var(--red); }
.shell > div { min-width: 0; }
.pill { white-space: nowrap; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { display: grid; gap: 6px; padding: 16px 18px; }
.stat b { font-size: 22px; font-weight: 800; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 8px; height: 220px; align-items: end; }
.bar { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; }
.bar .cols { display: flex; gap: 3px; align-items: flex-end; height: 100%; border-bottom: 1px solid var(--line2); }
.bar .cols i { flex: 1; min-height: 2px; border-radius: 4px 4px 0 0; opacity: .9; }
.bar span { font-size: 11px; color: var(--muted); text-align: center; }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 12px; vertical-align: -1px; }
.shell.admin .side { background: #0a0d06e6; }
.shell.admin .nav a.on { background: linear-gradient(90deg, #3a3110, #241f0a); color: var(--gold); box-shadow: inset 2px 0 0 var(--gold); }
@media (max-width: 1100px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .statgrid { grid-template-columns: 1fr; } .bars { gap: 3px; } .bar span { font-size: 9px; } }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 700px) { .fgrid { grid-template-columns: 1fr; } }

/* ---------- Mobile ---------- */
@media (max-width: 960px) {
  .topnav .links, .topnav .acts { display: none; }
  .burger { display: grid; }
  .lp { padding: 0 14px 30px; }
  .hero { grid-template-columns: 1fr; padding: 26px 20px 10px; }
  .hero h1 { font-size: 34px; }
  .hero .art img { border-radius: 16px; -webkit-mask-image: none; mask-image: none; }
  .featbar { grid-template-columns: 1fr 1fr; margin: 0 14px 18px; }
  .featbar > div + div { border-left: 0; }
  .featbar > div { padding: 12px 14px; }
  .lpplans, .guide { grid-template-columns: 1fr; }
  .authbox { grid-template-columns: 1fr; }
  .authbox .art { min-height: 220px; background-position: center 35%; }
  .authbox .form { padding: 26px 22px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobilebar { display: flex; position: sticky; top: 0; z-index: 20; background: #040d08f2; border-bottom: 1px solid var(--line); padding: 10px 16px; align-items: center; gap: 10px; backdrop-filter: blur(6px); }
  .mobilebar .burger { display: grid; }
  .drawer.open { display: block; position: fixed; inset: 57px 0 0 0; z-index: 19; background: #040d08f7; padding: 12px 16px; }
  .main { padding: 18px 16px 40px; }
  .head { flex-wrap: wrap; }
  .headacts { margin-left: 0; width: 100%; justify-content: space-between; }
  .dep, .rent, .stats, .support { grid-template-columns: 1fr; }
  .qrbox .qr { margin: 0 auto; }
  .device { grid-template-columns: 76px 1fr; gap: 14px; padding: 16px; }
  .device .thumb { width: 76px; }
  .device .left { grid-column: 1 / -1; text-align: left; border-top: 1px dashed var(--line); padding-top: 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
  .device .info div { display: block; }
  .device .info svg.i { vertical-align: -4px; margin-right: 6px; }
  .device .actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; }
  .device .actions .btn { min-width: 0; }
  .device .actions .btn.primary { grid-column: 1 / -1; }
  .menu .pop { right: auto; left: 0; }
}
