/* ==========================================================================
   BIRDFUND THEME — FULL-SCREEN FINTECH DESIGN SYSTEM
   Palette derived from BIRDFUND Logo: Obsidian Black + Electric Cyan/Blue + Metallic Silver
   ========================================================================== */

:root {
  --bf-bg: #04070D;
  --bf-bg-alt: #060B15;
  --bf-surface: #0B1221;
  --bf-surface-2: #111C33;
  --bf-surface-3: #162440;
  --bf-glass: rgba(11, 18, 33, 0.82);

  --bf-primary: #00C8FF;
  --bf-primary-mid: #0090FF;
  --bf-primary-deep: #0055FF;
  --bf-gradient: linear-gradient(135deg, #00D2FF 0%, #007BFF 55%, #0052FF 100%);
  --bf-gradient-hover: linear-gradient(135deg, #2EE0FF 0%, #1E90FF 55%, #1A6BFF 100%);
  --bf-glow: 0 0 24px rgba(0, 200, 255, 0.28);
  --bf-glow-strong: 0 8px 30px rgba(0, 144, 255, 0.42);

  --bf-text: #F8FAFC;
  --bf-text-secondary: #CBD5E1;
  --bf-text-muted: #8B9BB4;

  --bf-border: rgba(56, 189, 248, 0.14);
  --bf-border-strong: rgba(0, 200, 255, 0.34);
  --bf-border-subtle: rgba(255, 255, 255, 0.06);

  --bf-success: #10B981;
  --bf-success-bg: rgba(16, 185, 129, 0.12);
  --bf-warning: #F59E0B;
  --bf-warning-bg: rgba(245, 158, 11, 0.12);
  --bf-gold: #FFD700;
  --bf-danger: #EF4444;
  --bf-danger-bg: rgba(239, 68, 68, 0.12);

  --bf-radius-sm: 8px;
  --bf-radius: 14px;
  --bf-radius-lg: 20px;
  --bf-sidebar-w: 268px;
  --bf-topbar-h: 72px;
  --bf-font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--bf-font);
  background-color: var(--bf-bg) !important;
  color: var(--bf-text) !important;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.bf-body {
  background:
    radial-gradient(900px 420px at 18% -5%, rgba(0, 160, 255, 0.11), transparent 65%),
    radial-gradient(700px 380px at 88% 0%, rgba(0, 82, 255, 0.09), transparent 60%),
    var(--bf-bg) !important;
  background-attachment: fixed;
  display: block !important; /* Overrides old PWA flex-center */
}

a {
  color: var(--bf-primary);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: #5EE2FF;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bf-bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
#preloader.preloader-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   FULL-SCREEN APP SHELL (SIDEBAR + TOPBAR + MAIN WORKSPACE)
   ========================================================================== */
.bf-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* SIDEBAR */
.bf-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--bf-sidebar-w);
  background: linear-gradient(180deg, #070C17 0%, #050912 100%);
  border-right: 1px solid var(--bf-border);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.bf-sidebar-brand {
  height: var(--bf-topbar-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bf-border-subtle);
  flex-shrink: 0;
}

.bf-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.bf-brand-logo {
  height: 44px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 12px rgba(0, 200, 255, 0.25));
}

.bf-sidebar-close {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bf-border-subtle);
  color: var(--bf-text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bf-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 200, 255, 0.2) transparent;
}

.bf-nav-section {
  margin-bottom: 18px;
}

.bf-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #5C6F8C;
  padding: 0 12px 8px;
}

.bf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bf-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--bf-text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  position: relative;
}

.bf-nav-link i,
.bf-nav-link svg {
  width: 19px;
  height: 19px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6B7F9E;
  transition: color 0.18s ease;
}

.bf-nav-link:hover {
  background: rgba(0, 200, 255, 0.06);
  color: var(--bf-text);
  border-color: rgba(0, 200, 255, 0.12);
}

.bf-nav-link:hover i,
.bf-nav-link:hover svg {
  color: var(--bf-primary);
}

.bf-nav-link.active {
  background: linear-gradient(90deg, rgba(0, 200, 255, 0.16) 0%, rgba(0, 85, 255, 0.06) 100%);
  color: #FFFFFF;
  border-color: rgba(0, 200, 255, 0.32);
  box-shadow: inset 3px 0 0 var(--bf-primary);
}

.bf-nav-link.active i,
.bf-nav-link.active svg {
  color: var(--bf-primary);
}

