/**
 * hub-ui.css - TGSBOR Dashboard Modern UI Engine (Glassmorphism 2.0 & Mobile Ergonomics)
 * Version 2.1
 */

/* ============================================================ */
/* DESIGN TOKENS & GLASSMORPHISM 2.0                            */
/* ============================================================ */
:root {
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(20px);
  --mobile-dock-height: 65px;
}

/* Glassmorphism Cards */
.card-glass {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.72) 0%, rgba(13, 18, 30, 0.82) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--card-radius, 14px);
  padding: 22px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-glass:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 36px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

/* ============================================================ */
/* MASTER-HUB SUB-TAB NAVIGATION BAR (Pill / Segmented Control) */
/* ============================================================ */
.hub-subnav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hub-subnav-bar::-webkit-scrollbar {
  display: none;
}
.hub-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}
.hub-subnav-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}
.hub-subnav-btn.active {
  color: #ffffff !important;
  background: rgba(47, 164, 124, 0.16) !important;
  border-color: rgba(47, 164, 124, 0.35) !important;
  box-shadow: 0 4px 14px rgba(47, 164, 124, 0.18) !important;
}
.hub-subnav-btn i {
  font-size: 13px;
}
.hub-subnav-badge {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-weight: 700;
}
.hub-subnav-btn.active .hub-subnav-badge {
  background: rgba(47, 164, 124, 0.25);
  color: #a8dcc7;
}
.hub-subnav-badge-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

/* Hub Subpanes */
.hub-subpane {
  display: none;
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.hub-subpane.active {
  display: block;
}

/* Messenger Session Status Bar & Group Badge */
.dm-session-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 11.5px;
  margin-top: 4px;
}
.dm-conn-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dm-conn-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 11.5px;
}
.dm-conn-status.status-connecting {
  color: #fbbf24;
}
.dm-conn-status.status-online {
  color: #22c55e;
}
.dm-conn-status.status-online i {
  font-size: 7px;
  color: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
  border-radius: 50%;
}
.dm-conn-status.status-offline {
  color: #f87171;
}
.dm-conn-ping {
  color: #94a3b8;
  font-size: 11px;
  font-family: monospace;
}
.dm-session-groups-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #c7d2fe;
  background: rgba(47, 164, 124, 0.12);
  border: 1px solid rgba(47, 164, 124, 0.28);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
}

/* Contextual mini toggles within tabs */
.hub-context-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  width: fit-content;
}

/* ============================================================ */
/* STAGE 5: SMART PRESET FILTERS (.acc-smart-filter-pills)      */
/* ============================================================ */
.acc-smart-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0;
}
.acc-smart-filter-pills::-webkit-scrollbar {
  display: none;
}
.acc-smart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.acc-smart-pill:hover {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}
.acc-smart-pill.active {
  color: #ffffff !important;
  background: rgba(47, 164, 124, 0.2) !important;
  border-color: rgba(47, 164, 124, 0.5) !important;
  box-shadow: 0 2px 10px rgba(47, 164, 124, 0.25) !important;
}
.acc-smart-pill.pill-alert.active {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
}
.acc-smart-pill.pill-quarantine.active {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25) !important;
  color: #fde68a !important;
}
.acc-smart-pill.pill-noproxy.active {
  background: rgba(47, 158, 140, 0.2) !important;
  border-color: rgba(47, 158, 140, 0.5) !important;
  box-shadow: 0 2px 10px rgba(47, 158, 140, 0.25) !important;
  color: #7dd3fc !important;
}
.acc-smart-pill.pill-warmer.active {
  background: rgba(249, 115, 22, 0.2) !important;
  border-color: rgba(249, 115, 22, 0.5) !important;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.25) !important;
  color: #fdba74 !important;
}
.acc-smart-pill.pill-ready.active {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25) !important;
  color: #6ee7b7 !important;
}

/* ============================================================ */
/* STAGE 5: FLOATING BULK ACTIONS DOCK (#floating-acc-dock)     */
/* ============================================================ */
#floating-acc-dock,
.floating-acc-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  opacity: 0;
  pointer-events: none;
  z-index: 9995;
  background: rgba(13, 18, 29, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 96vw;
}

