/* VN Trade - Dark theme */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #21262d;
  --bg-hover: #30363d;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --danger: #f85149;
  --warning: #d29922;
  --radius: 12px;
  --font: 'Be Vietnam Pro', sans-serif;
}

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

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body::-webkit-scrollbar {
  display: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Layout người dùng: giới hạn rộng tối đa 400px, căn giữa */
.user-layout {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
}

/* User app: mobile-only, max-width 400px, căn giữa */
.user-app {
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}
.user-app .container {
  padding-left: clamp(12px, 4vw, 20px);
  padding-right: clamp(12px, 4vw, 20px);
  max-width: 100%;
}
.user-app .header-inner {
  padding: 0.75rem clamp(12px, 4vw, 20px);
}
.user-app .nav-bottom {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 100%;
  max-width: 400px;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.user-app .main-content {
  padding-left: 0;
  padding-right: 0;
}
.user-app .header-slogan-wrap {
  display: block;
}
.user-app .nav-bottom-item {
  min-height: 44px;
  padding: 0.5rem 0.25rem;
}
.user-app .nav-support-text {
  display: none;
}

/* Trang auth trên user-mobile: ẩn header/footer/nav-bottom */
body.user-mobile.auth-page .site-header,
body.user-mobile.auth-page .site-footer,
body.user-mobile.auth-page .nav-bottom {
  display: none !important;
}
body.user-mobile.auth-page .main-content {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  padding: 0;
}
body.user-mobile.auth-page .container.section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 20px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--full {
  width: 100%;
  max-width: 100%;
}

/* Header */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 20px;
}
/* Header card đăng nhập/đăng ký */
.auth-card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.auth-card-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-card-back:hover {
  color: var(--accent);
  text-decoration: none;
}
/* Slogan: chạy từ phải sang trái + gradient nhấp nháy */
.header-slogan-wrap {
  display: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
@media (max-width: 992px) {
  .header-slogan-wrap {
    display: block;
  }
}
.header-slogan-inner {
  display: inline-flex;
  white-space: nowrap;
  animation: slogan-marquee 25s linear infinite;
}
.header-slogan-inner:hover {
  animation-play-state: paused;
}
.header-slogan {
  margin: 0;
  padding: 0 1.5rem;
  font-size: 0.8rem;
  line-height: 1.3;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--text-secondary), var(--accent), #7ee787, var(--accent), var(--text-secondary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: slogan-shine 3s ease-in-out infinite;
}
@keyframes slogan-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes slogan-shine {
  0%, 100% { filter: brightness(1); opacity: 1; }
  50% { filter: brightness(1.15); opacity: 0.95; }
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none !important;
}
.logo:hover {
  color: var(--text-primary);
  text-decoration: none !important;
}
.logo:hover .logo-img {
  opacity: 0.95;
}
/* Logo trong header */
.header-inner .logo-img {
  height: 42px;
  width: 42px;
  display: block;
  object-fit: cover;
  vertical-align: middle;
  border-radius: 50%;
}
/* Logo trong footer */
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-logo .logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}
.nav-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.nav-main > a {
  color: var(--text-secondary);
  text-decoration: none;
}
.nav-main > a:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.nav-support-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.nav-support-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.nav-support-icon { flex-shrink: 0; }
@media (max-width: 992px) {
  .nav-support-text { display: none; }
}
.nav-dropdown {
  position: relative;
}
.nav-user {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}
.nav-user:hover {
  background: var(--bg-hover);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a,
.nav-dropdown-menu .link-btn {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu .link-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  text-decoration: none;
}
.lang-switcher-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}
.lang-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.lang-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}
.lang-btn:hover {
  background: var(--bg-hover);
}
.nav-notifications-wrap { margin-right: 0.25rem; }
.nav-notifications-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
}
.notifications-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.7rem;
  line-height: 16px;
  text-align: center;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
}
.notifications-menu {
  min-width: 320px;
  max-width: 90vw;
  max-height: 360px;
  overflow-y: auto;
}
.notifications-list { padding: 0; }
.notification-item {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.notification-item.notification-unread { background: rgba(88, 166, 255, 0.08); }
.notification-title { font-weight: 600; font-size: 0.9rem; }
.notification-message { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.2rem; }
.notification-empty { padding: 1rem; text-align: center; color: var(--text-secondary); }
.notifications-read-all {
  display: block;
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.toast-session {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 10000;
  font-weight: 600;
  animation: toast-in 0.3s ease;
}
.toast-session-up { border: 2px solid var(--success); color: var(--success); }
.toast-session-down { border: 2px solid var(--danger); color: var(--danger); }
.toast-result {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 10000;
  font-weight: 600;
  animation: toast-in 0.3s ease;
}
.toast-result-win { border: 2px solid var(--success); color: var(--success); }
.toast-result-lose { border: 2px solid var(--danger); color: var(--danger); }
.toast-general {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 10000;
  font-weight: 600;
  animation: toast-in 0.3s ease;
}
.toast-general--success { border: 2px solid var(--success); color: var(--success); }
.toast-general--error { border: 2px solid var(--danger); color: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.lang-dropdown .nav-dropdown-menu {
  min-width: 140px;
  right: 0;
  left: auto;
  display: none;
}
.lang-dropdown:hover .nav-dropdown-menu {
  display: none;
}
.lang-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

/* Bottom nav - MOBILE FIRST: hiển thị mặc định (mobile/tablet) */
.nav-bottom {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
  box-sizing: border-box;
}
.nav-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.7rem;
  gap: 0.2rem;
}
.nav-bottom-item:hover {
  color: var(--accent);
  text-decoration: none;
}
.nav-bottom-item:active,
.nav-bottom-item.active {
  color: var(--accent);
}
.nav-bottom-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav-bottom-icon .nav-icon-svg {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  stroke: currentColor;
  color: inherit;
}
.nav-bottom-item:hover .nav-icon-svg,
.nav-bottom-item.active .nav-icon-svg {
  color: inherit;
}
.nav-bottom-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Mobile: ẩn nav desktop, chừa chỗ cho bottom nav */
.nav-desktop {
  display: flex;
}
.main-content {
  padding-bottom: 0;
}

@media (max-width: 992px) {
  .nav-desktop {
    display: none !important;
  }
  .main-content {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .header-inner {
    padding: 0.75rem 20px;
  }
}

/* Desktop: ẩn bottom nav */
@media (min-width: 993px) {
  .nav-bottom {
    display: none !important;
  }
}

/* Fallback: nếu JS đã set is-mobile thì ép hiển thị bottom nav (tránh lỗi media query trên một số máy) */
html.is-mobile .nav-bottom {
  display: flex !important;
}
html.is-mobile .nav-desktop {
  display: none !important;
}
html:not(.is-mobile) .nav-bottom {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.9rem; }
.btn-primary {
  background: var(--accent);
  color: #fff !important;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff !important;
  text-decoration: none;
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(88, 166, 255, 0.35);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary.btn-sm {
  color: #fff !important;
}
.btn-primary.btn-sm:hover {
  color: #fff !important;
}
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: var(--bg-hover);
  text-decoration: none;
  color: var(--text-primary);
}

/* Alerts – fixed overlay, không đẩy layout */
.flash-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0.5rem 1rem;
  pointer-events: none;
}
.flash-inner {
  pointer-events: auto;
  max-width: 100%;
}
.flash-wrap .alert {
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  word-wrap: break-word;
}
@media (max-width: 576px) {
  .flash-wrap { padding: 0.5rem 0.75rem; }
  .flash-wrap .alert { padding: 0.6rem 0.75rem; font-size: 0.9rem; }
}
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.alert-success { background: rgba(63, 185, 80, 0.2); color: var(--success); border: 1px solid var(--success); }
.alert-error { background: rgba(248, 81, 73, 0.2); color: var(--danger); border: 1px solid var(--danger); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card h2, .card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}
.card p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.form-help--warning {
  color: var(--warning);
}
.form-help--warning a {
  color: var(--accent);
  font-weight: 500;
}
.form-help--warning a:hover {
  color: var(--accent-hover);
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
}
.form-control::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}
.form-field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--danger);
}
.text-secondary {
  color: var(--text-secondary);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
}
tr:hover td {
  background: rgba(48, 54, 61, 0.3);
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}
.badge-success { background: rgba(63, 185, 80, 0.25); color: var(--success); }
.badge-danger { background: rgba(248, 81, 73, 0.25); color: var(--danger); }
.badge-warning { background: rgba(210, 153, 34, 0.25); color: var(--warning); }
.badge-secondary { background: var(--bg-hover); color: var(--text-secondary); }

