/* === Animación shake para el botón flotante del carrito === */
@keyframes shakeCartBtn {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}
.shake-cart-btn {
  animation: shakeCartBtn 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
/* Resaltado cuando el carrito tiene productos */
.cart-has-items {
  box-shadow: 0 0 0 4px #0d6efd44, 0 4px 16px #0d6efd33 !important;
  background: #e3f2fd !important;
  color: #0d6efd !important;
  transition: box-shadow 0.2s, background 0.2s, color 0.2s;
}
/* Modo oscuro para resaltado */
.dark-mode .cart-has-items {
  box-shadow: 0 0 0 4px #4ea8ff55, 0 4px 16px #4ea8ff33 !important;
  background: #23272b !important;
  color: #4ea8ff !important;
}/* Forzar tema claro en toda la app, ignorando preferencias del sistema */
html, body {
  color-scheme: light;
  background: #f8f9fa !important;
  --bs-body-bg: #f8f9fa;
  --bs-body-color: #212529;
  /* Prevenir overscroll en dispositivos móviles */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  /* Prevenir zoom accidental */
  touch-action: manipulation;
}

@media (prefers-color-scheme: dark) {
  html, body {
    color-scheme: light;
    background: #f8f9fa !important;
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
  }
}

/* Mejoras para scroll en dispositivos móviles */
.movements-list-treinta,
.products-grid-treinta,
.clients-grid {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Prevenir pull-to-refresh nativo en contenedores específicos */
.container,
.main-content {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}
/* === Variables base y modo claro/oscuro === */
:root {
  --primary: #0d6efd;
  --gray-light: #f8f9fa;
  --gray-dark: #212529;
  --radius: 0.5rem;
  --transition: all 0.2s ease-in-out;
}

body {
  background-color: var(--gray-light);
  color: var(--gray-dark);
  font-family: "Segoe UI", sans-serif;
  font-size: 1rem;
  padding-bottom: 80px; /* espacio para navbar inferior */
}

.dark-mode body {
  background-color: #121212;
  color: #f1f1f1;
}

/* === Vistas === */
.app-view {
  display: none;
}

.app-view:not(.d-none) {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Tarjetas de producto, cliente, deuda === */
.card-custom {
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 1rem;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.card-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Dark mode cards */
.dark-mode .card-custom {
  background-color: #1e1e1e;
  border-color: #333;
}

/* === Inputs y formularios === */
input[type="text"],
input[type="number"],
input[type="file"],
select,
button {
  border-radius: var(--radius);
}

button:active {
  transform: scale(0.98);
}

.btn {
  transition: var(--transition);
}

/* === Inventario y productos === */
.product-card {
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 1rem;
  background-color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  text-align: center;
}

.product-card img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.product-card button {
  margin-top: 0.5rem;
  width: 100%;
}

/* === Carrito de ventas === */
.cart-item {
  border: 1px dashed #999;
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background-color: #fafafa;
}

.cart-item strong {
  font-size: 1.05rem;
}

/* Dark mode productos */
.dark-mode .product-card {
  background-color: #23272b;
  border-color: #444;
  color: #f1f1f1;
}

.dark-mode .product-card button {
  background-color: #222;
  color: #f1f1f1;
  border-color: #555;
}

.dark-mode .product-card button:hover {
  background-color: #0d6efd;
  color: #fff;
}

.dark-mode .cart-item {
  background-color: #222;
  border-color: #444;
}

/* === Barra de navegación inferior tipo app === */
.navbar.fixed-bottom {
  height: 64px;
  border-top: 1px solid #ccc;
  background-color: #fff;
}

.navbar .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0;
  color: #555;
}

.navbar .btn:hover {
  color: var(--primary);
}

.navbar .btn i {
  display: block;
  font-size: 1.25rem;
}

/* Dark mode navbar */
.dark-mode .navbar {
  background-color: #181818;
  border-color: #333;
}

.dark-mode .navbar .btn {
  color: #aaa;
}

/* === Clientes === */
.client-card {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background-color: #fff;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.client-card:hover {
  background-color: #f1f1f1;
}

.dark-mode .client-card {
  background-color: #1e1e1e;
  border-color: #333;
}

.dark-mode .client-card:hover {
  background-color: #2a2a2a;
}

/* === Lista de deudas === */
.debt-item {
  background-color: #fff9f0;
  border: 1px solid #f4d3b2;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.dark-mode .debt-item {
  background-color: #3b2b1a;
  border-color: #c9a36b;
  color: #f0e2d0;
}

/* === Balance general === */
.list-group-item {
  font-weight: 500;
  font-size: 0.95rem;
}

.list-group-item strong {
  font-weight: 600;
}

.dark-mode .list-group-item {
  background-color: #23272b;
  color: #f1f1f1;
  border-color: #444;
}

/* === Botones PDF === */
.btn-outline-dark.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
}

/* === Notificaciones / mensajes (opcional) */
.alert-custom {
  padding: 0.75rem;
  background-color: #e7f1ff;
  color: #084298;
  border-left: 4px solid #0d6efd;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.dark-mode .alert-custom {
  background-color: #132a44;
  color: #b6d4fe;
  border-left-color: #339af0;
}

.dark-mode .alert,
.dark-mode .alert-secondary {
  background-color: #23272b;
  color: #f1f1f1;
  border-color: #444;
}

.inventory-list-view .product-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}
.inventory-list-view .product-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.inventory-grid-view .product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.inventory-grid-view .product-card img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.product-card.selected {
  border: 2px solid #0d6efd;
  box-shadow: 0 0 0 2px #0d6efd33;
}

.dark-mode .modal-content {
  background-color: #23272b;
  color: #f1f1f1;
  border-color: #444;
}

.dark-mode .modal-header,
.dark-mode .modal-footer {
  border-color: #333;
}

.dark-mode .form-control,
.dark-mode .form-select {
  background-color: #181a1b;
  color: #f1f1f1;
  border-color: #444;
}

.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
  background-color: #23272b;
  color: #fff;
  border-color: #0d6efd;
}

.dark-mode .btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.dark-mode .btn-outline-primary {
  color: #0d6efd;
  border-color: #0d6efd;
  background-color: transparent;
}

.dark-mode .btn-outline-primary:hover {
  background-color: #0d6efd;
  color: #fff;
}

.dark-mode .btn-outline-secondary {
  color: #aaa;
  border-color: #555;
  background-color: transparent;
}

.dark-mode .btn-outline-secondary:hover {
  background-color: #444;
  color: #fff;
}

.dark-mode .swal2-popup {
  background: #23272b !important;
  color: #f1f1f1 !important;
}

.dark-mode .swal2-title,
.dark-mode .swal2-html-container {
  color: #f1f1f1 !important;
}

.dark-mode .swal2-confirm,
.dark-mode .swal2-cancel,
.dark-mode .swal2-close {
  color: #fff !important;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
  color: #4ea8ff;
  text-shadow: 0 1px 2px #111a;
}

.dark-mode .product-card,
.dark-mode .product-card * {
  color: #eaf6ff !important;
}

.dark-mode .product-card p,
.dark-mode .product-card .mb-1,
.dark-mode .product-card .mb-2,
.dark-mode .product-card span {
  color: #b0b8c1 !important;
}

.swal2-pos-ticket {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 16px #0002 !important;
  padding: 0 !important;
  max-width: 370px;
}

.dark-mode .swal2-pos-ticket {
  background: #23272b !important;
  color: #eaf6ff !important;
  box-shadow: 0 2px 16px #0008 !important;
}

.swal2-pos-ticket table {
  font-family: monospace;
}

.swal2-pos-ticket hr {
  border-top: 1.5px dashed #bbb;
}

.dark-mode .swal2-pos-ticket hr {
  border-top: 1.5px dashed #444;
}

.debt-deck {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: flex-start;
}

.debt-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px #0001;
  border: 1.5px solid #e0e0e0;
  padding: 1.1rem 1.2rem 1rem 1.2rem;
  min-width: 260px;
  max-width: 320px;
  flex: 1 1 260px;
  cursor: pointer;
  transition: box-shadow 0.18s, border-color 0.18s;
  position: relative;
}
.debt-card:hover {
  box-shadow: 0 4px 18px #0002;
  border-color: #0d6efd;
}
.debt-card .debt-client {
  font-weight: bold;
  font-size: 1.08rem;
  color: #0d6efd;
}
.debt-card .debt-date {
  font-size: 0.93rem;
  color: #888;
}
.debt-card .debt-amount {
  font-size: 1.15rem;
  font-weight: bold;
  color: #e67e22;
}
.debt-card .debt-abono {
  font-size: 0.98rem;
  color: #27ae60;
}
.debt-card .debt-saldo {
  font-size: 1.08rem;
  font-weight: bold;
  color: #c0392b;
}
.debt-card .debt-status {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.18em 0.7em;
  border-radius: 1em;
  background: #f1f1f1;
  color: #888;
}
.debt-card.paid .debt-status {
  background: #d1f7d6;
  color: #27ae60;
}
.debt-card.partial .debt-status {
  background: #fff3cd;
  color: #e67e22;
}
.debt-card.unpaid .debt-status {
  background: #f8d7da;
  color: #c0392b;
}

.dark-mode .debt-card {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
  box-shadow: 0 2px 10px #0005;
}
.dark-mode .debt-card .debt-client {
  color: #4ea8ff;
}
.dark-mode .debt-card .debt-date {
  color: #b0b8c1;
}
.dark-mode .debt-card .debt-amount {
  color: #ffb366;
}
.dark-mode .debt-card .debt-abono {
  color: #7fffd4;
}
.dark-mode .debt-card .debt-saldo {
  color: #ff7675;
}
.dark-mode .debt-card .debt-status {
  background: #2a2a2a;
  color: #b0b8c1;
}
.dark-mode .debt-card.paid .debt-status {
  background: #2ecc40;
  color: #fff;
}
.dark-mode .debt-card.partial .debt-status {
  background: #ffecb3;
  color: #e67e22;
}
.dark-mode .debt-card.unpaid .debt-status {
  background: #ffb3b3;
  color: #c0392b;
}

.balance-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px #0001;
  border: 1.5px solid #e0e0e0;
  padding: 1.2rem 1.3rem 1.1rem 1.3rem;
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 220px;
  text-align: center;
  transition: box-shadow 0.18s, border-color 0.18s;
  position: relative;
}
.balance-card .balance-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: #0d6efd;
  margin-bottom: 0.5rem;
}
.balance-card .balance-period {
  font-size: 0.93rem;
  color: #888;
  margin-bottom: 0.7rem;
}
.balance-card .balance-amount {
  font-size: 1.25rem;
  font-weight: bold;
  color: #27ae60;
}
.balance-card .balance-credit {
  font-size: 1.08rem;
  color: #e67e22;
}
.balance-card .balance-profit {
  font-size: 1.08rem;
  color: #2980b9;
}
.balance-card .balance-label {
  font-size: 0.92rem;
  color: #888;
}
.balance-card .balance-divider {
  border-top: 1px dashed #bbb;
  margin: 0.7rem 0;
}
.balance-card:hover {
  box-shadow: 0 4px 18px #0002;
  border-color: #0d6efd;
}

