/* ============================================================
   SMM VIỆT - Main CSS
   Font: Be Vietnam Pro + Syne
   Theme: Dark premium with neon accents
   ============================================================ */

:root,
html[data-theme="light"] {
  /* Tone xanh hiện đại (gần TopSubRe) thay tím */
  --primary: #4361EE;
  --primary-dark: #3A56D4;
  --primary-light: #5B7AFF;
  --secondary: #22C55E;
  --accent: #FF6B6B;
  --warning: #F59E0B;
  --info: #3B82F6;
  --success: #22C55E;
  --bg-dark: #F5F7FB;
  --bg-card: #FFFFFF;
  --bg-card2: #FFFFFF;
  --bg-input: #F8FAFC;
  --border: rgba(67, 97, 238, 0.18);
  --border-light: rgba(15, 23, 42, 0.08);
  --text: #0F172A;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --shadow: 0 18px 48px rgba(15,23,42,0.10);
  --shadow-card: 0 8px 26px rgba(15,23,42,0.06);
  --glow: 0 10px 28px rgba(67,97,238,0.18);
  --glow-green: 0 10px 28px rgba(34,197,94,0.16);
  --body-overlay: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,247,251,0.35));
  --topbar-height: 40px;
  --sidebar-width: 188px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  --primary: #7C6DFF;
  --primary-dark: #5A52D5;
  --primary-light: #9A91FF;
  --secondary: #00D4AA;
  --accent: #FF6B6B;
  --warning: #FFB347;
  --info: #4ECDC4;
  --success: #00D4AA;
  --bg-dark: #0A0B1A;
  --bg-card: #12132A;
  --bg-card2: #1A1B35;
  --bg-input: #1E2040;
  --border: rgba(108, 99, 255, 0.24);
  --border-light: rgba(255,255,255,0.08);
  --text: #E8E9FF;
  --text-muted: #A1A3C4;
  --text-dim: #6F7194;
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --glow: 0 0 30px rgba(67,97,238,0.3);
  --glow-green: 0 0 30px rgba(0,212,170,0.3);
  --body-overlay: radial-gradient(ellipse 80% 50% at 20% -10%, rgba(67,97,238,0.15) 0%, transparent 50%),
                  radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0,212,170,0.08) 0%, transparent 50%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--body-overlay);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   PAGE LOADER
   ============================================================ */
#page-loader {
  position: fixed; inset: 0;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}
.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  animation: loadingBar 1.2s ease-in-out infinite;
}
@keyframes loadingBar {
  0% { width: 0; margin-left: 0; }
  50% { width: 70%; }
  100% { width: 0; margin-left: 100%; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 1.5rem;
  height: 68px;
  display: flex; align-items: center;
  background: #ffffff;
  border-bottom: 2px solid rgba(67,97,238,0.18);
  box-shadow: 0 2px 16px rgba(67,97,238,0.08);
  transition: var(--transition);
}
.navbar.scrolled {
  background: #ffffff;
  box-shadow: 0 4px 28px rgba(67,97,238,0.14);
  border-bottom-color: rgba(67,97,238,0.28);
}
html[data-theme="dark"] .navbar {
  background: #0d0e21;
  border-bottom: 2px solid rgba(124,109,255,0.25);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
html[data-theme="dark"] .navbar.scrolled {
  background: #0d0e21;
  box-shadow: 0 4px 32px rgba(0,0,0,0.55);
  border-bottom-color: rgba(124,109,255,0.4);
}
.nav-container {
  width: 100%; max-width: 1400px; margin: auto;
  display: flex; align-items: center; gap: 2rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), #A855F7);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  box-shadow: var(--glow);
}
.brand-text {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-menu {
  display: flex; align-items: center; gap: 0.25rem;
  flex: 1;
}
.nav-link {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(67,97,238,0.1);
}
.nav-link.active { color: var(--primary-light); }
.nav-link i { font-size: 0.8rem; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; flex-shrink: 0; }
.nav-mobile-actions { display: none; }

.balance-chip {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(0,212,170,0.1);
  border: 1px solid rgba(0,212,170,0.3);
  border-radius: 99px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.balance-chip:hover {
  background: rgba(0,212,170,0.2);
  box-shadow: var(--glow-green);
}

.nav-avatar {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 0.9rem;
  transition: var(--transition);
}
.nav-avatar:hover { box-shadow: var(--glow); transform: scale(1.05); }
.notif-dot {
  position: absolute; top: -3px; right: -3px;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-dark);
}
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 220px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}
.nav-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  display: flex; flex-direction: column; gap: 0.2rem;
}
.dropdown-header strong { font-size: 0.9rem; color: var(--text); }
.dropdown-header small { font-size: 0.75rem; color: var(--text-muted); }
.dropdown-menu a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}
.dropdown-menu a:hover { background: rgba(67,97,238,0.1); color: var(--text); }
.dropdown-menu a i { width: 16px; text-align: center; }
.dropdown-divider { height: 1px; background: var(--border-light); margin: 0.25rem 0; }
.admin-link { color: var(--warning) !important; }
.text-danger { color: var(--accent) !important; }
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(67,97,238,0.1);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: rgba(67,97,238,0.2); }