/* Lịch sử giao dịch: tab + card mobile */
.trade-history-card-wrap { padding: 0; overflow: hidden; }
.trade-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.trade-history-tabs a,
.trade-history-tabs .active {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  transition: color 0.2s, background 0.2s;
}
.trade-history-tabs a:hover {
  color: var(--accent);
  background: var(--bg-hover);
}
.trade-history-tabs .active {
  color: var(--accent);
  background: rgba(88, 166, 255, 0.15);
  pointer-events: none;
}
.trade-history-table { padding: 0 1rem 1rem; }
.trade-history-cards {
  display: none;
  padding: 1rem;
  padding-top: 0.75rem;
}
.trade-history-cards-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 2rem;
}
.trade-history-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.trade-history-card:last-child { margin-bottom: 0; }
.trade-history-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}
.trade-history-card-row .label {
  color: var(--text-secondary);
  margin-right: 0.5rem;
}
.trade-history-card-header {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.trade-history-card-type {
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}
.trade-history-card-type.type-buy { background: rgba(63, 185, 80, 0.2); color: var(--success); }
.trade-history-card-type.type-sell { background: rgba(248, 81, 73, 0.2); color: var(--danger); }
.trade-history-card-time { color: var(--text-secondary); font-size: 0.85rem; }
.trade-history-card-added { font-weight: 600; }
.trade-added.win { color: var(--success); }
.trade-added.refund { color: var(--text-primary); }

@media (max-width: 768px) {
  .trade-history-table { display: none; }
  .trade-history-cards { display: block; }
}
@media (min-width: 769px) {
  .trade-history-cards { display: none; }
}

/* Footer - fixed bottom, full width */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}
@media (max-width: 768px) {
  .site-footer {
    margin-top: 2rem;
  }
  .site-footer .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
  }
  .footer-copy {
    padding-top: 0.5rem;
    font-size: 0.8rem;
  }
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}
.footer-grid h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.footer-grid a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.footer-grid a:hover { color: var(--accent); }
.footer-grid p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.footer-copy {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Page sections */
.page-hero {
  padding: 3rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.page-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}
.section {
  padding: 2rem 0;
}
.section--compact {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}
.section--compact .section-head {
  margin-bottom: 0.75rem;
}
.section--compact .section-title {
  margin-top: 0.25rem;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.section-title {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.history-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.history-back:hover {
  color: var(--accent);
  text-decoration: none;
}
.history-back svg {
  flex-shrink: 0;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.pagination a,
.pagination span {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
}
.pagination a:hover {
  background: var(--bg-hover);
  text-decoration: none;
  color: var(--accent);
}
.pagination .active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Admin trades: tìm kiếm + phân trang */
.admin-trades-search {
  margin-bottom: 1.25rem;
}
.admin-trades-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.admin-trades-search-row .form-control {
  min-width: 0;
}
.admin-trades-search-row input[type="text"] {
  flex: 1;
  min-width: 180px;
}
.admin-trades-search-row select {
  width: auto;
  min-width: 140px;
}
.admin-trades-search-row .btn {
  flex-shrink: 0;
}
.admin-trades-pagination-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.admin-trades-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.admin-trades-pagination-wrap .pagination {
  margin-top: 0;
}

/* Lời/lỗ trong bảng admin trades */
.payout-diff.profit { color: var(--success); font-weight: 600; }
.payout-diff.loss { color: var(--danger); font-weight: 600; }

/* Admin verifications: dropdown Thao tác */
.admin-action-dropdown {
  position: relative;
  display: inline-block;
}
.admin-action-btn {
  white-space: nowrap;
}
.admin-action-menu {
  position: fixed;
  z-index: 10001;
  min-width: 140px;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  /* left/top set by JS để không bị table-wrap cắt */
}
.admin-action-menu[hidden] {
  display: none !important;
}
.admin-action-menu li {
  margin: 0;
}
.admin-action-menu form {
  margin: 0;
  padding: 0;
}
.admin-action-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}
.admin-action-item:hover {
  background: var(--bg-hover);
}

/* Admin verifications: modal popup */
.admin-verification-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.admin-verification-modal[hidden] {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}
.admin-verification-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.admin-verification-modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.admin-verification-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.admin-verification-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.admin-verification-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.admin-verification-modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.admin-verification-modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
}
.admin-verification-modal-body label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.admin-verification-modal-body .form-control {
  margin-bottom: 1rem;
}
.admin-verification-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.admin-verification-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-verification-image-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.admin-verification-image-block label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.admin-verification-image-block img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.admin-verification-note-text {
  margin: 0 0 1rem;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* Home hero - banner + hiệu ứng xanh */
.hero {
  position: relative;
  min-height: 396px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-banner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-banner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.75) 0%, rgba(13, 17, 23, 0.85) 100%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 35%,
    rgba(88, 166, 255, 0.15) 45%,
    rgba(63, 185, 80, 0.2) 55%,
    transparent 65%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: heroGlow 4s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem clamp(16px, 5vw, 24px);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.hero-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 12px rgba(88, 166, 255, 0.25));
}
@media (max-width: 640px) {
  .hero-logo {
    height: 56px;
  }
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(
    110deg,
    #fff 0%,
    #e0f2fe 25%,
    var(--accent) 50%,
    #7dd3fc 75%,
    #fff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroTitleShine 4s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(88, 166, 255, 0.4))
    drop-shadow(0 0 48px rgba(88, 166, 255, 0.2));
}
@keyframes heroTitleShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}
.hero .tagline {
  font-size: clamp(0.875rem, 2vw + 0.75rem, 1.2rem);
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 clamp(12px, 4vw, 24px);
  max-width: 32em;
  text-align: center;
  word-wrap: break-word;
  white-space: normal;
}
@media (max-width: 768px) {
  .hero .tagline {
    max-width: 100%;
    padding: 0 clamp(8px, 3vw, 16px);
    font-size: clamp(0.8rem, 2.5vw + 0.65rem, 1rem);
  }
}
@media (max-width: 640px) {
  .hero .tagline {
    font-size: clamp(0.75rem, 4vw + 0.5rem, 0.95rem);
    margin-bottom: 1.5rem;
    padding: 0 clamp(8px, 3vw, 12px);
  }
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-actions .hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-actions .hero-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-actions .hero-btn-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}
.hero-actions .btn-primary {
  animation: heroBtnPulse 2.5s ease-in-out infinite;
}
.hero-actions .btn-primary:hover {
  animation: none;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(88, 166, 255, 0.45);
}
@keyframes heroBtnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Hero responsive - tablet */
@media (max-width: 768px) {
  .hero {
    min-height: 320px;
    padding: 1rem 0;
  }
  .hero-content {
    padding: 1.5rem clamp(16px, 5vw, 20px);
  }
  .hero h1 {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
    margin-bottom: 0.75rem;
    line-height: 1.2;
  }
  .hero-actions {
    gap: 0.75rem;
  }
  .hero-actions .hero-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  .hero-actions .hero-btn-icon svg {
    width: 1.1rem;
    height: 1.1rem;
  }
}

/* Hero responsive - mobile */
@media (max-width: 576px) {
  .hero {
    min-height: 280px;
    align-items: center;
    padding: 0.75rem 0;
  }
  .hero-content {
    padding: 1.25rem clamp(12px, 4vw, 20px);
  }
  .hero h1 {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
  }
  .hero .tagline {
    margin-bottom: 1.25rem;
  }
  .hero-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions .hero-btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
}

/* Hero responsive - màn hình rất nhỏ */
@media (max-width: 380px) {
  .hero {
    min-height: 260px;
  }
  .hero-content {
    padding: 1rem clamp(12px, 4vw, 16px);
  }
  .hero .tagline {
    padding: 0 clamp(6px, 2vw, 10px);
  }
  .hero h1 {
    font-size: clamp(1.2rem, 6vw, 1.5rem);
  }
  .hero-actions {
    max-width: 100%;
  }
}

/* TradingView iframe - full width, đặt ngay dưới mã chứng khoán */
.tradingview-section {
  padding: 2rem 0 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
/* Section titles với icon - trang chủ */
.section-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.section-title-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  color: var(--accent);
}
.section-title-text {
  display: inline;
}
.tradingview-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.tradingview-title .section-title {
  justify-content: center;
}
.tradingview-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  overflow: hidden;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.tradingview-iframe {
  width: 100%;
  height: 520px;
  border: none;
  display: block;
}
@media (max-width: 768px) {
  .tradingview-iframe {
    height: 380px;
  }
}

/* Symbol cards - dưới banner trang chủ */
.symbols-section {
  padding: 2rem 0;
  width: 100%;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.6) 0%, var(--bg-primary) 100%);
}
.symbols-section-inner {
  padding-left: clamp(12px, 4vw, 24px);
  padding-right: clamp(12px, 4vw, 24px);
}
.symbols-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.symbols-title .section-title-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.symbols-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
}
.symbol-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.symbol-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.15);
  text-decoration: none;
  color: inherit;
}
.symbol-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}
.symbol-card-code {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.symbol-card-name {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.symbol-card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.symbol-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.symbol-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.symbol-card-placeholder {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.symbol-card-stats {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.symbol-card-amount {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}
.symbol-card-change {
  font-size: 0.8rem;
  font-weight: 500;
}
.symbol-card-change.up {
  color: var(--success);
}
.symbol-card-change.down {
  color: var(--danger);
}
.symbol-card-chart-wrap {
  width: 140px;
  height: 48px;
  flex-shrink: 0;
  margin-left: auto;
}
.symbol-card-chart {
  width: 100% !important;
  height: 48px !important;
  max-height: 48px;
}
@media (max-width: 600px) {
  .symbol-card-chart-wrap {
    width: 120px;
    height: 44px;
  }
  .symbol-card-chart {
    height: 44px !important;
  }
}

.features-section {
  padding: 3rem 0;
  width: 100%;
  max-width: 100%;
}
.user-app .features-section .features-section-inner {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
}
.features-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.features-title .section-title-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.features-intro {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: var(--radius);
  z-index: 0;
}
.feature-card:nth-child(1)::before {
  background: conic-gradient(from 0deg, var(--accent) 0deg 35deg, rgba(88, 166, 255, 0.4) 40deg 55deg, transparent 60deg 360deg);
}
.feature-card:nth-child(2)::before {
  background: conic-gradient(from 0deg, #3fb950 0deg 35deg, rgba(63, 185, 80, 0.4) 40deg 55deg, transparent 60deg 360deg);
}
.feature-card:nth-child(3)::before {
  background: conic-gradient(from 0deg, #d29922 0deg 35deg, rgba(210, 153, 34, 0.4) 40deg 55deg, transparent 60deg 360deg);
}
.feature-card:nth-child(4)::before {
  background: conic-gradient(from 0deg, #f85149 0deg 35deg, rgba(248, 81, 73, 0.4) 40deg 55deg, transparent 60deg 360deg);
}
.feature-card:nth-child(5)::before {
  background: conic-gradient(from 0deg, #a371f7 0deg 35deg, rgba(163, 113, 247, 0.4) 40deg 55deg, transparent 60deg 360deg);
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg-card);
  z-index: 1;
}
@keyframes featureBorderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.feature-card:nth-child(1)::before { animation: featureBorderSpin 2.8s linear infinite; }
.feature-card:nth-child(2)::before { animation: featureBorderSpin 2.2s linear infinite 0.5s reverse; }
.feature-card:nth-child(3)::before { animation: featureBorderSpin 3s linear infinite 1s; }
.feature-card:nth-child(4)::before { animation: featureBorderSpin 2.5s linear infinite 0.3s reverse; }
.feature-card:nth-child(5)::before { animation: featureBorderSpin 2.6s linear infinite 0.7s; }
.feature-card:hover {
  transform: translateY(-2px);
}
.feature-card .feature-icon,
.feature-card h3,
.feature-card p {
  position: relative;
  z-index: 2;
}
.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Cách bắt đầu giao dịch */
@keyframes step-card-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes step-num-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(63, 185, 80, 0); }
}
.steps-section {
  padding: 3rem 0;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border-top: 1px solid var(--border);
}
.steps-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.steps-title .section-title-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.steps-intro {
  text-align: center;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  font-size: 1rem;
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: step-card-in 0.5s ease forwards;
  position: relative;
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.step-card-1 { animation-delay: 0.1s; }
.step-card-2 { animation-delay: 0.25s; }
.step-card-3 { animation-delay: 0.4s; }
.step-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}
.step-card:hover::before { opacity: 1; }
.step-card:hover .step-num {
  animation: step-num-glow 1.2s ease infinite;
}
.step-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0 0.5rem;
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.step-card:hover + .step-arrow,
.step-arrow:hover { opacity: 1; transform: scale(1.2); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #2ea043);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 14px rgba(63, 185, 80, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step-card:hover .step-num { transform: scale(1.08); }
.step-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
}
.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.step-card .btn { margin-top: 0; transition: transform 0.2s ease; }
.step-card .btn:hover { transform: scale(1.03); }
@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .step-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    font-size: 0;
    min-height: 2.5rem;
  }
  .step-arrow::before {
    content: '';
    display: block;
    width: 2px;
    height: 10px;
    background: linear-gradient(180deg, var(--accent), transparent);
    margin-bottom: 2px;
    border-radius: 1px;
  }
  .step-arrow::after {
    content: '↓';
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
  }
  .steps-section { padding: 2rem 0; }
  .step-card { padding: 1.5rem 1.25rem; }
}

/* Bắt đầu giao dịch: responsive trong user-app (max-width 400px) */
.user-app .steps-section {
  padding: 2rem 0;
}
.user-app .steps-section .container {
  padding-left: clamp(12px, 4vw, 20px);
  padding-right: clamp(12px, 4vw, 20px);
}
.user-app .steps-title {
  font-size: clamp(1.25rem, 4vw + 0.5rem, 1.75rem);
  margin-bottom: 0.5rem;
}
.user-app .steps-intro {
  font-size: clamp(0.875rem, 2vw + 0.5rem, 1rem);
  margin-bottom: 2rem;
  padding: 0 0.25rem;
}
.user-app .steps-grid {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.user-app .step-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0;
  font-size: 0;
  min-height: 2.5rem;
}
.user-app .step-arrow::before {
  content: '';
  display: block;
  width: 2px;
  height: 10px;
  background: linear-gradient(180deg, var(--accent), transparent);
  margin-bottom: 2px;
  border-radius: 1px;
}
.user-app .step-arrow::after {
  content: '↓';
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.user-app .step-card {
  padding: 1.25rem 1rem;
}
.user-app .step-card h3 {
  font-size: clamp(1rem, 2.5vw + 0.5rem, 1.15rem);
}
.user-app .step-card p {
  font-size: clamp(0.8rem, 2vw + 0.4rem, 0.9rem);
  margin-bottom: 1rem;
}
.user-app .step-num {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Các ngân hàng đồng hành */
.banks-section {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.banks-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.banks-title .section-title-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.banks-wrap {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0;
}
.banks-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  vertical-align: top;
}

/* Trade page – symbol detail (khi có ?symbol=...) */
.trade-symbol-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0 0 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.trade-symbol-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trade-symbol-detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trade-symbol-detail-placeholder {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.trade-symbol-detail-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.trade-symbol-detail-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}
.trade-symbol-detail-code {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.trade-symbol-detail-range {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Trade page – một card gộp: biểu đồ → phiên cược → đặt lệnh */
.trade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 1.5rem 0 0;
  margin: 1rem 0;
}
@media (max-width: 640px) {
  .trade-card { padding: 1rem 0 0; margin: 0.75rem 0; }
}
.trade-card-chart {
  padding: 0 1.5rem 0.75rem;
}
.trade-card-chart .chart-wrap { min-height: 200px; height: 220px; }
@media (min-width: 641px) {
  .trade-card-chart .chart-wrap { height: 260px; }
}
@media (min-width: 993px) {
  .trade-card-chart .chart-wrap { height: 300px; }
}
.trade-card-session {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}
.trade-session-expand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.75rem;
}
.trade-session-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.trade-session-expand-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}
/* Popup 10 phiên gần nhất – chỉ hiện khi click nút mũi tên */
.trade-past-sessions-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.trade-past-sessions-popup[hidden] {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}
.trade-past-sessions-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.trade-past-sessions-popup-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.trade-past-sessions-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.trade-past-sessions-popup-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.trade-past-sessions-popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.trade-past-sessions-popup-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.trade-past-sessions-popup-body {
  padding: 0.75rem 1.25rem 1rem;
  overflow-y: auto;
}
.trade-past-sessions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trade-past-session-item {
  display: grid;
  grid-template-columns: 18ch 5ch 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.trade-past-session-item:last-child {
  border-bottom: none;
}
.trade-past-session-id {
  font-family: monospace;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trade-past-session-time {
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-width: 0;
}
.trade-past-session-result {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  min-width: 3.5rem;
  justify-content: flex-end;
  justify-self: end;
}
.trade-past-session-result-icon {
  flex-shrink: 0;
  stroke: currentColor;
}
.trade-past-session--up .trade-past-session-result {
  color: var(--success);
}
.trade-past-session--down .trade-past-session-result {
  color: var(--danger);
}
.trade-past-session-empty,
.trade-past-session-loading {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.75rem 0;
}
.trade-card-panel {
  position: relative;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}
.trade-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.trade-quick-actions .btn-buy,
.trade-quick-actions .btn-sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border: 2px solid;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  min-height: 48px;
  background: transparent;
  box-shadow: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.trade-quick-actions .btn-buy:active,
.trade-quick-actions .btn-sell:active { transition: none; }
.trade-quick-actions .btn-buy {
  border-color: var(--success);
  color: var(--success);
}
.trade-quick-actions .btn-buy:active { background: rgba(63, 185, 80, 0.2); box-shadow: 0 0 14px rgba(63, 185, 80, 0.5); }
.trade-quick-actions .btn-sell {
  border-color: var(--danger);
  color: var(--danger);
}
.trade-quick-actions .btn-sell:active { background: rgba(248, 81, 73, 0.2); box-shadow: 0 0 14px rgba(248, 81, 73, 0.5); }
.trade-quick-actions .trade-btn-icon { display: inline-flex; align-items: center; justify-content: center; }
.trade-quick-actions .trade-btn-icon svg { width: 1.25rem; height: 1.25rem; }
.trade-quick-actions .trade-btn-odds { opacity: 0.9; font-size: 0.9em; font-weight: 500; }
.trade-quick-actions button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Bottom sheet: popup trượt từ dưới lên */
.trade-bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.3s ease;
}
.trade-bottom-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
}
.trade-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.trade-bottom-sheet.is-open .trade-sheet-backdrop {
  opacity: 1;
}
.trade-sheet-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  margin-left: auto;
  margin-right: auto;
  max-width: 400px;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
  max-height: calc(85vh - 72px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (min-width: 993px) {
  .trade-sheet-content {
    bottom: 0;
    max-height: 85vh;
    padding-bottom: 1.25rem;
  }
}
.trade-bottom-sheet.is-open .trade-sheet-content {
  transform: translateY(0);
}
.trade-sheet-overlay {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  margin-left: auto;
  margin-right: auto;
  max-width: 400px;
  max-height: calc(85vh - 72px - env(safe-area-inset-bottom, 0px));
  height: 70vh;
  background: rgba(13, 17, 23, 0.4);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  z-index: 11;
  pointer-events: auto;
  border-radius: var(--radius) var(--radius) 0 0;
}
@media (min-width: 993px) {
  .trade-sheet-overlay {
    bottom: 0;
    max-height: 85vh;
    height: 85vh;
  }
}
.trade-sheet-overlay .trade-panel-overlay-icon {
  color: var(--text-secondary);
  opacity: 0.9;
}
.trade-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.trade-sheet-title {
  margin: 0;
  font-size: 1.1rem;
}
.trade-sheet-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
}
.trade-sheet-close:hover { background: var(--bg-hover); }
.trade-sheet-close svg { width: 20px; height: 20px; }

.trade-panel-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.4);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: auto;
  border-radius: 0 0 var(--radius) var(--radius);
}
.trade-panel-overlay-icon {
  color: var(--text-secondary);
  opacity: 0.9;
}

/* Custom confirm popup (toast-style) */
.trade-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: trade-confirm-fadeIn 0.2s ease;
}
.trade-confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  animation: trade-confirm-slideIn 0.25s ease;
}
.trade-confirm-message {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
}
.trade-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}
.trade-confirm-cancel {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.trade-confirm-cancel:hover {
  background: var(--bg-hover);
}
.trade-confirm-ok {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.trade-confirm-ok:hover {
  background: var(--accent-hover);
}
@keyframes trade-confirm-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes trade-confirm-slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.trade-card-panel .trade-amounts button:disabled,
.trade-card-panel .trade-buttons button:disabled,
.trade-card-panel #amountInput:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .trade-card-chart,
  .trade-card-session,
  .trade-card-panel { padding-left: 1rem; padding-right: 1rem; }
}
.session-box-title,
.trade-card-session .session-info { font-size: 0.95rem; }
.session-box-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.session-info { font-size: 0.95rem; }
.session-row { margin: 0.35rem 0; }
.session-label { color: var(--text-secondary); margin-right: 0.5rem; }
.countdown-row .countdown {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}
.result-row { margin-top: 0.5rem; }
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  font-weight: 700;
}
.result-badge-icon {
  flex-shrink: 0;
  vertical-align: middle;
}
.result-badge-text {
  line-height: 1;
}
.result-badge.result-up,
.result-badge.result-win { background: rgba(46, 160, 67, 0.25); color: var(--success); }
.result-badge.result-down,
.result-badge.result-lose { background: rgba(248, 81, 73, 0.25); color: var(--danger); }

