/* ==========================================================================
   AETHERTRADE: BESPOKE OBSIDIAN & GOLD FOREX HUD TERMINAL (STYLES.CSS)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
  /* Bespoke Luxury Color Scheme (Gold, Emerald, Crimson & Platinum) */
  --bg-main: #05060b;
  --bg-sidebar: rgba(3, 4, 8, 0.85);
  --bg-card: rgba(8, 11, 20, 0.45);
  --bg-card-hover: rgba(12, 17, 30, 0.65);
  --bg-input: rgba(2, 3, 6, 0.95);
  
  --border-color: rgba(255, 255, 255, 0.03);
  --border-card: rgba(255, 255, 255, 0.03);
  --border-card-hover: rgba(194, 155, 71, 0.25);
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #64748b;
  --text-muted: #334155;
  
  /* Luxury HUD Accents */
  --color-gold: #c29b47;
  --color-gold-rgb: 194, 155, 71;
  --color-emerald: #00e676;
  --color-rose: #ff1744;
  --color-amber: #f59e0b;
  
  /* Muted Mapped Glows */
  --glow-emerald: 0 0 15px rgba(0, 230, 118, 0.25);
  --glow-rose: 0 0 15px rgba(255, 23, 68, 0.25);
  --glow-gold: 0 0 15px rgba(194, 155, 71, 0.25);
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Space Grotesk', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --border-radius: 12px;
}

/* Global Reset & Dot Grid Background */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-main);
  background-image: radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 0);
  background-size: 24px 24px;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Premium retro-futuristic scanlines */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.01), rgba(0, 255, 0, 0.005), rgba(0, 0, 255, 0.01));
  background-size: 100% 4px, 6px 100%;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.18;
}

/* Drifting gold/emerald nebulae */
body::after {
  content: '';
  position: fixed;
  top: -20%;
  left: 10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 155, 71, 0.05) 0%, rgba(0,0,0,0) 70%);
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  animation: nebulaDrift1 30s infinite alternate ease-in-out;
}

.ambient-glow-green {
  position: fixed;
  bottom: -20%;
  right: 10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.035) 0%, rgba(0,0,0,0) 70%);
  filter: blur(130px);
  z-index: -1;
  pointer-events: none;
  animation: nebulaDrift2 25s infinite alternate ease-in-out;
}

@keyframes nebulaDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, -50px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes nebulaDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, 60px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(4, 6, 14, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
  box-shadow: var(--glow-gold);
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.view-panel {
  display: none;
}

.view-panel.active-view {
  display: block;
}

/* ==========================================
   TRUE LIQUID-GLASS HUD CARDS WITH TARGET BRACKETS
   ========================================== */
.glass-effect {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--border-radius);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.015), 0 16px 40px rgba(0, 0, 0, 0.65);
  position: relative;
  transition: var(--transition-normal);
}

.glass-effect::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid rgba(var(--color-gold-rgb), 0.5);
  border-left: 1.5px solid rgba(var(--color-gold-rgb), 0.5);
  border-top-left-radius: 4px;
  pointer-events: none;
  transition: var(--transition-fast);
}

.glass-effect::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 1.5px solid rgba(var(--color-gold-rgb), 0.5);
  border-right: 1.5px solid rgba(var(--color-gold-rgb), 0.5);
  border-bottom-right-radius: 4px;
  pointer-events: none;
  transition: var(--transition-fast);
}

.glass-effect:hover {
  border-color: var(--border-card-hover);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.03), 0 16px 40px rgba(194, 155, 71, 0.03), 0 0 15px rgba(194, 155, 71, 0.02);
}

.glass-effect:hover::before {
  border-color: var(--color-gold);
  width: 14px;
  height: 14px;
}

.glass-effect:hover::after {
  border-color: var(--color-gold);
  width: 14px;
  height: 14px;
}

/* ==========================================
   BESPOKE NARROW SIDEBAR ICON DOCK
   ========================================== */
