.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    width: 100%;
    height: 60px;
    padding: 0 20px;
    box-sizing: border-box;

    background: linear-gradient(90deg, #004787 0%, #039be5 100%);
}

.topbar-title {
    grid-column: 2;
    justify-self: center;

    color: white;
    font-size: 22px;
    font-weight: bold;
}

.topbar-right {
    grid-column: 3;
    justify-self: end;
    margin: 0;
}

.topbar-left {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
}

.topbar-logo {
    display: block;
    width: auto;
    max-width: 180px;
    height: 42px;
    object-fit: contain;
}

.topbar-logout.ui-button {
    min-height: 38px;
    padding: 0 14px;
    color: #075b9d !important;
    background: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 45, 86, 0.22);
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease, transform 0.2s ease;
}

.topbar-logout.ui-button .ui-button-icon,
.topbar-logout.ui-button .ui-button-text {
    color: inherit !important;
}

.topbar-logout.ui-button:hover {
    color: #004787 !important;
    background: #eaf4fb !important;
    border-color: #eaf4fb !important;
    box-shadow: 0 5px 14px rgba(0, 45, 86, 0.3);
    transform: translateY(-1px);
}

.topbar-logout.ui-button:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4),
        0 3px 10px rgba(0, 45, 86, 0.22);
}

/* Mantiene el footer al pie cuando la tabla tiene pocos resultados. */
.resultados-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.resultados-layout .minuta-page {
    flex: 1 0 auto;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 60px;
    padding: 14px 20px;
    box-sizing: border-box;

    margin-top: auto;
    flex-shrink: 0;

    background: linear-gradient(90deg, #004787 0%, #039be5 100%);
}

.footer-text {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 640px) {
    .topbar {
        padding: 0 10px;
    }

    .topbar-logo {
        max-width: 120px;
        height: 36px;
    }

    .topbar-title {
        font-size: 16px;
    }

    .topbar-logout.ui-button {
        width: 40px;
        min-width: 40px;
        padding: 0;
    }

    .topbar-logout.ui-button .ui-button-text {
        display: none;
    }

    .footer {
        padding: 16px;
    }

    .footer-text {
        font-size: 13px;
    }
}
