/* =====================================================
   TRADING INFOGRAPHIC AI — Report CSS (dark dashboard)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --ti-bg:       #0d1117;
  --ti-surface:  #161b22;
  --ti-surface2: #1c2333;
  --ti-border:   #30363d;
  --ti-accent:   #00d4ff;
  --ti-green:    #00e676;
  --ti-red:      #ff4d6d;
  --ti-orange:   #ff9f43;
  --ti-purple:   #bf5af2;
  --ti-blue:     #00d4ff;
  --ti-text:     #e6edf3;
  --ti-muted:    #8b949e;
}

.ti-report {
  font-family: 'Inter', system-ui, sans-serif;
  background:  var(--ti-bg);
  color:       var(--ti-text);
  padding:     0;
}

/* ── PÁGINA ────────────────────────────────────────── */
.ti-page {
  padding:     32px 36px;
  max-width:   1400px;
  margin:      0 auto;
}

.ti-page + .ti-page {
  border-top: 1px solid var(--ti-border);
  margin-top: 24px;
  padding-top: 40px;
}

/* ── HEADER DA PÁGINA ──────────────────────────────── */
.ti-page-header {
  display:         flex;
  align-items:     flex-start;
  justify-content: space-between;
  margin-bottom:   28px;
  gap:             16px;
}

.ti-page-title {
  font-size:     32px;
  font-weight:   900;
  letter-spacing: -1px;
  color:         var(--ti-text);
  margin:        0 0 6px;
}

.ti-page-sub {
  color:     var(--ti-muted);
  font-size: 14px;
  margin:    0;
}

.ti-btn-pdf {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  background:    linear-gradient(135deg, var(--ti-accent), #0099cc);
  border-radius: 10px;
  color:         #000 !important;
  font-size:     13px;
  font-weight:   700;
  padding:       10px 20px;
  text-decoration: none !important;
  white-space:   nowrap;
  transition:    all 0.2s;
  flex-shrink:   0;
}

.ti-btn-pdf:hover {
  transform:  translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,212,255,0.35);
}

/* ── MÉTRICAS ──────────────────────────────────────── */
.ti-metrics-row {
  display:               grid;
  grid-template-columns: repeat(5, 1fr);
  gap:                   12px;
  margin-bottom:         12px;
}

.ti-metrics-row-2 { margin-bottom: 24px; }

.ti-metric-card {
  background:    var(--ti-surface);
  border:        1px solid var(--ti-border);
  border-radius: 14px;
  padding:       18px 16px 14px;
  display:       flex;
  flex-direction: column;
  gap:           6px;
  transition:    border-color 0.2s, transform 0.2s;
}

.ti-metric-card:hover {
  border-color: var(--ti-accent);
  transform:    translateY(-2px);
}

.ti-metric-label {
  font-size:      11px;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color:          var(--ti-muted);
}

.ti-metric-value {
  font-size:   26px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.ti-metric-sub {
  font-size: 11px;
  color:     var(--ti-muted);
}

/* value colors */
.ti-val-green  { color: var(--ti-green); }
.ti-val-red    { color: var(--ti-red); }
.ti-val-orange { color: var(--ti-orange); }
.ti-val-blue   { color: var(--ti-accent); }
.ti-val-purple { color: var(--ti-purple); }

/* ── GRÁFICOS ──────────────────────────────────────── */
.ti-charts-row {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   16px;
  margin-bottom:         16px;
}

.ti-chart-card {
  background:    var(--ti-surface);
  border:        1px solid var(--ti-border);
  border-radius: 14px;
  padding:       20px 20px 16px;
}

.ti-chart-card h3 {
  font-size:     15px;
  font-weight:   700;
  color:         var(--ti-text);
  margin:        0 0 16px;
}

.ti-chart-card canvas {
  max-height: 240px;
}

.ti-chart-wide {
  grid-column: span 1;
}

/* ── BUY VS SELL ───────────────────────────────────── */
.ti-bvs-cards {
  display:        flex;
  flex-direction: column;
  gap:            12px;
  margin-top:     8px;
}

.ti-bvs-card {
  background:    var(--ti-surface2);
  border:        1px solid var(--ti-border);
  border-radius: 10px;
  padding:       16px;
  display:       flex;
  flex-direction: column;
  gap:           4px;
}

.ti-bvs-dir {
  font-size:   11px;
  font-weight: 700;
  color:       var(--ti-muted);
  letter-spacing: 1px;
}

.ti-bvs-pnl {
  font-size:   22px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.ti-bvs-meta {
  font-size: 12px;
  color:     var(--ti-muted);
}

/* ── COMBOS TABLE ──────────────────────────────────── */
.ti-combos-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       13px;
}

.ti-combos-table th {
  text-align: left;
  color:      var(--ti-muted);
  font-size:  11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding:    6px 8px 10px;
  border-bottom: 1px solid var(--ti-border);
}

.ti-combos-table td {
  padding:       8px 8px;
  border-bottom: 1px solid rgba(48,54,61,0.5);
}

.ti-combo-name {
  font-weight: 600;
  color:       var(--ti-text);
}

/* ── INSIGHTS ──────────────────────────────────────── */
.ti-insights-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   16px;
  margin-bottom:         24px;
}

.ti-insight-card {
  background:    var(--ti-surface);
  border:        1px solid;
  border-radius: 14px;
  padding:       20px 22px;
  opacity:       0.9;
  transition:    transform 0.2s, opacity 0.2s;
}

.ti-insight-card:hover {
  transform: translateY(-2px);
  opacity:   1;
}

.ti-insight-card h4 {
  font-size:   15px;
  font-weight: 700;
  margin:      0 0 10px;
}

.ti-insight-card p {
  font-size:   13px;
  color:       var(--ti-muted);
  margin:      0;
  line-height: 1.6;
}

/* ── RANKING TABLE ─────────────────────────────────── */
.ti-ranking-section h3 {
  font-size:     18px;
  font-weight:   800;
  margin-bottom: 14px;
  color:         var(--ti-text);
}

.ti-ranking-table {
  width:           100%;
  border-collapse: collapse;
  font-size:       13px;
}

.ti-ranking-table th {
  text-align:    left;
  color:         var(--ti-muted);
  font-size:     11px;
  font-weight:   600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding:       8px 12px;
  border-bottom: 1px solid var(--ti-border);
  background:    var(--ti-surface);
}

.ti-ranking-table td {
  padding:       10px 12px;
  border-bottom: 1px solid rgba(48,54,61,0.4);
}

.ti-rank-asset {
  font-weight: 700;
  color:       var(--ti-text);
}

.ti-ranking-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ── FOOTER ────────────────────────────────────────── */
.ti-footer {
  display:         flex;
  justify-content: space-between;
  margin-top:      32px;
  padding-top:     16px;
  border-top:      1px solid var(--ti-border);
  font-size:       12px;
  color:           var(--ti-muted);
}

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  .ti-metrics-row { grid-template-columns: repeat(3, 1fr); }
  .ti-charts-row  { grid-template-columns: 1fr; }
  .ti-insights-grid { grid-template-columns: 1fr; }
  .ti-page { padding: 20px 16px; }
  .ti-page-title { font-size: 22px; }
  .ti-metric-value { font-size: 20px; }
}

@media (max-width: 600px) {
  .ti-metrics-row { grid-template-columns: 1fr 1fr; }
}