.sidebar {
  width: 80px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(40px);
  z-index: 100;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--color-gold) 0%, #1a2233 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-gold);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  fill: #05060b;
}

.logo-text {
  display: none;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  position: relative;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  stroke-width: 2.2;
  fill: none;
  transition: var(--transition-fast);
}

.nav-item span {
  display: none;
}

.nav-item .tooltip {
  position: absolute;
  left: 64px;
  background: rgba(4, 6, 12, 0.95);
  border: 1px solid rgba(194, 155, 71, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  z-index: 50;
}

.nav-item:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}

.nav-item:hover svg {
  stroke: var(--color-gold);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(194, 155, 71, 0.12) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(194, 155, 71, 0.22);
}

.nav-item.active svg {
  stroke: var(--color-gold);
  filter: drop-shadow(0 0 4px var(--color-gold));
}

.nav-item.active::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--color-gold);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 0 8px var(--color-gold);
}

.sidebar-footer {
  border-top: none;
  padding-top: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-gold) 0%, #1a2233 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: #020308;
  border: 1px solid var(--color-gold);
  box-shadow: var(--glow-gold);
}

.user-info {
  display: none;
}

/* ==========================================
   MAIN TERMINAL PANEL LAYOUT
   ========================================== */
.main-wrapper {
  margin-left: 80px;
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 40px;
  gap: 32px;
  max-width: calc(100% - 80px);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  gap: 20px;
}

.ticker-tape {
  display: flex;
  gap: 16px;
  overflow: hidden;
  flex-grow: 1;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(3, 5, 10, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
  transition: var(--transition-fast);
}

.ticker-name {
  font-weight: 700;
  color: var(--text-primary);
}

.ticker-price {
  color: var(--text-secondary);
}

.ticker-change.up {
  color: var(--color-emerald);
  text-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.ticker-change.down {
  color: var(--color-rose);
  text-shadow: 0 0 15px rgba(255, 23, 68, 0.2);
}

/* Premium Gold buttons */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  font-family: var(--font-display);
}

.btn-primary {
  background: var(--color-gold);
  color: #05060b;
  font-weight: 800;
  box-shadow: var(--glow-gold);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #d4ae55;
  box-shadow: 0 0 25px rgba(194, 155, 71, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(194, 155, 71, 0.4);
}

.btn-danger {
  background: rgba(255, 23, 68, 0.06);
  border: 1px solid rgba(255, 23, 68, 0.2);
  color: var(--color-rose);
}

.btn-danger:hover {
  background: rgba(255, 23, 68, 0.12);
  box-shadow: var(--glow-rose);
}

/* ==========================================
   MULTI-ACCOUNT PORTFOLIOS INTERFACE
   ========================================== */
.account-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 250px;
  backdrop-filter: blur(35px) saturate(200%);
  background: rgba(4, 6, 12, 0.95);
  border: 1px solid rgba(194, 155, 71, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 150;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-dropdown-menu.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.dropdown-account-item:hover {
  background: rgba(194, 155, 71, 0.08);
  border-color: rgba(194, 155, 71, 0.15);
}

.dropdown-account-item.active {
  background: rgba(194, 155, 71, 0.12);
  border-color: rgba(194, 155, 71, 0.3);
}

.dropdown-acc-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.dropdown-acc-bal {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-gold);
  font-weight: 700;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.04);
  margin: 6px 0;
}

.dropdown-action-btn {
  background: none;
  border: none;
  width: 100%;
  padding: 8px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gold);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-fast);
  border: 1px dashed rgba(194, 155, 71, 0.3);
}

.dropdown-action-btn:hover {
  background: rgba(194, 155, 71, 0.1);
  border-color: var(--color-gold);
}

/* Accounts Manager Center Modal */
.accounts-modal-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 480px;
  max-width: 95%;
  z-index: 220;
  padding: 28px 32px;
  display: none;
  opacity: 0;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 20px 60px rgba(0,0,0,0.8);
}

.accounts-modal-card.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.accounts-modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.accounts-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 6px;
}

