html,body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: floralwhite;
    /* display: inline; */
    margin: 0;
    color: black;
    padding: 0;
    height: 100%;
}

header {
    background-color: #151fb0;
    color: white;
    text-align: center;
    padding: 10px;
    top: 0;
    z-index: 1000;
    position: sticky;
}

header h1 {
    margin-top: 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 5px;
}

nav a:hover {
    background-color: rgb(186, 186, 255);
    color: #0c1154;
    padding: 5px;
    border-radius: 5px;
}

main {
    display: flex;
    height: 85%;
    background-color: rgb(223, 232, 253);background-color: rgb(223, 232, 253);
    justify-content: center;
    /* align-items: center; */
}

main section {
    flex: 3;
    padding: 50px;
    /* justify-content: center; */
    /* justify-self: center ;
    align-items: center; */
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 1); */
}

footer {
    background-color: #151fb0;
    color: white;
    text-align: center;
    padding: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    justify-content: center;
}

th,
td {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid #ccc;
    text-align: center;
}

th {
    background-color: #f4f4f4;
}

td a {
    margin-right: 8px;
    text-decoration: none;    color: #007BFF;
    padding: 4px;
    border: 1px solid #007BFF;
    border-radius: 4px;    
    
}

.btnEditar {
    
    width: 50%;
    background-color: #007BFF;
    color: white;
}

.btnBorrar {
    width: 50%;
    background-color: #FF4136;
    color: white;
}

.btnEditar:hover {
    background-color: #0015ffff;
    color: white;
}

.btnBorrar:hover {
    background-color: #56211eff;
    color: white;
}

.btnAgregar {
    margin-bottom: 15px;
    border-radius: 5px;
    border: none;
    padding: .7%;    
    background-color: #28a745;
    color: white;
    cursor: pointer;
}
/* ESTILOS DE FORMULARIOS */
*, *::before, *::after {
  box-sizing: border-box;
}

form {
  background: #fff;
  padding: 25px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 100%;
  margin: auto;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  background: white;
}

/* textarea */
textarea {
  resize: vertical;
  min-height: 100px;
}

/* Botón sólo dentro de formularios */
form button {
  width: 100%;
  padding: 10px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

/* Hover y foco accesible */
form button:hover {
  background-color: #218838;
}
form button:focus {
  outline: 3px solid rgba(33,136,56,0.25);
  outline-offset: 2px;
}

/* Inputs foco */
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(21,31,176,0.15);
  outline-offset: 2px;
  border-color: #151fb0;
}

/* Mensaje de error */
.error {
  color: #b00020;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
}

/* Responsive: reducir padding en móviles */
@media (max-width: 480px) {
  form {
    padding: 14px;
  }
  h2 { font-size: 1.1rem; }
  form button { padding: 9px; font-size: 15px; }
}   