/* ==========================================================================
   SMART3ALGO GLOBAL DESIGN SYSTEM (PREMIUM GLASSMORPHIC DARK MODE)
   ========================================================================== */

:root {
  /* Obsidian Emerald & Mint Cyber Palette */
  --bg-primary: #030611;
  --bg-secondary: #0a0e1a;
  --bg-tertiary: #111827;
  --border-color: rgba(255, 255, 255, 0.06);
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.04);
  
  --accent-cyan: #00ff87;     /* Electric Jade / Mint */
  --accent-purple: #10b981;   /* Neon Emerald */
  --accent-amber: #fbbf24;    /* Cyber Gold */
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --green-success: #34d399;
  --red-error: #ef4444;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-shadow: 0 0 20px rgba(0, 255, 135, 0.12);
}

/* Base Styles & Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Ambient Neon Glows */
.ambient-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(160px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
}

.ambient-glow.bg-cyan {
  background: var(--accent-cyan);
  top: -10%;
  left: -10%;
}

.ambient-glow.bg-purple {
  background: var(--accent-purple);
  bottom: -10%;
  right: -10%;
}

/* Typography Extensions */
h1, h2, h3, .logo-icon {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

/* Helper Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-green { color: var(--green-success) !important; }
.text-red { color: var(--red-error) !important; }
.mt-4 { margin-top: 1rem; }

/* ==========================================================================
   AUTHENTICATION LAYOUT
   ========================================================================== */

.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  z-index: 10;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  padding: 3rem 2.5rem;
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(0);
  transition: var(--transition-smooth);
}

.auth-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--glow-shadow);
  margin-bottom: 1rem;
}

.logo-icon i {
  color: var(--text-primary);
  width: 28px;
  height: 28px;
}

/* Logo Image Styling overrides */
.logo-image {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glow-shadow);
  margin-bottom: 1.25rem;
  transition: var(--transition-smooth);
}

.logo-image:hover {
  transform: rotate(5deg) scale(1.05);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo-img-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.2));
  margin-right: 0.5rem;
}

.auth-logo h1 {
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}

.auth-logo h1 span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.auth-form h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.auth-form p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
}

/* ==========================================================================
   INPUTS & BUTTONS
   ========================================================================== */

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.input-group label i {
  width: 16px;
  height: 16px;
}

.input-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: rgba(10, 11, 28, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.input-group input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  background-color: rgba(10, 11, 28, 0.8);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: var(--text-primary);
  box-shadow: var(--glow-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.btn-danger {
  background-color: rgba(255, 74, 90, 0.1);
  border: 1px solid rgba(255, 74, 90, 0.2);
  color: var(--red-error);
}

.btn-danger:hover {
  background-color: var(--red-error);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.auth-toggle {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
}

.auth-toggle a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   MAIN DASHBOARD WORKSPACE LAYOUT
   ========================================================================== */

.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 280px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  padding-left: 0.5rem;
}

.brand-icon {
  color: var(--accent-cyan);
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 5px var(--accent-cyan));
}

.sidebar-brand span {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.menu-item i {
  width: 20px;
  height: 20px;
}

.menu-item:hover, .menu-item.active {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.menu-item.active {
  border-left: 3px solid var(--accent-cyan);
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.05), transparent);
}

/* Main Dashboard Workspace */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

/* Header */
.top-header {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3rem;
  background-color: rgba(8, 9, 20, 0.4);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: var(--green-success);
  box-shadow: 0 0 8px var(--green-success);
}

.status-indicator.offline {
  background-color: var(--red-error);
  box-shadow: 0 0 8px var(--red-error);
}

.header-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.broker-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.broker-badge.linked {
  background-color: rgba(0, 245, 160, 0.1);
  border: 1px solid rgba(0, 245, 160, 0.2);
  color: var(--green-success);
}

.broker-badge.unlinked {
  background-color: rgba(255, 74, 90, 0.1);
  border: 1px solid rgba(255, 74, 90, 0.2);
  color: var(--red-error);
}

.user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Views Container */
.views-container {
  padding: 3rem;
  flex-grow: 1;
}

.dashboard-view {
  animation: fadeIn 0.4s ease-out;
}

/* Alert Banner */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.alert-banner.warning {
  background-color: rgba(255, 183, 0, 0.08);
  border: 1px solid rgba(255, 183, 0, 0.15);
  color: var(--accent-amber);
}

.alert-banner i {
  flex-shrink: 0;
}

/* Card Styling */
.premium-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.premium-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   METRICS GRID & CORE CHARTS
   ========================================================================== */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.metric-card h3 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -1px;
}

