/* ============================================================
   CONFIGURACIÓN GENERAL
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background: #eef2f6;
    color: #263238;
    padding: 0;
}
/* ============================================================
   HEADER
   ============================================================ */
header {
    height: 82px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 3px solid #0f233d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 28px;
}
header h1 {
        font-family: "Michroma", sans-serif;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.logo-header {
    position: absolute;
    right: 30px;
    top: 13px;
    width: 125px;
    height: 55px;
    object-fit: contain;
}
.logo-header2 {
    position: absolute;
    left: 20px;
    top: 8px;
    width: 125px;
    height: 65px;
    object-fit: contain;
}
/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.contenedor {
    width: calc(100% - 40px);
    margin: 0 auto 35px auto;
}
/* ============================================================
   ENCABEZADO DE LA TABLA
   ============================================================ */
.encabezado {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}
/* ============================================================
   BUSCADOR
   ============================================================ */
.buscador {
    position: relative;
    width: 420px;
    display: flex;
    align-items: center;
    justify-self: start;
}
.buscador i {
    position: absolute;
    left: 13px;
    color: #718096;
    font-size: 17px;
    pointer-events: none;
}
.buscador input {
    width: 100%;
    height: 40px;
    padding: 8px 12px 8px 40px;
    border: 1px solid #cbd5df;
    border-radius: 7px;
    background: #ffffff;
    color: #263238;
    font-size: 14px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
.buscador input::placeholder {
    color: #9aa4ad;
}
.buscador input:focus {
    border-color: #4f7d9c;
    box-shadow:
        0 0 0 3px rgba(79, 125, 156, 0.13);
}
/* ============================================================
   DESCRIPCIÓN
   ============================================================ */
.descripcion {
    text-align: center;
    justify-self: center;
    white-space: nowrap;
}
.descripcion p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0f233d;
}
/* ============================================================
   BOTÓN NUEVO
   ============================================================ */
button {
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}
button:hover {
    transform: translateY(-1px);
}
.btn-nuevo {
    justify-self: end;
    background: #0f233d;
    color: #ffffff;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(15, 35, 61, 0.25);
}
.btn-nuevo:hover {
    background: #18385f;
}
/* ============================================================
   BOTÓN EDITAR
   ============================================================ */
.btn-editar {
    background: #4f7d9c;
    color: white;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
}
.btn-editar:hover {
    background: #3d647e;
}
/* ============================================================
   BOTÓN GUARDAR
   ============================================================ */
.btn-guardar {
    background: #4f7d9c;
    color: white;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
}
.btn-guardar:hover {
    background: #3d647e;
}
/* ============================================================
   BOTÓN CANCELAR
   ============================================================ */
.btn-cancelar {
    background: #7b8187;
    color: white;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
}
.btn-cancelar:hover {
    background: #5f6469;
}
/* ============================================================
   CONTENEDOR DE TABLA
   ============================================================ */
.tabla {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d7dee5;
    border-radius: 10px;
    overflow: auto;
    max-height: calc(100vh - 160px);
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.08);
}
/* ============================================================
   SCROLL
   ============================================================ */
.tabla::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.tabla::-webkit-scrollbar-track {
    background: #edf1f4;
}
.tabla::-webkit-scrollbar-thumb {
    background: #aab5bf;
    border-radius: 10px;
    border: 2px solid #edf1f4;
}
.tabla::-webkit-scrollbar-thumb:hover {
    background: #7f8c98;
}
/* ============================================================
   TABLA
   ============================================================ */
table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 14px;
}
/* ============================================================
   ENCABEZADOS
   ============================================================ */
th {
    background: #0f233d;
    color: #ffffff;
    padding: 12px 14px;
    border-right: 1px solid #29425e;
    border-bottom: 2px solid #0b1a2e;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 5;
}
/* ============================================================
   CELDAS
   ============================================================ */