/* Mobile menu overlay backdrop */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
  backdrop-filter: blur(2px);
}
.nav-overlay.show { display: block; }

/* ============================================================
   APP SHELL (GLOBAL SIDEBAR + TOPBAR)
   ============================================================ */
.app-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.875rem;
  background: rgba(255,255,255,0.86);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: var(--transition);
}
html[data-theme="dark"] .app-topbar {
  background: rgba(10,11,26,0.88);
}
.app-topbar.scrolled {
  box-shadow: 0 8px 22px rgba(15,23,42,0.08);
}
.app-topbar-left,
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.app-menu-toggle,
.sidebar-close,
.topbar-chip,
.topbar-exit {
  width: 32px;
  height: 32px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.app-menu-toggle { display: none; }
.sidebar-close { display: none; }
.topbar-chip {
  gap: 0.35rem;
  width: auto;
  min-width: 40px;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
}
.topbar-chip i { color: var(--primary); }
.theme-toggle {
  min-width: 32px;
  padding: 0;
  color: var(--primary);
}
.topbar-chip:hover,
.topbar-exit:hover,
.app-menu-toggle:hover,
.sidebar-close:hover {
  color: var(--primary);
  background: rgba(67,97,238,0.1);
}
.topbar-exit {
  color: var(--accent);
  background: rgba(255,107,107,0.1);
}
.topbar-user {
  position: relative;
  min-width: 86px;
  height: 36px;
  padding: 0.25rem 0.75rem;
  border-left: 1px solid var(--border-light);
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
}
.topbar-user strong {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
}
.topbar-user small {
  margin-top: 0.12rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.topbar-user .notif-dot {
  top: 1px;
  right: 2px;
}

.app-mobile-brand {
  display: none;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
}
.app-mobile-brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.app-mobile-brand .brand-text {
  font-size: 1rem;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1100;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  box-shadow: 8px 0 28px rgba(15,23,42,0.05);
}
.sidebar-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0.75rem;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
.sidebar-brand .brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 12px 24px rgba(67,97,238,0.28);
}
.sidebar-brand strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}
.sidebar-brand small {
  display: block;
  margin-top: 0.16rem;
  color: var(--text-dim);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sidebar-label {
  padding: 0.45rem 1rem 0.55rem;
  color: var(--text-dim);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.55rem 0.75rem;
  scrollbar-width: thin;
}
.sidebar-link {
  position: relative;
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-link + .sidebar-link,
.sidebar-submenu + .sidebar-link {
  margin-top: 0.2rem;
}
.sidebar-link-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  color: var(--text-dim);
  font-size: 0.72rem;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(67,97,238,0.07);
}
.sidebar-link:hover .sidebar-link-icon {
  color: var(--primary);
}
.sidebar-link.active {
  color: var(--text);
  background: rgba(67,97,238,0.12);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -0.55rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}
.sidebar-link.active .sidebar-link-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.sidebar-chevron {
  margin-left: auto;
  font-size: 0.62rem;
  transition: transform 0.2s ease;
}
.sidebar-collapse-toggle.open .sidebar-chevron {
  transform: rotate(180deg);
}
.sidebar-submenu {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0.15rem 0 0.4rem 2.6rem;
}
.sidebar-submenu.open {
  display: flex;
}
.sidebar-submenu a {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.2rem;
}
.sidebar-submenu a:hover {
  color: var(--primary);
}
.sidebar-user {
  margin: auto 0.75rem 0.75rem;
  padding: 0.7rem 0.6rem;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  border-top: 1px solid var(--border-light);
}
.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: var(--glow);
}
.sidebar-user-meta {
  min-width: 0;
  flex: 1;
}
.sidebar-user-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
}
.sidebar-user-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.12rem;
  color: var(--secondary);
  font-size: 0.62rem;
  font-weight: 700;
}
.sidebar-user > i {
  color: var(--text-dim);
  font-size: 0.65rem;
}

