:root {
  --brand: #6d28d9;
  --brand-2: #8b5cf6;
  --brand-soft: #f3e8ff;
  --side-w: 250px;
  --bs-primary: #6d28d9;
  --bs-primary-rgb: 109, 40, 217;
}
body { background: #f5f3fb; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f1d2b; }
a { color: var(--brand); }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: #5b21b6; --bs-btn-hover-border-color: #5b21b6; --bs-btn-active-bg: #4c1d95; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
.page-item.active .page-link { background: var(--brand); border-color: var(--brand); }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(139, 92, 246, .2); }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); background: linear-gradient(180deg, #4c1d95, #6d28d9); color: #fff; flex-shrink: 0; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar .brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; font-weight: 800; font-size: 1.25rem; }
.sidebar .brand a { color: #fff; text-decoration: none; }
.sidebar .brand img { max-height: 42px; max-width: 190px; }
.menu { display: flex; flex-direction: column; padding: 6px 10px; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.85); text-decoration: none; padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.menu a i { width: 20px; text-align: center; }
.menu a:hover { background: rgba(255,255,255,.12); color: #fff; }
.menu a.active { background: #fff; color: var(--brand); }
.menu .admin-link { margin-top: 10px; border: 1px dashed rgba(255,255,255,.4); }
.side-contact { padding: 16px 24px; font-size: .9rem; color: rgba(255,255,255,.8); }
.side-contact a { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: #fff; border-bottom: 1px solid #ece8f6; position: sticky; top: 0; z-index: 100; }
.balance { background: var(--brand-soft); color: var(--brand); font-weight: 700; padding: 7px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.content { padding: 24px; flex: 1; }
@media (max-width: 576px) { .content { padding: 14px; } .topbar { padding: 10px 14px; } }
.footer { padding: 16px 24px; color: #8a86a0; font-size: .875rem; }

.card { border: 0; border-radius: 14px; box-shadow: 0 2px 10px rgba(76, 29, 149, .06); }
.card-header { background: #fff; border-bottom: 1px solid #f0edf8; font-weight: 700; border-radius: 14px 14px 0 0 !important; padding: 14px 18px; }
.page-title { font-weight: 800; font-size: 1.35rem; margin-bottom: 18px; }
.notice { background: linear-gradient(135deg, #6d28d9, #a855f7); color: #fff; border-radius: 14px; padding: 18px 22px; }
.notice a { color: #fff; text-decoration: underline; }

.svc-card { border: 2px solid transparent; cursor: pointer; transition: .15s; height: 100%; }
.svc-card:hover { transform: translateY(-2px); }
.svc-card.selected { border-color: var(--brand); }
.svc-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; }
.svc-icon.tim { background: #ef4444; } .svc-icon.follow { background: #3b82f6; } .svc-icon.view { background: #10b981; }
.price-tag { color: var(--brand); font-weight: 800; }
.stat { padding: 18px; }
.stat .num { font-size: 1.5rem; font-weight: 800; }
.stat .lbl { color: #8a86a0; font-size: .875rem; }
.table > :not(caption) > * > * { padding: .65rem .75rem; vertical-align: middle; }
.table thead th { font-size: .8rem; text-transform: uppercase; color: #8a86a0; font-weight: 700; white-space: nowrap; }
.link-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 8px; }
.progress-bar { background: var(--brand); }
.qr-box img { max-width: 260px; width: 100%; border-radius: 12px; border: 1px solid #eee; }
.copy { cursor: pointer; }
.empty { text-align: center; padding: 60px 20px; color: #8a86a0; }
.empty i { font-size: 3rem; color: #d8cff0; margin-bottom: 12px; }
.auth-wrap { max-width: 420px; margin: 40px auto; }
.page-title { color: #1f1d2b; }
.nav-pills .nav-link { color: var(--brand); }
.nav-pills .nav-link.active { background: var(--brand); color: #fff; }

/* ---- 2 ung dung uu tien + nhan HOT vang sang chay ---- */
.hot-app { border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, #facc15, #f59e0b, #a855f7, #facc15) border-box; background-size: 100% 100%, 300% 300%; animation: hotBorder 4s linear infinite; transition: transform .15s; }
.hot-app:hover { transform: translateY(-2px); }
.hot-app-title { font-size: 1.2rem; font-weight: 800; }
.svc-icon.big { width: 58px; height: 58px; font-size: 1.6rem; border-radius: 16px; flex-shrink: 0; }
.hot-badge { position: relative; overflow: hidden; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 900; letter-spacing: .08em;
  color: #7c2d12; background: linear-gradient(90deg, #fde047, #facc15, #fbbf24); box-shadow: 0 0 6px #fde047, 0 0 14px rgba(250, 204, 21, .8); animation: hotPulse 1.2s ease-in-out infinite; }
.hot-badge::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent); transform: skewX(-20deg); animation: hotShine 1.8s linear infinite; }
.hot-badge.sm { font-size: .62rem; padding: 1px 7px; }
@keyframes hotPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 6px #fde047, 0 0 12px rgba(250,204,21,.7); } 50% { transform: scale(1.12); box-shadow: 0 0 12px #fde047, 0 0 26px rgba(250,204,21,1); } }
@keyframes hotShine { 0% { left: -60%; } 100% { left: 130%; } }
@keyframes hotBorder { 0% { background-position: 0 0, 0% 50%; } 100% { background-position: 0 0, 300% 50%; } }
@media (prefers-reduced-motion: reduce) { .hot-badge, .hot-badge::after, .hot-app { animation: none; } }