/* Session box: responsive nhỏ gọn, chỉ 2 dòng trên màn nhỏ */
@media (max-width: 768px) {
  .trade-card-session {
    padding: 0.5rem 1rem;
    border-top-width: 1px;
  }
  .trade-card-session .session-box-title {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
  }
  .trade-card-session .session-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.2rem 1rem;
    font-size: 0.8rem;
  }
  .trade-card-session .session-row {
    margin: 0;
  }
  .trade-card-session .session-row:nth-child(1) { grid-column: 1; }
  .trade-card-session .session-row:nth-child(2) { grid-column: 2; grid-row: 1; }
  .trade-card-session .session-row:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0.15rem;
  }
  .trade-card-session .session-label {
    margin-right: 0.35rem;
    font-size: 0.75rem;
  }
  .trade-card-session .countdown-row .countdown {
    font-size: 1rem;
    font-weight: 700;
  }
  .trade-card-session .result-badge {
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
  }
  .trade-card-session .result-badge-icon {
    width: 14px;
    height: 14px;
  }
}

.chart-box-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}
.chart-box-sub {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.chart-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  min-height: 180px;
}
@media (min-width: 641px) {
  .chart-wrap { height: 260px; }
}
@media (min-width: 993px) {
  .chart-wrap { height: 300px; }
}
.chart-wrap canvas,
.chart-wrap #chartPrice {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 180px;
  max-height: 100%;
}
.trade-card-panel h3,
.trade-panel h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}
.trade-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.trade-amounts button {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  min-height: 40px;
}
/* #amountGroup: 2 nút 50% / 100% full width */
#amountGroup.trade-amounts {
  width: 100%;
  display: flex;
  gap: 0.5rem;
}
#amountGroup.trade-amounts button {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 640px) {
  .trade-amounts button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 44px;
    flex: 1 1 calc(33.333% - 0.35rem);
    min-width: 0;
  }
  #amountGroup.trade-amounts button {
    flex: 1 1 0;
  }
}
.trade-amounts button:hover,
.trade-amounts button.active {
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.15);
  color: var(--accent);
}
.trade-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}
.trade-buttons .btn-buy,
.trade-buttons .btn-sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border: 2px solid;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  min-height: 48px;
  background: transparent;
  box-shadow: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.trade-buttons .btn-buy:active,