.dark-mode .balance-card {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
  box-shadow: 0 2px 10px #0005;
}
.dark-mode .balance-card .balance-title {
  color: #4ea8ff;
}
.dark-mode .balance-card .balance-period {
  color: #b0b8c1;
}
.dark-mode .balance-card .balance-amount {
  color: #7fffd4;
}
.dark-mode .balance-card .balance-credit {
  color: #ffb366;
}
.dark-mode .balance-card .balance-profit {
  color: #81c7f5;
}
.dark-mode .balance-card .balance-label {
  color: #b0b8c1;
}
.dark-mode .balance-card .balance-divider {
  border-top: 1px dashed #444;
}

#sidebarMenu {
  box-shadow: 0 0 24px #0002;
}
#sidebarMenu .form-check-label {
  font-weight: 500;
}
#sidebarOverlay {
  transition: background 0.2s;
}

.dark-mode #sidebarMenu {
  background: #23272b !important;
  color: #eaf6ff;
  box-shadow: 0 0 24px #0008;
}
.dark-mode #sidebarMenu .form-check-label {
  color: #eaf6ff;
}
.dark-mode #sidebarMenu .btn-outline-secondary {
  border-color: #444;
  color: #eaf6ff;
}

/* Cuadrícula responsiva para inventario y clientes */
.grid-responsive > .col-grid {
  width: 100%;
  max-width: 100%;
}
@media (min-width: 480px) {
  .grid-responsive > .col-grid {
    width: 50%;
    max-width: 50%;
    display: inline-block;
  }
}
@media (min-width: 768px) {
  .grid-responsive > .col-grid {
    width: 33.3333%;
    max-width: 33.3333%;
  }
}

/* Barra superior tipo Treinta.co */
.header-treinta {
  background: #1F2D3D !important;
  color: #fff !important;
  border-bottom: 1.5px solid #2a3f5a;
  position: relative;
  min-height: 56px;
}
.header-treinta .header-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
  color: #fff !important;
}
.header-treinta .header-sub {
  font-size: 0.95rem;
  color: #b0b8c1;
  margin-top: -2px;
}
.header-treinta .btn {
  background: transparent;
  border: none;
  color: #fff;
}

/* Barra inferior tipo Treinta.co */
.navbar-treinta {
  background: #fff !important;
  border-top: 1.5px solid #e0e0e0;
  height: 64px;
  box-shadow: 0 -2px 8px #0001;
}
.navbar-treinta .btn {
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-radius: 0;
  background: none;
  border: none;
}
.navbar-treinta .btn.active, .navbar-treinta .btn:focus {
  color: #1F2D3D;
  font-weight: 700;
  border-bottom: 2.5px solid #1F2D3D;
  background: none;
}
.navbar-treinta .btn i {
  font-size: 1.45rem;
  display: block;
}

/* Ajustes para modo oscuro */
.dark-mode .header-treinta {
  background: #1F2D3D !important;
  color: #fff !important;
  border-bottom: 1.5px solid #2a3f5a;
}
.dark-mode .header-treinta .header-title {
  color: #fff !important;
}
.dark-mode .navbar-treinta {
  background: #181818 !important;
  border-top: 1.5px solid #333;
}
.dark-mode .navbar-treinta .btn {
  color: #aaa;
}
.dark-mode .navbar-treinta .btn.active, .dark-mode .navbar-treinta .btn:focus {
  color: #4ea8ff;
  border-bottom: 2.5px solid #4ea8ff;
}

/* Filtros de periodo tipo Treinta.co */
.period-filters .btn-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px #0001;
}
.period-filters .btn {
  border: none;
  padding: 0.6rem 1rem;
  font-weight: 500;
  color: #666;
  background: #f8f9fa;
}
.period-filters .btn-check:checked + .btn {
  background: #1F2D3D;
  color: #fff;
  font-weight: 600;
}

/* Tarjetas de balance tipo Treinta.co */
.balance-card-treinta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}
.balance-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #0002;
}
.balance-card-treinta .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: #fff;
}
.balance-card-treinta .card-icon.income {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}
.balance-card-treinta .card-icon.expense {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.balance-card-treinta .card-icon.profit {
  background: linear-gradient(135deg, #3498db, #2980b9);
}
.balance-card-treinta .card-title {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.balance-card-treinta .card-amount {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.balance-card-treinta .card-amount.income {
  color: #27ae60;
}
.balance-card-treinta .card-amount.expense {
  color: #e74c3c;
}
.balance-card-treinta .card-amount.profit {
  color: #3498db;
}

/* Listado de movimientos */
.movements-list {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  overflow: hidden;
}
.movement-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}
.movement-item:last-child {
  border-bottom: none;
}
.movement-item:hover {
  background: #f8f9fa;
}
.movement-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.1rem;
  color: #fff;
}
.movement-icon.sale {
  background: #27ae60;
}
.movement-icon.debt {
  background: #e67e22;
}
.movement-icon.payment {
  background: #3498db;
}
.movement-details {
  flex: 1;
}
.movement-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.2rem;
}
.movement-subtitle {
  font-size: 0.9rem;
  color: #666;
}
.movement-amount {
  font-weight: 700;
  font-size: 1.1rem;
}
.movement-amount.positive {
  color: #27ae60;
}
.movement-amount.negative {
  color: #e74c3c;
}

/* Modo oscuro */
.dark-mode .period-filters .btn {
  background: #2a2a2a;
  color: #aaa;
}
.dark-mode .period-filters .btn-check:checked + .btn {
  background: #1F2D3D;
  color: #fff;
}
.dark-mode .balance-card-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}
.dark-mode .movements-list {
  background: #23272b;
  color: #eaf6ff;
}
.dark-mode .movement-item {
  border-color: #333;
}
.dark-mode .movement-item:hover {
  background: #2a2a2a;
}
.dark-mode .movement-title {
  color: #eaf6ff;
}
.dark-mode .movement-subtitle {
  color: #b0b8c1;
}

/* Tarjetas de producto mejoradas tipo Treinta.co */
.product-card-treinta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.product-card-treinta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px #0002;
}
.product-card-treinta img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
  transition: transform 0.2s;
}
.product-card-treinta:hover img {
  transform: scale(1.05);
}
.product-card-treinta h5 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}
.product-card-treinta .product-category {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}
.product-card-treinta .product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 0.5rem;
}
.product-card-treinta .product-cost {
  font-size: 0.9rem;
  color: #888;
}

/* Tarjetas de cliente mejoradas */
.client-card-treinta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  cursor: pointer;
}
.client-card-treinta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px #0002;
}
.client-card-treinta .client-photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid #1F2D3D;
}
.client-card-treinta .client-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  border: 3px solid #1F2D3D;
}
.client-card-treinta .client-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}
.client-card-treinta .client-info {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.3rem;
}

/* Modo oscuro */
.dark-mode .product-card-treinta,
.dark-mode .client-card-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}
.dark-mode .product-card-treinta h5,
.dark-mode .client-card-treinta .client-name {
  color: #eaf6ff;
}
.dark-mode .product-card-treinta .product-category,
.dark-mode .product-card-treinta .product-cost,
.dark-mode .client-card-treinta .client-info {
  color: #b0b8c1;
}
.dark-mode .product-card-treinta .product-price {
  color: #4ea8ff;
}

/* Tarjetas de deuda tipo Treinta.co */
.debt-card-treinta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
  padding: 1.2rem;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.debt-card-treinta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px #0002;
}
.debt-card-treinta.paid {
  border-left: 4px solid #28a745;
}
.debt-card-treinta.partial {
  border-left: 4px solid #17a2b8;
}
.debt-card-treinta.unpaid {
  border-left: 4px solid #ffc107;
}
.debt-card-treinta .debt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.debt-card-treinta .debt-client {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  flex: 1;
}
.debt-card-treinta .debt-date {
  font-size: 0.85rem;
  color: #666;
  text-align: right;
}
.debt-card-treinta .debt-body {
  margin-bottom: 1rem;
}
.debt-card-treinta .debt-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 0.5rem;
}
.debt-card-treinta .debt-abono {
  font-size: 0.9rem;
  color: #28a745;
  margin-bottom: 0.3rem;
}
.debt-card-treinta .debt-saldo {
  font-size: 1rem;
  font-weight: 600;
  color: #dc3545;
}
.debt-card-treinta .debt-footer {
  text-align: center;
}

/* Modo oscuro para tarjetas de deuda */
.dark-mode .debt-card-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}
.dark-mode .debt-card-treinta .debt-client {
  color: #eaf6ff;
}
.dark-mode .debt-card-treinta .debt-date {
  color: #b0b8c1;
}
.dark-mode .debt-card-treinta .debt-amount {
  color: #4ea8ff;
}
.dark-mode .debt-card-treinta .debt-abono {
  color: #6fcf97;
}
.dark-mode .debt-card-treinta .debt-saldo {
  color: #ff6b6b;
}

/* Estilos para vista de ventas tipo Treinta.co */
.cart-container {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.cart-item {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.cart-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.cart-total {
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a) !important;
  color: white;
  border: none;
}

.cart-total .fw-bold {
  color: white;
}

/* Productos en ventas */
.sales-product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  border: 1px solid #e0e0e0;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
  height: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sales-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #0002;
  border-color: #1F2D3D;
}

.sales-product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  transition: transform 0.2s;
}

.sales-product-card:hover img {
  transform: scale(1.05);
}

.sales-product-card h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.sales-product-card .product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 0.5rem;
}

