/* ── Profit-Analyse ── */
.profit-table-scroll {
  overflow-x: auto;
}

.profit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 680px;
}

.profit-table th {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  white-space: nowrap;
}
.profit-th-sort {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
.profit-th-sort:hover { color: var(--text-secondary); }
.profit-sort-icon { color: var(--accent); font-style: normal; }

.profit-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.profit-row:hover td { background: var(--bg-card); }
.profit-row.profitable { border-left: 2px solid var(--success); }
.profit-row.unprofitable { border-left: 2px solid var(--danger); }
.profit-row-error td { color: var(--text-muted); font-size: 0.75rem; border-left: 2px solid var(--border); }

.profit-positive { color: var(--success) !important; }
.profit-negative { color: var(--danger)  !important; }

.profit-cost-cell {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-secondary);
}
.profit-cost-cell:hover { color: var(--text-primary); }

.profit-breakdown-popup {
  position: absolute;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
  min-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* ── Profit – Division Tabs & Badges ── */
.profit-tab {
  padding: 0.35rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.12s;
}
.profit-tab:hover { border-color: var(--border-hover); color: var(--text-primary); }
.profit-tab.active { background: var(--accent-dim); border-color: var(--accent-border); color: var(--accent); }

.profit-div-badge {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 500;
  vertical-align: middle;
}
.profit-div-workbench     { background: rgba(0,201,255,0.12); color: #00c9ff; }
.profit-div-cyber-warfare { background: rgba(160,100,255,0.12); color: #a064ff; }
.profit-div-pharmacy      { background: rgba(0,229,160,0.12); color: #00e5a0; }
.profit-div-armor-bench   { background: rgba(255,159,67,0.12); color: #ff9f43; }

.profit-yield-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: middle;
  background: rgba(255, 214, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 214, 0, 0.25);
}
.profit-yield-badge--btn {
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.profit-yield-badge--btn:hover {
  background: rgba(255, 214, 0, 0.28);
  border-color: rgba(255, 214, 0, 0.5);
}
