* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f2f4f8;
    margin: 0;
    padding: 0;
}

.contenedor {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

h1, h2 {
    text-align: center;
    color: #1f3c88;
}

.menu {
    text-align: center;
    margin-bottom: 25px;
}

.menu a {
    text-decoration: none;
    background: #1f3c88;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    margin: 5px;
    display: inline-block;
}

.menu a:hover {
    background: #162b61;
}

fieldset {
    border: 1px solid #cfd8dc;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
}

legend {
    font-weight: bold;
    color: #1f3c88;
    padding: 0 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.campo {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 6px;
    color: #333;
}

input, select {
    padding: 10px;
    border: 1px solid #b0bec5;
    border-radius: 6px;
    font-size: 15px;
}

button, .btn {
    background: #1f3c88;
    color: white;
    border: none;
    padding: 11px 18px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover, .btn:hover {
    background: #162b61;
}

.btn-verde {
    background: #198754;
}

.btn-verde:hover {
    background: #146c43;
}

.btn-rojo {
    background: #dc3545;
}

.btn-rojo:hover {
    background: #b02a37;
}

.acciones {
    text-align: center;
    margin-top: 25px;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabla th {
    background: #1f3c88;
    color: white;
    padding: 10px;
}

.tabla td {
    padding: 10px;
    border: 1px solid #ddd;
}

.tabla tr:nth-child(even) {
    background: #f7f7f7;
}

.alerta {
    padding: 15px;
    background: #d1e7dd;
    color: #0f5132;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.datos-documento {
    line-height: 1.8;
    font-size: 16px;
}

.dato {
    margin-bottom: 8px;
}

.dato strong {
    color: #1f3c88;
}

@media print {
    .menu, .acciones {
        display: none;
    }

    body {
        background: white;
    }

    .contenedor {
        box-shadow: none;
        width: 100%;
        margin: 0;
    }
}

@media screen and (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}