/* ============================================
   ALPHAREXX Dashboard — Million Dollar UI
   High-End Glassmorphism & Trading Terminal Aesthetic
   ============================================ */

/* Design Tokens - "Deep Space" Palette */
:root {
  --dash-bg-dark: #050816; /* Deepest background */
  --dash-bg-gradient: radial-gradient(circle at 15% 50%, rgba(13, 18, 34, 1), #050816 80%);
  
  /* Glassmorphism Layers */
  --glass-surface: rgba(13, 18, 34, 0.7);
  --glass-surface-hover: rgba(20, 27, 45, 0.8);
  --glass-border: rgba(0, 212, 255, 0.15);
  --glass-border-glow: rgba(0, 212, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-blur: blur(12px);

  /* Accents */
  --neon-cyan: #00d4ff;
  --neon-cyan-glow: rgba(0, 212, 255, 0.5);
  --neon-green: #00ff9d;
  --neon-red: #ff3366;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Dimensions */
  --sidebar-width: 280px;
  --header-height: 80px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  
  /* Font */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base Reset & Layout */
* { box-sizing: border-box; outline: none; }
body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; }

.dash-app {
  display: flex;
  height: 100vh;
  background: var(--dash-bg-dark);
  background-image: 
      radial-gradient(circle at 5% 5%, rgba(0, 212, 255, 0.08), transparent 40%),
      radial-gradient(circle at 95% 95%, rgba(0, 212, 255, 0.05), transparent 40%);
  font-family: var(--font-main);
  color: var(--text-primary);
  overflow: hidden;
}

/* ============================================
   Sidebar - The Command Center
   ============================================ */
.dash-sidebar {
  width: var(--sidebar-width);
  background: rgba(8, 11, 22, 0.85);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  z-index: 50;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.dash-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 32px;
  text-decoration: none;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dash-brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--neon-cyan), #0099cc);
  border-radius: 8px;
  box-shadow: 0 0 15px var(--neon-cyan-glow);
  position: relative;
}

.dash-brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(8px);
  opacity: 0.6;
}

.dash-brand span:not(.dash-brand-icon) {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(90deg, #fff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-nav {
  flex: 1;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.dash-nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  transform: translateX(4px);
}

.dash-nav-item.active {
  background: rgba(0, 212, 255, 0.1);
  color: var(--neon-cyan);
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.05);
}

.dash-nav-icon {
  font-size: 1.2rem;
  opacity: 0.8;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.dash-nav-label {
  white-space: nowrap;
}

.dash-sidebar-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.dash-back-home {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neon-cyan);
  text-decoration: none;
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.dash-back-home:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

.dash-btn-logout {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgba(239, 68, 68, 0.8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.dash-btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--neon-red);
  color: var(--neon-red);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

/* ============================================
   Main Content Area
   ============================================ */
.dash-main {
  flex: 1;
  padding: 40px 60px;
  position: relative;
  min-width: 0; /* Prevent overflow */
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.dash-page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

/* Cards Grid */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.dash-card {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--glass-shadow);
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
}

.dash-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-glow);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.dash-card-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
  font-weight: 600;
}

.dash-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-card-value.positive { color: var(--neon-green); text-shadow: 0 0 20px rgba(0, 255, 157, 0.2); }
.dash-card-value.negative { color: var(--neon-red); text-shadow: 0 0 20px rgba(255, 51, 102, 0.2); }

/* Indicators */
.dash-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}
.dash-indicator-green { background: var(--neon-green); color: var(--neon-green); }
.dash-indicator-red { background: var(--neon-red); color: var(--neon-red); }

/* Section Headings */
.dash-section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-section-heading::before {
  content: '';
  width: 4px; height: 24px;
  background: var(--neon-cyan);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* ============================================
   Overview Grid & Summaries
   ============================================ */
.dash-overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.dash-overview-col-main {
  display: flex;
  flex-direction: column;
}

.dash-overview-col-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dash-section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.dash-section-header-row .dash-section-heading {
  margin-bottom: 0;
}

.dash-link-btn {
  color: var(--neon-cyan);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}
.dash-link-btn:hover {
  text-shadow: 0 0 8px var(--neon-cyan-glow);
  transform: translateX(4px);
}

.dash-summary-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
}
.dash-summary-card:hover {
  border-color: var(--glass-border-glow);
  transform: translateY(-2px);
}

.dash-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dash-summary-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-summary-header a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.dash-summary-header a:hover {
  color: var(--neon-cyan);
}

