/**
 * ============================================================
 * admin.css — Production Admin Console Styles
 * ============================================================
 * ADMIN_PROD_1: Real production admin console
 * Inherits from variables.css (design tokens)
 * Dark premium theme consistent with FINTop DATA brand
 * ============================================================
 */

/* ─── LAYOUT SHELL ──────────────────────────────────────── */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
}

/* ─── SIDEBAR ──────────────────────────────────────────── */
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--purple-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), min-width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar.is-collapsed {
  width: 68px !important;
  min-width: 68px !important;
}

.admin-sidebar.is-collapsed .admin-sidebar-header {
  padding: 1rem 0.25rem !important;
  justify-content: center !important;
}

.admin-sidebar.is-collapsed .admin-logo-link,
.admin-sidebar.is-collapsed .admin-sidebar-title,
.admin-sidebar.is-collapsed .admin-sidebar-subtitle,
.admin-sidebar.is-collapsed .admin-nav-section,
.admin-sidebar.is-collapsed .admin-nav-item span:not(.nav-icon),
.admin-sidebar.is-collapsed .admin-user-info {
  display: none !important;
}

.admin-sidebar.is-collapsed .admin-sidebar-toggle-btn {
  margin-left: 0 !important;
  width: 38px;
  height: 38px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: rgba(124, 58, 237, 0.25) !important;
  color: #ffffff !important;
  border-color: var(--purple-core) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

.admin-sidebar.is-collapsed .admin-nav-item {
  justify-content: center;
  padding: 0.6rem 0;
}

.admin-sidebar.is-collapsed + .admin-main,
.admin-shell.is-collapsed .admin-main {
  margin-left: 68px !important;
}

.admin-sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--purple-border);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}

.admin-sidebar-toggle-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  color: #ffffff;
  border-color: var(--purple-core);
}

.admin-sidebar-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--purple-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
}

.neon-logo {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 8px var(--purple-core)) drop-shadow(0 0 15px rgba(124, 58, 237, 0.4));
  transition: all 0.3s ease;
}

.neon-logo:hover {
  filter: drop-shadow(0 0 12px var(--purple-glow)) drop-shadow(0 0 25px rgba(139, 92, 246, 0.8));
  transform: scale(1.05);
}

.admin-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-sidebar-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-nav {
  flex: 1;
  padding: 0.75rem 0;
}

.admin-nav-section {
  padding: 0.4rem 1rem 0.2rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 0.5rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
  user-select: none;
}

.admin-nav-item:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-primary);
}

.admin-nav-item.active {
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple-glow);
  border-left-color: var(--purple-core);
  font-weight: 600;
}

.admin-nav-item .nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.admin-sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--purple-border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.admin-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-core), var(--purple-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.admin-user-info {
  overflow: hidden;
}

.admin-user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-role {
  font-size: 0.65rem;
  color: var(--purple-glow);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── MAIN CONTENT ─────────────────────────────────────── */
.admin-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--purple-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

/* ─── KPI CARDS ────────────────────────────────────────── */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--purple-border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.admin-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple-core), var(--purple-glow));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-kpi-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.admin-kpi-card:hover::before {
  opacity: 1;
}

.admin-kpi-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.admin-kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.admin-kpi-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.admin-kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ─── DATA TABLE ───────────────────────────────────────── */
.admin-table-container {
  background: var(--bg-card);
  border: 1px solid var(--purple-border);
  border-radius: 12px;
  overflow: hidden;
}

.admin-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--purple-border);
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-table-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.admin-search {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--purple-border);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.825rem;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s;
  min-width: 200px;
}

.admin-search:focus {
  border-color: var(--purple-core);
}

.admin-search::placeholder {
  color: var(--text-muted);
}

.admin-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--purple-border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.825rem;
  font-family: var(--font-family);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

.admin-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

table.admin-table {
  width: 100%;
  border-collapse: collapse !important;
  font-size: 0.85rem;
  border: 1px solid #3c4c68 !important;
  background-color: #1a2536 !important;
}

table.admin-table thead {
  background: #2b3c58 !important;
}

table.admin-table th {
  padding: 0.8rem 1rem;
  text-align: center !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid #3c4c68 !important;
}

table.admin-table td {
  padding: 0.75rem 1rem;
  color: #e2e8f0;
  border: 1px solid #3c4c68 !important;
  vertical-align: middle;
  background-color: #1c283a !important;
}

table.admin-table tbody tr {
  transition: background 0.15s ease;
}

table.admin-table tbody tr:hover td {
  background-color: #24334a !important;
}

/* ─── PAGINATION ───────────────────────────────────────── */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--purple-border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-pagination-info {
  font-size: 0.78rem;
}

.admin-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-page-btn {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--purple-border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.78rem;
  font-family: var(--font-family);
  transition: all 0.2s;
}

