/* ==========================================================================
   TRADEDESK PRO • INSTITUTIONAL ADMIN WEB PORTAL STYLESHEET
   Mobile & Desktop Responsive • Bloomberg/TradingView Dark Aesthetics
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #070a11;
  --bg-secondary: #0c101c;
  --bg-surface: #111728;
  --bg-surface-hover: #182138;
  --bg-glass: rgba(17, 23, 40, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 230, 118, 0.3);
  
  /* Brand Accents */
  --emerald-primary: #00e676;
  --emerald-dark: #00b359;
  --emerald-glow: rgba(0, 230, 118, 0.35);
  
  --cyan-primary: #00d2ff;
  --cyan-glow: rgba(0, 210, 255, 0.35);
  
  --gold-primary: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.35);
  
  --purple-primary: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.35);
  
  --red-alert: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.35);
  
  /* Text */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Orbitron', sans-serif;

  /* Dimensions */
  --sidebar-width: 260px;
  --header-height: 68px;
  --dock-height: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 230, 118, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 210, 255, 0.04) 0%, transparent 40%);
  min-height: 100vh;
}

/* Glassmorphism Generic Utility */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

/* ==========================================================================
   1. LOGIN PASSCODE OVERLAY
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(12, 16, 28, 0.95), #070a11);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.terminal-shield {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  background: rgba(0, 230, 118, 0.1);
  border: 2px solid var(--emerald-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--emerald-primary);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.accent-text {
  color: var(--emerald-primary);
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 24px;
}

.login-form .input-group {
  text-align: left;
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.login-form input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font-mono);
  outline: none;
  transition: all 0.2s ease;
}

.login-form input:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 14px var(--emerald-glow);
}

.error-msg {
  font-size: 12px;
  color: var(--red-alert);
  margin-top: 10px;
  min-height: 18px;
  font-weight: 600;
}

.login-meta {
  margin-top: 24px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   2. APP SHELL LAYOUT (DESKTOP & MOBILE)
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* --- SIDEBAR (Desktop) --- */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-radius: 0;
  border-right: 1px solid var(--border-subtle);
  background: rgba(12, 16, 28, 0.92);
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--emerald-primary), var(--cyan-primary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070a11;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 0 15px var(--emerald-glow);
}

.brand-text-box h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--emerald-primary);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-primary);
  animation: pulseAnim 1.6s infinite ease-in-out;
}

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

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.nav-item.active {
  color: #fff;
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.3);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.08);
}

.nav-item.active i {
  color: var(--emerald-primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--red-alert);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  box-shadow: 0 0 10px var(--red-glow);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.admin-info {
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.admin-role {
  font-size: 10px;
  color: var(--emerald-primary);
  font-weight: 600;
}

.logout-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red-alert);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--red-alert);
  color: #fff;
}

/* --- MAIN VIEWPORT & HEADER --- */
.main-viewport {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 20px 28px 80px 28px;
  min-height: 100vh;
}

.top-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-bottom: 24px;
  border-radius: 14px;
}

.mobile-brand-wrapper {
  display: none;
  align-items: center;
  gap: 10px;
}

.mobile-menu-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 24px;
}

.hamburger-bar {
  display: block;
  width: 18px;
  height: 2.2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-brand-content {
  display: flex;
  align-items: center;
  gap: 7px;
}

.logo-candlestick-icon {
  font-size: 19px;
  color: #00e676;
  filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.4));
}

.brand-text-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-main {
  font-family: var(--font-inter), sans-serif;
  font-size: 13.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-family: var(--font-inter), sans-serif;
  font-size: 11px;
  font-weight: 900;
  color: #00e676;
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.market-clock-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan-primary);
}

.active-channel-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 10px;
  font-size: 12px;
}

.channel-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-primary);
}

.channel-label {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 10.5px;
}

.header-lock-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.header-lock-btn:hover {
  color: #fff;
  background: var(--bg-surface-hover);
}

/* ==========================================================================
   3. TAB CONTENT VIEWS & GENERAL UI
   ========================================================================== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block !important;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.page-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Mobile Quick Operations Hub (Top of Dashboard) */
.mobile-quick-hub {
  display: none;
}

.quick-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.quick-tile:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.08);
}

