:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --vida-color: #008000;
  --gmm-color: #00008b;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --aa-color: #f3c212;
  --a-color: #c0c0c0;
  --b-color: #f4a460;
  --sidebar-width: 250px;
  --header-height: 70px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7f9;
  color: #333;
  overflow-x: hidden;
}

.container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background-color: var(--dark-color);
  color: white;
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  z-index: 800;
  transition: transform 0.3s ease;
}

.logo {
  text-align: center;
  padding: 20px;
  font-size: 24px;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.menu-item {
  padding: 15px 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-item i {
  width: 20px;
  text-align: center;
}

.main-content {
  flex: 1;
  padding: 20px;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
  background-color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 999;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--dark-color);
  font-size: 24px;
  cursor: pointer;
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 15px;
  border: 1px solid #ddd;
  background-color: white;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.funnel-container {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.funnel-column {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 300px;
  max-height: 70vh;
  overflow-y: auto;
  flex: 1;
}

.column-header {
  padding: 15px;
  color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
}

.prospecto .column-header {
  background-color: #e74c3c;
}
.contacto-iniciado .column-header {
  background-color: #e67e22;
}
.cita-1 .column-header {
  background-color: #f39c12;
}
.propuesta .column-header {
  background-color: #3498db;
}
.documentacion .column-header {
  background-color: #2ecc71;
}
.cerrado .column-header {
  background-color: #27ae60;
}

.contacts-list {
  padding: 10px;
  min-height: 200px;
}

.contact-card {
  background-color: var(--light-color);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: grab;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-card.AA {
  border-left: 4px solid var(--aa-color);
}

.contact-card.A {
  border-left: 4px solid var(--a-color);
}

.contact-card.B {
  border-left: 4px solid var(--b-color);
}

.contact-name {
  font-weight: bold;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.contact-category {
  font-size: 0.8em;
  padding: 2px 6px;
  border-radius: 10px;
  color: white;
}

.category-AA {
  background-color: var(--aa-color);
}
.category-A {
  background-color: var(--a-color);
}
.category-B {
  background-color: var(--b-color);
}
.category-VIDA {
  background-color: var(--vida-color);
}
.category-GMM {
  background-color: var(--gmm-color);
}

.contact-details {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.btn {
  padding: 6px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: background-color 0.2s;
}

.btn-sm {
  padding: 4px 6px;
  font-size: 0.7em;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-success {
  background-color: var(--secondary-color);
  color: white;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-vida {
  background-color: var(--vida-color);
  color: white;
}

.btn-gmm {
  background-color: var(--gmm-color);
  color: white;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.tasks-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-top: 20px;
}

.task-item {
  padding: 10px;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 10px;
  background-color: var(--light-color);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-item.urgent {
  border-left-color: var(--danger-color);
}

.task-info {
  flex: 1;
}

.settings-panel {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-top: 20px;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.report-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 15px;
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  margin: 10px 0;
}

.stat-label {
  color: #666;
  font-size: 0.9em;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  background-color: #eee;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: #777;
}

.empty-state i {
  font-size: 50px;
  margin-bottom: 15px;
  color: #ddd;
}

.search-box {
  margin-bottom: 20px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 1rem;
}

.search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

.notification-badge {
  background-color: var(--danger-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  margin-left: 10px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: fixed;
  right: 80px;
  right: 20px;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-radius: 8px;
  overflow: hidden;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-item {
  padding: 12px 16px;
  display: block;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .funnel-column {
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 80%;
    max-width: 300px;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
  }

  .funnel-container {
    flex-direction: column;
  }

  .funnel-column {
    min-width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .header-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.report-section {
  margin-bottom: 30px;
}

.report-section h4 {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.trimestre-card,
.cuatrimestre-card {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.trimestre-card h5,
.cuatrimestre-card h5 {
  color: var(--dark-color);
  margin-bottom: 10px;
}

.trimestre-stats,
.cuatrimestre-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.trimestre-stat,
.cuatrimestre-stat {
  background-color: white;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
}

.trimestre-stat-value,
.cuatrimestre-stat-value {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.trimestre-stat-label,
.cuatrimestre-stat-label {
  font-size: 0.8em;
  color: #666;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 20px;
}

.completed {
  opacity: 0.7;
  background-color: #f8f9fa;
}

.completed .task-info {
  text-decoration: line-through;
}
