/* ---------------------------
   RESET Y ESTILOS GENERALES
--------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f5;
    color: #2b3a33;
    line-height: 1.6;
}

h1, h2, h3 {
    color: #1e2a25;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------------------------
   HEADER
--------------------------- */
header {
    background-color: #3a4a42;
    color: #f4f7f5;
    padding: 20px 0;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

button {
    background-color: #4e665b;
    color: #f4f7f5;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background-color: #2b3a33;
}

/* ---------------------------
   PANTALLAS
--------------------------- */
div[id^="pantalla-"] {
    display: none;
    max-width: 1000px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ---------------------------
   FORMULARIOS Y INPUTS
--------------------------- */
input[type="text"], input[type="number"], input[type="password"] {
    padding: 8px 10px;
    margin: 5px 5px 15px 0;
    border-radius: 5px;
    border: 1px solid #b3c2b0;
    width: 200px;
}

/* ---------------------------
   TABLAS
--------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table, th, td {
    border: 1px solid #b3c2b0;
}

th, td {
    padding: 10px;
    text-align: center;
    color: #2b3a33;
}

thead {
    background-color: #4e665b;
    color: #f4f7f5;
}

tr:nth-child(even) {
    background-color: #f4f7f5;
}

/* ---------------------------
   MENSAJES DE ERROR
--------------------------- */
#error, #mensajeError {
    color: #ff4c4c;
    font-weight: bold;
    margin-top: 5px;
}

/* ---------------------------
   PIE DE PÁGINA
--------------------------- */
footer {
    background-color: #3a4a42;
    color: #f4f7f5;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* ---------------------------
   CHECKBOXES
--------------------------- */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ---------------------------
   MEDIA QUERY: CELULARES
--------------------------- */
@media (max-width: 768px) {
    header {
        font-size: 1.5rem;
        padding: 15px 0;
    }

    nav {
        flex-direction: column;
        gap: 5px;
    }

    button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    input[type="text"], input[type="number"], input[type="password"] {
        width: 100%;
        margin-bottom: 10px;
    }

    div[id^="pantalla-"] {
        padding: 15px;
        margin: 10px;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 6px;
    }

    footer {
        font-size: 0.8rem;
    }
}
