.form-card {
  max-width: 600px;
  width: 100%;
  background-color: #f8f9fa;
  border-radius: 8px;
}
.form-card-bg {
  background-color: #f8f9fa;
}
/* === Layout general === */
.sidebar { 
  width: 260px; 
  min-height: 100vh; 
  transition: transform 0.3s ease; 
  background-color: #8a0000;
  color: #fff;
  padding-top: 1rem;
}
.logo-img { 
  height: 32px; 
  max-width: 120px; 
  object-fit: contain; 
}
@media (max-width: 576px) {
  .logo-img { height: 28px; max-width: 100px; }
}

/* === Links sidebar === */
.sidebar .nav-link { 
  padding: 0.5rem 1rem; 
  opacity: .95; 
  display: block; 
  width: 100%; 
  font-weight: 500;
  color: #fff;
  border-radius: 6px;
}
.sidebar .nav-link:hover { 
  opacity: 1; 
  background-color: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* === Cards (dashboard) === */
.card-kpi {
  border: none;
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card-kpi .icon { font-size: 2.2rem; color: #dc3545; }
.card-kpi .value { font-size: 1.8rem; font-weight: 600; color: #212529; }
.card-kpi .label { font-size: 0.95rem; color: #6c757d; }
.hover-card:hover { background-color: #f8f9fa; transform: scale(1.02); }
.hover-kpi:hover { transform: scale(1.04); box-shadow: 0 6px 16px rgba(0,0,0,0.12); background-color: #f8f9fa; }

/* === Secciones del dashboard === */
.card-header {
  background-color: #f1f3f5;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  font-size: 1.1rem;
  color: #343a40;
}
.card-body {
  background-color: #ffffff;
}

/* === Ganancia mensual === */
.ganancia-box {
  font-size: 2.5em;
  font-weight: bold;
  color: #212529;
  padding: 0.5rem 0;
}

/* === Barra de progreso === */
.progress {
  height: 20px;
  border-radius: 10px;
  background-color: #e9ecef;
}
.progress-bar {
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 20px;
  border-radius: 10px;
}

/* === Dark mode === */
:root[data-theme="dark"] body { background: #1f1f1f; color: #eee; }
:root[data-theme="dark"] .navbar { background: #2a2a2a !important; }
:root[data-theme="dark"] .card-kpi { background: #2a2a2a; border-color: #3a3a3a; }
:root[data-theme="dark"] .sidebar { background: #8a0000 !important; }

/* === Sidebar responsive === */
@media (max-width: 991px) {
  #sidebar {
    position: fixed; top: 0; left: 0;
    height: 100vh; width: 260px;
    z-index: 1050; transform: translateX(-100%);
  }
  #sidebar.active { transform: translateX(0); }
}
@media (min-width: 992px) {
  #sidebar { transform: none !important; position: static; }
}

/* === Overlay para móviles === */
#sidebar-overlay {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4); z-index: 1040;
}
@media (max-width: 991px) {
  #sidebar.active + #sidebar-overlay { display: block; }
}

/* === Navbar ajustes móviles === */
@media (max-width: 576px) {
  .navbar .d-flex, .navbar form { margin-top: 0.5rem; }
}
@media (max-width: 991px) {
  #darkModeToggleMobile { display: block; width: 100%; }
}

/* === Animación logo === */
.logo-anim:hover { animation: bounce 0.6s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
  60% { transform: translateY(3px); }
}

/* === Colapsables del sidebar === */
#sidebar .collapsing {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
  will-change: height;
}
#sidebar .collapse { overflow: hidden; }
#sidebar .collapse.show { height: auto; }
#sidebar .collapse > .nav {
  display: flex; flex-direction: column; margin: 0; padding: 0;
}
#sidebar .collapse > .nav .nav-item { width: 100%; }

/* Chevron rotatorio */
.sidebar-toggle-icon { transition: transform 0.2s ease; }
.sidebar-toggle[aria-expanded="true"] .sidebar-toggle-icon { transform: rotate(180deg); }

/* === Citas según estado === */
.cita-row { cursor: pointer; transition: background-color 0.2s ease; }
.cita-row:hover td { background-color: #f1f1f1 !important; }

/* Anular el box-shadow de Bootstrap para permitir colores personalizados */
.table-hover tbody tr.cita-pendiente > td,
.table-hover tbody tr.cita-completada > td,
.table-hover tbody tr.cita-hoy > td,
.table-hover tbody tr.cita-hoy.cita-pendiente > td {
  box-shadow: none !important;
}

/* Colores por estado base */
.table-hover tbody tr.cita-completada > td {
  background-color: #d4edda !important;
  color: #155724;
}
.table-hover tbody tr.cita-pendiente > td {
  background-color: #fff8e1 !important;
  color: #856404;
}
.table-hover tbody tr.cita-hoy.cita-pendiente > td {
  background-color: #e0f0ff !important;
  color: #004085;
}

/* Hovers más oscuros por estado */
.table-hover tbody tr.cita-completada:hover > td {
  background-color: #c3e6cb !important;
}
.table-hover tbody tr.cita-pendiente:hover > td {
  background-color: #ffe08a !important;
}
.table-hover tbody tr.cita-hoy.cita-pendiente:hover > td {
  background-color: #b8daff !important;
}
