/* ============================================================
   FreeDash — Custom stylesheet (complements Tailwind CDN)
   ============================================================ */

/* Cards */
.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

/* KPI */
.kpi-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.kpi-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #a5b4fc;
}

/* Nav links */
.nav-link {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.15s;
}
.nav-link:hover {
  color: #fff;
  background: #1f2937;
}
.nav-link.active {
  color: #fff;
  background: #1f2937;
}

/* Inputs */
.input-select {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: #e5e7eb;
}
.input-select:focus { outline: none; box-shadow: 0 0 0 2px #6366f1; }

.input-text {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: #e5e7eb;
}
.input-text:focus { outline: none; box-shadow: 0 0 0 2px #6366f1; }

.filter-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

/* Buttons */
.btn-primary {
  background: #4f46e5;
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #6366f1; }

/* Tables */
.data-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}
.data-table thead th {
  text-align: left;
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #1f2937;
}
.data-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(31,41,55,0.5);
}
.data-table tbody tr:hover {
  background: rgba(31,41,55,0.4);
}
.sortable {
  cursor: pointer;
  user-select: none;
}
.sortable:hover { color: #a5b4fc; }
.sortable::after { content: ' ⇅'; font-size: 0.7em; opacity: 0.4; }
.sortable.sort-asc::after  { content: ' ▲'; opacity: 0.9; color: #6ee7b7; }
.sortable.sort-desc::after { content: ' ▼'; opacity: 0.9; color: #f87171; }

/* Charts */
.chart-container {
  position: relative;
  width: 100%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-content {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 56rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Tags */
.tech-tag {
  background: rgba(79,70,229,0.2);
  color: #a5b4fc;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}
.field-tag {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
}

/* Job card */
.job-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.job-card:hover { border-color: #4b5563; }

/* Pagination */
.page-btn {
  background: #1f2937;
  border: 1px solid #374151;
  color: #d1d5db;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s;
}
.page-btn:hover { background: #374151; }
.page-btn.active {
  background: #4f46e5;
  border-color: #6366f1;
  color: #fff;
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Growth indicators */
.growth-positive { color: #34d399; }
.growth-negative { color: #f87171; }
.growth-neutral  { color: #9ca3af; }

/* Field KPI cards */
.field-kpi-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 0.625rem;
  padding: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-kpi-card:hover {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79,70,229,0.3);
}

/* Badge pill (category tags) */
.badge-pill {
  background: rgba(79,70,229,0.15);
  color: #a5b4fc;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #111827; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }
