/* ==========================================================================
   Content & Storylines Workspace Styles 2.0
   Non-AI-Slop, High-Density Editorial & Analytics Layout
   ========================================================================== */

.storylines-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

/* Header & Filter Controls */
.storylines-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
}

.storylines-title-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.storylines-title-block p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.storylines-filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.storylines-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.storylines-filter-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.storylines-filter-btn.active {
  background-color: var(--tappa-orange-subtle);
  border-color: var(--tappa-orange);
  color: var(--tappa-orange);
  font-weight: 600;
}

/* Category Semantic Badges - Restrained Zero-Slop Design */
.storyline-cat-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.16rem 0.48rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
}

.cat-fa {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.cat-trade {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.cat-team {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.cat-player {
  background: var(--tappa-orange-subtle);
  color: var(--tappa-orange);
  border: 1px solid var(--tappa-orange-border);
}

/* Backward compatibility aliases */
.cat-role-expansion, .cat-stealth-leap, .cat-breakout-supernova, .cat-efficiency-surge, .cat-rookie-leap {
  background: var(--tappa-orange-subtle);
  color: var(--tappa-orange);
  border: 1px solid var(--tappa-orange-border);
}
.cat-team-pivot {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.cat-defensive-menace {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.25);
}
.cat-trade-impact, .cat-player-trade, .cat-team-trade {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.cat-fa-signing {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Restrained Segmented Sort Selector */
.storylines-sort-control {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-surface-elevated);
  padding: 0.18rem 0.35rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

.storylines-sort-control .sort-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0 0.3rem;
}

.storylines-sort-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-sans);
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.storylines-sort-btn:hover {
  color: var(--text-primary);
}

.storylines-sort-btn.active {
  background: var(--bg-surface);
  border-color: var(--border-default);
  color: var(--text-primary);
  font-weight: 600;
}

.storyline-player-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.storyline-player-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.storyline-btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--tappa-orange);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.storyline-btn-profile:hover {
  background: var(--tappa-orange-subtle);
  border-color: var(--tappa-orange);
  color: #fff;
}

.storyline-btn-team {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #c084fc;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.storyline-btn-team:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #c084fc;
  color: #fff;
}

.storyline-team-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.storyline-team-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* Form Tracking Badges */
.storyline-form-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

.form-surging {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.form-slumping {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.form-inconsistent {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.form-pivot {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Granular Root Causes Box on Card */
.storyline-root-causes-card {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.76rem;
  line-height: 1.45;
}

.storyline-cause-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  padding-bottom: 0.3rem;
  margin-bottom: 0.15rem;
}

.storyline-cause-line {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--text-secondary);
}

.storyline-cause-bullet {
  color: var(--tappa-orange);
  font-weight: bold;
  flex-shrink: 0;
}

.storyline-catalysts-container {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.storyline-catalyst-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.storyline-catalyst-tag:hover {
  border-color: var(--tappa-orange);
  background: var(--tappa-orange-subtle);
  color: #fff;
}

.storyline-catalyst-tag img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface);
}

/* Feed Grid */
.storylines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 1rem;
}

.storyline-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.storyline-card:hover {
  border-color: var(--border-default);
  background-color: var(--bg-surface-elevated);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.storyline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.storyline-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.storyline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.storyline-team-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.storyline-headline {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.storyline-teaser {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.storyline-trigger-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-dim);
  border: 1px solid var(--accent-emerald-border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  align-self: flex-start;
}

.storyline-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Preview Drawer (Slide-Over Panel) */
.storyline-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.storyline-drawer {
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  width: 100%;
  max-width: 520px;
  height: 100vh;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.storyline-drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.storyline-drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.storyline-drawer-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface-elevated);
}

/* Full Brief Deliverable Surface */
.full-brief-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.full-brief-header-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editable-headline-input {
  width: 100%;
  background-color: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.editable-headline-input:focus {
  outline: none;
  border-color: var(--tappa-orange);
}

.editable-textarea {
  width: 100%;
  min-height: 100px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}

.editable-textarea:focus {
  outline: none;
  border-color: var(--tappa-orange);
}

.evidence-table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.export-panel-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.export-panel-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.format-tab {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.format-tab:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.format-tab.active {
  background-color: var(--tappa-orange-subtle);
  border-color: var(--tappa-orange);
  color: var(--tappa-orange);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.export-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.export-action-btn:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.export-preview-box {
  padding: 1.25rem;
  background-color: var(--bg-app);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
}

.provenance-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Granular Brief Dossier Surfaces */
.granular-brief-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.granular-brief-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.granular-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .granular-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.granular-metric-card {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.granular-metric-card:hover {
  border-color: var(--border-default);
  background: var(--bg-surface-elevated);
}

.granular-metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.granular-metric-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.granular-metric-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.granular-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-app);
}

.granular-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.granular-table-container th {
  padding: 0.55rem 0.65rem;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.granular-table-container td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  white-space: nowrap;
}

.granular-table-container tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Streak Autopsy & Team Attribution Styling */
.streak-autopsy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.streak-autopsy-card.skid {
  border-left: 3px solid var(--accent-rose);
  background: var(--bg-surface);
}

.streak-autopsy-card.surge {
  border-left: 3px solid var(--accent-emerald);
  background: var(--bg-surface);
}

.streak-autopsy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0.85rem 0;
}

@media (max-width: 768px) {
  .streak-autopsy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.streak-autopsy-item {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.streak-autopsy-item-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.streak-autopsy-item-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.streak-autopsy-item-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.badge-attribution {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-attribution.drag {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.badge-attribution.absentee {
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.badge-attribution.defense {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

.badge-attribution.anchor {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.badge-attribution.regular {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.row-streak-skid {
  background: rgba(239, 68, 68, 0.04) !important;
}

.row-streak-surge {
  background: rgba(16, 185, 129, 0.04) !important;
}

@media (max-width: 1024px) {
  .storylines-grid {
    grid-template-columns: 1fr;
  }
}

/* Trade Impact & Stint Styles */
.cat-trade-impact {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
}

.cat-player-trade {
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
}

.cat-team-trade {
  background: var(--tappa-orange-subtle);
  color: var(--tappa-orange);
  border: 1px solid var(--tappa-orange-border);
}

.storyline-trade-stint-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-xs);
  background: var(--accent-amber-dim);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber-border);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.storyline-trade-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: rgba(56, 189, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-blue);
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.storyline-card:hover .storyline-trade-avatar {
  transform: scale(1.05);
  border-color: var(--accent-blue);
}

.storyline-trade-code-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-xs);
  background: var(--tappa-orange-subtle);
  color: var(--tappa-orange);
  border: 1px solid var(--tappa-orange-border);
  letter-spacing: 0.03em;
}

.trade-autopsy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
}

.trade-delta-positive {
  color: var(--accent-emerald) !important;
  font-weight: 700;
}

.trade-delta-negative {
  color: #f87171 !important;
  font-weight: 700;
}

/* ==========================================================================
   BRIEF ENRICHED SURFACE (Slash Line, Contract Bar, Team Standings)
   ========================================================================== */
.brief-slash-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.brief-stat-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color 0.15s ease;
}

.brief-stat-pill:hover {
  border-color: var(--border-default);
}

.brief-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brief-stat-rank {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--tappa-orange);
  background: var(--tappa-orange-subtle);
  padding: 0.05rem 0.35rem;
  border-radius: var(--radius-xs);
  font-weight: 700;
}

.brief-stat-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.brief-stat-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.brief-contract-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--tappa-orange);
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.85rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 0.65rem;
}

.brief-contract-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.brief-contract-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.brief-team-standings-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--tappa-orange);
  border-radius: var(--radius-xs);
  padding: 0.55rem 0.85rem;
  font-size: 0.76rem;
  margin-top: 0.65rem;
}

/* ==========================================================================
   ALERT SIGNATURE HERO MODULE & MULTI-PILLAR DEEP DIVE (Solid Surfaces, Zero Slop)
   ========================================================================== */
.alert-signature-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.alert-signature-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.6rem;
}