.quick-tile .tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.tile-chat .tile-icon { background: rgba(0, 230, 118, 0.16); color: #00e676; border: 1px solid rgba(0, 230, 118, 0.3); }
.tile-vip .tile-icon { background: rgba(245, 158, 11, 0.16); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.tile-proofs .tile-icon { background: rgba(0, 210, 255, 0.16); color: #00d2ff; border: 1px solid rgba(0, 210, 255, 0.3); }
.tile-users .tile-icon { background: rgba(168, 85, 247, 0.16); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.3); }

.quick-tile .tile-info {
  flex: 1;
  min-width: 0;
}

.quick-tile h4 {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-tile p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-badge {
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 10px;
}

.tile-arrow {
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.6;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-dark));
  color: #070a11;
  font-weight: 800;
  font-size: 13px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-glow {
  box-shadow: 0 4px 18px var(--emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 230, 118, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 12.5px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: var(--red-alert);
  color: #fff;
}

.btn-approve {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: var(--emerald-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-approve:hover {
  background: var(--emerald-primary);
  color: #070a11;
  box-shadow: 0 0 14px var(--emerald-glow);
}

/* ==========================================================================
   4. METRICS & TELEMETRY GRID
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  background: rgba(24, 33, 56, 0.7);
}

.border-cyan { border-left: 4px solid var(--cyan-primary); }
.border-emerald { border-left: 4px solid var(--emerald-primary); }
.border-gold { border-left: 4px solid var(--gold-primary); }
.border-purple { border-left: 4px solid var(--purple-primary); }

.metric-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cyan-gradient { background: rgba(0, 210, 255, 0.15); color: var(--cyan-primary); }
.emerald-gradient { background: rgba(0, 230, 118, 0.15); color: var(--emerald-primary); }
.gold-gradient { background: rgba(245, 158, 11, 0.15); color: var(--gold-primary); }
.purple-gradient { background: rgba(168, 85, 247, 0.15); color: var(--purple-primary); }

.metric-details {
  flex: 1;
}

.metric-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  display: block;
}

.metric-number-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 2px 0;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.text-gold { color: #f59e0b !important; }
.text-purple { color: #c084fc !important; }
.text-emerald { color: #00e676 !important; }
.text-red { color: #f87171 !important; }

.metric-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.metric-badge.positive {
  background: rgba(0, 210, 255, 0.15);
  color: var(--cyan-primary);
}

.metric-badge.today-pill {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald-primary);
}

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

.metric-badge.purple-pill {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-primary);
}

.metric-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   5. 4-WAY BANK LOAD DISTRIBUTION CARDS
   ========================================================================== */
.section-card {
  padding: 22px;
  margin-bottom: 24px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.status-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.active-chip {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: var(--emerald-primary);
}

.bank-distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.bank-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.bank-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.bank-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bank-pill {
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.hdfc-pill { background: #004c8f; color: #fff; }
.sbi-pill { background: #0072bb; color: #fff; }
.icici-pill { background: #ea580c; color: #fff; }
.axis-pill { background: #97144d; color: #fff; }
.pnb-pill { background: #a2003c; color: #fff; }
.partner-pill { background: #7c3aed; color: #fff; }
.uco-pill { background: #0d9488; color: #fff; }

.bank-card {
  cursor: pointer;
}

.hdfc-card:hover { border-color: rgba(0, 76, 143, 0.6); }
.sbi-card:hover { border-color: rgba(0, 114, 187, 0.6); }
.icici-card:hover { border-color: rgba(234, 88, 12, 0.6); }
.axis-card:hover { border-color: rgba(151, 20, 77, 0.6); }
.pnb-card:hover { border-color: rgba(162, 0, 60, 0.6); }

/* Bank Telemetry Banner in Tab VIP */
.bank-telemetry-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
}

.bank-telemetry-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}

.bank-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bank-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}

.bank-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.3);
}

.chip-name { font-weight: 800; color: var(--text-muted); }
.chip-amt { font-family: var(--font-mono); }
.chip-cnt { color: var(--text-muted); font-size: 10px; }

.bank-filter-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

.b-filter-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.b-filter-pill:hover,
.b-filter-pill.active {
  background: var(--gold-vip);
  color: #000;
  border-color: var(--gold-vip);
}

.share-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 6px;
}

.bank-account-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}

.bank-upi-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.bank-stats-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 11.5px;
}

.b-lbl { color: var(--text-muted); }
.b-val { font-family: var(--font-mono); font-weight: 700; margin-left: 4px; }

/* ==========================================================================
   6. VIP APPROVAL QUEUE & REQUEST CARDS
   ========================================================================== */
.filter-pill-group {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.filter-btn.active {
  background: var(--bg-surface-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.request-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.request-item-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.req-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.req-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 210, 255, 0.12);
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.req-user-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #fff;
}

.req-user-phone {
  font-size: 11px;
  color: var(--text-muted);
}

.req-amount-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--emerald-primary);
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 4px 10px;
  border-radius: 8px;
}

.req-middle-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.target-bank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.app-paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.req-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  background: rgba(7, 10, 17, 0.5);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}

.detail-block .d-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
}

.detail-block .d-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-mini-btn {
  background: transparent;
  border: none;
  color: var(--cyan-primary);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
}

.copy-mini-btn:hover {
  color: #fff;
}

.req-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* ==========================================================================
   7. COMPOSER & PREVIEW LAYOUT (VIP SIGNAL & FREE PROOFS)
   ========================================================================== */
.composer-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: flex-start;
}

.composer-card {
  padding: 24px;
}

.form-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.form-group {
  flex: 1;
  margin-bottom: 14px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.form-group select {
  cursor: pointer;
}

/* Mock Phone Previews */
.preview-card-wrapper {
  padding: 20px;
}

.preview-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.mock-vip-signal {
  background: #0f172a;
  border: 1px solid rgba(0, 230, 118, 0.4);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   7B. TELEGRAM VIP TRADING ROOM (EXACT REPLICA OF USER MOCKUP)
   ========================================================================== */
/* Ensure Chat View tabs fill full height without creating outer page scroll */
.tab-content#tab-post-signal.active,
.tab-content#tab-free-proofs.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ==========================================================================
   DESKTOP (WINDOW) FIXED CHAT LOCK:
   Prevents entire window from scrolling away and revealing black void below input bar!
   Only the chat messages feed will scroll!
   ========================================================================== */
body:has(#tab-post-signal.active),
body:has(#tab-free-proofs.active),
body.chat-view-active {
  overflow: hidden !important;
  height: 100vh !important;
}

body:has(#tab-post-signal.active) #appShell,
body:has(#tab-free-proofs.active) #appShell,
body.chat-view-active #appShell {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
}

body:has(#tab-post-signal.active) .main-viewport,
body:has(#tab-free-proofs.active) .main-viewport,
body.chat-view-active .main-viewport {
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 0 !important;
  padding: 12px 24px 12px 24px !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body:has(#tab-post-signal.active) .top-header,
body:has(#tab-free-proofs.active) .top-header,
body.chat-view-active .top-header {
  margin-bottom: 10px !important;
  flex-shrink: 0 !important;
  height: 52px !important;
}

body:has(#tab-post-signal.active) .tg-chat-frame,
body:has(#tab-free-proofs.active) .tg-chat-frame,
body.chat-view-active .tg-chat-frame {
  flex: 1 1 0% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  margin: 0 !important;
}

body:has(#tab-post-signal.active) .tg-chat-feed,
body:has(#tab-free-proofs.active) .tg-chat-feed,
body.chat-view-active .tg-chat-feed {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body:has(#tab-post-signal.active) .tg-input-bar,
body:has(#tab-free-proofs.active) .tg-input-bar,
body.chat-view-active .tg-input-bar {
  flex-shrink: 0 !important;
  position: relative !important;
  bottom: 0 !important;
  z-index: 50 !important;
}

.tg-chat-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #0b141d;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  position: relative;
}

/* Telegram Room Header */
.tg-chat-header {
  background: #17212b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.tg-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-room-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #00e676;
  color: #070a11;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.35);
}

.tg-room-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tg-room-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.3px;
}

.tg-room-members {
  font-size: 12px;
  color: #708499;
}

.tg-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-header-action-btn {
  background: rgba(0, 230, 118, 0.14);
  border: 1px solid #00e676;
  color: #00e676;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.tg-header-action-btn:hover {
  background: #00e676;
  color: #070a11;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.5);
}

.tg-header-icon-btn {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #708499;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.tg-header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* Telegram Messages Feed (Wallpaper) */
.tg-chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: #0b141d;
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(17, 30, 44, 0.7) 0%, rgba(11, 20, 29, 0.98) 100%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px;
  scroll-behavior: smooth;
}

.tg-chat-feed::-webkit-scrollbar {
  width: 6px;
}

.tg-chat-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.tg-messages-stream {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

/* Common Telegram Message Row */
.tg-msg-item {
  display: flex;
  width: 100%;
  animation: fadeIn 0.25s ease-out;
}

.tg-msg-item.left-announcement,
.tg-msg-item.left-trade-card {
  align-items: flex-start;
  gap: 10px;
  justify-content: flex-start;
}

.tg-msg-item.right-outgoing {
  justify-content: flex-end;
}

.tg-td-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #00e676;
  color: #070a11;
  font-weight: 900;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

/* Message Bubble Type 1: Text Announcement (Left) */
.tg-bubble-announcement {
  background: #182533;
  border-radius: 4px 16px 16px 16px;
  padding: 12px 16px;
  max-width: min(540px, 86%);
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: break-word;
  color: #e5edf3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tg-announcement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 10px;
}

.tg-author-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tg-author-name {
  font-size: 13px;
  font-weight: 700;
  color: #00e676;
}

.tg-author-check {
  color: #00d2ff;
  font-size: 11px;
}

.tg-badge-admin {
  background: #253444;
  color: #8598aa;
  font-size: 10px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 4px;
}

.tg-msg-time {
  font-size: 11px;
  color: #708499;
  white-space: nowrap;
}

.tg-announcement-text {
  font-size: 13px;
  line-height: 1.5;
  color: #e5edf3;
  white-space: pre-line;
}

/* Message Bubble Type 2: Green Bordered VIP Trade Card (Exact replica of user screenshot!) */
.tg-trade-wrapper {
  display: flex;
  flex-direction: column;
  max-width: min(660px, 100%);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tg-vip-trade-card {
  background: #0c1820;
  border: 1.5px solid #00e676;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.16);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: box-shadow 0.2s;
}

.tg-vip-trade-card:hover {
  box-shadow: 0 0 26px rgba(0, 230, 118, 0.26);
}

.tg-vip-trade-card.put-card {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.16);
}

/* Card Top Row */
.tg-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tg-card-trader-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-mini-td-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #00e676;
  color: #000;
  font-weight: 900;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-vip-trade-card.put-card .tg-mini-td-pill {
  background: #ef4444;
  color: #fff;
}

.tg-card-trader-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.tg-card-time {
  font-size: 11px;
  color: #708499;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tg-card-badges-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tg-badge-direction {
  background: #06261c;
  border: 1px solid #00e676;
  color: #00e676;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.tg-vip-trade-card.put-card .tg-badge-direction {
  background: #2b0e11;
  border-color: #ef4444;
  color: #ef4444;
}

.tg-badge-viptag {
  background: #12242a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tg-viptag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e676;
}

.tg-vip-trade-card.put-card .tg-viptag-dot {
  background: #ef4444;
}

/* Instrument Title Row */
.tg-instrument-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tg-instrument-text {
  font-family: var(--font-orbitron);
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.tg-live-pill {
  color: #00d2ff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* 4 Compact Levels Grid */
.tg-levels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tg-level-box {
  background: #09131a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tg-level-label {
  font-size: 9.5px;
  font-weight: 700;
  color: #708499;
  letter-spacing: 0.5px;
}

.tg-level-val {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
}

.tg-level-val.val-red { color: #ff5252; }
.tg-level-val.val-emerald { color: #00e676; }

/* Note/Advice Row */
.tg-advice-strip {
  background: #08131a;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: #8ca1b5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-advice-strip i {
  color: #708499;
  font-size: 13px;
}

/* Card Chart Image */
.tg-card-chart-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: block;
  box-sizing: border-box;
}

/* Card Action Buttons Row (Interactive) */
.tg-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
  gap: 6px;
}

.tg-action-pills-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tg-action-pill {
  background: #182533;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8ba2b8;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3.5px 8px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tg-action-pill:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.tg-action-pill.btn-t1 {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.35);
  color: #00e676;
}

.tg-action-pill.btn-t2 {
  background: rgba(0, 210, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.35);
  color: #00d2ff;
}

.tg-action-pill.btn-trail {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.tg-action-pill.btn-sl {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.tg-actions-status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-vipsent-status {
  font-size: 11px;
  font-weight: 700;
  color: #00d2ff;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tg-delete-btn {
  background: transparent;
  border: none;
  color: #708499;
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
  transition: color 0.2s;
}

.tg-delete-btn:hover {
  color: #ef4444;
}

.tg-card-bottom-time {
  text-align: right;
  font-size: 10.5px;
  color: #708499;
  margin-top: 2px;
  padding-right: 4px;
}

/* ==========================================================================
   TELEGRAM MESSAGE REACTIONS BAR & POPOVER
   ========================================================================== */
.tg-reactions-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin: 6px 0 2px 0;
  position: relative;
  z-index: 10;
}

.tg-reaction-chip {
  background: rgba(23, 33, 43, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #c4d3e0;
  font-size: 11px;
  font-weight: 600;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tg-reaction-chip:hover {
  background: rgba(35, 52, 70, 0.95);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px) scale(1.05);
}

.tg-reaction-chip:active {
  transform: scale(0.92);
}

.tg-reaction-chip.user-reacted {
  background: rgba(0, 230, 118, 0.15) !important;
  border-color: #00e676 !important;
  color: #00e676 !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.25);
}

.tg-reaction-chip .tg-rx-em {
  font-size: 13.5px;
  line-height: 1;
}

.tg-reaction-chip .tg-rx-num {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-inter), sans-serif;
}

.tg-rx-add-btn {
  background: rgba(23, 33, 43, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #708499;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
  user-select: none;
}

.tg-rx-add-btn:hover {
  background: rgba(0, 230, 118, 0.15);
  border-color: #00e676;
  color: #00e676;
  transform: scale(1.1);
}

/* Telegram Floating Reactions Popover Menu */
.tg-rx-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: #17212b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  z-index: 60;
  animation: popoverBounce 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tg-rx-popover span {
  font-size: 18px;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 50%;
  transition: transform 0.15s ease, background 0.15s;
  display: inline-block;
  user-select: none;
}

.tg-rx-popover span:hover {
  transform: scale(1.35) translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.tg-rx-popover span:active {
  transform: scale(1.1);
}

@keyframes popoverBounce {
  0% { opacity: 0; transform: scale(0.8) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Message Bubble Type 3: Outgoing Green Bubble (Right Aligned from screenshot) */
.tg-bubble-outgoing-green {
  background: linear-gradient(135deg, #0e3d2f, #092c22);
  border: 1px solid rgba(0, 230, 118, 0.4);
  border-radius: 16px 16px 4px 16px;
  padding: 10px 14px;
  max-width: min(520px, 84%);
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  color: #e5edf3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  word-break: break-word;
  overflow: hidden;
}

.tg-outgoing-caption {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

.tg-chart-click-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
}

.tg-outgoing-chart-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  box-sizing: border-box;
}

.tg-outgoing-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 11px;
  color: #22c55e;
}

.tg-media-box {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-media-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.tg-media-play-btn i {
  margin-left: 2px;
}

.empty-media-placeholder {
  height: 140px;
  width: 100%;
  background: #091a13;
}

.tg-footer-check {
  color: #00e676 !important;
  font-size: 11px;
}

/* VIP Trade Setup Drawer (SENSEX / NIFTY Drawer) */
.tg-trade-drawer {
  display: none;
  background: #111d27;
  border-top: 1.5px solid rgba(0, 230, 118, 0.3);
  padding: 14px 18px;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  animation: slideUpFade 0.2s ease-out;
  z-index: 15;
}

.tg-trade-drawer.open {
  display: flex;
}

.drawer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.6px;
}

.tg-dir-toggle {
  display: flex;
  background: #09131a;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dir-pill-btn {
  background: transparent;
  border: none;
  color: #708499;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dir-pill-btn.active-call {
  background: #00e676;
  color: #070a11;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
}

.dir-pill-btn.active-put {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #708499;
  font-size: 16px;
  cursor: pointer;
}

.drawer-close-btn:hover { color: #fff; }

.drawer-chips-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.drawer-chips-row::-webkit-scrollbar { display: none; }

.chips-label {
  font-size: 10px;
  font-weight: 800;
  color: #708499;
  margin-right: 4px;
}

.tg-chip {
  background: #09131a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8ca1b5;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tg-chip:hover {
  background: rgba(0, 230, 118, 0.15);
  border-color: #00e676;
  color: #00e676;
}

.drawer-inputs-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr;
  gap: 10px;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-field label {
  font-size: 10px;
  font-weight: 800;
  color: #708499;
  letter-spacing: 0.5px;
}

.drawer-field input {
  background: #09131a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
}

.drawer-field input:focus {
  border-color: #00e676;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

.drawer-bottom-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.drawer-submit-btn {
  height: 38px;
  padding: 0 18px;
  background: linear-gradient(135deg, #00e676, #00b0ff);
  border: none;
  border-radius: 8px;
  color: #070a11;
  font-weight: 900;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.4);
  transition: all 0.2s ease;
}

.drawer-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.6);
}

/* Telegram Bottom Input Bar (Exact match to screenshot) */
.tg-input-bar {
  background: #17212b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.tg-bar-icon-btn {
  background: transparent;
  border: none;
  color: #708499;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.tg-bar-icon-btn:hover {
  color: #ffffff;
}

.tg-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14.5px;
  padding: 6px 2px;
  font-family: inherit;
}

.tg-bar-input::placeholder {
  color: #708499;
}

.tg-send-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #00e676;
  border: none;
  color: #070a11;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.tg-send-circle-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 24px rgba(0, 230, 118, 0.6);
}

.tg-send-circle-btn:active {
  transform: scale(0.96);
}

/* Direct Chart Photo Modal (Opens directly on 🖼️ click) */
.tg-photo-modal {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.tg-photo-modal.hidden {
  display: none !important;
}

.tg-photo-card {
  max-width: 500px;
  width: 100%;
  background: #111d27;
  border: 1.5px solid #00e676;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tg-photo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tg-photo-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.tg-photo-preview-box {
  width: 100%;
  height: 200px;
  border: 2px dashed rgba(0, 230, 118, 0.35);
  border-radius: 12px;
  background: #08121a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.tg-photo-preview-box:hover {
  border-color: #00e676;
}

.tg-photo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tg-photo-placeholder {
  text-align: center;
  color: #708499;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tg-photo-placeholder i {
  font-size: 32px;
  color: #00e676;
  margin-bottom: 4px;
}

.tg-photo-placeholder p {
  font-size: 12.5px;
  color: #ffffff;
  margin: 0;
}

.tg-photo-placeholder span {
  font-size: 11px;
  color: #708499;
}

.tg-photo-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.tg-send-photo-btn {
  background: linear-gradient(135deg, #00e676, #00b0ff);
  border: none;
  border-radius: 8px;
  color: #070a11;
  font-weight: 800;
  font-size: 12px;
  padding: 9px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.4);
  transition: all 0.2s ease;
}

.tg-send-photo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.6);
}

/* Mobile Responsiveness for Telegram Chat */
@media (max-width: 900px) {
  .tg-chat-frame {
    height: calc(100vh - 140px);
  }
  .drawer-inputs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .drawer-bottom-row {
    flex-direction: column;
    align-items: stretch;
  }
  .drawer-submit-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .tg-chat-frame {
    height: calc(100vh - 125px);
    border-radius: 12px;
  }
  .tg-chat-feed {
    padding: 12px 10px;
    gap: 12px;
  }
  .tg-levels-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }
  .tg-level-box {
    padding: 6px 3px !important;
    min-width: 0 !important;
  }
  .tg-level-label {
    font-size: 8px !important;
  }
  .tg-level-val {
    font-size: 11px !important;
  }
  .tg-vip-trade-card {
    padding: 12px 10px;
  }
  .tg-instrument-text {
    font-size: 15px;
  }
  .tg-header-action-btn span {
    display: none;
  }
  .tg-header-action-btn {
    padding: 6px 10px;
  }
  .tg-action-pill {
    padding: 3px 8px;
    font-size: 10.5px;
  }
}

.mock-signal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mock-trader {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-avatar {
  width: 32px;
  height: 32px;
  background: var(--emerald-primary);
  color: #070a11;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 11px;
}

.mock-name {
  font-size: 12.5px;
  color: #fff;
  display: block;
}

.mock-time {
  font-size: 10px;
  color: var(--text-muted);
}

.mock-badge {
  background: rgba(0, 230, 118, 0.15);
  color: var(--emerald-primary);
  border: 1px solid var(--emerald-primary);
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.mock-pair {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.mock-levels-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

.mock-lvl .lbl { color: var(--text-muted); display: block; font-size: 10px; font-weight: 700; }
.mock-lvl strong { font-family: var(--font-mono); font-size: 13px; }

.mock-caption {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.mock-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

/* Free Proof Mock */
.mock-free-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
}

.mock-free-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.broker-tag { font-size: 10.5px; font-weight: 700; color: var(--text-secondary); }
.roi-tag { font-size: 10.5px; font-weight: 800; color: var(--emerald-primary); }

.profit-highlight {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 900;
  color: var(--emerald-primary);
  margin-bottom: 2px;
}

.instrument-sub {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.mock-image-placeholder {
  height: 140px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 6px;
  margin-bottom: 10px;
}

.mock-image-placeholder i { font-size: 28px; }
.free-caption-text { font-size: 12px; color: var(--text-secondary); }

/* Recent Items Cards */
.recent-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.recent-signal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   8. MARQUEE & DATA TABLES
   ========================================================================== */
.marquee-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.marquee-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.current-marquee-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
}

.marquee-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-primary);
  display: block;
  margin-bottom: 6px;
}

.marquee-display {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: #fff;
}

/* Data Table */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 14px;
}

.table-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
}

.table-search-box i { color: var(--text-muted); }

/* ==========================================================================
   9. MOBILE BOTTOM NAVIGATION DOCK & RESPONSIVE BREAKPOINTS
   ========================================================================== */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--dock-height);
  background: rgba(12, 16, 28, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  z-index: 990;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}

.dock-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  padding: 6px 10px;
}

.dock-btn i { font-size: 18px; }

.dock-btn.active {
  color: var(--emerald-primary);
}

.center-action {
  position: relative;
  top: -12px;
}

.center-icon-glow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #070a11;
  font-size: 20px;
  box-shadow: 0 4px 18px var(--emerald-glow);
}

/* ==========================================================================
   10. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--emerald-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.toast-error {
  border-left-color: var(--red-alert);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   11. COMPREHENSIVE MOBILE RESPONSIVE ENGINE (< 900px, < 600px)
   ========================================================================== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .mobile-brand-wrapper {
    display: flex;
  }

  .mobile-bottom-dock {
    display: flex;
  }

  .main-viewport {
    margin-left: 0;
    padding: 14px 14px 85px 14px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Show Mobile Quick Hub on Dashboard */
  .mobile-quick-hub {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }

  .composer-layout {
    grid-template-columns: 1fr;
  }

  /* -----------------------------------------------------------------------
     WHATSAPP / TELEGRAM FIXED CHAT LAYOUT FOR MOBILE
     No outer page scroll. Feed scrolls in middle. Input bar permanently pinned above dock!
     ----------------------------------------------------------------------- */
  html.chat-view-active,
  body.chat-view-active,
  body:has(#tab-post-signal.active),
  body:has(#tab-free-proofs.active) {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
  }

  body:has(#tab-post-signal.active) #appShell,
  body:has(#tab-free-proofs.active) #appShell,
  body.chat-view-active #appShell {
    height: 100vh !important;
    height: 100dvh !important;
    height: var(--app-height, 100dvh) !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  body:has(#tab-post-signal.active) .top-header,
  body:has(#tab-free-proofs.active) .top-header,
  body.chat-view-active .top-header {
    display: none !important;
  }

  body:has(#tab-post-signal.active) .main-viewport,
  body:has(#tab-free-proofs.active) .main-viewport,
  body.chat-view-active .main-viewport {
    flex: 1 1 0% !important;
    height: calc(100vh - 60px) !important;
    height: calc(100dvh - 60px) !important;
    height: calc(var(--app-height, 100dvh) - 60px) !important;
    max-height: calc(var(--app-height, 100dvh) - 60px) !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  /* INACTIVE TABS MUST ALWAYS BE HIDDEN (Prevents stacking multiple chats!) */
  .tab-content:not(.active) {
    display: none !important;
  }

  /* ONLY THE ACTIVE CHAT TAB IS DISPLAYED */
  .tab-content#tab-post-signal.active,
  .tab-content#tab-free-proofs.active {
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  body:has(#tab-post-signal.active) .tg-chat-frame,
  body:has(#tab-free-proofs.active) .tg-chat-frame,
  body.chat-view-active .tg-chat-frame {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    position: relative !important;
    margin: 0 !important;
    width: 100% !important;
  }

  body:has(#tab-post-signal.active) .tg-chat-header,
  body:has(#tab-free-proofs.active) .tg-chat-header,
  body.chat-view-active .tg-chat-header {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    background: #17212b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 20 !important;
  }

  body:has(#tab-post-signal.active) .tg-chat-feed,
  body:has(#tab-free-proofs.active) .tg-chat-feed,
  body.chat-view-active .tg-chat-feed {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    padding: 10px 10px 6px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body:has(#tab-post-signal.active) .tg-input-bar,
  body:has(#tab-free-proofs.active) .tg-input-bar,
  body.chat-view-active .tg-input-bar {
    flex-shrink: 0 !important;
    background: #17212b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 28px !important;
    padding: 3px 5px 3px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    z-index: 40 !important;
    width: calc(100% - 16px) !important;
    margin: 3px 8px 5px 8px !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
    position: relative !important;
    overflow: visible !important;
  }

  body.chat-view-active .tg-bar-icon-btn,
  body:has(#tab-post-signal.active) .tg-bar-icon-btn,
  body:has(#tab-free-proofs.active) .tg-bar-icon-btn {
    flex-shrink: 0 !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #708499 !important;
  }

  body.chat-view-active .tg-bar-input,
  body:has(#tab-post-signal.active) .tg-bar-input,
  body:has(#tab-free-proofs.active) .tg-bar-input {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 0 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    font-size: 14.5px !important;
    padding: 5px 2px !important;
  }

  body.chat-view-active .tg-send-circle-btn,
  body:has(#tab-post-signal.active) .tg-send-circle-btn,
  body:has(#tab-free-proofs.active) .tg-send-circle-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    background: #00e676 !important;
    border: none !important;
    color: #070a11 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4) !important;
    flex-shrink: 0 !important;
    margin-left: 2px !important;
    cursor: pointer !important;
  }

  body.chat-view-active .tg-send-circle-btn i,
  body:has(#tab-post-signal.active) .tg-send-circle-btn i,
  body:has(#tab-free-proofs.active) .tg-send-circle-btn i {
    font-size: 13.5px !important;
    transform: translate(1px, -1px) !important;
  }

  body.chat-view-active .mobile-bottom-dock,
  body:has(#tab-post-signal.active) .mobile-bottom-dock,
  body:has(#tab-free-proofs.active) .mobile-bottom-dock {
    flex-shrink: 0 !important;
    height: 60px !important;
    min-height: 60px !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 990 !important;
    background: #080d14 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  .mobile-bottom-dock .dock-btn.center-action {
    top: 0 !important;
    position: relative !important;
  }

  .mobile-bottom-dock .dock-btn.center-action .center-icon-glow {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #00e676 !important;
    color: #070a11 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.4) !important;
  }

  .mobile-bottom-dock .dock-btn.center-action.active span {
    color: #00e676 !important;
    font-weight: 800 !important;
  }

  .mobile-bottom-dock .dock-btn.center-action.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: 2px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 38px !important;
    height: 2.5px !important;
    background: #00e676 !important;
    border-radius: 2px !important;
    box-shadow: 0 0 8px #00e676 !important;
  }

  /* Slide-up Bottom Sheet for VIP Trade Drawer on Mobile */
  .tg-trade-drawer {
    position: absolute !important;
    bottom: 58px !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 78% !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 100 !important;
    border-radius: 16px 16px 0 0 !important;
    border: 1.5px solid rgba(0, 230, 118, 0.4) !important;
    border-bottom: none !important;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.9) !important;
    background: #111d27 !important;
    padding: 14px 14px 18px 14px !important;
  }

  .drawer-inputs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .drawer-bottom-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .drawer-submit-btn {
    width: 100%;
    justify-content: center;
    height: 42px;
  }

  /* Photo Modal on Tablets/Mobiles */
  .tg-photo-modal {
    padding: 12px;
    z-index: 1000;
  }

  .tg-photo-card {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 600px) {
  .top-header {
    height: 56px;
    padding: 0 12px;
  }

  .market-clock-card {
    display: none;
  }

  .active-channel-card {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  /* High-Contrast, Touch-Friendly Mobile Hero Metrics */
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .metric-card {
    padding: 12px 14px;
    border-radius: 12px;
    flex-direction: column;
    gap: 6px;
    min-height: 106px;
    justify-content: space-between;
    background: rgba(18, 26, 44, 0.7);
  }

  .metric-icon-box {
    width: 34px;
    height: 34px;
    font-size: 15px;
    border-radius: 8px;
  }

  .metric-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--text-secondary);
    line-height: 1.3;
  }

  .metric-number-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 2px 0 0 0;
  }

  .metric-value {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
  }

  .metric-badge {
    font-size: 9.5px;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
  }

  .metric-hint {
    display: none;
  }

  /* Clean Touch Bank Distribution Cards */
  .bank-distribution-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .bank-card {
    padding: 12px 14px;
  }

  /* Mobile VIP Payment Queue Cards */
  .request-item-card {
    padding: 14px 12px;
    border-radius: 12px;
    gap: 10px;
  }

  .req-details-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .req-middle-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .target-bank-badge,
  .app-paid-badge {
    width: 100%;
    justify-content: flex-start;
    font-size: 10.5px;
  }

  .req-actions-row {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .req-actions-row button {
    width: 100%;
    justify-content: center;
    padding: 10px 12px;
  }

  /* Outgoing green bubble & images strict mobile clamping: ZERO CUT-OFF */
  .tg-bubble-outgoing-green {
    max-width: 82% !important;
    padding: 8px 12px !important;
    border-radius: 14px 14px 2px 14px !important;
  }

  .tg-outgoing-chart-img {
    max-height: 190px !important;
    object-fit: contain !important;
    background: rgba(0, 0, 0, 0.4) !important;
  }

  .tg-bubble-announcement {
    max-width: 86% !important;
    padding: 10px 12px !important;
  }

  .tg-vip-trade-card {
    padding: 12px 10px;
    gap: 8px;
  }

  .tg-levels-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }

  .tg-level-box {
    padding: 6px 3px !important;
    min-width: 0 !important;
  }

  .tg-level-label {
    font-size: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tg-level-val {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tg-instrument-text {
    font-size: 15px;
  }

  .tg-media-box {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tg-media-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  }

  .tg-media-play-btn i {
    margin-left: 2px;
  }

  .tg-footer-check {
    color: #00e676 !important;
    font-size: 11px;
  }

  .tg-header-action-btn span {
    display: none;
  }

  .tg-header-action-btn {
    padding: 6px 10px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .marquee-form {
    flex-direction: column;
  }
}
