/* Layout general */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Contenido principal crece */
.content {
  flex: 1;
  margin-left: 240px;
  padding: 20px;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  margin-left: 240px;
}

/* fin layout */

/*login*/
body {
  margin: 0;
  height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("https://images.unsplash.com/photo-1581093588401-22d54a1f0c9b");
  background-size: cover;
  background-position: center;
  font-family: "Segoe UI", sans-serif;
}

.login-container {
  height: 100vh;
}

.login-card {
  border: none;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.login-card h3 {
  font-weight: 600;
}

.form-control {
  border-radius: 8px;
}

.btn-primary {
  border-radius: 8px;
  padding: 10px;
  font-weight: 500;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #0d6efd;
}
/*fin login*/

/* Sidebar */
body {
  overflow-x: hidden;
}

.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #eef6ff;
  color: #1e3a5f;
  transition: all 0.3s;
  z-index: 1000; /* 🔥 importante */
}

.sidebar a {
  color: #334155;
  text-decoration: none;
  padding: 12px 20px;
  display: block;
  transition: 0.2s;
}

.sidebar a:hover {
  background: #dbeafe;
  color: #0f172a;
}

.sidebar .active {
  background: #bfdbfe;
  color: #0f172a;
  border-radius: 8px;
}

.sidebar-header {
  padding: 20px;
  font-size: 1.3rem;
  font-weight: bold;
  text-align: center;
  border-bottom: 1px solid #dbeafe;
  color: #0f172a;
}

.sidebar i {
  color: #3b82f6; /* azul bonito (tipo Bootstrap primary) */
}

/* Mobile */
@media (max-width: 768px) {
  .sidebar {
    left: -250px;
  }

  .sidebar.active {
    left: 0;
  }

  .content {
    margin-left: 0;
  }
}

/* fin sidebar */

/* Dashboard */
body {
  background: #f5f7fb;
  font-size: 0.9rem; /* 👈 tamaño contenido */
}

.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card h6 {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 5px;
}

.card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}

.bg-blue {
  background: #2563eb;
}
.bg-green {
  background: #16a34a;
}
.bg-orange {
  background: #f59e0b;
}
.bg-red {
  background: #dc2626;
}

.table {
  font-size: 0.85rem;
}
/* fin dashboard */

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  margin-left: 240px; /* 👈 igual que sidebar */
}

@media (max-width: 768px) {
  .footer {
    margin-left: 0;
  }
}
/* fin footer */

.container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

html,
body {
  overflow-x: hidden;
}

.row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.card {
  border-radius: 12px;
}

.card-header {
  font-weight: 600;
}

@media (max-width: 768px) {
  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
  }

  .table td {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
  }

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
  }
}

.header {
  background: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.content {
  margin-left: 250px;
}

.header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .content {
    margin-left: 0;
  }
}

.input-group-text {
  background-color: #f8f9fa;
  border-right: 0;
}

.input-group .form-control {
  border-left: 0;
}

/* 🌟 Card más elegante */
.card {
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 🧩 Secciones */
.form-section {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #f1f3f5;
}

/* 🏷️ Títulos */
.form-section h6 {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ✨ Input moderno */
.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  height: 44px;
}

/* 🎯 Focus animado */
.form-control:focus,
.form-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* 📦 Input group */
.input-group-text {
  border-radius: 10px 0 0 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-right: 0;
}

/* Ajuste input */
.input-group .form-control {
  border-left: 0;
}

/* 🧲 Hover sutil */
.form-control:hover,
.form-select:hover {
  border-color: #c7d2fe;
}

/* 🔘 Botones */
.btn {
  border-radius: 10px;
  padding: 8px 16px;
}

/* 🎬 Animación suave */
.form-control,
.form-select {
  transform: scale(1);
}

.form-control:focus,
.form-select:focus {
  transform: scale(1.02);
}

.is-valid {
  border-color: #198754 !important;
}

.is-invalid {
  border-color: #dc3545 !important;
}

.invalid-feedback {
  font-size: 0.8rem;
}

.container {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔥 MODO COMPACTO REAL */
.form-sm .form-control,
.form-sm .form-select {
  padding: 0.2rem 0.4rem !important;
  font-size: 0.8rem !important;
  height: auto !important;
}

.form-sm .form-label {
  font-size: 0.75rem !important;
  margin-bottom: 2px !important;
}

.form-sm .input-group-text {
  padding: 0.2rem 0.4rem !important;
  font-size: 0.75rem !important;
}

.form-sm .btn {
  padding: 0.3rem 0.5rem !important;
  font-size: 0.8rem !important;
}

.form-sm .table td,
.form-sm .table th {
  padding: 0.3rem !important;
  font-size: 0.8rem !important;
}

/* 🔥 MENOS ESPACIO ENTRE CAMPOS */
.form-sm .mb-3 {
  margin-bottom: 0.5rem !important;
}

/* 🔥 TITULOS MÁS COMPACTOS */
.form-sm .form-section h6 {
  font-size: 0.8rem !important;
  margin-bottom: 0.2rem !important;
}

.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

/* colores personalizados */
.bg-cyan {
  background: #06b6d4;
}

#listaNotificaciones {
  border-radius: 16px;
  overflow: hidden;
}

#listaNotificaciones .dropdown-item {
  white-space: normal;
  transition: all 0.2s ease;
}

#listaNotificaciones .dropdown-item:hover {
  background: #f8fafc;
  transform: translateX(2px);
}

#listaNotificaciones .dropdown-header {
  background: #f8fafc;
}

#badgeNotificaciones {
  font-size: 0.65rem;
}

.badge-notificacion {
  animation: pulse 1s infinite;
}

.preview-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  padding: 2px;
  background: #fff;
}