.sales-product-card .product-stock {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.sales-product-card .add-to-cart-btn {
  width: 100%;
  padding: 0.5rem;
  border-radius: 8px;
  border: none;
  background: #1F2D3D;
  color: white;
  font-weight: 600;
  transition: all 0.2s ease;
}

.sales-product-card .add-to-cart-btn:hover {
  background: #2a3f5a;
  transform: translateY(-1px);
}

.sales-product-card .add-to-cart-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

/* Controles de cantidad en carrito */
.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.cart-qty-btn.minus {
  border-color: #dc3545;
  color: #dc3545;
  background: transparent;
}

.cart-qty-btn.minus:hover {
  background: #dc3545;
  color: white;
}

.cart-qty-btn.plus {
  border-color: #28a745;
  color: #28a745;
  background: transparent;
}

.cart-qty-btn.plus:hover {
  background: #28a745;
  color: white;
}

.cart-qty-display {
  font-size: 1.1rem;
  font-weight: 600;
  min-width: 2rem;
  text-align: center;
  color: #1F2D3D;
}

/* Modo oscuro para ventas */
.dark-mode .cart-item {
  background: #2d3748;
  border-color: #4a5568;
  color: #eaf6ff;
}

.dark-mode .cart-total {
  background: linear-gradient(135deg, #2a3f5a, #1F2D3D) !important;
}

.dark-mode .sales-product-card {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .sales-product-card h6 {
  color: #eaf6ff;
}

.dark-mode .sales-product-card .product-price {
  color: #4ea8ff;
}

.dark-mode .sales-product-card .product-stock {
  color: #b0b8c1;
}

.dark-mode .cart-qty-display {
  color: #4ea8ff;
}

/* Comprobante tipo Treinta.co */
.receipt-treinta {
  max-width: 400px;
  margin: auto;
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px #0001;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.receipt-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.receipt-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.receipt-logo h3 {
  margin: 0;
  color: #1F2D3D;
  font-weight: 700;
  font-size: 1.4rem;
}

.receipt-date {
  color: #666;
  font-size: 0.9rem;
}

.receipt-client {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 0.95rem;
}

.receipt-client i {
  color: #1F2D3D;
  font-size: 1.1rem;
}

.receipt-items {
  margin-bottom: 1.5rem;
}

.receipt-items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
  font-weight: 600;
  color: #666;
  font-size: 0.85rem;
}

.receipt-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.item-name {
  font-weight: 500;
  color: #333;
}

.item-qty {
  text-align: center;
  color: #666;
}

.item-price {
  text-align: right;
  color: #666;
}

.item-subtotal {
  text-align: right;
  font-weight: 600;
  color: #1F2D3D;
}

.receipt-total {
  padding: 1rem 0;
  border-top: 2px solid #1F2D3D;
  margin-bottom: 1rem;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.total-amount {
  color: #1F2D3D;
  font-size: 1.4rem;
}

.receipt-footer {
  text-align: center;
  color: #666;
  font-style: italic;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

/* Estilos para SweetAlert2 con comprobante */
.swal2-receipt-treinta {
  max-width: 500px !important;
}

.swal2-receipt-treinta .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
}

/* Modo oscuro para comprobante */
.dark-mode .receipt-treinta {
  background: #23272b;
  color: #eaf6ff;
}

.dark-mode .receipt-logo h3 {
  color: #4ea8ff;
}

.dark-mode .receipt-client {
  background: #2d3748;
  color: #eaf6ff;
}

.dark-mode .receipt-client i {
  color: #4ea8ff;
}

.dark-mode .receipt-items-header {
  border-bottom-color: #444;
  color: #b0b8c1;
}

.dark-mode .receipt-item {
  border-bottom-color: #2d3748;
}

.dark-mode .item-name {
  color: #eaf6ff;
}

.dark-mode .item-qty,
.dark-mode .item-price {
  color: #b0b8c1;
}

.dark-mode .item-subtotal {
  color: #4ea8ff;
}

.dark-mode .receipt-total {
  border-top-color: #4ea8ff;
}

.dark-mode .total-amount {
  color: #4ea8ff;
}

.dark-mode .receipt-footer {
  color: #b0b8c1;
  border-top-color: #2d3748;
}

/* Modales tipo Treinta.co */
.modal-treinta {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px #0002;
}

.modal-treinta .modal-header {
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  color: white;
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 1.5rem;
}

.modal-treinta .modal-title {
  font-weight: 600;
  font-size: 1.2rem;
}

.modal-treinta .modal-title i {
  margin-right: 0.5rem;
  color: #4ea8ff;
}

.modal-treinta .btn-close {
  filter: invert(1);
  opacity: 0.8;
}

.modal-treinta .btn-close:hover {
  opacity: 1;
}

.modal-treinta .modal-body {
  padding: 2rem;
}

/* Formularios tipo Treinta.co */
.form-treinta .form-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-treinta .form-label i {
  color: #1F2D3D;
  font-size: 1rem;
}

.form-control-treinta {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #fafafa;
}

.form-control-treinta:focus {
  border-color: #1F2D3D;
  box-shadow: 0 0 0 0.2rem #1F2D3D20;
  background: white;
}

.form-control-treinta::placeholder {
  color: #999;
  font-style: italic;
}

.input-group-text {
  background: #1F2D3D;
  color: white;
  border: 2px solid #1F2D3D;
  border-radius: 12px 0 0 12px;
  font-weight: 600;
}

.input-group .form-control-treinta {
  border-radius: 0 12px 12px 0;
  border-left: none;
}

/* Botones tipo Treinta.co */
.btn-treinta {
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #0002;
}

.btn-primary.btn-treinta {
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  color: white;
}

.btn-primary.btn-treinta:hover {
  background: linear-gradient(135deg, #2a3f5a, #1F2D3D);
}

.btn-outline-primary.btn-treinta {
  border: 2px solid #1F2D3D;
  color: #1F2D3D;
  background: transparent;
}

.btn-outline-primary.btn-treinta:hover {
  background: #1F2D3D;
  color: white;
}

/* Contenedor de imagen */
.image-upload-container {
  position: relative;
}

.image-preview {
  margin-top: 1rem;
  text-align: center;
  min-height: 100px;
  border: 2px dashed #e0e0e0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  transition: all 0.2s ease;
}

.image-preview:hover {
  border-color: #1F2D3D;
  background: #f0f0f0;
}

.image-preview img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 8px;
  box-shadow: 0 2px 8px #0001;
}

.image-preview:empty::before {
  content: '📷 Vista previa de imagen';
  color: #999;
  font-style: italic;
}

/* Form text mejorado */
.form-text {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Modo oscuro para modales */
.dark-mode .modal-treinta {
  background: #23272b;
  color: #eaf6ff;
}

.dark-mode .modal-treinta .modal-header {
  background: linear-gradient(135deg, #2a3f5a, #1F2D3D);
}

.dark-mode .form-treinta .form-label {
  color: #eaf6ff;
}

.dark-mode .form-treinta .form-label i {
  color: #4ea8ff;
}

.dark-mode .form-control-treinta {
  background: #2d3748;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .form-control-treinta:focus {
  border-color: #4ea8ff;
  box-shadow: 0 0 0 0.2rem #4ea8ff20;
  background: #23272b;
}

.dark-mode .form-control-treinta::placeholder {
  color: #b0b8c1;
}

.dark-mode .input-group-text {
  background: #4ea8ff;
  border-color: #4ea8ff;
  color: #1F2D3D;
}

.dark-mode .image-preview {
  background: #2d3748;
  border-color: #444;
}

.dark-mode .image-preview:hover {
  border-color: #4ea8ff;
  background: #23272b;
}

.dark-mode .image-preview:empty::before {
  color: #b0b8c1;
}

.dark-mode .form-text {
  color: #b0b8c1;
}

/* Sidebar tipo Treinta.co */
.sidebar-treinta {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #1F2D3D 0%, #2a3f5a 100%);
  color: #eaf6ff;
  z-index: 1052;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px #0003;
}

.sidebar-treinta.open {
  left: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #4a5568;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.logo-text {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #eaf6ff;
}

.btn-close-sidebar {
  background: none;
  border: none;
  color: #eaf6ff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-close-sidebar:hover {
  background: #4a5568;
  color: #4ea8ff;
}

.sidebar-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section-title {
  color: #4ea8ff;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-nav-item {
  background: none;
  border: none;
  color: #b0b8c1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  width: 100%;
}

.sidebar-nav-item:hover {
  background: #4a5568;
  color: #eaf6ff;
  transform: translateX(4px);
}

.sidebar-nav-item.active {
  background: #4ea8ff;
  color: #1F2D3D;
  font-weight: 600;
}

.sidebar-nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-action-btn {
  background: none;
  border: 1px solid #4a5568;
  color: #b0b8c1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  text-align: left;
  width: 100%;
}

.sidebar-action-btn:hover {
  background: #4a5568;
  color: #eaf6ff;
  border-color: #4ea8ff;
}

.sidebar-action-btn.active {
  background: #4ea8ff;
  color: #1F2D3D;
  border-color: #4ea8ff;
  font-weight: 600;
}

.sidebar-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: #2d3748;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #b0b8c1;
}

.info-item i {
  color: #4ea8ff;
  width: 16px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #4a5568;
  text-align: center;
}

.sidebar-version {
  color: #b0b8c1;
  font-size: 0.8rem;
}

/* Overlay del sidebar */
#sidebarOverlay {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

/* Header mejorado */
.header-treinta {
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  color: #eaf6ff;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 2px 12px #0002;
}

.header-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.header-sub {
  font-size: 0.9rem;
  color: #4ea8ff;
  font-weight: 500;
}

#btnSidebar {
  background: none;
  border: none;
  color: #eaf6ff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

#btnSidebar:hover {
  background: #4a5568;
  color: #4ea8ff;
}

/* Navegación inferior mejorada */
.navbar-treinta {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 12px #0001;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
}

.navbar-treinta .btn {
  background: none;
  border: none;
  color: #666;
  padding: 0.75rem 0.5rem;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 60px;
}

.navbar-treinta .btn:hover {
  color: #1F2D3D;
  background: #f8f9fa;
}

.navbar-treinta .btn.active {
  color: #1F2D3D;
  background: #e3f2fd;
  font-weight: 600;
}

.navbar-treinta .btn i {
  font-size: 1.2rem;
}

/* Modo oscuro para sidebar */
.dark-mode .navbar-treinta {
  background: #23272b;
  border-top-color: #444;
}

.dark-mode .navbar-treinta .btn {
  color: #b0b8c1;
}

.dark-mode .navbar-treinta .btn:hover {
  color: #4ea8ff;
  background: #2d3748;
}

.dark-mode .navbar-treinta .btn.active {
  color: #4ea8ff;
  background: #2d3748;
}

/* Responsive para sidebar */
@media (max-width: 768px) {
  .sidebar-treinta {
    width: 280px;
    left: -280px;
  }
  
  .sidebar-header {
    padding: 1rem;
  }
  
  .sidebar-content {
    padding: 1rem;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
}

/* Vista de Balance tipo Treinta.co */

/* Filtros de periodo */
.period-filters-treinta {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
}

.period-filters-treinta .btn-treinta {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.period-filters-treinta .btn-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0002;
}

.period-filters-treinta .btn-check:checked + .btn-treinta {
  background: #1F2D3D;
  border-color: #1F2D3D;
  color: white;
}

/* Tarjetas de balance */
.balance-cards-treinta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.balance-card-treinta {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.balance-card-treinta:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px #0002;
}

.balance-card-treinta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-color), var(--card-color-light));
}

.balance-card-treinta.income {
  --card-color: #28a745;
  --card-color-light: #6fcf97;
}

.balance-card-treinta.expenses {
  --card-color: #dc3545;
  --card-color-light: #ff6b6b;
}

.balance-card-treinta.profit {
  --card-color: #17a2b8;
  --card-color-light: #4ea8ff;
}

.balance-card-treinta.credits {
  --card-color: #ffc107;
  --card-color-light: #ffd54f;
}

.balance-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.balance-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
}

.balance-card-title {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  margin: 0;
}

.balance-card-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--card-color);
  margin: 0.5rem 0;
}

.balance-card-change {
  font-size: 0.85rem;
  color: #666;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.balance-card-change.positive {
  color: #28a745;
}

.balance-card-change.negative {
  color: #dc3545;
}

/* Sección de movimientos */
.movements-section-treinta {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
}

.movements-list-treinta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.movement-item-treinta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
}

.movement-item-treinta:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.movement-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
}