.account-hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(3, 5, 10, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.account-hud-row.active {
  border-color: rgba(194, 155, 71, 0.3);
  background: rgba(194, 155, 71, 0.03);
}

.account-hud-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-hud-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.acc-hud-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.account-hud-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acc-hud-bal {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-gold);
  font-size: 13px;
}

.btn-delete-account {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-delete-account svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-rose);
  stroke-width: 2.2;
}

.btn-delete-account:hover {
  transform: scale(1.1);
}

/* ==========================================
   KPI BLOCKS & GRID INDICATORS
   ========================================== */
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.kpi-card {
  padding: 20px 24px;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
  opacity: 0.4;
}

.kpi-card.green::before { background: var(--color-emerald); }
.kpi-card.red::before { background: var(--color-rose); }

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}

.kpi-subtext {
  font-size: 12px;
  font-weight: 600;
}

.kpi-subtext.up { color: var(--color-emerald); }
.kpi-subtext.down { color: var(--color-rose); }

/* Charts Layout splits */
.charts-grid {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 24px 28px;
  height: 420px;
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 14px;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-title svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-gold);
}

.chart-legend {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.chart-wrapper {
  position: relative;
  flex-grow: 1;
  height: calc(100% - 50px);
}

/* Win Rate Circular progress */
.winrate-dial-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.circular-progress {
  position: relative;
  width: 140px;
  height: 140px;
}

.circular-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circular-bg {
  stroke: rgba(255, 255, 255, 0.01);
}

.circular-value-path {
  stroke: var(--color-gold);
  stroke-dasharray: 408; /* 2 * PI * 65 */
  stroke-dashoffset: 408;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 5px var(--color-gold));
}

.circular-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
}

/* ==========================================
   DAILY DISCIPLINE COMPLIANCE MATRIX (DASHBOARD CHECKLIST)
   ========================================== */
.rules-checklist-card {
  padding: 24px 28px;
}

.checklist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(3, 5, 10, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition-fast);
}

.checklist-item:hover {
  border-color: rgba(194, 155, 71, 0.2);
  background: rgba(255, 255, 255, 0.01);
}

.checklist-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  user-select: none;
}

.custom-checkbox {
  width: 32px;
  height: 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: rgba(3, 5, 10, 0.9);
  position: relative;
  display: block;
  transition: var(--transition-fast);
}

.custom-checkbox::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: var(--transition-fast);
}

input[type="checkbox"]:checked + .custom-checkbox {
  background: rgba(0, 230, 118, 0.1);
  border-color: var(--color-emerald);
}

input[type="checkbox"]:checked + .custom-checkbox::after {
  left: 17px;
  background: var(--color-emerald);
  box-shadow: var(--glow-emerald);
}

input[type="checkbox"]:checked ~ span {
  color: var(--text-secondary);
  text-decoration: line-through;
  opacity: 0.45;
  filter: blur(0.2px);
}

.checklist-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.checklist-item:hover .checklist-delete-btn { opacity: 0.6; }
.checklist-delete-btn:hover { opacity: 1 !important; }
.checklist-delete-btn svg { width: 14px; height: 14px; stroke: var(--color-rose); }

.checklist-add-form {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.03);
  padding-top: 18px;
}

.checklist-add-input {
  flex-grow: 1;
}

/* ==========================================
   JOURNAL & LOGS TAB OVERHAUL
   ========================================== */
.journal-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-select, .form-input-basic {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
  transition: var(--transition-fast);
}

.form-select:focus, .form-input-basic:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(194, 155, 71, 0.2);
}

/* Dynamic floating trades rows cards */
.trades-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trade-row-card {
  padding: 18px 24px;
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
  border-left: 2px solid transparent;
}

.trade-row-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(194, 155, 71, 0.15);
  transform: translateY(-1px);
}

.trade-row-card.expanded {
  border-color: var(--color-gold);
  box-shadow: 0 4px 20px rgba(194, 155, 71, 0.03);
}

.trade-row-header {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 1.2fr 1.2fr 1.2fr 1.2fr 1fr auto;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 950px) {
  .trade-row-header {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    row-gap: 10px;
  }
}