.metric-value.neutral { color: var(--text-primary); }

.metric-trend {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.metric-trend i {
  width: 14px;
  height: 14px;
}

/* Performance Chart Section */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-header h2 {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.chart-tag {
  background-color: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 380px;
}

/* ==========================================================================
   ALGO STRATEGY MODULE
   ========================================================================== */

.view-header {
  margin-bottom: 2.5rem;
}

.view-header h2 {
  font-size: 1.8rem;
  letter-spacing: -0.5px;
  margin-bottom: 0.3rem;
}

.view-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.strategies-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.strategy-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.strat-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.index-tag {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.strat-header h3 {
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.strategy-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  min-height: 4.5em;
}

.strat-parameters {
  background-color: rgba(10, 11, 28, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.param-row span {
  color: var(--text-secondary);
}

.param-row strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Custom Play/Pause Switch */
.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
}

.strat-toggle-check {
  display: none;
}

.toggle-switch label {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--bg-tertiary);
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  border: 1px solid var(--border-color);
}

.toggle-switch label::after {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  position: absolute;
  top: 3px;
  left: 3px;
  transition: var(--transition-smooth);
}

.strat-toggle-check:checked + label {
  background-color: var(--green-success);
}

.strat-toggle-check:checked + label::after {
  left: 27px;
  background-color: var(--bg-primary);
}

/* ==========================================================================
   ORDER TABLE & SUB MODULE
   ========================================================================== */

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

th {
  color: var(--text-secondary);
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.02);
}

td {
  color: var(--text-primary);
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.license-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: var(--text-primary);
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.price-val {
  font-size: 2rem;
  font-weight: 700;
}

.price-val span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin-bottom: 2rem;
}

.sub-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin-bottom: 2.5rem;
}

.sub-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.sub-features li i {
  color: var(--green-success);
  width: 20px;
  height: 20px;
}

.sub-warning-card {
  background-color: rgba(255, 183, 0, 0.05);
  border: 1px solid rgba(255, 183, 0, 0.15);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.sub-warning-card h3 {
  color: var(--accent-amber);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-warning-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* ==========================================================================
   SETTINGS & CONFIGS
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.settings-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.flex-between {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ==========================================================================
   MODAL WINDOW & TOAST
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(4, 5, 12, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.modal-header h2 {
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-cyan);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--glow-shadow);
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

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

/* ==========================================================================
   HNX QUANTUM SPLIT SCREEN AUTHENTICATION OVERRIDES
   ========================================================================== */

.auth-wrapper {
  display: flex;
  flex-direction: row;
  width: 100vw;
  min-height: 100vh;
  padding: 0;
  align-items: stretch;
  overflow: hidden;
}

/* Left Marketing Pane */
.auth-left {
  flex: 1.25;
  padding: 4.5rem 5.5rem;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-group span {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-primary);
}

.auth-left-content {
  position: relative;
  z-index: 5;
  margin-top: 1.5rem;
}

.gold-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(255, 183, 0, 0.08);
  border: 1px solid rgba(255, 183, 0, 0.2);
  color: var(--accent-amber);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  width: fit-content;
  margin-bottom: 2rem;
}

.auth-left-content h1 {
  font-size: 3.8rem;
  line-height: 1.12;
  letter-spacing: -1.8px;
  margin-bottom: 1.25rem;
}

.focus-text {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.highlight-orange {
  color: #ff9100;
  font-weight: 700;
}

.desc-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 3.5rem;
  max-width: 480px;
  line-height: 1.6;
}

/* Feature Grid 2x2 */
.prop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem;
  margin-bottom: 3.5rem;
  max-width: 820px;
}

.grid-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.grid-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.grid-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.grid-card i {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon-success { color: var(--green-success); }
.icon-amber { color: var(--accent-amber); }
.icon-cyan { color: var(--accent-cyan); }
.icon-purple { color: var(--accent-purple); }

/* Solid Orange Buttons matching mockup */
.btn-orange {
  background: linear-gradient(135deg, #ff7b00, #ffb700);
  color: #080914 !important;
  box-shadow: 0 4px 15px rgba(255, 123, 0, 0.2);
  font-weight: 700;
}

.btn-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 123, 0, 0.45);
}

.btn-learn {
  padding: 0.9rem 2.25rem;
  border-radius: 12px;
  font-size: 1rem;
}

/* Floating ambient elements */
.floating-shape {
  position: absolute;
  color: rgba(255, 255, 255, 0.015);
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
  animation: floatDecoration 10s ease-in-out infinite;
}

.shape-crown {
  top: 25%;
  right: 15%;
  font-size: 5rem;
  color: rgba(255, 183, 0, 0.025);
  animation-delay: 0s;
}

.shape-shield {
  bottom: 28%;
  right: 22%;
  font-size: 4rem;
  color: rgba(0, 240, 255, 0.025);
  animation-delay: 2.5s;
}

.shape-zap {
  top: 42%;
  right: 8%;
  font-size: 3.5rem;
  color: rgba(157, 78, 221, 0.025);
  animation-delay: 5s;
}

@keyframes floatDecoration {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(4deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.auth-left-footer .footer-links {
  display: flex;
  align-items: center;
}

.auth-left-footer a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.auth-left-footer a:hover {
  color: var(--text-secondary);
}

.auth-left-footer .sep {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0.5rem;
  opacity: 0.3;
}

/* Right Forms Pane */
.auth-right {
  flex: 0.75;
  background-color: #0b0c1b;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  position: relative;
  border-left: 1px solid var(--border-color);
}

.auth-right .auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Google SSO Button */
.btn-google {
  background-color: rgba(21, 22, 46, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 12px;
  font-weight: 600;
}

.btn-google:hover {
  background-color: #1a1c3b;
  border-color: rgba(255, 255, 255, 0.2);
}

.google-svg {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.75rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider::before { margin-right: .75em; }
.auth-divider::after { margin-left: .75em; }

.form-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.2rem;
  margin-bottom: 1.75rem;
}

/* Password eye toggle overlay */
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.5rem;
}

.label-row label {
  margin-bottom: 0;
}

.forgot-link {
  color: var(--accent-amber);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.forgot-link:hover {
  text-decoration: underline;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 3rem;
}

.eye-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.eye-toggle:hover {
  color: var(--text-secondary);
}

.eye-toggle i {
  width: 18px;
  height: 18px;
}

/* Custom Checkbox Layout */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ff9100;
  margin-top: 0.15rem;
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}

.checkbox-group label a {
  color: var(--accent-amber);
  text-decoration: none;
  font-weight: 500;
}

.checkbox-group label a:hover {
  text-decoration: underline;
}

.broker-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 1rem;
  opacity: 0.8;
}

/* Mobile responsive media overrides */
@media (max-width: 1100px) {
  .auth-left {
    padding: 3rem;
  }
  .auth-left-content h1 {
    font-size: 2.8rem;
  }
  .prop-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .floating-shape {
    display: none;
  }
}

@media (max-width: 880px) {
  .auth-left {
    display: none;
  }
  .auth-wrapper {
    justify-content: center;
    align-items: center;
    background-color: #0b0c1b;
  }
  .auth-right {
    flex: 1;
    width: 100%;
    padding: 2.5rem 1.5rem;
    border-left: none;
  }
}

/* ==========================================================================
   LANDING HEADER & LEGAL MODAL OVERLAYS
   ========================================================================== */

.landing-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4.5rem;
  background-color: rgba(3, 7, 18, 0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 50;
}

.landing-links {
  display: flex;
  gap: 2.25rem;
}

.landing-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.landing-link:hover {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 4px rgba(0, 255, 135, 0.3));
}

.landing-actions {
  display: flex;
  gap: 1rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Scrollable Legal Modals */
.legal-modal {
  max-width: 600px !important;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.legal-content {
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.legal-content::-webkit-scrollbar {
  width: 4px;
}

.legal-content::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

.legal-content h3 {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.legal-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.faq-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Adjust layout positions since Sign-up forms are now on the Left */
.auth-right {
  order: 1;
}

.auth-left {
  order: 2;
}

@media (max-width: 880px) {
  .landing-nav {
    padding: 0 1.5rem;
  }
  .landing-links {
    display: none;
  }
}

/* Live Password Validation Rules */
.validation-rules {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background-color: rgba(10, 11, 28, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.validation-rules p {
  margin: 0 !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.validation-rules p.invalid {
  color: var(--red-error) !important;
}

.validation-rules p.valid {
  color: var(--green-success) !important;
}

/* ==========================================================================
   HORIZONTAL NAV DASHBOARD REDESIGN OVERRIDES
   ========================================================================== */

/* Structure Adaptability */
.dashboard-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #05060f;
}

.main-content {
  height: auto;
  overflow-y: visible;
  padding-bottom: 2rem;
  background-color: #05060f;
}

.views-container {
  padding: 2rem 4rem 1rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Horizontal Top Navigation Bar */
.top-nav {
  height: 80px;
  background-color: #070814;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4rem;
  z-index: 100;
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.nav-left .logo-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-left .brand-logo-text {
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-menu .menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  border: 1px solid transparent;
  background-color: transparent;
  transition: var(--transition-smooth);
}

.nav-menu .menu-item i {
  width: 18px;
  height: 18px;
}

.nav-menu .menu-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-menu .menu-item.active {
  border: 1px solid rgba(255, 165, 0, 0.45);
  background-color: rgba(255, 165, 0, 0.08) !important;
  color: #ff9f00 !important;
  font-weight: 700;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Status IP Pill */
.status-pill {
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

.status-pill.status-unlinked {
  border: 1px solid rgba(255, 74, 90, 0.4);
  background-color: rgba(255, 74, 90, 0.08);
  color: #ff4a5a;
}

.status-pill.status-linked {
  border: 1px solid rgba(0, 255, 135, 0.4);
  background-color: rgba(0, 255, 135, 0.08);
  color: #00ff87;
}

/* Bell Notification Button */
.nav-icon-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-icon-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-icon-btn i {
  width: 18px;
  height: 18px;
}

/* Avatar & Dropdown */
.avatar-wrapper {
  position: relative;
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7b00, #ffb700);
  color: #080914;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 10px rgba(255, 123, 0, 0.25);
  transition: var(--transition-smooth);
}

.avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 123, 0, 0.45);
}

/* Dropdown */
.profile-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  width: 280px;
  background-color: #0b0c16;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  z-index: 500;
  animation: fadeIn 0.3s ease-out;
}

.dropdown-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.section-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

.dropdown-section h4 {
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 600;
}

.profile-details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.detail-item i {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.dropdown-divider {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin-bottom: 1rem;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.dropdown-item i {
  width: 16px;
  height: 16px;
}

.dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.dropdown-item.logout {
  color: var(--red-error);
}

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

/* ==========================================================================
   SUMMARY ROW & CARDS
   ========================================================================== */

.summary-cards-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.summary-card {
  background-color: #0b0c16;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.8rem 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: var(--transition-smooth);
}

.summary-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.summary-card .card-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.currency-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: #ff9f00;
  color: #080914;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(255, 159, 0, 0.2);
}

.card-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
}

.card-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
}

/* Capital Connect Button */
.btn-connect {
  background-color: rgba(255, 29, 83, 0.08);
  border: 1px solid #ff1d53;
  color: #ff1d53 !important;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(255, 29, 83, 0.05);
  transition: var(--transition-smooth);
}

.btn-connect:hover {
  background-color: #ff1d53;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 29, 83, 0.45);
}

.btn-connect.linked {
  background-color: rgba(0, 255, 135, 0.08);
  border: 1px solid #00ff87;
  color: #00ff87 !important;
  box-shadow: none;
}

.btn-connect.linked:hover {
  background-color: #00ff87;
  color: #080914 !important;
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.45);
}

.card-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-icons i {
  width: 20px;
  height: 20px;
  color: #00ff87;
}

.card-icons .icon-sync {
  animation: spin 8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   PORTFOLIO LIVE TABLES & POSITIONS
   ========================================================================== */

.section-card {
  margin-bottom: 3rem;
  padding: 2.2rem;
}

.section-card h2 {
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gold-badge {
  background-color: rgba(255, 159, 0, 0.08);
  border: 1px solid rgba(255, 159, 0, 0.25);
  color: #ff9f00;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: lowercase;
}

.realtime-indicator {
  font-size: 0.8rem;
  color: #00ff87;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Positions Table Layout */
.positions-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.01);
}

/* Empty positions state */
.empty-state-td {
  padding: 4.5rem 0 !important;
  background-color: transparent !important;
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}

.pulse-icon {
  width: 50px;
  height: 50px;
  color: rgba(255, 255, 255, 0.1);
  animation: pulseLight 2s infinite ease-in-out;
}

.empty-state-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.empty-state-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@keyframes pulseLight {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 0.9; color: var(--accent-cyan); }
  100% { transform: scale(1); opacity: 0.6; }
}

/* Floating Headphone Support Button */
.support-float-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7b00, #ffb700);
  border: none;
  color: #080914;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 123, 0, 0.35);
  z-index: 999;
  transition: var(--transition-smooth);
}

.support-float-btn:hover {
  transform: scale(1.08) rotate(10deg);
  box-shadow: 0 0 25px rgba(255, 123, 0, 0.55);
}

.support-float-btn i {
  width: 24px;
  height: 24px;
}

/* Footer style overrides */
.app-footer {
  text-align: center;
  padding: 1.5rem 0 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  opacity: 0.6;
  width: 100%;
}

.app-footer p {
  margin: 0;
}

/* =============================================
   SETTINGS PAGE STYLES (V2 - Screenshot Match)
   ============================================= */

.settings-page-header {
  margin-bottom: 2rem;
}

.settings-page-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.settings-page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 720px;
}

.settings-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
}

.settings-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.settings-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.settings-card-title-row h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.settings-card-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
}

.settings-form-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-form-body .input-group {
  margin-bottom: 0;
}

/* Save Credentials - Orange full button */
.btn-save-creds {
  background: linear-gradient(135deg, #ff7b00, #ffb700);
  color: #080914;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  margin-top: 0.5rem;
}

.btn-save-creds:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 123, 0, 0.4);
}

/* Broker Connect Row */
.broker-connect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.broker-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.broker-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(231, 76, 60, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.broker-name-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.broker-sub-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Broker Connect button states */
.btn-broker-connect {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-broker-connect:not(:disabled) {
  background: linear-gradient(135deg, #00e67a, #00b85c);
  color: #080914;
  border-color: transparent;
}

.btn-broker-connect:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 255, 135, 0.35);
}

.btn-broker-connect:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Session Note Banner */
.session-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(255, 160, 0, 0.06);
  border: 1px solid rgba(255, 160, 0, 0.2);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.session-note i {
  width: 16px;
  height: 16px;
  color: #ffb700;
  flex-shrink: 0;
  margin-top: 2px;
}

.session-note-highlight {
  color: #ffb700;
  font-weight: 600;
}

/* ==========================================================================
   HAMBURGER SIDEBAR + TOP BAR (Multi-page Layout)
   ========================================================================== */

.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 62px;
  background: rgba(3, 6, 17, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 0.85rem;
  z-index: 100;
}

.hamburger-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.45rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.07); }
.hamburger-btn i { width: 22px; height: 22px; }

.top-bar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
}
.top-bar-logo .brand-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  z-index: 200;
}
.sidebar-overlay.hidden { display: none !important; }

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 260px;
  height: 100vh;
  background: #07091a;
  border-right: 1px solid rgba(255,255,255,0.07);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-drawer.open { left: 0; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}
