/* ============================================================
   VARIABLES DE COLOR
============================================================ */
:root {
    --primary-color: #005689;
    --primary-2-color: #0078aa;
    --secondary-color: #ed9b00;
    --gray: #767676;
    --down-gray: #ebebeb;
    --color-black: #000000;
    --color-white: #ffffff;
}

/* ============================================================
   RESET BÁSICO
============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--down-gray);
    font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

header {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

header.main-header {
    position: relative;
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--color-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-width: 280px;
    height: auto;
}

.logout-btn {
    background-color: var(--primary-color);
    border: transparent;
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.logout-btn:hover {
    background-color: var(--secondary-color);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.05);
}

/* ============================================================
   TÍTULO
============================================================ */
h1 {
    text-align: center;
    background-color: var(--primary-color);
    color: var(--color-white);
    padding: 20px;
    margin: 0;
}

/* ============================================================
   TABLA DE PERSONAL
============================================================ */
.tabla-datos {
    width: 95%;
    max-width: 1100px;
    margin: 30px auto;
    border-collapse: collapse;
    background-color: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tabla-datos thead {
    background-color: var(--primary-2-color);
    color: var(--color-white);
}

.tabla-datos th,
.tabla-datos td {
    padding: 12px;
    text-align: center;
    font-size: 14px;
}

.tabla-datos tbody tr {
    border-bottom: 1px solid var(--down-gray);
}

.tabla-datos tbody tr:hover {
    background-color: rgba(0, 120, 170, 0.08);
}

/* BOTÓN EDITAR EN TABLA */
.tabla-datos button {
    background-color: var(--primary-2-color);
    color: var(--color-white);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s;
}

.tabla-datos button:hover {
    background-color: var(--secondary-color);
}


/* ============================================================
   SEPARADOR
============================================================ */
hr {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    border: none;
    height: 1px;
    background-color: var(--gray);
    opacity: 0.3;
}

/* ==============================
   BUSCADOR
============================== */

.buscador-container {
    width: 100%;
    max-width: 420px;
    margin: 20px 0;
    position: relative;
}

.buscador-container input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    outline: none;
    transition: all 0.2s ease;
    background-color: #fff;
}

.buscador-container input::placeholder {
    color: #9ca3af;
}

/* FOCUS */
.buscador-container input:focus {
    border-color: #005689;
    box-shadow: 0 0 0 2px rgba(0, 86, 137, 0.15);
}

/* ============================================================
   FORMULARIO DE EDICIÓN
============================================================ */
form {
    width: 95%;
    max-width: 900px;
    margin: 30px auto;
    background-color: var(--color-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ============================================================
   CAMPOS (REUTILIZADOS DE REGISTRAR)
============================================================ */
.campo {
    display: flex;
    flex-direction: column;
}

.campo label {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 5px;
}

.campo input,
.campo select {
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--down-gray);
    font-size: 14px;
}

/* FOCUS */
.campo input:focus,
.campo select:focus {
    outline: none;
    border-color: var(--primary-2-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 170, 0.2);
}

/* ============================================================
   BOTÓN GUARDAR
============================================================ */
form button {
    background-color: var(--primary-2-color);
    color: var(--color-white);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: center;
    margin-top: 10px;
}

form button:hover {
    background-color: var(--secondary-color);
}

button:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
}

/* ============================ BOTÓN VOLVER ============================ */

.btn-volver-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    background-color: var(--primary-2-color);
    color: var(--color-white);

    padding: 0.6rem 1.1rem;
    border: none;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;

    transition: 
        background-color 0.25s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ICONO */
.btn-volver i {
    font-size: 22px;
}

/* HOVER */
.btn-volver:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* ACTIVE (CLICK) */
.btn-volver:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .btn-volver-container {
        justify-content: center;
    }

    .btn-volver {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
    .tabla-datos {
        font-size: 13px;
    }

    form {
        padding: 20px;
    }

    form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 18px;
        padding: 15px;
    }

    .campo label {
        font-size: 12px;
    }

    .campo input,
    .campo select {
        font-size: 13px;
    }
}