.trade-direction-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.trade-direction-pill.long {
  background: rgba(0, 230, 118, 0.05);
  color: var(--color-emerald);
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.trade-direction-pill.short {
  background: rgba(255, 23, 68, 0.05);
  color: var(--color-rose);
  border: 1px solid rgba(255, 23, 68, 0.15);
}

.trade-ticker {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.trade-date {
  color: var(--text-secondary);
  font-size: 11px;
}

.trade-pnl.win { color: var(--color-emerald); }
.trade-pnl.loss { color: var(--color-rose); }

.trade-badge {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.trade-row-expanded {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.trade-row-card.expanded .trade-row-expanded { display: block; }

.expanded-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.expanded-info-box {
  background: rgba(3, 5, 10, 0.4);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: 8px;
}

.expanded-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.expanded-value {
  font-size: 13.5px;
  font-weight: 600;
}

.pnl-pill {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.pnl-pill.tag-strategy {
  background: rgba(194, 155, 71, 0.06);
  border-color: rgba(194, 155, 71, 0.15);
  color: var(--color-gold);
}

.pnl-pill.tag-mistake {
  background: rgba(255, 23, 68, 0.06);
  border-color: rgba(255, 23, 68, 0.15);
  color: var(--color-rose);
}

.pnl-pill.tag-emotion {
  background: rgba(157, 78, 221, 0.06);
  border-color: rgba(157, 78, 221, 0.15);
  color: var(--color-purple);
}

.pnl-pill.tag-confluence {
  background: rgba(0, 230, 118, 0.06);
  border-color: rgba(0, 230, 118, 0.15);
  color: var(--color-emerald);
}

.expanded-notes {
  grid-column: 1 / -1;
  background: rgba(3, 5, 10, 0.5);
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.04);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.trade-card-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ==========================================
   MONTHLY HEATMAP CALENDAR
   ========================================== */
.calendar-card {
  padding: 24px 28px;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-month-year {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #fff, var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 10px 0;
  text-transform: uppercase;
}

.calendar-cell {
  aspect-ratio: 1.25;
  background: rgba(3, 5, 10, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-fast);
}

.calendar-cell:hover {
  border-color: rgba(194, 155, 71, 0.3);
  transform: translateY(-1px);
}

.calendar-day-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.calendar-cell.active-month .calendar-day-num { color: var(--text-primary); }
.calendar-day-pnl { font-size: 12px; font-family: var(--font-mono); text-align: right; }

.calendar-cell.profit-light { background: rgba(0, 230, 118, 0.05); border-color: rgba(0, 230, 118, 0.15); }
.calendar-cell.profit-light .calendar-day-pnl { color: var(--color-emerald); }

.calendar-cell.profit-med { background: rgba(0, 230, 118, 0.15); border-color: rgba(0, 230, 118, 0.3); }
.calendar-cell.profit-med .calendar-day-pnl { color: var(--text-primary); }

.calendar-cell.profit-heavy {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.35) 0%, rgba(194, 155, 71, 0.15) 100%);
  border-color: rgba(0, 230, 118, 0.5);
}
.calendar-cell.profit-heavy .calendar-day-pnl { color: var(--text-primary); }

.calendar-cell.loss-light { background: rgba(255, 23, 68, 0.05); border-color: rgba(255, 23, 68, 0.15); }
.calendar-cell.loss-light .calendar-day-pnl { color: var(--color-rose); }

.calendar-cell.loss-med { background: rgba(255, 23, 68, 0.15); border-color: rgba(255, 23, 68, 0.3); }
.calendar-cell.loss-med .calendar-day-pnl { color: var(--text-primary); }

.calendar-cell.loss-heavy {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.35) 0%, rgba(194, 155, 71, 0.15) 100%);
  border-color: rgba(255, 23, 68, 0.5);
}
.calendar-cell.loss-heavy .calendar-day-pnl { color: var(--text-primary); }

.calendar-cell-empty { aspect-ratio: 1.25; visibility: hidden; }

.calendar-day-detail {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================
   RISK & SIMULATION HUD PANELS
   ========================================== */
.risk-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.8fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .risk-grid { grid-template-columns: 1fr; }
}

.calc-card { padding: 28px; }
.calc-grid { display: flex; flex-direction: column; gap: 20px; }
.calc-row { display: flex; flex-direction: column; gap: 6px; }
.calc-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }

.calc-input-wrap { position: relative; display: flex; align-items: center; }
.calc-input-addon { position: absolute; left: 14px; font-size: 13px; color: var(--text-secondary); font-family: var(--font-mono); }

.calc-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 12px 14px 12px 32px;
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 600;
  outline: none;
  transition: var(--transition-fast);
}