.app-layout .main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
}
.app-layout .footer {
  margin-left: var(--sidebar-width);
}
.app-layout .nav-overlay {
  z-index: 1090;
  background: rgba(15,23,42,0.52);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(67,97,238,0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67,97,238,0.6);
}
.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), #00B890);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,212,170,0.3);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--glow-green); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(67,97,238,0.05); }
.btn-danger { background: linear-gradient(135deg, var(--accent), #e55); color: #fff; }
.btn-warning { background: linear-gradient(135deg, var(--warning), #e0963a); color: #fff; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: var(--radius); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content { min-height: calc(100vh - 68px); padding-top: 68px; position: relative; z-index: 1; }

/* ============================================================
   CONTAINERS & LAYOUT
   ============================================================ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 1400px; }
.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border); box-shadow: var(--shadow-card); }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title {
  font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.6rem;
}
.card-title i { color: var(--primary); }
.card-body { padding: 1.5rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.3px;
}
.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67,97,238,0.15);
}
.form-control::placeholder { color: var(--text-dim); }
select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%238A8BAA' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.35rem; }
.form-error { font-size: 0.78rem; color: var(--accent); margin-top: 0.35rem; }

/* Input icon */
.input-group { position: relative; }
.input-group .input-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 0.9rem;
}
.input-group .form-control { padding-left: 2.75rem; }
.input-group .input-icon-right {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); cursor: pointer;
}

/* ============================================================
   ALERTS & BADGES
   ============================================================ */
.alert {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  position: relative;
}
.alert-success { background: rgba(0,212,170,0.1); border: 1px solid rgba(0,212,170,0.3); color: var(--secondary); }
.alert-danger { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.3); color: var(--accent); }
.alert-warning { background: rgba(255,179,71,0.1); border: 1px solid rgba(255,179,71,0.3); color: var(--warning); }
.alert-info { background: rgba(78,205,196,0.1); border: 1px solid rgba(78,205,196,0.3); color: var(--info); }
.alert-close {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: inherit; cursor: pointer; opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-primary { background: rgba(67,97,238,0.2); color: var(--primary-light); }
.badge-success { background: rgba(0,212,170,0.15); color: var(--secondary); }
.badge-danger { background: rgba(255,107,107,0.15); color: var(--accent); }
.badge-warning { background: rgba(255,179,71,0.15); color: var(--warning); }
.badge-info { background: rgba(78,205,196,0.15); color: var(--info); }
.badge-secondary { background: rgba(255,255,255,0.08); color: var(--text-muted); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-muted);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(67,97,238,0.04); color: var(--text); }

/* ============================================================
   FLASH & ANNOUNCEMENT
   ============================================================ */
.flash-container {
  position: fixed; top: 80px; right: 1.5rem;
  z-index: 999; min-width: 320px; max-width: 450px;
}
.announcement {
  padding: 0.65rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
}
.announcement-info { background: rgba(67,97,238,0.15); border-bottom: 1px solid rgba(67,97,238,0.2); }
.announcement-success { background: rgba(0,212,170,0.12); border-bottom: 1px solid rgba(0,212,170,0.2); }
.announcement-warning { background: rgba(255,179,71,0.12); border-bottom: 1px solid rgba(255,179,71,0.2); }
.announcement-danger { background: rgba(255,107,107,0.12); border-bottom: 1px solid rgba(255,107,107,0.2); }
.announcement-inner {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.announcement i { opacity: 0.8; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: clamp(640px, 90vh, 920px);
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
  padding: 3rem 0 2rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(67,97,238,0.25) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: 
    linear-gradient(rgba(67,97,238,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67,97,238,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 760px;
  width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(67,97,238,0.1);
  border: 1px solid rgba(67,97,238,0.3);
  border-radius: 99px;
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
  0%, 100% { border-color: rgba(67,97,238,0.3); }
  50% { border-color: rgba(67,97,238,0.6); }
}
.hero-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 800;
  line-height: 1.04;
  margin-bottom: 1.25rem;
  letter-spacing: -0.045em;
  max-width: 11ch;
  word-break: keep-all;
}
.hero-title-line { display: block; }
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 38rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 1rem;
  max-width: 700px;
}
.stat-item { min-width: 0; }
.stat-num {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.1rem; }

.hero-visual {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 45%;
  animation: float 6s ease-in-out infinite;
  display: none;
}
@keyframes float {
  0%, 100% { transform: translateY(-50%) translateY(0); }
  50% { transform: translateY(-50%) translateY(-20px); }
}

/* ============================================================
   SERVICE CATEGORIES
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}
.cat-card:hover, .cat-card.active {
  border-color: var(--primary);
  background: rgba(67,97,238,0.08);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: var(--glow);
}
.cat-icon {
  font-size: 1.75rem;
  margin-bottom: 0.6rem;
  display: block;
}
.cat-name { font-size: 0.85rem; font-weight: 600; }
.cat-count { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.25rem; }

/* Platform specific colors */
.cat-facebook .cat-icon { color: #1877F2; }
.cat-instagram .cat-icon { color: #E4405F; }
.cat-tiktok .cat-icon { color: #FF0050; }
.cat-youtube .cat-icon { color: #FF0000; }
.cat-twitter .cat-icon { color: #1DA1F2; }
.cat-telegram .cat-icon { color: #26A5E4; }

/* ============================================================
   SERVICE LIST
   ============================================================ */
.services-grid {
  display: grid;
  gap: 1rem;
}
.service-row {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}
.service-row:hover { border-color: var(--border); background: var(--bg-card2); }
.service-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.service-meta { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.25rem; }
.service-price { text-align: right; }
.service-price-val {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--secondary);
}
.service-price-unit { font-size: 0.72rem; color: var(--text-dim); }

/* ============================================================
   ORDER PAGE
   ============================================================ */
.order-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}
.order-summary-card {
  position: sticky; top: 88px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.order-summary-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 1.25rem 1.5rem;
}
.order-summary-header h3 { font-size: 1rem; font-weight: 700; }
.summary-items { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 0.875rem;
}
.summary-row .label { color: var(--text-muted); }
.summary-row .value { font-weight: 600; }
.summary-total {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
}
.summary-total .amount {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  color: var(--secondary);
}

/* ============================================================
   STATS CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.purple::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--secondary), #00f5c4); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--warning), #FFD700); }
.stat-card.red::before { background: linear-gradient(90deg, var(--accent), #FF9F9F); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.stat-card-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}
.stat-card.purple .stat-card-icon { background: rgba(67,97,238,0.15); color: var(--primary-light); }
.stat-card.green .stat-card-icon { background: rgba(0,212,170,0.15); color: var(--secondary); }
.stat-card.orange .stat-card-icon { background: rgba(255,179,71,0.15); color: var(--warning); }
.stat-card.red .stat-card-icon { background: rgba(255,107,107,0.15); color: var(--accent); }
.stat-card-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem; font-weight: 800;
  margin-bottom: 0.25rem;
}
.stat-card-label { font-size: 0.8rem; color: var(--text-dim); }
.stat-card-change {
  position: absolute; top: 1.25rem; right: 1.25rem;
  font-size: 0.75rem; font-weight: 600;
}
.stat-card-change.up { color: var(--secondary); }
.stat-card-change.down { color: var(--accent); }

/* ============================================================
   DEPOSIT PAGE
   ============================================================ */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.payment-method-btn {
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: var(--bg-card);
  color: var(--text-muted);
}
.payment-method-btn:hover, .payment-method-btn.selected {
  border-color: var(--primary);
  background: rgba(67,97,238,0.08);
  color: var(--text);
}
.payment-method-btn i { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.payment-method-btn span { font-size: 0.82rem; font-weight: 600; }

.qr-box {
  text-align: center;
  padding: 2rem;
}
.vietqr-box {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
}
.qr-img {
  width: 180px; height: 180px;
  background: #fff;
  border-radius: var(--radius);
  margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.qr-img img[data-vietqr-img] { width: 100%; height: 100%; object-fit: contain; }
.qr-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--qr-logo-size, 22px) !important;
  height: var(--qr-logo-size, 22px) !important;
  transform: translate(-50%, -50%);
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  pointer-events: none;
}
.qr-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8;
  font-size: 2.25rem;
}
.qr-status {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.bank-details {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.bank-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
}
.bank-detail-row:last-child { border-bottom: none; }
.bank-detail-row .key { color: var(--text-muted); }
.bank-detail-row .val { font-weight: 600; display: flex; align-items: center; gap: 0.5rem; min-width: 0; word-break: break-word; }
.transfer-content-box { align-items: flex-start; }
.transfer-content-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.transfer-content {
  color: var(--text);
  font-weight: 800;
  word-break: break-word;
}
.copy-btn {
  background: none; border: none;
  color: var(--primary-light); cursor: pointer; font-size: 0.8rem;
  transition: var(--transition);
}
.copy-btn:hover { color: var(--primary); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo .brand-text {
  font-size: 1.5rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.auth-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}
.auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--text-dim); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  height: 1px;
  background: var(--border-light);
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--primary-light); text-decoration: none; font-weight: 600; }

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute; bottom: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(var(--primary), transparent);
  opacity: 0.08;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border); transform: translateY(-4px); }
.feature-card:hover::after { transform: scale(2); opacity: 0.12; }
.feature-icon {
  width: 52px; height: 52px;
  background: rgba(67,97,238,0.1);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  color: var(--primary-light);
  margin-bottom: 1.25rem;
}
.feature-title {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 0.6rem;
}
.feature-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  padding: 0.3rem 0.85rem;
  background: rgba(67,97,238,0.1);
  border-radius: 99px;
  border: 1px solid rgba(67,97,238,0.2);
}
.section-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.section-desc {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, rgba(67,97,238,0.15), rgba(0,212,170,0.05));
  border-bottom: 1px solid var(--border-light);
  padding: 2.5rem 0;
}
.page-header-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.page-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.75rem; font-weight: 800;
}
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; color: var(--text-dim);
  margin-top: 0.4rem;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-light); }