.trade-buttons .btn-sell:active {
  transition: none;
}
@media (max-width: 640px) {
  .trade-buttons .btn-buy,
  .trade-buttons .btn-sell {
    min-height: 52px;
    padding: 0.875rem 1rem;
  }
}
.trade-buttons .trade-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.trade-buttons .trade-btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.trade-buttons .trade-btn-odds {
  opacity: 0.9;
  font-size: 0.9em;
  font-weight: 500;
}
.trade-buttons .btn-buy {
  border-color: var(--success);
  color: var(--success);
}
.trade-buttons .btn-buy:active {
  background: rgba(63, 185, 80, 0.2);
  box-shadow: 0 0 14px rgba(63, 185, 80, 0.5);
}
.trade-buttons .btn-sell {
  border-color: var(--danger);
  color: var(--danger);
}
.trade-buttons .btn-sell:active {
  background: rgba(248, 81, 73, 0.2);
  box-shadow: 0 0 14px rgba(248, 81, 73, 0.5);
}
.balance-display {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  word-break: break-all;
}
.balance-display span { color: var(--success); }

/* Trade page: container padding on small screens */
/* Trang giao dịch: header với nút quay lại */
.trade-page-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.trade-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.trade-page-back:hover {
  color: var(--accent-hover);
  text-decoration: none;
}
.trade-page-back-icon {
  flex-shrink: 0;
}
.trade-page-back-text {
  line-height: 1;
}