.calc-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(194, 155, 71, 0.2);
}

.calc-results {
  margin-top: 10px;
  background: rgba(194, 155, 71, 0.01);
  border: 1px solid rgba(194, 155, 71, 0.08);
  padding: 20px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-result-title { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
.calc-result-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-gold);
  margin-top: 4px;
  text-shadow: 0 0 10px rgba(194, 155, 71, 0.1);
}

/* Monte Carlo details */
.mc-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

@media (max-width: 650px) {
  .mc-summary-stats { grid-template-columns: 1fr 1fr; }
}

.mc-stat-box {
  background: rgba(3, 5, 10, 0.4);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: 8px;
  text-align: center;
}

.mc-stat-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; }
.mc-stat-val { font-size: 15px; font-weight: 700; font-family: var(--font-mono); margin-top: 4px; }
.mc-stat-val.profit { color: var(--color-emerald); }
.mc-stat-val.danger { color: var(--color-rose); }

/* ==========================================
   MIND & STRATEGY PANEL OVERHAUL
   ========================================== */
.mind-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .mind-grid { grid-template-columns: 1fr; }
}

.mistake-list-card { padding: 28px; }
.mistakes-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.mistakes-table th { text-align: left; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.mistakes-table td { padding: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-size: 13px; }
.mistakes-table tr:last-child td { border-bottom: none; }
.mistake-name { font-weight: 700; color: var(--text-primary); }
.mistake-count { font-family: var(--font-mono); color: var(--text-secondary); }
.mistake-impact { font-family: var(--font-mono); font-weight: 700; color: var(--color-rose); }

/* ==========================================
   FOREX ORDER TICKET DRAWER & BID/ASK PANELS
   ========================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(1, 2, 4, 0.9);
  backdrop-filter: blur(16px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: -550px;
  width: 530px;
  height: 100vh;
  background: var(--bg-main);
  background-image: radial-gradient(circle at 100% 0%, #0c1221 0%, #05060b 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: -15px 0 60px rgba(0, 0, 0, 0.9);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transition: right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 600px) {
  .drawer { width: 100%; right: -100%; }
}

.drawer.active { right: 0; }

.drawer-header {
  padding: 28px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #fff, var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title svg { width: 20px; height: 20px; stroke: var(--color-gold); }
.drawer-close svg { width: 24px; height: 24px; stroke: var(--text-secondary); transition: var(--transition-fast); }
.drawer-close:hover svg { stroke: var(--color-rose); transform: rotate(90deg); }

.drawer-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Luxury Interactive Bid/Ask pricing panel ticks */
.hud-bid-ask-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hud-price-box {
  background: rgba(3, 5, 10, 0.6);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.hud-price-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  opacity: 0.3;
}

.hud-price-box.sell-box::before { background: var(--color-rose); }
.hud-price-box.buy-box::before { background: var(--color-emerald); }

.hud-price-box.active {
  background: rgba(255, 255, 255, 0.01);
}

.hud-price-box.sell-box.active {
  border-color: var(--color-rose);
  box-shadow: var(--glow-rose);
}

.hud-price-box.buy-box.active {
  border-color: var(--color-emerald);
  box-shadow: var(--glow-emerald);
}

.hud-price-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hud-price-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  color: #fff;
}

