body {
    font-family: Arial, sans-serif;
    background-image: linear-gradient(rgba(0, 49, 0, 0.604)), url(/Frontend/images/bandera.png);
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #4CAF50;
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.loader-text {
    color: white;
    margin-top: 15px;
    font-size: 15px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.formulario {
    align-content: center;
    background-color: #ffffff;
    align-items: center;
    width: 50%;
    max-height: auto;
    overflow-y: visible;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.549);
    padding: 20px;
    margin-left: 32%;
    margin-top: 4%;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

.headerF {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    position: relative;
}

.headerF h2 {
    color: rgb(15, 129, 0);
    margin: 10px 0 0 0;
    font-size: 22px;
    font-weight: bold;
}

.seccionF {
    box-shadow: 0 0 10px rgba(0, 94, 17, 0.239);
    border-radius: 20px;
    padding: 8px;
    margin-bottom: 30px;
    background-color: #ffffff;
}

.tablaF {
    width: 100%;
    border-collapse: collapse;
}

.tablaF td {
    padding: 14px 20px;
    font-size: 14px;
    width: 50%;
}

.tablaF tr:nth-child(odd) {
    background-color: #e3ffeb;
}

.tablaF input[type="text"],
.tablaF input[type="password"],
.tablaF select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #aaa;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.tablaF input.read-only {
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #666;
    cursor: not-allowed;
    pointer-events: none;
}

.tablaF input.edit-mode {
    background-color: #ffffff !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
    cursor: text;
    pointer-events: auto;
}

.tablaF input:focus,
.tablaF select:focus {
    outline: none;
    border-color: #00a13e;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.password-toggle-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: none;
}

.edit-mode ~ .password-toggle {
    display: block;
}

.ver {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.ver:hover {
    opacity: 1;
}

.mensajeTexto,
.mensajeDateTime,
.mensajeSelect {
    display: none;
    font-size: 12px;
    color: rgb(255, 0, 0);
    padding: 0;
    margin-top: 5px;
    margin-bottom: 0;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    display: none;
    text-align: center;
    border: 1px solid #a5d6a7;
}

.error-message {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    display: none;
    text-align: center;
    border: 1px solid #ef9a9a;
}

.error-input {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2) !important;
}

.button-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.botonEditar, .botonGuardar, .botonCancelar {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    min-width: 150px;
}

.botonEditar {
    background-color: #4CAF50;
    color: white;
}

.botonEditar:hover {
    background-color: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.botonGuardar {
    background-color: #009708;
    color: white;
}

.botonGuardar:hover {
    background-color: #00cc0a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.botonCancelar {
    background-color: #757575;
    color: white;
}

.botonCancelar:hover {
    background-color: #616161;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tablaInfoDocumentoVictima {
    width: 100%;
    border-collapse: collapse;
}

.tablaInfoDocumentoVictima td {
    padding: 14px 20px;
    font-size: 14px;
    width: 25%;
}

.tablaInfoDocumentoVictima tr:nth-child(odd) {
    background-color: #e3ffeb;
}

.tablaInfoDocumentoVictima input[type="text"],
.tablaInfoDocumentoVictima select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #aaa;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    background-color: #ffffff;
}

.tablaInfoDocumentoVictima input:focus,
.tablaInfoDocumentoVictima select:focus {
    outline: none;
    border-color: #00a13e;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1024px) {
    body {
        padding-top: 75px;
    }

    .formulario {
        width: calc(100% - 32px);
        max-width: 560px;
        margin: 20px auto 40px auto;
        padding: 16px 14px;
    }

    .headerF h2 {
        font-size: 22px;
    }

    .tablaF {
        display: flex;
        flex-direction: column;
    }

    .tablaF tr:nth-child(odd) {
        display: none !important;
        visibility: hidden !important;
        max-height: 0 !important;
    }

    .tablaF tr:nth-child(even) {
        display: flex;
        flex-direction: column;
        background-color: transparent;
    }

    .tablaF td {
        display: block;
        width: 100%;
        padding: 2px 4px 10px 4px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .tablaF td[data-label]::before {
        content: attr(data-label);
        display: block;
        color: rgb(15, 129, 0);
        font-weight: bold;
        font-size: 15px;
        margin-bottom: 4px;
    }

    .tablaF input[type="text"],
    .tablaF input[type="password"],
    .tablaF select {
        height: 46px;
        padding: 0 12px;
        font-size: 17px;
        box-sizing: border-box;
    }

    .tablaF input[type="password"] {
        padding-right: 44px;
    }

    .mensajeTexto,
    .mensajeDateTime {
        font-size: 13px;
    }

    .seccionF {
        padding: 10px 8px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 20px;
    }

    .botonEditar,
    .botonGuardar,
    .botonCancelar {
        width: 88%;
        max-width: 340px;
        font-size: 16px;
        padding: 12px 20px;
        min-width: unset;
    }

    .password-toggle {
        right: 8px;
    }

    .ver {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .formulario {
        width: calc(100% - 20px);
        padding: 12px 10px;
    }

    .headerF h2 {
        font-size: 19px;
    }

    .tablaF td {
        padding: 2px 4px 8px 4px;
        font-size: 13px;
    }

    .tablaF td[data-label]::before {
        font-size: 13px;
    }

    .tablaF input[type="text"],
    .tablaF input[type="password"],
    .tablaF select {
        height: 40px;
        padding: 0 10px;
        font-size: 15px;
    }

    .tablaF input[type="password"] {
        padding-right: 40px;
    }

    .botonEditar,
    .botonGuardar,
    .botonCancelar {
        width: 100%;
        font-size: 14px;
        padding: 11px 15px;
    }

    .ver {
        width: 17px;
        height: 17px;
    }
}

@keyframes aparecer {
    from {
        transform: translatey(10%);
        opacity: 0;
    }
    to {
        transform: translatey(0);
        opacity: 1;
    }
}

.fondoF {
    animation: aparecer 0.8s ease-out;
}

.formulario {
    animation: aparecer 0.8s ease-out;
}

@keyframes movimiento {
    from {
        transform: translatey(10%);
        opacity: 0;
    }
    to {
        transform: translatey(0);
        opacity: 1;
    }
}

.fondoCerrarSesion {
    animation: movimiento 0.5s ease-out;
}

.fondoCerrarSesion {
    display: none;
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cerrarSesion {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.boton1cerrarSesion {
    background-color: #138035;
    color: white;
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.boton1cerrarSesion:hover {
    background-color: #0d6829;
    transform: translateY(-2px);
}

.boton2cerrarSesion {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.boton2cerrarSesion:hover {
    background-color: #c5c5c5;
    transform: translateY(-2px);
}

.imgCerrarSesion {
    width: 100px;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.user-status {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

#userRole {
    font-weight: 500;
    color: #4CAF50;
}

#lastUpdate {
    font-style: italic;
}