
/* Hide the View badge — cards still clickable, just no visible label */
.dash-stats > .stat-card.qv-clickable .qv-click-hint {
  display: none !important;
}
/* Cards still get a clickable cursor */
#s_best, #s_worst { cursor: pointer; }
.dash-stats > .stat-card.qv-clickable {
  cursor: pointer;
}

.brokerage-strip > .brk-item.qv-clickable {
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.brokerage-strip > .brk-item.qv-clickable:hover {
  background: linear-gradient(180deg, rgba(34,90,60,0.25), rgba(8,8,16,0.5)) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 -1px 0 rgba(0,0,0,0.4) inset,
    0 8px 20px -4px rgba(34,197,94,0.25) !important;
}

/* === Quick-view modal === */
.qv-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 16px 24px;
  overflow-y: auto;
  animation: qvFadeIn 0.25s ease;
}
.qv-backdrop.open { display: flex; }
@keyframes qvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qvSlideUp { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.qv-modal {
  background: linear-gradient(180deg, #131322 0%, #0d0d18 100%);
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  padding: 0;
  position: relative;
  margin: auto;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    0 12px 36px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: qvSlideUp 0.32s cubic-bezier(.22,.61,.36,1);
}
.qv-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,92,252,0.5), transparent);
}

.qv-modal.qv-best { border-color: rgba(34,197,94,0.4); }
.qv-modal.qv-best::before { background: linear-gradient(90deg, transparent, rgba(34,197,94,0.6), transparent); }
.qv-modal.qv-worst { border-color: rgba(239,68,68,0.4); }
.qv-modal.qv-worst::before { background: linear-gradient(90deg, transparent, rgba(239,68,68,0.6), transparent); }