#floating-acc-dock.dock-visible,
.floating-acc-dock.dock-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.dock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(47, 164, 124, 0.16);
  border: 1px solid rgba(47, 164, 124, 0.35);
  color: #a8dcc7;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.dock-badge strong {
  color: #fff;
  font-weight: 800;
}
.dock-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
}
.dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dock-actions::-webkit-scrollbar {
  display: none;
}
.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.dock-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.dock-btn:active {
  transform: translateY(1px);
}
.dock-btn.btn-spamblock {
  border-color: rgba(230, 191, 133, 0.35);
  background: rgba(230, 191, 133, 0.08);
  color: #e6bf85;
}
.dock-btn.btn-proxy {
  border-color: rgba(95, 174, 156, 0.35);
  background: rgba(95, 174, 156, 0.08);
  color: #6fbfae;
}
.dock-btn.btn-privacy {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  color: #34d399;
}
.dock-btn.btn-warmer {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
}
.dock-btn.btn-clear {
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}
.dock-btn.btn-export {
  border-color: rgba(95, 174, 156, 0.35);
  background: rgba(95, 174, 156, 0.08);
  color: #5fae9c;
}
.dock-btn.btn-export:hover {
  background: rgba(95, 174, 156, 0.18);
  border-color: rgba(95, 174, 156, 0.55);
  color: #a8dcc7;
}
.dock-btn.btn-trash {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}

.dock-dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background: #0d1217;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  min-width: 150px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dock-menu-item {
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dock-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ============================================================ */
/* STAGE 5: SMART ACCORDIONS IN SETTINGS (.glass-accordion)     */
/* ============================================================ */
.glass-accordion {
  margin-top: 14px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-accordion:hover {
  border-color: rgba(255, 255, 255, 0.15);
}
.glass-accordion[open] {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(47, 164, 124, 0.32);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.glass-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.2s ease, background 0.2s ease;
}
.glass-accordion-summary::-webkit-details-marker {
  display: none;
}
.glass-accordion-summary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}
.glass-accordion-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-accordion[open] .glass-accordion-chevron {
  transform: rotate(180deg);
  color: #818cf8;
}
.glass-accordion-content {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  animation: fadeIn 0.2s ease;
}

/* ============================================================ */
/* STAGE 6: HEADER CORE ACTIVITY MONITOR                        */
/* ============================================================ */
.header-activity-monitor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.hdr-act-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  font-size: 11.5px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.hdr-act-pill:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(47, 164, 124, 0.4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.act-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: actPulse 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes actPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hdr-act-title {
  font-weight: 600;
  color: #f1f5f9;
}
.hdr-act-sep {
  color: rgba(255, 255, 255, 0.15);
}
.hdr-act-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hdr-act-stat strong {
  color: #fff;
  font-weight: 700;
}
.hdr-act-chevron {
  font-size: 9px;
  color: #94a3b8;
  margin-left: 2px;
  transition: transform 0.2s ease;
}
.hdr-act-pill.open .hdr-act-chevron {
  transform: rotate(180deg);
}
.hdr-act-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: rgba(13, 18, 29, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 10px;
  z-index: 10001;
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.act-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}
.act-popover-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.act-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.act-popover-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.act-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.act-item-info {
  flex: 1;
  min-width: 0;
}
.act-item-name {
  font-size: 12px;
  font-weight: 600;
  color: #f1f5f9;
}
.act-item-status {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}
.act-item-arrow {
  font-size: 10px;
  color: #64748b;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.18s ease;
}
.act-popover-item:hover .act-item-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #a8dcc7;
}

/* ============================================================ */
/* DESKTOP ACCOUNTS TABLE (Default & min-width: 769px)          */
/* ============================================================ */
.acc-table-card {
  background: #090e13 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 18px !important;
  overflow-x: auto !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

#accounts-table {
  display: table !important;
  width: 100% !important;
  min-width: 1200px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
}

#accounts-table thead {
  display: table-header-group !important;
}

#accounts-table thead tr {
  display: table-row !important;
  background: rgba(15, 23, 42, 0.5) !important;
}