/* Trang giao dịch: container full width, không căn lề */
.main-content .container:has(.trade-card) {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
@media (max-width: 640px) {
  .container:has(.trade-card) {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Profile sidebar */
/* Profile: 1 card gồm thông tin user + 2 tổng (cùng 1 dòng) */
.profile-overview-card {
  padding: 0;
  margin-bottom: 1.5rem;
  margin-left: -20px;
  margin-right: -20px;
  width: calc(100% + 40px);
  max-width: none;
  overflow: hidden;
}
.profile-user-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
}
.profile-user-avatar-wrap {
  flex-shrink: 0;
  position: relative;
}
.profile-user-avatar-trigger {
  display: block;
  cursor: pointer;
  position: relative;
  width: 64px;
  height: 64px;
}
.profile-user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.profile-user-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}
.profile-user-avatar-camera {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.profile-user-avatar-camera:hover {
  background: var(--bg-hover);
  color: var(--accent);
}
.profile-user-avatar-camera svg {
  width: 14px;
  height: 14px;
  display: block;
}
.profile-user-avatar-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}
.profile-avatar-form {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}
.profile-user-info { flex: 1; min-width: 0; }
.profile-user-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.profile-user-row:last-child { margin-bottom: 0; }
.profile-user-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  min-width: 3rem;
}
.profile-user-value { font-size: 0.9rem; word-break: break-all; }
.profile-user-id { font-family: monospace; font-size: 0.8rem; color: var(--text-secondary); }

.profile-balance-block {
  text-align: center;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}
.profile-balance-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}
.profile-balance-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--success);
}

.profile-stats-row {
  display: flex;
  flex-wrap: nowrap;
  border-top: 1px solid var(--border);
}
.profile-stat-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.75rem;
  border-right: 1px solid var(--border);
}
.profile-stat-item:last-child { border-right: none; }
.profile-stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.2;
}
.profile-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}
.profile-stat-pnl.positive { color: var(--success); }
.profile-stat-pnl.negative { color: var(--danger); }

.profile-overview-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.profile-overview-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.profile-overview-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-overview-btn-icon svg {
  flex-shrink: 0;
}
.profile-overview-btn-deposit {
  background: rgba(63, 185, 80, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}
.profile-overview-btn-deposit:hover {
  background: rgba(63, 185, 80, 0.35);
  color: var(--success);
  text-decoration: none;
}
.profile-overview-btn-withdraw {
  background: rgba(248, 81, 73, 0.15);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.profile-overview-btn-withdraw:hover {
  background: rgba(248, 81, 73, 0.3);
  color: var(--danger);
  text-decoration: none;
}

.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 1.5rem 0;
}
.profile-nav {
  margin-left: -20px;
  margin-right: -20px;
  width: calc(100% + 40px);
  max-width: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  border-left: none;
  border-right: none;
  padding: 0.4rem 1rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.profile-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}
.profile-nav a:last-child { border-bottom: none; }
.profile-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-nav-icon svg { display: block; }
.profile-nav-text { flex: 1; min-width: 0; font-size: 0.9rem; }
.profile-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.5;
}
.profile-nav a:hover .profile-nav-arrow,
.profile-nav a.active .profile-nav-arrow { opacity: 1; }
.profile-nav a:hover {
  background: var(--bg-hover);
  color: var(--accent);
  text-decoration: none;
}
.profile-nav a.active {
  background: rgba(88, 166, 255, 0.2);
  color: var(--accent);
}

/* Profile nav: menu chuyển ngôn ngữ */
.profile-nav-lang {
  position: relative;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}
.profile-nav-lang-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  width: 100%;
  border: none;
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}
.profile-nav-lang-trigger:hover {
  background: var(--bg-hover);
  color: var(--accent);
}
.profile-nav-lang-trigger:hover .profile-nav-arrow {
  opacity: 1;
}
.profile-nav-lang .profile-nav-lang-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  min-width: 140px;
  z-index: 50;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0;
}
.profile-nav-lang.is-open .profile-nav-lang-menu {
  display: block;
}
.profile-nav-lang .profile-nav-lang-menu a {
  border-bottom: none;
  border-radius: 0;
  padding: 0.5rem 0.75rem;
}

/* Security page – menu + 2 form pages */
.security-page-title {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  padding: 0 0 0.5rem 0;
}
.security-page-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.security-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.security-nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.security-nav-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}
.security-nav-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88, 166, 255, 0.15);
  border-radius: 10px;
  color: var(--accent);
}
.security-nav-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}
.security-nav-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.security-nav-text {
  font-weight: 600;
  font-size: 1rem;
}
.security-nav-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: normal;
}
.security-nav-arrow {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 1.25rem;
}
.security-back-wrap {
  margin-bottom: 1rem;
}
.security-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}
.security-back:hover {
  color: var(--accent);
  text-decoration: none;
}
.security-card {
  margin-bottom: 1.5rem;
}
.security-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.security-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.security-form .form-group:last-of-type {
  margin-bottom: 1rem;
}

