/* ═══════ BOTTOM REPORT BAR ═══════ */
.report-bar {
  background: linear-gradient(0deg, var(--deep), rgba(12,16,24,.7));
  border-top: 1px solid var(--border);
  display: flex;
  height: 34vh;
  min-height: 180px;
  max-height: 280px;
  position: relative;
}

.report-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.5), rgba(34,211,238,.5), transparent);
  opacity: .3;
}

.report-tabs {
  width: 180px;
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  border-right: 1px solid var(--border);
  gap: 3px;
  flex-shrink: 0;
}

.report-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .15s ease;
  text-align: left;
}
.report-tab:hover { background: var(--raised); color: var(--text-primary); }
.report-tab.active {
  background: var(--glow-accent);
  color: var(--flame);
  font-weight: 600;
}
.report-tab .rt-icon { font-size: 15px; opacity: .7; width: 20px; text-align: center; }

.report-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.report-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}
.report-desc { font-size: 10px; color: var(--text-ghost); }
.report-week-tabs {
  display: flex; gap: 4px; margin-left: auto;
}
.wk-tab {
  padding: 5px 14px;
  border-radius: var(--r-sm);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .15s ease;
}
.wk-tab:hover { border-color: rgba(255,255,255,.1); color: var(--text-primary); }
.wk-tab.active { border-color: var(--flame); color: var(--flame); background: var(--glow-accent); }

.report-table-wrap {
  flex: 1;
  overflow: auto;
  padding: 0;
}

/* ═══════ COMPACT DATA TABLE ═══════ */
.dtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.dtable th {
  background: var(--surface);
  padding: 7px 14px;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-ghost);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.dtable th.th-accent { color: var(--flame); }
.dtable th.th-num { text-align: right; }
.dtable th.th-total {
  text-align: center;
  color: var(--flame);
  background: var(--glow-accent);
}

.dtable td {
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.dtable tr:hover td { background: rgba(255,255,255,.02); }
.dtable tr.tr-me td { background: rgba(99,102,241,.05); }
.dtable tr.tr-me .td-name { color: var(--flame); border-left: 2px solid var(--flame); padding-left: 12px; }

.td-name { font-weight: 600; font-size: 14px; }
.td-val {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.td-val.v-gold { color: var(--gold); }
.td-val.v-red { color: var(--danger); }
.td-val.v-green { color: var(--success); }
.td-val.v-cyan { color: var(--cyan); }
.td-val.v-violet { color: var(--violet); }
.td-val.v-dim { color: var(--text-ghost); }
/* Bleeding-specific */
.td-hits {
  text-align: right;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  color: var(--danger);
}

/* Blood bags colors */
.report-bb .dtable th.th-accent { color: var(--danger); }
.report-bb .dtable th.th-total { color: var(--danger); background: var(--glow-danger); }
.report-bb .td-total { color: var(--danger); background: var(--glow-danger); }
.report-bb .td-val.v-gold { color: #fca5a5; }

/* Nerve colors */
.report-nerve .dtable th.th-accent { color: var(--violet); }
.report-nerve .dtable th.th-total { color: var(--violet); background: rgba(167,139,250,.06); }
.report-nerve .td-total { color: var(--violet); background: rgba(167,139,250,.06); }
.report-nerve .td-val.v-gold { color: #c4b5fd; }

/* ═══════ REPORT TABLE — DAY CELLS & ROWS ═══════ */

/* Alternating row stripes for readability */
#training-table tbody tr:nth-child(even) td,
#bb-table tbody tr:nth-child(even) td,
#nerve-table tbody tr:nth-child(even) td,
#bleeding-table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,.015);
}

/* Highlight own row */
.tr-self td {
  background: rgba(99,102,241,.06) !important;
  border-left: none;
}
.tr-self td:first-child {
  border-left: 2px solid var(--flame);
  color: var(--flame);
  font-weight: 700;
}

/* New row subtle glow */
.tr-new td {
  animation: rowPulse .6s ease-out;
}
@keyframes rowPulse {
  0% { background: rgba(99,102,241,.12); }
  100% { background: transparent; }
}

.data-sync-flash {
  animation: dataSyncFlash .55s ease-out;
}

.yt-card.data-sync-flash {
  animation: dataSyncCardFlash .6s ease-out;
}

@keyframes dataSyncFlash {
  0% {
    background: rgba(99,102,241,.07);
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.22), 0 0 0 0 rgba(99,102,241,.16);
  }
  100% {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,0), 0 0 0 10px rgba(99,102,241,0);
  }
}

@keyframes dataSyncCardFlash {
  0% {
    transform: translateY(-1px);
    border-color: rgba(99,102,241,.35);
    box-shadow: 0 10px 28px rgba(99,102,241,.12);
  }
  100% {
    transform: translateY(0);
    border-color: var(--border);
    box-shadow: none;
  }
}

/* Hover on report table rows */
#training-table tbody tr:hover td,
#bb-table tbody tr:hover td,
#nerve-table tbody tr:hover td,
#bleeding-table tbody tr:hover td {
  background: rgba(255,255,255,.035);
}

