/* Design System & Tokens */
:root {
  --bg-primary: #060b13;
  --bg-secondary: #0a111e;
  --emerald-primary: #059669;
  --emerald-light: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --gold-primary: #d97706;
  --gold-light: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.15);
  --danger-primary: #dc2626;
  --danger-light: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --card-bg: rgba(15, 23, 42, 0.45);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-border-glow: rgba(16, 185, 129, 0.12);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --font-family: 'Inter', sans-serif;
  --font-arabic: 'Amiri', serif;
}

/* Reset and Globals */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Stunning Ambient Glow Background */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: 
    radial-gradient(circle at 50% 0%, #032a1e 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(217, 119, 6, 0.05) 0%, transparent 35%),
    #05080f;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--emerald-primary);
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(16, 185, 129, 0.15);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5), 0 0 15px 1px rgba(16, 185, 129, 0.03);
}

/* Header & Calligraphy */
.main-header {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.basmala-container {
  text-align: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 16px;
}

.arabic-basmala {
  font-family: var(--font-arabic);
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
  letter-spacing: 1.5px;
}

.translation-basmala {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 4px;
}

.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--emerald-light) 0%, var(--emerald-primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
  border: 1px solid var(--gold-light);
}

.logo-circle span {
  font-family: var(--font-arabic);
  font-size: 26px;
  font-weight: bold;
  color: #0b0f17;
}

.brand h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.arabic-title {
  font-family: var(--font-arabic);
  color: var(--gold-light);
  font-size: 28px;
}

.tagline {
  font-size: 13px;
  color: var(--text-secondary);
}

.calendar-widget {
  text-align: right;
  border-left: 2px solid var(--gold-primary);
  padding-left: 16px;
}

.hijri-text {
  font-family: var(--font-arabic);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light);
}