.sidebar-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 6px;
  display: flex;
  transition: background 0.2s;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.07); }
.sidebar-close-btn i { width: 18px; height: 18px; }

.sidebar-nav-list {
  list-style: none;
  padding: 0.85rem 0.65rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}
.sidebar-link i { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.sidebar-link.active { background: rgba(255,159,0,0.12); color: #ffb700; font-weight: 600; }

.sidebar-footer-actions {
  padding: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  background: none;
  border: none;
  color: #ff5a5a;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-logout-btn:hover { background: rgba(255,90,90,0.08); }
.sidebar-logout-btn i { width: 18px; height: 18px; }

.page-wrapper {
  padding-top: 62px;
  min-height: 100vh;
}
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.page-header {
  margin-bottom: 1.75rem;
}
.page-header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.page-header p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 600px) { .summary-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   DASHBOARD V2 - Portfolio Execution, Tools, Positions
   ========================================================================== */

/* ---- Active count header badge ---- */
.active-count-badge {
  background: rgba(0, 255, 135, 0.12);
  color: #00ff87;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ---- Strategy status badges ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.status-badge.active {
  background: rgba(0, 255, 135, 0.12);
  color: #00ff87;
}
.status-badge.paused {
  background: rgba(255, 159, 0, 0.12);
  color: #ffb700;
}
.status-badge.stopped {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ---- Action dropdown ---- */
.action-cell {
  position: relative;
}
.action-trigger {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.action-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
}
.action-trigger i { width: 14px; height: 14px; }

.action-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 50;
  overflow: hidden;
  display: none;
}
.action-menu.open { display: block; }

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.action-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.action-menu-item i { width: 16px; height: 16px; }
.action-menu-item.deploy { color: #00ff87; }
.action-menu-item.deploy:hover { background: rgba(0, 255, 135, 0.08); }
.action-menu-item.pause { color: #ffb700; }
.action-menu-item.pause:hover { background: rgba(255, 183, 0, 0.08); }
.action-menu-item.square-off { color: #ef4444; }
.action-menu-item.square-off:hover { background: rgba(239, 68, 68, 0.08); }

.action-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0.2rem 0;
}

/* ---- Tools Section ---- */
.tools-section {
  margin-bottom: 1.5rem;
}
.tools-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tools-section-header i { width: 18px; height: 18px; color: var(--text-secondary); }
.tools-section-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .tools-row { grid-template-columns: 1fr; } }

.tool-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  gap: 1rem;
}
.tool-card-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.tool-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-icon-wrap.lots-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}
.tool-icon-wrap.mtm-icon {
  background: rgba(0, 255, 135, 0.1);
  color: #00ff87;
}
.tool-icon-wrap i { width: 18px; height: 18px; }
.tool-name { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); }
.tool-desc { font-size: 0.75rem; color: var(--text-muted); }

.btn-tool-configure {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-tool-configure:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.btn-tool-configure i { width: 14px; height: 14px; }

/* ---- MTM Shield pulse ---- */
.mtm-shield-active {
  animation: mtmPulse 2s ease-in-out infinite;
}
@keyframes mtmPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(0,255,135,0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(0,255,135,0.7)); }
}