#accounts-table thead th {
  display: table-cell !important;
  vertical-align: middle !important;
  padding: 13px 14px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #64748b !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-sizing: border-box !important;
  user-select: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 5 !important;
  background: #090e13 !important;
}

#accounts-table tbody {
  display: table-row-group !important;
}

#accounts-table tr.acc-table-row,
#accounts-table tbody tr {
  display: table-row !important;
  background: transparent;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#accounts-table tr.acc-table-row:hover,
#accounts-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.035) !important;
}

#accounts-table tr.acc-table-row.row-selected,
#accounts-table tbody tr.row-selected {
  background-color: rgba(16, 185, 129, 0.12) !important;
}

#accounts-table tr.acc-table-row.row-selected:hover,
#accounts-table tbody tr.row-selected:hover {
  background-color: rgba(16, 185, 129, 0.18) !important;
}

#accounts-table td,
#accounts-table tbody td {
  display: table-cell !important;
  vertical-align: middle !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
  border-top: none !important;
  box-sizing: border-box !important;
  position: static !important;
}

#accounts-table tbody tr:last-child td {
  border-bottom: none !important;
}

/* DESKTOP COLUMN WIDTHS & ALIGNMENT */
/* 1. Checkbox: width: 44px; text-align: center; */
#accounts-table th:nth-child(1),
#accounts-table td:nth-child(1),
#accounts-table th.acc-chk-th,
#accounts-table td.acc-chk-cell {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  text-align: center !important;
  padding: 0 !important;
  position: relative !important;
}

/* 2. Number (#): width: 40px; text-align: center; */
#accounts-table th:nth-child(2),
#accounts-table td:nth-child(2) {
  display: table-cell !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  text-align: center !important;
  padding: 10px 4px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* 3. Phone (ТЕЛЕФОН): min-width: 230px; */
#accounts-table th:nth-child(3),
#accounts-table td:nth-child(3) {
  min-width: 230px !important;
  text-align: left !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* 4. Name (ИМЯ): min-width: 160px; */
#accounts-table th:nth-child(4),
#accounts-table td:nth-child(4) {
  min-width: 160px !important;
  text-align: left !important;
  padding: 10px 14px !important;
}

/* 5. Proxy / IP (ПРОКСИ / IP): min-width: 200px; */
#accounts-table th:nth-child(5),
#accounts-table td:nth-child(5) {
  min-width: 200px !important;
  text-align: left !important;
  padding: 10px 14px !important;
}

/* 6. Status (СТАТУС): min-width: 170px; */
#accounts-table th:nth-child(6),
#accounts-table td:nth-child(6) {
  min-width: 170px !important;
  text-align: left !important;
  padding: 10px 14px !important;
}

/* 7. Age (ОТЛЕЖКА): width: 95px; text-align: center; */
#accounts-table th:nth-child(7),
#accounts-table td:nth-child(7) {
  width: 95px !important;
  text-align: center !important;
  padding: 10px 8px !important;
  font-size: 12px !important;
  color: #94a3b8 !important;
  white-space: nowrap !important;
}
#accounts-table td:nth-child(7)::before {
  display: none !important;
  content: none !important;
}

/* 8. Role (РОЛЬ): width: 105px; text-align: center; */
#accounts-table th:nth-child(8),
#accounts-table td:nth-child(8) {
  width: 105px !important;
  text-align: center !important;
  padding: 10px 8px !important;
}

/* 9. Misc (РАЗНОЕ / ДЕЙСТВИЯ): width: 205px; text-align: right; */
#accounts-table th:nth-child(9),
#accounts-table td:nth-child(9) {
  width: 205px !important;
  min-width: 205px !important;
  text-align: right !important;
  padding: 10px 22px 10px 8px !important;
  border-top: none !important;
  white-space: nowrap !important;
}
#accounts-table td:nth-child(9) .acc-misc-icons {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 7px !important;
  white-space: nowrap !important;
  width: auto !important;
}

