/* =======================================================================
   AllCaptcha — hệ thống giao diện (dark, enterprise AI)
   ======================================================================= */

:root {
    --bg:            #06080F;
    --bg-soft:       #0A0E1A;
    --panel:         #0F1424;
    --panel-2:       #141A2E;
    --line:          rgba(255, 255, 255, .07);
    --line-strong:   rgba(255, 255, 255, .14);
    --text:          #E8ECF7;
    --muted:         #8D97B2;
    --muted-2:       #636D8A;
    --brand:         #5B7CFA;
    --brand-2:       #9B5CFF;
    --brand-3:       #22D3EE;
    --ok:            #2ED47A;
    --warn:          #FFB020;
    --danger:        #FF5A6A;
    --radius:        16px;
    --radius-sm:     10px;
    --shadow:        0 20px 60px -20px rgba(0, 0, 0, .8);
    --grad:          linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    --grad-soft:     linear-gradient(135deg, rgba(91, 124, 250, .16), rgba(155, 92, 255, .12));
    --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --mono:          'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { padding: 0; margin: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--muted); }
code, pre, .mono { font-family: var(--mono); }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.container { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.container-sm { width: min(880px, calc(100% - 40px)); margin-inline: auto; }

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: .82rem; }
.tiny { font-size: .74rem; }
.strong { font-weight: 650; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; } .mt-5 { margin-top: 56px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 36px; }
.gradient-text {
    background: linear-gradient(120deg, #fff 0%, #B9C6FF 40%, var(--brand-2) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-center { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* ------------------------------------------------------------------ buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
    font-family: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
    white-space: nowrap; background: var(--panel-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -12px rgba(91, 124, 250, .9); }
.btn-primary:hover { box-shadow: 0 16px 40px -14px rgba(155, 92, 255, .9); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-outline { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-danger { background: rgba(255, 90, 106, .14); border-color: rgba(255, 90, 106, .4); color: #FFB3BA; }
.btn-ok { background: rgba(46, 212, 122, .14); border-color: rgba(46, 212, 122, .4); color: #9BEFC2; }
.btn-sm { padding: 7px 13px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------------ badges */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted);
}
.badge-brand { background: rgba(91, 124, 250, .16); border-color: rgba(91, 124, 250, .35); color: #B7C6FF; }
.badge-ok { background: rgba(46, 212, 122, .14); border-color: rgba(46, 212, 122, .3); color: #8DEDB6; }
.badge-warn { background: rgba(255, 176, 32, .14); border-color: rgba(255, 176, 32, .3); color: #FFD68A; }
.badge-danger { background: rgba(255, 90, 106, .14); border-color: rgba(255, 90, 106, .3); color: #FFAAB3; }
.badge-trc { background: rgba(255, 60, 60, .12); border-color: rgba(255, 60, 60, .3); color: #FF9E9E; }
.badge-bep { background: rgba(243, 186, 47, .14); border-color: rgba(243, 186, 47, .35); color: #FFD97A; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ------------------------------------------------------------------- panels */
.panel {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px;
}
.panel-2 { background: var(--panel-2); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-tight { padding: 0; overflow: hidden; }
.glow-panel { position: relative; overflow: hidden; }
.glow-panel::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
    background: linear-gradient(135deg, rgba(91, 124, 250, .5), transparent 40%, rgba(155, 92, 255, .4));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* -------------------------------------------------------------- public nav */
.nav-wrap {
    position: sticky; top: 0; z-index: 50;
    background: rgba(6, 8, 15, .72); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; }
.logo-mark {
    width: 32px; height: 32px; border-radius: 9px; background: var(--grad);
    display: grid; place-items: center; flex: none;
    box-shadow: 0 8px 24px -8px rgba(91, 124, 250, .9);
}
.logo-mark svg { width: 74%; height: 74%; display: block; }

/* Ten thuong hieu: "All" dam, "Captcha" nhe hon mot bac cho de doc */
.logo-text { letter-spacing: -.025em; white-space: nowrap; font-weight: 800; }
.logo-text span { font-weight: 500; color: #B6BFD6; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: .9rem; color: var(--muted); font-weight: 500; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* -------------------------------------------------------------------- hero */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
.hero::before {
    content: ''; position: absolute; width: 900px; height: 900px; left: 50%; top: -520px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(91, 124, 250, .28), transparent 62%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .45;
    background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero h1 { margin-bottom: 18px; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.18rem); max-width: 720px; margin: 0 auto 30px; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: .8rem; color: var(--muted-2); }

.trust-row { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.trust-item { text-align: center; }
.trust-item b { display: block; font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.trust-item span { font-size: .76rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; }

/* ---------------------------------------------------------------- sections */
.section { padding: 72px 0; position: relative; }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head .badge { margin-bottom: 14px; }
.eyebrow {
    font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--brand-3); font-weight: 700; margin-bottom: 12px;
}

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: 1.6fr 1fr; }

.feature {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px; transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: rgba(91, 124, 250, .45); transform: translateY(-3px); }
.feature-icon {
    width: 42px; height: 42px; border-radius: 12px; background: var(--grad-soft);
    border: 1px solid var(--line-strong); display: grid; place-items: center; margin-bottom: 16px;
    color: #C3CEFF;
}
.feature h3 { font-size: 1.02rem; }
.feature p { margin: 0; font-size: .89rem; }

/* ------------------------------------------------------- biểu tượng dịch vụ */
.svc-icon {
    display: inline-grid; place-items: center; flex: 0 0 auto;
    border-radius: 13px; color: var(--muted);
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--icon-accent) 26%, transparent), transparent 70%),
                rgba(255, 255, 255, .03);
    border: 1px solid color-mix(in srgb, var(--icon-accent) 32%, var(--line));
    transition: border-color .2s, transform .2s, background .2s;
}
.svc-icon svg { width: 60%; height: 60%; }
.svc-card:hover .svc-icon,
.feature:hover .svc-icon {
    transform: translateY(-2px) scale(1.04);
    border-color: color-mix(in srgb, var(--icon-accent) 65%, transparent);
    color: var(--text);
}
.svc-icon-sm { border-radius: 9px; }
.svc-head { display: flex; align-items: flex-start; gap: 13px; }

/* trình duyệt cũ không hỗ trợ color-mix */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .svc-icon { background: rgba(255, 255, 255, .04); border-color: var(--line-strong); }
}

/* ---------------------------------------------------------- service / price */
.svc-card {
    display: flex; flex-direction: column; gap: 12px; padding: 20px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    transition: border-color .2s, transform .2s;
}
.svc-card:hover { border-color: rgba(155, 92, 255, .45); transform: translateY(-2px); }
.svc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.svc-price { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.svc-price small { font-size: .72rem; color: var(--muted-2); font-weight: 500; }

/* ------------------------------------------------------- ô kéo–thả ảnh */
.dropzone {
    position: relative; border: 1.5px dashed var(--line-strong); border-radius: 14px;
    background: #0B1120; min-height: 132px; overflow: hidden;
    transition: border-color .2s, background .2s;
}
.dropzone:hover { border-color: rgba(91, 124, 250, .6); }
.dropzone.is-drag { border-color: var(--brand); background: rgba(91, 124, 250, .08); }
.dropzone.is-busy { opacity: .75; pointer-events: none; }

.dropzone-empty {
    display: grid; place-items: center; gap: 6px; padding: 22px 16px; min-height: 132px;
    cursor: pointer; text-align: center; color: var(--muted);
}
.dropzone-empty svg { width: 34px; height: 34px; opacity: .85; }
.dropzone-title { font-size: .88rem; font-weight: 600; color: var(--text); }
.dropzone-hint { font-size: .74rem; color: var(--muted-2); }
.dropzone.has-image .dropzone-empty { display: none; }

.dropzone-preview { display: none; position: relative; }
.dropzone.has-image .dropzone-preview { display: block; }
.dropzone-img { width: 100%; height: 152px; object-fit: contain; background: #080B15; padding: 8px; }

.dropzone-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.dropzone-btn {
    width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
    border-radius: 9px; border: 1px solid var(--line-strong); color: var(--muted);
    background: rgba(8, 11, 21, .85); backdrop-filter: blur(4px); transition: all .15s;
}
.dropzone-btn svg { width: 16px; height: 16px; }
.dropzone-btn:hover { color: var(--text); border-color: var(--brand); }
.dropzone-del:hover { color: #FFB3BA; border-color: rgba(255, 90, 106, .7); background: rgba(255, 90, 106, .16); }

.dropzone-overlay {
    position: absolute; inset: 0; display: none; place-items: center;
    background: rgba(91, 124, 250, .14); border-radius: 12px;
    font-weight: 650; font-size: .9rem; color: #C7D2FF; pointer-events: none;
}
.dropzone.is-drag .dropzone-overlay { display: grid; }

.dropzone-status {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 12px;
    font-size: .78rem; text-align: center; background: rgba(8, 11, 21, .92);
    border-top: 1px solid var(--line);
}
.dropzone-status.is-error { color: #FFB3BA; }
.dropzone-status.is-ok { color: #9BEFC2; }

/* hàng dịch vụ trong trang quản trị */
.svc-admin-row {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 10px; transition: border-color .2s, opacity .2s;
}
.svc-admin-row.is-off { opacity: .62; border-style: dashed; }
.svc-admin-row:hover { border-color: var(--line-strong); }
.svc-admin-thumb {
    width: 52px; height: 36px; object-fit: contain; border-radius: 9px; flex: 0 0 auto;
    background: #0B1120; border: 1px solid var(--line); padding: 3px;
}
.svc-admin-edit { border: 0 !important; background: transparent !important; padding: 12px 0 0 !important; margin: 0 !important; }
.svc-admin-edit > summary { color: var(--muted); }

/* hình minh hoạ lớn: mô phỏng hình dáng thật của captcha */
.svc-figure {
    width: 100%; aspect-ratio: 160 / 88; border-radius: 12px; overflow: hidden; padding: 6px;
    background: radial-gradient(120% 130% at 20% 0%, color-mix(in srgb, var(--icon-accent) 16%, transparent), transparent 65%),
                #0B1120;
    border: 1px solid var(--line);
    display: grid; place-items: center; transition: border-color .2s;
}
.svc-figure { position: relative; }
.svc-figure svg { width: 100%; height: 100%; }
.svc-figure.has-photo { padding: 0; }
.svc-photo { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.svc-card:hover .svc-figure { border-color: color-mix(in srgb, var(--icon-accent) 45%, transparent); }

/* logo hãng ở góc hình minh hoạ */
.svc-brand {
    position: absolute; top: 9px; right: 10px; width: 20px; height: 20px;
    padding: 4px; box-sizing: content-box; border-radius: 8px;
    background: rgba(8, 11, 21, .82); border: 1px solid var(--line);
    opacity: .95;
}
.svc-brand-inline {
    display: inline-block; width: 15px; height: 15px;
    vertical-align: -2px; margin-left: 6px; opacity: .9;
}

@supports not (color: color-mix(in srgb, red 50%, blue)) {
    .svc-figure { background: #0B1120; }
}

/* giá + đơn vị nằm gọn trên MỘT dòng, kèm biểu tượng dịch vụ */
.svc-price-line {
    display: flex; align-items: center; gap: 9px; white-space: nowrap;
    padding: 9px 12px; border-radius: 11px;
    background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
}
.svc-price-line .svc-icon { border-radius: 8px; }
.svc-price-line .svc-price { font-size: 1.3rem; line-height: 1; }
.svc-per { font-size: .78rem; color: var(--muted-2); font-weight: 600; }
.svc-meta { display: flex; gap: 14px; font-size: .78rem; color: var(--muted-2); flex-wrap: wrap; }
.svc-code {
    font-family: var(--mono); font-size: .74rem; color: #9FB0E8;
    background: rgba(91, 124, 250, .1); border: 1px solid rgba(91, 124, 250, .22);
    padding: 3px 8px; border-radius: 6px; display: inline-block; word-break: break-all;
}
.rate-bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.rate-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ok), #7CF0B4); }

/* ------------------------------------------------------------------ tables */
/* Bang: cuon ben trong khung, tieu de cot dinh o tren khi cuon.
   Chieu cao toi da do bang JS de bang keo dai vua toi day man hinh. */
.table-wrap {
    overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
    overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.table-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .28); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
    text-align: left; padding: 13px 16px; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--muted-2); font-weight: 700;
    border-bottom: 1px solid var(--line); white-space: nowrap;
    /* dinh o tren khi cuon trong bang - nen phai duc, khong trong suot */
    position: sticky; top: 0; z-index: 3;
    background-color: #161B2B;
    background-image: linear-gradient(rgba(255, 255, 255, .025), rgba(255, 255, 255, .025));
}
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--muted-2); }

/* -------------------------------------------------------------------- code */
pre.code {
    background: #05070D; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 18px; overflow-x: auto; font-size: .82rem; line-height: 1.7; margin: 0;
    color: #CBD6F5;
}
pre.code .k { color: #7FA0FF; }
pre.code .s { color: #7EE7B0; }
pre.code .c { color: #5C6683; }
.code-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.code-tab {
    padding: 6px 13px; border-radius: 8px; font-size: .78rem; cursor: pointer;
    border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--muted);
}
.code-tab.active { background: var(--grad); border-color: transparent; color: #fff; }

/* ------------------------------------------------------------- trang lỗi */
.error-hero { padding: 70px 0 90px; min-height: calc(100vh - 68px); display: grid; align-items: center; }
.error-figure { width: min(320px, 78vw); margin: 0 auto 26px; }
.error-figure svg { width: 100%; height: auto; }
.error-code {
    font-size: clamp(3.4rem, 13vw, 6.5rem); font-weight: 800; line-height: .9; letter-spacing: -.04em;
    background: linear-gradient(120deg, #fff 0%, #8FA6FF 45%, var(--brand-2) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 6px;
}
.error-title { font-size: clamp(1.4rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.error-links {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
    max-width: 820px; margin: 34px auto 0; text-align: left;
}
.error-link {
    display: block; padding: 14px 16px; border-radius: 13px;
    background: var(--panel); border: 1px solid var(--line);
    transition: border-color .2s, transform .2s, background .2s;
}
.error-link:hover { border-color: rgba(91, 124, 250, .5); transform: translateY(-2px); background: var(--panel-2); }
.error-link-title { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 3px; }
.error-link-desc { display: block; font-size: .78rem; color: var(--muted-2); }

@media (max-width: 900px) { .error-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .error-links { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 54px 0 30px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 14px; }
.footer a { display: block; font-size: .86rem; color: var(--muted); padding: 4px 0; }
.footer a:hover { color: var(--text); }
.footer-bottom {
    margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    font-size: .8rem; color: var(--muted-2);
}

/* -------------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; position: relative; }
.auth-wrap::before {
    content: ''; position: absolute; width: 700px; height: 700px; top: -350px; left: 50%; transform: translateX(-50%);
    background: radial-gradient(circle, rgba(91, 124, 250, .22), transparent 65%);
}
.auth-card {
    width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line);
    border-radius: 20px; padding: 32px; box-shadow: var(--shadow); position: relative; z-index: 2;
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-side { text-align: center; margin-top: 20px; font-size: .86rem; color: var(--muted); }

/* ------------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 7px; color: #C3CBE2; }
.field .hint { font-size: .76rem; color: var(--muted-2); margin-top: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url],
input[type=search], input[type=tel], input[type=date],
select, textarea {
    width: 100%; padding: 11px 14px; border-radius: 10px; background: #080B15;
    border: 1px solid var(--line-strong); color: var(--text); font-family: inherit; font-size: .9rem;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; font-family: var(--mono); font-size: .84rem; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: rgba(91, 124, 250, .8); box-shadow: 0 0 0 3px rgba(91, 124, 250, .16);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238D97B2' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
/* Chrome tự điền (autofill) hay tô nền trắng — ép về nền tối của web */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #080B15 inset;
    box-shadow: 0 0 0 1000px #080B15 inset;
    caret-color: var(--text);
    border-radius: 10px;
    transition: background-color 9999s ease-out 0s;
}

/* ô mật khẩu + nút con mắt */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 34px; height: 34px; display: grid; place-items: center;
    background: transparent; border: 0; border-radius: 8px; cursor: pointer;
    color: var(--muted); transition: color .15s, background .15s;
}
.pw-toggle:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.pw-toggle:focus-visible { outline: 2px solid rgba(91, 124, 250, .8); outline-offset: 1px; }
.pw-toggle svg { width: 19px; height: 19px; }

/* thuoc tinh hidden phai thang moi quy tac display cua rieng tung lop */
[hidden] { display: none !important; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: .84rem; color: var(--muted); }
.check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); }
.error { color: #FFA8B0; font-size: .78rem; margin-top: 6px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.switch { display: flex; align-items: center; gap: 10px; }
.switch input { width: 40px; height: 22px; appearance: none; background: #1B2237; border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #6A7595; transition: transform .2s, background .2s; }
.switch input:checked { background: rgba(91, 124, 250, .35); }
.switch input:checked::after { transform: translateX(18px); background: var(--brand); }

/* ------------------------------------------------------------------ alerts */
.alert {
    display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px;
    font-size: .88rem; margin-bottom: 18px; border: 1px solid;
}
.alert-success { background: rgba(46, 212, 122, .1); border-color: rgba(46, 212, 122, .3); color: #A8F0C8; }
.alert-error { background: rgba(255, 90, 106, .1); border-color: rgba(255, 90, 106, .3); color: #FFB6BD; }
.alert-info { background: rgba(91, 124, 250, .1); border-color: rgba(91, 124, 250, .3); color: #BCC9FF; }
.alert-warn { background: rgba(255, 176, 32, .1); border-color: rgba(255, 176, 32, .3); color: #FFDB9B; }

/* --------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--bg-soft); border-right: 1px solid var(--line); padding: 20px 14px;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow: hidden;
}
.sidebar .logo { flex: 0 0 auto; padding: 6px 10px 20px; }

/* chi vung menu cuon; logo o dinh va the nguoi dung o day luon co dinh */
.side-nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column; gap: 6px;
    margin: 0 -6px; padding: 0 6px;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent;
}
.side-nav::-webkit-scrollbar { width: 6px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 999px; }
.side-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .28); }
.side-label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2);
    padding: 16px 12px 8px; font-weight: 700;
}
.side-link {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
    font-size: .88rem; color: var(--muted); font-weight: 500; transition: background .15s, color .15s;
}
.side-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.side-link.active { background: var(--grad-soft); color: #fff; border: 1px solid rgba(91, 124, 250, .3); }
.side-link svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .9; }
.side-foot { flex: 0 0 auto; margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* the nguoi dung o chan sidebar: anh dai dien + ho ten + chuc vi + email */
.side-user {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-bottom: 10px;
    border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03);
}
.side-user-avatar { flex: 0 0 auto; width: 36px; height: 36px; }
.side-user-meta { min-width: 0; }
.side-user-name {
    font-size: .84rem; font-weight: 700; color: var(--text); line-height: 1.25;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-user-role {
    display: inline-block; margin: 3px 0 2px; padding: 1px 7px; border-radius: 999px;
    font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    color: #cbb6ff; background: var(--grad-soft); border: 1px solid rgba(155, 92, 255, .32);
}
.side-user-email {
    font-size: .74rem; color: var(--muted); line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-ico { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
[dir="rtl"] .btn-ico { margin-right: 0; margin-left: 6px; transform: scaleX(-1); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 64px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
    justify-content: space-between; gap: 16px; padding: 0 26px; background: rgba(6, 8, 15, .7);
    backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 1.05rem; margin: 0; }
.content { padding: 26px; flex: 1; }
.balance-chip {
    display: flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px;
    background: var(--grad-soft); border: 1px solid rgba(91, 124, 250, .3); font-weight: 700; font-size: .9rem;
}
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--grad); display: grid;
    place-items: center; font-size: .82rem; font-weight: 700; color: #fff;
}

/* ------------------------------------------------------------- stat blocks */
.stat {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
    position: relative; overflow: hidden;
}
.stat .label { font-size: .76rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.stat .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.stat-accent::after {
    content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 124, 250, .22), transparent 70%);
}

/* ------------------------------------------------------------------- chart */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart-bar {
    width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: var(--grad);
    min-height: 3px; position: relative; transition: filter .15s;
}
.chart-bar:hover { filter: brightness(1.25); }
.chart-bar.muted { background: rgba(255, 255, 255, .08); }
.chart-x { font-size: .68rem; color: var(--muted-2); }

/* -------------------------------------------------------------- deposit ui */
.net-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.net-tab {
    padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03); font-size: .86rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.net-tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.deposit-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.qr-box { background: #fff; padding: 12px; border-radius: 14px; width: 240px; }
.addr-box {
    display: flex; align-items: center; gap: 10px; background: #080B15; border: 1px dashed var(--line-strong);
    border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: .84rem; word-break: break-all;
}
.copy-btn { border: 0; background: rgba(91, 124, 250, .16); color: #C3CEFF; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: .76rem; font-weight: 600; }
.copy-btn:hover { background: rgba(91, 124, 250, .3); }
.step-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.step-list li { counter-increment: s; position: relative; padding-left: 34px; margin-bottom: 12px; font-size: .88rem; color: var(--muted); }
.step-list li::before {
    content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--grad-soft); border: 1px solid rgba(91, 124, 250, .35); color: #C3CEFF;
    display: grid; place-items: center; font-size: .72rem; font-weight: 700;
}

/* ------------------------------------------------------------------- misc */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.pagination a, .pagination span {
    padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); font-size: .82rem;
    color: var(--muted); background: rgba(255, 255, 255, .02);
}
.pagination .active span, .pagination a:hover { background: var(--grad); color: #fff; border-color: transparent; }
.pagination svg { width: 14px; height: 14px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }

.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 18px; font-size: .88rem; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; word-break: break-all; }

.copyable { cursor: pointer; }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

details.acc { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; background: var(--panel); }
details.acc summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
details.acc[open] summary { margin-bottom: 10px; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------- language switch */
.lang-switch { position: relative; }
.lang-switch > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    min-width: 156px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
    background: #080B15; font-size: .85rem; font-weight: 600; user-select: none;
    transition: border-color .15s, box-shadow .15s;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { border-color: rgba(91, 124, 250, .5); }
.lang-switch[open] > summary { border-color: rgba(91, 124, 250, .8); box-shadow: 0 0 0 3px rgba(91, 124, 250, .16); }

/* ten ngon ngu viet bang chinh tieng do */
.lang-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* mui ten giong o select cua trinh duyet */
.lang-caret {
    flex: 0 0 auto; width: 12px; height: 8px; background: var(--muted-2);
    clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .18s;
}
.lang-switch[open] .lang-caret { transform: rotate(180deg); }

/* anh co quoc gia (Windows khong ve duoc emoji co nen phai dung anh) */
.flag-img {
    flex: 0 0 auto; width: 21px; height: 16px; display: block; object-fit: cover;
    border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
    background: #1B2237;
}
.lang-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 262px;
    padding: 8px; border-radius: 14px;
    background: var(--panel-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.lang-list { max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.lang-search {
    width: 100%; margin: 0 0 8px; padding: 8px 11px; border-radius: 9px;
    background: #080B15; border: 1px solid var(--line-strong); color: var(--text); font-size: .84rem;
}
.lang-search:focus { outline: none; border-color: rgba(91, 124, 250, .8); }
.lang-empty { padding: 14px 10px; text-align: center; font-size: .82rem; color: var(--muted-2); }
.lang-switch[data-align="left"] .lang-menu { right: auto; left: 0; }
.lang-menu-head {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-2);
    font-weight: 700; padding: 4px 10px 8px;
}
.lang-menu a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
    font-size: .86rem; color: var(--muted); transition: background .15s, color .15s;
}
.lang-menu a:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.lang-menu a.active { background: var(--grad-soft); color: #fff; }
.lang-check { color: var(--brand-3); font-weight: 700; }
.lang-chip { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }

/* ---------------------------------------------------------- viết phải→trái */
[dir="rtl"] body, [dir="rtl"] .content { direction: rtl; }
[dir="rtl"] .side-link, [dir="rtl"] .flex-center, [dir="rtl"] .badge { flex-direction: row-reverse; }
[dir="rtl"] thead th, [dir="rtl"] tbody td { text-align: right; }
[dir="rtl"] td.num, [dir="rtl"] th.num, [dir="rtl"] .right { text-align: left; }
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .step-list li { padding-left: 0; padding-right: 34px; }
[dir="rtl"] .step-list li::before { left: auto; right: 0; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] pre.code, [dir="rtl"] .mono, [dir="rtl"] .addr-box { direction: ltr; text-align: left; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-sidebar, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { gap: 20px; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 100; height: 100vh;
        transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow);
    }
    .sidebar.open { transform: none; }
    .nav-links {
        position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: var(--panel); border-bottom: 1px solid var(--line); padding: 14px 20px; gap: 4px; display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px 0; }
    .nav-toggle { display: block; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .deposit-grid { grid-template-columns: 1fr; }
    .qr-box { width: 100%; max-width: 260px; }
    .kv { grid-template-columns: 1fr; gap: 2px 0; }
    .kv dd { margin-bottom: 10px; }
    .content, .topbar { padding-inline: 16px; }
}
@media (max-width: 620px) {
    .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 44px; }
    .section { padding: 48px 0; }
}

/* ------------------------------------------------------------ thong bao */
.bell { position: relative; }
.bell-btn {
    position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
    cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.bell-btn:hover { color: var(--text); border-color: rgba(91, 124, 250, .4); }
.bell-btn svg { width: 18px; height: 18px; }
.bell-dot {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--danger, #FF5A6A); color: #fff;
    font-size: .64rem; font-weight: 800; line-height: 18px; text-align: center;
    border: 2px solid var(--bg); font-variant-numeric: tabular-nums;
}
.bell-menu {
    position: absolute; top: calc(100% + 10px); right: 0; width: min(360px, calc(100vw - 32px));
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow); z-index: 60; overflow: hidden;
}
[dir="rtl"] .bell-menu { right: auto; left: 0; }
.bell-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .86rem;
}
.bell-link { background: none; border: 0; padding: 0; color: #A9BBFF; font-size: .76rem; cursor: pointer; }
.bell-link:hover { text-decoration: underline; }
.bell-list { max-height: 340px; overflow-y: auto; }
.bell-item { display: block; border-bottom: 1px solid var(--line); }
.bell-item:last-child { border-bottom: 0; }
.bell-item > button {
    display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 14px;
    background: none; border: 0; text-align: start; cursor: pointer; color: inherit;
}
.bell-item > button:hover { background: rgba(255, 255, 255, .04); }
.bell-item.is-unread > button { background: rgba(91, 124, 250, .08); }
.bell-item-ico { flex: 0 0 auto; font-size: .95rem; line-height: 1.3; }
.bell-item-main { min-width: 0; flex: 1 1 auto; display: block; }
.bell-item-title { display: block; font-size: .83rem; font-weight: 600; color: var(--text); }
.bell-item-body { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.bell-item-time { display: block; font-size: .7rem; color: var(--muted-2); margin-top: 3px; }
.bell-item-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 6px; }
.bell-empty { padding: 26px 14px; text-align: center; font-size: .82rem; color: var(--muted); }
.bell-foot {
    display: block; padding: 11px 14px; text-align: center; font-size: .8rem;
    color: #A9BBFF; border-top: 1px solid var(--line);
}
.bell-foot:hover { background: rgba(255, 255, 255, .04); }

/* so thong bao chua doc canh muc menu */
.side-count {
    margin-inline-start: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px;
    background: var(--danger, #FF5A6A); color: #fff; font-size: .68rem; font-weight: 800; text-align: center;
}

/* trang doc thong bao */
.noti-list { display: flex; flex-direction: column; }
.noti {
    display: flex; gap: 13px; padding: 16px 22px; border-bottom: 1px solid var(--line);
    border-inline-start: 3px solid transparent;
}
.noti:last-child { border-bottom: 0; }
.noti.is-unread { background: rgba(91, 124, 250, .06); }
.noti-brand.is-unread { border-inline-start-color: var(--brand); }
.noti-ok.is-unread { border-inline-start-color: var(--ok); }
.noti-warn.is-unread { border-inline-start-color: var(--warn); }
.noti-danger.is-unread { border-inline-start-color: var(--danger, #FF5A6A); }
.noti-ico { flex: 0 0 auto; font-size: 1.05rem; line-height: 1.4; }
.noti-main { flex: 1 1 auto; min-width: 0; }
.noti-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.noti-title { font-weight: 700; font-size: .93rem; }
.noti-body { margin: 6px 0 0; font-size: .85rem; color: var(--muted); line-height: 1.55; }
.noti-meta { margin-top: 7px; font-size: .74rem; color: var(--muted-2); }
.noti-actions { flex: 0 0 auto; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; }

/* chon nguoi nhan trong trang quan tri */
.noti-picker {
    max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-soft);
}
.noti-pick span { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

/* o soan noi dung thong bao la van xuoi, khong dung font may danh chu nhu o JSON */
.txt-prose { font-family: inherit; font-size: .88rem; line-height: 1.6; }

@media (max-width: 760px) {
    .noti { flex-wrap: wrap; }
    .noti-actions { width: 100%; }
}

/* ------------------------------------------------- sap xep cot trong bang */
.th-sort { padding: 0 !important; }
.th-sort > a {
    display: flex; align-items: center; gap: 6px; padding: 13px 16px; color: inherit;
    font: inherit; white-space: nowrap; transition: color .15s, background .15s;
}
.th-sort > a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.th-sort.num > a { justify-content: flex-end; }
.th-sort .th-arrow { font-size: .6rem; opacity: .35; line-height: 1; }
.th-sort > a:hover .th-arrow { opacity: .7; }
.th-sort.is-active > a { color: var(--text); }
.th-sort.is-active .th-arrow { opacity: 1; color: var(--brand-3); }

/* bang tinh (khong phan trang) sap xep ngay tren trinh duyet */
th[data-sort-js] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort-js]:hover { color: var(--text); }
th[data-sort-js]::after { content: ' ⇅'; font-size: .6rem; opacity: .35; }
th[data-sort-js][data-dir="asc"]::after { content: ' ▲'; opacity: 1; color: var(--brand-3); }
th[data-sort-js][data-dir="desc"]::after { content: ' ▼'; opacity: 1; color: var(--brand-3); }

/* ------------------------------------------------------- chan bang: so dong + phan trang */
.table-foot {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    gap: 12px; padding: 14px 22px 18px; border-top: 1px solid var(--line);
}
.table-foot-left { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.table-foot-right { margin-inline-start: auto; }
.per-page { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.per-page select {
    width: auto; min-width: 74px; padding: 6px 30px 6px 11px; font-size: .8rem; border-radius: 9px;
    background-position: right 10px center;
}
.table-count { font-size: .8rem; color: var(--muted-2); font-variant-numeric: tabular-nums; }

@media (max-width: 680px) {
    .table-foot { flex-direction: column; align-items: stretch; }
    .table-foot-right { margin-inline-start: 0; }
}

/* nhan phu cua dich vu trong bang gia */
.svc-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.svc-flags .badge { font-size: .62rem; padding: 1px 7px; }

/* chon mang nhan thanh toan cua vi: nut hinh vien thuoc bat/tat */
.net-pick { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 2px; }

.pill-check { position: relative; cursor: pointer; user-select: none; }

/* o tick that su van ton tai de form gui du lieu, chi la khong nhin thay */
.pill-check input {
    position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none;
}

.pill-check span {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px 9px 15px; border-radius: 999px;
    border: 1px solid var(--line-strong); background: #080B15;
    font-size: .84rem; color: var(--muted); white-space: nowrap;
    transition: border-color .15s, background .15s, color .15s;
}

/* dau tick o dau vien thuoc */
.pill-check span::before {
    content: ''; flex: 0 0 auto; width: 15px; height: 15px; border-radius: 50%;
    border: 1.5px solid var(--line-strong); transition: border-color .15s, background .15s;
}

.pill-check:hover span { border-color: rgba(255, 255, 255, .22); color: var(--text); }

.pill-check input:checked ~ span { color: var(--text); font-weight: 600; }
.pill-check input:checked ~ span::before {
    background: currentColor; border-color: currentColor;
    box-shadow: inset 0 0 0 3px #080B15;
}

/* mau rieng cho tung mang khi duoc chon */
.pill-trc input:checked ~ span { border-color: rgba(255, 90, 106, .55); background: rgba(255, 90, 106, .12); color: #FFAAB3; }
.pill-bep input:checked ~ span { border-color: rgba(243, 186, 47, .55); background: rgba(243, 186, 47, .12); color: #F7D070; }

/* ban phim: van thay duoc dang chon o dau */
.pill-check input:focus-visible ~ span { box-shadow: 0 0 0 3px rgba(91, 124, 250, .3); }

/* Khe vi chua co vi nao giu (trang Vi USDT) */
.panel.is-empty-slot {
    border-style: dashed;
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .015);
}
.panel.is-empty-slot::before { display: none; }
.panel.is-empty-slot .panel-head h3 { color: var(--muted); }

/* ---------------------------------------------- hộp hiện khóa riêng của ví */
.key-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(3, 5, 12, .78); backdrop-filter: blur(6px);
    display: grid; place-items: center; padding: 20px;
}
.key-box {
    width: min(560px, 100%); background: var(--panel);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.key-box h3 { margin: 0 0 16px; }
.key-row { display: flex; gap: 12px; font-size: .82rem; padding: 5px 0; border-bottom: 1px solid var(--line); }
.key-label { color: var(--muted); min-width: 90px; flex: none; }
.key-value { color: var(--text); word-break: break-all; }

/* Chuỗi khóa: nền đỏ nhạt để mắt nhận ra ngay đây là thứ nhạy cảm */
.key-secret {
    margin: 16px 0 12px; padding: 14px; border-radius: var(--radius-sm);
    background: rgba(255, 90, 106, .1); border: 1px solid rgba(255, 90, 106, .35);
    color: #FFD6DA; font-size: .78rem; line-height: 1.7; word-break: break-all; user-select: all;
}
.key-warn { font-size: .76rem; color: #FFAAB3; margin: 0 0 16px; }
.key-actions { display: flex; gap: 8px; }

/* ----------------------------------------------- lọc + tìm kiếm danh sách ví */
.wallet-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wallet-filter input[type="search"] { min-width: 220px; }

/* nhóm nút chọn kiểu phân đoạn */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; font-size: .84rem; font-weight: 600;
    color: var(--muted); background: transparent; border: 0; cursor: pointer;
    font-family: inherit; transition: background .15s, color .15s;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line-strong); }
.seg-btn:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.seg-btn.is-on { background: var(--grad); color: #fff; }
.seg-btn.is-on .badge { background: rgba(0, 0, 0, .25); border-color: transparent; color: #fff; }

/* dòng địa chỉ đã bị thay bằng địa chỉ mới */
tr.is-off { opacity: .55; }

/* Lưới 12 từ khóa: đánh số sẵn vì chép sai thứ tự là ra ví khác */
.seed-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    margin: 16px 0 12px; padding: 0 0 0 0; list-style: none; counter-reset: tu;
}
.seed-grid li {
    counter-increment: tu;
    display: flex; align-items: baseline; gap: 8px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: rgba(255, 90, 106, .1); border: 1px solid rgba(255, 90, 106, .3);
    color: #FFE3E6; font-size: .82rem; user-select: all;
}
.seed-grid li::before {
    content: counter(tu); flex: none;
    font-size: .68rem; color: var(--muted-2); min-width: 14px; text-align: right;
}
@media (max-width: 560px) { .seed-grid { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------- số dư ở thanh trên + nút tải lại */
.balance-chip { display: inline-flex; align-items: center; gap: 7px; }
.balance-chip.is-moi { animation: soDuNhay .9s ease; }
@keyframes soDuNhay {
    0%, 100% { transform: scale(1); }
    30%      { transform: scale(1.12); color: var(--ok); }
}
.balance-refresh {
    display: inline-grid; place-items: center; width: 22px; height: 22px;
    padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: transparent; color: var(--muted); transition: color .15s, background .15s;
}
.balance-refresh svg { width: 14px; height: 14px; }
.balance-refresh:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.balance-refresh.is-spin svg { animation: quay .8s linear infinite; }
.balance-refresh.is-xong { color: var(--ok); }
@keyframes quay { to { transform: rotate(360deg); } }

/* hộp báo tiền nạp đã vào */
.money-box { max-width: 420px; text-align: center; }
.money-icon {
    width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
    display: grid; place-items: center; font-size: 1.9rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #2ED47A, #12A85E);
    box-shadow: 0 12px 34px -10px rgba(46, 212, 122, .9);
    animation: tienVao .45s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes tienVao { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.money-row {
    display: flex; flex-direction: column; gap: 2px; align-items: center;
    padding: 12px; margin-bottom: 10px; border-radius: var(--radius-sm);
    background: rgba(46, 212, 122, .1); border: 1px solid rgba(46, 212, 122, .3);
}
.money-amount { font-size: 1.5rem; font-weight: 800; color: #8DEDB6; letter-spacing: -.02em; }
.key-actions.center { justify-content: center; }
