/* H'INVEST — Sổ cổ đông hệ sinh thái.
 * Bám sát giao diện gốc hgroup.io.vn/hinvest: cùng biến màu, nền bg-app.png, thẻ viền neon chạy (conic-gradient xoay)
 * + nháy sáng (neon-blink), lưới icon, thanh tab đáy 7 ô với nút H ở giữa. Ảnh nền/banner/nút H đặt ở layout.php (UI_ASSET_URL).
 */
:root {
  --maxw: 440px;
  --line: rgba(239, 68, 68, .38);
  --line-soft: rgba(239, 68, 68, .22);
  --neon: #ff2d2d;
  --glow: rgba(239, 68, 68, .28);
  --red: #ff3b30;
  --red-soft: #ff6b5a;
  --gold: #ffb454;
  --green: #34d399;
  --txt: #ffe9e6;
  --muted: #b58a86;
  --panel: rgba(28, 6, 8, .62);
  --tile: radial-gradient(circle at 50% 29%, rgba(255, 132, 72, .10), transparent 42%), linear-gradient(155deg, rgba(48, 7, 10, .76), rgba(13, 2, 4, .88));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #060102; }
body {
  margin: 0; min-height: 100vh; color: var(--txt);
  font-family: "Segoe UI", Roboto, Arial, sans-serif; font-size: 13px; line-height: 1.4;
  background-color: #060102; background-attachment: fixed;
  /* background-image: đặt trong layout.php (có url bg-app.png) */
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }

.app {
  position: relative; width: min(100vw, var(--maxw)); min-height: 100vh; margin: 0 auto;
  border-left: 1px solid rgba(239, 68, 68, .18); border-right: 1px solid rgba(239, 68, 68, .18);
}
.screen { position: relative; padding: 0 14px calc(98px + env(safe-area-inset-bottom)); }
.screen.has-sub { padding-top: 4px; }

/* ═════════ VIỀN NEON CHẠY (y hệt bản gốc) ═════════ */
@property --neon-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.neon, .card, .eco, .pd, .hrow.me, .hdna { position: relative; isolation: isolate; }
.neon::after, .card::after, .eco::after, .pd::after, .hrow.me::after, .hdna::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.6px;
  background: conic-gradient(from var(--neon-a),
    transparent 0deg 55deg, rgba(255, 45, 45, .35) 80deg, var(--neon) 104deg, #fff 118deg,
    var(--neon) 132deg, rgba(255, 45, 45, .5) 156deg, transparent 185deg 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: neon-run 2.8s linear infinite; pointer-events: none; z-index: 5; filter: drop-shadow(0 0 4px var(--neon));
}
.neon, .card, .hdna, .pd { animation: neon-blink 2.8s ease-in-out infinite; }
.card:nth-of-type(2n)::after, .card:nth-of-type(2n) { animation-delay: -1.4s; }
.eco:nth-child(5n+2)::after, .hrow:nth-child(3n+2)::after { animation-delay: -.5s; }
.eco:nth-child(5n+3)::after, .pd:nth-child(2)::after { animation-delay: -1s; }
.eco:nth-child(5n+4)::after, .pd:nth-child(3)::after { animation-delay: -1.6s; }
.eco:nth-child(5n+5)::after { animation-delay: -2.2s; }
@keyframes neon-run { 100% { --neon-a: 360deg; } }
@keyframes neon-blink {
  0%, 100% { box-shadow: 0 0 10px var(--glow), inset 0 0 16px rgba(255, 45, 45, .06); }
  50% { box-shadow: 0 0 20px rgba(255, 45, 45, .45), inset 0 0 20px rgba(255, 45, 45, .12); }
}

/* ═════════ HERO (ảnh banner + topbar đè lên) ═════════ */
.hero { position: relative; margin: 0 -14px; }
.hero-banner { width: 100%; height: auto; display: block; min-height: 120px; background: radial-gradient(60% 60% at 50% 55%, rgba(255, 45, 45, .35), transparent 70%); }
.topbar { position: absolute; left: 14px; right: 14px; top: 8px; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.hd-profile { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hd-who { display: grid; gap: 2px; }
.hd-who strong { font-size: 10.5px; font-weight: 700; white-space: nowrap; max-width: 92px; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px #000; }
.vip-tag { justify-self: start; font-size: 7.5px; font-weight: 800; letter-spacing: .4px; color: #fff;
  background: linear-gradient(90deg, #b3121a, #ff3b30); border-radius: 99px; padding: 1.5px 7px; box-shadow: 0 0 8px rgba(255, 59, 48, .55); white-space: nowrap; }
.hd-bell { position: relative; width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; }
.hd-bell svg { width: 19px; height: 19px; color: #ffdad4; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(255, 59, 48, .6)); }
.hd-badge { position: absolute; top: 0; right: 0; min-width: 14px; height: 14px; padding: 0 3px; display: grid; place-items: center; border-radius: 99px;
  background: #ff2d2d; color: #fff; font-size: 8px; font-weight: 800; box-shadow: 0 0 8px rgba(255, 45, 45, .9); }

/* ═════════ AVATAR ═════════ */
.av { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  overflow: hidden; border: 1.5px solid var(--red); box-shadow: 0 0 10px var(--glow); background: linear-gradient(150deg, #3a0b0c, #7c1414); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.noimg::after { content: attr(data-i); font-weight: 900; color: #fff; font-size: 14px; text-shadow: 0 0 8px rgba(255, 59, 48, .8); }
.av.sm { width: 30px; height: 30px; } .av.sm::after { font-size: 12px; }
.av.md { width: 44px; height: 44px; } .av.md::after { font-size: 17px; }
.av.xl { width: 58px; height: 58px; border-width: 2px; } .av.xl::after { font-size: 23px; }
.av.lg { width: 82px; height: 82px; border-width: 2px; box-shadow: 0 0 16px rgba(255, 59, 48, .55); } .av.lg::after { font-size: 32px; }

/* ═════════ THẺ ═════════ */
.card { margin-top: 10px; border-radius: 16px; padding: 12px 14px; border: 1.5px solid var(--line); background: var(--panel); box-shadow: 0 0 12px var(--glow); }
.asset-card { margin-top: 10px; }
.asset-top { display: flex; align-items: flex-start; gap: 10px; }
.asset-left { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.asset-right { flex: 0 0 46%; display: grid; gap: 2px; }
.asset-label, .lbl { display: flex; align-items: center; gap: 5px; font-size: 8.5px; font-weight: 700; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; }
.eye-btn { width: 15px; height: 15px; display: grid; place-items: center; color: var(--muted); }
.eye-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.asset-value { font-size: 27px; font-weight: 900; letter-spacing: .5px; line-height: 1.15; word-break: break-all; }
.asset-value small { font-size: 12px; font-weight: 800; color: var(--muted); }
.profit-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.profit { font-size: 14px; font-weight: 900; color: var(--green); }
.profit small { font-size: 8px; font-weight: 700; color: var(--muted); }
.profit-pct { font-size: 9px; font-weight: 800; color: var(--green); }
.asset-spark { width: 100%; height: 34px; margin-top: 2px; filter: drop-shadow(0 0 5px rgba(52, 211, 153, .5)); }
.asset-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.asset-mini div { display: grid; gap: 1px; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line-soft); }
.asset-mini b { font-size: 13px; }
.asset-actions { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.aact { display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; min-width: 0; }
.aact + .aact::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1px; height: 16px; background: var(--line-soft); }
.aact .aic { width: 18px; height: 18px; flex: 0 0 18px; color: var(--red-soft); }
.aact .aic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aact span:last-child { font-size: 8px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }

.sec-title { margin-top: 16px; text-align: center; font-size: 12.5px; font-weight: 900; letter-spacing: 1.6px; color: #ffd0c6;
  text-shadow: 0 0 10px rgba(255, 59, 48, .6); text-transform: uppercase; }
.sec-title i { font-style: normal; color: var(--red); font-size: 9px; vertical-align: middle; }
.sec-head { position: relative; margin-top: 16px; }
.sec-head .sec-title { margin-top: 0; }
.sec-head .more { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.more { font-size: 9px; font-weight: 800; letter-spacing: .3px; color: var(--red-soft); }

.muted { color: var(--muted); } .green { color: var(--green); } .gold { color: var(--gold); } .red { color: var(--red-soft); }
.small { font-size: 11.5px; } .tiny { font-size: 10px; } .center { text-align: center; } .b { font-weight: 800; }
.empty { text-align: center; padding: 22px 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }

/* ═════════ LƯỚI ICON (y bản gốc) ═════════ */
.eco-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px 6px; margin-top: 12px; }
.eco { --icon-rgb: 255, 132, 72; display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; min-height: 86px; padding: 8px 2px 7px;
  border-radius: 13px; border: 1px solid rgba(255, 92, 78, .42);
  background: radial-gradient(circle at 50% 29%, rgba(var(--icon-rgb), .10), transparent 42%), linear-gradient(155deg, rgba(48, 7, 10, .76), rgba(13, 2, 4, .88));
  box-shadow: 0 0 9px rgba(255, 45, 45, .14), inset 0 0 12px rgba(255, 45, 45, .055); transition: transform .2s, border-color .2s; }
.eco:active { transform: translateY(1px) scale(.975); }
.eco .eco-ic { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 11px; object-fit: cover; filter: drop-shadow(0 0 5px rgba(var(--icon-rgb), .48)); }
.eco strong { font-size: 8px; font-weight: 900; letter-spacing: .25px; line-height: 1.05; color: #ffe7df; text-shadow: 0 0 7px rgba(var(--icon-rgb), .38); word-break: break-word; }
.eco small { max-width: 100%; display: grid; place-items: center; font-size: 6.5px; font-weight: 750; letter-spacing: .12px; color: #c99b96; line-height: 1.14; }
.eco small.price { color: var(--gold); font-size: 7.5px; font-weight: 800; }
.eco:nth-child(n+6):nth-child(-n+10) { --icon-rgb: 255, 54, 66; }
.eco:nth-child(n+11):nth-child(-n+15) { --icon-rgb: 54, 139, 255; }

/* logo 1 mã cổ phần (icon hệ sinh thái / ảnh sản phẩm / chữ) */
.alogo { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; overflow: hidden;
  background: linear-gradient(150deg, #5a0d10, #160304); border: 1px solid rgba(255, 120, 100, .4); box-shadow: 0 0 10px rgba(255, 90, 60, .3); }
.alogo img { width: 100%; height: 100%; object-fit: cover; }
.alogo.icon { background: #0b0203; }
.alogo.noimg::after { content: attr(data-t); font-size: 12px; font-weight: 900; color: #fff; letter-spacing: .3px; text-shadow: 0 0 8px rgba(255, 59, 48, .9); }
.alogo.lg { width: 66px; height: 66px; border-radius: 16px; } .alogo.lg::after { font-size: 18px; }

.src { display: inline-block; font-size: 8px; font-weight: 800; letter-spacing: .3px; padding: 1px 6px; border-radius: 99px; border: 1px solid; vertical-align: middle; text-transform: uppercase; }
.src-drh { color: #ff8a70; border-color: rgba(255, 138, 112, .5); background: rgba(255, 90, 60, .1); }
.src-hni { color: var(--gold); border-color: rgba(255, 180, 84, .5); background: rgba(255, 180, 84, .08); }
.src-hecom { color: #71baff; border-color: rgba(113, 186, 255, .45); background: rgba(54, 139, 255, .08); }

/* danh sách mã */
.mk { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.mk h3 { font-size: 13px; font-weight: 800; line-height: 1.3; }
.mk .price { text-align: right; }
.mk .price b { display: block; font-size: 14px; color: var(--gold); white-space: nowrap; }
.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7a0e12, #ff3b30, #ffb454); box-shadow: 0 0 8px rgba(255, 59, 48, .7); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chip { font-size: 9.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255, 59, 48, .1); border: 1px solid var(--line-soft); color: #ffc6bb; }

/* ═════════ NÚT (kiểu hdna-btn) ═════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 99px;
  font-size: 11px; font-weight: 900; letter-spacing: .5px; color: #fff; text-transform: uppercase;
  border: 1px solid rgba(255, 120, 100, .6); background: linear-gradient(90deg, #7a0e12, #ff3b30); box-shadow: 0 0 9px rgba(255, 59, 48, .55); transition: opacity .2s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: rgba(255, 59, 48, .08); box-shadow: none; color: #ffc6bb; }
.btn.sm { height: 26px; padding: 0 13px; font-size: 8.5px; }
.btn.gold { background: linear-gradient(90deg, #a35a0c, #ffb454); border-color: rgba(255, 200, 120, .7); box-shadow: 0 0 12px rgba(255, 180, 84, .5); color: #200; }

/* ═════════ FORM ═════════ */
.field { margin-top: 12px; }
.field label { display: block; font-size: 8.5px; font-weight: 800; color: var(--muted); margin-bottom: 6px; letter-spacing: .6px; text-transform: uppercase; }
.input { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; outline: none; color: #fff; font-size: 14px;
  background: rgba(0, 0, 0, .38); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--red); box-shadow: 0 0 12px var(--glow); }
.input:disabled { opacity: .6; }
.qty { display: grid; grid-template-columns: 42px 1fr 42px; gap: 8px; }
.qty button { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 59, 48, .1); font-size: 20px; font-weight: 800; color: #ffc6bb; }
.qty .input { text-align: center; font-size: 19px; font-weight: 900; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { flex: 1; min-width: 48px; height: 26px; border-radius: 99px; font-size: 9.5px; font-weight: 800; border: 1px solid var(--line-soft); background: rgba(255, 59, 48, .07); color: #ffc6bb; }
.quick button:hover { border-color: var(--red); }
.calc { margin-top: 12px; border-radius: 12px; padding: 9px 12px; background: rgba(0, 0, 0, .3); border: 1px dashed var(--line-soft); }
.calc div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12px; }
.calc .total { border-top: 1px solid var(--line-soft); margin-top: 4px; padding-top: 7px; font-size: 14px; font-weight: 900; }
.confirm-box { display: none; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 180, 84, .5); background: rgba(255, 180, 84, .08); }
.confirm-box.show { display: block; animation: fade .2s; }
.confirm-box p { font-size: 12px; margin-bottom: 10px; }
.confirm-box .row2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.alert { margin-top: 10px; padding: 9px 13px; border-radius: 12px; font-size: 12px; line-height: 1.5; }
.alert.err { background: rgba(255, 90, 110, .1); border: 1px solid rgba(255, 90, 110, .35); color: #ff9db0; }
.alert.ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .35); color: #6ee7b7; }

/* ═════════ XẾP HẠNG CỔ ĐÔNG ═════════ */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 7px; margin-top: 20px; }
.pd { display: grid; justify-items: center; gap: 3px; text-align: center; padding: 14px 5px 10px; border-radius: 14px; min-width: 0;
  border: 1px solid rgba(255, 92, 78, .42); background: var(--tile); }
.pd .medal { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 900; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #200; z-index: 6; }
.pd.r1 { padding-top: 18px; }
.pd.r1 .medal { background: linear-gradient(135deg, #fff1b8, #ffb454); box-shadow: 0 0 12px rgba(255, 200, 100, .9); }
.pd.r2 .medal { background: linear-gradient(135deg, #fff, #b8c0cc); box-shadow: 0 0 8px rgba(255, 255, 255, .5); }
.pd.r3 .medal { background: linear-gradient(135deg, #ffd3b0, #c8743c); box-shadow: 0 0 8px rgba(255, 160, 90, .6); }
.pd.r1 .av { border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 180, 84, .7); }
.pd strong { font-size: 10.5px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd small { font-size: 8.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd b { font-size: 11.5px; color: var(--gold); text-shadow: 0 0 8px rgba(255, 180, 84, .4); }

.hl { margin-top: 8px; display: grid; gap: 6px; }
.hrow { position: relative; display: grid; grid-template-columns: 24px auto 1fr auto; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 13px;
  border: 1px solid rgba(255, 92, 78, .3); background: linear-gradient(155deg, rgba(48, 7, 10, .62), rgba(13, 2, 4, .78)); box-shadow: inset 0 0 12px rgba(255, 45, 45, .05); transition: border-color .2s; }
.hrow:hover { border-color: var(--red); }
.hrow.me { border-color: rgba(255, 180, 84, .7); background: linear-gradient(155deg, rgba(70, 30, 8, .6), rgba(20, 6, 3, .8)); }
.hrow .rk { font-size: 12px; font-weight: 900; text-align: center; color: var(--red-soft); text-shadow: 0 0 8px rgba(255, 59, 48, .6); }
.hrow .who { min-width: 0; }
.hrow .who strong { display: block; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow .who small { display: block; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow .val { text-align: right; }
.hrow .val b { display: block; font-size: 12px; color: var(--gold); white-space: nowrap; }
.hrow .val small { font-size: 9px; color: var(--muted); white-space: nowrap; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; margin-top: 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: 0 0 auto; padding: 5px 12px; border-radius: 99px; font-size: 9.5px; font-weight: 900; letter-spacing: .4px; white-space: nowrap; text-transform: uppercase;
  border: 1px solid var(--line-soft); background: rgba(28, 6, 8, .7); color: #ffc6bb; }
.tabs a.on { color: #fff; border-color: rgba(255, 120, 100, .6); background: linear-gradient(90deg, #7a0e12, #ff3b30); box-shadow: 0 0 9px rgba(255, 59, 48, .55); }
.search { position: relative; margin-top: 8px; }
.search .input { height: 38px; padding-left: 36px; font-size: 13px; }
.search svg { position: absolute; left: 12px; top: 10px; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; }

/* ═════════ DANH SÁCH CHUNG ═════════ */
.list { display: grid; }
.li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.li:first-child { border-top: 0; }
.li .t { font-size: 12.5px; font-weight: 800; }
.li .s { font-size: 9.5px; color: var(--muted); word-break: break-all; }
.li .r { text-align: right; font-weight: 900; font-size: 12.5px; white-space: nowrap; }
.li .r small { display: block; font-size: 9px; font-weight: 700; color: var(--muted); }
.dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.dot.in { color: var(--green); border: 1.5px solid rgba(52, 211, 153, .55); box-shadow: 0 0 8px rgba(52, 211, 153, .3); }
.dot.out { color: var(--red-soft); border: 1.5px solid var(--line); box-shadow: 0 0 8px var(--glow); }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.kv div { padding: 8px 10px; border-radius: 11px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line-soft); }
.kv small { display: block; font-size: 8px; font-weight: 800; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.kv b { font-size: 14px; }

.profile-hd { text-align: center; display: grid; justify-items: center; gap: 5px; padding-top: 14px; }
.profile-hd h2 { font-size: 18px; font-weight: 900; text-shadow: 0 0 10px rgba(255, 59, 48, .5); }
.rank-big { font-size: 9px; font-weight: 900; letter-spacing: .8px; padding: 3px 12px; border-radius: 99px; color: #200;
  background: linear-gradient(90deg, #ffe3a3, #ffb454); box-shadow: 0 0 12px rgba(255, 180, 84, .6); }

.pf { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.pf:first-child { border-top: 0; }
.pf h4 { font-size: 12.5px; font-weight: 800; }
.pf .bar { margin-top: 5px; }

.ref-box { display: flex; gap: 8px; margin-top: 10px; }
.ref-box .input { height: 36px; font-size: 11px; }
.qr { width: 156px; height: 156px; margin: 12px auto 0; padding: 8px; border-radius: 14px; background: #fff; box-shadow: 0 0 22px rgba(255, 59, 48, .55); }

/* cây tuyến */
.tree { margin-top: 10px; }
.node { border-top: 1px solid var(--line-soft); }
.tree > .node:first-child { border-top: 0; }
.node > .nrow { display: grid; grid-template-columns: 22px auto 1fr auto; gap: 8px; align-items: center; padding: 7px 0; }
.node .tg { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, #b3121a, #ff3b30); box-shadow: 0 0 8px rgba(255, 59, 48, .6); cursor: pointer; user-select: none; }
.node .tg.none { background: rgba(255, 255, 255, .07); box-shadow: none; cursor: default; }
.node .children { display: none; padding-left: 16px; border-left: 1px dashed var(--line-soft); margin-left: 10px; }
.node.open > .children { display: block; }
.node .lv { font-size: 8px; font-weight: 900; padding: 1px 5px; border-radius: 6px; border: 1px solid var(--line-soft); color: #ffc6bb; }

/* thẻ CTA (giống hdna-banner) */
.hdna { margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1.5px solid var(--line);
  background: radial-gradient(70% 120% at 100% 50%, rgba(255, 59, 48, .28), transparent 60%), linear-gradient(120deg, rgba(40, 5, 7, .9), rgba(12, 2, 3, .9));
  padding: 14px; display: flex; align-items: center; gap: 12px; }
.hdna h3 { font-size: 14px; font-weight: 900; letter-spacing: .5px; color: #fff; text-shadow: 0 0 10px rgba(255, 59, 48, .7); }
.hdna p { font-size: 10px; color: var(--muted); margin-top: 2px; }
.hdna .btn { margin-left: auto; flex: 0 0 auto; height: 24px; font-size: 8px; padding: 0 13px; }
.hdna img { width: 54px; height: 54px; flex: 0 0 54px; filter: drop-shadow(0 0 8px rgba(255, 59, 48, .8)); }

.footnote { margin-top: 16px; text-align: center; font-size: 7.5px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }

/* ═════════ THANH TIÊU ĐỀ TRANG CON ═════════ */
.subbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px;
  padding: 9px 14px; background: linear-gradient(180deg, rgba(24, 4, 5, .96), rgba(4, 1, 1, .9));
  border-bottom: 1.5px solid var(--neon); border-radius: 0 0 18px 18px; box-shadow: 0 4px 22px rgba(255, 45, 45, .3), inset 0 -1px 0 rgba(255, 100, 90, .3); backdrop-filter: blur(8px); }
.subbar h1 { text-align: center; font-size: 12.5px; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; color: #ffd0c6; text-shadow: 0 0 10px rgba(255, 59, 48, .6); }
.sb-back svg { width: 22px; height: 22px; fill: none; stroke: var(--red-soft); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(255, 59, 48, .7)); }
.sb-me { justify-self: end; }

/* ═════════ THANH TAB ĐÁY (y bản gốc) ═════════ */
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30; width: min(100vw, var(--maxw));
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: start;
  background: linear-gradient(180deg, rgba(24, 4, 5, .96), rgba(4, 1, 1, .99)); border-top: 1.5px solid var(--neon); border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 22px rgba(255, 45, 45, .35), inset 0 1px 0 rgba(255, 100, 90, .3); padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); backdrop-filter: blur(8px); }
.nav-item { min-width: 0; height: 45px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
  color: #7d7d84; font-size: 7.5px; font-weight: 800; letter-spacing: .2px; text-transform: uppercase; }
.nav-item svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item > span { min-height: 17px; display: flex; align-items: flex-start; justify-content: center; text-align: center; line-height: 1.12; }
.nav-item.active { color: var(--red); }
.nav-item.active svg { filter: drop-shadow(0 0 7px rgba(255, 59, 48, .8)); }
.nav-center { width: 100%; }
.nav-center-circle { width: 66px; height: 66px; margin-top: -31px; display: block; border-radius: 50%; filter: drop-shadow(0 0 8px rgba(255, 55, 34, .78)); transition: transform .18s, filter .18s; }
.nav-center-emblem { width: 100%; height: 100%; object-fit: contain; }
.nav-center:active .nav-center-circle, .nav-center.active .nav-center-circle { filter: drop-shadow(0 0 12px rgba(255, 92, 45, .96)); }
.nav-center:active .nav-center-circle { transform: translateY(1px) scale(.95); }

/* ═════════ ĐĂNG NHẬP ═════════ */
.auth { min-height: 100vh; padding: 0 14px 40px; }
.auth .hero { margin-bottom: 4px; }
.seg { display: flex; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-soft); }
.seg button { flex: 1; height: 32px; border-radius: 9px; font-size: 10px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.seg button.on { color: #fff; background: linear-gradient(90deg, #7a0e12, #ff3b30); box-shadow: 0 0 9px rgba(255, 59, 48, .55); }
.eco-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 14px; }

/* ẩn số tiền */
.hide-money .money { filter: blur(7px); user-select: none; }
.cert { background: radial-gradient(90% 80% at 100% 0%, rgba(255, 180, 84, .12), transparent 60%), var(--panel); }

@media (min-width: 441px) { .app { box-shadow: 0 0 60px rgba(0, 0, 0, .6); } }
@media (max-width: 360px) {
  .eco-grid { grid-template-columns: repeat(4, 1fr); }
  .asset-value { font-size: 23px; }
  .aact span:last-child { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .neon, .card, .hdna, .pd, .neon::after, .card::after, .eco::after, .pd::after, .hrow.me::after, .hdna::after { animation: none !important; }
}

/* thông báo nổi */
.alert.toast { position: fixed; z-index: 40; top: 10px; left: 50%; transform: translateX(-50%); width: min(calc(100vw - 24px), 416px); margin: 0;
  background: rgba(10, 30, 22, .96); backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); cursor: pointer; animation: toast 6s ease forwards; }
.alert.toast.err { background: rgba(40, 6, 12, .96); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px); } 6%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; visibility: hidden; transform: translate(-50%, -10px); } }