.hud-price-box.sell-box .hud-price-val { color: var(--color-rose); }
.hud-price-box.buy-box .hud-price-val { color: var(--color-emerald); }

.direction-toggle { display: none; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }

.drawer-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  outline: none;
  transition: var(--transition-fast);
}

.drawer-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(194, 155, 71, 0.2);
}

.input-addon-group { position: relative; display: flex; align-items: center; }
.input-addon-symbol { position: absolute; left: 12px; font-size: 13px; color: var(--text-secondary); font-family: var(--font-mono); }
.drawer-input.addon-padded { padding-left: 28px; }

/* confluences compliance matrix */
.confluence-checklist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  background: rgba(3, 5, 10, 0.5);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: 8px;
}

.confluence-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.confluence-item .custom-checkbox {
  width: 28px;
  height: 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: rgba(3, 5, 10, 0.9);
  position: relative;
  transition: var(--transition-fast);
}

.confluence-item .custom-checkbox::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: var(--transition-fast);
}

.confluence-item input[type="checkbox"]:checked + .custom-checkbox {
  background: rgba(0, 230, 118, 0.1);
  border-color: var(--color-emerald);
}

.confluence-item input[type="checkbox"]:checked + .custom-checkbox::after {
  left: 14px;
  background: var(--color-emerald);
  box-shadow: var(--glow-emerald);
}

.confluence-item input[type="checkbox"]:checked ~ span {
  color: var(--text-primary);
  opacity: 1;
}

/* Live Pip Preview drawer */
.drawer-live-math {
  background: rgba(194, 155, 71, 0.015);
  border: 1px solid rgba(194, 155, 71, 0.1);
  padding: 14px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-math-title { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }
.live-math-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-gold);
  text-shadow: 0 0 10px rgba(194, 155, 71, 0.15);
}

/* Strategic selection pills */
.pill-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.selectable-pill {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-secondary);
}

.selectable-pill:hover { border-color: var(--text-secondary); color: var(--text-primary); }

.selectable-pill.selected.pill-strategy {
  background: rgba(194, 155, 71, 0.08);
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: var(--glow-gold);
}

.selectable-pill.selected.pill-mistake {
  background: rgba(255, 23, 68, 0.08);
  border-color: var(--color-rose);
  color: var(--color-rose);
  box-shadow: var(--glow-rose);
}

/* Emotion radio selectors */
.emotion-selector { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.emotion-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.emotion-card:hover { background: rgba(255, 255, 255, 0.03); }
.emotion-emoji { font-size: 18px; }
.emotion-name { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); }

.emotion-card.selected {
  background: rgba(157, 78, 221, 0.1);
  border-color: var(--color-purple);
  box-shadow: var(--glow-purple);
}
.emotion-card.selected .emotion-name { color: var(--color-purple); }

