/*==========================================================================
  FAAC Dashboard - Custom Styles
  ==========================================================================*/

/* ISETI Brand Colors */
:root {
  --iseti-blue: #2563eb;
  --iseti-green: #10b981;
  --iseti-orange: #f59e0b;
  --iseti-red: #ef4444;
  --iseti-cyan: #06b6d4;
  --iseti-purple: #8b5cf6;
  --iseti-gray-50: #f9fafb;
  --iseti-gray-100: #f3f4f6;
  --iseti-gray-200: #e5e7eb;
  --iseti-gray-800: #1f2937;
  --iseti-gray-900: #111827;
}

body {
  background: var(--iseti-gray-50);
  font-family: 'Inter', sans-serif;
}

/* Dashboard Header */
.dashboard-header {
  background: white;
  padding: 32px 0;
  margin-top: 80px;
  border-bottom: 2px solid var(--iseti-gray-200);
}

.dashboard-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--iseti-gray-900);
  margin-bottom: 8px;
}

.dashboard-header p {
  font-size: 1.1rem;
  color: rgba(15, 23, 42, 0.7);
  margin: 0;
}

/* Breadcrumb */
.breadcrumb-custom {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.breadcrumb-custom a {
  color: var(--iseti-blue);
  text-decoration: none;
}

.breadcrumb-custom a:hover {
  text-decoration: underline;
}

.breadcrumb-custom .active {
  color: rgba(15, 23, 42, 0.6);
}

/* Info Alert */
.info-alert {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-alert i {
  font-size: 1.5rem;
  color: var(--iseti-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.info-alert .content {
  flex: 1;
}

.info-alert .content strong {
  color: var(--iseti-blue);
  font-weight: 700;
}

.info-alert .content p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.7);
}

/* Filters Card */
.filters-card {
  background: white;
  border: 2px solid var(--iseti-gray-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.filters-card h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--iseti-gray-900);
}

.filters-card .form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--iseti-gray-800);
  margin-bottom: 8px;
}

.filters-card .form-select,
.filters-card .form-control {
  border-radius: 8px;
  border: 1px solid var(--iseti-gray-200);
  padding: 10px 14px;
  font-size: 0.95rem;
}

.filters-card .form-select:focus,
.filters-card .form-control:focus {
  border-color: var(--iseti-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-filter {
  background: var(--iseti-blue);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-filter:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.btn-reset {
  background: white;
  color: var(--iseti-gray-800);
  border: 2px solid var(--iseti-gray-200);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-reset:hover {
  border-color: var(--iseti-gray-800);
}

/* Stat Cards */
.stat-card {
  background: white;
  border: 2px solid var(--iseti-gray-200);
  border-radius: 16px;
  padding: 24px;
  height: 100%;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--iseti-blue);
}

.stat-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.stat-card .icon.blue {
  background: rgba(37, 99, 235, 0.12);
  color: var(--iseti-blue);
}

.stat-card .icon.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--iseti-green);
}

.stat-card .icon.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--iseti-cyan);
}

.stat-card .icon.orange {
  background: rgba(245, 158, 11, 0.12);
  color: var(--iseti-orange);
}

.stat-card .stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--iseti-gray-900);
  margin-bottom: 4px;
}

.stat-card .stat-change {
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-change.positive {
  color: var(--iseti-green);
}

.stat-change.negative {
  color: var(--iseti-red);
}

.stat-change.neutral {
  color: rgba(15, 23, 42, 0.6);
}

/* Chart Card */
.chart-card {
  background: white;
  border: 2px solid var(--iseti-gray-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-card h5 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--iseti-gray-900);
  margin-bottom: 20px;
}

.chart-card .chart-description {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.6);
  margin-bottom: 20px;
}

/* Comparison Card */
.comparison-card {
  background: white;
  border: 2px solid var(--iseti-gray-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.comparison-card h5 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--iseti-gray-900);
  margin-bottom: 20px;
}

.comparison-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--iseti-gray-200);
}

.comparison-item:last-child {
  border-bottom: none;
}

.comparison-item .lga-name {
  font-weight: 600;
  color: var(--iseti-gray-900);
}

.comparison-item .lga-amount {
  font-weight: 700;
  color: var(--iseti-green);
  font-size: 1.1rem;
}

/* Table Card */
.table-card {
  background: white;
  border: 2px solid var(--iseti-gray-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.table-card h5 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--iseti-gray-900);
  margin-bottom: 20px;
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.table-controls .search-box {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
  position: relative;
}

.table-controls .search-box input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--iseti-gray-200);
  padding: 8px 14px;
  padding-left: 36px;
}

.table-controls .search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(15, 23, 42, 0.4);
}

.table-controls .btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
}

.btn-download {
  background: var(--iseti-green);
  color: white;
  border: none;
}

.btn-download:hover {
  background: #059669;
}

.btn-export {
  background: var(--iseti-blue);
  color: white;
  border: none;
  margin-left: 8px;
}

.btn-export:hover {
  background: #1d4ed8;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  background: var(--iseti-gray-50);
}

.data-table th {
  padding: 14px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--iseti-gray-800);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--iseti-gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--iseti-gray-800);
  border-bottom: 1px solid var(--iseti-gray-200);
}

.data-table tbody tr:hover {
  background: var(--iseti-gray-50);
}

.data-table .amount {
  font-weight: 700;
  color: var(--iseti-green);
}

/* Pagination */
.pagination-custom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination-custom .page-btn {
  padding: 8px 14px;
  border: 2px solid var(--iseti-gray-200);
  background: white;
  color: var(--iseti-gray-800);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-custom .page-btn:hover {
  border-color: var(--iseti-blue);
  color: var(--iseti-blue);
}

.pagination-custom .page-btn.active {
  background: var(--iseti-blue);
  border-color: var(--iseti-blue);
  color: white;
}

.pagination-custom .page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--iseti-gray-200);
  border-top-color: var(--iseti-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Badges */
.badge-custom {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-statutory {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.badge-vat {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.badge-exchange {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

/* Footer */
.footer {
  background: var(--iseti-gray-800);
  color: #e5e7eb;
  padding: 40px 0 20px;
}

.footer .sitename {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--iseti-blue) 0%, var(--iseti-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-links h4 {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a {
  color: #e5e7eb;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links ul li a:hover {
  color: var(--iseti-blue);
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
  margin-right: 8px;
}

.social-links a:hover {
  background: var(--iseti-blue);
  transform: translateY(-2px);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard-header h1 {
    font-size: 2rem;
  }

  .stat-card .stat-value {
    font-size: 1.75rem;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .table-controls .search-box {
    max-width: 100%;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
}