.bf-nav-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 200, 255, 0.15);
  color: var(--bf-primary);
}

.bf-sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--bf-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.bf-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: #F87171;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bf-logout-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #FCA5A5;
}

/* SIDEBAR BACKDROP MOBILE */
.bf-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1035;
}
.bf-sidebar-backdrop.is-open {
  display: block;
}

/* MAIN AREA */
.bf-main {
  flex: 1;
  margin-left: var(--bf-sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR */
.bf-topbar {
  position: sticky;
  top: 0;
  height: var(--bf-topbar-h);
  background: var(--bf-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bf-border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 1020;
}

.bf-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.bf-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 200, 255, 0.12), rgba(11, 18, 33, 0.9));
  border: 1px solid rgba(0, 200, 255, 0.34);
  color: var(--bf-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.14);
  transition: all 0.18s ease;
}
.bf-menu-toggle:hover,
.bf-menu-toggle:active {
  border-color: var(--bf-primary);
  box-shadow: 0 0 18px rgba(0, 200, 255, 0.3);
}

.bf-page-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--bf-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bf-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bf-surface-2);
  border: 1px solid var(--bf-border);
  color: var(--bf-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  text-decoration: none;
}

.bf-icon-btn:hover {
  border-color: var(--bf-primary);
  color: var(--bf-primary);
  background: rgba(0, 200, 255, 0.1);
}

.bf-vip-btn {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(255, 215, 0, 0.45);
  color: #FFD700;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.2);
}
.bf-vip-btn:hover {
  color: #FFF3B0;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.bf-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: var(--bf-surface-2);
  border: 1px solid var(--bf-border);
  color: var(--bf-text);
  text-decoration: none;
  transition: border-color 0.18s ease;
}

.bf-user-chip:hover {
  border-color: var(--bf-primary);
  color: var(--bf-text);
}

.bf-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bf-gradient);
  color: #020814;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.bf-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bf-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.bf-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bf-text);
}

.bf-user-role {
  font-size: 10.5px;
  color: var(--bf-primary);
  font-weight: 600;
}

/* CONTENT CONTAINER */
.bf-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 48px;
  flex: 1;
}

/* MOBILE BOTTOM NAV */
.bf-mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 66px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(7, 12, 23, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--bf-border);
  z-index: 1030;
  align-items: center;
  justify-content: space-around;
}

.bf-mobile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--bf-text-muted);
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.bf-mobile-item i,
.bf-mobile-item svg {
  font-size: 19px;
  width: 20px;
  height: 20px;
}

.bf-mobile-item.active {
  color: var(--bf-primary);
}

.bf-mobile-center {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bf-gradient);
  color: #020814 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  box-shadow: var(--bf-glow-strong);
  transform: translateY(-10px);
}

.bf-mobile-center svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ==========================================================================
   REUSABLE CARDS, BUTTONS, INPUTS, TABLES, BADGES
   ========================================================================== */
.bf-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
}

.bf-card-glow {
  background: linear-gradient(155deg, #0D1930 0%, #08101E 100%);
  border: 1px solid rgba(0, 200, 255, 0.26);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(0, 200, 255, 0.18);
}

.bf-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--bf-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bf-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--bf-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.bf-card-body {
  padding: 22px;
}

/* Stat / KPI Cards */
.bf-stat-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.bf-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--bf-border-strong);
}

.bf-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bf-stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bf-text-muted);
}

.bf-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 200, 255, 0.12);
  border: 1px solid rgba(0, 200, 255, 0.24);
  color: var(--bf-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.bf-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--bf-text);
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.bf-stat-sub {
  font-size: 12px;
  color: var(--bf-text-muted);
}

/* Buttons */
.bf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: var(--bf-font);
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  line-height: 1.2;
}

.bf-btn-primary {
  background: var(--bf-gradient);
  color: #030914 !important;
  box-shadow: 0 6px 20px rgba(0, 144, 255, 0.32);
}

.bf-btn-primary:hover {
  background: var(--bf-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 200, 255, 0.42);
  color: #030914 !important;
}

.bf-btn-outline {
  background: rgba(0, 200, 255, 0.06);
  border-color: rgba(0, 200, 255, 0.32);
  color: var(--bf-primary) !important;
}

.bf-btn-outline:hover {
  background: rgba(0, 200, 255, 0.15);
  border-color: var(--bf-primary);
  color: #FFFFFF !important;
}

