/* ═══════════════════════════════════════════════════════════
   DERIVATIVES - COMPACT & MODERN (On-Chain Style)
   ═══════════════════════════════════════════════════════════ */

.deriv-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px 0;
}

.deriv-mini-card {
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px;
  background: rgba(10, 12, 20, 0.9);
  transition: all 0.2s ease;
}

.deriv-mini-card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.08);
}

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

.deriv-mini-title {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.deriv-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(100, 100, 120, 0.15);
  color: var(--text-secondary);
  font-weight: 600;
}

.deriv-badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--positive);
}

.deriv-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--negative);
}

.deriv-badge-warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.deriv-badge-accent {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
}

/* L/S Mini Stats */
.ls-compact-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ls-compact-row {
  display: grid;
  grid-template-columns: 30px 1fr 80px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.ls-tf-label {
  color: #a78bfa;
  font-weight: 600;
  font-size: 10px;
}

.ls-bar-mini {
  display: flex;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.ls-bar-long {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.ls-bar-short {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.ls-values {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
}

/* Liquidations Mini */
.liq-mini-row {
  display: grid;
  grid-template-columns: 28px 1fr 60px 16px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}

.liq-mini-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 10px;
}

.liq-mini-bar {
  display: flex;
  height: 14px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.liq-seg-long {
  background: linear-gradient(90deg, #10b981, #059669);
}

.liq-seg-short {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.liq-mini-value {
  color: #fbbf24;
  font-weight: 600;
  font-size: 10px;
  text-align: right;
}

.liq-mini-icon {
  font-size: 12px;
  text-align: center;
}

/* OI Mini */
.oi-mini-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.oi-mini-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.oi-mini-ex {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 10px;
}

.oi-mini-bar-bg {
  height: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  overflow: hidden;
}

.oi-mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.oi-mini-val {
  color: #a78bfa;
  font-weight: 600;
  font-size: 10px;
  text-align: right;
}

/* Exchange Mini Breakdown */
.ex-mini-row {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}

.ex-mini-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 10px;
}

.ex-mini-bar {
  display: flex;
  height: 14px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.ex-seg-long {
  background: linear-gradient(90deg, #10b981, #059669);
}

.ex-seg-short {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.ex-mini-val {
  color: #fbbf24;
  font-weight: 600;
  font-size: 10px;
  text-align: right;
}

/* Loading state */
.deriv-mini-stats .loading,
.deriv-mini-periods .loading,
.deriv-mini-oi .loading,
.deriv-mini-exchanges .loading {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}

/* Responsive */
@media (max-width: 1400px) {
  .deriv-compact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .deriv-compact-grid {
    grid-template-columns: 1fr;
  }
}