.movement-icon.sale {
  background: linear-gradient(135deg, #28a745, #6fcf97);
}

.movement-icon.debt {
  background: linear-gradient(135deg, #ffc107, #ffd54f);
}

.movement-icon.payment {
  background: linear-gradient(135deg, #17a2b8, #4ea8ff);
}

.movement-content {
  flex: 1;
}

.movement-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.movement-subtitle {
  font-size: 0.85rem;
  color: #666;
}

.movement-amount {
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
}

.movement-amount.positive {
  color: #28a745;
}

.movement-amount.negative {
  color: #dc3545;
}

/* Modo oscuro para balance */
.dark-mode .period-filters-treinta {
  background: #23272b;
  border-color: #444;
}

.dark-mode .balance-card-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .balance-card-title {
  color: #b0b8c1;
}

.dark-mode .movements-section-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .movement-item-treinta {
  background: #2d3748;
  border-color: #4a5568;
  color: #eaf6ff;
}

.dark-mode .movement-item-treinta:hover {
  background: #4a5568;
}

.dark-mode .movement-title {
  color: #eaf6ff;
}

.dark-mode .movement-subtitle {
  color: #b0b8c1;
}

/* Responsive para balance */
@media (max-width: 768px) {
  .balance-cards-treinta {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .balance-card-treinta {
    padding: 1rem;
  }
  
  .balance-card-amount {
    font-size: 1.5rem;
  }
  
  .movements-section-treinta {
    padding: 1rem;
  }
}

/* Vista de Ventas tipo Treinta.co */

/* Panel de productos */
.products-panel-treinta {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
  height: calc(100vh - 200px);
  overflow-y: auto;
}

.search-bar-treinta .input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px #0001;
}

.search-bar-treinta .input-group-text {
  background: #1F2D3D;
  border: none;
  color: white;
  padding: 0.75rem 1rem;
}

.search-bar-treinta .form-control-treinta {
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.search-bar-treinta .form-control-treinta:focus {
  box-shadow: none;
  background: #f8f9fa;
}

/* Grid de productos */
.products-grid-treinta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.product-card-treinta {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px #0001;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.product-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #0002;
  border-color: #1F2D3D;
}

.product-card-treinta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1F2D3D, #2a3f5a);
}

.product-image-treinta {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.product-info-treinta {
  text-align: center;
}

.product-name-treinta {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

.product-price-treinta {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 0.5rem;
}

.product-stock-treinta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.product-actions-treinta {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.product-actions-treinta .btn {
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  min-width: 40px;
}

/* Panel del carrito */
.cart-panel-treinta {
  background: rgba(255,255,255,0.85);
  border-radius: 22px;
  box-shadow: 0 8px 32px 0 rgba(31,45,61,0.18);
  backdrop-filter: blur(12px) saturate(1.2);
  border: 1.5px solid rgba(200,200,255,0.18);
  padding: 2rem 1.5rem 2.5rem 1.5rem;
  position: sticky;
  top: 1rem;
  max-width: 420px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 80vh;
  transition: box-shadow 0.2s;
}

.cart-panel-treinta:hover {
  box-shadow: 0 12px 40px 0 rgba(31,45,61,0.22);
}

.cart-header-treinta {
  padding: 1.2rem 0 1rem 0;
  border-bottom: 1.5px solid rgba(13,110,253,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
}

.cart-header-treinta h5 {
  color: #1976d2;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-header-treinta .btn {
  border-radius: 8px;
  font-size: 0.95rem;
  padding: 0.35rem 0.9rem;
  background: rgba(220,53,69,0.08);
  color: #dc3545;
  border: 1.5px solid #dc3545;
  transition: background 0.15s, color 0.15s;
}
.cart-header-treinta .btn:hover {
  background: #dc3545;
  color: #fff;
}

.cart-content-treinta {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
  position: relative;
  padding: 1.2rem 0 0 0;
}

.cart-items-treinta {
  flex: 1 1 auto;
  overflow-y: auto;
  margin-bottom: 1rem;
  max-height: 320px;
  padding-right: 4px;
}

.cart-item-treinta {
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(13,110,253,0.06);
  border: 1.2px solid rgba(13,110,253,0.10);
  margin-bottom: 0.7rem;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  transition: box-shadow 0.15s, border 0.15s;
}
.cart-item-treinta:hover {
  box-shadow: 0 4px 16px rgba(13,110,253,0.13);
  border: 1.5px solid #0d6efd33;
}

.cart-item-info-treinta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.cart-item-name-treinta {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
  line-height: 1.2;
  margin-bottom: 2px;
}
.cart-item-price-treinta {
  font-size: 0.92rem;
  color: #1976d2;
  font-weight: 500;
}
.cart-item-total-treinta {
  font-weight: 700;
  font-size: 1.08rem;
  color: #0d6efd;
}
.cart-item-qty-treinta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 60px;
  background: rgba(13,110,253,0.07);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
}
.cart-item-qty-treinta .btn {
  background: #fff;
  border: 1.2px solid #0d6efd44;
  color: #0d6efd;
  border-radius: 6px;
  font-size: 1.1rem;
  min-width: 28px;
  height: 28px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.cart-item-qty-treinta .btn:hover {
  background: #0d6efd;
  color: #fff;
}
.cart-item-qty-treinta .qty-display {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1976d2;
  min-width: 20px;
  text-align: center;
}
.cart-item-actions-treinta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 40px;
}
.cart-item-actions-treinta .btn {
  background: #fff;
  border: 1.2px solid #dc3545;
  color: #dc3545;
  border-radius: 6px;
  font-size: 1.1rem;
  min-width: 28px;
  height: 28px;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.cart-item-actions-treinta .btn:hover {
  background: #dc3545;
  color: #fff;
}

.cart-summary-treinta {
  padding: 1.1rem 0 0.5rem 0;
  background: rgba(13,110,253,0.07);
  border-radius: 12px 12px 0 0;
  margin-bottom: 0.2rem;
  box-shadow: 0 2px 8px rgba(13,110,253,0.04);
}
.cart-total-treinta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d6efd;
  padding: 0.2rem 0.5rem;
}
.cart-total-label {
  color: #1976d2;
  font-weight: 500;
  font-size: 1.05rem;
}
.cart-total-amount {
  color: #0d6efd;
  font-weight: 700;
  font-size: 1.18rem;
}

.cart-actions-treinta {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,0.92);
  z-index: 2;
  width: 100%;
  box-shadow: 0 -2px 8px rgba(31,45,61,0.04);
  padding-bottom: 0.7rem;
  margin-bottom: 0;
  border-radius: 0 0 18px 18px;
  backdrop-filter: blur(8px);
  border-top: 1.5px solid rgba(13,110,253,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.cart-actions-treinta .form-label {
  color: #1976d2;
  font-weight: 500;
  font-size: 0.98rem;
}
.cart-actions-treinta input[type="date"] {
  border-radius: 8px;
  border: 1.2px solid #0d6efd33;
  background: #f8faff;
  color: #212529;
  font-size: 1.05rem;
  padding: 0.5rem 0.8rem;
  box-shadow: 0 1px 4px rgba(13,110,253,0.04);
  transition: border 0.15s;
}
.cart-actions-treinta input[type="date"]:focus {
  border: 1.5px solid #0d6efd;
  outline: none;
}
.cart-actions-treinta .btn {
  border-radius: 10px;
  font-size: 1.13rem;
  font-weight: 600;
  background: linear-gradient(90deg, #1976d2 0%, #0d6efd 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,110,253,0.10);
  border: none;
  padding: 0.85rem 1rem;
  transition: background 0.15s, box-shadow 0.15s;
}
.cart-actions-treinta .btn:hover {
  background: linear-gradient(90deg, #0d6efd 0%, #1976d2 100%);
  box-shadow: 0 4px 16px rgba(13,110,253,0.18);
}

/* Modo oscuro para el carrito */
.dark-mode .cart-panel-treinta {
  background: rgba(30,34,44,0.92);
  border: 1.5px solid rgba(13,110,253,0.13);
  box-shadow: 0 8px 32px 0 rgba(13,110,253,0.18);
}
.dark-mode .cart-header-treinta h5 {
  color: #4ea8ff;
}
.dark-mode .cart-header-treinta .btn {
  background: rgba(220,53,69,0.13);
  color: #ff6b81;
  border: 1.5px solid #ff6b81;
}
.dark-mode .cart-header-treinta .btn:hover {
  background: #ff6b81;
  color: #fff;
}
.dark-mode .cart-item-treinta {
  background: rgba(40,48,64,0.92);
  border: 1.2px solid rgba(13,110,253,0.18);
  color: #eaf6ff;
}
.dark-mode .cart-item-treinta:hover {
  border: 1.5px solid #4ea8ff;
}
.dark-mode .cart-item-name-treinta {
  color: #eaf6ff;
}
.dark-mode .cart-item-price-treinta {
  color: #4ea8ff;
}
.dark-mode .cart-item-total-treinta {
  color: #4ea8ff;
}
.dark-mode .cart-item-qty-treinta {
  background: rgba(13,110,253,0.13);
}
.dark-mode .cart-item-qty-treinta .btn {
  background: #23272b;
  border: 1.2px solid #4ea8ff;
  color: #4ea8ff;
}
.dark-mode .cart-item-qty-treinta .btn:hover {
  background: #4ea8ff;
  color: #23272b;
}
.dark-mode .cart-item-qty-treinta .qty-display {
  color: #4ea8ff;
}
.dark-mode .cart-item-actions-treinta .btn {
  background: #23272b;
  border: 1.2px solid #ff6b81;
  color: #ff6b81;
}
.dark-mode .cart-item-actions-treinta .btn:hover {
  background: #ff6b81;
  color: #23272b;
}
.dark-mode .cart-summary-treinta {
  background: rgba(13,110,253,0.13);
}
.dark-mode .cart-total-treinta {
  color: #4ea8ff;
}
.dark-mode .cart-total-label {
  color: #4ea8ff;
}
.dark-mode .cart-total-amount {
  color: #4ea8ff;
}
.dark-mode .cart-actions-treinta {
  background: rgba(30,34,44,0.97);
  border-top: 1.5px solid rgba(13,110,253,0.13);
}
.dark-mode .cart-actions-treinta .form-label {
  color: #4ea8ff;
}
.dark-mode .cart-actions-treinta input[type="date"] {
  background: #23272b;
  color: #eaf6ff;
  border: 1.2px solid #4ea8ff44;
}
.dark-mode .cart-actions-treinta input[type="date"]:focus {
  border: 1.5px solid #4ea8ff;
}
.dark-mode .cart-actions-treinta .btn {
  background: linear-gradient(90deg, #4ea8ff 0%, #1976d2 100%);
  color: #23272b;
}
.dark-mode .cart-actions-treinta .btn:hover {
  background: linear-gradient(90deg, #1976d2 0%, #4ea8ff 100%);
  color: #fff;
}

@media (max-width: 991px) {
  .cart-panel-treinta {
    max-width: 100%;
    max-height: 60vh;
    min-height: 340px;
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
  }
  .cart-items-treinta {
    max-height: 180px;
  }
}
@media (max-width: 575px) {
  .cart-panel-treinta {
    max-width: 100%;
    max-height: 70vh;
    min-height: 260px;
    padding: 1rem 0.2rem 1.2rem 0.2rem;
  }
  .cart-items-treinta {
    max-height: 120px;
    padding-right: 2px;
  }
  .cart-actions-treinta {
    padding-bottom: 0.25rem;
    gap: 0.4rem;
  }
}
@media (max-width: 480px) {
  .cart-panel-treinta {
    max-width: 100%;
    max-height: 80vh;
    min-height: 200px;
    padding: 0.7rem 0.1rem 0.7rem 0.1rem;
  }
  .cart-items-treinta {
    max-height: 90px;
    padding-right: 1px;
  }
}
/* === FIN REDISEÑO PROFESIONAL DEL CARRITO === */

/* Estadísticas Avanzadas tipo Treinta.co */

.advanced-stats-treinta {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px #0001;
  border: 1px solid #e0e0e0;
}

.advanced-stats-header h5 {
  color: #1F2D3D;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.advanced-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card-treinta {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
}

.stat-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0002;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2D3D;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* Insights Section */
.insights-section h6 {
  color: #1F2D3D;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.insight-card-treinta {
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.insight-card-treinta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1F2D3D, #2a3f5a);
}

.insight-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0002;
}

.insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.insight-card-treinta:first-child .insight-icon {
  background: linear-gradient(135deg, #ffc107, #ffca2c);
}

.insight-card-treinta:last-child .insight-icon {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.insight-content {
  flex: 1;
}

.insight-title {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.insight-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2D3D;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.insight-subtitle {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* Modo oscuro para estadísticas avanzadas */
.dark-mode .advanced-stats-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .advanced-stats-header h5 {
  color: #eaf6ff;
}

.dark-mode .stat-card-treinta {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  border-color: #4a5568;
  color: #eaf6ff;
}

.dark-mode .stat-value {
  color: #eaf6ff;
}

.dark-mode .stat-label {
  color: #b0b8c1;
}

.dark-mode .insights-section h6 {
  color: #eaf6ff;
}

.dark-mode .insight-card-treinta {
  background: linear-gradient(135deg, #23272b 0%, #2d3748 100%);
  border-color: #4a5568;
  color: #eaf6ff;
}

.dark-mode .insight-title {
  color: #b0b8c1;
}

.dark-mode .insight-value {
  color: #eaf6ff;
}

.dark-mode .insight-subtitle {
  color: #b0b8c1;
}

/* Responsive para estadísticas avanzadas */
@media (max-width: 768px) {
  .advanced-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  
  .stat-card-treinta {
    padding: 0.75rem;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .insight-card-treinta {
    padding: 0.75rem;
  }
  
  .insight-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* Estilos para elementos de estado y utilidades */

.status-details {
  text-align: left;
}

.status-section {
  margin-bottom: 1.5rem;
}

.status-section h6 {
  color: #1F2D3D;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.5rem;
}

.status-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.status-section li {
  padding: 0.25rem 0;
  color: #666;
  font-size: 0.9rem;
}

/* Mensaje de bienvenida */
.welcome-message {
  text-align: center;
}

.welcome-features {
  text-align: left;
  margin: 1rem 0;
}

.welcome-features div {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.welcome-features i {
  font-size: 1.1rem;
}

/* Créditos */
.credits-content {
  text-align: left;
}

.credits-section {
  margin-bottom: 1.5rem;
}

.credits-section h6 {
  color: #1F2D3D;
  font-weight: 600;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.25rem;
}

.credits-section p {
  color: #666;
  margin-bottom: 0.5rem;
}

.credits-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.credits-section li {
  padding: 0.25rem 0;
  color: #666;
  font-size: 0.9rem;
}

/* Modo oscuro para elementos de estado */
.dark-mode .status-section h6 {
  color: #eaf6ff;
  border-color: #4a5568;
}

.dark-mode .status-section li {
  color: #b0b8c1;
}

.dark-mode .credits-section h6 {
  color: #eaf6ff;
  border-color: #4a5568;
}

.dark-mode .credits-section p,
.dark-mode .credits-section li {
  color: #b0b8c1;
}

/* Animaciones adicionales */
@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.stat-card-treinta,
.insight-card-treinta,
.balance-card-treinta {
  animation: slideInUp 0.3s ease-out;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .stat-card-treinta,
  .insight-card-treinta,
  .balance-card-treinta {
    animation: none;
  }
  
  .receipt-header::before {
    animation: none;
  }
}

/* Estilos para elementos de carga */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
  height: 1rem;
  margin: 0.5rem 0;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.dark-mode .loading-skeleton {
  background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
  background-size: 200% 100%;
}

/* Mejoras de rendimiento */
.product-card-treinta img,
.client-card-treinta img {
  will-change: transform;
}

.cart-item-treinta,
.movement-item-treinta {
  will-change: transform;
}

/* Estilos para notificaciones toast personalizadas */
.toast-treinta {
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.toast-treinta .toast-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.toast-treinta .toast-body {
  color: white;
}

/* Estilos para tooltips personalizados */
.tooltip-treinta {
  background: #1F2D3D;
  color: white;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Estilos para scrollbars personalizados */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #1F2D3D;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3f5a;
}

.dark-mode ::-webkit-scrollbar-track {
  background: #2d3748;
}

.dark-mode ::-webkit-scrollbar-thumb {
  background: #4a5568;
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #718096;
}

/* Estilos para selección de texto */
::selection {
  background: #1F2D3D;
  color: white;
}

::-moz-selection {
  background: #1F2D3D;
  color: white;
}

/* Estilos para focus mejorado */
.btn:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(31, 45, 61, 0.25);
  border-color: #1F2D3D;
}

.dark-mode .btn:focus,
.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(78, 168, 255, 0.25);
  border-color: #4ea8ff;
}

/* Estilos para elementos de estado de carga */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1F2D3D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.dark-mode .loading-spinner {
  border-color: #2d3748;
  border-top-color: #4ea8ff;
}

/* Estilos para mensajes de error mejorados */
.error-message {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.error-message i {
  font-size: 1.2rem;
}

/* Estilos para mensajes de éxito mejorados */
.success-message {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.success-message i {
  font-size: 1.2rem;
}

/* Estilos para mensajes de información mejorados */
.info-message {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-message i {
  font-size: 1.2rem;
}

/* === Botón de instalación PWA === */
.btn-install-pwa {
  background: linear-gradient(135deg, #1F2D3D 0%, #2C3E50 100%);
  border: 2px solid #3498DB;
  border-radius: 25px;
  padding: 8px 16px;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(31, 45, 61, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.btn-install-pwa:hover {
  background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
  border-color: #5DADE2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 45, 61, 0.4);
  color: white;
}

.btn-install-pwa:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(31, 45, 61, 0.3);
}

.install-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.install-text {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Animación de pulso para llamar atención */
@keyframes installPulse {
  0% {
    box-shadow: 0 4px 15px rgba(31, 45, 61, 0.3);
  }
  50% {
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.6);
  }
  100% {
    box-shadow: 0 4px 15px rgba(31, 45, 61, 0.3);
  }
}

.btn-install-pwa.animate {
  animation: installPulse 2s infinite;
}

/* Modo oscuro para botón de instalación */
.dark-mode .btn-install-pwa {
  background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
  border-color: #5DADE2;
}

.dark-mode .btn-install-pwa:hover {
  background: linear-gradient(135deg, #34495E 0%, #4A5568 100%);
  border-color: #74B9FF;
}

/* Selector de cliente en carrito */
.client-selector-treinta {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.client-selector-treinta .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.form-select-treinta {
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background-color: #fff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select-treinta:focus {
  border-color: #1F2D3D;
  box-shadow: 0 0 0 0.2rem rgba(31, 45, 61, 0.25);
  outline: 0;
}

/* Ubicación del cliente */
.client-location {
  margin-top: 0.5rem;
}

.client-location .btn {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.client-location .btn:hover {
  background-color: #1F2D3D;
  border-color: #1F2D3D;
  color: #fff;
}

/* Mejoras en las tarjetas de cliente */
.client-card-treinta {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.client-card-treinta .client-location {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.client-card-treinta .client-location .btn {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

/* Estilos para el proceso de venta */
.sale-summary-treinta {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.sale-client-info {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #1F2D3D;
}

.sale-total-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #e3f2fd;
  border-radius: 8px;
}

.sale-items-count {
  color: #1976d2;
  font-size: 0.9rem;
}

.sale-total-amount {
  font-size: 1.2rem;
  color: #1F2D3D;
}

.sale-payment-options {
  margin-bottom: 1.5rem;
}

.sale-payment-options .form-check {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.sale-payment-options .form-check:hover {
  background-color: #f8f9fa;
}

.sale-payment-options .form-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
}

.sale-discount-section {
  margin-top: 1rem;
}

.sale-discount-section .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Estilos para venta a crédito */
.credit-sale-treinta {
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
}

.credit-sale-treinta .alert {
  margin-bottom: 1.5rem;
}

.credit-sale-treinta .form-group {
  margin-bottom: 1rem;
}

.credit-sale-treinta .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Comprobante mejorado */
.receipt-treinta {
  font-family: 'Courier New', monospace;
  max-width: 350px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.receipt-header {
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  color: #fff;
  padding: 1rem;
  text-align: center;
}

.receipt-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.receipt-logo h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.receipt-date {
  font-size: 0.8rem;
  opacity: 0.9;
}

.receipt-client {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.receipt-items {
  padding: 1rem;
}

.receipt-items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: #6c757d;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.receipt-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
  padding: 0.25rem 0;
  border-bottom: 1px dotted #e9ecef;
}

.receipt-item:last-child {
  border-bottom: none;
}

.item-name {
  font-weight: 500;
}

.item-qty, .item-price, .item-subtotal {
  text-align: center;
}

.receipt-total {
  background: #f8f9fa;
  padding: 1rem;
  border-top: 2px solid #e9ecef;
}

.total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.total-line.discount {
  color: #dc3545;
  font-size: 0.8rem;
}

.total-line.final {
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 1px solid #dee2e6;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.total-amount {
  color: #1F2D3D;
}

.payment-type {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.receipt-footer {
  background: #1F2D3D;
  color: #fff;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
}

.receipt-id {
  margin-top: 0.5rem;
  opacity: 0.8;
  font-size: 0.7rem;
}

/* Estilos para SweetAlert2 personalizado */
.swal2-sale-treinta {
  border-radius: 12px;
}

.swal2-receipt-treinta {
  border-radius: 8px;
}

/* Responsividad completa para todas las pantallas */
@media (max-width: 1200px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .products-grid-treinta {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
  }
}

@media (max-width: 991px) {
  .products-panel-treinta {
    margin-bottom: 1.5rem;
  }
  
  .cart-panel-treinta {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  
  .cart-actions-treinta {
    position: static !important;
    width: 100% !important;
    margin-top: 1rem;
  }
  
  .cart-summary-treinta {
    position: static !important;
  }
  
  #finalizeBtn {
    width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 767px) {
  .products-panel-treinta, .cart-panel-treinta {
    padding: 1rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  
  .products-grid-treinta {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  .cart-panel-treinta {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .cart-actions-treinta {
    padding: 0;
    margin-top: 1rem;
  }
  
  .cart-summary-treinta {
    padding: 0.75rem 0;
  }
  
  .product-card-treinta {
    min-height: auto;
  }
  
  .product-name-treinta {
    font-size: 0.9rem;
  }
  
  .product-price-treinta {
    font-size: 1rem;
  }
  
  .cart-item-treinta {
    padding: 0.5rem;
  }
  
  .cart-item-name-treinta {
    font-size: 0.9rem;
  }
  
  .cart-total-amount {
    font-size: 1.1rem;
  }
}

@media (max-width: 575px) {
  .products-panel-treinta, .cart-panel-treinta {
    padding: 0.75rem;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
  }
  
  .products-grid-treinta {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  
  .cart-panel-treinta {
    padding: 0.75rem;
  }
  
  .cart-actions-treinta {
    margin-top: 0.75rem;
  }
  
  .product-card-treinta {
    min-height: 120px;
  }
  
  .product-name-treinta {
    font-size: 0.85rem;
  }
  
  .product-price-treinta {
    font-size: 0.95rem;
  }
  
  .cart-item-treinta {
    padding: 0.4rem;
  }
  
  .cart-item-name-treinta {
    font-size: 0.85rem;
  }
  
  .cart-total-amount {
    font-size: 1rem;
  }
  
  #finalizeBtn {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
  }
  
  .client-selector-treinta {
    padding: 0.75rem;
  }
  
  .form-select-treinta {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .products-panel-treinta, .cart-panel-treinta {
    padding: 0.5rem;
    margin-left: 0.125rem;
    margin-right: 0.125rem;
  }
  
  .products-grid-treinta {
    gap: 0.5rem !important;
  }
  
  .product-card-treinta {
    min-height: 100px;
  }
  
  .product-name-treinta {
    font-size: 0.8rem;
  }
  
  .product-price-treinta {
    font-size: 0.9rem;
  }
  
  .cart-item-treinta {
    padding: 0.3rem;
  }
  
  .cart-item-name-treinta {
    font-size: 0.8rem;
  }
  
  .cart-total-amount {
    font-size: 0.95rem;
  }
  
  #finalizeBtn {
    font-size: 0.95rem;
    padding: 0.5rem 0.7rem;
  }
}

.products-panel-treinta {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cart-panel-treinta {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.5rem 1.5rem 2.5rem 1.5rem;
  position: sticky;
  top: 1rem;
  max-width: 400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.products-grid-treinta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.cart-actions-treinta {
  width: 100%;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-summary-treinta {
  padding: 1rem 0;
}

#finalizeBtn {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(31,45,61,0.08);
  transition: all 0.3s ease;
}

#finalizeBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,45,61,0.15);
}

#finalizeBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Responsividad adicional para otros elementos */
@media (max-width: 767px) {
  .app-view {
    padding: 0.5rem;
  }
  
  .sidebar {
    width: 280px;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar.open + .main-content {
    margin-left: 280px;
  }
  
  .client-card-treinta, .debt-card-treinta {
    min-height: 120px;
  }
  
  .client-name, .debt-client {
    font-size: 0.9rem;
  }
  
  .client-info, .debt-date {
    font-size: 0.8rem;
  }
  
  .badge {
    font-size: 0.7rem;
  }
}

@media (max-width: 575px) {
  .app-view {
    padding: 0.25rem;
  }
  
  .sidebar {
    width: 260px;
  }
  
  .sidebar.open + .main-content {
    margin-left: 260px;
  }
  
  .client-card-treinta, .debt-card-treinta {
    min-height: 100px;
  }
  
  .client-name, .debt-client {
    font-size: 0.85rem;
  }
  
  .client-info, .debt-date {
    font-size: 0.75rem;
  }
  
  .badge {
    font-size: 0.65rem;
  }
  
  .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }
  
  .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
  }
}

/* Selector de cliente compacto y responsivo */
.client-selector-treinta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.selected-client-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e3f2fd;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #bbdefb;
}

.client-name-display {
  font-weight: 600;
  color: #1976d2;
  font-size: 0.95rem;
}

.remove-client-btn {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 4px;
  min-width: auto;
  width: auto;
}

.remove-client-btn:hover {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

@media (max-width: 575px) {
  .client-selector-treinta {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .selected-client-display {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.6rem;
  }
  
  .client-name-display {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .remove-client-btn {
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem;
    flex-shrink: 0;
  }
  
  .client-selector-treinta select {
    min-width: 120px;
    max-width: 60vw;
    font-size: 0.85rem;
  }
}

/* Contenedor del botón de finalizar venta */
.finalize-sale-container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin-top: 1rem;
}

.finalize-sale-container .btn {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(31,45,61,0.08);
  transition: all 0.3s ease;
}

.finalize-sale-container .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31,45,61,0.15);
}

.finalize-sale-container .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 575px) {
  .finalize-sale-container {
    margin-top: 0.75rem;
  }
  
  .finalize-sale-container .btn {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .finalize-sale-container {
    margin-top: 0.5rem;
  }
  
  .finalize-sale-container .btn {
    font-size: 0.95rem;
    padding: 0.5rem 0.7rem;
  }
}

/* === Estilos para Plantillas Profesionales === */

/* Estilos para comprobantes profesionales */
.receipt-treinta {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.receipt-header {
  background: linear-gradient(135deg, #1F2D3D 0%, #2a3f5a 100%);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.receipt-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.receipt-logo h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.receipt-info {
  margin-top: 15px;
}

.receipt-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 5px;
  opacity: 0.9;
}

.receipt-number {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.receipt-date {
  font-size: 12px;
  opacity: 0.8;
}

.receipt-client {
  padding: 15px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.receipt-items {
  padding: 20px;
}

.receipt-items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 2px solid #e9ecef;
  font-weight: 600;
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f4;
  font-size: 14px;
}

.item-name {
  font-weight: 500;
  color: #1F2D3D;
}

.item-qty {
  text-align: center;
  color: #6c757d;
}

.item-price, .item-subtotal {
  text-align: right;
  font-weight: 600;
  color: #1F2D3D;
}

.receipt-total {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.total-line.final {
  border-top: 2px solid #1F2D3D;
  margin-top: 10px;
  padding-top: 15px;
  font-size: 18px;
  font-weight: 700;
  color: #1F2D3D;
}

.total-line.discount {
  color: #dc3545;
}

.total-amount {
  color: #28a745;
}

.payment-type {
  margin-top: 15px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.receipt-footer {
  padding: 20px;
  background: #1F2D3D;
  color: white;
  text-align: center;
}

.footer-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-message i {
  color: #ff6b6b;
}

.footer-brand {
  font-size: 12px;
  opacity: 0.8;
}

.footer-brand small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  opacity: 0.6;
}

/* Estilos para modales de comprobante */
.swal2-receipt-treinta {
  max-width: 500px !important;
}

.swal2-receipt-treinta .swal2-html-container {
  margin: 0;
  padding: 0;
}

/* Estilos para reportes de movimientos */
.period-summary-treinta {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.summary-card-treinta {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid #dee2e6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.summary-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #1F2D3D 0%, #2a3f5a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  color: white;
  font-size: 20px;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: #1F2D3D;
  margin-bottom: 5px;
}

.summary-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-amount {
  font-size: 16px;
  font-weight: 600;
  color: #28a745;
}

/* Estilos para filtros de fecha */
.date-filters-treinta {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.date-filters-treinta .form-label {
  font-weight: 600;
  color: #1F2D3D;
  margin-bottom: 8px;
}

.date-filters-treinta .form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.date-filters-treinta .form-control:focus {
  border-color: #1F2D3D;
  box-shadow: 0 0 0 0.2rem rgba(31, 45, 61, 0.25);
}

/* Estilos para movimientos filtrados */
.movements-list-treinta {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.movement-item-treinta {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
}

.movement-item-treinta:hover {
  background-color: #f8f9fa;
}

.movement-item-treinta:last-child {
  border-bottom: none;
}

.movement-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1F2D3D 0%, #2a3f5a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  margin-right: 15px;
  flex-shrink: 0;
}

.movement-content {
  flex: 1;
  min-width: 0;
}

.movement-title {
  font-size: 14px;
  font-weight: 600;
  color: #1F2D3D;
  margin-bottom: 4px;
}

.movement-subtitle {
  font-size: 12px;
  color: #6c757d;
}

.movement-amount {
  font-size: 16px;
  font-weight: 700;
  margin-left: 15px;
  flex-shrink: 0;
}

.movement-amount.positive {
  color: #28a745;
}

.movement-amount.negative {
  color: #dc3545;
}

/* Estilos para modales de detalle de pago */
.payment-detail {
  text-align: left;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 10px;
}

.payment-detail div {
  margin-bottom: 8px;
  font-size: 14px;
}

.payment-detail strong {
  color: #1F2D3D;
}

/* Responsive design para plantillas */
@media (max-width: 768px) {
  .receipt-items-header,
  .receipt-item {
    grid-template-columns: 1.5fr 0.8fr 0.8fr 0.8fr;
    gap: 8px;
    font-size: 12px;
  }
  
  .summary-card-treinta {
    padding: 15px;
  }
  
  .summary-value {
    font-size: 24px;
  }
  
  .movement-item-treinta {
    padding: 12px 15px;
  }
  
  .movement-icon {
    width: 35px;
    height: 35px;
    font-size: 14px;
    margin-right: 12px;
  }
}

/* Animaciones para plantillas */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.receipt-treinta,
.period-summary-treinta,
.movements-list-treinta {
  animation: slideInUp 0.3s ease-out;
}

/* Estilos para selector de cliente */
.client-selector-treinta {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.client-selector-treinta .form-label {
  font-weight: 600;
  color: #1F2D3D;
  margin-bottom: 8px;
  font-size: 14px;
}

.client-selector-treinta .form-select {
  border: 2px solid #e9ecef;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.client-selector-treinta .form-select:focus {
  border-color: #1F2D3D;
  box-shadow: 0 0 0 0.2rem rgba(31, 45, 61, 0.25);
}

.selected-client-info {
  margin-top: 10px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #28a745;
  background-color: #d4edda;
}

.selected-client-info span {
  font-weight: 600;
  color: #155724;
}

/* Estilos para impresión */
@media print {
  .receipt-treinta {
    box-shadow: none;
    border: 2px solid #333;
  }
  
  .receipt-header {
    background: #333 !important;
    color: white !important;
  }
  
  .receipt-footer {
    background: #333 !important;
    color: white !important;
  }
}

/* Estilos para la sección de Pollos */

.chicken-config-treinta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0001;
}

.chicken-stats-treinta .stat-card-treinta {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
}

.chicken-stats-treinta .stat-card-treinta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #0002;
}

.chicken-stats-treinta .stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  background: linear-gradient(135deg, #1F2D3D, #2a3f5a);
  margin: 0 auto 1rem;
}

.chicken-stats-treinta .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1F2D3D;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.chicken-stats-treinta .stat-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.chicken-sale-treinta {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px #0001;
}

.calculation-display-treinta {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.calculation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

.calculation-item:last-child {
  border-bottom: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.calculation-item .total-amount {
  color: #1F2D3D;
  font-weight: 700;
}

.payment-options-treinta {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e9ecef;
}

.payment-options-treinta .form-check {
  margin-bottom: 0.5rem;
}

.payment-options-treinta .form-check:last-child {
  margin-bottom: 0;
}

.payment-options-treinta .form-check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.chicken-sales-list-treinta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chicken-sale-item-treinta {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.chicken-sale-item-treinta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #0002;
}

.chicken-sale-header-treinta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.chicken-sale-header-treinta .btn-group {
  display: flex;
  gap: 0.25rem;
}

.chicken-sale-header-treinta .btn-group .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
}

.chicken-sale-header-treinta .btn-group .btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.chicken-sale-header-treinta .btn-group .btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.chicken-sale-header-treinta .btn-group .btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}

.chicken-sale-client-treinta {
  font-weight: 600;
  color: #1F2D3D;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chicken-sale-date-treinta {
  font-size: 0.85rem;
  color: #666;
}

.chicken-sale-details-treinta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.chicken-sale-detail-treinta {
  display: flex;
  flex-direction: column;
}

.chicken-sale-detail-label-treinta {
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.chicken-sale-detail-value-treinta {
  font-weight: 600;
  color: #1F2D3D;
}

.chicken-sale-total-treinta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #e9ecef;
}

.chicken-sale-total-label-treinta {
  font-weight: 600;
  color: #1F2D3D;
}

.chicken-sale-total-amount-treinta {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1F2D3D;
}

.chicken-sale-payment-treinta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666;
}

.chicken-sale-payment-treinta.cash {
  color: #28a745;
}

.chicken-sale-payment-treinta.credit {
  color: #ffc107;
}

/* Modo oscuro para pollos */
.dark-mode .chicken-config-treinta,
.dark-mode .chicken-sale-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .chicken-stats-treinta .stat-card-treinta {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  border-color: #4a5568;
  color: #eaf6ff;
}

.dark-mode .chicken-stats-treinta .stat-value {
  color: #eaf6ff;
}

.dark-mode .chicken-stats-treinta .stat-label {
  color: #b0b8c1;
}

.dark-mode .calculation-display-treinta,
.dark-mode .payment-options-treinta {
  background: #2d3748;
  border-color: #4a5568;
  color: #eaf6ff;
}

.dark-mode .calculation-item {
  border-color: #4a5568;
}

.dark-mode .calculation-item .total-amount {
  color: #eaf6ff;
}

.dark-mode .chicken-sale-item-treinta {
  background: #23272b;
  border-color: #444;
  color: #eaf6ff;
}

.dark-mode .chicken-sale-client-treinta {
  color: #eaf6ff;
}

.dark-mode .chicken-sale-date-treinta {
  color: #b0b8c1;
}

.dark-mode .chicken-sale-detail-label-treinta {
  color: #b0b8c1;
}

.dark-mode .chicken-sale-detail-value-treinta {
  color: #eaf6ff;
}

.dark-mode .chicken-sale-total-treinta {
  border-color: #444;
}

.dark-mode .chicken-sale-total-label-treinta,
.dark-mode .chicken-sale-total-amount-treinta {
  color: #eaf6ff;
}

.dark-mode .chicken-sale-header-treinta .btn-group .btn {
  border-color: #495057;
}

.dark-mode .chicken-sale-header-treinta .btn-group .btn:hover {
  background-color: #495057;
  border-color: #6c757d;
}

/* Responsive para pollos */
@media (max-width: 768px) {
  .chicken-stats-treinta .row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .chicken-stats-treinta .stat-card-treinta {
    padding: 1rem;
  }
  
  .chicken-stats-treinta .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .chicken-stats-treinta .stat-value {
    font-size: 1.5rem;
  }
  
  .chicken-sale-details-treinta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .chicken-sale-header-treinta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .chicken-stats-treinta .row {
    grid-template-columns: 1fr;
  }
  
  .chicken-stats-treinta .stat-card-treinta {
    padding: 0.75rem;
  }
  
  .chicken-stats-treinta .stat-value {
    font-size: 1.25rem;
  }
  
  .calculation-display-treinta,
  .payment-options-treinta {
    padding: 0.75rem;
  }
}

/* Estilos para el botón de acciones rápidas */
.quick-actions-menu {
  min-width: 250px;
  max-height: 320px;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  padding-bottom: 8px;
  padding-top: 8px;
}

.quick-actions-menu::-webkit-scrollbar {
  width: 6px;
}
.quick-actions-menu::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 6px;
}
.quick-actions-menu .dropdown-header {
  font-weight: 600;
  color: #0d6efd;
  padding: 12px 16px 8px;
  font-size: 0.9rem;
}

/* Botón de acciones rápidas */
#quickActionsBtn {
  border: 2px solid rgba(13, 110, 253, 0.25); /* azul primario traslúcido */
  background: rgba(13, 110, 253, 0.25); /* azul primario traslúcido */
  backdrop-filter: blur(10px);
  color: #fff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(13, 110, 253, 0.18);
}

#quickActionsBtn:hover {
  background: rgba(13, 110, 253, 0.35);
  border-color: rgba(13, 110, 253, 0.5);
  transform: scale(1.05);
}

#quickActionsBtn:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#quickActionsBtn i {
  color: #fff;
}

/* Animación para el menú */
.quick-actions-menu.show {
  animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .quick-actions-menu {
    min-width: 200px;
    font-size: 0.85rem;
  }
  
  .quick-actions-menu .dropdown-item {
    padding: 8px 12px;
  }
  
  #quickActionsBtn {
    width: 40px;
    height: 40px;
  }
}

/* Botón de acciones rápidas fijo en la esquina inferior derecha */
.quick-actions-fixed {
  position: fixed;
  right: 18px;
  bottom: 76px; /* 64px navbar + 12px separación */
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.quick-actions-fixed .btn,
.quick-actions-fixed .dropdown-menu {
  pointer-events: auto;
}

.quick-actions-fixed .btn {
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

@media (max-width: 768px) {
  .quick-actions-fixed {
    right: 10px;
    bottom: 70px;
  }
}

/* Ajuste para que el menú se muestre hacia arriba */
.quick-actions-fixed .dropdown-menu {
  bottom: 52px !important;
  top: auto !important;
  transform: translateY(0) !important;
}

@media (max-width: 768px) {
  .cart-actions-treinta {
    margin-bottom: 16px;
  }
}

/* --- MEJORA: Carrito siempre visible --- */
.cart-content-treinta {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
  position: relative;
  padding: 1rem 1.5rem;
}

.cart-items-treinta {
  flex: 1 1 auto;
  overflow-y: auto;
  margin-bottom: 1rem;
  max-height: 320px;
}

.cart-actions-treinta {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
  width: 100%;
  box-shadow: 0 -2px 8px rgba(31,45,61,0.04);
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

.cart-panel-treinta {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 480px;
  max-height: 80vh;
}

@media (max-width: 991px) {
  .cart-panel-treinta {
    max-height: 60vh;
    min-height: 340px;
  }
  .cart-items-treinta {
    max-height: 180px;
  }
}

@media (max-width: 575px) {
  .cart-panel-treinta {
    max-height: 70vh;
    min-height: 260px;
  }
  .cart-items-treinta {
    max-height: 120px;
  }
  .cart-actions-treinta {
    padding-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  .cart-panel-treinta {
    max-height: 80vh;
    min-height: 200px;
  }
  .cart-items-treinta {
    max-height: 90px;
  }
}
/* --- FIN MEJORA --- */

/* === Estilos Temu para sección de ventas === */
.sales-temu-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: none;
}
.products-grid-temu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1.2rem 0.5rem 2rem 0.5rem;
}
.product-card-temu {
  background: rgba(255,255,255,0.85);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(13,110,253,0.10);
  border: 1.5px solid rgba(13,110,253,0.10);
  padding: 1rem 0.7rem 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.18s, border 0.18s, transform 0.15s;
  cursor: pointer;
  position: relative;
}
.product-card-temu:hover {
  box-shadow: 0 8px 32px rgba(13,110,253,0.18);
  border: 1.5px solid #0d6efd33;
  transform: translateY(-2px) scale(1.03);
}
.product-card-temu img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  background: #f3f6fa;
}
.product-card-temu .product-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1976d2;
  text-align: center;
  margin-bottom: 0.2rem;
}
.product-card-temu .product-price {
  color: #0d6efd;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}
.product-card-temu .product-stock {
  color: #6c757d;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}
.product-card-temu .add-to-cart-btn {
  margin-top: 0.3rem;
  border-radius: 8px;
  background: linear-gradient(90deg, #1976d2 0%, #0d6efd 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 0.5rem 1.1rem;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(13,110,253,0.10);
  transition: background 0.15s, box-shadow 0.15s;
}
.product-card-temu .add-to-cart-btn:hover {
  background: linear-gradient(90deg, #0d6efd 0%, #1976d2 100%);
}

/* Botón flotante de carrito */
.floating-cart-btn {
  position: fixed;
  top: 50%;
  right: 1.2rem;
  transform: translateY(-50%);
  z-index: 1202;
  background: rgba(13,110,253,0.18);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(13,110,253,0.13);
  color: #0d6efd;
  font-size: 2rem;
  transition: background 0.18s, box-shadow 0.18s;
  overflow: visible;
}
.floating-cart-btn:hover {
  background: rgba(13,110,253,0.28);
  box-shadow: 0 8px 32px rgba(13,110,253,0.18);
}
.cart-count-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  background: #dc3545;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 50%;
  padding: 0.13em 0.45em;
  min-width: 22px;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(220,53,69,0.13);
  z-index: 1;
}

/* Drawer/cortina del carrito */
.cart-drawer-temu {
  position: fixed;
  top: 0;
  right: -100vw;
  width: 100vw;
  max-width: 420px;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  box-shadow: -8px 0 32px rgba(13,110,253,0.13);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(.77,0,.18,1);
  border-radius: 24px 0 0 24px;
  overflow: hidden;
}
.cart-drawer-temu.open {
  right: 0;
}
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.2rem 0.7rem 1.2rem;
  border-bottom: 1.5px solid #e3eafc;
  background: none;
}
.cart-drawer-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1976d2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-close-cart {
  background: none;
  border: none;
  color: #6c757d;
  font-size: 1.3rem;
  border-radius: 50%;
  padding: 0.3rem 0.5rem;
  transition: background 0.15s;
}
.btn-close-cart:hover {
  background: #e3eafc;
  color: #0d6efd;
}
.cart-drawer-form {
  padding: 1rem 1.2rem 0.5rem 1.2rem;
  border-bottom: 1.5px solid #e3eafc;
  background: none;
}
.cart-drawer-products {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.2rem 0.5rem 1.2rem;
  background: none;
}
.cart-drawer-footer {
  padding: 1.1rem 1.2rem 1.2rem 1.2rem;
  background: rgba(13,110,253,0.07);
  border-top: 1.5px solid #e3eafc;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 -2px 8px rgba(13,110,253,0.04);
}
.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0d6efd;
  margin-bottom: 0.7rem;
}
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(31,45,61,0.18);
  z-index: 1299;
  display: none;
  transition: opacity 0.25s;
}
.cart-drawer-overlay.open {
  display: block;
  opacity: 1;
}

@media (max-width: 575px) {
  .products-grid-temu {
    gap: 0.7rem;
    padding: 0.7rem 0.1rem 1.2rem 0.1rem;
  }
  .cart-drawer-temu {
    max-width: 100vw;
    border-radius: 18px 0 0 18px;
  }
  .cart-drawer-header, .cart-drawer-form, .cart-drawer-products, .cart-drawer-footer {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .floating-cart-btn {
    right: 0.5rem;
    width: 54px;
    height: 54px;
    font-size: 1.5rem;
  }
}

.dark-mode .cart-drawer-temu {
  background: rgba(30,34,44,0.97);
  box-shadow: -8px 0 32px rgba(13,110,253,0.18);
}
.dark-mode .cart-drawer-title {
  color: #4ea8ff;
}
.dark-mode .cart-drawer-footer {
  background: rgba(13,110,253,0.13);
}
.dark-mode .cart-drawer-total {
  color: #4ea8ff;
}
.dark-mode .floating-cart-btn {
  background: rgba(13,110,253,0.22);
  color: #4ea8ff;
}
.dark-mode .floating-cart-btn:hover {
  background: rgba(13,110,253,0.32);
}
/* === FIN Estilos Temu === */

/* Cuando el drawer está abierto, el botón de acciones rápidas queda detrás */
.cart-drawer-temu.open ~ .quick-actions-fixed {
  z-index: 1000 !important;
}

/* Asegurar que los modales y alertas de SweetAlert2 estén sobre el drawer del carrito */
.swal2-container, .swal2-popup, .swal2-modal, .swal2-shown {
  z-index: 2000 !important;
}

/* Estilos para tarjetas de ganancias */
.stat-card-profit {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 1px solid #c3e6cb;
}

.stat-card-profit .stat-icon {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-card-profit .stat-value {
  color: #155724;
}

.stat-card-profit .stat-label {
  color: #155724;
}

/* Estilos para el cálculo automático con ganancias */
.profit-amount {
  color: #28a745;
  font-weight: 600;
}

/* Efecto borroso traslúcido para ganancias */
.blur-profit {
  filter: blur(3px);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.blur-profit.revealed {
  filter: blur(0);
  opacity: 1;
}

/* Estilos para botones de mostrar/ocultar */
.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.btn-outline-secondary:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Transición suave para elementos con efecto borroso */
.blur-profit {
  transition: all 0.3s ease;
}

/* Modo oscuro para tarjetas de ganancias */
.dark-mode .stat-card-profit {
  background: linear-gradient(135deg, #1e4d2b 0%, #2d5a3d 100%);
  border-color: #2d5a3d;
}

.dark-mode .stat-card-profit .stat-value {
  color: #d4edda;
}

.dark-mode .stat-card-profit .stat-label {
  color: #c3e6cb;
}

.dark-mode .profit-amount {
  color: #20c997;
}

/* === ESTILOS PARA MOVIMIENTOS Y ESTADÍSTICAS AVANZADAS === */

/* Header minimalista */
.movements-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem 0;
  margin: -1.5rem -1.5rem 2rem -1.5rem;
  border-radius: 0 0 24px 24px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-left .header-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin: 0;
  letter-spacing: -0.5px;
}

.header-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0.5rem 0 0 0;
  font-weight: 400;
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-clear-filters,
.btn-export {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 12px;
  padding: 0.75rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-clear-filters:hover,
.btn-export:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: white;
}

/* Filtros superiores */
.period-filters {
  margin-bottom: 2rem;
}

.filter-tabs {
  display: flex;
  background: #f8f9fa;
  border-radius: 16px;
  padding: 0.5rem;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-tab.active {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.filter-tab:hover:not(.active) {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

/* Selector de fechas personalizadas */
.custom-date-selector {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.date-inputs {
  display: flex;
  gap: 1rem;
  align-items: end;
}

.date-input-group {
  flex: 1;
}

.date-input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.date-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.date-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-apply-filter {
  background: #667eea;
  border: none;
  color: white;
  border-radius: 12px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-apply-filter:hover {
  background: #5a6fd8;
  transform: translateY(-2px);
}

/* Métricas principales */
.metrics-overview {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.metric-card.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.metric-card.primary .metric-value,
.metric-card.primary .metric-label,
.metric-card.primary .metric-amount {
  color: white;
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.metric-card.primary .metric-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.metric-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.metric-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.metric-toggle i {
  font-size: 14px;
}

.metric-subtitle {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
  font-weight: 400;
}

.hidden-revenue {
  filter: blur(4px);
  user-select: none;
  transition: filter 0.3s ease;
}

.metric-card.primary .metric-value.hidden-revenue {
  color: rgba(255, 255, 255, 0.7);
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.metric-label {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.metric-amount {
  font-size: 1.2rem;
  font-weight: 600;
  color: #667eea;
}

/* Gráficas */
.charts-section {
  margin-bottom: 3rem;
}

.chart-container {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.chart-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.chart-controls {
  display: flex;
  gap: 0.5rem;
}

.chart-control {
  background: #f8f9fa;
  border: none;
  border-radius: 12px;
  padding: 0.75rem;
  color: #6c757d;
  transition: all 0.3s ease;
  cursor: pointer;
}

.chart-control.active {
  background: #667eea;
  color: white;
}

.chart-control:hover:not(.active) {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.chart-content {
  position: relative;
  height: 300px;
}

/* Timeline de movimientos */
.movements-timeline {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.timeline-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.timeline-count {
  background: #f8f9fa;
  color: #6c757d;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.timeline-content {
  max-height: 500px;
  overflow-y: auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1rem;
  background: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: #667eea;
  border-radius: 0 2px 2px 0;
}

.timeline-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.timeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.timeline-content-info {
  flex: 1;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.timeline-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.timeline-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: #667eea;
  margin-left: auto;
}

.timeline-amount.positive {
  color: #38a169;
}

.timeline-amount.negative {
  color: #e53e3e;
}

/* Modo oscuro */
[data-theme="dark"] .movements-header {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

[data-theme="dark"] .filter-tabs {
  background: #2d3748;
}

[data-theme="dark"] .filter-tab {
  color: #a0aec0;
}

[data-theme="dark"] .filter-tab.active {
  background: #4a5568;
  color: #667eea;
}

[data-theme="dark"] .custom-date-selector,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .chart-container,
[data-theme="dark"] .movements-timeline {
  background: #2d3748;
  color: white;
}

[data-theme="dark"] .metric-value,
[data-theme="dark"] .chart-title,
[data-theme="dark"] .timeline-title {
  color: white;
}

[data-theme="dark"] .metric-label,
[data-theme="dark"] .timeline-subtitle {
  color: #a0aec0;
}

[data-theme="dark"] .timeline-item {
  background: #4a5568;
}

[data-theme="dark"] .timeline-item:hover {
  background: #5a6fd8;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header-title {
    font-size: 2rem;
  }
  
  .metrics-overview {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .metric-card {
    padding: 1.5rem;
  }
  
  .metric-value {
    font-size: 2rem;
  }
  
  .filter-tabs {
    flex-wrap: wrap;
  }
  
  .filter-tab {
    min-width: calc(50% - 0.25rem);
  }
  
  .date-inputs {
    flex-direction: column;
  }
  
  .chart-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .timeline-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .timeline-amount {
    margin-left: 0;
    align-self: flex-end;
  }
}

.movement-title-treinta {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.25rem;
}

.movement-subtitle-treinta {
  font-size: 0.9rem;
  color: #6c757d;
}

.movement-amount-treinta {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
}

.movement-amount-treinta.positive {
  color: #28a745;
}

.movement-amount-treinta.negative {
  color: #dc3545;
}

/* Botón de limpiar filtros */
#btnClearFilters {
  animation: fadeIn 0.3s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
  .quick-filters-treinta .btn-group {
    flex-direction: column;
  }
  
  .quick-filters-treinta .btn {
    border-radius: var(--radius) !important;
    margin-bottom: 0.25rem;
  }
  
  .movement-stats-treinta .row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .charts-container-treinta .row {
    grid-template-columns: 1fr;
  }
  
  .chart-card-treinta {
    padding: 1rem;
  }
  
  .movements-list-treinta.grid-view {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .movement-stats-treinta .row {
    grid-template-columns: 1fr;
  }
  
  .movement-item-treinta {
    padding: 0.75rem;
  }
  
  .movement-header-treinta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .movement-content-treinta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .movement-amount-treinta {
    text-align: left;
  }
}

/* Dark mode */
.dark-mode .custom-filters-treinta,
.dark-mode .month-selector-treinta {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .chart-card-treinta {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .chart-title {
  color: #e2e8f0;
}

.dark-mode .movement-item-treinta {
  background: #2d3748;
  border-color: #4a5568;
}

.dark-mode .movement-title-treinta {
  color: #e2e8f0;
}

.dark-mode .movement-subtitle-treinta {
  color: #a0aec0;
}

.dark-mode .movement-date-treinta {
  color: #a0aec0;
}

.dark-mode .movement-type-badge.sale {
  background: #22543d;
  color: #9ae6b4;
}

.dark-mode .movement-type-badge.debt {
  background: #742a2a;
  color: #feb2b2;
}

.dark-mode .movement-type-badge.payment {
  background: #2a4365;
  color: #90cdf4;
}

.dark-mode .movement-type-badge.chicken {
  background: #744210;
  color: #faf089;
}

/* Animaciones */
@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.movement-item-treinta {
  animation: slideInFromRight 0.3s ease-out;
}

.movement-item-treinta:nth-child(1) { animation-delay: 0.1s; }
.movement-item-treinta:nth-child(2) { animation-delay: 0.2s; }
.movement-item-treinta:nth-child(3) { animation-delay: 0.3s; }
.movement-item-treinta:nth-child(4) { animation-delay: 0.4s; }
.movement-item-treinta:nth-child(5) { animation-delay: 0.5s; }

/* Loading states */
.chart-card-treinta.loading {
  position: relative;
  min-height: 200px;
}

.chart-card-treinta.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #0d6efd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Tooltips personalizados */
.chart-tooltip {
  background: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 0.875rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Scrollbar personalizado para movimientos */
.movements-list-treinta::-webkit-scrollbar {
  width: 6px;
}

.movements-list-treinta::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.movements-list-treinta::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.movements-list-treinta::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.dark-mode .movements-list-treinta::-webkit-scrollbar-track {
  background: #4a5568;
}

.dark-mode .movements-list-treinta::-webkit-scrollbar-thumb {
  background: #718096;
}

.dark-mode .movements-list-treinta::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* === Estilos para selector de clientes con búsqueda integrada === */
.search-option {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  font-style: italic;
  border-bottom: 1px solid #dee2e6;
}

.search-option:hover {
  background-color: #e9ecef !important;
}

.dark-mode .search-option {
  background-color: #2d3748 !important;
  color: #a0aec0 !important;
  border-bottom-color: #4a5568;
}

.dark-mode .search-option:hover {
  background-color: #4a5568 !important;
}

/* Estilos para el modal de búsqueda */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-modal.show {
  display: flex;
}

.search-modal-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dark-mode .search-modal-content {
  background: #2d3748;
  color: #f7fafc;
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.dark-mode .search-modal-header {
  border-bottom-color: #4a5568;
}

.search-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.search-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.search-modal-close:hover {
  background-color: #f8f9fa;
  color: #495057;
}

.dark-mode .search-modal-close:hover {
  background-color: #4a5568;
  color: #f7fafc;
}

.search-input-container {
  position: relative;
  margin-bottom: 15px;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.dark-mode .search-input {
  background-color: #4a5568;
  border-color: #718096;
  color: #f7fafc;
}

.dark-mode .search-input:focus {
  border-color: #4ea8ff;
  box-shadow: 0 0 0 0.2rem rgba(78, 168, 255, 0.25);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

.dark-mode .search-icon {
  color: #a0aec0;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.dark-mode .search-results {
  border-color: #4a5568;
}

.search-result-item {
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item.selected {
  background-color: #e3f2fd;
  color: #0d6efd;
}

.dark-mode .search-result-item {
  border-bottom-color: #4a5568;
}

.dark-mode .search-result-item:hover {
  background-color: #4a5568;
}

.dark-mode .search-result-item.selected {
  background-color: #2c5282;
  color: #4ea8ff;
}

.client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-details {
  font-size: 0.875rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark-mode .client-details {
  color: #a0aec0;
}

.client-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.client-actions .btn {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.client-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode .client-actions .btn {
  border-color: #4a5568;
  color: #a0aec0;
}

.dark-mode .client-actions .btn:hover {
  background-color: #4a5568;
  border-color: #718096;
  color: #f7fafc;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #6c757d;
  font-style: italic;
}

.dark-mode .no-results {
  color: #a0aec0;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .search-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .search-input {
    font-size: 16px; /* Previene zoom en iOS */
  }
}