/* ============================================
   SmiFlow Dashboard - Modern Custom Styles
   ============================================ */

/* Root Variables */
:root {
  --primary-color: #667eea;
  --success-color: #10b981;
  --info-color: #3b82f6;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --info-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.08);
  --shadow-xl: 0 6px 12px rgba(0,0,0,0.1);
  
  --transition-fast: all 0.15s ease;
  --transition-normal: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* Global Improvements */
body {
  background: #f8f9fa;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
}

/* Dashboard Title */
.dashboard-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

/* Statistics Cards */
.stat-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  overflow: hidden;
  position: relative;
  background: white;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.stat-card.card-companies {
  border-left: 3px solid var(--info-color);
}

.stat-card.card-customers {
  border-left: 3px solid var(--primary-color);
}

.stat-card.card-invoices {
  border-left: 3px solid var(--info-color);
}

.stat-card.card-bills {
  border-left: 3px solid var(--success-color);
}

.stat-card.card-pending {
  border-left: 3px solid var(--warning-color);
}

.stat-card.card-overdue {
  border-left: 3px solid var(--danger-color);
}

.stat-card .card-body {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1rem;
}

.stat-card .card-title {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 0.375rem;
  color: #6b7280;
}

.stat-card .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: #1f2937;
}

.stat-card .stat-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  opacity: 0.15;
  color: #6b7280;
}

/* Content Cards */
.content-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  background: white;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.content-card .card-header {
  background: #f9fafb;
  color: #1f2937;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 6px 6px 0 0 !important;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.content-card .card-header h5 {
  margin: 0;
  font-size: 0.875rem;
}

/* Chart Container */
.chart-container {
  position: relative;
  height: 250px;
  padding: 0.75rem;
}

/* Status Overview Cards */
.status-card {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
}

.status-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.status-card.invoice-status {
  border-left-color: var(--primary-color);
}

.status-card.bill-status {
  border-left-color: var(--success-color);
}

/* Quick Actions */
.quick-actions {
  /* Remove animation for minimalism */
}

.btn-action {
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  box-shadow: none;
}

.btn-action:hover {
  box-shadow: var(--shadow-sm);
}

/* Company Overview Table */
.company-table {
  /* Remove animation for minimalism */
}

.company-table table {
  margin-bottom: 0;
}

.company-table th {
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.025em;
  padding: 0.625rem 0.75rem;
  border: none;
}

.company-table td {
  padding: 0.625rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
}

.company-table tbody tr {
  transition: var(--transition-fast);
}

.company-table tbody tr:hover {
  background: #f9fafb;
}

/* Recent Activity Items */
.activity-item {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-left: 2px solid transparent;
  transition: var(--transition-fast);
}

.activity-item:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: var(--shadow-sm);
}

.activity-item.invoice-item {
  border-left-color: var(--primary-color);
}

.activity-item.bill-item {
  border-left-color: var(--success-color);
}

/* Badges Enhancement */
.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.025em;
}

/* Performance Colors */
.performance-excellent {
  color: #11998e;
  font-weight: 700;
}

.performance-good {
  color: #38ef7d;
  font-weight: 600;
}

.performance-average {
  color: #f5576c;
  font-weight: 600;
}

.performance-poor {
  color: #fa709a;
  font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .dashboard-title {
    font-size: 1.125rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.125rem;
  }
  
  .stat-card .stat-icon {
    font-size: 1.25rem;
  }
  
  .chart-container {
    height: 200px;
  }
}

/* Loading State */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

.empty-state-icon {
  font-size: 2.5rem;
  color: #d1d5db;
  margin-bottom: 0.75rem;
}

.empty-state h5 {
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.empty-state p {
  color: #9ca3af;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* Gradient Text */
.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Remove animations for minimalism */

