/* ============================================================
   Dashboard Telefonia IA — Genia Technologies
   styles.css
============================================================ */

/* ---------- Reset / Base ---------------------------------- */
body {
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ---------- Cards ----------------------------------------- */
.card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -2px rgba(0,0,0,.05);
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}
.dark .card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.2);
}

/* ---------- Loaders --------------------------------------- */
.loader {
  border-top-color: #2563eb;
  animation: spinner 1s linear infinite;
}
.btn-loader {
  border-top-color: #ffffff;
  animation: spinner 1s linear infinite;
}
@keyframes spinner {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Select customizado ---------------------------- */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}
select option             { background-color: #ffffff; color: #1e293b; font-weight: 500; }
.dark select option       { background-color: #0f172a; color: #f8fafc; }

/* ---------- Scrollbar ------------------------------------- */
::-webkit-scrollbar        { width: 8px; height: 8px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: #cbd5e1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* ---------- Animações ------------------------------------- */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Utilitários repetidos (evita duplicação no HTML) */

/* Badge de resumo */
.badge-item {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Label dos filtros */
.filter-label {
  display: block;
  font-size: 0.625rem;   /* 10px */
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.dark .filter-label { color: #64748b; }

/* Select dos filtros */
.filter-select {
  width: 100%;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  outline: none;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  color: #334155;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}
.dark .filter-select {
  background-color: rgba(30, 41, 59, 0.5);
  border-color: #334155;
  color: #e2e8f0;
}

/* KPI label */
.kpi-label {
  font-size: 0.625rem;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
  margin-top: 0.5rem;
}

/* KPI value */
.kpi-value {
  font-size: 1.875rem;
  font-weight: 900;
  color: #1e293b;
}
.dark .kpi-value { color: #f8fafc; }

/* Chart title */
.chart-title {
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dark .chart-title { color: #94a3b8; }

/* Modal info card */
.modal-info-card {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #f1f5f9;
}
.dark .modal-info-card {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(51, 65, 85, 0.5);
}

/* Modal label */
.modal-info-label {
  font-size: 0.625rem;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
