/* ============================================
   SmiFlow - Global Modern Styles
   ============================================ */

/* Root Variables */
:root {
  /* Colors - Minimalist solid colors */
  --primary-color: #667eea;
  --primary-light: #8b9ef5;
  --success-color: #10b981;
  --info-color: #3b82f6;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --secondary-color: #6b7280;
  
  /* Subtle gradients for minimalism */
  --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%);
  
  /* Light shadows */
  --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);
  
  /* Transitions */
  --transition-fast: all 0.15s ease;
  --transition-normal: all 0.2s ease;
  --transition-slow: all 0.3s ease;
  
  /* Smaller borders */
  --border-radius-sm: 4px;
  --border-radius-md: 6px;
  --border-radius-lg: 8px;
}

/* ============================================
   Global Styles
   ============================================ */

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

/* Page Titles */
.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

/* ============================================
   Navigation Bar
   ============================================ */

.navbar {
  box-shadow: var(--shadow-md);
  background: var(--primary-gradient) !important;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.125rem;
  transition: var(--transition-fast);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  transition: var(--transition-fast);
  position: relative;
  font-weight: 500;
}

.nav-link:hover {
  transform: translateY(-2px);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: white;
  border-radius: 2px;
}

/* ============================================
   Cards
   ============================================ */

.modern-card {
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  background: white;
  overflow: hidden;
}

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

.modern-card .card-header {
  background: #f9fafb;
  color: #1f2937;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.modern-card .card-header h1,
.modern-card .card-header h2,
.modern-card .card-header h3,
.modern-card .card-header h4,
.modern-card .card-header h5,
.modern-card .card-header h6 {
  margin: 0;
  color: #1f2937;
  font-size: 0.875rem;
}

.modern-card .card-body {
  padding: 1rem;
}

/* ============================================
   Tables
   ============================================ */

.modern-table {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.modern-table thead 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;
}

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

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

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

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   Buttons
   ============================================ */

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

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

.btn-modern:active {
  box-shadow: none;
}

.btn-gradient-primary {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

.btn-gradient-primary:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6841a0 100%);
  color: white;
}

.btn-gradient-success {
  background: var(--success-gradient);
  color: white;
  border: none;
}

.btn-gradient-success:hover {
  background: linear-gradient(135deg, #0d7a70 0%, #2ed16f 100%);
  color: white;
}

.btn-gradient-info {
  background: var(--info-gradient);
  color: white;
  border: none;
}

.btn-gradient-danger {
  background: var(--danger-gradient);
  color: white;
  border: none;
}

/* ============================================
   Forms
   ============================================ */

.modern-form {
  background: white;
  padding: 1rem;
  border-radius: var(--border-radius-md);
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
}

.modern-form .form-label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.modern-form .form-control,
.modern-form .form-select {
  border: 1px solid #d1d5db;
  border-radius: var(--border-radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition: var(--transition-fast);
}

.modern-form .form-control:focus,
.modern-form .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  outline: none;
}

.modern-form .form-check-input {
  border: 2px solid #e9ecef;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.modern-form .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

/* ============================================
   Badges
   ============================================ */

.badge-modern {
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

/* ============================================
   Alerts
   ============================================ */

.alert {
  border: 1px solid;
  border-radius: var(--border-radius-sm);
  box-shadow: none;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   Action Buttons Group
   ============================================ */

.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

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

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

/* ============================================
   Info Cards
   ============================================ */

.info-card {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
}

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

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

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

.info-card.info-warning {
  border-left-color: var(--warning-color);
}

.info-card.info-danger {
  border-left-color: var(--danger-color);
}

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

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

/* ============================================
   Empty States
   ============================================ */

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
}

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

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

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

/* ============================================
   Status Indicators
   ============================================ */

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  font-size: 0.75rem;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-active {
  background: rgba(17, 153, 142, 0.1);
  color: #11998e;
}

.status-inactive {
  background: rgba(108, 117, 125, 0.1);
  color: #6c757d;
}

.status-pending {
  background: rgba(245, 87, 108, 0.1);
  color: #f5576c;
}

.status-paid {
  background: rgba(17, 153, 142, 0.1);
  color: #11998e;
}

.status-overdue {
  background: rgba(250, 112, 154, 0.1);
  color: #fa709a;
}

.status-transferred {
  background: rgba(17, 153, 142, 0.1);
  color: #11998e;
}

.status-cancelled {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.status-blocked {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

/* ============================================
   List Items
   ============================================ */

.modern-list-item {
  background: white;
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  border-left: 2px solid transparent;
}

.modern-list-item:hover {
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
  background: #f9fafb;
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
  margin-top: 1rem;
}

.pagination .page-link {
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius-sm);
  margin: 0 0.125rem;
  padding: 0.375rem 0.75rem;
  color: var(--primary-color);
  font-size: 0.875rem;
  transition: var(--transition-fast);
  box-shadow: none;
}

.pagination .page-link:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: var(--primary-color);
}

.pagination .page-item.active .page-link {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ============================================
   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);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease;
}

.fade-in-down {
  animation: fadeInDown 0.6s ease;
}

/* ============================================
   Footer
   ============================================ */

footer {
  margin-top: 2rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 0;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {
  .page-title {
    font-size: 1.125rem;
  }
  
  .modern-card .card-body {
    padding: 0.75rem;
  }
  
  .modern-form {
    padding: 0.75rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  body {
    background: white;
  }
  
  .modern-card,
  .modern-table {
    box-shadow: none;
    border: 1px solid #dee2e6;
  }
  
  .btn,
  .navbar,
  footer {
    display: none;
  }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus,
.page-link:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

