 * { box-sizing: border-box; }


    body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      background-color: #111;
      color: #fff;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      overflow-x: hidden;
    }
    
    bodyHist {
      margin: 0;
      font-family: Arial, sans-serif;
      background-color: #121212;
      color: white;
      display: flex;
      height: 100vh;
    }
    h1 {
      text-align: center;
      margin-bottom: 30px;
      font-size: 28px;
    }

    .container {
      background-color: #1e1e1e;
      padding: 20px;
      border-radius: 15px;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
      margin-top: 50px;
      flex-grow: 1;
    }

    .sidebar {
      width: 80px;
      background: #1a1a1a;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding-top: 1rem;
      position: fixed;
      height: 100%;
    }

    .tooltip {
      position: relative;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .tooltip .tooltip-text {
      visibility: hidden;
      background-color: #333;
      color: #fff;
      text-align: center;
      padding: 6px 10px;
      border-radius: 6px;
      position: absolute;
      top: 100%;
      transform: translateY(-50%);
      white-space: nowrap;
      z-index: 1;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
      font-size: 13px;
      pointer-events: none;
    }

    .tooltip:hover .tooltip-text {
      visibility: visible;
      opacity: 1;
    }

    .sidebar button {
      background: none;
      border: none;
      color: #aaa;
      margin: 1rem 0;
      cursor: pointer;
      font-size: 20px;
      width: 100%; /* Aseguramos que todos los botones tengan el mismo ancho */
      text-align: center;
      padding: 10px 0; /* Aseguramos que el tamaño del botón sea consistente */
    }

    .main {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      padding: 1rem 2rem 2rem 100px;
      gap: 2rem;
      flex: 1; /* NUEVO: asegura que ocupe toda la altura disponible */
    }

    .main_inv {
      flex: 1;
      padding: 2rem;
      overflow-y: auto;
      padding: 1rem 2rem 2rem 100px;
    }
    

    .menu-section {
      flex: 2;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 1rem;
    }

    .card {
      background-color: #222;
      border-radius: 12px;
      padding: 10px;
      cursor: pointer;
      text-align: center;
      transition: all 0.2s ease;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    .card:hover {
      transform: scale(1.05);
      background-color: #2a2a2a;
    }

    .card img {
      width: 100%;
      border-radius: 10px;
      height: 140px;
      object-fit: cover;
    }

    .ticket-section {
      flex: 1;
      background: #f9f9f9;
      color: #333;
      border-radius: 18px;
      padding: 2rem;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
      min-width: 280px;
    }

    .ticket-section h2 {
      text-align: center;
      font-size: 26px;
      margin-bottom: 1.5rem;
      color: #222;
      padding-bottom: 0.5rem;
      border-bottom: 2px solid #ddd;
    }

    .ticket-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid #e0e0e0;
      font-size: 15px;
    }
    
    .btn-eliminar {
      background-color: transparent;
      border: none;
      font-size: 18px;
      cursor: pointer;
      padding: 0 5px;
      transition: color 0.3s ease;
    }

    .btn-eliminar:hover {
      color: darkgray;
    }


    .ticket-buttons {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin-top: 1.5rem;
    }

    .ticket-buttons button {
      background: linear-gradient(135deg, #444, #222);
      color: #fff;
      border: none;
      padding: 0.75rem 1rem;
      border-radius: 12px;
      font-size: 15px;
      font-weight: bold;
      transition: all 0.3s ease;
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
      width: 100%;
    }

    .ticket-buttons button:hover {
      background: linear-gradient(135deg, #555, #333);
      transform: translateY(-2px);
    }

    #total {
      margin-top: 1.5rem;
      font-size: 18px;
      font-weight: bold;
      text-align: right;
      color: #000;
      border-top: 2px solid #ccc;
      padding-top: 1rem;
    }

    .logout-btn, .menu_lateral {
      background-color: #e53935;
      color: white;
      padding: 10px 0;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      font-size: 20px;
      margin-top: auto;
      transition: background-color 0.3s ease;
      width: 100%;
      text-align: center;
    }

    .menu_lateral:hover {
      background-color: #ffc65d;
    }
    .logout-btn:hover  {
      background-color: #e53935;
    }

    
    table {
      width: 100%;
      border-collapse: collapse;
    }

    th, td {
      padding: 12px 15px;
      text-align: left;
      border-bottom: 1px solid #333;
      vertical-align: top;
    }

    th {
      background-color: #2c2c2c;
    }

    tr:hover {
      background-color: #2a2a2a;
    }
    .search-box {
      margin-bottom: 20px;
      display: flex;
      justify-content: flex-end;
    }

    .search-box input {
      padding: 10px;
      width: 300px;
      border: none;
      border-radius: 8px;
      background-color: #2c2c2c;
      color: white;
    }
    form {
      background-color: #1e1e1e;
      padding: 1.5rem;
      border-radius: 12px;
    }
    .formUser, .modal-content {
      background-color: #1e1e1e;
      padding: 30px;
      border-radius: 15px;
      box-shadow: 0 0 10px rgba(0,0,0,0.4);
      margin-bottom: 30px;
    }

    

    form label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: bold;
    }

    form input {
      margin-bottom: 1rem;
      padding: 10px;
      width: 100%;
      border: none;
      border-radius: 8px;
      background-color: #2c2c2c;
      color: white;
    }

    form button {
      color: #fff;
      border: none;
      padding: 0.75rem 1rem;
      border-radius: 12px;
      font-size: 15px;
      font-weight: bold;
      cursor: pointer;
      width: 100%;
    }

    form button:hover {
      background: linear-gradient(135deg, #555, #333);
    }
    .logout-btn {
      background-color: #e53935;
      color: white;
      padding: 10px 0;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      font-size: 18px;
      margin-top: auto;
      margin-bottom: 1rem;
      width: 80%;
      text-align: center;
    }

    button[type="submit"] {
      padding: 8px 15px;
      background-color: #e2a946;
      border: none;
      border-radius: 8px;
      color: black;
      font-weight: bold;
      font-size: 16px;
      cursor: pointer;
    }
    button[type="submit"]:hover {
      background-color: #d8961d;
    }
    .editar {
      background-color: #4caf50;
      border: none;
      padding: 5px 10px;
      border-radius: 6px;
      cursor: pointer;
    }

    .editar:hover {
      background-color: #45a049;
    }

    .eliminar {
      background-color: #f44336;
      border: none;
      padding: 5px 10px;
      border-radius: 6px;
      cursor: pointer;
    }

    .eliminar:hover {
      background-color: #e53935;
    }
    input, select {
      width: 100%;
      padding: 10px;
      margin-bottom: 15px;
      border: none;
      border-radius: 8px;
      background-color: #2c2c2c;
      color: white;
    }

    button[type="submit"] {
      padding: 8px 15px;
      background-color: #e2a946;
      border: none;
      border-radius: 8px;
      color: black;
      font-weight: bold;
      font-size: 16px;
      cursor: pointer;
    }
     /* Modal */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0; top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.6);
    }

    .modal-content {
      margin: 10% auto;
      padding: 20px;
      width: 400px;
      background-color: #1e1e1e;
      border-radius: 10px;
    }

    .modal-header {
      font-size: 20px;
      margin-bottom: 15px;
      text-align: center;
    }

    .modal-buttons {
      display: flex;
      justify-content: space-between;
    }
    button[type="submit"] {
      padding: 8px 15px;
      background-color: #e2a946;
      border: none;
      border-radius: 8px;
      color: black;
      font-weight: bold;
      font-size: 16px;
      cursor: pointer;
    }
    button[type="submit"]:hover {
      background-color: #d8961d;
    }
    .button_modal {
  padding: 8px 15px;
  background-color: #e2a946;
  border: none;
  border-radius: 8px;
  color: black;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  margin-right: 10px; /* espacio entre botones */
}