/* ============================================================ */
/* MOBILE ERGONOMICS (max-width: 768px)                         */
/* ============================================================ */
@media screen and (max-width: 768px) {
  /* 1. Accounts Table Responsive Horizontal Scroll (Preserves columns & headers) */
  .acc-table-card {
    background: #090e13 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    margin-bottom: 12px !important;
  }
  #accounts-table {
    display: table !important;
    width: 1200px !important;
    min-width: 1200px !important;
    table-layout: fixed !important;
  }
  #accounts-table thead {
    display: table-header-group !important;
  }
  #accounts-table tbody {
    display: table-row-group !important;
  }
  #accounts-table tr.acc-table-row {
    display: table-row !important;
  }
  #accounts-table tr.acc-table-row > td {
    display: table-cell !important;
    vertical-align: middle !important;
  }

  /* 2. Modals Bottom-Sheet Mobile Ergonomics */
  .modal-bg {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100005 !important;
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    background: rgba(4, 7, 13, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }
  .modal, .modal-session-card, .modal-assign-proxy {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(88vh - env(safe-area-inset-top, 0px)) !important;
    max-height: calc(88dvh - env(safe-area-inset-top, 0px)) !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-bottom: none !important;
    transform: translateY(0) !important;
    animation: mobileSheetUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.9) !important;
    position: relative !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .modal::before, .modal-session-card::before, .modal-assign-proxy::before {
    content: '';
    display: block;
    width: 44px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin: 0 auto 14px auto;
  }
  .modal-actions,
  .modal > div:last-child:has(button) {
    position: sticky;
    bottom: -10px;
    background: inherit;
    padding-top: 10px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    margin-top: 16px;
    z-index: 5;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* 3. Floating Bulk Action Dock on Mobile */
  #floating-acc-dock,
  .floating-acc-dock {
    bottom: calc(var(--mobile-dock-height, 65px) + 14px + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100% - 24px) !important;
    left: 12px !important;
    right: 12px !important;
    transform: translateY(120%) !important;
    padding: 7px 12px !important;
    gap: 8px !important;
  }
  #floating-acc-dock.dock-visible,
  .floating-acc-dock.dock-visible {
    transform: translateY(0) !important;
  }
  .dock-btn {
    padding: 6px 10px !important;
    font-size: 11.5px !important;
  }
  .dock-btn span {
    display: none;
  }
  .dock-btn.btn-clear span {
    display: inline;
  }

  /* 4. Header Activity Monitor Mobile Responsive */
  .hdr-act-label {
    display: none;
  }
  .hdr-act-pill {
    padding: 4px 8px;
    font-size: 11px;
    gap: 6px;
  }
}

/* ============================================================ */
/* CYBERPUNK HUD DATACENTER CORE VISUALIZER (Sci-Fi Matrix)    */
/* ============================================================ */
.cyber-hud-card {
  position: relative;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.11) 0%, rgba(10, 15, 28, 0.96) 80%);
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 30px rgba(6, 182, 212, 0.15);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'JetBrains Mono', 'Fira Code', monospace;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cyber-hud-card.collapsed .cyber-hud-body {
  display: none !important;
}
.cyber-hud-card.fullscreen {
  position: fixed !important;
  inset: 12px !important;
  z-index: 99999 !important;
  margin: 0 !important;
  max-height: calc(100vh - 24px) !important;
  overflow-y: auto !important;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.15) 0%, rgba(5, 8, 16, 0.98) 85%) !important;
}
.cyber-hud-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}
.cyber-hud-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.18);
  flex-wrap: wrap;
  gap: 10px;
}
.cyber-hud-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: #6fbfae;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(95, 174, 156, 0.5);
}
.cyber-hud-title i {
  color: #06b6d4;
  animation: corePulse 2s ease-in-out infinite;
}
@keyframes corePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px #06b6d4); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 12px #00f0ff); }
}
.cyber-hud-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #6fbfae;
}
.cyber-badge.green {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.cyber-badge.pulse .cyber-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: dotBlink 1.5s infinite;
}
@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.cyber-ctrl-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cyber-ctrl-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #6fbfae;
}
.cyber-ctrl-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
}