/* ---- Square Off Modal ---- */
.square-off-details {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}
.sq-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.85rem;
}
.sq-detail-row span:first-child { color: var(--text-muted); }
.sq-detail-row span:last-child { color: var(--text-primary); font-weight: 600; }

.btn-square-off-confirm {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  transition: all 0.2s;
}
.btn-square-off-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.sq-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #fca5a5;
}
.sq-warning i { width: 16px; height: 16px; color: #ef4444; flex-shrink: 0; }

/* ==========================================================================
   HNX QUANTUM - ADVANCED RESPONSIVE & MOBILE OPTIMIZATIONS (TABLETS & PHONES)
   ========================================================================== */

/* 1. Global Touch & Scrollbar Polishing */
@media (max-width: 992px) {
  .page-content {
    padding: 1.5rem 1rem 2.5rem !important;
  }
}

/* Custom visual table styling & scrollbar for a premium glassmorphic feel */
th, td {
  padding: 1.25rem 1.5rem !important;
  vertical-align: middle !important;
}

.page-content .table-container {
  min-height: 250px !important; /* Prevents action dropdown menu clipping even with 1 row in the table */
}

.table-container {
  overflow-x: auto;
}

.table-container::-webkit-scrollbar {
  height: 6px;
  background: rgba(255, 255, 255, 0.01);
}
.table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 159, 0, 0.3);
}