.button_modal:hover {
  background-color: #d8961d;
}


    .login {
      background-color: #121212;
      color: white;
      font-family: Arial, sans-serif;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
      padding: 0 15px;
    }

    .login-container {
      text-align: center;
      background-color: #1e1e1e;
      padding: 40px 20px;
      border-radius: 15px;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
      width: 90%;
      max-width: 400px;
    }

    .login-container img {
      width: 150px;
      height: 150px;
      margin-bottom: 20px;
    }
    .login_h1 {
      font-size: 24px;
      margin-bottom: 10px;
    }
    .login_p {
      color: #ccc;
      margin-bottom: 30px;
    }
    .watermark {
  position: absolute;
  bottom: 10px;
  text-align: center;
  width: 100%;
  font-size: 12px;
  color: #666;
}


    
    








    






    @media (max-width: 768px) {
        
        body {
        flex-direction: column;
        overflow: auto;
        }
        .sidebar {
  flex-direction: row;
  width: 100%;
  height: auto;
  padding: 0.5rem 0;
  justify-content: space-around;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #1a1a1a;
;
  z-index: 1000;
}


  .sidebar button {
    font-size: 22px;
    padding: 8px;
    margin: 0;
  }
      
      

      .main {
        flex-direction: column;
        padding: 80px 1rem 1rem;
        margin-left: 0;
      }

      .menu-section, .ticket-section {
        width: 100%;
      }

      .ticket-buttons {
        flex-direction: column;
      }

      #total {
        text-align: center;
      }
      .search-box {
      justify-content: center;
    }

    .search-box input {
      width: 100%;
      max-width: 100%;
    }

    .container {
      margin-top: 20px;
      padding: 15px;
    }

    h1 {
      font-size: 22px;
    }
    h1 {
        font-size: 22px;
        text-align: center;
    }

    form h2 {
        font-size: 18px;
        margin-top: 0;
    }
     button[type="submit"] {
    font-size: 15px;
    padding: 10px;
  }

  form {
      background-color: #1e1e1e;
      padding: 1.5rem;
      border-radius: 12px;
    }

    form label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: bold;
    }

    form input {
      margin-bottom: 1rem;
      padding: 10px;
      width: 100%;
      border: none;
      border-radius: 8px;
      background-color: #2c2c2c;
      color: white;
    }

    form button {
      color: #fff;
      border: none;
      padding: 0.75rem 1rem;
      border-radius: 12px;
      font-size: 15px;
      font-weight: bold;
      cursor: pointer;
      width: 100%;
    }

    form button:hover {
      background: linear-gradient(135deg, #555, #333);
    }



    .main_inv {
    padding: 1rem;
    height: auto;
    margin-top: 60px; /* o el alto de tu barra fija */
  }

    }








    @media (max-width: 480px) {
    h1 {
      font-size: 18px;
    }

    th, td {
      padding: 8px 10px;
      font-size: 14px;
    }

    .search-box input {
      padding: 8px;
    }
    
  .modal-content {
    width: 90%;
  }
  }




















  