/* Event Revenue Forecast grid — shared by two mounts.
 *
 * Rendered by templates/partials/event_forecast_grid.html on BOTH
 * /dept/events?tab=forecast and /dept/revops?tab=forecast&view=events.
 * Scoped to .efc-panel rather than #panel-forecast so the same rules apply
 * wherever it is mounted; the events page keeps that id on the wrapper for
 * its own tab machinery. */

.efc-panel { padding: 8px 12px 16px !important; }

.efc-panel .fc-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.efc-panel .fc-title { font-size: 14px; font-weight: 600; color: var(--text); }
.efc-panel .fc-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.efc-panel .eo-kpi-strip {
  margin-bottom: 8px !important;
  gap: 6px;
  grid-template-columns: repeat(9, minmax(0, 1fr));
}
.efc-panel .eo-kpi { padding: 8px 10px; }
.efc-panel .eo-kpi-label { font-size: 9px; letter-spacing: .04em; }
.efc-panel .eo-kpi-value { font-size: 15px; }
.efc-panel .eo-kpi-sub { font-size: 10px; }

.efc-panel .fc-table-wrap { overflow-x: auto; margin: 0 -4px; }
.efc-panel table.fc-table {
  width: 100%; border-collapse: collapse; font-size: 11px;
  table-layout: auto;
}
.efc-panel table.fc-table th,
.efc-panel table.fc-table td {
  padding: 3px 5px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.efc-panel table.fc-table th {
  font-size: 9px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-muted); font-weight: 600; cursor: pointer;
  position: sticky; top: 0; background: var(--bg, #fff); z-index: 1;
}
.efc-panel table.fc-table th.fc-num,
.efc-panel table.fc-table td.fc-num { text-align: right !important; }
.efc-panel table.fc-table th.fc-left,
.efc-panel table.fc-table td.fc-left { text-align: left !important; }
.efc-panel table.fc-table th.fc-center,
.efc-panel table.fc-table td.fc-center { text-align: center !important; }
.efc-panel table.fc-table td.fc-name {
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; text-align: left !important;
}

/* Section separators: Forecast block, then Commit block at far right */
.efc-panel table.fc-table th.fc-sec,
.efc-panel table.fc-table td.fc-sec {
  border-left: 2px solid var(--border-light, var(--border));
  padding-left: 8px;
}
.efc-panel table.fc-table tbody tr.fc-alt td {
  background: color-mix(in srgb, var(--bg-muted, #f3f4f6) 55%, transparent);
}
.efc-panel table.fc-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent, #6366f1) 8%, transparent);
}

.efc-panel .fc-input {
  width: 64px; text-align: right; padding: 1px 3px; font-size: 11px;
  border: 1px solid var(--border); border-radius: 3px; background: var(--bg, #fff);
  color: var(--text); box-sizing: border-box;
}
.efc-panel .fc-input.fc-computed { color: var(--text-muted); font-style: italic; }
.efc-panel .fc-input.fc-override { color: var(--text); font-style: normal; border-color: var(--accent); }

.efc-panel .fc-note {
  width: 80px; padding: 1px 3px; font-size: 11px; text-align: left;
  border: 1px solid var(--border); border-radius: 3px; background: var(--bg, #fff);
  color: var(--text); box-sizing: border-box;
}

.efc-panel .fc-risk {
  font-size: 10px; padding: 1px 5px; border-radius: 3px;
  background: var(--bg-muted, #f3f4f6); white-space: nowrap;
}
.efc-panel .fc-risk.green { color: var(--success); }
.efc-panel .fc-risk.yellow { color: var(--warning); }
.efc-panel .fc-risk.red { color: var(--error); }

.efc-panel .fc-q { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.efc-panel .fc-foot {
  margin-top: 6px; font-size: 10px; color: var(--text-muted); line-height: 1.35;
}

/* ── Week-over-week ──────────────────────────────────────────────────
 * A WoW cell has three states and they must not look alike: a signed
 * movement, a flat week (0), and "we could not know" (—). The muted dash
 * is deliberately the same weight as any other missing value, because a
 * confident-looking zero is the failure mode this column exists to avoid. */
.efc-panel td.fc-wow { font-variant-numeric: tabular-nums; }
.efc-panel td.fc-wow.up { color: var(--success); }
.efc-panel td.fc-wow.down { color: var(--error); }
.efc-panel td.fc-wow.flat,
.efc-panel td.fc-wow.none { color: var(--text-muted); }
.efc-panel th.fc-wow-h { color: var(--text-muted); }

.efc-panel .fc-wow-banner {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 6px 9px; border-radius: 5px; font-size: 11px;
  line-height: 1.4;
  border: 1px solid color-mix(in srgb, var(--warning, #d97706) 35%, transparent);
  background: color-mix(in srgb, var(--warning, #d97706) 8%, transparent);
  color: var(--text);
}
.efc-panel .fc-wow-banner.info {
  border-color: var(--border);
  background: color-mix(in srgb, var(--bg-muted, #f3f4f6) 60%, transparent);
  color: var(--text-muted);
}
.efc-panel .fc-wow-banner b { font-weight: 600; }

@media (max-width: 1400px) {
  .efc-panel .eo-kpi-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .efc-panel .eo-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