/* Day cell — right-align, mono numbers */
.td-day {
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 5px 10px !important;
  min-width: 56px;
}

/* Inner flex wrapper inside day cells */
.td-day-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Number stack (energy + xanax) */
.td-day-nums {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

/* Energy value — bold gold */
.td-day-energy {
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
  line-height: 1.3;
}

.td-day-energy-in {
  font-size: 9px;
  font-weight: 700;
  color: var(--success);
  line-height: 1.2;
}

/* Xanax count — small muted badge */
.td-day-xanax {
  font-size: 9px;
  font-weight: 600;
  color: var(--cyan);
  opacity: .8;
  letter-spacing: .5px;
}

/* OD badge — danger accent */
.td-day-od {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--danger);
  background: rgba(251,113,133,.12);
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
}

/* Training total column */
.td-total {
  text-align: center !important;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--flame);
  background: rgba(99,102,241,.06);
  min-width: 70px;
}

/* Blood bag day value */
.td-day-bb {
  font-weight: 700;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.3;
}

/* Blood bag total */
.td-bb-total {
  text-align: center !important;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--danger);
  background: rgba(244,63,94,.06);
  min-width: 70px;
}

/* Nerve day value */
.td-day-nerve {
  font-weight: 700;
  color: var(--violet);
  font-size: 14px;
  line-height: 1.3;
}

/* Nerve total */
.td-nerve-total {
  text-align: center !important;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--violet);
  background: rgba(167,139,250,.06);
  min-width: 70px;
}

/* ═══════ BLEEDING TABLE CELLS ═══════ */
.td-bleed-hits {
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.td-bleed-hosp {
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

.td-bleed-respect {
  text-align: center;
  vertical-align: middle;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

/* No-key icon */
.no-key-icon {
  margin-left: 6px;
  font-size: 10px;
  opacity: .5;
}

/* ═══════ STATS PANEL — ROWS & BARS ═══════ */

.stats-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 8px;
  margin-top: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.stats-section-title {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.stats-copy-btn {
  margin-left: auto;
  padding: 4px 14px;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-ghost);
  cursor: pointer;
  transition: all .15s;
}
.stats-copy-btn:hover {
  border-color: var(--flame);
  color: var(--flame);
  background: var(--glow-accent);
}

.stats-stat-row {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.stats-total-row {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.stats-total-row .stats-stat-label {
  font-size: 11px;
  font-weight: 800;
}
.stats-total-row .stats-bar-fill {
  opacity: .6;
}

.stats-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stats-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}

.stats-stat-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
  min-width: 140px;
}

.stats-mod-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  padding: 4px 0;
}

.stats-mod-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--cyan);
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.15);
  border-radius: 20px;
}