.cyber-hud-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 2. TOP DECK: 4 MINI SCOPES */
.cyber-top-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 1000px) {
  .cyber-top-deck {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 550px) {
  .cyber-top-deck {
    grid-template-columns: 1fr;
  }
}
.cyber-scope-card {
  background: rgba(5, 10, 20, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.6);
}
.cyber-scope-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.cyber-tag {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 8.5px;
  font-weight: 800;
}
.cyber-tag.red {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.cyber-tag.cyan {
  background: rgba(6, 182, 212, 0.18);
  color: #6fbfae;
  border: 1px solid rgba(6, 182, 212, 0.35);
}
.cyber-tag.amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.cyber-tag.purple {
  background: rgba(63, 191, 146, 0.18);
  color: #e0b06a;
  border: 1px solid rgba(63, 191, 146, 0.35);
}
.cyber-scope-canvas {
  width: 100%;
  height: 48px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(6, 182, 212, 0.1);
  display: block;
}

/* 3. CENTER STAGE */
.cyber-hud-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1150px) {
  .cyber-hud-body {
    grid-template-columns: 1fr;
  }
}

.cyber-panel-box {
  background: rgba(8, 14, 26, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.16);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.cyber-panel-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cyber-blink {
  animation: cyberBlink 1.2s infinite;
}
@keyframes cyberBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* VU Meters */
.cyber-vu-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(6, 182, 212, 0.12);
  border-radius: 8px;
}
.cyber-vu-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cyber-vu-label {
  font-size: 8px;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.cyber-vu-bar {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
  height: 48px;
  width: 18px;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.cyber-vu-seg {
  height: 2px;
  width: 100%;
  background: #1e293b;
  border-radius: 1px;
  transition: all 0.1s;
}
.cyber-vu-seg.lit-g {
  background: #10b981;
  box-shadow: 0 0 4px #10b981;
}
.cyber-vu-seg.lit-y {
  background: #f59e0b;
  box-shadow: 0 0 4px #f59e0b;
}
.cyber-vu-seg.lit-r {
  background: #ef4444;
  box-shadow: 0 0 4px #ef4444;
}
.cyber-vu-val {
  font-size: 9.5px;
  font-weight: 800;
  color: #00f0ff;
}

.cyber-dial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}
.cyber-dial-metric {
  font-size: 18px;
  font-weight: 800;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
  letter-spacing: -0.5px;
}
.cyber-dial-label {
  font-size: 10.5px;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 1px;
}

.cyber-hex-dump {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  line-height: 1.45;
  color: #6fbfae;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  height: 64px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.cyber-events-stream {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  line-height: 1.45;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  height: 70px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
}
.cyber-stream-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cyber-stream-line .ts {
  color: #00f0ff;
  font-weight: 700;
}

/* Center Core Viewport */
.cyber-center-viewport {
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 60%, rgba(6, 182, 212, 0.12) 0%, rgba(3, 7, 18, 0.95) 85%);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 14px;
  padding: 8px;
  box-shadow: inset 0 0 40px rgba(6, 182, 212, 0.08);
  overflow: hidden;
}
.cyber-core-header-overlay {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: rgba(95, 174, 156, 0.7);
  letter-spacing: 0.8px;
  pointer-events: none;
  z-index: 5;
}
.cyber-core-footer-overlay {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8.5px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(100, 116, 139, 0.7);
  pointer-events: none;
  z-index: 5;
}
#cyber-core-canvas {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: block;
  cursor: crosshair;
}

/* 12-Slot Rack Matrix */
.cyber-rack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.cyber-rack-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  color: #94a3b8;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cyber-rack-slot.active {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
}
.cyber-rack-slot.quarantine {
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.08);
  color: #facc15;
}
.cyber-rack-slot.banned {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}
.cyber-rack-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
  box-shadow: none;
}
.cyber-rack-slot.active .cyber-rack-led {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.cyber-rack-slot.quarantine .cyber-rack-led {
  background: #eab308;
  box-shadow: 0 0 6px #eab308;
}
.cyber-rack-slot.banned .cyber-rack-led {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

/* 4. BOTTOM DECK */
.cyber-bottom-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1000px) {
  .cyber-bottom-deck {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 550px) {
  .cyber-bottom-deck {
    grid-template-columns: 1fr;
  }
}
.cyber-instr-box {
  background: rgba(8, 14, 26, 0.75);
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.5);
}
.cyber-instr-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
}
.cyber-instr-canvas {
  width: 100%;
  height: 75px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(6, 182, 212, 0.15);
  display: block;
}
