*{margin: 0;
padding: 0;
top: 0;
box-sizing: border-box;}

/* ------------------------------
   BASE SIDEBAR
--------------------------------*/
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 99vh;
    width: 240px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar .toggle-btn {
    text-align: center;
    padding: 1rem 0;
    cursor: pointer;
    font-size: 1.5rem;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    display: flex;
    align-items: center;
    padding: 1rem;
    white-space: nowrap;
    transition: background 0.2s;
}

.sidebar ul li:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    width: 100%;
}

.sidebar ul li i {
    font-size: 1.3rem;
    margin-right: 10px;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed ul li span {
    display: none;
}

.sidebar ul li.active a {
    background: rgba(255, 255, 255, 0.2);
    color: #4b519c;
    font-weight: bold;
    border-radius: 12px;
}

/* ------------------------------
   CONTENIDO PRINCIPAL (ESCRITORIO)
--------------------------------*/
.content-area {
    padding: 30px;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
    
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px ;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
    overflow-y: scroll;
    height: 100%;
   
}

.sidebar.collapsed ~ .content-area,
.sidebar.collapsed + .content-area {
    margin-left: 60px !important;
}

/* ------------------------------
   BOTÓN MENU (MOBILE)
--------------------------------*/
.mobile-menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 5px 5px;
    border-radius: 10px;
    z-index: 1001;
    cursor: pointer;
    display: none;
}

.mobile-menu-btn i {
    font-size: 20px;
    color: #000;
}

.desktop-only {
    display: block;
}

/* ------------------------------
   RESPONSIVE (MOBILE)
--------------------------------*/
@media screen and (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 240px;
        background: rgba(255, 255, 255, 0.712);
        backdrop-filter: blur(12px);
        box-shadow: 0 0 10px rgba(0,0,0,0.3);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    .sidebar ul{padding-top: 50px;}

    .sidebar.mobile-active {
        transform: translateX(0);
    }

    .sidebar ul li span {
        display: inline;
    }

    .content-area {
        margin-left: 0 !important;
        padding: 20px;
        border-radius: 0;
    }
}

/* ------------------------------
   ESTILOS OPCIONALES
--------------------------------*/
body.glass {
    background: white;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    height: 99vh;
}

a {
    color: inherit;
    text-decoration: none;
}




  .glass {
        background: rgba(255, 255, 255, 0.65);
        backdrop-filter: blur(16px);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        padding: 16px;
         backdrop-filter: none !important; 
  -webkit-backdrop-filter: none !important;
    }

    .btn, .btn-small {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        font-weight: 500;
        text-decoration: none;
    }

    .btn {
        background-color: #007bff;
        color: white;
    }

    .btn-small {
        font-size: 14px;
        background-color: #2196f3;
        color: white;
    }

    .btn-small.red {
        background-color: #e53935;
    }

    .btn-icon {
        border: none;
        background: none;
        cursor: pointer;
        font-size: 20px;
        color: #333;
        padding: 4px 8px;
        transition: transform 0.2s ease, color 0.3s;
    }

    .btn-icon:hover {
        transform: scale(1.2);
        color: #007bff;
    }

    .btn-icon.red {
        color: #e53935;
    }


/*TABLE*/

    .table-container {
        overflow-x: auto;
        overflow-y: scroll;
        margin-top: 16px;
        height: 60vh;
    }

    .table {
        width: 100%;
        border-collapse: collapse;
    }

    .table th,
    .table td {
        padding: 5px;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        
    }

    .table tr:hover{background: rgba(0, 0, 0, 0.048);
                    transition: all 0.2s ease;}
    .switch {
        position: relative;
        display: inline-block;
        width: 44px;
        height: 24px;
    }

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: 0.4s;
        border-radius: 34px;
    }

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.4s;
        border-radius: 50%;
    }

    input:checked + .slider {
        background-color: #4caf50;
    }

    input:checked + .slider:before {
        transform: translateX(20px);
    }

    /* Responsive Table to Card Style */
