/* ========================================
   MQB CRM — Estilos Principales
   ======================================== */

:root {
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 0px;
}

/* Layout */
#wrapper {
  min-height: 100vh;
}

#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  min-height: 100vh;
  transition: width 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#sidebar.collapsed {
  width: 0;
  min-width: 0;
}

#page-content-wrapper {
  min-height: 100vh;
  background-color: #f8f9fa;
}

/* Sidebar links */
#sidebar .nav-link {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .875rem;
  transition: background-color 0.15s;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.12);
}

#sidebar .nav-link.active {
  font-weight: 600;
}

/* Avatar */
.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* KPI icons */
.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Pipeline board */
.pipeline-board .card {
  transition: box-shadow 0.15s;
}

.deal-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1) !important;
}

/* Stage dots */
.stage-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dee2e6;
  margin: 0 auto;
  border: 3px solid #dee2e6;
}
.stage-dot.active {
  background: #0d6efd;
  border-color: #0d6efd;
  box-shadow: 0 0 0 4px rgba(13,110,253,.2);
}
.stage-dot.done {
  background: #198754;
  border-color: #198754;
}

/* Auth page */
.auth-page {
  background-color: #f0f2f5;
}

/* Cards */
.card {
  border-radius: 12px;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
}

/* Tables */
.table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  color: #6c757d;
}

/* Badge tweaks */
.badge {
  font-weight: 500;
}

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

/* Sidebar header */
.sidebar-header {
  min-height: 60px;
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    width: 0;
    min-width: 0;
    position: fixed;
    z-index: 1040;
    height: 100vh;
  }
  #sidebar.open {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
  }
}