.dash-mini-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.dash-mini-stat span:first-child {
  color: var(--text-secondary);
}
.dash-mini-stat span:last-child {
  color: #fff;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.dash-value-highlight {
  color: var(--neon-cyan) !important;
}

/* ============================================
   Signals List - "Terminal Style"
   ============================================ */
.dash-signals-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-signal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.dash-signal-card {
  background: linear-gradient(160deg, rgba(13, 18, 34, 0.6), rgba(5, 8, 22, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
}

.dash-signal-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-2px);
  background: linear-gradient(160deg, rgba(13, 18, 34, 0.8), rgba(5, 8, 22, 0.95));
}

.dash-signal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-signal-card-symbol {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.dash-signal-card-type {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dash-signal-card-type.long { background: rgba(0, 255, 157, 0.1); color: var(--neon-green); border: 1px solid rgba(0, 255, 157, 0.3); }
.dash-signal-card-type.short { background: rgba(255, 51, 102, 0.1); color: var(--neon-red); border: 1px solid rgba(255, 51, 102, 0.3); }

.dash-signal-card-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.dash-signal-card-row .label { color: var(--text-muted); }
.dash-signal-card-row span:not(.label) { color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; }

.dash-signal-result { font-weight: 700; color: var(--neon-cyan) !important; }

.view-chart-btn {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--neon-cyan);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.view-chart-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 15px var(--neon-cyan-glow);
}

/* Empty State */
.dash-empty-state {
  text-align: center;
  padding: 60px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}
.dash-empty-state-icon { font-size: 3rem; opacity: 0.2; margin-bottom: 20px; display: block; }
.dash-empty-state p { color: var(--text-muted); font-size: 1rem; }

/* ============================================
   Performance Tab - Advanced
   ============================================ */
.dash-perf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.dash-perf-chart-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.dash-perf-chart-container {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.dash-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.dash-chart-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dash-donut-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-donut-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.dash-donut-label { font-size: 0.8rem; color: var(--text-muted); display: block; }
.dash-donut-val { font-size: 1.5rem; font-weight: 800; color: #fff; }

.dash-perf-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
  margin-bottom: 24px;
}

.dash-toggle-btn {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.dash-toggle-btn.active {
  background: var(--glass-surface-hover);
  color: var(--neon-cyan);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Support Tab - Advanced
   ============================================ */
.dash-support-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
}

.dash-support-form-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--glass-shadow);
}

.dash-ticket-list-container {
  margin-top: 32px;
}

.dash-ticket-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-ticket-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 212, 255, 0.2);
  transform: translateX(4px);
}

.dash-ticket-info h4 { margin: 0 0 6px 0; font-size: 1rem; color: #fff; }
.dash-ticket-meta { font-size: 0.8rem; color: var(--text-muted); }

.dash-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.dash-badge.open { background: rgba(0, 212, 255, 0.15); color: var(--neon-cyan); border: 1px solid rgba(0, 212, 255, 0.3); }
.dash-badge.closed { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }

.dash-faq-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-faq-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.dash-faq-question {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.dash-faq-question:hover { color: #fff; }

.dash-faq-answer {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: none; /* JS toggle needed if not using details/summary */
}

/* ============================================
   Account Tab - Advanced
   ============================================ */
.dash-account-layout {
  display: grid;
  grid-template-columns: 2fr 1.5fr;
  gap: 32px;
}

.dash-account-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--glass-shadow);
  height: 100%;
}

.dash-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-profile-avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--neon-cyan), #00aaff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: #050816;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.dash-profile-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  color: #fff;
}

.dash-profile-email {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.dash-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.dash-info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dash-info-value {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
}

.dash-plan-card {
  background: linear-gradient(160deg, rgba(13, 18, 34, 0.8), rgba(5, 8, 22, 0.95));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}

.dash-plan-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
}

.dash-plan-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neon-cyan);
  margin-bottom: 16px;
  display: block;
}

.dash-plan-detail {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 8px;
}

.dash-plan-detail span:last-child {
  color: #fff;
  font-weight: 600;
}

/* ============================================
   Content Boxes & Forms
   ============================================ */
.dash-content-box {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--glass-shadow);
}

.dash-input, .dash-textarea {
  width: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.2s;
  margin-bottom: 16px;
}
.dash-input:focus, .dash-textarea:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
  background: rgba(0, 0, 0, 0.5);
}