.drawer-footer {
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

/* ==========================================
   UTILITY & ANIMATIONS DEFINITIONS
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.empty-state { text-align: center; padding: 48px; color: var(--text-secondary); }
.empty-state svg { width: 44px; height: 44px; stroke: var(--text-secondary); margin-bottom: 16px; opacity: 0.3; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; max-width: 320px; margin: 0 auto; line-height: 1.5; }

/* ==========================================
   MOBILE & TABLET RESPONSIVE HUD LAYOUT
   ========================================== */
@media (max-width: 768px) {
  /* Sidebar transformed into Bottom Navigation bar */
  .sidebar {
    width: 100%;
    height: 64px;
    position: fixed;
    bottom: 0;
    left: 0;
    top: auto;
    flex-direction: row;
    padding: 0 16px;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(3, 4, 8, 0.95);
    backdrop-filter: blur(40px);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    justify-content: center;
  }

  .logo-container {
    display: none;
  }

  .nav-links {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 50px;
    height: 50px;
  }

  .nav-item.active::after {
    right: auto;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 3px;
    border-radius: 0 0 2px 2px;
  }

  .nav-item .tooltip {
    left: 50%;
    top: -48px;
    transform: translateX(-50%) translateY(10px);
  }

  .nav-item:hover .tooltip {
    transform: translateX(-50%) translateY(0);
  }

  .sidebar-footer {
    display: none;
  }

  /* Main Wrapper margins reset */
  .main-wrapper {
    margin-left: 0;
    padding: 16px 16px 90px 16px;
    max-width: 100%;
    gap: 20px;
  }

  /* Top Bar wrapping */
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 16px;
  }

  .ticker-tape {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 6px;
    width: 100%;
    justify-content: flex-start;
  }

  .ticker-item {
    flex-shrink: 0;
  }

  .top-bar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .account-selector-container {
    grid-column: span 2;
  }

  .account-selector-container button {
    width: 100% !important;
  }

  .account-dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
  }

  /* KPIs wrapper */
  .kpis-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 14px 16px;
  }

  .kpi-value {
    font-size: 20px;
  }

  /* Closed positions table and details */
  .trade-row-card {
    padding: 14px 18px;
  }

  .trade-row-header {
    grid-template-columns: 1fr 1fr;
    row-gap: 8px;
    font-size: 13px;
  }

  .trade-hide-mobile {
    display: none !important;
  }

  .trade-pnl {
    text-align: right;
    font-size: 13px;
  }

  .expanded-grid {
    grid-template-columns: 1fr;
  }

  /* Risk & simulator result grid */
  .calc-results {
    grid-template-columns: 1fr;
  }

  /* Mistakes and emotion selectors */
  .emotion-selector {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================
   SERVER SYNC STATUS HUD INDICATOR
   ========================================== */
.server-status-hud {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 8px;
  margin-right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  user-select: none;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.status-text {
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* LED Indicator States & Pulse Animations */
.pulse-online {
  background-color: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
  animation: led-pulse-green 1.8s infinite ease-in-out;
}

.pulse-connecting {
  background-color: var(--color-gold);
  box-shadow: 0 0 8px var(--color-gold);
  animation: led-pulse-yellow 1.2s infinite ease-in-out;
}

.pulse-offline {
  background-color: var(--color-rose);
  box-shadow: 0 0 8px var(--color-rose);
  animation: led-pulse-red 1.5s infinite ease-in-out;
}

@keyframes led-pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

@keyframes led-pulse-yellow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(194, 155, 71, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(194, 155, 71, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(194, 155, 71, 0); }
}

@keyframes led-pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 23, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); }
}

/* ==========================================
   HUD PASSCODE LOCK (LOGIN SCREEN LOCK OVERLAY)
   ========================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 10, 0.96);
  backdrop-filter: blur(28px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1.02);
}

.login-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.login-glow-red {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 23, 68, 0.06) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glow-pulse 6s infinite ease-in-out;
}

@keyframes glow-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.login-card {
  width: 400px;
  padding: 40px;
  border-radius: 16px;
  text-align: center;
  border-top: 2px solid rgba(255, 23, 68, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

.lock-icon-container {
  width: 60px;
  height: 60px;
  background: rgba(255, 23, 68, 0.05);
  border: 1px solid rgba(255, 23, 68, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--color-rose);
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.1);
  animation: lock-glow 2s infinite ease-in-out;
}

@keyframes lock-glow {
  0% { box-shadow: 0 0 15px rgba(255, 23, 68, 0.1); border-color: rgba(255, 23, 68, 0.2); }
  50% { box-shadow: 0 0 25px rgba(255, 23, 68, 0.3); border-color: rgba(255, 23, 68, 0.5); }
  100% { box-shadow: 0 0 15px rgba(255, 23, 68, 0.1); border-color: rgba(255, 23, 68, 0.2); }
}

.lock-svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.login-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.passcode-display-wrap {
  margin-bottom: 24px;
  position: relative;
}

.passcode-input-display {
  width: 100%;
  background: rgba(3, 5, 10, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  font-size: 20px;
  color: #fff;
  font-family: var(--font-mono);
  letter-spacing: 4px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
  transition: all 0.2s ease;
}

.passcode-input-display:focus {
  border-color: var(--color-rose);
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.15);
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.key-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  outline: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.key-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.key-btn:active {
  background: rgba(255, 23, 68, 0.05);
  border-color: var(--color-rose);
  transform: scale(0.96);
  text-shadow: 0 0 8px var(--color-rose);
}

.key-btn.action-key {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

#btn-key-clear {
  color: var(--text-secondary);
}

#btn-key-submit {
  background: rgba(0, 230, 118, 0.03);
  border-color: rgba(0, 230, 118, 0.15);
  color: var(--color-emerald);
}

#btn-key-submit:hover {
  background: rgba(0, 230, 118, 0.06);
  border-color: var(--color-emerald);
}

#btn-key-submit:active {
  background: rgba(0, 230, 118, 0.1);
  transform: scale(0.96);
  text-shadow: 0 0 8px var(--color-emerald);
}

.login-keyboard-option {
  margin-bottom: 20px;
}

.login-error-msg {
  height: 18px;
  font-size: 11px;
  color: var(--color-rose);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 10px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 5px rgba(255, 23, 68, 0.2);
}

.login-diagnostics {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 20px;
  margin-top: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.diag-line {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  opacity: 0.6;
}

/* Master card shake on passcode error */
.shake {
  animation: shake-anim 0.4s ease-in-out;
}