.bf-btn-secondary {
  background: var(--bf-surface-2);
  border-color: var(--bf-border);
  color: var(--bf-text) !important;
}

.bf-btn-secondary:hover {
  background: var(--bf-surface-3);
  border-color: var(--bf-border-strong);
}

.bf-btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
  color: #FCA5A5 !important;
}

.bf-btn-danger:hover {
  background: rgba(239, 68, 68, 0.24);
  color: #FFFFFF !important;
}

.bf-btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 8px;
}

.bf-btn-lg {
  padding: 14px 26px;
  font-size: 15px;
  border-radius: 12px;
}

.bf-btn:disabled,
.bf-btn.disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none !important;
}

/* Badges */
.bf-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
}

.bf-badge-cyan {
  background: rgba(0, 200, 255, 0.14);
  border: 1px solid rgba(0, 200, 255, 0.32);
  color: var(--bf-primary);
}

.bf-badge-success {
  background: var(--bf-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
}

.bf-badge-warning {
  background: var(--bf-warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #FBBF24;
}

.bf-badge-danger {
  background: var(--bf-danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #F87171;
}

.bf-badge-muted {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--bf-text-secondary);
}

/* Forms */
.bf-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--bf-text-secondary);
  margin-bottom: 7px;
}

.bf-input,
.bf-select,
.bf-textarea,
.bf-body .form-control,
.bf-body .form-select {
  width: 100%;
  background: var(--bf-bg-alt) !important;
  border: 1px solid var(--bf-border) !important;
  border-radius: 10px !important;
  color: var(--bf-text) !important;
  padding: 11px 14px;
  font-size: 14px;
  font-family: var(--bf-font);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bf-input:focus,
.bf-select:focus,
.bf-textarea:focus,
.bf-body .form-control:focus,
.bf-body .form-select:focus {
  outline: none;
  border-color: var(--bf-primary) !important;
  box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.16) !important;
  background: #081020 !important;
}

.bf-input::placeholder,
.bf-body .form-control::placeholder {
  color: #536580 !important;
}

.bf-select option,
.bf-body .form-select option {
  background: #0B1221;
  color: #F8FAFC;
}

/* Tables */
.bf-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.bf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.bf-table thead th {
  text-align: left;
  padding: 13px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--bf-text-muted);
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid var(--bf-border);
  white-space: nowrap;
}

.bf-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bf-border-subtle);
  color: var(--bf-text-secondary);
  vertical-align: middle;
}

.bf-table tbody tr:hover {
  background: rgba(0, 200, 255, 0.035);
}

.bf-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Pill Filters */
.bf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bf-pill {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bf-surface-2);
  border: 1px solid var(--bf-border);
  color: var(--bf-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.bf-pill:hover {
  color: var(--bf-text);
  border-color: var(--bf-border-strong);
}

.bf-pill.active {
  background: var(--bf-gradient);
  border-color: transparent;
  color: #020814;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 144, 255, 0.3);
}

/* ==========================================================================
   TRADER & BOT CATALOG GRID (MULTI-COLUMN FULL SCREEN)
   ========================================================================== */
.bf-trader-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.bf-trader-card {
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.bf-trader-card:hover {
  transform: translateY(-3px);
  border-color: var(--bf-border-strong);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.bf-trader-card--bot {
  background: linear-gradient(160deg, #0C1B33 0%, #071020 100%);
  border: 1px solid rgba(0, 200, 255, 0.42);
  box-shadow: 0 0 26px rgba(0, 200, 255, 0.12);
}

.bf-trader-card--bot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--bf-gradient);
  box-shadow: 0 0 14px rgba(0, 200, 255, 0.8);
}

.bf-trader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bf-trader-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bf-trader-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bf-surface-2);
  border: 1px solid var(--bf-border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bf-trader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bf-trader-name {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--bf-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-trader-limits {
  font-size: 12px;
  color: var(--bf-text-muted);
  margin-top: 2px;
}

.bf-trader-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(4, 7, 13, 0.55);
  border: 1px solid var(--bf-border-subtle);
  border-radius: 10px;
  padding: 12px 8px;
}

.bf-trader-metric {
  text-align: center;
}

.bf-trader-metric-val {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--bf-primary);
  font-variant-numeric: tabular-nums;
}

.bf-trader-metric-lbl {
  font-size: 10.5px;
  color: var(--bf-text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   OFFCANVAS & MODALS (FULL-SCREEN COMPATIBLE)
   ========================================================================== */
.bf-body .offcanvas {
  background: #091120 !important;
  color: var(--bf-text) !important;
  border-color: var(--bf-border) !important;
}

.bf-body .modal-content {
  background: #0B1324 !important;
  color: var(--bf-text) !important;
  border: 1px solid var(--bf-border-strong) !important;
  border-radius: var(--bf-radius-lg) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65) !important;
}

.bf-body .modal-header,
.bf-body .modal-footer {
  border-color: var(--bf-border-subtle) !important;
}

#menu-request.offcanvas-end {
  width: min(460px, 100vw) !important;
  border-left: 1px solid var(--bf-border-strong) !important;
}

/* Language Selector */
.app-lang-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bf-surface-2);
  border: 1px solid var(--bf-border);
  color: var(--bf-text);
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 12px;
  height: 40px;
  outline: none;
  cursor: pointer;
  border-radius: 10px !important;
  transition: all 0.2s ease;
}