@media (max-width: 768px) {
    .table-container {
        overflow-x: hidden;
        overflow-y: visible;
        height: auto;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    

    .table td {
        text-align: right;
        
        border: none;
        position: relative;
        padding-left: 30%;
        font-size: 10px;;
    
        word-wrap: break-word !important;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        color: #555;
        float: right;
        white-space: nowrap;
    }
}



/*PESTAÑAS MESAS*/
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-link.active { filter: brightness(1.1); }




/* ====== PESTAÑAS DEL MÓDULO MESAS ====== */
.tabs-container {
  margin: 20px 0;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.tab-link {
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #3a3a3a;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tab-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.tab-link.active {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Animación suave */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.diagrama-area {
    width: 100%;
    height: 500px; /* Ajusta al tamaño que quieras */
    position: relative;
    background: #f0f0f0;
    border: 1px solid #ccc;
}

.mesa.dragging {
    opacity: 0.7;
    cursor: grabbing;
}
.numero-mesa {
    font-weight: bold;
}
.trabajador-asignado {
    font-size: 0.8em;
}




    /* MODAL CONTENEDOR */

#modal {
  
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background: rgba(230, 230, 230, 0.6); /* fondo semitransparente */
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center; /* Centramos verticalmente */
  z-index: 9999;
  padding: 20px;
  position: fixed;
  overflow-y: auto;
}

/* CONTENIDO DE LA MODAL */
.modal-content {
  background: rgb(255, 255, 255);
  backdrop-filter: blur(16px);
  border-radius: 1rem;
  padding: 2rem;
  color: #222; /* Texto legible */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
}

/* BOTÓN CERRAR */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.3);
  border: none;
  font-size: 1.5rem;
  color: #222;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255,255,255,0.5);
}

/* FORMULARIO GLASS */
.form-glass input,
.form-glass select,
.form-glass textarea {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(36, 36, 36, 0.3);
  border-radius: 0.5rem;
  padding: 0.5rem;
  width: 100%;
  color: #222; /* Texto legible */
  margin-bottom: 5px;
  font-size: 1rem;
  backdrop-filter: blur(8px);
}

.form-glass input::placeholder,
.form-glass textarea::placeholder {
  color: rgba(34, 34, 34, 0.6);
}

input[type="checkbox"] {
  width: auto;
}

.form-glass label {
  margin-bottom: 0.5rem;
  display: block;
  font-weight: bold;
  color: #222;
}

.form-glass .form-group {
  margin-bottom: 0.1rem;
}

/* BOTÓN GUARDAR */
.btn-guardar {
  background: #0d6efd;
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s;
}

.btn-guardar:hover {
  background: #0b5ed7;
}

/* RESPONSIVO */
@media (max-width: 600px) {
  #modal .modal-content {
    padding: 1.5rem;
    max-width: 95%;
    
  }


}

/* ANIMACIÓN */
@keyframes fadeIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/*FINAL MODAL*/


.buscador-container {
    display: flex;
    margin-top: 20px;
}

.input-busqueda {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    color: #3b3b3b;
    font-size: 14px;
    width: 300px;
}


/*Paginación*/
 
.paginacion-controles {
    display: flex;
    
    align-items: center;
    margin-bottom: 1rem;
    margin-top: 1rem;
    padding: 10px;
    gap: 10px;
}

#registros-por-pagina {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 14px;
}

.paginacion {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.pagina-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: rgba(24, 24, 24, 0.616);
    color: rgb(255, 255, 255);
    cursor: pointer;
    transition: background 0.2s;
}

.pagina-btn:hover,
.pagina-btn.activa {
    background: rgba(53, 53, 53, 0.76);
}


.acciones-masivas {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.diagrama-area {
    position: relative; /* importante para que los hijos absolute se posicionen respecto a este contenedor */
    width: 100%;
    height: 500px; /* o el tamaño que quieras para el lienzo */
    border: 2px dashed #ccc;
    background-color: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.mesa {
    position: absolute; /* para que left/top funcionen */
    width: 80px;
    height: 80px;
    background-color: #f39c12;
    border-radius: 10px;
    text-align: center;
    cursor: grab;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mesa.dragging {
    opacity: 0.7;
}

.mesa-item {
  width: 80px;
  height: 80px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  text-align: center;
  line-height: 80px;
  cursor: move;
  user-select: none;
}