/* 26/05/2026: pagina "Previsoes" do painel principal.
   Replica visual da aba Previsoes do admin module - mesmo modelo,
   mesma tabela, mesmas cores. Variaveis derivadas das ja existentes
   em styles.css (--text, --card, --accent, --warning, --text2/3). */

.fc-shell {
  margin-left: 240px;
  padding: 24px 32px 64px;
  min-height: 100vh;
  transition: margin-left 0.18s ease;
  --fc-good: #22c55e;
  --fc-warn: #f59e0b;
  --fc-danger: #ef4444;
}
body[data-app-sidebar-collapsed="true"] .fc-shell { margin-left: 64px; }

.fc-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.fc-header h1 { font-size: 22px; margin: 0 0 4px; color: var(--text); font-weight: 700; }
.fc-sub { color: var(--text3); font-size: 12px; margin: 0; max-width: 760px; }
.fc-actions { display: flex; align-items: center; gap: 10px; }
.fc-btn {
  padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 12px; cursor: pointer;
  font-weight: 600; transition: all 0.15s;
}
.fc-btn:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.fc-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.fc-status {
  font-size: 12px; color: var(--text3);
  padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  margin-bottom: 16px;
}

.fc-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.fc-summary .card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px;
}
.fc-summary .kpi-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text3); font-weight: 700; margin-bottom: 6px;
}
.fc-summary .kpi-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.1; margin-bottom: 4px; }
.fc-summary .hint { font-size: 11px; color: var(--text3); }

.fc-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.fc-section-sub { font-size: 12px; color: var(--text3); margin: 0 0 12px; }

.fc-table-wrap {
  overflow: auto; max-height: calc(100vh - 320px);
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--card);
}
.fc-table { min-width: 1680px; width: 100%; border-collapse: collapse; font-size: 12px; color: var(--text); }
.fc-table th {
  position: sticky; top: 0; z-index: 2;
  background: var(--header); white-space: nowrap;
  padding: 8px 10px; text-align: center; vertical-align: middle;
  border-bottom: 1px solid var(--border); color: var(--text2);
}
.fc-table .fc-group-row th {
  top: 0; background: var(--header); color: var(--text);
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px;
}
.fc-table .fc-column-row th { top: 36px; }
.fc-table th:first-child, .fc-table .fixture-cell { text-align: left; }
.fc-table td {
  white-space: nowrap; text-align: center; vertical-align: middle;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.fc-table tbody tr { cursor: pointer; }
.fc-table tbody tr:hover { background: rgba(79, 142, 247, 0.08); }
.fc-table tbody tr.fc-row-selected {
  background: rgba(79, 142, 247, 0.16);
  box-shadow: inset 4px 0 0 var(--accent);
}
.fc-table .fixture-cell { white-space: normal; min-width: 220px; }
.fc-table .prob-good { color: var(--fc-good); font-weight: 800; }
.fc-table .prob-mid  { color: var(--fc-warn); font-weight: 800; }
.fc-table .prob-low  { color: var(--fc-danger); font-weight: 800; }
.fc-table .prob-hot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; padding: 2px 7px; border-radius: 7px;
  color: #ecfeff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.42), rgba(37, 99, 235, 0.32));
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.55);
}
.fc-sort-btn {
  width: 100%; border: 0; background: transparent; color: inherit;
  font: inherit; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0; text-align: left;
}
.fc-sort-btn::after { content: '\2195'; color: var(--text3); font-size: 10px; }
.fc-sort-btn.active.asc::after  { content: '\2191'; color: var(--accent); }
.fc-sort-btn.active.desc::after { content: '\2193'; color: var(--accent); }

.status-good { color: var(--fc-good); font-weight: 800; }
.status-warn { color: var(--fc-warn); font-weight: 800; }

/* Linhas divisorias verticais entre grupos (mesma logica do admin) */
.fc-table .fc-column-row th:nth-child(5),
.fc-table .fc-column-row th:nth-child(10),
.fc-table .fc-column-row th:nth-child(16),
.fc-table .fc-column-row th:nth-child(22),
.fc-table .fc-column-row th:nth-child(26),
.fc-table .fc-column-row th:nth-child(28),
.fc-table .fc-column-row th:nth-child(32),
.fc-table tbody td:nth-child(5),
.fc-table tbody td:nth-child(10),
.fc-table tbody td:nth-child(16),
.fc-table tbody td:nth-child(22),
.fc-table tbody td:nth-child(26),
.fc-table tbody td:nth-child(28),
.fc-table tbody td:nth-child(32) { border-left: 2px solid rgba(79, 142, 247, 0.28); }
.fc-table .fc-group-row th + th { border-left: 2px solid rgba(79, 142, 247, 0.35); }