/* Transactions page – 2 tabs */
.transactions-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.transactions-tab {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}
.transactions-tab:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.transactions-tab.active {
  background: rgba(88, 166, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.transactions-back-wrap {
  margin-bottom: 1rem;
}
.transactions-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}
.transactions-back:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Bank card – thẻ ngân hàng */
.bank-card {
  position: relative;
  max-width: 360px;
  padding: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a2332 0%, #2d3a4f 50%, #1e2a3a 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: 'Consolas', 'Monaco', monospace;
  margin-bottom: 1rem;
}
.bank-card__chip {
  width: 40px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #c9a227 0%, #e8d48b 50%, #b8941e 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
}
.bank-card__row {
  margin-bottom: 0.75rem;
}
.bank-card__row:last-child {
  margin-bottom: 0;
}
.bank-card__label {
  display: block;
  font-size: 0.7rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.bank-card__brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.bank-card__number {
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  word-spacing: 0.2em;
}
.bank-card__holder,
.bank-card__branch {
  font-size: 0.9rem;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Verification info card */
.verification-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.verification-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.verification-card__row:last-of-type {
  margin-bottom: 0;
}
.verification-card__label {
  flex: 0 0 auto;
  min-width: 8rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.verification-card__value {
  flex: 1 1 auto;
  font-size: 1rem;
  color: var(--text-primary);
}
.verification-card__note {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}
.verification-card__hint {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}
.verification-card__images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.verification-card__image-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.verification-card__image-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.verification-card__image-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.verification-card__image {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  max-height: 140px;
  object-fit: cover;
}

.transactions-pagination-wrap {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.transactions-page-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.transactions-pagination-wrap .transactions-pagination {
  margin-top: 0;
}

/* Transactions – mobile: cards + pagination */
.transactions-cards {
  display: none;
}
.transactions-cards-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 1.5rem;
  margin: 0;
}
@media (max-width: 768px) {
  .transactions-table-wrap {
    display: none;
  }
  .transactions-cards {
    display: block;
    margin-bottom: 1rem;
  }
  .transaction-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  .transaction-card:last-child {
    margin-bottom: 0;
  }
  .transaction-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
  }
  .transaction-card-row:last-child {
    border-bottom: none;
  }
  .transaction-card-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
  }
  .transaction-card-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: right;
  }
  .transaction-card-amount .transaction-card-value {
    font-weight: 700;
    color: var(--success);
  }
  .transactions-pagination-wrap {
    margin-top: 1rem;
  }
  .transactions-page-info {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  .transactions-pagination-wrap .pagination {
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
  }
  .transactions-pagination-wrap .pagination a,
  .transactions-pagination-wrap .pagination span {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.65rem;
  }
}

/* Assets page – full width */
.page-assets.container {
  max-width: none;
  width: 100%;
}
.page-assets .profile-layout,
.page-assets .assets-content {
  max-width: none;
  width: 100%;
}

/* Assets page – balance, stats, chart, filter */
.assets-content {
  flex: 1;
  min-width: 0;
}
/* Assets – card head & icons */
.assets-card-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.assets-card-head--filter,
.assets-card-head--chart {
  align-items: center;
  margin-bottom: 1rem;
}
.assets-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.assets-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.assets-card-icon--wallet {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.25) 0%, rgba(56, 139, 253, 0.2) 100%);
  color: var(--success);
}
.assets-card-icon--calendar {
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.25) 0%, rgba(248, 81, 73, 0.15) 100%);
  color: var(--warning);
}
.assets-card-icon--chart {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: var(--accent);
}
.assets-balance-card .assets-card-head h2 {
  margin-bottom: 0.25rem;
}
.assets-balance-card .assets-balance-desc {
  margin-bottom: 0;
  font-size: 0.9rem;
}
.assets-balance-block {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(63, 185, 80, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(63, 185, 80, 0.25);
}
.assets-balance-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--success);
  margin: 0;
}
.assets-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.assets-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.assets-action-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}
.assets-action-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.assets-action-btn.btn-primary .assets-action-icon { color: #fff; }
.assets-action-btn.btn-outline .assets-action-icon { color: var(--accent); }

/* Assets action buttons: xanh lá, đỏ, cam */
.assets-action-btn--green {
  background: var(--success);
  color: #fff;
  border: 1px solid var(--success);
}
.assets-action-btn--green:hover {
  background: #46c35a;
  color: #fff;
  border-color: #46c35a;
}
.assets-action-btn--green .assets-action-icon { color: #fff; }
.assets-action-btn--red {
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--danger);
}
.assets-action-btn--red:hover {
  background: #ff6b6b;
  color: #fff;
  border-color: #ff6b6b;
}
.assets-action-btn--red .assets-action-icon { color: #fff; }
.assets-action-btn--orange {
  background: #e67e22;
  color: #fff;
  border: 1px solid #e67e22;
}
.assets-action-btn--orange:hover {
  background: #f39c12;
  color: #fff;
  border-color: #f39c12;
}
.assets-action-btn--orange .assets-action-icon { color: #fff; }

.assets-filter-card {
  margin-bottom: 1rem;
  border-left: 3px solid var(--warning);
}
.assets-filter-title {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
}
.assets-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.assets-filter-tab {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.assets-filter-tab:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.assets-filter-tab.active {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-color: var(--accent);
  color: var(--accent);
}
.assets-filter-tab-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}
.assets-filter-tab-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.assets-date-form .assets-date-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.assets-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.assets-date-input {
  max-width: 160px;
}
.assets-date-sep {
  color: var(--warning);
  font-weight: 700;
}
.assets-date-btn:hover {
  border-color: var(--warning);
  color: var(--warning);
}

.assets-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.assets-stat-card {
  padding: 1.25rem 1rem;
  margin-bottom: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.assets-stat-card--pnl {
  border-top: 3px solid var(--success);
  background: linear-gradient(180deg, rgba(63, 185, 80, 0.08) 0%, transparent 60%);
}
.assets-stat-card--bet {
  border-top: 3px solid var(--accent);
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.08) 0%, transparent 60%);
}
.assets-stat-card--count {
  border-top: 3px solid var(--warning);
  background: linear-gradient(180deg, rgba(210, 153, 34, 0.08) 0%, transparent 60%);
}
.assets-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 0.5rem;
  border-radius: 10px;
}
.assets-stat-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.assets-stat-icon--pnl {
  background: rgba(63, 185, 80, 0.2);
  color: var(--success);
}
.assets-stat-icon--bet {
  background: rgba(88, 166, 255, 0.2);
  color: var(--accent);
}
.assets-stat-icon--count {
  background: rgba(210, 153, 34, 0.2);
  color: var(--warning);
}
.assets-stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.assets-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.assets-stat-pnl.positive { color: var(--success); }
.assets-stat-pnl.negative { color: var(--danger); }

.assets-chart-card {
  margin-bottom: 0;
  border-left: 3px solid var(--accent);
}
.assets-chart-title {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
}
.assets-chart-wrap {
  min-height: 220px;
  position: relative;
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0;
}
.assets-chart-wrap canvas {
  max-width: 100%;
  display: block;
}
.assets-chart-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Assets page – mobile */
@media (max-width: 768px) {
  .page-assets .card {
    padding: 1rem;
  }
  .page-assets .assets-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  .page-assets .assets-card-icon {
    width: 44px;
    height: 44px;
    padding: 8px;
  }
  .page-assets .assets-balance-block {
    padding: 0.85rem 1rem;
  }
  .page-assets .assets-balance-value {
    font-size: 1.5rem;
  }
  .page-assets .assets-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .page-assets .assets-action-btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }
  .page-assets .assets-filter-card .assets-card-head--filter {
    flex-direction: row;
    align-items: center;
  }
  .page-assets .assets-filter-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  .page-assets .assets-filter-tab {
    justify-content: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    min-height: 44px;
    border-radius: 10px;
  }
  .page-assets .assets-filter-tab-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
  .page-assets .assets-date-form .assets-date-label {
    margin-bottom: 0.5rem;
  }
  .page-assets .assets-date-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .page-assets .assets-date-input {
    max-width: none;
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
  }
  .page-assets .assets-date-sep {
    display: none;
  }
  .page-assets .assets-date-btn {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 1rem;
  }
  .page-assets .assets-stats-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }
  .page-assets .assets-stat-card {
    padding: 1rem;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.25rem 1rem;
    text-align: left;
    align-items: center;
  }
  .page-assets .assets-stat-icon {
    grid-row: 1 / -1;
    margin: 0;
    width: 40px;
    height: 40px;
  }
  .page-assets .assets-stat-icon svg {
    width: 22px;
    height: 22px;
  }
  .page-assets .assets-stat-label {
    font-size: 0.8rem;
    margin-bottom: 0;
  }
  .page-assets .assets-stat-value {
    font-size: 1.15rem;
  }
  .page-assets .assets-chart-wrap {
    min-height: 200px;
    margin: 0.75rem 0 0.5rem;
  }
}

