/* Reset simple */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    padding: 20px;
  
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
  }
  
  /* Cabecera */
  h1, h2 {
    color: #1a3e6e;
    text-align: center;
  }
  
  h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
  }
  
  h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  /* Enlaces generales */
  a {
    color: #1a3e6e;
    text-decoration: none;
    margin: 0 8px;
    font-weight: 600;
  }
  a:hover {
    color: #0f2448;
    text-decoration: underline;
  }
  
  /* Texto de bienvenida y navegación */
  body > p,
  body > a {
    display: inline-block;
    font-size: 1rem;
    margin: 0 5px;
    max-width: 800px;
    width: 100%;
    text-align: center;
  }
  
  /* Mensaje de usuario */
  body > p {
    background-color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    margin-bottom: 20px;
  }
  
  /* Botones y enlaces destacados */
  body > a,
  body > a + a {
    background-color: #1a3e6e;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    transition: background-color .3s ease;
  }
  body > a:hover {
    background-color: #16325a;
  }
  
  /* Botón "volver" */
  .volver {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 15px !important;
    width: 100px;
    height: 50px;
  }
  
  /* Formularios (reutilizable) */
  form {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px;
  }
  
  form h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1a3e6e;
    text-align: center;
  }
  
  form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
  }
  
  form input[type="text"],
  form input[type="number"],
  form input[type="email"],
  form input[type="password"],
  form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 18px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color .3s, box-shadow .3s;
  }
  
  form input:focus,
  form textarea:focus {
    border-color: #1a3e6e;
    box-shadow: 0 0 4px rgba(26,62,110,0.3);
    outline: none;
  }
  
  form button[type="submit"] {
    background-color: #1a3e6e;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color .3s;
  }
  form button[type="submit"]:hover {
    background-color: #16325a;
  }
  
  form button[type="reset"] {
    background-color: transparent;
    color: #1a3e6e;
    border: 2px solid #1a3e6e;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
    transition: background-color .3s, color .3s;
  }
  form button[type="reset"]:hover {
    background-color: #1a3e6e;
    color: #fff;
  }
  
  form .error {
    color: #d9534f;
    font-size: 0.9rem;
    margin-bottom: 15px;
  }
  
  /* Lista de productos */
  ul {
    list-style: none;
    padding: 0;
    max-width: 600px;
    width: 100%;
  }
  
  ul li {
    background: #fff;
    margin-bottom: 8px;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
  }
  
  /* Responsive */
  @media (max-width: 600px) {
    h1 { font-size: 2rem; }
    form, ul { padding: 10px; }
  }
  
  @media (max-width: 480px) {
    form { padding: 20px; }
    form h2 { font-size: 1.5rem; }
  }
  
/* Tabla */
table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse; /* Sin bordes duplicados */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
  }
  
  thead {
    background-color: #1a3e6e;
  }
  
  thead th {
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
  }
  
  tbody tr {
    border-bottom: 1px solid #e0e0e0;
  }
  
  tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
  }
  
  tbody tr:last-of-type {
    border-bottom: 2px solid #1a3e6e;
  }
  
  tbody tr:hover {
    background-color: #eaf2fb;
    transition: background-color 0.3s ease;
  }
  
  tbody td {
    padding: 12px 15px;
    color: #333;
  }

  /* Responsive para tablas */
  @media (max-width: 600px) {
    table, thead, tbody, th, td, tr {
      display: block;
    }
    thead {
      position: absolute;
      top: -9999px;
      left: -9999px;
    }
    tr {
      margin-bottom: 15px;
    }
    td {
      position: relative;
      padding-left: 50%;
      white-space: pre-wrap;
    }
    td::before {
      content: attr(data-label);
      position: absolute;
      left: 15px;
      font-weight: 600;
      color: #555;
    }
  }
  