.signature-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.signature-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.signature-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.65rem;
}

.signature-metric-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: border-color 0.15s ease;
}

.signature-metric-card:hover {
  border-color: var(--border-default);
}

.signature-metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.signature-metric-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.signature-metric-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.signature-table-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.85rem 1rem;
  overflow-x: auto;
}

/* ==========================================================================
   PREVIEW DRAWER ENHANCED SNAPSHOTS (Trade & Player Executive Preview)
   ========================================================================== */
.drawer-trade-tracker-preview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.drawer-cba-pill-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 0.45rem;
}

.drawer-deal-summary-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.75rem;
}

.drawer-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
}

.drawer-stint-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.drawer-stint-card {
  background: var(--bg-surface);
  padding: 0.4rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.drawer-stint-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.drawer-stint-val {
  font-size: 0.92rem;
  font-weight: 700;
}

.drawer-stint-val.pos {
  color: var(--accent-emerald);
}

.drawer-stint-val.neg {
  color: var(--accent-rose);
}

.drawer-stint-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

.drawer-assets-tray {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 0.45rem;
}

.drawer-alert-sig-box {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drawer-hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}

.drawer-hero-metric-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.drawer-hero-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.drawer-hero-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.drawer-hero-sub {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.moves-tracker-picks-section {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.65rem 0.85rem;
  margin-top: 0.4rem;
}

.moves-tracker-pick-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.moves-tracker-pick-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.5rem;
  color: var(--text-primary);
}

/* ==========================================================================
   TEAM DOSSIER TABBED NAVIGATION (Section 1: Multi-Team Impact)
   ========================================================================== */
.team-dossier-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.team-dossier-tab-bar {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.team-dossier-tab-bar::-webkit-scrollbar {
  display: none;
}

.team-dossier-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  user-select: none;
  text-align: left;
  min-width: 200px;
}

.team-dossier-tab-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.team-dossier-tab-btn.active {
  background: var(--bg-surface-elevated);
  border-color: var(--border-default);
  border-bottom: 2px solid var(--accent-blue);
  color: var(--text-primary);
}

.team-dossier-tab-btn.active::after {
  display: none;
}

.team-dossier-tab-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.team-dossier-tab-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.team-dossier-tab-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
}

.team-dossier-tab-code {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.team-dossier-tab-fullname {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.team-dossier-tab-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.team-dossier-panels {
  width: 100%;
}

.team-dossier-panel {
  display: none;
  width: 100%;
}

.team-dossier-panel.active {
  display: block;
  animation: fadeInTab 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.dossier-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 860px) {
  .dossier-split-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
