/* --------- RESET BÁSICO --------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #f5f5f7;
  color: #444444;
}

/* =============================================
   NAVBAR MODERNO Y ELEGANTE - DC ELÉCTRICOS
   ============================================= */

/* --------- NAVBAR PRINCIPAL (DESKTOP) --------- */
.navbar-main {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-main.scrolled {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
  padding: 0.5rem 0;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --------- LOGO Y MARCA --------- */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  padding: 0;
  margin: 0;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: translateY(-2px);
}

.navbar-logo {
  height: 55px;
  width: auto;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(147, 193, 33, 0.15));
}

.navbar-brand:hover .navbar-logo {
  filter: drop-shadow(0 4px 12px rgba(147, 193, 33, 0.3));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1f2937;
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: #93c121;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --------- NAVEGACIÓN DESKTOP --------- */
.nav-desktop {
  display: flex;
  gap: 0.5rem;
}

.nav-desktop .nav-item {
  position: relative;
}

.nav-desktop .nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-desktop .nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #93c121, #6c8f1a);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.nav-desktop .nav-link:hover,
.nav-desktop .nav-link.active {
  color: #93c121;
  background: rgba(147, 193, 33, 0.08);
}

.nav-desktop .nav-link:hover::before,
.nav-desktop .nav-link.active::before {
  transform: translateY(0);
}

.nav-desktop .nav-link i {
  font-size: 1.1rem;
}

/* --------- USUARIO Y LOGOUT --------- */
.navbar-user {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-left: 2rem;
  border-left: 2px solid rgba(148, 163, 184, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
}

.user-role {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
  color: white;
}

.btn-logout i {
  font-size: 1rem;
}

/* --------- NAVBAR MOBILE/TABLET (ESTILO APP) --------- */
.navbar-mobile {
  display: none;
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  z-index: 999;
  padding: 0.75rem 0;
}

.mobile-nav-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 100%;
  padding: 0 1rem;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  text-decoration: none;
  border-radius: 14px;
  transition: all 0.3s ease;
  position: relative;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  background: rgba(147, 193, 33, 0.1);
}

.mobile-nav-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #374151;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mobile-nav-item:hover .mobile-nav-icon,
.mobile-nav-item.active .mobile-nav-icon {
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(147, 193, 33, 0.3);
}

.mobile-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  text-align: center;
  letter-spacing: 0.3px;
  transition: color 0.3s ease;
}

.mobile-nav-item:hover .mobile-nav-label,
.mobile-nav-item.active .mobile-nav-label {
  color: #93c121;
}

/* Badge de notificación (opcional para futuro uso) */
.mobile-nav-item .badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: #ef4444;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* --------- OVERLAY --------- */
.navbar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.navbar-overlay.active {
  display: block;
  opacity: 1;
}

/* --------- TOGGLER --------- */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: none;
  background: rgba(147, 193, 33, 0.1);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2855,65,81,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 24px;
  height: 24px;
}

/* --------- RESPONSIVE --------- */

/* Tablet y Mobile - Mostrar navbar tipo app */
@media (max-width: 991.98px) {
  /* Ocultar navbar desktop */
  .navbar-main {
    display: none;
  }

  /* Mostrar navbar mobile */
  .navbar-mobile {
    display: block;
  }

  /* Ajustar contenido para que no quede debajo del navbar fijo */
  body {
    padding-top: 90px;
  }

  /* Ajustar grid en tablets */
  .mobile-nav-container {
    max-width: 600px;
    margin: 0 auto;
  }
}

/* Mobile pequeño - Ajustes */
@media (max-width: 576px) {
  .mobile-nav-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .mobile-nav-label {
    font-size: 0.7rem;
  }

  .mobile-nav-item {
    padding: 0.65rem 0.25rem;
  }

  body {
    padding-top: 85px;
  }
}

/* Desktop grande - Mejorar espaciado */
@media (min-width: 1400px) {
  .navbar-container {
    max-width: 1600px;
  }

  .nav-desktop {
    gap: 1rem;
  }

  .nav-desktop .nav-link {
    padding: 0.85rem 1.5rem;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.navbar-mobile {
  animation: slideDown 0.4s ease-out;
}

@keyframes iconPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.mobile-nav-item.active .mobile-nav-icon {
  animation: iconPop 0.4s ease;
}

/* --------- EFECTOS AL SCROLL --------- */
.navbar-main.scrolled .navbar-logo {
  height: 48px;
}

.navbar-main.scrolled .brand-text {
  display: none;
}

/* --------- ESTADOS ESPECIALES --------- */
body.menu-open {
  overflow: hidden;
}

/* Menú desplegable en mobile (cuando se colapsa) */
@media (max-width: 991.98px) {
  .navbar-collapse {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(15, 23, 42, 0.15);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
    padding: 2rem 1.5rem;
  }

  .navbar-collapse.show {
    right: 0;
  }

  .nav-desktop {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-desktop .nav-link {
    justify-content: flex-start;
    padding: 1rem 1.25rem;
  }

  .navbar-user {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-left: none;
    border-top: 2px solid rgba(148, 163, 184, 0.2);
  }

  .btn-logout {
    width: 100%;
    justify-content: center;
  }
}

/* --------- PRINT --------- */
@media print {
  .navbar-main,
  .navbar-mobile {
    display: none;
  }

  body {
    padding-top: 0;
  }
}

/* Limita ancho máximo para que no se vea "estirado" en monitores muy grandes */
.max-width-1200 {
  max-width: 1200px;
}

/* --------- SECCIÓN LOGIN --------- */
.contact-section {
  min-height: calc(100vh - 120px); /* alto viewport menos header+footer aprox */
  display: flex;
  align-items: center;
  padding: 3rem 1rem;
}

.contact-section .container {
  max-width: 1200px;
}

/* Título principal */
.section-title {
  text-align: center;
  font-weight: 600;
  margin-bottom: 2rem;
  color: #222222;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Contenedor del formulario (card) */
.contact-form {
  background: #ffffff;
  border-radius: 18px;
  padding: 3rem 2.5rem; /* Más padding horizontal */
  max-width: 480px; /* De 420px a 480px para mejor respiración */
  margin: 0 auto;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Etiquetas */
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: #374151;
}

/* Inputs */
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
  background-color: #f9fafb;
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: #93c121;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.22);
  background-color: #ffffff;
}

/* Placeholder más suave */
.form-group input::placeholder {
  color: #9ca3af;
}

/* Botón principal */
.custom-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.custom-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(108, 143, 26, 0.35);
  filter: brightness(1.03);
}

.custom-button:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(108, 143, 26, 0.4);
}

/* Texto debajo del botón (links: recuperar contraseña, registrarse) */
.form-footer-text {
  margin-top: 1.3rem;
  font-size: 0.85rem;
  text-align: center;
  color: #6b7280;
}

.form-footer-text a {
  color: #93c121;
  font-weight: 500;
  text-decoration: none;
}

.form-footer-text a:hover {
  text-decoration: underline;
}

/* --------- UTILIDADES --------- */
.mt-4 {
  margin-top: 1.5rem !important;
}

/* --------- RESPONSIVE --------- */
@media (max-width: 767.98px) {
  .contact-section {
    padding: 2.5rem 1.2rem;
  }

  .contact-form {
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  }

  .navbar-brand img {
    height: 56px;
  }
}

@media (min-width: 992px) {
  .contact-section {
    justify-content: center;
  }
}

/* --------- FORMULARIO REGISTRO - ESPECÍFICO --------- */
.contact-form .row {
  margin-bottom: 1rem;
}

.contact-form .row > .col-md-6 {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.contact-form .row > .col-md-6:last-child {
  padding-right: 0;
}

.contact-form .col-md-6 .form-group {
  margin-bottom: 1rem;
}

/* Divider visual entre secciones */
.contact-form .row:not(:last-child) {
  position: relative;
}

.contact-form .row:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(148, 163, 184, 0.3),
    transparent
  );
}

/* RESPONSIVE - Mobile stackea todo */
@media (max-width: 767.98px) {
  .contact-form .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }

  .contact-form .row > .col-md-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    flex: 0 0 100%;
    max-width: 100%;
  }
}
/* --------- DASHBOARD --------- */
.dashboard-section {
  min-height: calc(100vh - 140px);
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
}

.dashboard-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}

.dashboard-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.dashboard-title strong {
  color: #93c121;
}

.dashboard-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 400;
}

/* Cards del Dashboard */
.dashboard-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #93c121, #6c8f1a);
  opacity: 0.8;
}

.dashboard-card.primary::before {
  background: linear-gradient(90deg, #93c121, #7ed321);
  opacity: 1;
}

.dashboard-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15);
  border-color: rgba(147, 193, 33, 0.3);
}

.dashboard-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 1rem 0 0.5rem;
  line-height: 1.3;
}

