 body {
      background-color: #fadbd8;
      font-family: 'Segoe UI', sans-serif;
    }

    .top-bar {
      background-color: #f8d3e4;
      padding: 0.5rem 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .btn-auth {
      background-color: #d48ca2;
      color: white;
      font-weight: bold;
      margin-left: 0.5rem;
    }

    .local-info {
      background-color: #fff0fb;
      border-radius: 1rem;
      padding: 1rem;
      margin-top: 1rem;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .local-info img {
      width: 100%;
      border-radius: 1rem;
      margin-bottom: 1rem;
    }

  

    .producto-card {
      background: white;
      padding: 1rem;
      border-radius: 1rem;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .producto-info {
      flex: 1;
    }

    .producto-imagen {
      width: 35%;
      flex-shrink: 0;
    }

    .producto-imagen img {
      width: 100%;
      height: auto;
      border-radius: 0.5rem;
    }

    .precio {
      color: #b44a75;
      font-weight: bold;
    }

    

    #btnSubir {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background-color: #d48ca2;
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 24px;
      width: 50px;
      height: 50px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      z-index: 9999;
      display: none;
      transition: background-color 0.3s;
    }

    #btnSubir:hover {
      background-color: #b44a75;
    }

    #btnAgregarProducto {
      position: fixed;
      bottom: 90px;
      right: 20px;
      background-color: #28a745;
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 28px;
      width: 56px;
      height: 56px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      z-index: 9999;
      display: none;
      transition: background-color 0.3s;
    }

    #btnAgregarProducto:hover {
      background-color: #218838;
    }

    .preview-thumb {
      cursor: pointer;
      object-fit: cover;
      border: 2px solid #ddd;
      border-radius: 4px;
      transition: all 0.3s ease;
    }

    .preview-thumb.active-thumb {
      border-color: #d48ca2 !important;
      box-shadow: 0 0 0 2px #d48ca2 !important;
      transform: scale(1.05);
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
      background-color: rgba(0, 0, 0, 0.5) !important;
      border-radius: 50%;
      width: 30px;
      height: 30px;
    }

    .admin-controls {
      background-color: #f8f9fa;
      border-radius: 0.5rem;
      padding: 0.75rem;
      margin-bottom: 1rem;
      border: 1px solid #dee2e6;
    }

    .admin-btn {
      font-size: 0.75rem;
      padding: 0.25rem 0.5rem;
      margin: 0.125rem;
    }

    .btn-danger-custom {
      background-color: #dc3545;
      border-color: #dc3545;
      color: white;
    }

    .btn-warning-custom {
      background-color: #ffc107;
      border-color: #ffc107;
      color: #000;
    }

    .btn-success-custom {
      background-color: #198754;
      border-color: #198754;
      color: white;
    }

    .btn-primary-custom {
      background-color: #0d6efd;
      border-color: #0d6efd;
      color: white;
    }

    .btn-save-changes {
      background-color: #28a745;
      border-color: #28a745;
      color: white;
      font-weight: bold;
    }

    .hidden-file-input {
      display: none;
    }

    .changes-indicator {
      background-color: #fff3cd;
      border: 1px solid #ffeaa7;
      border-radius: 0.25rem;
      padding: 0.5rem;
      margin-top: 0.5rem;
      font-size: 0.8rem;
      color: #856404;
    }

    #btnCarrito {
      position: fixed;
      bottom: 160px;
      right: 20px;
      background-color: #b44a75;
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 28px;
      width: 56px;
      height: 56px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      z-index: 9999;
      display: block;
      transition: background-color 0.3s;
    }

    #btnCarrito:hover {
      background-color: #d48ca2;
    }

    #carritoCantidad {
      position: absolute;
      top: 6px;
      right: 8px;
      background: #dc3545;
      color: #fff;
      border-radius: 50%;
      font-size: 0.9em;
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
      z-index: 10000;
    }


    /* Estados de conexión a base de datos */
    .db-status {
      position: fixed;
      top: 10px;
      left: 10px;
      padding: 0.25rem 0.5rem;
      border-radius: 0.25rem;
      font-size: 0.8rem;
      z-index: 1040;
    }

    .db-connected {
      background-color: #d4edda;
      color: #155724;
      border: 1px solid #c3e6cb;
    }

    .db-error {
      background-color: #f8d7da;
      color: #721c24;
      border: 1px solid #f5c6cb;
    }

    /* Responsive mejoras */
    @media (max-width: 768px) {
      .producto-card {
        flex-direction: column;
        text-align: center;
      }

      .producto-imagen {
        width: 100%;
        max-width: 200px;
      }
    }

    /* Loading states */
    .loading {
      opacity: 0.6;
      pointer-events: none;
    }

    .loading::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 20px;
      height: 20px;
      margin: -10px 0 0 -10px;
      border: 2px solid #d48ca2;
      border-radius: 50%;
      border-top-color: transparent;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* Error states */
    .error-message {
      background-color: #f8d7da;
      color: #721c24;
      padding: 1rem;
      border-radius: 0.5rem;
      border: 1px solid #f5c6cb;
      margin: 1rem 0;
    }

    /* Success states */
    .success-message {
      background-color: #d4edda;
      color: #155724;
      padding: 1rem;
      border-radius: 0.5rem;
      border: 1px solid #c3e6cb;
      margin: 1rem 0;
    }

    #modalCarrito .modal-body {
      max-height: 350px;
      overflow-y: auto;
      scrollbar-width: thin;
    }

    /* NUEVO: para el selector de color en el modal */
    .color-select-label {
      font-weight: bold;
      margin-bottom: 0.25rem;
      display: block;
    }

    .color-select-msg {
      color: #b44a75;
      font-size: 0.95em;
      margin-top: 0.5rem;
      margin-bottom: 0.5rem;
      background: #fff0fb;
      border-radius: 0.5rem;
      padding: 0.5rem;
    }

    /* MODAL VENTAS DISEÑO WHATSAPP */
    .ventas-modal-wsp {
      border-radius: 1.2rem;
      background: #f9f6ff;
      box-shadow: 0 8px 32px rgba(180, 74, 117, 0.12);
      overflow: hidden;
      border: none;
    }

    .ventas-modal-bar {
      background: linear-gradient(90deg, #b44a75 0%, #d48ca2 100%);
      color: #fff;
      padding: 1.1em 1.5em 1.1em 1.5em;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 1.25em;
      font-weight: bold;
      letter-spacing: 0.5px;
      border-bottom-left-radius: 1.2rem;
      border-bottom-right-radius: 1.2rem;
      box-shadow: 0 2px 8px rgba(180, 74, 117, 0.10);
    }

    .ventas-modal-bar-title {
      font-size: 1.1em;
      letter-spacing: 1px;
    }

    .ventas-modal-bar-total {
      font-size: 1.2em;
      background: #fff;
      color: #b44a75;
      border-radius: 0.7em;
      padding: 0.2em 1.1em;
      font-weight: bold;
      box-shadow: 0 2px 8px rgba(180, 74, 117, 0.08);
    }

    .ventas-modal-title {
      color: #b44a75;
      font-weight: bold;
      font-size: 1.1em;
      margin-top: 0.5em;
    }

    .ventas-modal-body {
      background: #f9f6ff;
      padding: 1.2em 1.5em 1.2em 1.5em;
      min-height: 350px;
      max-height: 60vh;
      overflow-y: auto;
    }

    .ventas-modal-historial-title {
      font-weight: bold;
      color: #b44a75;
      margin: 1.2em 0 0.7em 0;
      font-size: 1.08em;
      letter-spacing: 0.5px;
    }

    #ventasHistorial .venta-card {
      display: flex;
      align-items: center;
      gap: 1.1rem;
      border-radius: 1rem;
      margin-bottom: 1rem;
      background: #eafaf1;
      border-left: 7px solid #1abc9c;
      padding: 0.7rem 1rem;
      min-height: 80px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
      transition: box-shadow 0.2s;
    }

    #ventasHistorial .venta-card.retiro {
      background: #ffeaea;
      border-left: 7px solid #e74c3c;
    }

    #ventasHistorial .venta-img {
      width: 60px;
      height: 60px;
      object-fit: cover;
      border-radius: 0.7rem;
      border: 1px solid #eee;
    }

    #ventasHistorial .venta-info {
      flex: 1;
      font-size: 1em;
    }

    #ventasHistorial .venta-tipo {
      font-weight: bold;
      color: #1abc9c;
    }

    #ventasHistorial .retiro .venta-tipo {
      color: #e74c3c;
    }

    #ventasResumen {
      background: #fff;
      border-radius: 1rem;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      padding: 1.2rem 1rem 0.5rem 1rem;
      margin-bottom: 0.5rem;
    }

    .resumen-real-row {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1.1rem;
      border-bottom: 1px solid #f0f0f0;
      padding-bottom: 0.7rem;
    }

    .resumen-real-row:last-child {
      border-bottom: none;
    }

    .resumen-real-img {
      width: 55px;
      height: 55px;
      object-fit: cover;
      border-radius: 0.7rem;
      border: 1px solid #eee;
    }

    .resumen-real-info {
      flex: 1;
    }

    .resumen-real-nombre {
      font-weight: bold;
      font-size: 1.08em;
    }

    .resumen-real-cantidad {
      color: #1abc9c;
      font-weight: bold;
      font-size: 1.1em;
    }

    .resumen-real-color {
      background: #f5f5f5;
      color: #555;
      border-radius: 0.5em;
      padding: 0.1em 0.7em;
      font-size: 0.95em;
      margin-left: 0.5em;
    }

    .resumen-real-precio {
      color: #b44a75;
      font-weight: bold;
    }

    .resumen-real-total {
      color: #0d6efd;
      font-weight: bold;
      font-size: 1.1em;
    }

    .resumen-real-label {
      color: #888;
      font-size: 0.97em;
    }

    .admin-accordion {
      position: fixed;
      top: 170px; /* antes 90px, bajado 40px */
      right: 0;
      z-index: 1050;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      transition: right 0.3s;
    }

    .admin-accordion-toggle {
      background: #b44a75;
      color: #fff;
      border-radius: 1rem 0 0 1rem;
      padding: 10px 14px;
      cursor: pointer;
      margin-bottom: 4px;
      font-size: 1.5rem;
      box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.08);
      user-select: none;
      transition: background-color 0.3s ease, transform 0.2s ease;
    }

    .admin-accordion-toggle:hover {
      background: #d48ca2;
      transform: scale(1.05);
    }

    .admin-accordion-content {
      background: #fff0fb;
      border-radius: 1rem 0 0 1rem;
      box-shadow: 2px 2px 12px rgba(180, 74, 117, 0.08);
      padding: 12px 10px 12px 10px;
      min-width: 120px;
      display: none;
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
      opacity: 0;
      transform: translateX(10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .admin-accordion.open .admin-accordion-content {
      display: flex;
      opacity: 1;
      transform: translateX(0);
    }

    @media (max-width: 768px) {
      .admin-accordion {
        top: 170px;
      }

      .admin-accordion-content {
        min-width: 90px;
        padding: 10px 6px 10px 6px;
      }
    }

    input[type="password"]::-ms-reveal,
    input[type="password"]::-ms-clear {
      display: none;
    }

    @keyframes shake {

      0%,
      100% {
        transform: translateX(0);
      }

      10%,
      30%,
      50%,
      70%,
      90% {
        transform: translateX(-5px);
      }

      20%,
      40%,
      60%,
      80% {
        transform: translateX(5px);
      }
    }

    .login-error-animation {
      animation: shake 0.5s ease-in-out;
    }

    input[type="password"]::-webkit-credentials-auto-fill-button,
    input[type="password"]::-webkit-input-password-reveal-button,
    input[type="password"]::-webkit-input-password-toggle-button {
      display: none !important;
    }

    input[type="password"]::-webkit-input-placeholder {
      color: #888;
    }

    input[type="password"]::-webkit-input-password-reveal {
      display: none !important;
    }

    /* MODAL ADMINISTRAR LOCALES CON ALTURA MÁXIMA */
    #modalLocales .modal-dialog {
      max-height: 90vh;
      max-width: 900px;
    }

    #modalLocales .modal-content {
      max-height: 90vh;
      display: flex;
      flex-direction: column;
    }

    #modalLocales .modal-body {
      overflow: hidden;
      flex: 1;
    }

    /* NUEVOS ESTILOS PARA ADMINISTRACIÓN DE LOCALES */
    .local-card {
      border: 1px solid #e0e6ed;
      border-radius: 8px;
      padding: 1rem;
      margin-bottom: 1rem;
      background: #ffffff;
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .local-card:hover {
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      transition: box-shadow 0.3s ease;
    }

    .preview-imagen {
      border: 2px dashed #dee2e6;
      border-radius: 6px;
      min-height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #6c757d;
      font-size: 0.8rem;
      transition: border-color 0.3s ease;
    }

    .preview-imagen:hover {
      border-color: #b44a75;
    }

    .preview-imagen img {
      border-radius: 4px;
    }

    .local-section {
      background: rgba(var(--bs-primary-rgb), 0.05);
      border-radius: 6px;
      padding: 0.75rem;
      margin-bottom: 0.75rem;
    }

    .btn-guardar-local {
      background: linear-gradient(45deg, #28a745, #20c997);
      border: none;
      color: white;
      font-weight: 500;
      padding: 0.375rem 1rem;
      border-radius: 6px;
      transition: all 0.3s ease;
    }

    .btn-guardar-local:hover {
      background: linear-gradient(45deg, #218838, #1ba085);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    }

    .btn-eliminar-local {
      background: linear-gradient(45deg, #dc3545, #e83e4b);
      border: none;
      color: white;
      font-weight: 500;
      padding: 0.375rem 1rem;
      border-radius: 6px;
      transition: all 0.3s ease;
    }

    .btn-eliminar-local:hover {
      background: linear-gradient(45deg, #c82333, #d73847);
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    }

    .input-whatsapp-container {
      position: relative;
    }

    .input-whatsapp-container .form-control:focus {
      border-color: #25d366;
      box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
    }

    @media (max-width: 768px) {
      #modalLocales .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
      }
      
      .local-card {
        padding: 0.75rem;
      }
    }

    .filtros-box {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-top: 1.5rem;
}

.select-filtros select {
  background-color: #f5dcff;
  color: #000;
  font-weight: 500;
  border: 1px solid #d48ca2;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.select-filtros select:focus {
  border-color: #b44a75;
  box-shadow: 0 0 0 0.2rem rgba(180, 74, 117, 0.25);
  background-color: #f5dcff;
}

.select-filtros label {
  color: #333;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* Estilo para el input de búsqueda */
.filtros-box input[type="text"] {
  background-color: #f8f9fa;
  border: 1px solid #d48ca2;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.filtros-box input[type="text"]:focus {
  border-color: #b44a75;
  box-shadow: 0 0 0 0.2rem rgba(180, 74, 117, 0.25);
  background-color: #fff;
}

.filtros-box input[type="text"]::placeholder {
  color: #888;
  font-style: italic;
}

/* Responsive para filtros */
@media (max-width: 768px) {
  .filtros-box {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    padding: 1rem 0.75rem;
  }
  
  .select-filtros label {
    font-size: 0.9rem;
  }
  
  .select-filtros select {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }
}

/* ...existing code... */

/* ...existing code... */

    #btnSubir {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 9999;
      background: #b44a75;
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      font-size: 20px;
      transition: background 0.3s;
      cursor: pointer;
    }

    #btnSubir:hover {
      background: #d48ca2;
    }

    #btnAgregarProducto {
      position: fixed;
      bottom: 80px;
      right: 20px;
      z-index: 9999;
      background: #28a745;
      color: #fff;
      border: none;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      font-size: 24px;
      transition: background 0.3s;
      cursor: pointer;
    }

    #btnAgregarProducto:hover {
      background: #34ce57;
    }

    .preview-thumb {
      border: 2px solid transparent;
      border-radius: 4px;
      cursor: pointer;
      object-fit: cover;
      transition: border-color 0.2s;
    }

    .preview-thumb:hover {
      border-color: #d48ca2;
    }

    .preview-thumb.active-thumb {
      border-color: #b44a75;
    }

    .btn-auth {
      background: linear-gradient(135deg, #d48ca2 0%, #b44a75 100%);
      color: white;
      border: none;
    }

    .btn-auth:hover {
      background: linear-gradient(135deg, #e499b5 0%, #c85588 100%);
      color: white;
    }

    /* Estilos para notificaciones flotantes */
    .notificacion-flotante {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 10000;
      padding: 12px 20px;
      border-radius: 8px;
      color: white;
      font-weight: 500;
      font-size: 14px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      transform: translateX(100%);
      opacity: 0;
      transition: all 0.3s ease;
      max-width: 300px;
      word-wrap: break-word;
    }

    .notificacion-flotante.show {
      transform: translateX(0);
      opacity: 1;
    }

    .notificacion-success {
      background: linear-gradient(135deg, #28a745, #20c997);
    }

    .notificacion-error {
      background: linear-gradient(135deg, #dc3545, #e91e63);
    }

    .notificacion-info {
      background: linear-gradient(135deg, #17a2b8, #007bff);
    }