.account-page {
  padding-top: 2rem;
}
.account-page + .page-header + .container.section {
  padding-top: 1.25rem;
}
.account-page-head {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 16px 40px rgba(15,23,42,0.05);
}
.account-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-light);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.account-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.account-desc {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin-top: 0.45rem;
  max-width: 620px;
}
.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.account-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.account-stat-card span {
  display: block;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.account-stat-card strong {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}
.account-stat-card > i {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
}
.account-stat-card.purple > i { background: rgba(67,97,238,0.12); color: var(--primary-light); }
.account-stat-card.green > i { background: rgba(0,212,170,0.12); color: var(--secondary); }
.account-stat-card.amber > i { background: rgba(255,179,71,0.14); color: var(--warning); }
.account-stat-card.red > i { background: rgba(255,107,107,0.12); color: var(--accent); }
.account-filter-card {
  margin-bottom: 1.25rem;
}
.account-table-card {
  box-shadow: 0 14px 40px rgba(15,23,42,0.04);
}
.account-balance-chip {
  font-size: 1rem;
  padding: 0.65rem 1.1rem;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress { height: 8px; background: var(--bg-input); border-radius: 99px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: width 1s ease;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; align-items: center; gap: 0.4rem;
  justify-content: center;
  margin-top: 2rem;
}
.page-link {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}
.page-link:hover, .page-link.active {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(67,97,238,0.1);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
}
/* Light mode: nền trắng tách rõ khỏi body (tránh lẫn) */
html[data-theme="light"] .footer,
:root .footer {
  background: #FFFFFF;
  color: #334155;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.04);
}
html[data-theme="light"] .footer .footer-logo,
:root .footer .footer-logo { color: #0F172A; }
html[data-theme="light"] .footer .footer-brand p,
:root .footer .footer-brand p { color: #64748B; }
html[data-theme="light"] .footer-links h4,
html[data-theme="light"] .footer-contact h4,
:root .footer-links h4,
:root .footer-contact h4 {
  color: #0F172A !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
html[data-theme="light"] .footer-links a,
:root .footer-links a { color: #64748B !important; }
html[data-theme="light"] .footer-links a:hover,
:root .footer-links a:hover { color: var(--primary) !important; }
html[data-theme="light"] .footer-contact p,
:root .footer-contact p { color: #64748B !important; }
html[data-theme="light"] .footer-contact p i,
:root .footer-contact p i { color: var(--primary) !important; }
html[data-theme="light"] .badge-item,
:root .badge-item { color: #475569 !important; }
html[data-theme="light"] .social-links a,
:root .social-links a {
  background: #FFFFFF !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  color: #64748B !important;
  box-shadow: 0 1px 3px rgba(15,23,42,0.04);
}
html[data-theme="light"] .social-links a:hover,
:root .social-links a:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: rgba(67, 97, 238, 0.08) !important;
}
html[data-theme="light"] .footer-bottom,
:root .footer-bottom {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}
html[data-theme="light"] .footer-bottom p,
:root .footer-bottom p { color: #94A3B8 !important; }

/* Dark mode: giữ nền tối */
html[data-theme="dark"] .footer {
  background: #0a0b18;
  color: #c8cce8;
  border-top: 3px solid rgba(124, 109, 255, 0.35);
}
html[data-theme="dark"] .footer .footer-logo { color: #ffffff; }
html[data-theme="dark"] .footer .footer-brand p { color: #9ba3c8; }
html[data-theme="dark"] .footer-links h4,
html[data-theme="dark"] .footer-contact h4 {
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
html[data-theme="dark"] .footer-links a { color: #9ba3c8 !important; }
html[data-theme="dark"] .footer-links a:hover { color: #ffffff !important; }
html[data-theme="dark"] .footer-contact p { color: #9ba3c8 !important; }
html[data-theme="dark"] .footer-contact p i { color: var(--primary) !important; }
html[data-theme="dark"] .badge-item { color: #8890b8 !important; }
html[data-theme="dark"] .social-links a {
  background: rgba(255,255,255,0.07) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #9ba3c8 !important;
}
html[data-theme="dark"] .social-links a:hover {
  border-color: var(--primary) !important;
  color: #fff !important;
  background: rgba(124, 109, 255, 0.2) !important;
}
html[data-theme="dark"] .footer-bottom {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.07);
}
html[data-theme="dark"] .footer-bottom p { color: #6872a0 !important; }
.footer-top { padding: 3.5rem 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
}
.footer-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.deposit-layout,
.profile-grid {
  display: grid;
  gap: 1.5rem;
}

.deposit-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
}

.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.footer-logo i { color: var(--primary); }
.footer-brand p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.social-links { display: flex; gap: 0.6rem; }
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.social-links a:hover { border-color: var(--primary); color: var(--primary-light); background: rgba(67,97,238,0.1); }
.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); text-decoration: none; font-size: 0.875rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--text); }
.footer-links a i { font-size: 0.8rem; width: 16px; }
.footer-criteria {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--text-muted);
}
.footer-criteria i {
  font-size: 0.8rem; width: 16px; color: var(--secondary);
}
html[data-theme="light"] .footer-criteria,
:root .footer-criteria { color: #475569; }
html[data-theme="light"] .footer-criteria i,
:root .footer-criteria i { color: #16a34a; }
html[data-theme="dark"] .footer-criteria { color: #9ba3c8; }
html[data-theme="dark"] .footer-criteria i { color: var(--secondary); }
.footer-contact h4 {
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); margin-bottom: 1rem;
}
.footer-contact p {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.6rem;
}
.footer-contact p i { color: var(--primary); width: 16px; }
.footer-badges { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.badge-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-dim);
}
.badge-item i { color: var(--secondary); }
.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-light);
  text-align: center;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-dim); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--primary);
  border: none; border-radius: 50%;
  color: #fff; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(67,97,238,0.4);
  transition: var(--transition);
  opacity: 0; visibility: hidden;
  z-index: 500;
}
.back-top.visible { opacity: 1; visibility: visible; }
.back-top:hover { transform: translateY(-3px); box-shadow: var(--glow); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 540px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs { border-bottom: 1px solid var(--border-light); margin-bottom: 1.5rem; display: flex; gap: 0; }
.tab-btn {
  padding: 0.75rem 1.25rem;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  font-family: 'Be Vietnam Pro', sans-serif;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}
.empty-state i { font-size: 3.5rem; margin-bottom: 1.25rem; opacity: 0.4; display: block; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.empty-state p { font-size: 0.875rem; margin-bottom: 1.5rem; }

/* ============================================================
   SEARCH & FILTER
   ============================================================ */
.search-bar {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.search-bar .form-control { flex: 1; min-width: 200px; }
.filter-select { min-width: 160px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .deposit-layout,
  .profile-grid { grid-template-columns: 1fr; }
  .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .navbar { padding: 0 1rem; height: 60px; }
  .nav-container { gap: 0.5rem; }
  .nav-actions { gap: 0.4rem; }
  .public-navbar .nav-auth-btn { display: none; }
  .public-navbar .nav-brand {
    min-width: 0;
    overflow: hidden;
  }
  .public-navbar .brand-text {
    min-width: 0;
    max-width: 48vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Hide desktop nav menu, show toggle */
  .nav-menu {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.25rem 1rem 2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    overflow-y: auto;
    z-index: 999;
    border-top: 1px solid var(--border-light);
    /* Slide in from top */
    transform: translateY(-16px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
  }
  html[data-theme="dark"] .nav-menu {
    background: rgba(10,11,26,0.98);
  }
  .nav-menu.open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border-light);
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-link i { width: 20px; text-align: center; font-size: 0.9rem; }
  .nav-mobile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
  }
  .nav-mobile-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-toggle { display: flex; }

  /* Balance chip on mobile — show icon + amount, shorter */
  .balance-chip { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
  .balance-chip i { font-size: 0.85rem; }

  /* Hero */
  .hero { min-height: auto; padding: 3.5rem 0 2.5rem; }
  .hero-content { max-width: 100%; }
  .hero-title { font-size: 2.2rem; max-width: 100%; line-height: 1.1; }
  .hero-subtitle { font-size: 0.95rem; max-width: 100%; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Page header */
  .page-header { padding: 1.75rem 0; }
  .page-header-content { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .page-header-content .btn { width: 100%; justify-content: center; }
  .account-page { padding-top: 1rem; }
  .account-page-head { align-items: flex-start; flex-direction: column; padding: 1.15rem; }
  .account-page-head .btn,
  .account-page-head .balance-chip { width: 100%; justify-content: center; }
  .account-title { font-size: 1.25rem; }
  .account-desc { font-size: 0.82rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; }

  /* Other grids */
  .service-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }

  /* Search bar */
  .search-bar { flex-direction: column; gap: 0.5rem; }
  .search-bar .form-control { min-width: 0; width: 100%; }
  .filter-select { min-width: 0; width: 100%; }
  .search-bar .btn { width: 100%; justify-content: center; }

  /* Table scroll */
  .table-mobile-hide { display: none !important; }
  .table th, .table td { padding: 0.65rem 0.6rem; font-size: 0.78rem; }
  .table { min-width: 480px; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .account-stats { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 0.5rem; }
  .auth-card { padding: 1.5rem; }
  .balance-chip span { display: none; }
  .hero-title { font-size: 1.9rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3rem 0; }
  .page-title { font-size: 1.4rem; }
  .stat-card { padding: 1.1rem 1rem; }
  .stat-card-val { font-size: 1.4rem; }
  .auth-card [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .public-navbar .brand-text { max-width: 42vw; font-size: 1.05rem; }
  .bank-detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .qr-box { padding: 1.25rem; }
  .qr-img { width: 160px; height: 160px; }
}

@media (max-width: 360px) {
  .navbar { padding: 0 0.75rem; }
  .public-navbar .brand-text { max-width: 38vw; font-size: 0.98rem; }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--accent); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary-light); }
.fw-bold { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.p-2 { padding: 1rem; } .p-3 { padding: 1.5rem; }
.d-flex { display: flex; } .align-center { align-items: center; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; }

@media (max-width: 768px) {
  .app-topbar {
    left: 0;
    height: 50px;
    padding: 0 0.7rem;
  }
  .app-menu-toggle,
  .sidebar-close {
    display: inline-flex;
  }
  .app-mobile-brand {
    display: flex;
  }
  .app-topbar-actions {
    gap: 0.4rem;
    margin-left: auto;
  }
  .topbar-user {
    display: none;
  }
  .app-sidebar {
    width: min(82vw, 204px);
    transform: translateX(-102%);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    box-shadow: 18px 0 42px rgba(15,23,42,0.18);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-head {
    min-height: 64px;
    padding: 0.8rem 0.75rem;
  }
  .sidebar-link {
    min-height: 44px;
    font-size: 0.76rem;
  }
  .app-layout .main-content {
    margin-left: 0;
    padding-top: 50px;
  }
  .app-layout .footer {
    margin-left: 0;
  }
  .app-layout .flash-container {
    top: 62px;
    right: 0.75rem;
    left: 0.75rem;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .app-topbar {
    padding: 0 0.6rem;
  }
  .app-mobile-brand .brand-icon {
    width: 32px;
    height: 32px;
  }
  .app-mobile-brand .brand-text {
    font-size: 0.92rem;
  }
  .topbar-chip {
    height: 32px;
    min-width: 34px;
    padding: 0 0.5rem;
  }
  .theme-toggle,
  .topbar-exit,
  .app-menu-toggle {
    width: 32px;
  }
}
.w-100 { width: 100%; }
.rounded { border-radius: var(--radius-sm); }

/* Animate on scroll */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--bg-card2); border: 1px solid var(--border);
  color: var(--text); font-size: 0.75rem;
  padding: 0.35rem 0.65rem; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.2s;
  z-index: 10;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ============================================================
   ACCOUNT DASHBOARD REDESIGN
   ============================================================ */
.account-dashboard {
  padding: 1.5rem 0 2.75rem;
}

.account-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92)),
    linear-gradient(120deg, rgba(67,97,238,0.1), rgba(34,197,94,0.08));
  box-shadow: 0 18px 42px rgba(15,23,42,0.06);
}

html[data-theme="dark"] .account-hero {
  background:
    linear-gradient(135deg, rgba(18,19,42,0.96), rgba(26,27,53,0.9)),
    linear-gradient(120deg, rgba(124,109,255,0.12), rgba(0,212,170,0.08));
}

.account-hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.account-hero-copy {
  position: relative;
  min-width: 0;
}

.account-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  color: var(--primary-light);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
}

.account-hero p {
  max-width: 680px;
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.account-hero-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.account-soft-chip,
.account-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.balance-soft-chip {
  color: var(--secondary);
  border-color: rgba(34,197,94,0.24);
  background: rgba(34,197,94,0.1);
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.95rem 0 1.1rem;
}

.account-metric {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 1rem 1rem 0.95rem;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: 0 12px 30px rgba(15,23,42,0.04);
}

.account-metric::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--primary);
}

.account-metric span {
  display: block;
  padding-right: 3rem;
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-metric strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}

.account-metric > i {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(67,97,238,0.12);
  color: var(--primary-light);
}

.account-metric.green::before { background: var(--secondary); }
.account-metric.green > i { background: rgba(34,197,94,0.12); color: var(--secondary); }
.account-metric.amber::before { background: var(--warning); }
.account-metric.amber > i { background: rgba(245,158,11,0.14); color: var(--warning); }
.account-metric.red::before { background: var(--accent); }
.account-metric.red > i { background: rgba(255,107,107,0.12); color: var(--accent); }
.account-metric.purple::before { background: var(--primary); }
.account-metric.purple > i { background: rgba(67,97,238,0.12); color: var(--primary-light); }

.account-panel {
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: 0 14px 36px rgba(15,23,42,0.045);
}

.account-panel + .account-panel {
  margin-top: 1rem;
}

.account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(248,250,252,0.86), rgba(255,255,255,0));
}

html[data-theme="dark"] .account-panel-head {
  background: linear-gradient(180deg, rgba(30,32,64,0.62), rgba(18,19,42,0));
}

.account-panel-head.compact {
  padding-bottom: 0.9rem;
}

.account-panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
}

.account-panel-head p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.account-panel-body {
  padding: 1.15rem;
}

.account-filter-panel {
  margin-bottom: 1rem;
  padding: 1rem;
}

.account-search-bar {
  margin: 0;
  align-items: center;
}

.account-search-input {
  flex: 1 1 260px;
  min-width: 0;
}

.account-table-panel {
  margin-top: 0;
}

.account-table-wrap {
  border-radius: 0;
}

.account-table {
  min-width: 820px;
}

.account-table th {
  background: var(--bg-input);
}

.account-table td {
  color: var(--text-muted);
}

.order-id {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(67,97,238,0.1);
  color: var(--primary-light);
  font-weight: 800;
  font-size: 0.78rem;
}

.order-service-cell {
  max-width: 240px;
}

.order-service-cell strong,
.deposit-history-item strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.order-service-cell span,
.deposit-history-item span {
  display: block;
  margin-top: 0.18rem;
  color: var(--text-dim);
  font-size: 0.74rem;
}

.order-link {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--primary-light);
  font-size: 0.8rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-link:hover {
  color: var(--primary);
}

.money-cell {
  color: var(--warning);
  font-weight: 800;
  white-space: nowrap;
}

.order-progress-cell {
  min-width: 110px;
}

.order-progress-cell .progress {
  height: 7px;
  margin-bottom: 0.35rem;
}

.order-progress-cell span,
.order-date,
.muted-dash {
  color: var(--text-dim);
  font-size: 0.74rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.table-actions .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}

.deposit-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 1rem;
}

.deposit-aside {
  display: grid;
  gap: 1rem;
}

.deposit-form-panel .payment-methods {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.deposit-form-panel .payment-method-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0.95rem;
  border-width: 1px;
  text-align: left;
}

.deposit-form-panel .payment-method-btn i {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 11px;
  background: var(--bg-input);
  color: var(--primary-light);
  font-size: 1rem;
}

.deposit-form-panel .payment-method-btn.selected {
  box-shadow: 0 10px 24px rgba(67,97,238,0.12);
}

.vietqr-box {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  border-style: solid;
}

.qr-status {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.bank-details {
  border-color: var(--border-light);
}

.bank-detail-row .val {
  color: var(--text);
}

/* ============================================================
   AUTO BANK LAYOUT (QR + thông tin ngân hàng)
   Desktop: 2 cột căn giữa | Mobile: xếp dọc, căn giữa
   QR VietQR là ảnh cao → width fluid, height:auto (không ép vuông)
   ============================================================ */
.auto-bank-layout {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  justify-content: center;
  margin: 0 auto 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.auto-bank-qr {
  flex: 0 0 auto;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auto-bank-qr-frame {
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.auto-bank-qr-img {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.auto-bank-qr-fallback {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim, var(--text-muted));
  font-size: 0.78rem;
  text-align: center;
  padding: 0.75rem;
}

.auto-bank-qr-hint {
  font-size: 0.75rem;
  color: var(--text-dim, var(--text-muted));
  margin-top: 0.5rem;
  text-align: center;
  width: 100%;
}

.auto-bank-info {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auto-bank-details {
  margin-bottom: 0;
  width: 100%;
}

.auto-bank-min {
  color: var(--primary) !important;
  font-weight: 600;
}

@media (max-width: 768px) {
  .auto-bank-layout {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 0;
    margin-left: auto;
    margin-right: auto;
  }

  .auto-bank-qr {
    max-width: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  .auto-bank-qr-frame {
    max-width: min(280px, 86vw);
    width: min(280px, 86vw);
    aspect-ratio: 1 / 1;
    padding: 12px;
    margin-left: auto;
    margin-right: auto;
  }

  .auto-bank-qr-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
  }

  .auto-bank-info {
    max-width: 100%;
    width: 100%;
  }

  .auto-bank-details .bank-detail-row {
    justify-content: space-between;
    text-align: left;
  }
}

.quick-amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.proof-preview {
  display: none;
  margin-top: 0.6rem;
}

.proof-preview img {
  max-width: 220px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

.deposit-steps {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deposit-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.deposit-steps li span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(67,97,238,0.12);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 800;
}

.deposit-note {
  align-items: flex-start;
  margin-top: 1rem;
  font-size: 0.8rem;
}

.deposit-history-list {
  display: grid;
}

.deposit-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
}

.deposit-history-item:last-child {
  border-bottom: 0;
}

.deposit-status {
  display: inline-flex !important;
  margin: 0 !important;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem !important;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.deposit-status-pending {
  background: rgba(245,158,11,0.14);
  color: var(--warning) !important;
}

.deposit-status-approved {
  background: rgba(34,197,94,0.13);
  color: var(--secondary) !important;
}

.deposit-status-rejected {
  background: rgba(255,107,107,0.13);
  color: var(--accent) !important;
}

.empty-inline {
  margin: 0;
  padding: 0.8rem 0;
  color: var(--text-dim);
  font-size: 0.86rem;
  text-align: center;
}

/* ============================================================
   ANNOUNCEMENT POPUP
   ============================================================ */
.announcement-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15,23,42,0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.announcement-popup-overlay.open {
  opacity: 1;
  visibility: visible;
}

.announcement-popup-card {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 28px 80px rgba(15,23,42,0.28);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s ease;
}

.announcement-popup-overlay.open .announcement-popup-card {
  transform: translateY(0) scale(1);
}

.announcement-popup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(67,97,238,0.12), rgba(34,197,94,0.08));
}

.announcement-popup-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-light);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.announcement-popup-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.announcement-popup-close:hover {
  color: var(--accent);
  background: rgba(255,107,107,0.12);
}

.announcement-popup-body {
  padding: 1.2rem 1.1rem 1.3rem;
}

.announcement-popup-body h2 {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.3;
}

.announcement-popup-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-line;
}

.announcement-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0 1.1rem 1.1rem;
}

.announcement-popup-success .announcement-popup-top {
  background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(67,97,238,0.06));
}

.announcement-popup-warning .announcement-popup-top {
  background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(67,97,238,0.06));
}

.announcement-popup-danger .announcement-popup-top {
  background: linear-gradient(135deg, rgba(255,107,107,0.16), rgba(67,97,238,0.06));
}

@media (max-width: 1024px) {
  .account-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deposit-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .account-dashboard {
    padding: 1rem 0 2rem;
  }
  .account-hero {
    grid-template-columns: 1fr;
    padding: 1.15rem;
  }
  .account-hero-actions {
    justify-content: flex-start;
  }
  .account-hero-actions .btn,
  .account-soft-chip {
    width: 100%;
  }
  .account-filter-panel {
    padding: 0.9rem;
  }
  .account-search-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  .account-search-bar .form-control,
  .account-search-bar .filter-select,
  .account-search-bar .btn {
    width: 100%;
    min-width: 0;
  }
  .account-panel-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.95rem;
  }
  .account-panel-body {
    padding: 0.95rem;
  }
  .account-table {
    min-width: 760px;
  }
  .deposit-form-panel .payment-methods {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .account-metrics {
    grid-template-columns: 1fr;
  }
  .account-hero h1 {
    font-size: 1.28rem;
  }
  .account-metric {
    min-height: 84px;
  }
  .deposit-history-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .announcement-popup-overlay {
    align-items: flex-end;
    padding: 0.75rem;
  }
  .announcement-popup-card {
    border-radius: 18px;
  }
}