.qv-header {
  padding: 22px 26px;
  border-bottom: 1px solid rgba(40,30,70,0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(26,26,46,0.6) 0%, rgba(13,13,24,0.6) 100%);
}
.qv-header-left { display: flex; align-items: center; gap: 14px; }
.qv-header-icon { font-size: 28px; }
.qv-header-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e2e8f0;
  margin: 0;
}
.qv-header-sub {
  font-size: 11px;
  color: #9090a8;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 3px;
  letter-spacing: 0.04em;
}
.qv-modal.qv-best .qv-header-title { color: #22c55e; }
.qv-modal.qv-worst .qv-header-title { color: #ef4444; }
.qv-modal.qv-withdrawal .qv-header-title { color: #22c55e; }

.qv-close {
  background: transparent;
  border: 1px solid rgba(40,30,70,0.6);
  color: #a0a0b0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
  font-family: 'Rubik', sans-serif;
}
.qv-close:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239,68,68,0.08);
}

.qv-body {
  padding: 22px 26px;
  max-height: 70vh;
  overflow-y: auto;
}

/* PnL hero in modal */
.qv-pnl-hero {
  background: linear-gradient(135deg, rgba(8,8,16,0.8) 0%, rgba(13,13,24,0.6) 100%);
  border: 1px solid rgba(40,30,70,0.5);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.qv-pnl-hero .lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #7c7c94;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.qv-pnl-hero .val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  font-feature-settings: "zero" 1, "tnum" 1;
  font-variant-numeric: slashed-zero tabular-nums;
  letter-spacing: -0.01em;
}
.qv-pnl-hero .val.pos { color: #22c55e; text-shadow: 0 0 24px rgba(34,197,94,0.25); }
.qv-pnl-hero .val.neg { color: #ef4444; text-shadow: 0 0 24px rgba(239,68,68,0.25); }
.qv-pnl-hero .val.zero { color: #a0a0b0; }
.qv-pnl-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}
.qv-pnl-meta .line {
  font-size: 12px;
  color: #a0a0b0;
  font-family: 'JetBrains Mono', monospace;
}
.qv-pnl-meta .line strong { color: #e2e8f0; }

/* Detail grid */
.qv-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.qv-detail-cell {
  background: rgba(8,8,16,0.6);
  border: 1px solid rgba(40,30,70,0.5);
  border-radius: 10px;
  padding: 11px 13px;
  min-width: 0;
}
.qv-detail-cell .lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #7c7c94;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.qv-detail-cell .val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  font-feature-settings: "zero" 1, "tnum" 1;
  font-variant-numeric: slashed-zero tabular-nums;
  word-break: break-word;
}
.qv-detail-cell .val.buy { color: #22c55e; }
.qv-detail-cell .val.sell { color: #ef4444; }
.qv-detail-cell .val.muted { color: #9090a8; font-style: italic; font-weight: 500; }
.qv-detail-cell .val.gr-A, .qv-detail-cell .val.gr-Aplus { color: #22c55e; }
.qv-detail-cell .val.gr-B { color: #A78BFA; }
.qv-detail-cell .val.gr-C { color: #7C5CFC; }
.qv-detail-cell .val.gr-D, .qv-detail-cell .val.gr-Dplus { color: #fb923c; }

.qv-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #7c7c94;
  text-transform: uppercase;
  margin: 18px 0 10px;
  padding-left: 2px;
}

/* Reason block */
.qv-reason {
  background: linear-gradient(135deg, rgba(26,26,46,0.7) 0%, rgba(13,13,24,0.7) 100%);
  border-left: 3px solid #7C5CFC;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: #c0d0e0;
  line-height: 1.55;
  font-family: 'Rubik', sans-serif;
  margin-bottom: 16px;
}
.qv-reason.empty {
  color: #7c7c94;
  font-style: italic;
}

/* Mood pills */
.qv-mood-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.qv-mood-pill {
  background: rgba(8,8,16,0.6);
  border: 1px solid rgba(40,30,70,0.6);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 11px;
  color: #c0d0e0;
  font-family: 'JetBrains Mono', monospace;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.qv-mood-pill strong {
  color: #9090a8;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.qv-mood-pill.fomo { border-color: rgba(239,68,68,0.4); color: #ef4444; }
.qv-mood-pill.calm { border-color: rgba(34,197,94,0.4); color: #22c55e; }
.qv-mood-pill.neutral { color: #a0a0b0; }

/* Withdrawal list */
.qv-wd-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.qv-wd-summary-cell {
  background: rgba(8,8,16,0.6);
  border: 1px solid rgba(40,30,70,0.5);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.qv-wd-summary-cell .lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #7c7c94;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.qv-wd-summary-cell .val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 19px;
  font-weight: 800;
  font-feature-settings: "zero" 1, "tnum" 1;
  font-variant-numeric: slashed-zero tabular-nums;
}
.qv-wd-summary-cell .val.green { color: #22c55e; }
.qv-wd-summary-cell .val.purple { color: #A78BFA; }
.qv-wd-summary-cell .val.blue { color: #60A5FA; }

.qv-wd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qv-wd-item {
  background: linear-gradient(135deg, rgba(13,45,26,0.4) 0%, rgba(8,8,16,0.7) 100%);
  border: 1px solid rgba(22,101,52,0.4);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.qv-wd-item:hover {
  border-color: rgba(34,197,94,0.7);
  transform: translateX(3px);
  box-shadow: 0 6px 18px -4px rgba(34,197,94,0.2);
}
.qv-wd-item-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.qv-wd-item-date {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: "zero" 1, "tnum" 1;
}
.qv-wd-item-time {
  font-size: 11px;
  color: #9090a8;
  font-family: 'JetBrains Mono', monospace;
}
.qv-wd-item-note {
  font-size: 12px;
  color: #a0a0b0;
  font-style: italic;
  margin-top: 4px;
  font-family: 'Rubik', sans-serif;
  word-break: break-word;
}
.qv-wd-item-amt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 800;
  color: #22c55e;
  font-feature-settings: "zero" 1, "tnum" 1;
  font-variant-numeric: slashed-zero tabular-nums;
  text-shadow: 0 0 18px rgba(34,197,94,0.3);
  white-space: nowrap;
}

.qv-empty {
  text-align: center;
  padding: 40px 20px;
  color: #7c7c94;
}
.qv-empty .icon { font-size: 42px; margin-bottom: 14px; display: block; opacity: 0.5; }
.qv-empty .msg { font-size: 13px; line-height: 1.6; }
.qv-empty strong { color: #A78BFA; }

/* Mobile tweaks */
@media (max-width: 640px) {
  .qv-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .qv-wd-summary { grid-template-columns: 1fr; }
  .qv-pnl-hero { flex-direction: column; align-items: flex-start; text-align: left; }
  .qv-pnl-meta { text-align: left; }
  .qv-modal { border-radius: 16px; }
  .qv-header { padding: 18px 20px; }
  .qv-body { padding: 18px 20px; }
}
