/* style.css - Main stylesheet for CPLS CRM */

:root {
    --primary-color: #0066cc;
    --secondary-color: #ff9900;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
  }
  
  /* Global Styles */
  body {
    font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background-color: #f5f7fa;
    color: var(--gray-800);
  }
  
  a {
    color: var(--primary-color);
    text-decoration: none;
  }
  
  a:hover {
    color: #0056b3;
    text-decoration: underline;
  }
  
  .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  .btn-primary:hover, .btn-primary:focus {
    background-color: #0056b3;
    border-color: #0056b3;
  }
  
  .btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
  }
  
  /* Layout Components */
  .sidebar {
    background-color: var(--dark-color);
    color: white;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    padding-top: 60px;
    transition: all 0.3s;
    z-index: 100;
  }
  
  .sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 5px;
  }
  
  .sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  .sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
  }
  
  .sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
  }
  
  .content-wrapper {
    margin-left: 250px;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
  }
  
  .topbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 10px 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 99;
    transition: all 0.3s;
  }
  
  .sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  /* Content Containers */
  .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
  }
  
  .card-header {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 15px 20px;
    font-weight: 500;
    border-radius: 10px 10px 0 0 !important;
  }
  
  .card-body {
    padding: 20px;
  }
  
  /* Utilities */
  .badge-primary {
    background-color: var(--primary-color);
  }
  
  .badge-secondary {
    background-color: var(--secondary-color);
  }
  
  .badge-success {
    background-color: var(--success-color);
  }
  
  .badge-danger {
    background-color: var(--danger-color);
  }
  
  .badge-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
  }
  
  /* Dashboard Specific */
  .stats-card {
    border-left: 4px solid var(--primary-color);
    background-color: white;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 5px;
  }
  
  .stats-card.success {
    border-left-color: var(--success-color);
  }
  
  .stats-card.warning {
    border-left-color: var(--warning-color);
  }
  
  .stats-card.danger {
    border-left-color: var(--danger-color);
  }
  
  .stats-card.info {
    border-left-color: var(--info-color);
  }
  
  .stats-card .value {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
  }
  
  .stats-card .label {
    color: var(--gray-600);
    font-size: 14px;
  }
  
  /* Tables */
  .table {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
  }
  
  .table thead th {
    background-color: var(--gray-200);
    border-bottom: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
  }
  
  .table-hover tbody tr:hover {
    background-color: var(--gray-100);
  }
  
  /* Forms */
  .form-control {
    border-radius: 5px;
    border: 1px solid var(--gray-300);
    padding: 10px 15px;
  }
  
  .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
  }
  
  /* Pagination */
  .pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--gray-300);
  }
  
  .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
  }
  
  /* Status Indicators */
  .status-badge {
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
  }
  
  .status-badge.pending {
    background-color: rgba(255, 193, 7, 0.2);
    color: #856404;
  }
  
  .status-badge.in-progress {
    background-color: rgba(23, 162, 184, 0.2);
    color: #117a8b;
  }
  
  .status-badge.completed {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
  }
  
  .status-badge.cancelled {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
  }
  
  /* Project Specific Styles */
  .project-progress {
    height: 8px;
    border-radius: 4px;
    margin-top: 5px;
  }
  
  .customer-card {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
  
  .customer-card .avatar {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 15px;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .sidebar {
      margin-left: -250px;
    }
    
    .sidebar.active {
      margin-left: 0;
    }
    
    .content-wrapper {
      margin-left: 0;
    }
    
    .topbar {
      left: 0;
    }
    
    .sidebar-toggle {
      display: block;
    }
    
    .content-wrapper.active {
      margin-left: 250px;
    }
    
    .topbar.active {
      left: 250px;
    }
  }
  
  /* Calendar View */
  .calendar-day {
    height: 120px;
    background: white;
    border: 1px solid var(--gray-300);
  }
  
  .calendar-day .date {
    font-weight: bold;
    padding: 5px;
    text-align: right;
  }
  
  .calendar-day .events {
    overflow-y: auto;
    max-height: 80px;
  }
  
  .calendar-day .event {
    padding: 2px 5px;
    margin: 2px;
    border-radius: 3px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: white;
  }
  
  /* Print Styles */
  @media print {
    .sidebar, .topbar, .no-print {
      display: none !important;
    }
    
    .content-wrapper {
      margin-left: 0;
      padding: 0;
    }
    
    .card {
      box-shadow: none;
      border: 1px solid #ddd;
    }
  }