/* Admin layout – header & footer riêng */
body.admin-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.admin-page .nav-bottom { display: none !important; }

/* Trang /trade: ẩn nav footer để popup Đặt lệnh không bị che */
body.trade-page .nav-bottom { display: none !important; }
body.trade-page .main-content { padding-bottom: 0; }
body.admin-page .main-content {
  flex: 1;
  min-height: 0;
  overflow: visible;
}
body.admin-page .admin-main {
  padding: 0;
}
body.admin-page .admin-main .container {
  padding-top: 0;
}

/* Header + sidebar cùng tông, kết nối đẹp */
.admin-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 101;
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 20px;
}
.admin-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
}
.admin-header-logo:hover { color: var(--accent); text-decoration: none; }
.admin-header-inner .logo-img {
  height: 36px;
  width: 36px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.admin-header-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.admin-header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-header-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.admin-header-nav a:hover { color: var(--accent); text-decoration: underline; }
.admin-header-user {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0 0.75rem;
  border-right: 1px solid var(--border);
}
.admin-header-form { display: inline-block; margin: 0; }
.admin-header-form .btn { white-space: nowrap; }
.admin-footer {
  margin-top: auto;
  padding: 0.75rem 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  text-align: center;
  flex-shrink: 0;
}
.admin-footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Admin – sidebar full height, kết hợp header */
.admin-main {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  align-items: stretch;
}
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  align-self: stretch;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, min-width 0.25s ease;
  overflow: hidden;
  min-height: 0;
}
body.admin-sidebar-collapsed .admin-sidebar {
  width: 56px;
  min-width: 56px;
}
.admin-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.admin-sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--accent);
}
.admin-sidebar-toggle .admin-sidebar-toggle-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.admin-sidebar-toggle .admin-sidebar-toggle-chevron { display: block; }
.admin-sidebar-toggle .admin-sidebar-toggle-menu { display: none; }
body.admin-sidebar-collapsed .admin-sidebar-toggle .admin-sidebar-toggle-chevron { display: none; }
body.admin-sidebar-collapsed .admin-sidebar-toggle .admin-sidebar-toggle-menu { display: block; }
body.admin-sidebar-collapsed .admin-sidebar .admin-nav-text { display: none; }
body.admin-sidebar-collapsed .admin-sidebar .admin-nav { display: none; }
.admin-nav {
  flex: 1;
  min-height: 0;
  padding: 0 0.5rem 1rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.admin-nav a:hover {
  background: var(--bg-hover);
  color: var(--accent);
  text-decoration: none;
}
.admin-nav a.active {
  background: rgba(88, 166, 255, 0.2);
  color: var(--accent);
}
.admin-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-nav-icon svg { width: 100%; height: 100%; }
.admin-nav-text { white-space: nowrap; }
.admin-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 1.5rem 12px 2rem;
  overflow: visible;
}
.admin-content .container {
  padding-top: 0;
  padding-left: 12px;
  padding-right: 12px;
  max-width: none;
}
@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    height: 100vh;
  }
  .admin-content { margin-left: 240px; padding-left: 1rem; }
  body.admin-sidebar-collapsed .admin-sidebar {
    width: 56px;
    min-width: 56px;
  }
  body.admin-sidebar-collapsed .admin-content { margin-left: 56px; }
}

/* Action dropdown trong bảng admin */
.action-dropdown {
  position: relative;
  display: inline-block;
}
.action-dropdown.open {
  z-index: 1050;
}
.action-dropdown-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.action-dropdown-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
}
.action-dropdown-menu {
  display: none;
  position: fixed;
  min-width: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 9999;
  padding: 4px;
  visibility: hidden;
}
.action-dropdown.open .action-dropdown-menu {
  display: block;
}
.action-dropdown.open .action-dropdown-menu.is-positioned {
  visibility: visible;
}
.action-dropdown-menu a,
.action-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.action-dropdown-item-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.action-dropdown-item-icon svg {
  width: 100%;
  height: 100%;
}
.action-dropdown-menu a:hover,
.action-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--accent);
  text-decoration: none;
}
.action-dropdown-item-danger:hover {
  color: var(--danger);
}

