html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f4f7fb 0%, #e9eef7 100%);
    color: #1f2937;
}

/* ENCABEZADO */
.topbar {
    background: #ffffff;
    border-bottom: 1px solid #dbe3ef;
}

.logo-unds {
    width: 150px;
    height: auto;
    object-fit: contain;
}

.titulo-institucion {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0b2c5f;
    line-height: 1.2;
}

.subtitulo-institucion {
    font-size: 0.95rem;
    color: #5b6b82;
}

.badge-institucional {
    background: linear-gradient(135deg, #0b2c5f, #154a91);
    color: #fff;
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* SECCIÓN PRINCIPAL */
.main-section {
    flex: 1;
    padding-top: 30px;
    padding-bottom: 20px;
}

.presentacion {
    padding: 10px 5px;
}

.etiqueta {
    display: inline-block;
    background: rgba(11, 44, 95, 0.08);
    color: #0b2c5f;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 14px;
    border-radius: 20px;
    letter-spacing: 0.4px;
}

.titulo-principal {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0b2c5f;
    line-height: 1.2;
}

.texto-principal {
    font-size: 1rem;
    color: #4b5563;
    margin-top: 16px;
    line-height: 1.7;
}

.info-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    border: 1px solid #e5eaf2;
}

.info-box h5 {
    color: #0b2c5f;
    font-weight: 700;
    margin-bottom: 14px;
}

.lista-info {
    padding-left: 18px;
    margin-bottom: 0;
    color: #374151;
}

.lista-info li {
    margin-bottom: 8px;
}

/* CARD FORMULARIO */
.formulario-card {
    border-radius: 22px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.formulario-header {
    background: linear-gradient(135deg, #0b2c5f 0%, #123f82 100%);
    color: white;
    padding: 24px 28px;
    border-bottom: none;
}

.formulario-header h3 {
    font-weight: 800;
    font-size: 1.4rem;
}

.formulario-header p {
    font-size: 0.95rem;
    opacity: 0.92;
}

.form-label {
    font-weight: 600;
    color: #24364d;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #cfd8e6;
    padding: 12px 14px;
    font-size: 0.96rem;
    transition: all 0.3s ease;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #123f82;
    box-shadow: 0 0 0 0.2rem rgba(18, 63, 130, 0.15);
}

/* BOTONES */
.btn-guardar {
    background: linear-gradient(135deg, #0b2c5f 0%, #154a91 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 700;
    transition: 0.3s ease;
}

.btn-guardar:hover {
    background: linear-gradient(135deg, #09234d 0%, #103b75 100%);
    color: #fff;
    transform: translateY(-1px);
}

.btn-ver {
    background: #eef3fb;
    color: #0b2c5f;
    border: 1px solid #d5dfef;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 700;
    transition: 0.3s ease;
}

.btn-ver:hover {
    background: #dde8f8;
    color: #0b2c5f;
}

/* FOOTER */
.footer-institucional {
    background: #0b2c5f;
    color: #dce6f7;
    text-align: center;
    padding: 12px 0;
    margin-top: auto;
}

/* SECCIÓN TÍTULO LISTAR */
.seccion-titulo {
    margin-bottom: 20px;
}

/* CARD FILTRO */
.filtro-card {
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e4eaf3;
}

/* CARD TABLA */
.tabla-card {
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
}

.tabla-header {
    background: linear-gradient(135deg, #0b2c5f 0%, #123f82 100%);
    color: #ffffff;
    padding: 20px 25px;
    border: none;
}

.tabla-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* TABLA */
.tabla-documentos thead th {
    background: #eef3fb;
    color: #0b2c5f;
    font-weight: 700;
    border-bottom: 1px solid #d8e2f0;
    padding: 16px 14px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.tabla-documentos tbody td {
    padding: 16px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #edf1f7;
    color: #334155;
    font-size: 0.94rem;
}

.tabla-documentos tbody tr:hover {
    background: #f8fbff;
}

.descripcion-columna {
    min-width: 240px;
    max-width: 320px;
}

/* BADGES */
.badge-id {
    display: inline-block;
    background: #e8eef8;
    color: #0b2c5f;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-area {
    display: inline-block;
    background: rgba(21, 74, 145, 0.10);
    color: #154a91;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* BOTONES EXTRA */
.btn-nuevo {
    background: #ffffff;
    color: #0b2c5f;
    border: 1px solid #cfd8e6;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 700;
    transition: 0.3s ease;
}

.btn-nuevo:hover {
    background: #f3f7fd;
    color: #0b2c5f;
}

.btn-pdf {
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
}

.btn-pdf:hover {
    background: #157347;
    color: #fff;
}

.btn-eliminar {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
}

.btn-eliminar:hover {
    background: #bb2d3b;
    color: #fff;
}

/* MENSAJE SIN REGISTROS */
.sin-registros {
    text-align: center;
    padding: 40px 20px;
    color: #5b6b82;
}

.sin-registros h5 {
    color: #0b2c5f;
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .titulo-principal {
        font-size: 1.8rem;
    }

    .logo-unds {
        width: 250px;
    }
}

@media (max-width: 576px) {
    .titulo-institucion {
        font-size: 1.05rem;
    }

    .subtitulo-institucion {
        font-size: 0.85rem;
    }

    .titulo-principal {
        font-size: 1.5rem;
    }

    .formulario-header {
        padding: 20px;
    }

    .card-body {
        padding: 20px !important;
    }
}