/* 2. Grid & Structural Classes for Light-Themed Statistics Modal */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stats-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stats-badges-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

/* 3. Tablets & Medium Screens (< 880px) */
@media (max-width: 880px) {
  /* Collapse Strategy Cards to single column to prevent ugly squishing */
  .strategies-list {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .strategy-card p {
    min-height: auto !important;
  }
}

/* 4. Small Tablets & Large Phones (< 768px) */
@media (max-width: 768px) {
  /* Compact Page Headers */
  .page-header {
    margin-bottom: 1.25rem !important;
  }
  .page-header h1 {
    font-size: 1.3rem !important;
  }
  
  /* Tables compact cell padding for neat alignment */
  th, td {
    padding: 0.75rem 1rem !important;
    font-size: 0.82rem !important;
  }
  
  /* Modal Card general adjustments */
  .modal-card {
    width: 95% !important;
    margin: 1.5rem auto !important;
    padding: 1.25rem 1rem !important;
  }
}

/* 5. Mobile Devices & Small Screens (< 580px) */
@media (max-width: 580px) {
  /* Collapse Summary cards to 1 column */
  .summary-row {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Collapse Tool Cards to 1 column */
  .tools-row {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
  
  /* Compact Tool Cards padding */
  .tool-card {
    padding: 0.85rem 1rem !important;
  }

  /* Re-align 4 cumulative stats cards inside modal to a balanced 2x2 grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
}

/* 6. Tiny Devices & Large Phone Portrait (< 420px) */
@media (max-width: 420px) {
  /* Stacking the capital card button vertically to prevent overflow */
  .summary-card {
    padding: 1rem !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  .summary-card .btn-connect {
    width: 100% !important;
    text-align: center !important;
  }

  /* Compact padding for top-bar elements */
  .top-bar {
    padding: 0 0.75rem !important;
  }
  
  /* Compress action menus to be readable */
  .action-trigger {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.72rem !important;
  }

  /* Stacking best/worst days row */
  .stats-sub-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  /* Settings Page broker connect flex row direction stacking */
  .broker-connect-row {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
  }
  .broker-identity {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .btn-broker-connect {
    width: 100% !important;
    justify-content: center !important;
  }
}
