html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 0;
  padding-bottom: 100px; /* Ensure space for footer */
}

/* Landing page specific styling */
body.landing-page {
  background: linear-gradient(180deg, #667eea 0%, #f8f9fa 50%);
  min-height: 100vh;
}

body.landing-page .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

body.landing-page main {
  padding: 0;
  margin: 0;
}

body.landing-page .alert {
  margin: 0;
  border-radius: 0;
  border: none;
  text-align: center;
  font-weight: 600;
}

/* Navbar improvements */
.navbar {
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-link {
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Custom styles for better UI/UX */
.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
}

.display-6 {
  font-weight: 600;
  color: #2c3e50;
}

/* Status badges */
.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

/* Button improvements */
.btn {
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border-color: #667eea;
  color: #667eea;
}

.btn-outline-primary:hover {
  background-color: #667eea;
  border-color: #667eea;
}

/* Form improvements */
.form-control, .form-select {
  border-radius: 6px;
  border: 1px solid #e1e5e9;
  transition: all 0.2s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alert improvements */
.alert {
  border-radius: 8px;
  border: none;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
  color: white;
}

.alert-danger {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: white;
}

.alert-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

/* Dashboard specific styles */
.metric-card {
  border-left: 4px solid;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.metric-card.primary {
  border-left-color: #667eea;
}

.metric-card.success {
  border-left-color: #56ab2f;
}

.metric-card.warning {
  border-left-color: #f093fb;
}

.metric-card.info {
  border-left-color: #4facfe;
}

/* Table improvements */
.table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem 0.75rem;
}

.table td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
  border-color: #f1f3f4;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Pagination improvements */
.pagination .page-link {
  border-radius: 6px;
  margin: 0 2px;
  border: 1px solid #e1e5e9;
  color: #667eea;
  transition: all 0.2s ease-in-out;
}

.pagination .page-link:hover {
  background-color: #667eea;
  border-color: #667eea;
  color: white;
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
}

/* Loading spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Footer improvements */
.footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.footer a:hover {
  color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Status specific colors */
.status-prospecting { color: #17a2b8; }
.status-qualification { color: #ffc107; }
.status-proposal { color: #fd7e14; }
.status-negotiation { color: #6f42c1; }
.status-won { color: #28a745; }
.status-lost { color: #dc3545; }
.status-onhold { color: #6c757d; }

.priority-low { color: #28a745; }
.priority-medium { color: #ffc107; }
.priority-high { color: #fd7e14; }
.priority-critical { color: #dc3545; }

/* Mobile responsiveness */
@media (max-width: 768px) {
  .display-6 {
    font-size: 1.5rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .btn {
    font-size: 0.875rem;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
}

/* Print styles */
@media print {
  .btn, .dropdown, .pagination, .navbar, .footer {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
  }
}

/* Custom components */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}