@keyframes shake-anim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ==========================================
   ADMIN PANEL INTERFACE SETTINGS
   ========================================== */
#admin-view .calc-card {
  padding: 24px 28px;
}

/* ==========================================
   MULTI-USER SAAS STYLING ADDITIONS
   ========================================== */
.login-switch-footer a {
  transition: all 0.2s ease-in-out;
}

.login-switch-footer a:hover {
  text-shadow: 0 0 10px currentColor;
  filter: brightness(1.2);
}

/* Glowing Neon Badges */
.badge-role, .badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.badge-role.admin {
  background: rgba(194, 155, 71, 0.05);
  color: var(--color-gold);
  border: 1px solid rgba(194, 155, 71, 0.25);
  box-shadow: 0 0 8px rgba(194, 155, 71, 0.08);
}

.badge-role.user {
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-status.active {
  background: rgba(0, 230, 118, 0.05);
  color: var(--color-emerald);
  border: 1px solid rgba(0, 230, 118, 0.25);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.08);
}

.badge-status.suspended {
  background: rgba(255, 23, 68, 0.05);
  color: var(--color-rose);
  border: 1px solid rgba(255, 23, 68, 0.25);
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.08);
}

/* Action buttons inside the tables */
.btn-table-action {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
  text-transform: uppercase;
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-table-action.btn-suspend {
  border-color: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.btn-table-action.btn-suspend:hover {
  background: rgba(251, 191, 36, 0.05);
  border-color: #fbbf24;
  text-shadow: 0 0 8px #fbbf24;
}

.btn-table-action.btn-activate {
  border-color: rgba(0, 230, 118, 0.2);
  color: var(--color-emerald);
}

.btn-table-action.btn-activate:hover {
  background: rgba(0, 230, 118, 0.05);
  border-color: var(--color-emerald);
  text-shadow: 0 0 8px var(--color-emerald);
}

.btn-table-action.btn-role-toggle {
  border-color: rgba(157, 78, 221, 0.2);
  color: var(--color-purple);
}

.btn-table-action.btn-role-toggle:hover {
  background: rgba(157, 78, 221, 0.05);
  border-color: var(--color-purple);
  text-shadow: 0 0 8px var(--color-purple);
}

.btn-table-action.btn-delete {
  border-color: rgba(255, 23, 68, 0.2);
  color: var(--color-rose);
}

.btn-table-action.btn-delete:hover {
  background: rgba(255, 23, 68, 0.05);
  border-color: var(--color-rose);
  text-shadow: 0 0 8px var(--color-rose);
}

/* Secure role-based hiding for standard users */
body.role-user .admin-only {
  display: none !important;
}