.admin-page-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.15);
  color: var(--text-primary);
  border-color: var(--purple-core);
}

.admin-page-btn.active {
  background: var(--purple-core);
  color: #fff;
  border-color: var(--purple-core);
}

.admin-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── BADGES ───────────────────────────────────────────── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.admin-badge.status-active,
.admin-badge.status-published,
.admin-badge.status-success,
.admin-badge.status-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.admin-badge.status-inactive,
.admin-badge.status-draft,
.admin-badge.status-pending {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
}

.admin-badge.status-locked,
.admin-badge.status-failed,
.admin-badge.status-cut_loss {
  background: rgba(248, 113, 113, 0.15);
  color: #F87171;
}

.admin-badge.status-closed,
.admin-badge.status-expired,
.admin-badge.status-void {
  background: rgba(251, 191, 36, 0.15);
  color: #FBBF24;
}

.admin-badge.status-reached_target {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.admin-badge.tier-standard {
  background: rgba(148, 163, 184, 0.12);
  color: #94A3B8;
}

.admin-badge.tier-silver {
  background: rgba(192, 192, 192, 0.15);
  color: #C0C0C0;
}

.admin-badge.tier-gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-primary);
}

.admin-badge.tier-diamond {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
}

.admin-badge.role-badge {
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple-glow);
}

.admin-badge.direction-buy {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.admin-badge.direction-sell {
  background: rgba(248, 113, 113, 0.15);
  color: #F87171;
}

/* ─── BUTTONS ──────────────────────────────────────────── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.825rem;
  font-weight: 600;
  font-family: var(--font-family);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-btn-primary {
  background: var(--purple-core);
  color: #fff;
}

.admin-btn-primary:hover {
  background: var(--purple-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.admin-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--purple-border);
}

.admin-btn-secondary:hover {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-primary);
}

.admin-btn-danger {
  background: rgba(248, 113, 113, 0.15);
  color: #F87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.admin-btn-danger:hover {
  background: rgba(248, 113, 113, 0.25);
}

.admin-btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
}

/* ─── DETAIL PANEL ─────────────────────────────────────── */
.admin-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--purple-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--purple-border);
}

.admin-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-detail-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.admin-detail-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ─── FORM ELEMENTS ────────────────────────────────────── */
.admin-form-group {
  margin-bottom: 1rem;
}

.admin-form-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.admin-input,
.admin-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--purple-border);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.admin-input:focus,
.admin-textarea:focus {
  border-color: var(--purple-core);
}

.admin-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ─── EMPTY STATE ──────────────────────────────────────── */
.admin-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.admin-empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.admin-empty-state .empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.admin-empty-state .empty-desc {
  font-size: 0.82rem;
}

/* ─── ACCESS DENIED ────────────────────────────────────── */
.admin-access-denied {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background: var(--bg-primary);
}

.admin-access-denied .denied-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.admin-access-denied .denied-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.admin-access-denied .denied-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 400px;
}

/* ─── LOADING SPINNER ──────────────────────────────────── */
.admin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.admin-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--purple-border);
  border-top-color: var(--purple-core);
  border-radius: 50%;
  animation: admin-spin 0.7s linear infinite;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

/* ─── TABS ─────────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--purple-border);
  margin-bottom: 1.25rem;
}

.admin-tab {
  padding: 0.6rem 1.25rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-family);
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  color: var(--purple-glow);
  border-bottom-color: var(--purple-core);
}

/* ─── TOAST ────────────────────────────────────────────── */
.admin-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--purple-border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: admin-toast-in 0.3s ease;
  max-width: 400px;
}

.admin-toast.success { border-color: rgba(16, 185, 129, 0.4); }
.admin-toast.error { border-color: rgba(248, 113, 113, 0.4); }

@keyframes admin-toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
}

/* ─── SCROLLBAR ────────────────────────────────────────── */
.admin-shell ::-webkit-scrollbar {
  width: 6px;
}

.admin-shell ::-webkit-scrollbar-track {
  background: transparent;
}

.admin-shell ::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.2);
  border-radius: 3px;
}

.admin-shell ::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.35);
}

/* ─── TOGGLE SWITCH (Quản trị khách hàng) ─────────────── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(248, 113, 113, 0.4);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(16, 185, 129, 0.6);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ─── MODAL OVERLAY ───────────────────────────────────── */
.admin-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.admin-modal {
  background: var(--bg-card);
  border: 1px solid var(--purple-border);
  border-radius: 14px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modal-scale-in 0.25s ease;
}

@keyframes modal-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--purple-border);
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-modal-body {
  padding: 1.5rem;
}

.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--purple-border);
}