.dashboard-card p {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.dashboard-card .card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.dashboard-card .card-icon i {
  font-size: 1.8rem;
  color: white;
}

.dashboard-card.primary .card-icon {
  background: linear-gradient(135deg, #93c121, #7ed321);
  box-shadow: 0 8px 20px rgba(147, 193, 33, 0.3);
}

.dashboard-card .card-arrow {
  margin-left: auto;
  font-size: 1.2rem;
  color: #93c121;
  transition: transform 0.3s ease;
}

.dashboard-card:hover .card-arrow {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 991.98px) {
  .dashboard-section {
    padding: 2.5rem 1rem;
  }

  .dashboard-card {
    padding: 1.75rem 1.25rem;
  }
}

@media (max-width: 767.98px) {
  .dashboard-title {
    font-size: 1.75rem;
  }

  .dashboard-card h3 {
    font-size: 1.15rem;
  }
}
/* --------- PÁGINAS DE FORMULARIOS --------- */
.form-section {
  min-height: calc(100vh - 140px);
  padding: 3rem 1rem;
  background: #f8fafc;
}

.page-header {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.page-subtitle {
  color: #6b7280;
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
}

.required::after {
  content: " *";
  color: #ef4444;
}

/* Formulario cliente */
.client-form {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.client-form .form-control,
.client-form .form-control:focus {
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.client-form .form-control:focus {
  border-color: #93c121;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.15);
  background-color: #fff;
}

.client-form .input-group-text {
  background: #f8fafc;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 12px 0 0 12px;
}

.client-form .form-control.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
  }

  .client-form {
    padding: 2rem 1.5rem;
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
/* --------- LISTA CLIENTES MEJORADA --------- */
.search-section {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-form .search-input {
  border-radius: 12px 0 0 12px;
  border: 1px solid #d1d5db;
  padding: 0.85rem 1rem;
}

.search-form .input-group-text,
.search-form .btn {
  border-radius: 0;
}

.search-form .btn:last-child {
  border-radius: 0 12px 12px 0;
}

.clientes-table .cliente-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cliente-nombre {
  font-weight: 700;
  color: #111827;
  font-size: 1rem;
}

.fecha-creacion {
  font-weight: 600;
  color: #059669;
}

/* --------- DETALLE CLIENTE --------- */
.tel-link {
  color: #3b82f6;
  text-decoration: none;
}

.tel-link:hover {
  text-decoration: underline;
}

.info-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.4;
}

.info-value.small {
  font-size: 0.9rem !important;
  color: #6b7280 !important;
  font-weight: 500;
}

.whatsapp-link {
  color: #25d366;
  font-weight: 600;
  text-decoration: none;
}

.whatsapp-link:hover {
  text-decoration: underline;
}

/* --------- BOTONES DE ACCIÓN GRANDES --------- */
.actions-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.actions-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 2rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.action-btn i {
  font-size: 1.25rem;
  width: 24px;
}

.action-btn span {
  flex: 1;
}

/* Colores específicos de botones */
.action-btn.primary {
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  color: white;
  border-color: #93c121;
}

.action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(147, 193, 33, 0.3);
}

.action-btn.secondary {
  color: #1f2937;
  border-color: #d1d5db;
}

.action-btn.secondary:hover {
  background-color: #f3f4f6;
  border-color: #93c121;
  color: #93c121;
}

.action-btn.danger {
  color: #dc2626;
  border-color: #fecaca;
}

.action-btn.danger:hover {
  background-color: #fef2f2;
  border-color: #dc2626;
  color: #dc2626;
}

.action-btn.whatsapp {
  background: #25d366;
  color: white;
  border-color: #25d366;
}

.action-btn.whatsapp:hover {
  background: #128c7e;
  border-color: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 211, 102, 0.3);
}

/* --------- RESPONSIVE --------- */
@media (max-width: 991.98px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .actions-card {
    margin-top: 2rem;
    position: static;
    order: 3;
  }

  .action-btn {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  .clientes-table tbody td::before {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .actions-card {
    padding: 2rem 1.5rem;
  }
}
/* --------- ELIMINAR CLIENTE --------- */
.delete-section {
  min-height: calc(100vh - 140px);
  padding: 3rem 1rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  display: flex;
  align-items: center;
}

.delete-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 25px 60px rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.delete-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.delete-icon i {
  font-size: 2.5rem;
  color: #dc2626;
}

.delete-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.delete-info {
  background: #fef2f2;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid #dc2626;
}

.cliente-nombre {
  font-size: 1.25rem;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 0.5rem;
}

.cliente-meta {
  color: #6b7280;
  font-size: 0.95rem;
}

.delete-description {
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.delete-form .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.delete-form .btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
}

.delete-form .btn-outline-secondary {
  flex: 1;
  max-width: 150px;
}

.delete-form .btn-danger {
  flex: 1;
  max-width: 180px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: #dc2626;
}

.delete-form .btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(220, 38, 38, 0.3);
}

/* Responsive */
@media (max-width: 767.98px) {
  .delete-card {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }

  .delete-section {
    padding: 2rem 1rem;
  }

  .delete-form .form-actions {
    flex-direction: column;
  }
}
/* =============================================
   COTIZACIONES - BASADO EN DISEÑO EXISTENTE
   ============================================= */

/* --------- SECCIÓN COTIZACIÓN --------- */
.cotizacion-section,
.cotizacion-view,
.listado-section {
  min-height: calc(100vh - 140px);
  padding: 3rem 1rem;
  background: #f8fafc;
}

.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
}

/* --------- PAGE HEADER --------- */
.page-header {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.page-header .row {
  align-items: center;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.page-subtitle {
  color: #6b7280;
  margin: 0.25rem 0 0;
  font-size: 1rem;
}

/* --------- FORMULARIO DE COTIZACIÓN --------- */
.form-card {
  background: white;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 2rem;
}

.form-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #93c121;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control,
.form-select {
  border-radius: 12px;
  border: 1px solid #d1d5db;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
  border-color: #93c121;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.15);
  outline: none;
  background-color: #fff;
}

.form-control::placeholder {
  color: #9ca3af;
}

/* --------- TABLA DE ITEMS --------- */
.table-responsive {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.5rem;
}

#tablaItems {
  margin-bottom: 0;
  width: 100%;
}

#tablaItems thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

#tablaItems thead th {
  padding: 1rem;
  font-weight: 700;
  text-align: center;
  border: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#tablaItems tbody td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

#tablaItems tbody tr:last-child td {
  border-bottom: none;
}

#tablaItems tbody td input,
#tablaItems tbody td textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#tablaItems tbody td input:focus,
#tablaItems tbody td textarea:focus {
  border-color: #93c121;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.1);
  outline: none;
}

#tablaItems tbody td textarea {
  resize: vertical;
  min-height: 60px;
}

.item-row {
  background: white;
  transition: background 0.2s ease;
}

.item-row:hover {
  background: #f9fafb;
}

/* --------- BOTONES --------- */
.btn {
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn i {
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(59, 130, 246, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(245, 158, 11, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.3);
}

.btn-outline-secondary {
  background: white;
  color: #374151;
  border: 2px solid #d1d5db;
}

.btn-outline-secondary:hover {
  background: #f3f4f6;
  border-color: #93c121;
  color: #93c121;
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 2px solid #d1d5db;
}

.btn-secondary:hover {
  background: white;
  border-color: #93c121;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

/* --------- BOTONES DE GENERACIÓN --------- */
.btn-group-cotizacion {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.btn-group-cotizacion .btn {
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

.btn-group-cotizacion .btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

/* --------- VISTA DE COTIZACIÓN --------- */
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.estado-form {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 2rem;
}

.estado-form .row {
  align-items: center;
}

.estado-form .form-select {
  min-width: 180px;
}

/* =============================================
   FACTURA DEL CLIENTE - PROFESIONAL
   ============================================= */

.factura-cliente {
  background: white;
  padding: 3rem 3rem 2.5rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Encabezado de factura */
.factura-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid #93c121;
}

.logo-section h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1f2937;
  margin: 0;
  letter-spacing: -0.5px;
}

.logo-section .subtitle {
  color: #93c121;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

.empresa-info {
  text-align: right;
  font-size: 0.9rem;
  line-height: 1.8;
  color: #6b7280;
}

.empresa-info strong {
  color: #1f2937;
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Número de cotización */
.factura-numero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-radius: 12px;
  border: 2px solid #93c121;
  border-left: 5px solid #6c8f1a;
}

.factura-numero h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
}

.factura-numero p {
  margin: 0;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Datos del cliente */
.cliente-datos {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border-left: 4px solid #93c121;
}

.cliente-datos .row {
  margin: 0;
}

.cliente-datos p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #1f2937;
}

.cliente-datos strong {
  color: #374151;
  font-weight: 700;
  display: inline-block;
  min-width: 100px;
}

/* --------- TABLA DE ITEMS EN FACTURA --------- */
.tabla-items {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.tabla-items thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.tabla-items thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tabla-items thead th:first-child {
  text-align: center;
}

.tabla-items thead th:nth-child(3),
.tabla-items thead th:nth-child(4) {
  text-align: right;
}

.tabla-items tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
  color: #374151;
}

.tabla-items tbody tr:last-child td {
  border-bottom: none;
}

.tabla-items tbody tr:hover {
  background: #f9fafb;
}

.tabla-items tbody td:first-child {
  text-align: center;
  font-weight: 600;
}

.tabla-items tbody td:nth-child(3),
.tabla-items tbody td:nth-child(4) {
  text-align: right;
  font-weight: 600;
  color: #1f2937;
}

/* --------- TOTALES FACTURA --------- */
.factura-totales {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e5e7eb;
}

.totales-izquierda {
  flex: 1;
}

.totales-izquierda p {
  margin: 0.75rem 0;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.6;
}

.totales-izquierda strong {
  color: #1f2937;
  font-weight: 700;
}

.observaciones {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
}

.observaciones p {
  margin: 0.5rem 0;
}

.observaciones strong {
  color: #92400e;
}

.clausula-pequeña {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: #6b7280;
  text-align: justify;
  border: 1px solid #e5e7eb;
}

.totales-derecha {
  min-width: 350px;
}

/* Tabla de cálculos */
.tabla-calculos {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.tabla-calculos tr td {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.tabla-calculos tr:last-child td {
  border-bottom: none;
}

.tabla-calculos tr td:first-child {
  text-align: left;
  font-weight: 700;
  color: #374151;
  width: 60%;
}

.tabla-calculos tr td:last-child {
  text-align: right;
  color: #1f2937;
  font-weight: 600;
  width: 40%;
}

.tabla-calculos tr.total-final {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.tabla-calculos tr.total-final td {
  padding: 1.25rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
}

/* --------- CLAUSULA CABLES --------- */
.clausula-cables {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =============================================
   FACTURA INTERNA
   ============================================= */

.factura-interna {
  background: white;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #10b981;
}

.tabla-interna {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.tabla-interna thead {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.tabla-interna thead th {
  padding: 1rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tabla-interna tbody td {
  padding: 0.875rem 1rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

.tabla-interna tbody td:nth-child(2) {
  text-align: left;
}

.tabla-interna tbody tr:hover {
  background: #f9fafb;
}

.tabla-interna tfoot tr {
  background: #f9fafb;
  font-weight: 700;
}

.tabla-interna tfoot tr td {
  padding: 1rem;
  border-top: 2px solid #10b981;
}

.tabla-interna tfoot tr.total-interno {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 1.05rem;
}

/* =============================================
   TABLA DE GANANCIAS
   ============================================= */

.tabla-ganancias {
  background: white;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.tabla-ganancias .section-title {
  border-bottom-color: #f59e0b;
}

.tabla-analisis {
  width: 100%;
  border-collapse: collapse;
}

.tabla-analisis tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.tabla-analisis tbody tr:last-child {
  border-bottom: none;
}

.tabla-analisis tbody td {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
}

.tabla-analisis tbody td:first-child {
  width: 60%;
  font-weight: 700;
  color: #374151;
}

.tabla-analisis tbody td:last-child {
  width: 40%;
  text-align: right;
  color: #1f2937;
  font-weight: 600;
}

.tabla-analisis tbody tr:hover {
  background: #f9fafb;
}

.tabla-analisis .highlight-row {
  background: #fef3c7;
  font-weight: 800;
}

.tabla-analisis .highlight-row td {
  color: #92400e;
}

.tabla-analisis .separator td {
  padding: 0.5rem;
  background: #f3f4f6;
  border: none;
}

.tabla-analisis .total-gastos {
  background: #dcfce7;
}

.tabla-analisis .total-gastos td {
  color: #166534;
  font-size: 1.05rem;
  font-weight: 800;
}

.tabla-analisis .queda-libre {
  background: #dbeafe;
}

.tabla-analisis .queda-libre td {
  color: #1e40af;
  font-size: 1.1rem;
  font-weight: 800;
}

.tabla-analisis .total-dc {
  background: linear-gradient(135deg, #9fe39f, #46acbd);
  color: white;
}

.tabla-analisis .total-dc td {
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
  border: none;
  padding: 1.25rem;
}

/* =============================================
   LISTADO DE COTIZACIONES
   ============================================= */

.table-responsive {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.table {
  background: white;
  margin-bottom: 0;
  border: none;
  width: 100%;
}

.table thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.table thead th {
  padding: 1rem 1.25rem;
  font-weight: 700;
  border: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:hover {
  background: #f9fafb;
}

.table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  font-size: 0.95rem;
}

.table tbody tr:last-child {
  border-bottom: none;
}

/* --------- BADGES --------- */
.badge {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge.bg-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge.bg-success {
  background: #dcfce7;
  color: #166534;
}

.badge.bg-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge.bg-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1200px) {
  .container-fluid {
    max-width: 100%;
  }

  .factura-totales {
    gap: 2rem;
  }
}

@media (max-width: 992px) {
  .factura-totales {
    flex-direction: column;
  }

  .totales-derecha {
    min-width: 100%;
  }

  .btn-group-cotizacion {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 1.5rem;
  }

  .form-card {
    padding: 2rem 1.5rem;
  }

  .factura-cliente {
    padding: 2rem 1.5rem;
  }

  .factura-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .empresa-info {
    text-align: center;
  }

  .logo-section h1 {
    font-size: 1.8rem;
  }

  .cliente-datos {
    padding: 1.25rem;
  }

  .tabla-items,
  .tabla-interna,
  .tabla-analisis {
    font-size: 0.85rem;
  }

  .tabla-items thead th,
  .tabla-interna thead th {
    padding: 0.75rem 0.5rem;
  }

  .tabla-items tbody td,
  .tabla-interna tbody td {
    padding: 0.75rem 0.5rem;
  }

  .factura-totales {
    gap: 1.5rem;
  }

  .btn-group-cotizacion {
    grid-template-columns: 1fr;
  }

  #tablaItems thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }

  #tablaItems tbody td {
    padding: 0.5rem;
  }
}

@media (max-width: 576px) {
  .page-header {
    padding: 1.5rem;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .form-card {
    padding: 1.5rem 1rem;
  }

  .factura-cliente {
    padding: 1.5rem 1rem;
  }

  .logo-section h1 {
    font-size: 1.5rem;
  }

  .empresa-info {
    font-size: 0.8rem;
  }

  .factura-numero h2 {
    font-size: 1.4rem;
  }

  .tabla-items thead th,
  .tabla-interna thead th {
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
  }

  .tabla-items tbody td,
  .tabla-interna tbody td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  .clausula-cables {
    font-size: 0.85rem;
    padding: 1.25rem;
  }

  .clausula-pequeña {
    font-size: 0.7rem;
  }
}

/* =============================================
   IMPRESIÓN Y PDF
   ============================================= */

@media print {
  @page {
    size: letter;
    margin: 0.5in;
  }

  .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .cotizacion-view {
    background: white;
    padding: 0;
  }

  .factura-cliente {
    box-shadow: none;
    border: none;
    page-break-after: always;
    padding: 1.5rem 0;
    margin: 0;
  }

  .factura-header {
    border-bottom: 2px solid #1f2937;
  }

  .factura-numero {
    background: white;
    border: 2px solid #1f2937;
  }

  .cliente-datos {
    background: white;
    border: 1px solid #e5e7eb;
  }

  .tabla-items,
  .tabla-calculos {
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }

  .tabla-items tbody tr:hover,
  .item-row:hover,
  .table tbody tr:hover {
    background: white;
  }

  .factura-totales {
    page-break-inside: avoid;
  }

  .clausula-cables {
    background: #1f2937;
    box-shadow: none;
  }

  .observaciones {
    background: white;
    border: 1px solid #f59e0b;
  }

  .clausula-pequeña {
    background: white;
    border: 1px solid #e5e7eb;
  }

  .factura-interna,
  .tabla-ganancias {
    display: none;
  }
}

/* =============================================
   UTILIDADES
   ============================================= */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.g-2 {
  gap: 0.5rem;
}

.required::after {
  content: " *";
  color: #ef4444;
}
/* =============================================
   LOGIN PAGE - DISEÑO MODERNO
   ============================================= */

.login-section {
  min-height: calc(100vh - 90px);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  padding: 3rem 1rem;
  display: flex;
  align-items: center;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

/* --------- LADO IZQUIERDO: INFORMACIÓN --------- */
.login-info {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.login-brand {
  text-align: left;
}

.login-logo {
  height: 100px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 12px rgba(147, 193, 33, 0.3));
}

.login-welcome {
  font-size: 3rem;
  font-weight: 900;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
  letter-spacing: -1px;
  line-height: 1;
}

.login-subtitle {
  font-size: 1.15rem;
  color: #6b7280;
  font-weight: 500;
  margin: 0;
}

/* Features */
.login-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border-color: #93c121;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.3);
}

.feature-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.25rem 0;
}

.feature-text p {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

/* --------- LADO DERECHO: FORMULARIO --------- */
.login-form-container {
  display: flex;
  justify-content: center;
}

.login-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  width: 100%;
  max-width: 480px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.login-description {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
}

/* --------- ALERTAS MODERNAS --------- */
.alert-danger-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  position: relative;
  transition: opacity 0.3s ease;
}

.alert-icon {
  font-size: 1.3rem;
  color: #ef4444;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
  font-size: 0.9rem;
  color: #991b1b;
  line-height: 1.4;
}

.alert-content strong {
  font-weight: 700;
  display: block;
  margin-bottom: 0.15rem;
}

.alert-close {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.alert-close:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* --------- FORMULARIO --------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group-modern {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label-modern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-label-modern i {
  font-size: 1rem;
  color: #93c121;
}

.form-input-modern {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #1f2937;
  background: #f9fafb;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input-modern:focus {
  outline: none;
  border-color: #93c121;
  background: white;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.1);
}

.form-input-modern::placeholder {
  color: #9ca3af;
}

/* Password input con toggle */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .form-input-modern {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #93c121;
}

/* --------- FOOTER DEL FORMULARIO --------- */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-modern {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #93c121;
}

.checkbox-label {
  font-size: 0.9rem;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.forgot-password {
  font-size: 0.9rem;
  color: #93c121;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: #6c8f1a;
  text-decoration: underline;
}

/* --------- BOTONES --------- */
.btn-login {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.3);
  margin-top: 0.75rem;
}

.btn-login:hover {
  background: linear-gradient(135deg, #7ea61d, #5a7916);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(147, 193, 33, 0.4);
}

.btn-login i {
  font-size: 1.2rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.divider span {
  padding: 0 1rem;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Botón de registro */
.btn-register {
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-register:hover {
  background: rgba(147, 193, 33, 0.08);
  border-color: #93c121;
  color: #93c121;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.15);
}

.btn-register i {
  font-size: 1.1rem;
}

/* --------- RESPONSIVE --------- */

@media (max-width: 991.98px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .login-info {
    text-align: center;
  }

  .login-brand {
    text-align: center;
  }

  .login-logo {
    height: auto;
  }

  .login-welcome {
    font-size: 2.5rem;
  }

  .login-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-item {
    padding: 1rem;
  }

  .feature-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .login-section {
    padding: 2rem 1rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .login-welcome {
    font-size: 2rem;
  }

  .login-subtitle {
    font-size: 1rem;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .form-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .feature-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .feature-text {
    text-align: center;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeIn 0.5s ease;
}

.feature-item {
  animation: fadeIn 0.5s ease;
  animation-fill-mode: both;
}

.feature-item:nth-child(1) {
  animation-delay: 0.1s;
}

.feature-item:nth-child(2) {
  animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
  animation-delay: 0.3s;
}
/* =============================================
   REGISTER PAGE - DISEÑO MODERNO
   ============================================= */

.register-section {
  min-height: calc(100vh - 90px);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
  padding: 3rem 1rem;
}

.register-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* --------- ENCABEZADO --------- */
.register-header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeIn 0.5s ease;
}

.register-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 8px 24px rgba(147, 193, 33, 0.3);
}

.register-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
  letter-spacing: -1px;
}

.register-subtitle {
  font-size: 1.05rem;
  color: #6b7280;
  margin: 0;
}

/* --------- CARD DEL FORMULARIO --------- */
.register-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
  animation: fadeIn 0.6s ease;
}

/* --------- SECCIONES DEL FORMULARIO --------- */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #f1f5f9;
}

.form-section:last-of-type {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-header i {
  font-size: 1.5rem;
  color: #93c121;
}

.section-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0;
}

/* --------- FORMULARIO --------- */
.register-form {
  display: flex;
  flex-direction: column;
}

.form-group-modern {
  margin-bottom: 1.25rem;
}

.form-label-modern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.5rem;
}

.form-label-modern i {
  font-size: 0.95rem;
  color: #93c121;
}

.required {
  color: #ef4444;
  font-weight: 700;
}

.form-input-modern {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #1f2937;
  background: #f9fafb;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input-modern:focus {
  outline: none;
  border-color: #93c121;
  background: white;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.1);
}

.form-input-modern::placeholder {
  color: #9ca3af;
}

/* Password input con toggle */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper .form-input-modern {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: #93c121;
}

/* Password strength indicator */
.password-strength,
.password-match {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
}

.password-strength i,
.password-match i {
  margin-right: 0.25rem;
}

/* --------- TÉRMINOS Y CONDICIONES --------- */
.form-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 2px solid #e5e7eb;
}

.checkbox-modern {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #93c121;
  flex-shrink: 0;
  margin-top: 2px;
}

.terms-label {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.6;
  cursor: pointer;
  user-select: none;
}

.terms-link {
  color: #93c121;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.terms-link:hover {
  color: #6c8f1a;
  text-decoration: underline;
}

/* --------- BOTONES --------- */
.form-actions-register {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-register-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.3);
}

.btn-register-submit:hover {
  background: linear-gradient(135deg, #7ea61d, #5a7916);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(147, 193, 33, 0.4);
}

.btn-register-submit i {
  font-size: 1.2rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 0.5rem 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.divider span {
  padding: 0 1rem;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Botón de login */
.btn-login-link {
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-login-link:hover {
  background: rgba(147, 193, 33, 0.08);
  border-color: #93c121;
  color: #93c121;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.15);
}

.btn-login-link i {
  font-size: 1.1rem;
}

/* --------- RESPONSIVE --------- */

@media (max-width: 767.98px) {
  .register-section {
    padding: 2rem 1rem;
  }

  .register-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .register-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .register-title {
    font-size: 2rem;
  }

  .register-subtitle {
    font-size: 0.95rem;
  }

  .section-header h3 {
    font-size: 1.1rem;
  }

  .form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .register-icon {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .register-title {
    font-size: 1.75rem;
  }

  .register-card {
    padding: 1.75rem 1.25rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .form-terms {
    padding: 1rem;
  }

  .terms-label {
    font-size: 0.85rem;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------- GRID RESPONSIVE --------- */
.row.g-3 {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.row.g-3 > [class*="col"] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* --------- VALIDACIÓN VISUAL --------- */
.form-input-modern:invalid:not(:placeholder-shown) {
  border-color: #fecaca;
}

.form-input-modern:valid:not(:placeholder-shown) {
  border-color: #93c121;
}
/* =============================================
   FOOTER SIMPLE Y ELEGANTE
   ============================================= */

.footer-simple {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #9ca3af;
  padding: 2rem 0;
  margin-top: auto;
  border-top: 2px solid #93c121;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-info {
  flex: 1;
}

.footer-copyright {
  font-size: 0.9rem;
  color: #d1d5db;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.footer-credits {
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 0;
}

.footer-link {
  color: #93c121;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
}

.footer-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #93c121;
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: #7ea61d;
}

.footer-link:hover::after {
  width: 100%;
}

/* Enlaces adicionales */
.footer-links-simple {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-link-item {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-link-item:hover {
  color: #93c121;
}

.separator {
  color: #4b5563;
  font-size: 0.8rem;
}

/* --------- RESPONSIVE --------- */

@media (max-width: 767.98px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-info {
    order: 1;
  }

  .footer-links-simple {
    order: 2;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 576px) {
  .footer-simple {
    padding: 1.5rem 0;
  }

  .footer-copyright {
    font-size: 0.85rem;
  }

  .footer-credits {
    font-size: 0.8rem;
  }

  .footer-link-item {
    font-size: 0.8rem;
  }
}

/* --------- PRINT --------- */
@media print {
  .footer-simple {
    display: none;
  }
}
/* =============================================
   BARRA DE BÚSQUEDA MODERNA
   ============================================= */

.search-container {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 2;
}

.search-input {
  width: 100%;
  padding: 1rem 3.5rem 1rem 3.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #1f2937;
  background: #f9fafb;
  transition: all 0.3s ease;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: #93c121;
  background: white;
  box-shadow: 0 0 0 4px rgba(147, 193, 33, 0.1);
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search-clear:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.search-results-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #6b7280;
  padding-left: 0.25rem;
}

.search-results-info span {
  font-weight: 700;
  color: #93c121;
  font-size: 1rem;
}

/* --------- NO RESULTS MESSAGE --------- */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  background: white;
  border-radius: 16px;
  margin-top: 1rem;
}

.no-results-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
  color: #9ca3af;
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.no-results p {
  font-size: 1rem;
  color: #6b7280;
  margin: 0 0 1.5rem 0;
}

/* --------- TABLE IMPROVEMENTS --------- */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-hover tbody tr {
  transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
  background-color: rgba(147, 193, 33, 0.05);
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* --------- RESPONSIVE --------- */

@media (max-width: 991.98px) {
  .search-container {
    padding: 1.25rem;
  }

  .search-input {
    padding: 0.9rem 3rem 0.9rem 3rem;
    font-size: 0.9rem;
  }

  .search-icon {
    left: 1rem;
    font-size: 1.1rem;
  }
}

@media (max-width: 767.98px) {
  .search-container {
    padding: 1rem;
    border-radius: 12px;
  }

  .search-input {
    padding: 0.85rem 2.75rem 0.85rem 2.75rem;
    font-size: 0.85rem;
  }

  .search-input::placeholder {
    font-size: 0.85rem;
  }

  .search-icon {
    left: 0.85rem;
    font-size: 1rem;
  }

  .search-clear {
    right: 0.85rem;
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
  }

  .search-results-info {
    font-size: 0.85rem;
  }

  .search-results-info span {
    font-size: 0.95rem;
  }

  .action-buttons {
    flex-direction: column;
    width: 100%;
  }

  .action-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .no-results {
    padding: 3rem 1.5rem;
  }

  .no-results-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  .no-results h3 {
    font-size: 1.3rem;
  }

  .no-results p {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .page-header .row {
    flex-direction: column;
    gap: 1rem;
  }

  .page-header .col-auto {
    width: 100%;
  }

  .page-header .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .search-input::placeholder {
    content: "Buscar...";
  }
}

/* --------- ANIMACIONES --------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-container {
  animation: fadeIn 0.4s ease;
}

/* Efecto de typing en el placeholder */
.search-input:focus::placeholder {
  opacity: 0.5;
}

/* --------- ACCESIBILIDAD --------- */
.search-input:focus-visible {
  outline: 2px solid #93c121;
  outline-offset: 2px;
}

.search-clear:focus-visible {
  outline: 2px solid #93c121;
  outline-offset: 2px;
}
/* =============================================
   TABLA RESPONSIVE - CORRECCIÓN
   ============================================= */

/* Ajustar ancho de columna de acciones en desktop */
.table thead th:last-child,
.table tbody td:last-child {
  width: 200px;
  min-width: 200px;
}

/* Botones de acción más compactos */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.action-buttons .btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* --------- RESPONSIVE MOBILE --------- */

@media (max-width: 991.98px) {
  /* Convertir tabla a cards en móvil */
  .table-responsive {
    border: none;
    overflow: visible;
  }

  .table {
    display: block;
    width: 100%;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: block;
    width: 100%;
  }

  .table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem;
    transition: all 0.3s ease;
  }

  .table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  }

  .table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
  }

  .table tbody td:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid #f1f5f9;
  }

  .table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
  }

  .table tbody td:last-child::before {
    content: "";
  }

  /* Acciones en móvil - Full width */
  .table tbody td:last-child {
    flex-direction: column;
    align-items: stretch;
  }

  .action-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .action-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Ajustar badges y contenido */
  .table tbody td .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }

  .table tbody td strong {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .table tbody tr {
    padding: 0.875rem;
  }

  .table tbody td {
    padding: 0.65rem 0;
    font-size: 0.9rem;
  }

  .table tbody td::before {
    font-size: 0.7rem;
  }

  .action-buttons .btn {
    padding: 0.65rem 0.875rem;
    font-size: 0.85rem;
  }
}

/* --------- TABLA DESKTOP --------- */

@media (min-width: 992px) {
  /* Asegurar que la tabla use scroll horizontal si es necesario */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ancho fijo para columnas específicas */
  .table thead th:nth-child(1), /* No. Cotización */
  .table tbody td:nth-child(1) {
    width: 150px;
    min-width: 150px;
  }

  .table thead th:nth-child(2), /* Tipo */
  .table tbody td:nth-child(2) {
    width: 100px;
    min-width: 100px;
  }

  .table thead th:nth-child(3), /* Cliente */
  .table tbody td:nth-child(3) {
    width: auto;
    min-width: 200px;
  }

  .table thead th:nth-child(4), /* Fecha */
  .table tbody td:nth-child(4) {
    width: 120px;
    min-width: 120px;
  }

  .table thead th:nth-child(5), /* Estado */
  .table tbody td:nth-child(5) {
    width: 120px;
    min-width: 120px;
  }

  .table thead th:nth-child(6), /* Acciones */
  .table tbody td:nth-child(6) {
    width: 200px;
    min-width: 200px;
  }
}

/* --------- MEJORAS GENERALES DE LA TABLA --------- */

.table {
  margin-bottom: 0;
}

.table thead {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 2px solid #93c121;
}

.table thead th {
  font-weight: 800;
  color: #1f2937;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 1rem 0.75rem;
  border: none;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
  padding: 1rem 0.75rem;
  color: #374151;
}

.table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:last-child {
  border-bottom: none;
}

/* Badges mejorados */
.badge {
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge.bg-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  color: white;
}

.badge.bg-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: white;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: white;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: white;
}

/* --------- BOTONES DE ACCIÓN MEJORADOS --------- */

.btn-sm {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-sm i {
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* --------- CONTENEDOR DE LA TABLA --------- */

.table-responsive {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .table-responsive {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

/* --------- SCROLL HORIZONTAL SUAVE EN DESKTOP --------- */

@media (min-width: 992px) {
  .table-responsive::-webkit-scrollbar {
    height: 8px;
  }

  .table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
  }

  .table-responsive::-webkit-scrollbar-thumb {
    background: #93c121;
    border-radius: 4px;
  }

  .table-responsive::-webkit-scrollbar-thumb:hover {
    background: #6c8f1a;
  }
}

/* --------- ANIMACIONES --------- */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
  .table tbody tr {
    animation: slideIn 0.3s ease;
    animation-fill-mode: both;
  }

  .table tbody tr:nth-child(1) {
    animation-delay: 0.05s;
  }
  .table tbody tr:nth-child(2) {
    animation-delay: 0.1s;
  }
  .table tbody tr:nth-child(3) {
    animation-delay: 0.15s;
  }
  .table tbody tr:nth-child(4) {
    animation-delay: 0.2s;
  }
  .table tbody tr:nth-child(5) {
    animation-delay: 0.25s;
  }
}

/* --------- ESTADO VACÍO --------- */

.table tbody tr.no-data {
  text-align: center;
  padding: 3rem 1rem;
}

.table tbody tr.no-data td {
  border: none;
}
/* =============================================
   CORRECCIÓN ACCIONES EN MÓVIL
   ============================================= */

@media (max-width: 991.98px) {
  /* Convertir tabla a cards en móvil */
  .table-responsive {
    border: none;
    overflow: visible;
  }

  .table {
    display: block;
    width: 100%;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: block;
    width: 100%;
  }

  .table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem;
    transition: all 0.3s ease;
  }

  .table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  }

  .table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    text-align: right;
  }

  .table tbody td:last-child {
    border-bottom: none;
    padding-top: 1rem;
    padding-bottom: 0;
    margin-top: 0.5rem;
    border-top: 2px solid #f1f5f9;
    display: block; /* Cambiado de flex a block */
    text-align: left;
  }

  .table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    text-align: left;
  }

  .table tbody td:last-child::before {
    content: "Acciones";
    display: block;
    margin-bottom: 0.75rem;
    text-align: left;
  }

  /* Acciones en móvil - Full width y centrados */
  .action-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
  }

  .action-buttons .btn {
    width: 100% !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    margin: 0;
  }

  .action-buttons .btn i {
    margin-right: 0.5rem;
  }

  /* Ajustar badges y contenido */
  .table tbody td .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }

  .table tbody td strong {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .table tbody tr {
    padding: 1rem 0.875rem;
  }

  .table tbody td {
    padding: 0.7rem 0;
    font-size: 0.9rem;
  }

  .table tbody td::before {
    font-size: 0.7rem;
  }

  .table tbody td:last-child {
    padding-top: 1rem;
  }

  .table tbody td:last-child::before {
    margin-bottom: 0.65rem;
  }

  .action-buttons {
    gap: 0.6rem;
  }

  .action-buttons .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* --------- ASEGURAR QUE NO HAYA CONFLICTOS --------- */
@media (max-width: 991.98px) {
  /* Forzar que los botones tomen todo el ancho */
  .table tbody td[data-label="Acciones"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .table tbody td[data-label="Acciones"] .action-buttons {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Remover cualquier restricción de ancho */
  .table tbody td:last-child,
  .table thead th:last-child {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
  }
}
/* =============================================
   CLIENTES - ESTILOS MODERNOS
   ============================================= */

/* --------- INFO DEL CLIENTE EN TABLA --------- */
.cliente-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cliente-nombre {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.95rem;
}

.cliente-contacto {
  color: #6b7280;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cliente-contacto i {
  font-size: 0.8rem;
  color: #93c121;
}

/* --------- BADGES Y ELEMENTOS --------- */
.badge-ciudad {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
  color: #1e40af !important;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-ciudad i {
  font-size: 0.85rem;
}

.nit-text {
  font-family: "Courier New", monospace;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.telefono-text {
  color: #374151;
  font-weight: 500;
}

/* --------- FECHA INFO --------- */
.fecha-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fecha-principal {
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.fecha-secundaria {
  color: #6b7280;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.fecha-secundaria i {
  font-size: 0.7rem;
}

/* --------- ALERTAS PERSONALIZADAS --------- */
.alert-success-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #bbf7d0;
  border-left: 4px solid #10b981;
  border-radius: 12px;
  position: relative;
}

.alert-success-custom .alert-icon {
  font-size: 1.3rem;
  color: #10b981;
  flex-shrink: 0;
}

.alert-success-custom .alert-content {
  flex: 1;
  font-size: 0.9rem;
  color: #065f46;
  line-height: 1.4;
}

.alert-success-custom .alert-content strong {
  font-weight: 700;
  display: inline;
  margin-right: 0.25rem;
}

/* --------- FORMULARIO DE BÚSQUEDA --------- */
.search-form-clientes {
  width: 100%;
}

.search-submit {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #93c121;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.search-submit:hover {
  color: #6c8f1a;
  background: rgba(147, 193, 33, 0.1);
  transform: translateY(-50%) scale(1.1);
}

.search-clear {
  position: absolute;
  right: 3.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.search-clear:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* --------- PAGINACIÓN MODERNA --------- */
.pagination-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pagination-modern {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-modern .page-item .page-link {
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.5rem 0.875rem;
  color: #374151;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-modern .page-item.active .page-link {
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  border-color: #93c121;
  color: white;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.3);
}

.pagination-modern .page-item .page-link:hover:not(.active) {
  background: rgba(147, 193, 33, 0.1);
  border-color: #93c121;
  color: #93c121;
  transform: translateY(-2px);
}

.pagination-modern .page-item.disabled .page-link {
  border-color: transparent;
  background: transparent;
  color: #9ca3af;
}

.pagination-info {
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
}

.pagination-info strong {
  color: #93c121;
  font-weight: 700;
}

/* --------- RESPONSIVE CLIENTES --------- */

@media (max-width: 991.98px) {
  /* Tabla a cards */
  .cliente-row td:nth-child(1) {
    padding-top: 1rem !important;
  }

  .cliente-info {
    width: 100%;
  }

  .cliente-nombre {
    font-size: 1rem;
  }

  .badge-ciudad {
    display: inline-flex;
    width: fit-content;
  }

  /* Acciones full width */
  .cliente-row td:last-child {
    display: block !important;
  }

  .cliente-row td:last-child .action-buttons {
    width: 100%;
  }

  .btn-action {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Formulario de búsqueda */
  .search-submit {
    right: 0.85rem;
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
  }

  .search-clear {
    right: 3rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .page-header .col-auto {
    width: 100%;
  }

  .page-header .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .cliente-nombre {
    font-size: 0.95rem;
  }

  .cliente-contacto {
    font-size: 0.8rem;
  }

  .pagination-modern {
    gap: 0.35rem;
  }

  .pagination-modern .page-item .page-link {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    min-width: 36px;
  }

  .pagination-info {
    font-size: 0.85rem;
  }
}

/* --------- NO DATA ROW --------- */
.no-data-row td {
  border: none !important;
  padding: 0 !important;
}

.no-data-row .no-results {
  padding: 4rem 2rem;
}

@media (max-width: 991.98px) {
  .no-data-row {
    display: block !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    padding: 2rem 1rem !important;
  }

  .no-data-row td {
    display: block !important;
    padding: 0 !important;
  }

  .no-data-row td::before {
    display: none !important;
  }
}
/* =============================================
   TABLA DE GANANCIAS - RESPONSIVE
   ============================================= */

.tabla-ganancias {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 2rem;
  overflow: hidden;
}

.tabla-ganancias .section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #93c121;
}

/* --------- TABLA DE ANÁLISIS --------- */
.tabla-analisis {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.tabla-analisis tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.2s ease;
}

.tabla-analisis tbody tr:hover {
  background: rgba(147, 193, 33, 0.05);
}

.tabla-analisis tbody tr:last-child {
  border-bottom: none;
}

.tabla-analisis tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
}

.tabla-analisis tbody td:first-child {
  color: #374151;
  font-weight: 600;
  width: 60%;
}

.tabla-analisis tbody td:last-child {
  color: #1f2937;
  font-weight: 700;
  text-align: right;
  width: 40%;
}

/* Filas destacadas */
.tabla-analisis tbody tr.highlight-row {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-left: 4px solid #10b981;
}

.tabla-analisis tbody tr.highlight-row td {
  color: #065f46;
  font-weight: 700;
  padding: 1.125rem 1rem;
}

.tabla-analisis tbody tr.total-gastos {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  border-left: 4px solid #f59e0b;
}

.tabla-analisis tbody tr.total-gastos td {
  color: #92400e;
  font-weight: 800;
  padding: 1.125rem 1rem;
  font-size: 1.05rem;
}

.tabla-analisis tbody tr.queda-libre {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-left: 4px solid #3b82f6;
}

.tabla-analisis tbody tr.queda-libre td {
  color: #1e40af;
  font-weight: 800;
  padding: 1.125rem 1rem;
  font-size: 1.05rem;
}

.tabla-analisis tbody tr.total-dc {
  background: linear-gradient(135deg, #f0fdf4, #d1fae5);
  border-left: 4px solid #93c121;
}

.tabla-analisis tbody tr.total-dc td {
  color: #14532d;
  font-weight: 900;
  padding: 1.25rem 1rem;
  font-size: 1.1rem;
}

/* Separador */
.tabla-analisis tbody tr.separator td {
  padding: 0.75rem 0;
  background: transparent;
  border-bottom: 2px solid #e5e7eb;
}

/* --------- RESPONSIVE MÓVIL --------- */

@media (max-width: 991.98px) {
  .tabla-ganancias {
    padding: 1.5rem 1rem;
    border-radius: 12px;
  }

  .tabla-ganancias .section-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
  }

  .tabla-analisis {
    font-size: 0.9rem;
  }

  .tabla-analisis tbody td {
    padding: 0.75rem 0.875rem;
  }

  .tabla-analisis tbody td:first-child {
    width: 55%;
    font-size: 0.85rem;
  }

  .tabla-analisis tbody td:last-child {
    width: 45%;
    font-size: 0.9rem;
  }

  .tabla-analisis tbody tr.highlight-row td,
  .tabla-analisis tbody tr.total-gastos td,
  .tabla-analisis tbody tr.queda-libre td,
  .tabla-analisis tbody tr.total-dc td {
    padding: 1rem 0.875rem;
    font-size: 0.95rem;
  }

  .tabla-analisis tbody tr.total-dc td {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .tabla-ganancias {
    padding: 1.25rem 0.875rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0;
  }

  .tabla-ganancias .section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .tabla-analisis {
    font-size: 0.85rem;
  }

  .tabla-analisis tbody td {
    padding: 0.65rem 0.75rem;
  }

  .tabla-analisis tbody td:first-child {
    width: 50%;
    font-size: 0.8rem;
    word-break: break-word;
  }

  .tabla-analisis tbody td:last-child {
    width: 50%;
    font-size: 0.85rem;
  }

  .tabla-analisis tbody tr.highlight-row td,
  .tabla-analisis tbody tr.total-gastos td,
  .tabla-analisis tbody tr.queda-libre td {
    padding: 0.875rem 0.75rem;
    font-size: 0.9rem;
  }

  .tabla-analisis tbody tr.total-dc td {
    padding: 1rem 0.75rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .tabla-ganancias {
    padding: 1rem 0.75rem;
  }

  .tabla-ganancias .section-title {
    font-size: 0.95rem;
    text-align: center;
  }

  /* Convertir a formato de lista apilada */
  .tabla-analisis tbody tr {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background: #f9fafb;
    border-bottom: none;
  }

  .tabla-analisis tbody tr.highlight-row,
  .tabla-analisis tbody tr.total-gastos,
  .tabla-analisis tbody tr.queda-libre,
  .tabla-analisis tbody tr.total-dc {
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  }

  .tabla-analisis tbody td {
    width: 100% !important;
    display: block;
    padding: 0.35rem 0;
    text-align: left !important;
  }

  .tabla-analisis tbody td:first-child {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.25rem;
  }

  .tabla-analisis tbody td:last-child {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
  }

  .tabla-analisis tbody tr.highlight-row td:last-child {
    color: #065f46;
  }

  .tabla-analisis tbody tr.total-gastos td:last-child {
    color: #92400e;
  }

  .tabla-analisis tbody tr.queda-libre td:last-child {
    color: #1e40af;
  }

  .tabla-analisis tbody tr.total-dc td:last-child {
    color: #14532d;
    font-size: 1.1rem;
  }

  .tabla-analisis tbody tr.separator {
    display: none;
  }
}

/* --------- VERSIÓN ALTERNATIVA: SCROLL HORIZONTAL --------- */
/* Si prefieres scroll horizontal en lugar de apilar, usa esto: */

@media (max-width: 576px) {
  .tabla-ganancias-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tabla-ganancias-scroll .tabla-analisis {
    min-width: 500px;
  }

  /* Scrollbar personalizado */
  .tabla-ganancias-scroll::-webkit-scrollbar {
    height: 6px;
  }

  .tabla-ganancias-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
  }

  .tabla-ganancias-scroll::-webkit-scrollbar-thumb {
    background: #93c121;
    border-radius: 3px;
  }

  .tabla-ganancias-scroll::-webkit-scrollbar-thumb:hover {
    background: #6c8f1a;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes slideInTable {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabla-ganancias {
  animation: slideInTable 0.5s ease;
}

/* --------- IMPRIMIR --------- */
@media print {
  .tabla-ganancias {
    box-shadow: none;
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  .tabla-analisis tbody td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .tabla-analisis tbody tr.highlight-row,
  .tabla-analisis tbody tr.total-gastos,
  .tabla-analisis tbody tr.queda-libre,
  .tabla-analisis tbody tr.total-dc {
    background: #f5f5f5 !important;
  }
}
/* =============================================
   FACTURA INTERNA - TABLA RESPONSIVE
   ============================================= */

.factura-interna {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 2rem;
  overflow: hidden;
}

.factura-interna .section-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #93c121;
}

/* --------- WRAPPER CON SCROLL --------- */
.factura-interna {
  position: relative;
}

.tabla-interna-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1rem;
  padding: 0 1rem;
}

/* --------- TABLA INTERNA --------- */
.tabla-interna {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 700px; /* Ancho mínimo para mantener estructura */
  background: white;
}

.tabla-interna thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.tabla-interna thead th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border-bottom: 3px solid #93c121;
  white-space: nowrap;
}

.tabla-interna thead th:first-child {
  text-align: center;
  width: 80px;
}

.tabla-interna thead th:nth-child(2) {
  text-align: left;
  min-width: 250px;
}

.tabla-interna thead th:nth-child(3),
.tabla-interna thead th:nth-child(4),
.tabla-interna thead th:nth-child(5) {
  text-align: right;
  width: 120px;
}

.tabla-interna thead th:last-child {
  text-align: center;
  width: 80px;
}

/* --------- TBODY --------- */
.tabla-interna tbody tr {
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.2s ease;
}

.tabla-interna tbody tr:hover {
  background: rgba(147, 193, 33, 0.05);
}

.tabla-interna tbody td {
  padding: 1rem 0.75rem;
  color: #374151;
  vertical-align: top;
}

.tabla-interna tbody td:first-child {
  text-align: center;
  font-weight: 700;
  color: #1f2937;
}

.tabla-interna tbody td:nth-child(2) {
  font-weight: 500;
  line-height: 1.5;
}

.tabla-interna tbody td:nth-child(3),
.tabla-interna tbody td:nth-child(4),
.tabla-interna tbody td:nth-child(5) {
  text-align: right;
  font-weight: 600;
  font-family: "Courier New", monospace;
}

.tabla-interna tbody td:last-child {
  text-align: center;
  font-weight: 700;
  color: #93c121;
}

/* --------- TFOOT --------- */
.tabla-interna tfoot {
  background: #f9fafb;
  border-top: 2px solid #93c121;
}

.tabla-interna tfoot tr {
  border-bottom: 1px solid #e5e7eb;
}

.tabla-interna tfoot tr:last-child {
  border-bottom: none;
}

.tabla-interna tfoot td {
  padding: 0.875rem 0.75rem;
  color: #374151;
  font-weight: 600;
}

.tabla-interna tfoot td:nth-child(3),
.tabla-interna tfoot td:nth-child(4),
.tabla-interna tfoot td:last-child {
  text-align: right;
  font-family: "Courier New", monospace;
}

/* Fila de subtotal */
.tabla-interna tfoot tr:first-child td {
  font-weight: 700;
  color: #1f2937;
  font-size: 1rem;
  padding-top: 1.25rem;
}

/* Fila de total */
.tabla-interna tfoot tr.total-interno {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-top: 3px solid #93c121;
}

.tabla-interna tfoot tr.total-interno td {
  font-weight: 900;
  color: #14532d;
  font-size: 1.15rem;
  padding: 1.25rem 0.75rem;
}

/* --------- SCROLLBAR PERSONALIZADO --------- */
.tabla-interna-wrapper::-webkit-scrollbar {
  height: 8px;
}

.tabla-interna-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.tabla-interna-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #93c121, #6c8f1a);
  border-radius: 4px;
}

.tabla-interna-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #6c8f1a, #5a7916);
}

/* --------- INDICADOR DE SCROLL --------- */
.scroll-indicator {
  display: none;
  text-align: center;
  padding: 0.75rem;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 8px;
  margin-top: 0.75rem;
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 600;
}

.scroll-indicator i {
  margin-right: 0.35rem;
  animation: slideHorizontal 1.5s infinite;
}

@keyframes slideHorizontal {
  0%,
  100% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
}

/* --------- RESPONSIVE --------- */

@media (max-width: 991.98px) {
  .factura-interna {
    padding: 1.5rem 1rem;
  }

  .factura-interna .section-title {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
  }

  .tabla-interna {
    font-size: 0.85rem;
    min-width: 650px;
  }

  .tabla-interna thead th {
    padding: 0.875rem 0.65rem;
    font-size: 0.75rem;
  }

  .tabla-interna tbody td,
  .tabla-interna tfoot td {
    padding: 0.875rem 0.65rem;
  }

  .tabla-interna tfoot tr.total-interno td {
    font-size: 1.05rem;
  }

  /* Mostrar indicador de scroll */
  .scroll-indicator {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .factura-interna {
    padding: 1.25rem 0.875rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 12px;
  }

  .factura-interna .section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .tabla-interna-wrapper {
    margin: 0 -0.875rem;
    padding: 0 0.875rem;
  }

  .tabla-interna {
    font-size: 0.8rem;
    min-width: 600px;
  }

  .tabla-interna thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.7rem;
  }

  .tabla-interna thead th:nth-child(2) {
    min-width: 200px;
  }

  .tabla-interna thead th:nth-child(3),
  .tabla-interna thead th:nth-child(4),
  .tabla-interna thead th:nth-child(5) {
    width: 100px;
  }

  .tabla-interna tbody td,
  .tabla-interna tfoot td {
    padding: 0.75rem 0.5rem;
  }

  .tabla-interna tfoot tr.total-interno td {
    font-size: 1rem;
    padding: 1.125rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .factura-interna {
    padding: 1rem 0.75rem;
    border-radius: 0;
  }

  .factura-interna .section-title {
    font-size: 0.9rem;
    text-align: center;
  }

  .tabla-interna-wrapper {
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
  }

  .tabla-interna {
    font-size: 0.75rem;
    min-width: 550px;
  }

  .tabla-interna thead th {
    padding: 0.65rem 0.4rem;
    font-size: 0.65rem;
  }

  .tabla-interna thead th:first-child {
    width: 60px;
  }

  .tabla-interna thead th:nth-child(2) {
    min-width: 180px;
  }

  .tabla-interna thead th:nth-child(3),
  .tabla-interna thead th:nth-child(4),
  .tabla-interna thead th:nth-child(5) {
    width: 90px;
  }

  .tabla-interna thead th:last-child {
    width: 60px;
  }

  .tabla-interna tbody td,
  .tabla-interna tfoot td {
    padding: 0.65rem 0.4rem;
  }

  .tabla-interna tfoot tr:first-child td {
    font-size: 0.85rem;
    padding-top: 1rem;
  }

  .tabla-interna tfoot tr.total-interno td {
    font-size: 0.95rem;
    padding: 1rem 0.4rem;
  }

  .scroll-indicator {
    font-size: 0.8rem;
    padding: 0.65rem;
  }
}

/* --------- SHADOW LATERAL (Indica que hay más contenido) --------- */
.factura-interna::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.factura-interna.has-scroll::after {
  opacity: 1;
}

/* --------- ANIMACIONES --------- */
@keyframes fadeInTable {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.factura-interna {
  animation: fadeInTable 0.5s ease;
}

/* --------- IMPRIMIR --------- */
@media print {
  .factura-interna {
    box-shadow: none;
    border: 2px solid #000;
    page-break-inside: avoid;
  }

  .tabla-interna {
    font-size: 0.75rem;
  }

  .tabla-interna thead {
    background: #e5e7eb !important;
    color: #000 !important;
  }

  .tabla-interna thead th {
    border: 1px solid #000;
  }

  .tabla-interna tbody td,
  .tabla-interna tfoot td {
    border: 1px solid #ccc;
    padding: 0.5rem;
  }

  .tabla-interna tfoot tr.total-interno {
    background: #f0f0f0 !important;
    border: 2px solid #000 !important;
  }

  .scroll-indicator {
    display: none;
  }
}
.factura-header-compact {
  padding: 1.5rem 2rem;
}

.empresa-info-compact {
  gap: 0.5rem;
}

.info-linea {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.4;
}

.info-linea strong {
  font-weight: 800;
  color: #1f2937;
  font-size: 1rem;
}

@media (max-width: 991.98px) {
  .factura-header-compact {
    padding: 1.25rem 1.5rem;
  }

  .empresa-info-compact {
    text-align: center;
  }
}

@media (max-width: 576px) {
  .info-linea {
    font-size: 0.8rem;
  }

  .info-linea strong {
    font-size: 0.9rem;
  }
}
/* =============================================
   FACTURA CLIENTE - VERSIÓN COMPACTA
   ============================================= */

.factura-cliente {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --------- HEADER COMPACTO --------- */
.factura-header-compact {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  gap: 2rem;
}

.factura-header-compact .logo-section {
  max-width: 280px;
  flex-shrink: 0;
}

.factura-header-compact .logo-factura {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.empresa-info-compact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
  flex: 1;
}

.info-linea {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.4;
}

.info-linea strong {
  font-weight: 800;
  color: #1f2937;
  font-size: 0.95rem;
}

/* --------- NÚMERO DE COTIZACIÓN --------- */
.factura-numero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.factura-numero h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tipo-badge {
  background: #93c121;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* --------- DATOS DEL CLIENTE COMPACTO (3 COLUMNAS) --------- */
.cliente-datos-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.dato-item {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.dato-item-full {
  grid-column: 1 / -1;
}

.dato-label {
  font-weight: 700;
  color: #6b7280;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.dato-valor {
  color: #1f2937;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --------- CLAUSULA CABLES DESTACADA --------- */
.clausula-cables {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 3px solid #ef4444;
  border-left: 8px solid #dc2626;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  font-weight: 900;
  font-size: 1.05rem;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.clausula-cables i {
  font-size: 1.5rem;
  color: #dc2626;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* --------- RESPONSIVE --------- */

@media (max-width: 991.98px) {
  .factura-cliente {
    padding: 1.5rem;
  }

  .factura-header-compact {
    gap: 1rem;
  }

  .factura-header-compact .logo-section {
    max-width: 240px;
  }

  .factura-numero {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .factura-numero h2 {
    font-size: 1.3rem;
  }

  .cliente-datos-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .clausula-cables {
    font-size: 0.95rem;
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 767.98px) {
  .factura-header-compact {
    flex-direction: column;
    align-items: center;
  }

  .empresa-info-compact {
    text-align: center;
    width: 100%;
  }

  .cliente-datos-compact {
    grid-template-columns: 1fr;
  }

  .dato-item {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 576px) {
  .factura-cliente {
    padding: 1rem;
  }

  .factura-header-compact .logo-section {
    max-width: 200px;
  }

  .info-linea {
    font-size: 0.8rem;
  }

  .factura-numero h2 {
    font-size: 1.1rem;
  }

  .tipo-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .dato-label,
  .dato-valor {
    font-size: 0.8rem;
  }

  .clausula-cables {
    font-size: 0.85rem;
    padding: 0.875rem;
  }

  .clausula-cables i {
    font-size: 1.2rem;
  }
}

/* =============================================
   DISEÑO DE IMPRESIÓN - BLANCO Y NEGRO
   ============================================= */

@media print {
  /* Remover colores para impresión B&W */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: white !important;
    margin: 0;
    padding: 0;
    color: #000 !important;
  }

  /* Ocultar elementos no necesarios */
  .no-print,
  nav,
  footer,
  .btn,
  .navbar,
  .scroll-top-btn {
    display: none !important;
  }

  /* --------- CONTENEDOR PRINCIPAL --------- */
  .factura-cliente {
    background: white !important;
    padding: 10mm !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 2px solid #000 !important;
    margin: 0 !important;
    page-break-inside: avoid;
  }

  /* --------- HEADER COMPACTO (2 COLUMNAS) --------- */
  .factura-header-compact {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 5mm !important;
    background: #f5f5f5 !important;
    border-radius: 0 !important;
    border: 2px solid #000 !important;
    margin-bottom: 4mm !important;
    gap: 5mm !important;
  }

  .factura-header-compact .logo-section {
    max-width: 70mm !important;
    flex-shrink: 0 !important;
  }

  .factura-header-compact .logo-factura {
    width: 100% !important;
    max-width: 70mm !important;
    height: auto !important;
  }

  .empresa-info-compact {
    display: flex !important;
    flex-direction: column !important;
    gap: 1mm !important;
    text-align: right !important;
    flex: 1 !important;
  }

  .info-linea {
    font-size: 8pt !important;
    color: #000 !important;
    line-height: 1.3 !important;
  }

  .info-linea strong {
    font-weight: 900 !important;
    color: #000 !important;
    font-size: 9pt !important;
  }

  /* --------- NÚMERO DE COTIZACIÓN --------- */
  .factura-numero {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 4mm 5mm !important;
    background: #e0e0e0 !important;
    color: #000 !important;
    border-radius: 0 !important;
    border: 2px solid #000 !important;
    margin-bottom: 4mm !important;
  }

  .factura-numero h2 {
    font-size: 13pt !important;
    font-weight: 900 !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000 !important;
  }

  .tipo-badge {
    background: #d0d0d0 !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    padding: 2mm 4mm !important;
    border-radius: 0 !important;
    font-weight: 900 !important;
    font-size: 9pt !important;
    text-transform: uppercase;
  }

  /* --------- DATOS DEL CLIENTE (3 COLUMNAS) --------- */
  .cliente-datos-compact {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2mm 3mm !important;
    padding: 4mm 5mm !important;
    background: #f9f9f9 !important;
    border-radius: 0 !important;
    border: 2px solid #000 !important;
    margin-bottom: 4mm !important;
  }

  .dato-item {
    display: flex !important;
    flex-direction: column !important;
    gap: 1mm !important;
    align-items: flex-start !important;
  }

  .dato-item-full {
    grid-column: 1 / -1 !important;
  }

  .dato-label {
    font-weight: 900 !important;
    color: #000 !important;
    font-size: 7pt !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .dato-valor {
    color: #000 !important;
    font-weight: 700 !important;
    font-size: 8pt !important;
  }

  /* --------- TABLA DE ITEMS --------- */
  .tabla-items {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-bottom: 4mm !important;
    page-break-inside: avoid;
  }

  .tabla-items thead {
    background: #e0e0e0 !important;
  }

  .tabla-items thead th {
    border: 2px solid #000 !important;
    padding: 2mm !important;
    font-size: 8pt !important;
    font-weight: 900 !important;
    color: #000 !important;
    text-align: left !important;
  }

  .tabla-items tbody td {
    border: 1px solid #000 !important;
    padding: 2mm !important;
    font-size: 8pt !important;
    color: #000 !important;
  }

  /* --------- CLAUSULA CABLES (COMPACTA Y DESTACADA EN B&W) --------- */
  .clausula-cables {
    background: #f0f0f0 !important;
    border: 4px double #000 !important;
    padding: 4mm 5mm !important;
    border-radius: 0 !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 9pt !important;
    color: #000 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4mm !important;
    display: block !important;
    box-shadow: inset 0 0 0 1px #000 !important;
    page-break-inside: avoid;
  }

  .clausula-cables i {
    font-size: 10pt !important;
    color: #000 !important;
    display: inline !important;
    animation: none !important;
  }

  /* --------- TOTALES --------- */
  .factura-totales {
    display: flex !important;
    justify-content: space-between !important;
    gap: 4mm !important;
    page-break-inside: avoid;
    margin-top: 4mm !important;
  }

  .totales-izquierda {
    flex: 1 !important;
    font-size: 7pt !important;
  }

  .totales-izquierda p {
    margin-bottom: 2mm !important;
    color: #000 !important;
  }

  .totales-derecha {
    width: auto !important;
    min-width: 70mm !important;
  }

  .tabla-calculos {
    border-collapse: collapse !important;
    width: 100% !important;
    border: 2px solid #000 !important;
  }

  .tabla-calculos tr {
    border-bottom: 1px solid #666 !important;
  }

  .tabla-calculos td {
    padding: 2mm !important;
    font-size: 8pt !important;
    color: #000 !important;
  }

  .tabla-calculos td:first-child {
    text-align: left !important;
  }

  .tabla-calculos td:last-child {
    text-align: right !important;
    font-weight: 700 !important;
  }

  .tabla-calculos tr.total-final {
    background: #e0e0e0 !important;
    border-top: 3px solid #000 !important;
  }

  .tabla-calculos tr.total-final td {
    font-size: 10pt !important;
    font-weight: 900 !important;
    padding: 3mm !important;
    color: #000 !important;
  }

  .clausula-pequeña {
    font-size: 6pt !important;
    line-height: 1.3 !important;
    color: #000 !important;
    margin-top: 2mm !important;
    text-align: justify !important;
  }

  .observaciones {
    margin-top: 2mm !important;
    padding: 2mm !important;
    background: #f9f9f9 !important;
    border-radius: 0 !important;
    border: 1px solid #000 !important;
  }

  .observaciones p {
    margin-bottom: 1mm !important;
    color: #000 !important;
    font-size: 7pt !important;
  }

  .observaciones strong {
    color: #000 !important;
    font-weight: 900 !important;
  }

  /* --------- MÁRGENES DE PÁGINA --------- */
  @page {
    margin: 12mm;
    size: letter;
  }

  /* --------- EVITAR SALTOS DE PÁGINA --------- */
  .factura-header-compact,
  .factura-numero,
  .cliente-datos-compact,
  .tabla-items,
  .factura-totales,
  .clausula-cables {
    page-break-inside: avoid !important;
  }
}
/* =============================================
   VER CLIENTE - DETALLE
   Integrado con estilo de plataforma DC Eléctricos
   ============================================= */

/* --------- SECCIÓN PRINCIPAL --------- */
.detalle-section {
  background: #f5f5f7;
  min-height: calc(100vh - 160px);
  padding: 2rem 0 4rem;
}

/* --------- HEADER DE PÁGINA --------- */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0.5rem 0 0;
  font-weight: 500;
}

.page-header .btn-group {
  display: flex;
  gap: 0.75rem;
}

.page-header .btn {
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.page-header .btn-outline-secondary {
  border: 2px solid #d1d5db;
  color: #6b7280;
  background: white;
}

.page-header .btn-outline-secondary:hover {
  border-color: #93c121;
  color: #93c121;
  background: #f0fdf4;
  transform: translateY(-2px);
}

/* --------- TARJETA DE INFORMACIÓN (IZQUIERDA) --------- */
.info-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  transition: box-shadow 0.3s ease;
}

.info-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

/* --------- GRID DE INFORMACIÓN (2 COLUMNAS) --------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}

.info-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.info-item:last-child,
.info-item:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
  padding-bottom: 0;
}

.info-item label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.info-value i {
  color: #93c121;
  font-size: 1.1rem;
}

.info-value.small {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.info-value.small i {
  font-size: 0.95rem;
}

.tel-link {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.3s ease;
}

.tel-link:hover {
  color: #93c121;
  text-decoration: underline;
}

/* --------- TARJETA DE ACCIONES (DERECHA) --------- */
.actions-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  border: 1px solid #e5e7eb;
  position: sticky;
  top: 2rem;
}

.actions-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.actions-title i {
  color: #93c121;
  font-size: 1.3rem;
}

/* --------- BOTONES DE ACCIÓN GRANDES --------- */
.action-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  border: 2px solid transparent;
}

.action-btn i {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.action-btn span {
  flex: 1;
  text-align: left;
}

.action-btn:last-child {
  margin-bottom: 0;
}

/* WhatsApp */
.action-btn.whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border-color: #25d366;
}

.action-btn.whatsapp:hover {
  background: linear-gradient(135deg, #128c7e, #075e54);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Primary (Nueva Cotización) */
.action-btn.primary {
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  color: white;
  border-color: #93c121;
}

.action-btn.primary:hover {
  background: linear-gradient(135deg, #6c8f1a, #5a7916);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(147, 193, 33, 0.4);
}

/* Secondary (Editar) */
.action-btn.secondary {
  background: white;
  color: #6b7280;
  border-color: #d1d5db;
}

.action-btn.secondary:hover {
  background: #f9fafb;
  color: #1f2937;
  border-color: #93c121;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

/* Danger (Eliminar) */
.action-btn.danger {
  background: white;
  color: #dc2626;
  border-color: #fecaca;
}

.action-btn.danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: white;
  border-color: #dc2626;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

/* --------- RESPONSIVE --------- */

@media (max-width: 1199.98px) {
  .actions-card {
    position: relative;
    top: 0;
  }
}

@media (max-width: 991.98px) {
  .page-title {
    font-size: 1.75rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .page-header .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .page-header .btn {
    width: 100%;
    justify-content: center;
  }

  .info-card,
  .actions-card {
    padding: 1.5rem;
  }

  .action-btn {
    padding: 1rem 1.25rem;
  }

  /* Grid en 1 columna en tablet */
  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .info-item:last-child,
  .info-item:nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1.25rem;
  }

  .info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .detalle-section {
    padding: 1rem 0 2rem;
  }

  .page-header {
    margin-bottom: 1.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 0.95rem;
  }

  .info-card,
  .actions-card {
    border-radius: 12px;
    padding: 1.25rem;
  }

  .info-grid {
    gap: 1.25rem;
  }

  .info-item {
    padding-bottom: 1.25rem;
  }

  .info-item label {
    font-size: 0.75rem;
  }

  .info-value {
    font-size: 0.95rem;
  }

  .actions-title {
    font-size: 1.1rem;
  }

  .action-btn {
    padding: 1rem;
    font-size: 0.95rem;
  }

  .action-btn i {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .page-header .row {
    flex-direction: column;
    gap: 1rem;
  }

  .page-header .col-auto {
    width: 100%;
  }

  .info-card,
  .actions-card {
    padding: 1rem;
  }

  .info-item label {
    font-size: 0.7rem;
  }

  .info-value {
    font-size: 0.9rem;
  }

  .action-btn {
    padding: 0.875rem;
    font-size: 0.9rem;
  }

  .action-btn i {
    font-size: 1.2rem;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-card,
.actions-card {
  animation: slideInUp 0.5s ease;
}

.actions-card {
  animation-delay: 0.1s;
}

/* --------- ESTADOS ADICIONALES --------- */
.action-btn:active {
  transform: translateY(0) scale(0.98);
}

.action-btn:focus {
  outline: 3px solid rgba(147, 193, 33, 0.3);
  outline-offset: 2px;
}
/* =============================================
   MÓDULO DE INVENTARIO/PRODUCTOS
   ============================================= */

/* --------- PREVIEW DE PRECIOS --------- */
.precio-preview {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
}

.precio-preview h5 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.precio-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.precio-card:hover {
  border-color: #93c121;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.2);
}

.precio-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.precio-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: #93c121;
  font-family: "Courier New", monospace;
}

/* --------- TABLA DE PRECIOS EN DETALLE --------- */
.table-precios {
  margin-bottom: 0;
}

.table-precios thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.table-precios thead th {
  padding: 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}

.table-precios tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.table-precios tbody tr:hover {
  background: rgba(147, 193, 33, 0.05);
}

.table-precios tbody td {
  padding: 1rem;
  vertical-align: middle;
}

/* Badges de tipos de cotización */
[class*="badge-tipo-"] {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.badge-tipo-c1 {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.badge-tipo-c2 {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.badge-tipo-c3 {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.badge-tipo-c4 {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.badge-tipo-c5 {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
}

/* --------- SECCIÓN DE TÍTULO --------- */
.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 1.5rem;
}

.section-title i {
  color: #93c121;
  font-size: 1.3rem;
}

/* --------- MODAL CREAR CATEGORÍA --------- */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.modal-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 2px solid #e5e7eb;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
}

.modal-title i {
  color: #93c121;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 2px solid #f1f5f9;
  padding: 1rem 1.5rem;
}

/* --------- SELECT MEJORADO --------- */
.select-searchable {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

.select-searchable:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2393c121' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

/* --------- TABLA DE INVENTARIO - AJUSTES --------- */
.table thead th {
  white-space: nowrap;
  font-size: 0.8rem;
}

.table tbody .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
}

/* --------- RESPONSIVE --------- */

@media (max-width: 1199.98px) {
  .precio-value {
    font-size: 1.3rem;
  }

  .table-precios {
    font-size: 0.9rem;
  }
}

@media (max-width: 991.98px) {
  .precio-preview {
    padding: 1.25rem;
  }

  .precio-card {
    padding: 0.875rem;
  }

  .precio-label {
    font-size: 0.75rem;
  }

  .precio-value {
    font-size: 1.2rem;
  }

  /* Tabla de inventario como cards en móvil */
  .table thead th:nth-child(3),
  .table thead th:nth-child(4),
  .table thead th:nth-child(5),
  .table thead th:nth-child(6),
  .table thead th:nth-child(7),
  .table thead th:nth-child(8) {
    display: none;
  }

  .table tbody td:nth-child(3),
  .table tbody td:nth-child(4),
  .table tbody td:nth-child(5),
  .table tbody td:nth-child(6),
  .table tbody td:nth-child(7),
  .table tbody td:nth-child(8) {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .precio-preview h5 {
    font-size: 1rem;
  }

  .precio-card {
    padding: 0.75rem;
  }

  .precio-value {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .table-precios thead th {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
  }

  .table-precios tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  [class*="badge-tipo-"] {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .precio-preview {
    padding: 1rem;
  }

  .precio-card {
    padding: 0.65rem;
  }

  .precio-label {
    font-size: 0.7rem;
  }

  .precio-value {
    font-size: 1rem;
  }

  .page-header .btn-lg {
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
  }

  /* Tabla de precios en detalle - Stack en móvil */
  .table-precios thead {
    display: none;
  }

  .table-precios tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
  }

  .table-precios tbody td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
  }

  .table-precios tbody td:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid #f1f5f9;
  }

  .table-precios tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.7rem;
  }

  .table-precios tbody td:first-child::before {
    content: "TIPO";
  }

  .table-precios tbody td:nth-child(2)::before {
    content: "DIVISOR";
  }

  .table-precios tbody td:nth-child(3)::before {
    content: "CÁLCULO";
  }

  .table-precios tbody td:nth-child(4)::before {
    content: "PRECIO";
  }
}

/* --------- ANIMACIONES --------- */
@keyframes slideInCard {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.precio-card {
  animation: slideInCard 0.3s ease;
}

.precio-card:nth-child(1) {
  animation-delay: 0.05s;
}
.precio-card:nth-child(2) {
  animation-delay: 0.1s;
}
.precio-card:nth-child(3) {
  animation-delay: 0.15s;
}
.precio-card:nth-child(4) {
  animation-delay: 0.2s;
}
.precio-card:nth-child(5) {
  animation-delay: 0.25s;
}

/* --------- ESTADOS DE ALERTA --------- */
.alert {
  border-radius: 12px;
  border: none;
  padding: 1rem 1.25rem;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.alert i {
  font-size: 1.2rem;
  vertical-align: middle;
}

/* --------- PRINT --------- */
@media print {
  .precio-preview,
  .action-btn,
  .actions-card,
  .btn,
  .search-container,
  .page-header .col-auto {
    display: none !important;
  }

  .table-precios {
    page-break-inside: avoid;
  }

  .info-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}

/* --------- ACCESIBILIDAD --------- */
.precio-card:focus-within {
  outline: 3px solid rgba(147, 193, 33, 0.3);
  outline-offset: 2px;
}

.select-searchable:focus-visible {
  outline: 3px solid rgba(147, 193, 33, 0.3);
  outline-offset: 2px;
}

/* --------- MEJORA VISUAL DE FORMULARIOS --------- */
.form-label.required {
  position: relative;
}

.form-label.required::after {
  content: " *";
  color: #ef4444;
  font-weight: 700;
}

.invalid-feedback {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* --------- HOVER EFFECTS EN TABLA --------- */
.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(147, 193, 33, 0.03);
  transform: scale(1.005);
}
/* =============================================
   TABLA DE INVENTARIO - CLASES PERSONALIZADAS
   Sin afectar otras tablas del sistema
   ============================================= */

/* --------- CONTENEDOR DE TABLA --------- */
.inventario-table-wrapper {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 2rem;
  overflow-x: auto;
}

/* --------- TABLA BASE --------- */
.inventario-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --------- ENCABEZADO --------- */
.inventario-table thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.inventario-table thead th {
  padding: 1rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border: none;
}

.inventario-table thead th:first-child {
  border-radius: 12px 0 0 0;
}

.inventario-table thead th:last-child {
  border-radius: 0 12px 0 0;
}

/* --------- COLUMNAS ESPECÍFICAS --------- */
.inventario-table .precio-col {
  text-align: center;
  min-width: 100px;
}

.inventario-table .acciones-col {
  text-align: right;
  width: 300px;
  min-width: 300px;
  padding-right: 1rem !important;
}

/* --------- CUERPO DE TABLA --------- */
.inventario-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.inventario-table tbody tr:hover {
  background: rgba(147, 193, 33, 0.05);
}

.inventario-table tbody td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
  border: none;
}

.inventario-table tbody td strong {
  color: #1f2937;
  font-weight: 700;
}

/* --------- BOTONES DE ACCIÓN PERSONALIZADOS --------- */
.inventario-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.btn-inventario {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-inventario i {
  font-size: 0.95rem;
}

/* Botón Info (Ver) */
.btn-inventario-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-inventario-info:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  color: white;
}

/* Botón Warning (Editar) */
.btn-inventario-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-inventario-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  color: white;
}

/* Botón Danger (Eliminar) */
.btn-inventario-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-inventario-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  color: white;
}

.btn-inventario:active {
  transform: translateY(0);
}

/* --------- RESPONSIVE - TABLETS --------- */
@media (max-width: 1399.98px) {
  .inventario-table .acciones-col {
    width: 280px;
    min-width: 280px;
  }

  .btn-inventario {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
  }

  .inventario-actions {
    gap: 0.4rem;
  }
}

@media (max-width: 1199.98px) {
  .inventario-table .acciones-col {
    width: 260px;
    min-width: 260px;
  }

  .btn-inventario {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .btn-inventario i {
    font-size: 0.9rem;
  }
}

/* --------- RESPONSIVE - MÓVIL (CARDS) --------- */
@media (max-width: 991.98px) {
  .inventario-table-wrapper {
    padding: 1rem;
    border-radius: 12px;
  }

  /* Ocultar thead */
  .inventario-table thead {
    display: none;
  }

  /* Convertir tbody a block */
  .inventario-table tbody {
    display: block;
  }

  /* Cada fila como card */
  .inventario-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem;
  }

  .inventario-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  }

  /* Celdas como filas */
  .inventario-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .inventario-table tbody td:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid #f1f5f9;
    flex-direction: column;
    align-items: stretch;
  }

  /* Labels para cada celda */
  .inventario-table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }

  .inventario-table tbody td:last-child::before {
    content: "ACCIONES";
    margin-bottom: 0.75rem;
    text-align: center;
  }

  /* Ocultar columnas de precios en móvil */
  .inventario-table tbody td.precio-col {
    display: none;
  }

  /* Botones full width en móvil */
  .inventario-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .btn-inventario {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .btn-inventario i {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .inventario-table-wrapper {
    padding: 0.75rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 8px;
  }

  .inventario-table tbody tr {
    padding: 0.875rem;
    border-radius: 10px;
  }

  .inventario-table tbody td {
    padding: 0.65rem 0;
  }

  .inventario-table tbody td::before {
    font-size: 0.7rem;
  }

  .inventario-actions {
    gap: 0.6rem;
  }

  .btn-inventario {
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 576px) {
  .inventario-table-wrapper {
    padding: 0.5rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  .inventario-table tbody tr {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .inventario-table tbody td {
    padding: 0.6rem 0;
    font-size: 0.9rem;
  }

  .inventario-table tbody td::before {
    font-size: 0.68rem;
  }

  .inventario-actions {
    gap: 0.55rem;
  }

  .btn-inventario {
    padding: 0.65rem 0.85rem;
    font-size: 0.86rem;
  }

  .btn-inventario i {
    font-size: 0.95rem;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inventario-table tbody tr {
  animation: fadeInRow 0.3s ease;
}

/* --------- ACCESIBILIDAD --------- */
.btn-inventario:focus {
  outline: 3px solid rgba(147, 193, 33, 0.4);
  outline-offset: 2px;
}

.btn-inventario:focus-visible {
  outline: 3px solid rgba(147, 193, 33, 0.4);
  outline-offset: 2px;
}

/* --------- PRINT --------- */
@media print {
  .inventario-actions,
  .btn-inventario {
    display: none !important;
  }

  .inventario-table-wrapper {
    box-shadow: none;
    border: 1px solid #000;
    padding: 0;
  }

  .inventario-table {
    font-size: 0.85rem;
  }

  .inventario-table thead {
    background: #000 !important;
    color: #fff !important;
  }

  .inventario-table tbody tr {
    page-break-inside: avoid;
  }
}

/* --------- ESTADOS ADICIONALES --------- */
.inventario-table tbody tr.producto-destacado {
  background: rgba(147, 193, 33, 0.08);
  border-left: 4px solid #93c121;
}

.inventario-table tbody tr.producto-agotado {
  opacity: 0.6;
}

.inventario-table tbody tr.producto-agotado td {
  text-decoration: line-through;
}
/* --------- AJUSTE NAVBAR MOBILE CON 6 ITEMS --------- */
@media (max-width: 991.98px) {
  .mobile-nav-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en lugar de 4 */
    gap: 0.5rem;
    max-width: 100%;
    padding: 0 1rem;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.4rem;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s ease;
    position: relative;
  }

  .mobile-nav-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #374151;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }

  .mobile-nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    letter-spacing: 0.3px;
    transition: color 0.3s ease;
  }
}

@media (max-width: 576px) {
  .mobile-nav-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding: 0 0.75rem;
  }

  .mobile-nav-item {
    padding: 0.6rem 0.3rem;
  }

  .mobile-nav-icon {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .mobile-nav-label {
    font-size: 0.68rem;
  }
}

/* Ajuste del body padding para navbar mobile más alto */
@media (max-width: 991.98px) {
  body {
    padding-top: 140px; /* Aumentado para 6 items en 2 filas */
  }
}

@media (max-width: 576px) {
  body {
    padding-top: 135px;
  }
}
/* =============================================
   MÓDULO DE USUARIOS - TABLA PERSONALIZADA
   ============================================= */

/* --------- CONTENEDOR DE TABLA USUARIOS --------- */
.usuarios-table-wrapper {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin-bottom: 2rem;
  overflow-x: auto;
}

/* --------- TABLA BASE --------- */
.usuarios-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* --------- ENCABEZADO --------- */
.usuarios-table thead {
  background: linear-gradient(135deg, #1f2937, #374151);
  color: white;
}

.usuarios-table thead th {
  padding: 1rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border: none;
}

.usuarios-table thead th:first-child {
  border-radius: 12px 0 0 0;
}

.usuarios-table thead th:last-child {
  border-radius: 0 12px 0 0;
}

/* --------- COLUMNA DE ACCIONES --------- */
.usuarios-table .acciones-col {
  text-align: right;
  width: 300px;
  min-width: 300px;
  padding-right: 1rem !important;
}

/* --------- CUERPO DE TABLA --------- */
.usuarios-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.usuarios-table tbody tr:hover {
  background: rgba(147, 193, 33, 0.05);
}

.usuarios-table tbody td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
  border: none;
}

/* --------- INFO DE USUARIO (CON AVATAR) --------- */
.usuario-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.usuario-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #93c121, #6c8f1a);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.25);
}

.usuario-datos {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.usuario-nombre {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.2;
}

.usuario-id {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

/* --------- ENLACES DE CONTACTO --------- */
.email-link,
.phone-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.email-link:hover,
.phone-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.email-link i,
.phone-link i {
  color: #93c121;
}

/* --------- SELECT DE ROL (INLINE EDITABLE) --------- */
.rol-select {
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  appearance: none;
}

.rol-select:hover:not(:disabled) {
  border-color: #93c121;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.2);
}

.rol-select:focus {
  outline: none;
  border-color: #93c121;
  box-shadow: 0 0 0 3px rgba(147, 193, 33, 0.2);
}

.rol-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Colores por rol */
.rol-admin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-color: #ef4444;
}

.rol-super-usuario {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-color: #f59e0b;
}

.rol-usuario {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-color: #3b82f6;
}

/* --------- FECHA DE REGISTRO --------- */
.fecha-registro {
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.fecha-registro i {
  color: #93c121;
}

/* --------- BOTONES DE ACCIÓN USUARIOS --------- */
.usuarios-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.btn-usuarios {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-usuarios i {
  font-size: 0.95rem;
}

/* Botón Info (Ver) */
.btn-usuarios-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-usuarios-info:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  color: white;
}

/* Botón Warning (Editar) */
.btn-usuarios-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-usuarios-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  color: white;
}

/* Botón Danger (Eliminar) */
.btn-usuarios-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-usuarios-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
  color: white;
}

.btn-usuarios:active {
  transform: translateY(0);
}

/* --------- RESPONSIVE - TABLETS --------- */
@media (max-width: 1399.98px) {
  .usuarios-table .acciones-col {
    width: 280px;
    min-width: 280px;
  }

  .btn-usuarios {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 1199.98px) {
  .usuarios-table .acciones-col {
    width: 260px;
    min-width: 260px;
  }

  .btn-usuarios {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .btn-usuarios i {
    font-size: 0.9rem;
  }
}

/* --------- RESPONSIVE - MÓVIL (CARDS) --------- */
@media (max-width: 991.98px) {
  .usuarios-table-wrapper {
    padding: 1rem;
    border-radius: 12px;
  }

  /* Ocultar thead */
  .usuarios-table thead {
    display: none;
  }

  /* Convertir tbody a block */
  .usuarios-table tbody {
    display: block;
  }

  /* Cada fila como card */
  .usuarios-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem;
  }

  .usuarios-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  }

  /* Celdas como filas */
  .usuarios-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .usuarios-table tbody td:first-child {
    padding-top: 0;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    justify-content: flex-start;
  }

  .usuarios-table tbody td:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid #f1f5f9;
    flex-direction: column;
    align-items: stretch;
  }

  /* Labels para cada celda */
  .usuarios-table tbody td:not(:first-child)::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }

  .usuarios-table tbody td:last-child::before {
    content: "ACCIONES";
    margin-bottom: 0.75rem;
    text-align: center;
  }

  /* Usuario info sin before */
  .usuario-info {
    width: 100%;
  }

  /* Botones full width en móvil */
  .usuarios-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
  }

  .btn-usuarios {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .btn-usuarios i {
    font-size: 1rem;
  }

  /* Select de rol full width */
  .rol-select {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 767.98px) {
  .usuarios-table-wrapper {
    padding: 0.75rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 8px;
  }

  .usuarios-table tbody tr {
    padding: 0.875rem;
    border-radius: 10px;
  }

  .usuario-avatar {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }

  .usuario-nombre {
    font-size: 0.9rem;
  }

  .usuario-id {
    font-size: 0.7rem;
  }

  .rol-select {
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .usuarios-table-wrapper {
    padding: 0.5rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  .usuarios-table tbody tr {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .usuario-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .usuario-datos {
    gap: 0.15rem;
  }

  .usuario-nombre {
    font-size: 0.88rem;
  }

  .email-link,
  .phone-link {
    font-size: 0.88rem;
  }

  .rol-select {
    padding: 0.4rem 1.75rem 0.4rem 0.7rem;
    font-size: 0.75rem;
  }

  .fecha-registro {
    font-size: 0.85rem;
  }

  .btn-usuarios {
    padding: 0.7rem 0.9rem;
    font-size: 0.88rem;
  }
}

/* --------- ANIMACIONES --------- */
@keyframes fadeInUser {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.usuarios-table tbody tr {
  animation: fadeInUser 0.3s ease;
}

/* --------- ACCESIBILIDAD --------- */
.btn-usuarios:focus,
.rol-select:focus {
  outline: 3px solid rgba(147, 193, 33, 0.4);
  outline-offset: 2px;
}

/* --------- MODAL PERSONALIZADO --------- */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 2px solid #e5e7eb;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
}

.modal-title i {
  color: #93c121;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 2px solid #f1f5f9;
  padding: 1rem 1.5rem;
}

/* --------- PRINT --------- */
@media print {
  .usuarios-actions,
  .btn-usuarios,
  .rol-select {
    display: none !important;
  }

  .usuarios-table-wrapper {
    box-shadow: none;
    border: 1px solid #000;
    padding: 0;
  }

  .usuarios-table {
    font-size: 0.85rem;
  }

  .usuarios-table thead {
    background: #000 !important;
    color: #fff !important;
  }

  .usuarios-table tbody tr {
    page-break-inside: avoid;
  }
}
/* =============================================
   BADGES DE ROLES - ESTILOS ADICIONALES
   ============================================= */

/* Badges en ver_usuario.php */
.badge-rol-admin,
.badge-rol-super-usuario,
.badge-rol-usuario {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-rol-admin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.badge-rol-super-usuario {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.badge-rol-usuario {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

/* Badges grandes para detalle */
.badge-rol-grande-admin,
.badge-rol-grande-super-usuario,
.badge-rol-grande-usuario {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.badge-rol-grande-admin {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.badge-rol-grande-super-usuario {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.badge-rol-grande-usuario {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

/* --------- SECCIONES DE FORMULARIO --------- */
.form-section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.form-section-title i {
  color: #93c121;
  font-size: 1.2rem;
}

/* --------- BOTÓN TOGGLE PASSWORD --------- */
.input-group .btn-outline-secondary {
  border-color: #d1d5db;
  color: #6b7280;
}

.input-group .btn-outline-secondary:hover {
  background: #f9fafb;
  border-color: #93c121;
  color: #93c121;
}

/* --------- VALIDACIÓN DE FORMULARIOS --------- */
.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: #10b981;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #ef4444;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef4444' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #ef4444;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* --------- RESPONSIVE FORMULARIOS --------- */
@media (max-width: 767.98px) {
  .form-section-title {
    font-size: 1rem;
  }

  .badge-rol-grande-admin,
  .badge-rol-grande-super-usuario,
  .badge-rol-grande-usuario {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .form-section-title {
    font-size: 0.95rem;
  }

  .badge-rol-admin,
  .badge-rol-super-usuario,
  .badge-rol-usuario {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }

  .badge-rol-grande-admin,
  .badge-rol-grande-super-usuario,
  .badge-rol-grande-usuario {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* --------- SPINNER DE CARGA --------- */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* --------- MENSAJES INFO --------- */
.alert-info {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* --------- MEJORAS DE ACCESIBILIDAD --------- */
.form-control:focus {
  border-color: #93c121;
  box-shadow: 0 0 0 0.2rem rgba(147, 193, 33, 0.25);
}

.form-select:focus {
  border-color: #93c121;
  box-shadow: 0 0 0 0.2rem rgba(147, 193, 33, 0.25);
}

/* --------- ANIMACIONES SUAVES --------- */
.badge-rol-admin,
.badge-rol-super-usuario,
.badge-rol-usuario,
.badge-rol-grande-admin,
.badge-rol-grande-super-usuario,
.badge-rol-grande-usuario {
  transition: all 0.3s ease;
}

.badge-rol-admin:hover,
.badge-rol-super-usuario:hover,
.badge-rol-usuario:hover,
.badge-rol-grande-admin:hover,
.badge-rol-grande-super-usuario:hover,
.badge-rol-grande-usuario:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
/* =============================================
   TIPO DE CLIENTE - ESTILOS SIMPLIFICADOS
   ============================================= */

/* --------- BADGES DE TIPO DE CLIENTE --------- */
.badge-tipo-cliente {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-tipo-cliente-detalle {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --------- BOTÓN WARNING (COTIZACIÓN PERSONALIZADA) --------- */
.action-btn.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.action-btn.warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
  color: white;
}

.action-btn.warning i {
  color: white;
}

/* --------- BOTÓN SUCCESS (NUEVA COTIZACIÓN) --------- */
.action-btn.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 2px solid #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.action-btn.success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  color: white;
}

.action-btn.success i {
  color: white;
}

/* --------- FULL WIDTH EN INFO GRID --------- */
.info-item.full-width {
  grid-column: 1 / -1;
}

/* --------- RESPONSIVE --------- */
@media (max-width: 767.98px) {
  .badge-tipo-cliente {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }

  .badge-tipo-cliente-detalle {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .badge-tipo-cliente {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }

  .badge-tipo-cliente-detalle {
    padding: 0.55rem 0.875rem;
    font-size: 0.8rem;
  }
}
/* =============================================
   TIPO DE CLIENTE - BADGES
   ============================================= */

.badge-tipo-cliente {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-tipo-cliente-detalle {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =============================================
   BOTONES DE ACCIÓN - NUEVOS COLORES
   ============================================= */

/* Botón Success (Nueva Cotización) */
.action-btn.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: 2px solid #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.action-btn.success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  color: white;
}

.action-btn.success i {
  color: white;
}

/* Botón Warning (Cotización Personalizada) */
.action-btn.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.action-btn.warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
  color: white;
}

.action-btn.warning i {
  color: white;
}

/* Botón WhatsApp */
.action-btn.whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  border: 2px solid #25d366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.action-btn.whatsapp:hover {
  background: linear-gradient(135deg, #128c7e, #075e54);
  border-color: #128c7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
  color: white;
}

.action-btn.whatsapp i {
  color: white;
  font-size: 1.2rem;
}

/* Estado deshabilitado */
.action-btn.disabled {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  color: white;
  border: 2px solid #9ca3af;
  opacity: 0.6;
  cursor: not-allowed;
}

.action-btn.disabled:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(156, 163, 175, 0.15);
}

/* Animación del icono de WhatsApp */
.action-btn.whatsapp:hover i {
  animation: whatsappPulse 0.6s ease-in-out;
}

@keyframes whatsappPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* =============================================
   FULL WIDTH EN INFO GRID
   ============================================= */

.info-item.full-width {
  grid-column: 1 / -1;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 767.98px) {
  .badge-tipo-cliente {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
  }

  .badge-tipo-cliente-detalle {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  .action-btn.whatsapp i {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .badge-tipo-cliente {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }

  .badge-tipo-cliente-detalle {
    padding: 0.55rem 0.875rem;
    font-size: 0.8rem;
  }

  .action-btn.whatsapp span {
    font-size: 0.9rem;
  }

  .action-btn.whatsapp i {
    font-size: 1rem;
  }
}
/* =============================================
   ESTADÍSTICAS DE CLIENTES POR TIPO
   ============================================= */

.stats-clientes {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.stats-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1f2937;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9;
}

.stats-title i {
  color: #93c121;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border-color: #93c121;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: #1f2937;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: "Courier New", monospace;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =============================================
   RESPONSIVE - ESTADÍSTICAS
   ============================================= */

@media (max-width: 991.98px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.875rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-badge {
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
  }
}

@media (max-width: 767.98px) {
  .stats-clientes {
    padding: 1.25rem;
  }

  .stats-title {
    font-size: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.875rem;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .stats-clientes {
    padding: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .stat-card {
    padding: 0.75rem;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .stat-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }
}

/* =============================================
   ANIMACIONES
   ============================================= */

@keyframes fadeInStat {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  animation: fadeInStat 0.4s ease;
}

.stat-card:nth-child(1) {
  animation-delay: 0.05s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.15s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.2s;
}
.stat-card:nth-child(5) {
  animation-delay: 0.25s;
}
/* =============================================
   CARDS DE CLIENTES PARA MÓVIL
   ============================================= */

.clientes-cards {
  display: grid;
  gap: 1rem;
}

.cliente-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: all 0.3s ease;
}

.cliente-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}

.cliente-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
}

.cliente-nombre {
  flex: 1;
}

.cliente-nombre strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1f2937;
  display: block;
  line-height: 1.3;
}

.badge-tipo-cliente-small {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.cliente-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.cliente-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.cliente-info-row i {
  color: #93c121;
  font-size: 1rem;
  flex-shrink: 0;
}

.cliente-info-row .tel-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

.cliente-info-row .tel-link:hover {
  text-decoration: underline;
}

.cliente-card-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.cliente-card-actions .btn {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.cliente-card-actions .btn i {
  font-size: 0.95rem;
}

/* =============================================
   BADGE TIPO CLIENTE - AJUSTE TAMAÑO
   ============================================= */

.badge-tipo-cliente {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: white;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 767.98px) {
  .clientes-cards {
    gap: 0.875rem;
  }

  .cliente-card {
    padding: 0.875rem;
  }

  .cliente-nombre strong {
    font-size: 1rem;
  }

  .badge-tipo-cliente-small {
    padding: 0.3rem 0.65rem;
    font-size: 0.7rem;
  }

  .cliente-info-row {
    font-size: 0.875rem;
  }

  .cliente-card-actions .btn {
    font-size: 0.8rem;
    padding: 0.45rem 0.65rem;
  }
}

@media (max-width: 576px) {
  .clientes-cards {
    gap: 0.75rem;
  }

  .cliente-card {
    padding: 0.75rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 8px;
  }

  .cliente-card-header {
    flex-wrap: wrap;
    margin-bottom: 0.875rem;
    padding-bottom: 0.65rem;
  }

  .cliente-nombre strong {
    font-size: 0.95rem;
  }

  .badge-tipo-cliente-small {
    padding: 0.28rem 0.6rem;
    font-size: 0.68rem;
  }

  .cliente-card-body {
    gap: 0.6rem;
    margin-bottom: 0.875rem;
  }

  .cliente-info-row {
    font-size: 0.85rem;
  }

  .cliente-info-row i {
    font-size: 0.95rem;
  }

  .cliente-card-actions {
    gap: 0.4rem;
    padding-top: 0.65rem;
  }

  .cliente-card-actions .btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
    gap: 0.25rem;
  }

  .cliente-card-actions .btn i {
    font-size: 0.85rem;
  }
}

/* =============================================
   ANIMACIONES
   ============================================= */

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cliente-card {
  animation: fadeInCard 0.3s ease;
}

.cliente-card:nth-child(1) {
  animation-delay: 0.05s;
}
.cliente-card:nth-child(2) {
  animation-delay: 0.1s;
}
.cliente-card:nth-child(3) {
  animation-delay: 0.15s;
}
.cliente-card:nth-child(4) {
  animation-delay: 0.2s;
}
.cliente-card:nth-child(5) {
  animation-delay: 0.25s;
}
.cliente-card:nth-child(6) {
  animation-delay: 0.3s;
}
/* =============================================
   BUSCADOR DE PRODUCTOS EN COTIZACIÓN
   ============================================= */

.producto-search-container {
  position: relative;
  margin-bottom: 1.5rem;
}

.producto-search-container .input-group-text {
  background: white;
  border-right: none;
  padding: 0.75rem 1rem;
}

.producto-search-container .form-control {
  border-left: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
}

.producto-search-container .form-control:focus {
  border-color: #93c121;
  box-shadow: none;
}

.producto-search-container .input-group:focus-within .input-group-text {
  border-color: #93c121;
}

/* Resultados de búsqueda */
.producto-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #93c121;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 0.5rem;
  display: none;
}

.search-results-list {
  padding: 0.5rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-result-item:hover {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-color: #93c121;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.15);
}

.result-info {
  flex: 1;
  margin-right: 1rem;
}

.result-nombre {
  font-weight: 800;
  color: #1f2937;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.result-categoria {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  background: #f3f4f6;
  border-radius: 6px;
}

.result-categoria i {
  color: #93c121;
  font-size: 0.85rem;
}

.result-precio {
  font-weight: 900;
  color: #93c121;
  font-size: 1rem;
  font-family: "Courier New", monospace;
}

.add-product-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  transition: all 0.3s ease;
}

.add-product-btn:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  color: white;
}

.add-product-btn i {
  font-size: 1rem;
}

.no-results-found {
  padding: 1.5rem;
  text-align: center;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.9rem;
}

/* =============================================
   ITEMS DE COTIZACIÓN
   ============================================= */

#itemsContainer {
  min-height: 100px;
}

.item-row {
  animation: fadeInItem 0.3s ease;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-content {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.item-content:hover {
  border-color: #93c121;
  box-shadow: 0 4px 12px rgba(147, 193, 33, 0.15);
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
  border-bottom: 1px solid #e5e7eb;
}

.item-number {
  font-weight: 800;
  color: #93c121;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.item-header .btn-danger {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.item-body {
  padding: 1rem;
}

.item-body strong {
  display: block;
  color: #1f2937;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.item-body .form-label {
  font-weight: 700;
  color: #6b7280;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-body .form-control {
  font-weight: 600;
}

.valor-unitario-input {
  background: #f9fafb;
  font-family: "Courier New", monospace;
  color: #93c121;
  font-weight: 900;
}

/* Badge contador de items */
.section-title .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  font-weight: 800;
}

/* Mensaje sin items */
.alert-info {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 2px solid #3b82f6;
  font-weight: 600;
}

/* =============================================
   SCROLLBAR PERSONALIZADO
   ============================================= */

.producto-search-results::-webkit-scrollbar {
  width: 8px;
}

.producto-search-results::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.producto-search-results::-webkit-scrollbar-thumb {
  background: #93c121;
  border-radius: 10px;
}

.producto-search-results::-webkit-scrollbar-thumb:hover {
  background: #7a9e1b;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 991.98px) {
  .producto-search-results {
    max-height: 350px;
  }

  .search-result-item {
    padding: 0.875rem;
  }

  .result-nombre {
    font-size: 0.9rem;
  }

  .result-precio {
    font-size: 0.95rem;
  }

  .add-product-btn {
    padding: 0.45rem 0.875rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 767.98px) {
  .producto-search-container .form-control {
    font-size: 0.95rem;
    padding: 0.65rem 0.875rem;
  }

  .producto-search-results {
    max-height: 300px;
    border-radius: 8px;
  }

  .search-result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .result-info {
    margin-right: 0;
    width: 100%;
  }

  .result-meta {
    gap: 0.65rem;
  }

  .result-categoria {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
  }

  .result-precio {
    font-size: 0.9rem;
  }

  .add-product-btn {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0.75rem;
  }

  .item-header {
    padding: 0.65rem 0.875rem;
  }

  .item-number {
    font-size: 0.85rem;
  }

  .item-body {
    padding: 0.875rem;
  }

  .item-body strong {
    font-size: 0.9rem;
    margin-bottom: 0.65rem;
  }
}

@media (max-width: 576px) {
  .producto-search-container {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .producto-search-container .form-control {
    font-size: 0.9rem;
    padding: 0.6rem 0.75rem;
  }

  .producto-search-results {
    max-height: 250px;
    left: -0.5rem;
    right: -0.5rem;
    border-radius: 0;
    margin-top: 0.35rem;
  }

  .search-results-list {
    padding: 0.35rem;
  }

  .search-result-item {
    padding: 0.65rem;
    gap: 0.65rem;
    border-radius: 6px;
  }

  .result-nome {
    font-size: 0.85rem;
  }

  .result-categoria {
    font-size: 0.7rem;
    padding: 0.18rem 0.5rem;
  }

  .result-precio {
    font-size: 0.85rem;
  }

  .add-product-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
  }

  .item-content {
    border-radius: 8px;
  }

  .item-header {
    padding: 0.6rem 0.75rem;
  }

  .item-number {
    font-size: 0.8rem;
  }

  .item-header .btn-danger {
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
  }

  .item-body {
    padding: 0.75rem;
  }

  .item-body strong {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
  }

  .item-body .form-label {
    font-size: 0.75rem;
  }

  .item-body .form-control {
    font-size: 0.85rem;
  }
}

/* =============================================
   ANIMACIONES ADICIONALES
   ============================================= */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.producto-search-results {
  animation: slideDown 0.3s ease;
}

.search-result-item:nth-child(1) {
  animation-delay: 0.05s;
}
.search-result-item:nth-child(2) {
  animation-delay: 0.1s;
}
.search-result-item:nth-child(3) {
  animation-delay: 0.15s;
}
.search-result-item:nth-child(4) {
  animation-delay: 0.2s;
}
.search-result-item:nth-child(5) {
  animation-delay: 0.25s;
}

/* =============================================
   ESTADOS DE CARGA
   ============================================= */

.loading-products {
  text-align: center;
  padding: 1.5rem;
  color: #6b7280;
}

.loading-products i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================= */

.search-result-item:focus {
  outline: 3px solid rgba(147, 193, 33, 0.4);
  outline-offset: 2px;
}

.add-product-btn:focus {
  outline: 3px solid rgba(16, 185, 129, 0.4);
  outline-offset: 2px;
}

/* =============================================
   ESTADO READONLY DE INPUTS
   ============================================= */

.form-control[readonly] {
  background-color: #f9fafb;
  cursor: not-allowed;
  color: #6b7280;
}

.valor-unitario-input[readonly] {
  cursor: default;
  background-color: #f0fdf4;
  border-color: #93c121;
}
.action-btn.sin-iva {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  border: 2px solid transparent;
}

.action-btn.sin-iva:hover {
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  color: #ffffff;
  border-color: #e94560;
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.action-btn.sin-iva i {
  font-size: 20px;
  color: #e94560;
}
/* ===== CREAR COTIZACIÓN SIN IVA ===== */
.cotizacion-form {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e0e0e0;
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  border-left: 4px solid #e94560;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.items-table th {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
  color: #e0e0e0;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.items-table td {
  padding: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.items-table tr:hover {
  background: #f5f0ff;
}

.tipo-precio-selector {
  padding: 6px 10px;
  border: 2px solid #e94560;
  border-radius: 5px;
  background: white;
  color: #e94560;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.tipo-precio-selector:hover {
  background: #e94560;
  color: white;
}

.tipo-precio-selector:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
}

.badge-sin-iva {
  background: linear-gradient(135deg, #1a1a2e 0%, #e94560 100%);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

.search-container {
  background: #f9f0f2;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e94560;
  margin-bottom: 20px;
}

.btn-eliminar {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 15px;
  color: #e94560;
}
.autocomplete-item-active {
  background-color: #e8f4fd;
  border-left: 3px solid #667eea;
  cursor: pointer;
}
/* =============================================
   FIX NAVBAR MOBILE — altura dinámica via JS
   ============================================= */
@media (max-width: 991.98px) {
  body {
    padding-top: 0 !important;
  }
}
