/* =========================================================================
   Buff View TikTok – giao diện
   ========================================================================= */
:root {
  --bg: #f4f5f9;
  --card: #fff;
  --text: #171923;
  --muted: #6b7084;
  --border: #e7e9f0;
  --primary: #fe2c55;
  --primary-600: #e5173f;
  --primary-50: #fff0f3;
  --cyan: #25f4ee;
  --ink: #0d0e14;
  --sidebar: #111219;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --purple: #7c3aed;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --sidebar-w: 256px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: #f1f2f6; padding: 1px 6px; border-radius: 6px; }
img { max-width: 100%; }
.ic { flex: none; vertical-align: middle; }
.hidden { display: none !important; }

/* ------------------------------ Helpers ------------------------------ */
.text-muted { color: var(--muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.m0 { margin: 0; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; }
.inline { display: inline; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--danger); font-weight: 600; }
.code-pill { background: var(--primary-50); color: var(--primary-600); font-weight: 700; padding: 3px 10px; border-radius: 8px; letter-spacing: .5px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------ Buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.3;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .05s, color .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(254, 44, 85, .28); }
.btn-primary:hover { background: var(--primary-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262833; }
.btn-light { background: #fff; color: var(--text); border-color: var(--border); }
.btn-light:hover { background: #f7f8fb; border-color: #d8dbe5; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-danger-soft { background: #fee2e2; color: #b91c1c; }
.btn-danger-soft:hover { background: #fecaca; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .6); border-top-color: transparent; animation: spin .7s linear infinite;
}
.btn-light.loading::after { border-color: #bbb; border-top-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: 0; background: transparent; color: inherit; cursor: pointer; transition: background .15s;
}
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.icon-btn.xs { width: 24px; height: 24px; border-radius: 6px; color: var(--muted); }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:hover { background: #fee2e2; }

/* ------------------------------ Forms ------------------------------ */
.field { margin-bottom: 16px; }
.label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; color: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(254, 44, 85, .14); }
.input:disabled, .input[readonly] { background: #f7f8fb; }
textarea.input { resize: vertical; }
select.input { padding-right: 30px; }
.input-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; width: auto; }
.input-lg { font-size: 18px; font-weight: 700; padding: 12px 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.copy-input { display: flex; gap: 8px; }
.rate-row { display: flex; align-items: center; gap: 10px; }
.rate-row span { color: var(--muted); font-weight: 600; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 13px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
}
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .slider { width: 42px; height: 24px; background: #d5d8e1; border-radius: 999px; position: relative; transition: background .2s; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--success); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch-label { font-weight: 600; font-size: 14px; }

/* ------------------------------ Alerts & badges ------------------------------ */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid transparent; }
.alert .ic { margin-top: 1px; }
.alert-success { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-muted { background: #f1f3f7; color: #64748b; }

/* ------------------------------ App layout ------------------------------ */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--sidebar); color: #b9bccb;
  display: flex; flex-direction: column; z-index: 50; transition: transform .25s ease;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.sidebar .brand { color: #fff; padding: 20px 22px 14px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--cyan) -10%, var(--primary) 70%);
  box-shadow: 0 4px 14px rgba(254, 44, 85, .35);
}
.brand-mark svg { fill: #fff; stroke: none; margin-left: 2px; }
.brand-lg { font-size: 22px; color: #fff; margin-bottom: 22px; }
.brand-lg .brand-mark { width: 40px; height: 40px; }

.nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #5f6273; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #b9bccb; text-decoration: none; font-weight: 500; margin-bottom: 2px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { color: #fff; background: linear-gradient(90deg, rgba(254, 44, 85, .22), rgba(254, 44, 85, .04)); box-shadow: inset 3px 0 0 var(--primary); }
.nav a.active .ic { color: var(--primary); }
.nav-count { margin-left: auto; background: var(--primary); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; }

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.sidebar-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sidebar-user strong { color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: #6f7385; font-size: 12px; }
.sidebar-user .icon-btn { color: #9a9db0; }
.sidebar-user .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #3b3d4d, #23242f); flex: none; }

.main { margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.page-title { font-size: 19px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; }
.balance-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px;
  background: var(--primary-50); color: var(--primary-600); font-weight: 700; text-decoration: none !important; white-space: nowrap;
}
.balance-pill b { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.content { padding: 26px 28px; width: 100%; max-width: 1320px; flex: 1; }
.app-footer { padding: 16px 28px; color: var(--muted); font-size: 13px; }
.backdrop { display: none; }

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 10, 20, .45); z-index: 40; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; margin-left: -8px; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 14px; }
  .app-footer { padding: 14px; }
}

/* ------------------------------ Cards ------------------------------ */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head.wrap { flex-wrap: wrap; }
.card-body { padding: 20px; }
.sticky { position: sticky; top: 84px; }

.grid-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.aside { min-width: 0; }
.cols-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.cols-main > .card, .cols-main > .aside { margin-bottom: 20px; }
.cols-main .aside > .card { margin-bottom: 0; }
.grid-2-even > .card { margin-bottom: 20px; }
@media (max-width: 1100px) { .cols-main { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }
@media (max-width: 760px) { .grid-2-even, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .card-head, .card-body { padding-left: 14px; padding-right: 14px; }
  .copy-row { flex-wrap: wrap; gap: 4px 10px; }
  .copy-row span { width: 100%; }
  .welcome { padding: 18px; }
  .stat-value { font-size: 19px; }
  .balance-pill { padding-left: 10px; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.stat-ic, .feature-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.c-pink { background: #ffe4ea; color: var(--primary-600); }
.c-green { background: #dcfce7; color: #15803d; }
.c-blue { background: #e0f2fe; color: #0369a1; }
.c-amber { background: #fef3c7; color: #b45309; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 21px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { font-size: 12px; color: var(--muted); }

.welcome {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--radius); margin-bottom: 20px; color: #fff;
  background: radial-gradient(circle at 85% -20%, rgba(37, 244, 238, .35), transparent 45%), radial-gradient(circle at 10% 120%, rgba(254, 44, 85, .55), transparent 50%), var(--ink);
}
.welcome h2 { font-size: 22px; margin-bottom: 6px; }
.welcome p { margin: 0; color: #c9cbd6; }
.welcome .code-pill { background: rgba(255, 255, 255, .12); color: #fff; }
.welcome-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.notice { display: flex; gap: 14px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.notice-ic { width: 38px; height: 38px; border-radius: 10px; background: #fef3c7; color: #b45309; display: grid; place-items: center; flex: none; }
.notice p { margin: 4px 0 0; color: #713f12; }

.todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.todo { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none !important; color: var(--text); display: flex; align-items: center; gap: 12px; transition: border-color .15s, transform .15s; }
.todo:hover { border-color: #cfd3de; transform: translateY(-1px); }
.todo b { font-size: 24px; font-weight: 800; min-width: 34px; }
.todo span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.todo.hot { border-color: #fecdd6; background: var(--primary-50); }
.todo.hot b { color: var(--primary-600); }
.todo.warn { border-color: #fde68a; background: #fffbeb; }
.todo.warn b { color: #b45309; }

.sync-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.sync-status > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.sync-status .text-muted { font-size: 12.5px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sync-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------ Tables ------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #f0f1f5; vertical-align: middle; }
.table tbody tr:hover td { background: #fcfcfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th.text-right, .table td.text-right { text-align: right; }
.table-compact td { padding: 9px 14px; }
.row-muted td { opacity: .55; }
.w-check { width: 36px; }
.link-cell { max-width: 300px; }
.link-cell a, .link-cell > :not(div) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.link-line a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 10px; color: var(--muted); }
.empty .ic { color: #c4c7d2; }

.approve-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.approve-form .input-sm { width: 120px; }
.approve-form input[name="admin_note"], .approve-form input[name="username"] { width: 150px; }

.bulk-bar { display: flex; gap: 10px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--border); background: #fcfcfe; flex-wrap: wrap; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs-inline { border: 0; margin: 0; flex-wrap: wrap; gap: 4px; }
.tabs-inline a { border: 0; border-radius: 8px; padding: 6px 11px; font-size: 13.5px; margin: 0; }
.tabs-inline a span { font-size: 11.5px; background: #f1f3f7; color: var(--muted); border-radius: 999px; padding: 0 7px; }
.tabs-inline a.active { background: var(--primary-50); }
.tabs-inline a.active span { background: #fff; color: var(--primary); }
.tab-count { background: var(--primary); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.tab-count.warn { background: var(--warning); }

.search { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: #fff; color: var(--muted); }
.search input { border: 0; outline: 0; padding: 7px 2px; font: inherit; font-size: 13.5px; width: 190px; background: transparent; color: var(--text); }
.search:focus-within { border-color: var(--primary); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pagination { display: flex; gap: 4px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px; font-weight: 600; font-size: 13.5px; }
.pagination a { color: var(--text); border: 1px solid var(--border); text-decoration: none; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; }
.pagination .disabled, .pagination .dots { color: #c0c3cf; }

.info-list { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; margin: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 500; }

/* ------------------------------ Order page ------------------------------ */
.svc-list { display: flex; flex-direction: column; gap: 10px; }
.svc-option {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.svc-option:hover { border-color: #f9a8b8; }
.svc-option input { position: absolute; opacity: 0; pointer-events: none; }
.svc-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c8ccd8; flex: none; position: relative; }
.svc-option:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.svc-option:has(input:checked) .svc-radio { border-color: var(--primary); }
.svc-option:has(input:checked) .svc-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.svc-option:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(254, 44, 85, .18); }
.svc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.svc-main small { color: var(--muted); font-size: 12.5px; }
.svc-price { text-align: right; display: flex; flex-direction: column; white-space: nowrap; }
.svc-price b { color: var(--primary-600); font-size: 16px; }
.svc-price small { color: var(--muted); font-size: 12px; }

.summary { background: linear-gradient(135deg, #fff1f4, #effefe); border-radius: 12px; padding: 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.sum-row span { color: var(--muted); }
.sum-row strong { text-align: right; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px dashed #f3b6c3; margin-top: 8px; padding-top: 12px; }
.sum-total span { font-weight: 600; }
.sum-total b { font-size: 28px; font-weight: 800; color: var(--primary-600); letter-spacing: -.5px; }

/* ------------------------------ Deposit page ------------------------------ */
.bank-box { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.qr { text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.qr img { width: 100%; aspect-ratio: 540 / 640; object-fit: contain; display: block; border-radius: 8px; background: #fafbfc; }
.qr small { color: var(--muted); font-size: 12px; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.copy-row span { color: var(--muted); width: 150px; flex: none; font-size: 13.5px; }
.copy-row strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-row .big { font-size: 20px; color: var(--primary-600); letter-spacing: 1px; }
.copy-row.highlight { background: var(--primary-50); border: 1px dashed #f9a8b8; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.notes { margin: 20px 0 0; padding-left: 20px; color: #4a4e60; }
.notes li { margin-bottom: 6px; }
.check-bar { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; background: #f7f8fb; border-radius: 12px; font-size: 13.5px; flex-wrap: wrap; }
.check-bar #checkStatus { flex: 1; min-width: 180px; color: var(--muted); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); animation: pulse 1.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .55); } 70% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
@media (max-width: 640px) {
  .bank-box { grid-template-columns: 1fr; }
  .qr { max-width: 260px; margin: 0 auto; }
  .copy-row span { width: 110px; }
}

/* ------------------------------ Modal ------------------------------ */
dialog.modal { border: 0; border-radius: 16px; padding: 0; width: min(540px, 94vw); box-shadow: 0 24px 60px rgba(10, 10, 30, .3); color: var(--text); }
dialog.modal::backdrop { background: rgba(10, 10, 25, .5); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafbfc; }

/* Popup nạp tiền thành công */
dialog.modal-success { width: min(400px, 92vw); overflow: visible; }
dialog.modal-success[open] { animation: popIn .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.success-body { position: relative; text-align: center; padding: 34px 26px 24px; }
.success-ic {
  width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 12px 28px rgba(22, 163, 74, .35), 0 0 0 8px #dcfce7;
}
.success-ic .ic { stroke-width: 3; }
dialog.modal-success[open] .success-ic .ic polyline { stroke-dasharray: 30; stroke-dashoffset: 30; animation: drawCheck .45s .2s ease forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.success-body h3 { font-size: 21px; margin: 0 0 6px; }
.success-amount { font-size: 34px; font-weight: 800; color: var(--success); letter-spacing: -.8px; line-height: 1.2; }
.success-body p { margin: 6px 0 14px; font-size: 14px; }
.success-balance { display: inline-flex; gap: 8px; align-items: baseline; background: #f4f5f9; border-radius: 999px; padding: 7px 16px; font-size: 14px; color: var(--muted); }
.success-balance b { color: var(--text); font-size: 16px; }
.success-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 22px; }
.success-burst { position: absolute; left: 50%; top: 72px; width: 0; height: 0; pointer-events: none; }
.success-burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; opacity: 0; }
dialog.modal-success[open] .success-burst i { animation: burst .9s .15s ease-out forwards; }
.success-burst i:nth-child(1) { background: var(--primary); --x: -90px; --y: -50px; }
.success-burst i:nth-child(2) { background: var(--cyan); --x: 85px; --y: -60px; }
.success-burst i:nth-child(3) { background: #facc15; --x: -70px; --y: 30px; }
.success-burst i:nth-child(4) { background: #a78bfa; --x: 95px; --y: 20px; }
.success-burst i:nth-child(5) { background: #22c55e; --x: -30px; --y: -85px; }
.success-burst i:nth-child(6) { background: var(--primary); --x: 40px; --y: -80px; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(200deg); } }

/* Khung hỗ trợ ở trang nạp tiền */
.support-note { margin: 0 0 14px; color: #3f4354; }
.support-info { background: #f7f8fb; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.support-info ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.support-info li { margin: 2px 0; }
.contact-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-zalo { background: #0068ff; color: #fff; }
.btn-zalo:hover { background: #0057d6; }
.btn-fb { background: #1877f2; color: #fff; }
.btn-fb:hover { background: #0f63d0; }

/* Trang API */
.strike { text-decoration: line-through; }
.kv-table td { padding: 8px 10px; }
.kv-table td:first-child { width: 130px; white-space: nowrap; }
.steps-list { margin: 0; padding-left: 20px; }
.steps-list li { margin-bottom: 8px; }
.api-docs { display: flex; flex-direction: column; gap: 10px; }
.api-block { border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
.api-block[open] { padding-bottom: 16px; }
.api-block summary { cursor: pointer; padding: 13px 0; display: flex; justify-content: space-between; align-items: center; font-weight: 600; list-style: none; }
.api-block summary::-webkit-details-marker { display: none; }
.api-block summary::after { content: "+"; font-size: 18px; color: var(--muted); margin-left: 12px; }
.api-block[open] summary::after { content: "−"; }
.api-block summary code { margin-left: auto; }
.param-table { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
pre.code { background: #0f1117; color: #d7dae4; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 6px 0 0; }

/* ------------------------------ Toast ------------------------------ */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: toastIn .25s ease; max-width: 340px; border-left: 4px solid var(--success); }
.toast.info { border-left-color: var(--info); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* ------------------------------ Auth ------------------------------ */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 30px 16px;
  background: radial-gradient(circle at 15% 15%, rgba(37, 244, 238, .18), transparent 35%), radial-gradient(circle at 85% 85%, rgba(254, 44, 85, .25), transparent 40%), var(--ink);
}
.auth-wrap { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; }
.auth-card { width: 100%; background: #fff; border-radius: 18px; padding: 30px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-title { font-size: 23px; margin-bottom: 4px; }
.auth-switch { text-align: center; margin: 18px 0 0; color: var(--muted); }

/* ------------------------------ Landing ------------------------------ */
.landing { background: #fff; }
.lp-container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.lp-nav { position: sticky; top: 0; z-index: 30; background: rgba(13, 14, 20, .85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.lp-nav .brand { color: #fff; }
.lp-links { display: flex; align-items: center; gap: 8px; }
.lp-links > a:not(.btn) { color: #c9cbd6; padding: 8px 12px; font-weight: 500; }
.lp-links > a:not(.btn):hover { color: #fff; text-decoration: none; }

.hero { background: radial-gradient(circle at 80% 30%, rgba(37, 244, 238, .16), transparent 40%), radial-gradient(circle at 10% 90%, rgba(254, 44, 85, .28), transparent 45%), var(--ink); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 70px; padding-bottom: 90px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: 13px; font-weight: 600; color: #e5e7ef; }
.pill .ic { color: var(--cyan); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -1.2px; margin: 18px 0 16px; line-height: 1.1; }
.grad { background: linear-gradient(90deg, var(--cyan), #a78bfa 45%, var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #b9bccb; font-size: 17px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { margin-top: 18px; font-size: 14px; }
.hero-note b { color: #fff; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone { width: 240px; height: 440px; border-radius: 36px; padding: 10px; background: #1d1e27; box-shadow: 0 40px 80px rgba(0, 0, 0, .5), inset 0 0 0 2px #2b2d39; transform: rotate(-4deg); }
.phone-screen { height: 100%; border-radius: 28px; position: relative; overflow: hidden; background: linear-gradient(160deg, #25f4ee 0%, #6d5dfc 45%, #fe2c55 100%); }
.phone-play { position: absolute; inset: 0; display: grid; place-items: center; }
.phone-play .ic { width: 64px; height: 64px; fill: rgba(255, 255, 255, .92); stroke: none; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .25)); }
.phone-meta { position: absolute; left: 14px; right: 14px; bottom: 16px; display: flex; gap: 8px; }
.phone-meta span { display: inline-flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, .35); padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--text); font-size: 13px; font-weight: 600; padding: 9px 13px; border-radius: 12px; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); white-space: nowrap; }
.float-chip .ic { color: var(--success); }
.chip-a { top: 60px; left: -10px; animation: float 5s ease-in-out infinite; }
.chip-b { bottom: 70px; right: -6px; animation: float 5s ease-in-out infinite 1.5s; }
.chip-b .ic { color: var(--primary); }
@keyframes float { 50% { transform: translateY(-10px); } }

.lp-section { padding: 70px 0; }
.lp-section.alt { background: #f6f7fb; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 32px; letter-spacing: -.6px; }
.section-head p { color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 24px; border: 1px solid var(--border); border-radius: 16px; }
.feature h3 { margin-top: 14px; font-size: 18px; }
.feature p { color: var(--muted); margin: 0; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.price-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--primary); box-shadow: 0 20px 50px rgba(254, 44, 85, .15); }
.price-card h3 { font-size: 17px; }
.price { margin: 6px 0 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.price span { color: var(--muted); }
.price-card p { color: var(--muted); font-size: 14px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.price-card li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.price-card li .ic { color: var(--success); }
.ribbon { position: absolute; top: -12px; right: 20px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 26px; border-radius: 16px; background: #f6f7fb; }
.step > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--cyan) -20%, var(--primary) 70%); margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }

.lp-footer { background: var(--ink); color: #9a9db0; padding: 28px 0; }
.lp-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lp-footer .brand { color: #fff; }
.lp-contact { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.lp-contact a { color: #c9cbd6; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 50px; padding-bottom: 60px; }
  .hero-visual { display: none; }
  .features, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .lp-links .btn { padding: 8px 12px; }
  .search input { width: 130px; }
}