/* ─── FORM GRID (inside modals) ───────────────────────── */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.admin-form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ─── WARNING BUTTON ──────────────────────────────────── */
.admin-btn-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-btn-warning:hover {
  background: rgba(245, 158, 11, 0.35);
}

/* ─── USER INFO CARD (Quản trị khách hàng) ────────────── */
.user-info-card {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-primary);
}

.user-info-card div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upgrade-btn:hover span {
  filter: brightness(1.3);
}

/* ─── DATA FINANCIAL TABLE ────────────────────────────── */
.df-table {
  border-collapse: collapse;
}

.df-table thead th {
  background: rgba(21, 31, 56, 0.85);
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.55rem 0.4rem;
  font-size: 0.72rem;
  white-space: inherit;
  text-align: center;
  border-bottom: 2px solid var(--purple-border);
}

.df-table tbody td {
  padding: 0.45rem 0.4rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
}

.df-editable {
  cursor: pointer;
  transition: background 0.15s;
}

.df-editable:hover {
  background: rgba(94, 114, 228, 0.12);
  outline: 1px dashed rgba(94, 114, 228, 0.4);
}

.df-table-scroll {
  border: 1px solid var(--purple-border);
  border-radius: 8px;
  background: var(--bg-card);
}

.df-inline-input {
  width: 100%;
  padding: 2px 4px;
  font-size: 0.8rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid #5e72e4;
  border-radius: 3px;
  outline: none;
}

.df-filter-dropdown {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.df-filter-label {
  transition: background 0.15s;
}

.df-filter-label:hover {
  background: rgba(94, 114, 228, 0.2);
}

.df-toolbar .admin-select,
.df-toolbar .admin-search {
  height: 32px;
  font-size: 0.8rem;
}

/* ─── PREMIUM DIRECT TABLE EDIT ────────────────────────── */
.df-premium-input {
  width: 100%;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.75rem;
  box-sizing: border-box;
  outline: none;
  text-align: center;
  transition: all 0.2s ease;
}

.df-premium-input:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.df-premium-input:focus {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--purple-core);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.35);
}

.df-premium-select {
  width: 100%;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 2px;
  font-size: 0.75rem;
  height: 26px;
  box-sizing: border-box;
  outline: none;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
}

.df-premium-select:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.df-premium-select:focus {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--purple-core);
}

.df-premium-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.df-premium-select-badge {
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  width: 115px;
  height: 28px;
}

.df-premium-select-badge option {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: normal;
}

/* User Info Card style mapping old web */
.user-info-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: #e2e8f0 !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
  text-align: left !important;
}

.user-info-card div {
  margin-bottom: 3px;
}

.user-info-card strong {
  color: #ffffff;
}

/* ─── HEADER USER DROPDOWN ────────────────────────────── */
.admin-user-dropdown {
  position: relative;
  display: inline-block;
}

.admin-dropdown-trigger {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--purple-border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.825rem;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  outline: none;
}

.admin-dropdown-trigger:hover,
.admin-user-dropdown.active .admin-dropdown-trigger {
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-primary);
  border-color: var(--purple-core);
}

.dropdown-caret {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.admin-user-dropdown.active .dropdown-caret {
  transform: rotate(180deg);
}

.admin-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--purple-border);
  border-radius: 8px;
  min-width: 185px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: admin-fade-in 0.2s ease;
}

.admin-user-dropdown.active .admin-dropdown-menu {
  display: flex;
}

.admin-dropdown-item {
  padding: 0.7rem 1rem;
  font-size: 0.825rem;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.admin-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-primary);
}

.admin-dropdown-item.logout-item {
  border-top: 1px solid var(--purple-border);
  color: #f87171;
}

.admin-dropdown-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

@keyframes admin-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── PREMIUM DASHBOARD OVERVIEW ─────────────────────── */
.admin-welcome-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-left: 4px solid var(--purple-core);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.welcome-text h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.welcome-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #34d399;
  font-weight: 600;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse-green 1.6s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

.dashboard-two-col-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .dashboard-two-col-layout {
    grid-template-columns: 1fr;
  }
}

.dashboard-feed-card {
  background: var(--bg-card);
  border: 1px solid var(--purple-border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.dashboard-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.dashboard-feed-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feed-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.feed-item:hover {
  background: rgba(124, 58, 237, 0.04);
  border-color: rgba(124, 58, 237, 0.15);
}

.dashboard-quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.dashboard-quick-nav-tile {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--purple-border);
  border-radius: 10px;
  padding: 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dashboard-quick-nav-tile:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--purple-core);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.quick-nav-icon {
  font-size: 1.35rem;
}

.quick-nav-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
}

.quick-nav-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.dashboard-system-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.health-stat-box {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.health-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.health-stat-val {
  font-size: 0.82rem;
  color: #fff;
  font-weight: 600;
  word-break: break-all;
}