td {
    padding: 10px 12px;
    border-right: 1px solid #e1e6ea;
    border-bottom: 1px solid #e1e6ea;
    white-space: nowrap;
    font-size: 13px;
    background: #ffffff;
}
/* ============================================================
   FILAS
   ============================================================ */
tbody tr:nth-child(even) td {
    background: #f8fafc;
}
tbody tr:hover td {
    background: #edf4f9;
}
/*PRIMERA COLUMNA / ID */
th:first-child,
td:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    font-weight: 600;
}
th:first-child {
    background: #0f233d;
    z-index: 10;
}
tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}
tbody tr:hover td:first-child {
    background: #edf4f9;
}
/* ============================================================
   INPUTS
   ============================================================ */
td input,
td select {
    height: 34px;
    padding: 6px 9px;
    border: 1px solid #cbd3da;
    border-radius: 5px;
    background: #ffffff;
    color: #263238;
    font-size: 13px;
    width: 170px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
td input:hover,
td select:hover {
    border-color: #9eabb7;
}
td input:focus,
td select:focus {
    outline: none;
    border-color: #4f7d9c;
    box-shadow:
        0 0 0 3px rgba(79, 125, 156, 0.15);
}
/* placeholder */
td input::placeholder {
    color: #9aa4ad;
}
/* CONTRASEÑAS*/
.input-group {
    width: 250px !important;
    display: flex;
}
.input-group .form-control {
    width: 210px !important;
    height: 34px;
    font-size: 13px;
}
/*BOTÓN DEL OJO*/
.input-group .btn {
    width: 40px;
    padding: 5px;
    border-radius: 0 5px 5px 0;
    background: #ffffff;
    border: 1px solid #cbd3da;
    border-left: none;
    color: #596873;
}
.input-group .btn:hover {
    background: #edf2f5;
    color: #0f233d;
}
/* COLUMNAS DE CONTRASEÑAS */
th:nth-child(7),
td:nth-child(7),
th:nth-child(9),
td:nth-child(9),
th:nth-child(11),
td:nth-child(11),
th:nth-child(13),
td:nth-child(13),
th:nth-child(15),
td:nth-child(15) {
    min-width: 250px;
}
/* ============================================================
   ACCIONES
   ============================================================ */
td:last-child {
    text-align: center;
    min-width: 155px;
    position: sticky;
    right: 0;
    z-index: 3;
    background: #ffffff;
}
th:last-child {
    text-align: center;
    min-width: 155px;
    position: sticky;
    right: 0;
    z-index: 10;
}
tbody tr:nth-child(even) td:last-child {
    background: #f8fafc;
}
tbody tr:hover td:last-child {
    background: #edf4f9;
}
/* ============================================================
   ENLACES
   ============================================================ */
td a {
    color: #273f70;
    text-decoration: none;
    font-weight: 600;
}
td a:hover {
    text-decoration: underline;
}
/* ============================================================
   BOTONES DE ACCIONES JUNTOS
   ============================================================ */
td:last-child button {
    margin: 2px;
}
/* ============================================================
   CELDA ENCONTRADA POR EL BUSCADOR
   ============================================================ */
.celda-encontrada {
    background: #fff3a3 !important;
    box-shadow:
        inset 0 0 0 3px #e0b100;
    transition:
        all 0.3s ease;
}
/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    header {
        height: 70px;
    }
    header h1 {
        font-size: 19px;
    }
    .logo-header {
        width: 90px;
        right: 10px;
    }
    .logo-header2 {
        width: 90px;
        left: 5px;
    }
    .contenedor {
        width: calc(100% - 20px);
    }
    .tabla {
        max-height: calc(100vh - 130px);
    }
    /* ENCABEZADO EN CELULAR */
    .encabezado {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .buscador {
        width: 100%;
        justify-self: center;
    }
    .descripcion {
        justify-self: center;
        order: -1;
    }
    .btn-nuevo {
        justify-self: center;
    }
}
.btn-responsiva {
    display: inline-block;
    padding: 8px 12px;
    margin-left: 5px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.btn-responsiva:hover {
    color: white;
    background: #555;
}