.dash-key-modal-box .password-input-wrap,
.dash-paywall-modal .password-input-wrap {
  position: relative;
  margin-bottom: 16px;
}
.dash-key-modal-box .password-input-wrap:last-of-type,
.dash-paywall-modal .password-input-wrap:last-of-type { margin-bottom: 0; }
.dash-key-modal-box .password-input-wrap input,
.dash-paywall-modal .password-input-wrap input {
  padding-right: 48px;
}
.dash-key-modal-box .password-toggle-btn,
.dash-paywall-modal .password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-key-modal-box .password-toggle-btn:hover,
.dash-paywall-modal .password-toggle-btn:hover {
  color: var(--neon-cyan);
  background: rgba(0, 212, 255, 0.1);
}
.dash-key-modal-box .password-toggle-btn svg,
.dash-paywall-modal .password-toggle-btn svg {
  width: 20px;
  height: 20px;
}
.dash-key-modal-box .password-toggle-btn .icon-hide,
.dash-paywall-modal .password-toggle-btn .icon-hide { display: none; }
.dash-key-modal-box .password-toggle-btn[aria-pressed="true"] .icon-show,
.dash-paywall-modal .password-toggle-btn[aria-pressed="true"] .icon-show { display: none; }
.dash-key-modal-box .password-toggle-btn[aria-pressed="true"] .icon-hide,
.dash-paywall-modal .password-toggle-btn[aria-pressed="true"] .icon-hide { display: block; }

.dash-btn-primary {
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--neon-cyan), #00aaff);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dash-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

.dash-btn-secondary {
  padding: 14px 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.dash-btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   Modals & Overlays
   ============================================ */
.dash-paywall, .dash-key-modal, .dash-chart-modal {
  background: rgba(5, 8, 22, 0.9);
  backdrop-filter: blur(20px);
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.dash-paywall {
  overflow-y: auto;
  align-items: flex-start;
  padding: 40px 20px 60px;
}

.dash-paywall-modal {
  margin: auto;
  flex-shrink: 0;
}

.dash-paywall-modal, .dash-key-modal-box, .dash-chart-modal-inner {
  background: #0d1222;
  border: 1px solid var(--glass-border-glow);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  position: relative;
}

.dash-key-modal-box, .dash-chart-modal-inner {
  overflow-y: auto;
  max-height: 90vh;
}

.dash-chart-modal-inner {
  max-width: 900px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.dash-key-modal-box {
  padding: 32px;
  text-align: center;
}

.dash-key-modal h3 { margin-top: 0; color: #fff; font-size: 1.5rem; }
.dash-key-modal p { color: var(--text-secondary); margin-bottom: 24px; }
.dash-key-modal-dismiss { display: block; margin-bottom: 20px; color: var(--text-muted); font-size: 0.9rem; cursor: pointer; }

.dash-paywall-modal {
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  max-width: 440px;
}

.dash-paywall-header {
  padding: 28px 32px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-paywall-back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--neon-cyan);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.dash-paywall-back-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.dash-paywall-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--neon-cyan), rgba(0, 212, 255, 0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.25));
}

.dash-paywall-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.dash-paywall-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.dash-paywall-body {
  padding: 24px 32px;
}

.dash-paywall-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.dash-paywall-key-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.dash-paywall-input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-paywall-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.dash-paywall-input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.15);
}

.dash-paywall-cta {
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--neon-cyan), #00a8e0);
  color: #050816;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
}

.dash-paywall-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.dash-paywall-msg {
  margin: 12px 0 0;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.dash-paywall-msg.success {
  background: rgba(0, 255, 157, 0.12);
  border: 1px solid rgba(0, 255, 157, 0.3);
  color: var(--neon-green);
}

.dash-paywall-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--neon-red);
}

.dash-paywall-divider {
  padding: 0 32px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-paywall-divider::before,
.dash-paywall-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.dash-paywall-divider span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.dash-paywall-footer {
  padding: 20px 32px 28px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-paywall-cta-secondary {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neon-cyan);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: var(--radius-sm);
  transition: background 0.2s, border-color 0.2s;
}

.dash-paywall-cta-secondary:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--neon-cyan);
}

/* ============================================
   Overview Charts
   ============================================ */
.dash-chart-overview-section {
  display: block;
  position: relative;
}

