/* ================================================================
   FRIDAY AI — Indicadores Econômicos & KPIs de Negócios
   W34 — 2026-04-02
   ================================================================ */

.ind-page {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* -------- Header -------- */
.ind-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.ind-title {
  font-size: 22px;
  font-weight: 700;
  color: #e8f4ff;
}

.ind-subtitle {
  font-size: 13px;
  color: #6b7a99;
  margin-top: 4px;
}

.ind-refresh-btn {
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  color: #00d4ff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.ind-refresh-btn:hover {
  background: rgba(0,212,255,0.22);
}

/* -------- Section labels -------- */
.ind-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6b7a99;
  margin: 0 0 14px 0;
}

/* -------- Economic indicators grid -------- */
.ind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.ind-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 16px;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.ind-card:hover {
  border-color: rgba(0,212,255,0.35);
  transform: translateY(-2px);
}

.ind-card-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

.ind-card-name {
  font-size: 11px;
  color: #6b7a99;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ind-card-value {
  font-size: 22px;
  font-weight: 700;
  color: #e8f4ff;
  letter-spacing: -0.5px;
}

.ind-card-change {
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
}

.ind-card-change.up { color: #22c55e; }
.ind-card-change.down { color: #f43f5e; }
.ind-card-change.flat { color: #6b7a99; }

.ind-card-skeleton .ind-card-value {
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  height: 28px;
  width: 80%;
  animation: ind-pulse 1.4s infinite;
}

/* -------- KPI grid -------- */
.ind-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.ind-kpi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 16px;
  cursor: text;
}

.ind-kpi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ind-kpi-icon { font-size: 18px; }
.ind-kpi-name { font-size: 12px; color: #6b7a99; font-weight: 600; }

.ind-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #e8f4ff;
  min-height: 36px;
  cursor: pointer;
}

.ind-kpi-value:hover { color: #00d4ff; }

.ind-kpi-input {
  width: 100%;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.4);
  border-radius: 8px;
  color: #e8f4ff;
  font-size: 20px;
  font-weight: 700;
  padding: 4px 8px;
  outline: none;
}

.ind-kpi-hint {
  font-size: 10px;
  color: #6b7a99;
  margin-top: 4px;
}

/* -------- Pulse animation -------- */
@keyframes ind-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* -------- Error state -------- */
.ind-error {
  font-size: 11px;
  color: #f43f5e;
  margin-top: 4px;
}

/* -------- Last updated -------- */
.ind-updated {
  font-size: 11px;
  color: #4a5568;
  margin-top: 8px;
  text-align: right;
}

/* -------- Timeframe chart -------- */

/* Timeframe button row */
.ind-tf-row {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.ind-tf-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #6b7a99;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}

.ind-tf-btn:hover {
  background: rgba(0,212,255,0.1);
  border-color: rgba(0,212,255,0.3);
  color: #00d4ff;
}

.ind-tf-btn.active {
  background: rgba(0,212,255,0.18);
  border-color: rgba(0,212,255,0.5);
  color: #00d4ff;
}

/* Collapsible chart panel */
.ind-chart-panel {
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
  animation: ind-chart-fadein 0.2s ease;
}

@keyframes ind-chart-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ind-chart-inner {
  width: 100%;
}

.ind-chart-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.ind-chart-period {
  font-size: 9px;
  color: #4a5568;
  letter-spacing: 0.3px;
}

.ind-chart-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.ind-chart-badge-up   { background: rgba(74,222,128,0.15); color: #4ade80; }
.ind-chart-badge-down { background: rgba(248,113,113,0.15); color: #f87171; }

.ind-chart-loading {
  font-size: 11px;
  color: #4a5568;
  text-align: center;
  padding: 12px 0;
  animation: ind-pulse 1.2s infinite;
}

.ind-chart-nodata {
  font-size: 11px;
  color: #4a5568;
  text-align: center;
  padding: 12px 0;
}

/* Grid: let cards expand when chart is open */
.ind-grid {
  align-items: start;
}

/* -------- Mobile -------- */
@media (max-width: 600px) {
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .ind-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ind-page { padding: 16px; }
}