/* Admin modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.modal-overlay.is-open {
  display: flex;
}
.admin-modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.admin-modal.admin-modal-lg {
  max-width: 560px;
}
.admin-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.admin-modal .modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.admin-modal .modal-close {
  padding: 0.35rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  font-size: 1.25rem;
  line-height: 1;
}
.admin-modal .modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.admin-modal .modal-body {
  padding: 1.25rem;
}
.admin-modal .modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.admin-modal .detail-row {
  margin: 0 0 0.5rem;
}
.admin-modal .detail-row:last-child {
  margin-bottom: 0;
}

/* Modal chi tiết người dùng: chỉ 1 scroll (body), khung modal không scroll */
.admin-modal-detail {
  max-width: 720px;
  min-height: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-modal-detail .modal-header,
.admin-modal-detail .modal-footer {
  flex-shrink: 0;
}
.modal-detail-body {
  flex: 1 1 0;
  min-height: 400px;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}
.modal-detail-body .detail-sections-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 560px) {
  .modal-detail-body .detail-sections-row {
    grid-template-columns: 1fr;
  }
}
.detail-section {
  margin-bottom: 1.25rem;
}
.detail-section:last-child {
  margin-bottom: 0;
}
.detail-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.detail-section-title .detail-icon {
  flex-shrink: 0;
}
.detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}
.detail-icon svg {
  width: 100%;
  height: 100%;
}
.detail-row-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.detail-row-wrap .detail-label {
  flex: 0 0 115px;
  color: var(--text-secondary);
}
.detail-row-wrap .detail-value {
  color: var(--text-primary);
}
.detail-verification-grid .detail-row-wrap {
  margin-bottom: 0.5rem;
}
.detail-verification-images-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 480px) {
  .detail-verification-images-wrap {
    grid-template-columns: 1fr;
  }
}
.detail-verification-img-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.detail-verification-img-block label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}
.detail-verification-img-block img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-hover);
}
.detail-verification-images {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}
.detail-verification-images a {
  color: var(--accent);
  margin-right: 0.5rem;
}
.detail-banks-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.detail-bank-card {
  padding: 0.875rem 1.25rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.detail-bank-card .detail-row-wrap {
  margin-bottom: 0.35rem;
}
.detail-bank-card .detail-row-wrap:last-child {
  margin-bottom: 0;
}
.detail-bank-card .badge {
  margin-top: 0.35rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.stat-card .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Content prose (about, terms) */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 20px;
}
.prose h1 { font-size: 2rem; margin-bottom: 1rem; }
.prose h2 { font-size: 1.35rem; margin: 1.5rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; margin: 1.25rem 0 0.5rem; }
.prose p { margin-bottom: 1rem; color: var(--text-secondary); }
.prose ul, .prose ol { margin: 0 0 1rem 1.5rem; color: var(--text-secondary); }
.prose li { margin-bottom: 0.35rem; }

/* Trang đăng nhập/đăng ký: bỏ khoảng cách main-content */
body.auth-page .main-content {
  padding: 0;
}
body.auth-page .container.section {
  padding: 0;
}

/* Trang đăng nhập/đăng ký trên mobile: ẩn header + footer, card full height */
@media (max-width: 992px) {
  body.auth-page .site-header,
  body.auth-page .site-footer,
  body.auth-page .nav-bottom {
    display: none !important;
  }
  body.auth-page .main-content {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
  }
  body.auth-page .container.section {
    width: 100%;
    display: flex;
    align-items: stretch;
  }
  body.auth-page .auth-card {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }
}

/* --- Support chat (user + admin) --- */
/* Trang /support full, không nav/footer */
body.support-full-page {
  min-height: 100vh;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.support-full-page::-webkit-scrollbar {
  display: none;
}
html:has(body.support-full-page) {
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html:has(body.support-full-page)::-webkit-scrollbar {
  display: none;
}
body.support-full-page .main-content.support-main-full {
  min-height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.support-page-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}
.support-page-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-default, #30363d);
  background: var(--bg-secondary, #161b22);
  flex-shrink: 0;
}
.support-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}
.support-page-back:hover { color: var(--text-primary); text-decoration: none; }
.support-page-back-icon { flex-shrink: 0; }
.support-page-title { margin: 0; font-size: 1.1rem; font-weight: 600; flex: 1; }
.support-page-full .support-chat-card { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 0; border-left: none; border-right: none; }
.support-page-full .support-chat-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.support-page-full .support-messages {
  flex: 1;
  min-height: 460px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.support-page-full .support-messages::-webkit-scrollbar {
  display: none;
}
.support-page-full .support-input-wrap { flex-shrink: 0; }

.support-page-title { margin-bottom: 1rem; font-size: 1.25rem; }
.support-page-full .support-page-title { margin-bottom: 0; }
.support-chat-card {
  background: var(--bg-secondary, #0d1117);
  border-radius: 12px;
  border: 1px solid var(--border-default, #30363d);
  overflow: hidden;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}
.support-chat-loading { padding: 2rem; text-align: center; color: var(--text-secondary); }
.support-chat-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 280px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.support-messages::-webkit-scrollbar {
  display: none;
}
.support-msg {
  max-width: 85%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  position: relative;
}
.support-msg-me { align-self: flex-end; background: var(--accent-emphasis, #238636); color: #fff; }
.support-msg-them { align-self: flex-start; background: var(--border-default, #30363d); color: var(--text-primary); }
.support-msg-name { font-size: 0.75rem; opacity: 0.9; margin-bottom: 0.25rem; }
.support-msg-text { word-break: break-word; }
.support-msg-img-wrap { display: block; margin-top: 0.25rem; }
.support-msg-img { max-width: 200px; max-height: 200px; border-radius: 8px; display: block; }
.support-msg-time { font-size: 0.7rem; opacity: 0.8; margin-top: 0.25rem; }
.support-msg-actions { margin-top: 0.5rem; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.support-msg-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.support-msg-action.support-msg-edit {
  background: #388bfd;
  color: #fff;
}
.support-msg-action.support-msg-edit:hover {
  background: #539bf5;
  color: #fff;
  opacity: 0.95;
}
.support-msg-action.support-msg-delete {
  background: #da3633;
  color: #fff;
}
.support-msg-action.support-msg-delete:hover {
  background: #f85149;
  color: #fff;
  opacity: 0.95;
}
.support-msg-action svg {
  display: block;
  flex-shrink: 0;
}
.support-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-default, #30363d);
  background: #161b22;
}
.support-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: var(--text-primary);
}
.support-input:focus {
  outline: none;
  border-color: #388bfd;
  box-shadow: 0 0 0 2px rgba(56, 139, 253, 0.25);
}
.support-btn-attach {
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-btn-attach:hover { background: #30363d; color: var(--text-primary); }
.support-input-wrap .support-btn-send,
.support-btn-send {
  background: #238636;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.support-input-wrap .support-btn-send:hover,
.support-btn-send:hover {
  background: #2ea043;
  color: #fff;
}
.support-admin-room .support-admin-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.support-admin-meta { flex: 1; min-width: 0; }
.support-admin-title { margin: 0 0 0.5rem 0; font-size: 1.1rem; }
.support-admin-row { margin: 0.25rem 0; font-size: 0.9rem; color: var(--text-secondary); }
.support-admin-ua { word-break: break-all; font-size: 0.85rem; }
.support-admin-chat-card { display: flex; flex-direction: column; min-height: 400px; }
.support-admin-messages { max-height: 50vh; }
.support-admin-input-wrap { margin-top: auto; }
.text-muted { color: var(--text-secondary); font-size: 0.9rem; }

/* --- Admin Support Messenger layout (giống Messenger) --- */
.support-messenger-page {
  padding: 0;
  height: calc(100vh - 140px);
  min-height: 420px;
}
.support-messenger {
  display: flex;
  height: 100%;
  min-height: 400px;
  background: var(--bg-default, #0d1117);
  border-radius: 12px;
  border: 1px solid var(--border-default, #30363d);
  overflow: hidden;
}
.support-messenger-sidebar {
  width: 320px;
  min-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-default, #30363d);
  background: var(--bg-secondary, #161b22);
}
.support-messenger-sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-default, #30363d);
}
.support-messenger-sidebar-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}
.support-messenger-conversation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}
.support-messenger-chat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-muted, #21262d);
  transition: background 0.15s ease;
}
.support-messenger-chat-item:hover {
  background: var(--bg-default, #0d1117);
}
.support-messenger-chat-item.active {
  background: var(--border-default, #30363d);
}
.support-messenger-chat-avatar {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-emphasis, #238636);
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-messenger-avatar-letter {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}
.support-messenger-unread-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger-emphasis, #da3633);
  border: 2px solid var(--bg-secondary, #161b22);
}
.support-messenger-chat-body {
  flex: 1;
  min-width: 0;
}
.support-messenger-chat-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.support-messenger-chat-preview {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.support-messenger-chat-meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.support-messenger-empty-list {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.support-messenger-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-default, #0d1117);
}
.support-messenger-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-secondary);
}
.support-messenger-empty-icon {
  opacity: 0.4;
  margin-bottom: 1rem;
}
.support-messenger-empty-icon svg {
  display: block;
}
.support-messenger-empty-text {
  margin: 0;
  font-size: 1rem;
}
.support-messenger-conversation {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.support-messenger-conversation-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-default, #30363d);
  background: var(--bg-secondary, #161b22);
}
.support-messenger-conversation-header-info {
  min-width: 0;
}
.support-messenger-conversation-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.support-messenger-conversation-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.support-messenger-conversation-details {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.support-messenger-conversation-details summary {
  cursor: pointer;
  color: var(--text-muted);
}
.support-messenger-detail-row {
  margin: 0.25rem 0;
}
.support-messenger-ua {
  word-break: break-all;
  font-size: 0.8rem;
}
.support-messenger-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}
.support-messenger-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-default, #30363d);
  background: var(--bg-secondary, #161b22);
}
.support-messenger-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.support-messenger-attach {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.support-messenger-attach:hover {
  background: var(--border-default, #30363d);
  color: var(--text-primary);
}
.support-messenger-attach svg {
  display: block;
}
.support-messenger-input {
  flex: 1;
}
@media (max-width: 768px) {
  .support-messenger {
    flex-direction: column;
    height: auto;
    min-height: 70vh;
  }
  .support-messenger-sidebar {
    width: 100%;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid var(--border-default, #30363d);
  }
  .support-messenger-main {
    flex: 1;
    min-height: 300px;
  }
}