.dash-chart-container-large {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dash-chart-container-large:hover {
  border-color: var(--glass-border-glow);
}

.dash-chart-title .dash-icon {
  margin-right: 8px;
  font-size: 1.2rem;
  vertical-align: middle;
}

/* ============================================
   Responsiveness
   ============================================ */
@media (max-width: 1024px) {
  .dash-sidebar {
    width: 80px;
    padding-top: 20px;
  }
  .dash-brand span:not(.dash-brand-icon) { display: none; }
  .dash-nav-label { display: none; }
  .dash-nav-item { justify-content: center; padding: 16px; }
  .dash-nav-icon { font-size: 1.5rem; width: auto; }
  .dash-main { margin-left: 80px; padding: 30px; }
  .dash-signal-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .dash-overview-grid { grid-template-columns: 1fr; }
  .dash-perf-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-perf-chart-section { grid-template-columns: 1fr; }
  .dash-support-layout { grid-template-columns: 1fr; }
  .dash-account-layout { grid-template-columns: 1fr; }
}

/* Mobile: side drawer (hamburger menu), no top tabs */
.dash-mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 150;
  background: rgba(8, 11, 22, 0.98);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.dash-mobile-menu-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}
.dash-mobile-menu-btn:hover { background: rgba(255, 255, 255, 0.06); }
.dash-mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.dash-drawer-open .dash-mobile-menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.dash-drawer-open .dash-mobile-menu-btn span:nth-child(2) { opacity: 0; }
.dash-drawer-open .dash-mobile-menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.dash-mobile-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}

@media (max-width: 768px) {
  .dash-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .dash-drawer-open .dash-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .dash-mobile-header { display: flex; }

  .dash-app { flex-direction: column; min-height: 100vh; padding-top: 56px; }
  .dash-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 85vw);
    max-width: 320px;
    height: 100%;
    flex-direction: column;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--glass-border);
    box-shadow: none;
  }
  .dash-drawer-open .dash-sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.4);
  }

  .dash-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    height: 64px;
    padding: 0 24px;
    min-width: auto;
  }
  .dash-brand span:not(.dash-brand-icon) { display: block; font-size: 1rem; }

  .dash-nav {
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 12px;
    gap: 4px;
  }
  .dash-nav-item {
    flex-shrink: 0;
    padding: 14px 20px;
    min-height: 48px;
    justify-content: flex-start;
    gap: 16px;
    border-radius: var(--radius-md);
  }
  .dash-nav-label { display: inline; }
  .dash-nav-icon { font-size: 1.25rem; width: 24px; }

  .dash-sidebar-footer {
    display: block;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .dash-back-home { margin-bottom: 10px; padding: 12px; }
  .dash-btn-logout { padding: 12px; }

  .dash-main {
    margin-left: 0;
    padding: 16px 12px 24px;
    width: 100%;
    flex: 1;
    min-height: 0;
  }
  .dash-page-title { font-size: 1.5rem; margin-bottom: 20px; line-height: 1.3; }
  .dash-cards { grid-template-columns: 1fr; gap: 12px; }
  .dash-card { padding: 16px; }
  .dash-card-value { font-size: 1.5rem; }
  .dash-card-label { font-size: 0.8125rem; }

  .dash-signal-cards { grid-template-columns: 1fr; }
  .dash-signal-card { padding: 16px; }
  .dash-section-heading { font-size: 1.1rem; margin: 24px 0 12px; }

  .dash-perf-grid { grid-template-columns: 1fr; }
  .dash-perf-toggle { flex-wrap: wrap; gap: 8px; }
  .dash-toggle-btn { padding: 10px 14px; font-size: 0.875rem; }
  .dash-account-layout { grid-template-columns: 1fr; }
  .dash-profile-grid { grid-template-columns: 1fr; }
  .dash-support-layout { grid-template-columns: 1fr; }

  .dash-risk-note { font-size: 0.875rem; line-height: 1.5; margin-bottom: 16px; }
  .dash-risk-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .dash-risk-field label { font-size: 0.8125rem; }
  .dash-content-box { padding: 16px; }

  .dash-paywall-modal { width: 95%; }
  .dash-key-modal-box, .dash-chart-modal-inner {
    width: 95%;
    max-height: 85vh;
    padding: 24px;
  }
  .dash-paywall-header { padding: 20px 20px 16px; }
  .dash-paywall-body { padding: 20px; }
  .dash-paywall-divider { padding: 0 20px; }
  .dash-paywall-footer { padding: 16px 20px 24px; }
  .dash-paywall-key-row { flex-direction: column; }
  .dash-paywall-cta { width: 100%; }
  .dash-paywall-icon { font-size: 2.75rem; }
}