.gregorian-text {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Status Banner */
.status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-left: 4px solid var(--emerald-primary);
  flex-wrap: wrap;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.pulse-dot.active {
  background-color: var(--emerald-light);
  box-shadow: 0 0 8px var(--emerald-light);
  animation: pulse-green 1.5s infinite;
}

.pulse-dot.idle {
  background-color: var(--gold-light);
  box-shadow: 0 0 8px var(--gold-light);
  animation: pulse-gold 1.5s infinite;
}

.pulse-dot.weekend {
  background-color: var(--text-muted);
}

.status-lbl {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tawakkul-verse {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.arabic-quote {
  font-family: 'Amiri', 'Noto Naskh Arabic', serif;
  font-size: 17px;
  color: var(--gold-light);
  font-weight: 700;
  font-style: normal;
  direction: rtl;
  letter-spacing: 0;
}

.english-quote {
  font-style: italic;
  color: var(--text-secondary);
}

.cite-quote {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid transparent;
}

.stat-card:hover {
  border-bottom-color: var(--emerald-primary);
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG icons replacement using CSS masks or pure backgrounds */
.val-icon {
  background: radial-gradient(circle, var(--emerald-glow) 0%, rgba(0,0,0,0) 100%);
  position: relative;
}
.val-icon::before {
  content: "💵";
  font-size: 20px;
}

.pnl-icon::before {
  content: "📈";
  font-size: 20px;
}

.cash-icon::before {
  content: "🛡️";
  font-size: 20px;
}

.budget-icon::before {
  content: "⚖️";
  font-size: 20px;
}

.stat-info h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.arabic-term {
  font-family: var(--font-arabic);
  color: var(--gold-light);
  font-size: 14px;
  font-weight: normal;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin: 2px 0;
  font-family: var(--font-family);
  letter-spacing: -0.5px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Combined Returns Panel styles */
.performance-panel-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .performance-panel-card {
    grid-column: span 2;
  }
}

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

.performance-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.performance-header .pnl-icon::before {
  font-size: 14px;
}

.performance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}

.performance-sub-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-left: 3px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.performance-sub-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.performance-sub-card .sub-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.performance-sub-card .sub-value {
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin: 4px 0 2px 0;
  letter-spacing: -0.3px;
}

.performance-sub-card .sub-pct {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 1200px) {
  .performance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Ticker Grid and Visual Sliders */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 3px solid var(--gold-light);
  padding-left: 10px;
}

.arabic-section {
  font-family: var(--font-arabic);
  color: var(--gold-light);
  font-size: 20px;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.ticker-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ticker-card.in-call {
  border-color: var(--emerald-primary);
  box-shadow: 0 0 15px var(--emerald-glow);
}

.ticker-card.in-put {
  border-color: var(--danger-primary);
  box-shadow: 0 0 15px var(--danger-glow);
}

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

.ticker-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-symbol {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.pos-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.pos-tag.none {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.pos-tag.call {
  background: var(--emerald-glow);
  color: var(--emerald-light);
  border: 1px solid var(--emerald-primary);
}

.pos-tag.put {
  background: var(--danger-glow);
  color: var(--danger-light);
  border: 1px solid var(--danger-primary);
}

.price-display {
  text-align: right;
}

.current-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.current-price.tick-up {
  color: #34d399 !important;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.current-price.tick-down {
  color: #f87171 !important;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

.open-price-lbl {
  font-size: 11px;
  color: var(--text-muted);
}

.open-seen-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

.open-seen-status.seen {
  color: var(--emerald-light);
}

/* Beautiful Trigger Slider Scale Widget */
.trigger-scale-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.scale-labels .lbl-put {
  color: var(--danger-light);
}

.scale-labels .lbl-call {
  color: var(--emerald-light);
}

.scale-bar-track {
  height: 10px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.02) 42%, rgba(255, 255, 255, 0.04) 50%, rgba(16, 185, 129, 0.02) 58%, rgba(16, 185, 129, 0.12) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  position: relative;
  margin: 6px 0;
  overflow: visible;
}

.scale-midline {
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  width: 1px;
  background: var(--text-muted);
  border-left: 1px dashed var(--text-muted);
  z-index: 1;
}

.scale-put-line {
  position: absolute;
  left: 15%;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--danger-primary);
  z-index: 1;
}

.scale-call-line {
  position: absolute;
  right: 15%;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--emerald-primary);
  z-index: 1;
}

.scale-current-marker {
  position: absolute;
  top: 50%;
  left: 50%; /* Positioned dynamically */
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-light);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px var(--gold-light);
  z-index: 2;
  transition: left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scale-current-marker.call-side {
  background: var(--emerald-light);
  box-shadow: 0 0 8px var(--emerald-light);
}

.scale-current-marker.put-side {
  background: var(--danger-light);
  box-shadow: 0 0 8px var(--danger-light);
}

.scale-values {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: monospace;
}

.val-put {
  color: var(--danger-light);
  text-align: left;
}

.val-mid {
  color: var(--text-secondary);
  text-align: center;
}

.val-call {
  color: var(--emerald-light);
  text-align: right;
}

.dist-metric {
  font-size: 12px;
  text-align: center;
  color: var(--text-secondary);
}

.dist-metric span {
  font-weight: 700;
}

/* Content Layout (Split Screen) */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

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

/* Custom Table Design */
.table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

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

.positions-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.positions-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.positions-table tr:hover {
  background: rgba(16, 185, 129, 0.02);
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 16px !important;
  font-style: italic;
}

/* Sidebar and Panels */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-panel h2 {
  font-size: 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Dynamic Forms */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input[type="number"] {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input[type="number"]:focus {
  border-color: var(--emerald-primary);
  background: rgba(255, 255, 255, 0.05);
}

.form-help {
  font-size: 11px;
  color: var(--text-muted);
}

/* Checkbox Custom styling */
.checkbox-group {
  display: flex;
  gap: 16px;
}

.chk-container {
  display: block;
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}

.chk-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
}

.chk-container:hover input ~ .checkmark {
  background-color: rgba(255,255,255,0.08);
}

.chk-container input:checked ~ .checkmark {
  background-color: var(--emerald-primary);
  border-color: var(--emerald-light);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.chk-container input:checked ~ .checkmark:after {
  display: block;
}

.chk-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--emerald-primary);
  color: white;
  border: 1px solid var(--emerald-light);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
  background: var(--emerald-light);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: var(--danger-primary);
  color: white;
  border: 1px solid var(--danger-light);
  box-shadow: 0 4px 10px var(--danger-glow);
}

.btn-danger:hover {
  background: var(--danger-light);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.45);
}

.arabic-sub-btn {
  font-family: var(--font-arabic);
  font-size: 13px;
  margin-left: 6px;
  font-weight: normal;
}

/* Logs Panel */
.log-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.log-stream {
  background: #02060c;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  flex: 1;
}

.log-entry {
  line-height: 1.4;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.01);
  word-break: break-word;
}

.log-entry.info {
  color: var(--text-secondary);
}

.log-entry.success {
  color: var(--emerald-light);
}

.log-entry.warning {
  color: var(--gold-light);
}

.log-entry.error {
  color: var(--danger-light);
  font-weight: bold;
}

.log-timestamp {
  color: var(--text-muted);
  margin-right: 6px;
  font-size: 11px;
}

/* Footer styling */
.main-footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(255,255,255,0.03);
  margin-top: auto;
}

.main-footer p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-arabic {
  font-family: var(--font-arabic);
  font-size: 16px;
  color: var(--gold-light);
}

/* Animations */
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-gold {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Ticker Loading Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.05);
  border-top-color: var(--emerald-light);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

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

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* Secure Password Lock Screen Gate */
.login-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 50% 30%, #032a1e 0%, transparent 60%),
    #05080f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  transition: opacity 0.5s ease;
}

.login-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px !important;
  border-color: var(--card-border-glow) !important;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.08) !important;
}

.shake-animation {
  animation: shake-anim 0.5s ease-in-out;
}

@keyframes shake-anim {
  0%, 100% { transform: translateX(0); }
  15%, 45%, 75% { transform: translateX(-10px); }
  30%, 60%, 90% { transform: translateX(10px); }
}

/* Realized Trades Table & PnL styling */
.trade-type-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  text-transform: uppercase;
  display: inline-block;
  white-space: nowrap;
}

.trade-type-tag.buy-tag {
  background: var(--gold-glow);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
}

.trade-type-tag.sell-tag {
  background: rgba(16, 185, 129, 0.08);
  color: var(--emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pnl-positive {
  color: var(--emerald-light) !important;
}

.pnl-negative {
  color: var(--danger-light) !important;
}

.pnl-neutral {
  color: var(--text-secondary) !important;
}

/* Single Ticker Actions */
.btn-flatten-ticker {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.btn-flatten-ticker:hover {
  background: var(--danger-light);
  color: white;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.btn-flatten-ticker:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes pulse-opacity {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.wave-ride-banner {
  animation: pulse-opacity 1s infinite ease-in-out;
}

/* Alpaca Credentials Modal & Withdrawable Badges */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.modal-box {
  background: #0f172a;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.15);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

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

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: white;
}

.cred-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cred-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
}

.cred-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-family: monospace;
  font-size: 13px;
}

.btn-copy-cred, .btn-toggle-cred {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-cred:hover, .btn-toggle-cred:hover {
  background: var(--gold-light);
  color: #0b0f19;
}

.btn-alpaca-login-badge {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-alpaca-login-badge:hover {
  background: var(--gold-light);
  color: #0b0f19;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}