.app-lang-pill:hover,
.app-lang-pill:focus {
  border-color: var(--bf-primary);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.2);
}

.app-lang-pill option {
  background: #0B1221;
  color: #F8FAFC;
}

/* Live Pulse Dot */
.bf-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bf-primary);
  box-shadow: 0 0 10px var(--bf-primary);
  display: inline-block;
  animation: bfPulse 1.5s infinite ease-in-out;
}

@keyframes bfPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* ==========================================================================
   AUTH SPLIT-SCREEN LAYOUT
   ========================================================================== */
.bf-auth-shell {
  min-height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bf-bg);
}

.bf-auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  background:
    radial-gradient(600px 420px at 30% 42%, rgba(0, 200, 255, 0.16), transparent 65%),
    radial-gradient(500px 380px at 80% 75%, rgba(0, 82, 255, 0.14), transparent 65%),
    #03060C;
  border-right: 1px solid var(--bf-border);
  overflow: hidden;
}

.bf-auth-beam {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 22%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 200, 255, 0.9) 50%, transparent 100%);
  box-shadow: 0 0 28px 4px rgba(0, 200, 255, 0.45);
  pointer-events: none;
}

.bf-auth-form-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  position: relative;
}

.bf-auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bf-surface);
  border: 1px solid var(--bf-border);
  border-radius: var(--bf-radius-lg);
  padding: 36px 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1280px) {
  .bf-trader-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .bf-sidebar {
    transform: translateX(-100%);
    width: 285px;
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.6);
  }
  .bf-sidebar.is-open {
    transform: translateX(0);
  }
  .bf-sidebar-close {
    display: inline-flex;
  }
  .bf-main {
    margin-left: 0;
    padding-bottom: calc(150px + env(safe-area-inset-bottom));
  }
  .bf-menu-toggle {
    display: inline-flex;
  }
  .bf-topbar {
    padding: 0 16px;
    height: 64px;
  }
  .bf-content {
    padding: 18px 16px 76px;
  }
  .bf-stat-card {
    padding: 14px 12px;
    gap: 6px;
  }
  .bf-stat-label {
    font-size: 11px;
    line-height: 1.25;
  }
  .bf-stat-icon {
    width: 30px;
    height: 30px;
    font-size: 13px;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .bf-stat-value {
    font-size: 17px;
  }
  .bf-stat-sub {
    font-size: 10.5px;
  }
  .bf-stat-card--compact {
    padding: 11px 9px;
    gap: 5px;
    text-align: center;
  }
  .bf-stat-card--compact .bf-stat-top {
    justify-content: center;
    flex-direction: column-reverse;
    gap: 5px;
  }
  .bf-stat-card--compact .bf-stat-value {
    font-size: 15px;
  }
  .bf-mobile-nav {
    display: flex;
  }
  .bf-user-meta {
    display: none;
  }
  .bf-user-chip {
    padding: 4px;
  }
  .bf-auth-shell {
    grid-template-columns: 1fr;
  }
  .bf-auth-visual {
    display: none;
  }
}

@media (max-width: 640px) {
  .bf-trader-grid {
    grid-template-columns: 1fr;
  }
  .bf-auth-card {
    padding: 26px 20px;
  }
  .bf-topbar-quick {
    display: none !important;
  }
}

/* Google Translate cleanup */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-spinner-pos {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}
body {
  top: 0 !important;
  position: static !important;
}
.skiptranslate:not(.notranslate) {
  display: none !important;
}
